iMX8 PLUS daA3840-30m x 2, capture image?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX8 PLUS daA3840-30m x 2, capture image?

1,002 Views
Creative
Contributor III

Good day!
Our iMX8 PLUS platform
We have two cameras daA3840-30m
Is there an example of how to get images from two cameras via V4L2?
Code examples or instructions.

Tags (2)
0 Kudos
5 Replies

940 Views
Creative
Contributor III

Thank you for your reply.
But we just need to access two cameras through the V4L2 driver,
using C ++ an example would be helpful.

0 Kudos

923 Views
Creative
Contributor III

Hi

I managed to get this image, with the chosen format V4L2_PIX_FMT_NV16, but the image was expected to be correct, but here it consists of four components.
Question: how to get the whole image, or do you need to transform it yourself?

P.S. Image from one sensor (1920x1080)

test.png

0 Kudos

875 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos

866 Views
igorpadykov
NXP Employee
NXP Employee

answer from internal team:

--------------

We don't have example code of how to get images from two cameras via V4L2. But for test, you can just use two gstreamer pipelines to control two cameras.

 

And we do have example code for one camera, the file name is video_test.cpp which should be located at your Yocto build environment bld-xwayland-8mp/tmp/work/aarch64-mx8mp-poky-linux/isp-imx/4.2.2.11.0-r0/isp-imx-4.2.2.11.0/appshell/v4l_drm_test. You can also use below cmd to know how to use this app,

$ /opt/imx8-isp/bin/video_test -h

 

The output format of basler camera is RAW12 (GRBG bayer pattern), and you can capture RAW12/YUYV/NV16/NV12 image without any other transform. Take NV16 as an example, you can use any one of below cmds to capture NV16 image,

$ ./video_test -w 3840 -h 2160 -f NV16 -d0 -t 2

$ gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=1 ! "video/x-raw,format=NV16,width=3840,height=2160" ! queue ! filesink location=test.yuv

$v4l2-ctl -d0 --verbose --set-fmt-video=width=3840,height=2160,pixelformat=NV16 --stream-mmap --stream-count=1 --stream-to=test.yuv

--------------

Best regards
igor

0 Kudos