Camera orientation in Android 9

I am using IMX214 camera (from Khadas shop) and Edge-V with Android 9 installed.

Sensor is flipped on the device (construction specific) and used as front camera.

I have tried the sensor.orientation property for IMX214 m01 section in hardware/rockchip/camera/etc/camera/camera3_profiles_rk3399.xml file, but it did not help.

Where is the initial camera orientation property can be found in Android source code?

1 Like

Generally, the camera register value is modified to achieve rotation, which is reliable.

2 Likes

Thank You! The register with address 0x0101 can be used for camera rotation.

0x0101 1bit Image orientation for Vertical direction 0 : normal 1 : reverse
0x0101 0bit Image orientation for Horizontal direction 0 : normal 1 : reverse
(see kernel/drivers/media/i2c/imx214.c, line 172)

Also, rotation requires changing in data format

#define IMX214_MEDIA_BUS_FMT MEDIA_BUS_FMT_SRGGB10_1X10

2 Likes