prusa3d / Prusa-Firmware-ESP32-Cam

Firmware for ESP32 Cam modules to be used in Prusa Connect
GNU General Public License v3.0
97 stars 10 forks source link

rotation of the image #20

Closed Panik68 closed 1 month ago

Panik68 commented 1 month ago

Could the rotation of the image in 4 steps 0(360), 90, 180, 270° be included in the next update?

mozgy commented 1 month ago

you cannot rotate 90° or 270°, only vertical and horizontal flips so 180° would be both flips active ..

johnyHV commented 1 month ago

The camera module does not support rotating the photo by 90° and 270° degrees. I did not find a solution to rotate the image by 90° and 270° .

Panik68 commented 1 month ago

Thank you very much for your feedback. I have also checked again and it is indeed not possible to rotate the image. Apparently this is due to the camera module itself. What a pity.

nvtkaszpir commented 1 month ago

it would be possible to add jpeg exif metadata and there you can define orientation (image rotation), so this way esp32 does not have to do any actual rotations, the client would be aware the image needs to be rotated, and modern browsers already do that

johnyHV commented 1 month ago

@nvtkaszpir Hmm this is good idea. I've never tried anything like that and ESP32-cam have a low RAM memory. but I will try to see if it is possible

johnyHV commented 1 month ago

@nvtkaszpir A perfect idea with EXIF. The OV2640 does not generate EXIF data in the JPG file. However, I managed to add EXIF to the photo, and rotation works. I am still testing it, but if the tests go well, this change will appear in firmware version 1.0.3.

johnyHV commented 1 month ago

@Panik68 and @nvtkaszpir new FW v1.0.3-rc1 has added a support for EXIF and image rotation :)

nvtkaszpir commented 1 month ago

ha, awesome!