andreknieriem / photobooth

A photobooth Web-Application for raspberry pi with gphoto2
https://photobooth.andrerinas.de/
MIT License
294 stars 163 forks source link

Cropping device cam preview #302

Closed nick-fisch closed 2 years ago

nick-fisch commented 2 years ago

I am using a raspberry pi cam for the preview during the countdown. Because the pi cam feed shows more than the actual image taken by the DSLR cam I am trying to crop the feed from the raspberry pi cam via it's ROI features or a zoom or crop function.

Where exactly is the preview for the countdown started? Is it possible to configure the command for this?

andi34 commented 2 years ago

I'd not call it an Photobooth issue, using a different camera for preview sure won't create a 1:1 image.

Constraints constants: https://github.com/andreknieriem/photobooth/blob/182bdc424a0d26e7cbd13a667848ac00bd473805/resources/js/core.js#L11-L20

Function to start the video preview: https://github.com/andreknieriem/photobooth/blob/182bdc424a0d26e7cbd13a667848ac00bd473805/resources/js/core.js#L106-L130

Started here https://github.com/andreknieriem/photobooth/blob/182bdc424a0d26e7cbd13a667848ac00bd473805/resources/js/core.js#L149

On a more powerful device than a Pi you'll be able to use a preview from the DSLR if supported by gphoto2. This feature was added to my fork and got some improvements on the setup and handling some days ago. Sure, it'll run also on a Raspberry, but it'll definitely decrease the performance.