Hello,
One of our VEYE-MIPI-IMX385 randomly flip the image upside down. Using the I2C utility, I could flip it back again.
What could be the cause of this issue. We are testing 4 units and so far, one unit keep doing this about 5% of the time.
Please help.
Latest posts made by thn
-
VEYE-MIPI-IMX385 randomly flip the image upside down
-
RE: Is there any plan to support libcamera?
Hello,
What should I do with these dmesg output?
[ 8.850954] veyecam2m: loading out-of-tree module taints kernel.
[ 9.228770] veyecam2m 10-003b: camera id is veyecam2m
[ 9.230589] veyecam2m 10-003b: sensor is IMX385
[ 9.230616] veyecam2m 10-003b: board type is ONE board
[ 9.231135] veyecam2m 10-003b: Consider updating driver veyecam2m to match on endpoints
[ 9.231782] veyecam2m 10-003b: veyecam2m camera probed -
RE: Is there any plan to support libcamera?
@veye_xumm
I tried the cable that came in the retail package we purchased from Amazon. When I plugged the camera into the Raspberry Pi IO board with a CM4, the camera did not show up at /dev/video0 at all. This is using the very same MicroSD card to boot the Raspberry Pi 4.
I must be missing something. -
RE: Is there any plan to support libcamera?
@veye_xumm
A cable question, I want to test out the Raspberry Pi IO board with a CM4, but this IO board come with a 22 pins header connection instead of the 15 pin as in your camera.
Could you advise a way to connect the 22 pin header into your camera? Which converter or cable should we use?
Thanks, -
RE: Is there any plan to support libcamera?
@veye_xumm
That sounds like more works than just take video0 output and convert to YUV420 or BGR directly.
Also can we use two cameras? -
RE: Is there any plan to support libcamera?
@veye_xumm
The obvious advantage for support libcamera is that the app can be compatible with other cameras that support libcamera. This could become a popular choice in the future. But who know!!!Right now I can use v4l2 API to access the camera /dev/video0 with UYVY format and then convert to BGR for OpenCV processing.
I check the format for /dev/video12 with
v4l2-ctl --device /dev/video12 --list-formats
The result is:
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture Multiplanar[0]: 'YUYV' (YUYV 4:2:2) [1]: 'YVYU' (YVYU 4:2:2) [2]: 'VYUY' (VYUY 4:2:2) [3]: 'UYVY' (UYVY 4:2:2) [4]: 'YU12' (Planar YUV 4:2:0) [5]: 'YV12' (Planar YVU 4:2:0) [6]: 'RGB3' (24-bit RGB 8-8-8) [7]: 'BGR3' (24-bit BGR 8-8-8) [8]: 'AB24' (32-bit RGBA 8-8-8-8) [9]: 'BGR4' (32-bit BGRA/X 8-8-8-8) [10]: 'RGBP' (16-bit RGB 5-6-5) [11]: 'NV12' (Y/CbCr 4:2:0) [12]: 'NV21' (Y/CrCb 4:2:0)
So should I access /dev/video12 in my v4l2 app and request YUV 4:2:0 or even BGR3? Will your current driver support that?
Thanks, -
RE: Is there any plan to support libcamera?
@veye_xumm
Please keep me posted if you have any new libcamera code that I could help testing them out.
Thanks, -
RE: Is there any plan to support libcamera?
@veye_xumm
Hi again, finally I figured out how to convert the V4L2 frame buffer into OpenCV BGR Mat. Here is an example code in case anyone want to know. I uses COLOR_YUV2BGR_YUYV because I already used the i2c command to set the camera to YUYV.
The problem with this code is that the function cvtColor is very CPU intensive and it will bring the frame rate down to about 20 FPS. I hope there is a better way to use this camera in the Pi OS 64 bit mode.static void process_image(const void *p, int size)
{
int width=VCOS_ALIGN_UP(1920, 32);
int height=VCOS_ALIGN_UP(1080, 16);
Mat yuv = Mat(height, width, CV_8UC2, (uint8_t *)p, width);
cvtColor(yuv, yuv, COLOR_YUV2BGR_YUYV);
imshow("Display", yuv);
waitKey(1);
} -
RE: Is there any plan to support libcamera?
@veye_xumm
I will appreciate if you could give me an example of how to covert the V4L2 buffer into the OpenCV Mat BGR buffer. This way I could use your camera in my project.
Thanks, -
RE: Is there any plan to support libcamera?
@veye_xumm said in Is there any plan to support libcamera?:
v4l2-ctl --list-formats-ext
Yes I use V4L2 API to access the IMX385 camera. And here is the formats command:
v4l2-ctl --list-formats --device /dev/video0
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture[0]: 'YUYV' (YUYV 4:2:2) [1]: 'UYVY' (UYVY 4:2:2) [2]: 'YVYU' (YVYU 4:2:2) [3]: 'VYUY' (VYUY 4:2:2) [4]: 'RGBP' (16-bit RGB 5-6-5) [5]: 'RGBR' (16-bit RGB 5-6-5 BE) [6]: 'RGBO' (16-bit A/XRGB 1-5-5-5) [7]: 'RGBQ' (16-bit A/XRGB 1-5-5-5 BE) [8]: 'RGB3' (24-bit RGB 8-8-8) [9]: 'BGR3' (24-bit BGR 8-8-8) [10]: 'RGB4' (32-bit A/XRGB 8-8-8-8) [11]: 'BA81' (8-bit Bayer BGBG/GRGR) [12]: 'GBRG' (8-bit Bayer GBGB/RGRG) [13]: 'GRBG' (8-bit Bayer GRGR/BGBG) [14]: 'RGGB' (8-bit Bayer RGRG/GBGB) [15]: 'pBAA' (10-bit Bayer BGBG/GRGR Packed) [16]: 'BG10' (10-bit Bayer BGBG/GRGR) [17]: 'pGAA' (10-bit Bayer GBGB/RGRG Packed) [18]: 'GB10' (10-bit Bayer GBGB/RGRG) [19]: 'pgAA' (10-bit Bayer GRGR/BGBG Packed) [20]: 'BA10' (10-bit Bayer GRGR/BGBG) [21]: 'pRAA' (10-bit Bayer RGRG/GBGB Packed) [22]: 'RG10' (10-bit Bayer RGRG/GBGB) [23]: 'pBCC' (12-bit Bayer BGBG/GRGR Packed) [24]: 'BG12' (12-bit Bayer BGBG/GRGR) [25]: 'pGCC' (12-bit Bayer GBGB/RGRG Packed) [26]: 'GB12' (12-bit Bayer GBGB/RGRG) [27]: 'pgCC' (12-bit Bayer GRGR/BGBG Packed) [28]: 'BA12' (12-bit Bayer GRGR/BGBG) [29]: 'pRCC' (12-bit Bayer RGRG/GBGB Packed) [30]: 'RG12' (12-bit Bayer RGRG/GBGB) [31]: 'pBEE' (14-bit Bayer BGBG/GRGR Packed) [32]: 'BG14' (14-bit Bayer BGBG/GRGR) [33]: 'pGEE' (14-bit Bayer GBGB/RGRG Packed) [34]: 'GB14' (14-bit Bayer GBGB/RGRG) [35]: 'pgEE' (14-bit Bayer GRGR/BGBG Packed) [36]: 'GR14' (14-bit Bayer GRGR/BGBG) [37]: 'pREE' (14-bit Bayer RGRG/GBGB Packed) [38]: 'RG14' (14-bit Bayer RGRG/GBGB) [39]: 'GREY' (8-bit Greyscale) [40]: 'Y10P' (10-bit Greyscale (MIPI Packed)) [41]: 'Y10 ' (10-bit Greyscale) [42]: 'Y12P' (12-bit Greyscale (MIPI Packed)) [43]: 'Y12 ' (12-bit Greyscale) [44]: 'Y14P' (14-bit Greyscale (MIPI Packed)) [45]: 'Y14 ' (14-bit Greyscale)