ESP32-cam image orientation (no it's not about the possibility to actively rotate the image)

Recently I got some ESP32-cam’s which I configured with the ESPhome scripts. Apart from some defect boards and cameramodules most of the devices work well. One thing I do not understand is that some of the cam’s give a 90° rotated image as compared to others. I’ve interchanged both the boards and camera’s but consistently some of the lenses have the rotated orientation. Is it a known phenomena that ESP32-cam lenses have an unpredictable orientation? I’ve not been able to find anything about that in the texts at the webstores.

I think it is a phenomena that these things are mass produced and the assembly lines are different between manufacturers and even batches.

I was looking for a OV2640 with 20cm cable, while looking for it, I found a seller (can’t find it now) that stated that there is a marking for what orientation the sensor has.
One is V1 the other is V2, it’s printed on silkscreen or even inside the cable.

I have one with V2 printed, this one is in “portrait mode”. If looking at the lens and the connector is on the bottom.
I also have one 120 degree lens with neither V1 or V2 printed, but that one is orientated as landscape with the connector on the bottom. Maybe this is the “V1”.

Check yours and see if this can be valid identification of the orientation.

Interesting. I checked all types of lenses which I have here on the type-indicatioin on the ribbon. I have 4 different types, with 3 different lens-orientations. In the list below the connector-orientation is given from the point where you are looking in the same directory as the lens.

  • AF2569: connector right
  • OV2540: connector at bottom
  • V3: connector at bottom
  • V11: connector on top

The V11 is supposed to be a 5MP lens but I cannot test it as the max resolution of the ESP32-cam board is 1600x1200.

It might be useful to collect this info for the other types available and publish it here. In my case I started with a cam with the ribbon on the side and designed some 3D printable enclosure for it, which is not usable for the other types (of course within HASS the image can be rotated, but not on the web-link of the cam).