getting frame data from /dev/video1 for processing and displaying, Linux on iMX6Q

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

getting frame data from /dev/video1 for processing and displaying, Linux on iMX6Q

791 Views
jingyizhang
Contributor I

Hi,

I am trying to write a terminal app which init the camera and manipulate the input frame by frame on a pixel level before displaying to LCD or storing to disk.

Can anyone point me in the right direction on how to get started? I am very new to programming in Linux, any documentation or sample code would be very helpful.

I am currently running an unmodified fsl-image-qt5-x11-imx6qdlsolo image on the i.MX6Q Sabre-SD Platform board.

0 Kudos
2 Replies

564 Views
BiyongSUN
NXP Employee
NXP Employee

Please refer to the mxc_vpu_test.out source code.

for test, here is the command

modprobe ov5640_camera_mipi
modprobe ov5642_camera
modprobe mxc_v4l2_capture

/unit_tests/mxc_vpu_test.out -E "-x 0 -o /enc.h264 -w 720 -h 480   -c 5000 -f 2"

-x <input method> input mode V4L2 with video node
         0 - /dev/video0, 1 - /dev/video1, and so on

then you can play the enc.h264 with following command

/unit_tests/mxc_vpu_test.out  -D "-i /enc.h264 "

0 Kudos

564 Views
Yuri
NXP Employee
NXP Employee

  General information how to use V4L2 API (with examples) may be found at

http://linuxtv.org/downloads/v4l-dvb-apis/

Also, it makes sense to look at Chapter 9 [Video for Linux Two (V4L2)
Driver ] of “i.MX_6_Linux_Reference_Manual.pdf” ; in particular – section
9.5.2 (Video4Linux API test).

https://www.freescale.com/webapp/Download?colCode=L3.14.28_1.0.0_LINUX_DOCS&location=null&fpsp=1&WT_...


You may to look to test sources on the host Linux :

/fsl-release-bsp/tmp/work/-poky-linux-gnueabi/imx-test/

Inside each test’s directory you will find the available documentation.


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos