Difference between revisions of "ON Semiconductor ARX3A0 Linux Driver"

From RidgeRun Developer Connection
Jump to: navigation, search
m
m (Using the Driver)
Line 352: Line 352:
 
</pre>
 
</pre>
  
==Using the Driver==
+
==GStreamer Examples: Testing a ARX3A0 Linux Driver==
  
=== GStreamer Examples ===
+
=== Capture and Display ===
 
 
==== Capture and Display ====
 
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 362: Line 360:
 
</pre>
 
</pre>
  
==== Video Encoding ====
+
=== Video Encoding ===
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 369: Line 367:
 
</pre>
 
</pre>
  
The sensor will capture in the 560x560@360 mode and the pipeline will encode the video and save it into recording.mp4 file.
+
The sensor will capture in the 560x560@360 mode and the pipeline will encode the video and save it into a recording.mp4 file.
  
==== Dual Capture + Encoding ====
+
=== Dual Capture + Encoding ===
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 381: Line 379:
 
The sensor will capture from 2 cameras in the 560x560@360 mode and the pipeline will encode the videos and save them into recording_0.mp4 and recording_1.mp4 files.
 
The sensor will capture from 2 cameras in the 560x560@360 mode and the pipeline will encode the videos and save them into recording_0.mp4 and recording_1.mp4 files.
  
===Global Gain Example===
+
==Global Gain Example==
  
 
The driver allows global gain control.  
 
The driver allows global gain control.  
Line 388: Line 386:
 
</pre>
 
</pre>
  
===Exposure Example===
+
==Exposure Example==
  
 
The driver allows also exposure time control.  
 
The driver allows also exposure time control.  
Line 395: Line 393:
 
</pre>
 
</pre>
  
=== Performance ===
+
== Performance ==
  
 
Using the next pipeline we were able to measure the framerate and CPU load for single capture with perf element:
 
Using the next pipeline we were able to measure the framerate and CPU load for single capture with perf element:

Revision as of 14:56, 28 February 2022

Error something wrong.jpg Problems running the pipelines shown on this page?
Please see our GStreamer Debugging guide for help.

RR Contact Us.png

ON Semiconductor ARX3A0 Features

The ARX3A0 is a breakthrough CMOS imaging sensor. Designed to be ultra-miniature (1/10th inch optical format) and ultra-low-power, the ARX3A0 brings new options to IoT device , drones and robotics. The product has an innovative super low power mode which draws less than 3.2 mW while active, and can detect motion or changes in lighting conditions and wake the rest of the system up. With its high frame rate of 360 frames per second (fps), the ARX3A0 can behave like a global shutter sensor in many circumstances, while still having all the benefits of power, size and performance of a 2.2 µm rolling shutter pixel. (Taken from OnSemi webpage).

Learn more about the sensor at the OnSemi webpage!

Supported Platforms

  • NVIDIA Jetson Xavier NX

Features Included in the Driver

Xavier NX
Feature Details SDK Support
RAW10 Monochrome Capture L4T 32.5.1 / Jetpack 4.5.1
560x560@360fps 2 Lanes L4T 32.5.1 / Jetpack 4.5.1
560x560@280fps 2 Lanes L4T 32.5.1 / Jetpack 4.5.1
Gain control L4T 32.5.1 / Jetpack 4.5.1
Exposure control L4T 32.5.1 / Jetpack 4.5.1
2 simultaneous cameras L4T 32.5.1 / Jetpack 4.5.1
External trigger mode L4T 32.5.1 / Jetpack 4.5.1
V4l2 Media Controller driver L4T 32.5.1 / Jetpack 4.5.1

Enabling the Driver

In order to use this driver, you have to patch and compile the kernel source using JetPack:

  • Once you have the source code, apply the following patch in order to add the changes required for the ARX3A0 camera at kernel and dtb level.
4.5.1_nx_arx3a0-v0.2.0.patch
  • Follow the instructions in (Build Kernel) for building the kernel, and then flash the image.

Make sure to enable ARX3A0 driver support:

make menuconfig
-> Device Drivers                                                                                                                        
  -> Multimedia support                                                                                           
    -> NVIDIA overlay Encoders, decoders, sensors and other helper chips 
       -> <*> ARX3A0 camera sensor support

GStreamer Examples: Testing a ARX3A0 Linux Driver

Capture and Display

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=560,height=560,format=GRAY16_LE ! videoconvert ! xvimagesink

Video Encoding

RECORDING_FILE="recording.mp4"
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=560,height=560,format=GRAY16_LE ! videoconvert ! omxh264enc ! h264parse ! qtmux ! filesink location=$RECORDING_FILE_0 -e

The sensor will capture in the 560x560@360 mode and the pipeline will encode the video and save it into a recording.mp4 file.

Dual Capture + Encoding

RECORDING_FILE_0="recording_0.mp4"
RECORDING_FILE_1="recording_1.mp4"
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=560,height=560,format=GRAY16_LE ! videoconvert ! omxh264enc ! h264parse ! qtmux ! filesink location=$RECORDING_FILE_0 v4l2src device=/dev/video1 ! video/x-raw,width=560,height=560,format=GRAY16_LE ! videoconvert ! omxh264enc ! h264parse ! qtmux ! filesink location=$RECORDING_FILE_1 ! xvimagesink -e

The sensor will capture from 2 cameras in the 560x560@360 mode and the pipeline will encode the videos and save them into recording_0.mp4 and recording_1.mp4 files.

Global Gain Example

The driver allows global gain control.

v4l2-ctl -d /dev/video0 --set-ctrl gain=$GAIN_VALUE

Exposure Example

The driver allows also exposure time control.

v4l2-ctl -d /dev/video0 --set-ctrl exposure=$EXPOSURE_VALUE

Performance

Using the next pipeline we were able to measure the framerate and CPU load for single capture with perf element:

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=560,height=560,format=GRAY16_LE ! perf print-arm-load=true ! fakesink
GST-PERF INFO: timestamp 0:03:16.383008862; bps: 1863106560,000; fps: 360,442; cpu: 14; 
GST-PERF INFO: timestamp 0:03:17.384480538; bps: 1863106560,000; fps: 360,470; cpu: 16; 
GST-PERF INFO: timestamp 0:03:18.385772573; bps: 1863106560,000; fps: 360,534; cpu: 14; 
GST-PERF INFO: timestamp 0:03:19.387378203; bps: 1863106560,000; fps: 359,423; cpu: 14; 
GST-PERF INFO: timestamp 0:03:20.388781521; bps: 1857945600,000; fps: 360,494; cpu: 15;


RidgeRun Resources

Quick Start Client Engagement Process RidgeRun Blog Homepage
Technical and Sales Support RidgeRun Online Store RidgeRun Videos Contact Us

OOjs UI icon message-progressive.svg Contact Us

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. Ridgerun-logo.svg
RR Contact Us.png