maximkulkin / esp32-homekit-camera

Firmware for esp32-camera module to act as Apple Homekit IP camera
MIT License
399 stars 78 forks source link

Rotation #63

Closed icefabio closed 4 years ago

icefabio commented 4 years ago

Is there any way to rotate the image?

Thanks

HerrHerrmannMann commented 4 years ago

add two lines in /esp32-homekit-camera/compenents/esp32-camera/driver/camera.c

at line 1221 starts the ov2640 sensor.id.PID settings. add under the "s_state->sensor.set_bpc(&s_state->sensor, false);" line this:

s_state->sensor.set_hmirror(&s_state->sensor, true); s_state->sensor.set_vflip(&s_state->sensor, true);

icefabio commented 4 years ago

Hi Herr! Many thanks for your tip. :)

Assuming these 2 lines rotate the image 180 degrees, how could I rotate it 90 or 270 degrees? What's the rule?

HerrHerrmannMann commented 4 years ago

hey,

I´ve looking for your issue. Rotation is not possible. Only hmirror & vflip. You can rotate the image with a software solution. But, in this case, i´m out. I´m a bad coder...

icefabio commented 4 years ago

Hi! It's clear :)

Tks