Maix Go Camera direction


#1

When I run the face_detect and si_demo_sim demos I compiled from the LIcheeDan_k210_examples repository, the picture on my Maix Go is mirrored (right<>left). My camera is mounted on the opposite side of the LCD (not selfie mode), which I believe is the reason for this.

Where can I change this in the demos?
Its in the camera, not the LCD, because the bounding boxes with classifications do not appear swapped.

thanks,
Udi


#2

Hi, please refer to our maixpy’s code, there have code for vflip/hflip config in sensor.c


#3

Thanks, this worked. I rewrote ov2640_set_hmirror() based on that code.

In retrospect, I could hardwire this by changing ov2640.c line 31’s value from 0x88 to 0x08.
I assume this depends whether the camera is in the front or back.
Maybe add a #define for front or back camera and add it to the ov2640 init code, instead of writing a dedicated function for this. (bit 7 of reg 0x04 while in bank 0x01), as it is not expected to be changed after init.


#4

thank you for your suggestion, but we are focus on maixpy, it is easy to change direction via python api.
Also, welcome push your code to our c demo reposity: https://github.com/sipeed/LicheeDan_K210_examples