Difference between revisions of "ON Semiconductor AR0144 Linux driver"
(Created page with "<seo title="ON Semiconductor Linux Drivers | Linux Driver for Jetson TX2 | RidgeRun Developer" titlemode="replace" keywords="GStreamer, Linux SDK, Linux BSP, Embedded Linux,...") |
m |
||
(62 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | <seo title="ON Semiconductor Linux | + | <seo title="ON Semiconductor AR0144 Linux driver | AR0144 Linux driver for Jetson TX2 | RidgeRun Developer" titlemode="replace" metakeywords="GStreamer, Embedded Linux, Device Drivers, NVIDIA, Xilinx, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, Embedded Linux SDK, Embedded Linux Application development, Multimedia Framework, Jetson TX2, NVIDIA Jetson TX2, AR0144, V4L2 Driver, AR0144 Linux driver, ON Semiconductor, AR0144 driver, ON Semi, i.MX8, i.MX8MQ, SnapDragon, i.MX8M Plus, AR0144 Linux driver support, AR0144 Performance measurement, AR0144 Latency measurement, NXP i.MX8, V4l2, AR0144 Latency." metadescription="Check out RidgeRun's Linux driver for ON Semiconductor AR0144 camera sensor, GStreamer test pipelines and performance results.!"></seo> |
<table> | <table> | ||
Line 5: | Line 5: | ||
<td><div class="clear; float:right">__TOC__</div></td> | <td><div class="clear; float:right">__TOC__</div></td> | ||
<td> | <td> | ||
− | + | {{Shopping cart mpo for V4L2 camera drivers}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | } | ||
− | |||
− | |||
− | |||
<td> | <td> | ||
− | {{ | + | {{GStreamer debug}} |
− | < | + | <td> |
− | + | <center> | |
− | < | + | {{ContactUs Button}} |
− | + | </center> | |
− | </ | ||
</tr> | </tr> | ||
</table> | </table> | ||
+ | <br> | ||
− | =AR0144 Features= | + | ==ON Semiconductor AR0144 Features== |
− | The | + | The AR0144 is a 1/4-inch 1.0 Mp CMOS digital image sensor with an active pixel array of 1280H x 800V. It incorporates a new innovative global shutter pixel design optimized for accurate and fast capture of moving scenes. The sensor produces clear, low noise images in both low-light and bright scenes. It includes sophisticated camera functions such as auto exposure control, windowing, row skip mode, column-skip mode, pixel-binning, and both video and single frame modes. It is programmable through a simple two-wire serial interface. The AR0144 produces extraordinarily clear, sharp digital pictures, and its ability to capture both continuous video and single frames makes it the perfect choice for a wide range of applications, including scanning and industrial inspection.<ref>https://www.onsemi.com/products/sensors/image-sensors-processors/image-sensors/ar0144cs</ref> |
− | + | == AR0144 Linux driver support == | |
RidgeRun has developed a driver for the following platforms: | RidgeRun has developed a driver for the following platforms: | ||
− | * Jetson TX2 | + | * NVIDIA Jetson TX2 |
− | * i.MX8 | + | * NXP i.MX8 |
* SnapDragon | * SnapDragon | ||
The driver has the following support: | The driver has the following support: | ||
− | + | === Jetson TX2 === | |
+ | |||
+ | <pre> | ||
+ | TODO | ||
+ | </pre> | ||
+ | |||
+ | === i.MX8MQ=== | ||
− | =Enabling the driver= | + | * Linux 4.14.98 |
+ | * V4l2 Subdevice | ||
+ | * Tested at 1280x800@30fps | ||
+ | * 8bpp monochrome | ||
+ | * Capture with v4l2src | ||
+ | |||
+ | === i.MX8M Plus=== | ||
+ | |||
+ | * Linux 5.10.35 | ||
+ | * V4l2 Subdevice | ||
+ | * Tested at 1280x800@30fps | ||
+ | * 12bpp color | ||
+ | * Capture with v4l2src | ||
+ | |||
+ | === SnapDragon === | ||
+ | |||
+ | * Linux 4.14 | ||
+ | * V4l2 Media controller driver | ||
+ | * Tested resolutions 1280x800 and 640x400 (2x2 binning) with framerates up to 59fps | ||
+ | * 8, 10 and 12bpp monochrome | ||
+ | * Capture with v4l2src (8bpp) and yavta (10bpp and 12 bpp). | ||
+ | |||
+ | ==Enabling the AR0144 Linux driver== | ||
+ | === Jetson TX2 === | ||
<pre> | <pre> | ||
Line 290: | Line 67: | ||
</pre> | </pre> | ||
− | = | + | === i.MX8 === |
− | == | + | <pre> |
+ | Location: | ||
+ | -> Device Drivers | ||
+ | -> Multimedia support (MEDIA_SUPPORT [=y]) | ||
+ | -> I2C Encoders, decoders, sensors and other helper chips | ||
+ | -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y]) | ||
+ | -> AR0144 (VIDEO_ONSEMI_AR0144 [=y]) | ||
+ | </pre> | ||
+ | |||
+ | === SnapDragon === | ||
+ | |||
+ | <pre> | ||
+ | Location: | ||
+ | -> Device Drivers | ||
+ | -> Multimedia support (MEDIA_SUPPORT [=m]) | ||
+ | -> Sensors used on soc_camera driver | ||
+ | -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y]) | ||
+ | -> <M> AR0144 (VIDEO_ONSEMI_AR0144 [=m]) | ||
+ | </pre> | ||
+ | |||
+ | ==GStreamer Examples: Testing a AR0144 Linux driver== | ||
=== Capture === | === Capture === | ||
+ | |||
+ | ==== Jetson TX2 ==== | ||
<pre style="background:#d6e4f1"> | <pre style="background:#d6e4f1"> | ||
Line 312: | Line 111: | ||
New clock: GstSystemClock | New clock: GstSystemClock | ||
+ | </pre> | ||
+ | |||
+ | ==== i.MX8 ==== | ||
+ | |||
+ | * 1280x800@30fps | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=30/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v | ||
+ | </pre> | ||
+ | |||
+ | * 1280x800@20fps | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=20/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v | ||
+ | </pre> | ||
+ | |||
+ | ==== SnapDragon ==== | ||
+ | |||
+ | Snapdragon uses Media Controller, so before being able to capture, the modules need to be properly linked and configured. | ||
+ | <br> | ||
+ | *'''Link modules:''' This configuration will use the VFE RDI (raw dump interface) as the PIX interface doesn't support raw video. | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | media-ctl -d /dev/media0 -l '"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]' | ||
+ | </pre> | ||
+ | |||
+ | You will need to configure the modules for the desired resolution and format: | ||
+ | <br> | ||
+ | *'''Configure format and resolution for RAW8 1280x800''' | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | media-ctl -d /dev/media0 -V '"ar0144 4-0020":0[fmt:Y8_1X8/1280x800 field:none],"msm_csiphy0":0[fmt:Y8_1X8/1280x800 field:none],"msm_csid0":0[fmt:Y8_1X8/1280x800 field:none],"msm_ispif0":0[fmt:Y8_1X8/1280x800 field:none],"msm_vfe0_rdi0":0[fmt:Y8_1X8/1280x800 field:none]' | ||
+ | </pre> | ||
+ | |||
+ | {{Ambox | ||
+ | |type=notice | ||
+ | |small=left | ||
+ | |issue='''NOTE:''' Use '''640x400''' when capturing at 640x400, '''fmt:Y10_1X10''' to capture at 10bpp and '''fmt:SBGGR12_1X12''' to capture at 12bpp. | ||
+ | |style=width:unset; | ||
+ | }} | ||
+ | <br> | ||
+ | *'''2x2 Binning configuration''' | ||
+ | |||
+ | When capturing at 640x400, 2x2 binning mode has to be configured as follows: | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=horizontal_skipping=1 | ||
+ | v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=vertical_skipping=1 | ||
+ | v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=row_binning=1 | ||
+ | v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=col_binning=1 | ||
+ | </pre> | ||
+ | <br> | ||
+ | *'''1280x800@30fps capture using GStreamer''' | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | DISPLAY=:0.0 GST_DEBUG=WARNING gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=GRAY8,width=1280,height=800 ! queue ! videoconvert ! xvimagesink -v sync=false | ||
+ | </pre> | ||
+ | <br> | ||
+ | *'''1280x800@30fps RAW8 capture using Yavta''' | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY8 | ||
+ | </pre> | ||
+ | <br> | ||
+ | *'''1280x800@30fps RAW10 capture using Yavta''' | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY10P | ||
+ | </pre> | ||
+ | <br> | ||
+ | *'''1280x800@30fps RAW12 capture using Yavta''' | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P | ||
+ | </pre> | ||
+ | <br> | ||
+ | *'''1280x800@50fps RAW12 capture using Yavta''' | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P --time-per-frame 1/50 | ||
</pre> | </pre> | ||
=== Video Encoding === | === Video Encoding === | ||
+ | |||
+ | ==== Jetson TX2 ==== | ||
<pre style="background:#d6e4f1"> | <pre style="background:#d6e4f1"> | ||
Line 322: | Line 203: | ||
The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file. | The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file. | ||
− | === Dual Capture + Encoding === | + | ==== i.MX8 ==== |
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | TODO | ||
+ | </pre> | ||
+ | |||
+ | The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file. | ||
+ | |||
+ | ==== SnapDragon ==== | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | TODO | ||
+ | </pre> | ||
+ | |||
+ | The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file. | ||
+ | |||
+ | === Dual Capture + Encoding === | ||
<pre style="background:#d6e4f1"> | <pre style="background:#d6e4f1"> | ||
Line 330: | Line 227: | ||
The sensor will capture from TODO cameras in the TODO mode and the pipeline will encode the videos and save them into test_0.ts and test_1.ts files. | The sensor will capture from TODO cameras in the TODO mode and the pipeline will encode the videos and save them into test_0.ts and test_1.ts files. | ||
− | == Performance == | + | == AR0144 Performance measurements == |
=== ARM Load === | === ARM Load === | ||
+ | |||
+ | ==== Jetson TX2 ==== | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | TODO | ||
+ | </pre> | ||
Tegrastats display the following output when capturing with the sensor: | Tegrastats display the following output when capturing with the sensor: | ||
Line 346: | Line 249: | ||
RAM 1263/7855MB (lfb 1500x4MB) CPU [16%@345,off,off,15%@345,27%@345,17%@345] | RAM 1263/7855MB (lfb 1500x4MB) CPU [16%@345,off,off,15%@345,27%@345,17%@345] | ||
RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,18%@345,17%@345,19%@345] | RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,18%@345,17%@345,19%@345] | ||
+ | </pre> | ||
+ | |||
+ | ==== i.MX8 ==== | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | TODO | ||
+ | </pre> | ||
+ | |||
+ | ==== SnapDragon ==== | ||
+ | |||
+ | <pre style="background:#d6e4f1"> | ||
+ | TODO | ||
</pre> | </pre> | ||
=== Framerate === | === Framerate === | ||
+ | |||
+ | ==== Jetson TX2 ==== | ||
+ | |||
Using the next pipeline we were able to measure the framerate for single capture with perf element: | Using the next pipeline we were able to measure the framerate for single capture with perf element: | ||
<pre style="background:#d6e4f1"> | <pre style="background:#d6e4f1"> | ||
Line 370: | Line 288: | ||
</pre> | </pre> | ||
− | The results show the framerate constant at 30FPS that use nvcamerasrc and passing frames through the ISP to convert from | + | The results show the framerate constant at 30FPS that use nvcamerasrc and passing frames through the ISP to convert from Bayer to YUV. |
+ | |||
+ | ==== i.MX8 ==== | ||
+ | |||
+ | Using the next pipeline we were able to measure the framerate for single capture with perf element: | ||
+ | <pre style="background:#d6e4f1"> | ||
+ | TODO | ||
+ | </pre> | ||
+ | |||
+ | ==== SnapDragon ==== | ||
+ | |||
+ | Using the next pipeline we were able to measure the framerate for single capture with v4l2-ctrl: | ||
+ | |||
+ | * '''1280x800@30fps, RAW8''' | ||
+ | <pre style="background:#d6e4f1"> | ||
+ | v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 30 --stream-mmap | ||
+ | Frame rate set to 30.000 fps | ||
+ | [ 1541.976821] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800] | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps | ||
+ | </pre> | ||
+ | |||
+ | * '''1280x800@50fps, RAW8''' | ||
+ | <pre style="background:#d6e4f1"> | ||
+ | v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 50 --stream-mmap | ||
+ | Frame rate set to 50.000 fps | ||
+ | [ 1626.444759] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800] | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps | ||
+ | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps | ||
− | == | + | </pre> |
+ | |||
+ | == AR0144 Latency measurement == | ||
The glass to glass latency measured is about TODO ms with nvcamerasrc. | The glass to glass latency measured is about TODO ms with nvcamerasrc. | ||
+ | |||
+ | ==See also== | ||
+ | <references /> | ||
{{ContactUs}} | {{ContactUs}} | ||
− | + | [[Category:Jetson]][[Category:Jetson V4L2 Drivers]][[Category:ON Semiconductor]] | |
− | [[Category:Jetson]][[Category:Jetson V4L2 Drivers]] |
Latest revision as of 14:21, 17 March 2023
|
|
|
ON Semiconductor AR0144 Features
The AR0144 is a 1/4-inch 1.0 Mp CMOS digital image sensor with an active pixel array of 1280H x 800V. It incorporates a new innovative global shutter pixel design optimized for accurate and fast capture of moving scenes. The sensor produces clear, low noise images in both low-light and bright scenes. It includes sophisticated camera functions such as auto exposure control, windowing, row skip mode, column-skip mode, pixel-binning, and both video and single frame modes. It is programmable through a simple two-wire serial interface. The AR0144 produces extraordinarily clear, sharp digital pictures, and its ability to capture both continuous video and single frames makes it the perfect choice for a wide range of applications, including scanning and industrial inspection.[1]
AR0144 Linux driver support
RidgeRun has developed a driver for the following platforms:
- NVIDIA Jetson TX2
- NXP i.MX8
- SnapDragon
The driver has the following support:
Jetson TX2
TODO
i.MX8MQ
- Linux 4.14.98
- V4l2 Subdevice
- Tested at 1280x800@30fps
- 8bpp monochrome
- Capture with v4l2src
i.MX8M Plus
- Linux 5.10.35
- V4l2 Subdevice
- Tested at 1280x800@30fps
- 12bpp color
- Capture with v4l2src
SnapDragon
- Linux 4.14
- V4l2 Media controller driver
- Tested resolutions 1280x800 and 640x400 (2x2 binning) with framerates up to 59fps
- 8, 10 and 12bpp monochrome
- Capture with v4l2src (8bpp) and yavta (10bpp and 12 bpp).
Enabling the AR0144 Linux driver
Jetson TX2
TODO
i.MX8
Location: -> Device Drivers -> Multimedia support (MEDIA_SUPPORT [=y]) -> I2C Encoders, decoders, sensors and other helper chips -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y]) -> AR0144 (VIDEO_ONSEMI_AR0144 [=y])
SnapDragon
Location: -> Device Drivers -> Multimedia support (MEDIA_SUPPORT [=m]) -> Sensors used on soc_camera driver -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y]) -> <M> AR0144 (VIDEO_ONSEMI_AR0144 [=m])
GStreamer Examples: Testing a AR0144 Linux driver
Capture
Jetson TX2
TODO
The sensor will capture in the TODO mode
Setting pipeline to PAUSED ... Available Sensor modes : 3840 x 2160 FR=30.000000 CF=0x1209208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10 Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 0 WxH = 3840x2160 FrameRate = 30.000000 ... New clock: GstSystemClock
i.MX8
- 1280x800@30fps
gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=30/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v
- 1280x800@20fps
gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=20/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v
SnapDragon
Snapdragon uses Media Controller, so before being able to capture, the modules need to be properly linked and configured.
- Link modules: This configuration will use the VFE RDI (raw dump interface) as the PIX interface doesn't support raw video.
media-ctl -d /dev/media0 -l '"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]'
You will need to configure the modules for the desired resolution and format:
- Configure format and resolution for RAW8 1280x800
media-ctl -d /dev/media0 -V '"ar0144 4-0020":0[fmt:Y8_1X8/1280x800 field:none],"msm_csiphy0":0[fmt:Y8_1X8/1280x800 field:none],"msm_csid0":0[fmt:Y8_1X8/1280x800 field:none],"msm_ispif0":0[fmt:Y8_1X8/1280x800 field:none],"msm_vfe0_rdi0":0[fmt:Y8_1X8/1280x800 field:none]'
![]() | NOTE: Use 640x400 when capturing at 640x400, fmt:Y10_1X10 to capture at 10bpp and fmt:SBGGR12_1X12 to capture at 12bpp. |
- 2x2 Binning configuration
When capturing at 640x400, 2x2 binning mode has to be configured as follows:
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=horizontal_skipping=1 v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=vertical_skipping=1 v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=row_binning=1 v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=col_binning=1
- 1280x800@30fps capture using GStreamer
DISPLAY=:0.0 GST_DEBUG=WARNING gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=GRAY8,width=1280,height=800 ! queue ! videoconvert ! xvimagesink -v sync=false
- 1280x800@30fps RAW8 capture using Yavta
yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY8
- 1280x800@30fps RAW10 capture using Yavta
yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY10P
- 1280x800@30fps RAW12 capture using Yavta
yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P
- 1280x800@50fps RAW12 capture using Yavta
yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P --time-per-frame 1/50
Video Encoding
Jetson TX2
TODO
The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.
i.MX8
TODO
The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.
SnapDragon
TODO
The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.
Dual Capture + Encoding
TODO
The sensor will capture from TODO cameras in the TODO mode and the pipeline will encode the videos and save them into test_0.ts and test_1.ts files.
AR0144 Performance measurements
ARM Load
Jetson TX2
TODO
Tegrastats display the following output when capturing with the sensor:
RAM 1263/7855MB (lfb 1501x4MB) CPU [0%@2035,off,off,0%@2035,0%@2035,0%@2035] RAM 1263/7855MB (lfb 1501x4MB) CPU [23%@960,off,off,17%@960,16%@960,23%@960] RAM 1263/7855MB (lfb 1500x4MB) CPU [17%@345,off,off,17%@345,18%@345,20%@345] RAM 1263/7855MB (lfb 1500x4MB) CPU [20%@345,off,off,16%@345,18%@345,15%@345] RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,13%@345,15%@345,14%@345] RAM 1263/7855MB (lfb 1500x4MB) CPU [20%@345,off,off,15%@345,12%@345,15%@345] RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,15%@345,15%@345,16%@345] RAM 1263/7855MB (lfb 1500x4MB) CPU [20%@345,off,off,18%@345,18%@345,17%@345] RAM 1263/7855MB (lfb 1500x4MB) CPU [16%@345,off,off,15%@345,27%@345,17%@345] RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,18%@345,17%@345,19%@345]
i.MX8
TODO
SnapDragon
TODO
Framerate
Jetson TX2
Using the next pipeline we were able to measure the framerate for single capture with perf element:
TODO
GST-PERF INFO --> Timestamp: 0:07:19.108602798; Bps: 782; fps: 30.0 GST-PERF INFO --> Timestamp: 0:07:20.141189052; Bps: 782; fps: 30.3 GST-PERF INFO --> Timestamp: 0:07:21.174265435; Bps: 782; fps: 30.0 GST-PERF INFO --> Timestamp: 0:07:22.207318757; Bps: 782; fps: 30.0 GST-PERF INFO --> Timestamp: 0:07:23.240543516; Bps: 782; fps: 30.0 GST-PERF INFO --> Timestamp: 0:07:24.273697886; Bps: 782; fps: 30.0 GST-PERF INFO --> Timestamp: 0:07:25.306822764; Bps: 782; fps: 30.0 GST-PERF INFO --> Timestamp: 0:07:26.340117514; Bps: 782; fps: 30.0 GST-PERF INFO --> Timestamp: 0:07:27.373087284; Bps: 782; fps: 30.3 GST-PERF INFO --> Timestamp: 0:07:28.406069581; Bps: 782; fps: 30.3 GST-PERF INFO --> Timestamp: 0:07:29.439238457; Bps: 782; fps: 30.0 GST-PERF INFO --> Timestamp: 0:07:30.472398102; Bps: 782; fps: 30.0 GST-PERF INFO --> Timestamp: 0:07:31.472948042; Bps: 808; fps: 30.0
The results show the framerate constant at 30FPS that use nvcamerasrc and passing frames through the ISP to convert from Bayer to YUV.
i.MX8
Using the next pipeline we were able to measure the framerate for single capture with perf element:
TODO
SnapDragon
Using the next pipeline we were able to measure the framerate for single capture with v4l2-ctrl:
- 1280x800@30fps, RAW8
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 30 --stream-mmap Frame rate set to 30.000 fps [ 1541.976821] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
- 1280x800@50fps, RAW8
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 50 --stream-mmap Frame rate set to 50.000 fps [ 1626.444759] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
AR0144 Latency measurement
The glass to glass latency measured is about TODO ms with nvcamerasrc.
See also
RidgeRun Resources | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Visit our Main Website for the RidgeRun Products and Online Store. RidgeRun Engineering informations are available in RidgeRun Professional Services, RidgeRun Subscription Model and Client Engagement Process wiki pages. Please email to support@ridgerun.com for technical questions and contactus@ridgerun.com for other queries. Contact details for sponsoring the RidgeRun GStreamer projects are available in Sponsor Projects page. | ![]() ![]() |