Difference between revisions of "ON Semiconductor ARX3A0 Linux Driver"
m |
m |
||
Line 330: | Line 330: | ||
In order to use this driver, you have to patch and compile the kernel source using JetPack: | In order to use this driver, you have to patch and compile the kernel source using JetPack: | ||
− | * Follow the instructions in [[Jetson_Xavier_NX/Development/Building_the_Kernel_from_Source#Download_the_kernel_sources_for_L4T_32.4.3 | (Downloading sources)]] to get the kernel source code. | + | * {{Download}} Follow the instructions in [[Jetson_Xavier_NX/Development/Building_the_Kernel_from_Source#Download_the_kernel_sources_for_L4T_32.4.3 | (Downloading sources)]] to get the kernel source code. |
* 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. | * 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. |
Revision as of 14:57, 15 February 2022
|
|
|
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 |
|
---|
Enabling the Driver
In order to use this driver, you have to patch and compile the kernel source using JetPack:
- Follow the instructions in (Downloading sources) to get the kernel source code.
- 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
Using the Driver
GStreamer Examples
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 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contact Us
|