=
mevqb`=jÉëëíÉÅÜåáâ=dãÄe=
=
«=mevqb`=jÉëëíÉÅÜåáâ=dãÄe=OMOM= = NP=L=NU=
pìééçêí=eçíäáåÉ=bìêçéÉWW=HQV=ESNPNF=VOONJ ●PN==ÜííéWLLïïïKéÜóíÉÅKÇÉ=
pìééçêí=eçíäáåÉ=kçêíÜ=^ãÉêáÅ~W==NJUMMJOTUJ ●VVNP==ÜííéWLLïïïKéÜóíÉÅKÅçã=
6.2 Scripts to call C/C++ files based on v4l2 interface
After login, change into the directory: \v4l2_c-examples\..
cd v4l2_c-examples <ENTER>.
Now you can start working with the demo-scripts.
Start the scripts with den word phrase "col" or "bw" depending on the connected camera color type.
- ar0144_col/bw_full_save-raw – scripts, save a raw image from VM-016 in full resolution (8/10 and 12-Bit Formats are possible)
- ar052x_col/bw_full_save-raw – scripts, save a raw image from VM-017/117 in full resolution (8/10 and 12-Bit Formats are possible)
For saving the image we use the program Yavta. Yavta stands for "Yet Another V4L2 Test Application". This is a test application based on V4L2 Linux interface.
A other way to use in your C-program is the direct access call to the v4l2 interface. For example:
- v4l2-ctl -d0 --stream-mmap --stream-count 1 --stream-to=raw_image1.raw
For the first use, the camera and controller-camera interface must be configured with the tool v4l2-ctl. See chapter 7.
6.3 OpenCV scripts
PHYTEC i.MX 8M Mini BSP PD21.1.0 includes OpenCV4.4. For use OpenCV with image output we use window manager Wayland. PHYTEC tested openCV with
PYTHON programming language. Examples of scripts can be found in the path “opencv-examples”:
- /opencv-examples/python/python3 phycam_video_v4l2.py: show the live image from the camera
- /opencv-examples/python/python3 face_detection.py: small application to detect faces
For the first use, the camera and controller-camera interface must be configured with the tool v4l2-ctl. See chapter 7.
7 Configure camera and controller-camera-interface with “media-ctl”
Modern System-on-Chip (SoC) devices support a wide range of functionality in the way of internal hardware blocks which has resulted in a variety of ways to
interconnect functions within the SoC that alter the V4L device content.
The Media Controller kernel API has been designed to expose detailed information about media devices and capture devices to userspace in a way that allows them
to be interconnected in dynamic and complex ways at runtime.