Sony IMX296 Linux Driver

From RidgeRun Developer Connection
Jump to: navigation, search

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

RR Contact Us.png

Sony IMX296 Features

The IMX296 is a CMOS imaging sensor with an optical size-type of 1/2.9 and with approximately 1.58M effective pixels that enable high resolution and high speed imaging without distortion. (Taken from Vision Components).

Learn more about the sensor at the Vision Components webpage!

Supported Platforms

  • NVIDIA Jetson TX2

Features Included in the Driver

TX2
Feature Details SDK Support
RAW10 Bayer RGGB Capture L4T 32.3.1 / Jetpack 4.3
1440x1080@60fps 1 Lane L4T 32.3.1 / Jetpack 4.3
Gain control L4T 32.3.1 / Jetpack 4.3
Exposure control L4T 32.3.1 / Jetpack 4.3
V4l2 Media Controller driver L4T 32.3.1 / Jetpack 4.3
ISP usage through NvArgusCameraSrc L4T 32.3.1 / Jetpack 4.3

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 IMX296 camera at kernel and dtb level.
4.3_imx296-v0.2.0.patch
  • Follow the instructions in (Build Kernel) for building the kernel, and then flash the image.

Make sure to enable IMX296 driver support:

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

Using the Driver

GStreamer Examples

Capture and Display

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM),width=1440,height=1080" ! nvoverlaysink

Video Encoding

RECORDING_FILE="recording.mp4"
gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM),width=1440,height=1080" ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=$RECORDING_FILE -e

The sensor will capture in the 1440x1080@60 mode and the pipeline will encode the video and save it into recording.mp4 file.

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 nvarguscamerasrc ! "video/x-raw(memory:NVMM),width=1440,height=1080" ! perf print-arm-load=true ! fakesink
GST-PERF INFO: timestamp 0:05:30.224956703; bps: 483840,000; fps: 60,000; cpu: 17; 
GST-PERF INFO: timestamp 0:05:31.224502705; bps: 483840,000; fps: 60,001; cpu: 16; 
GST-PERF INFO: timestamp 0:05:32.225708807; bps: 483840,000; fps: 60,000; cpu: 15; 
GST-PERF INFO: timestamp 0:05:33.226909308; bps: 483840,000; fps: 59,900; cpu: 17; 
GST-PERF INFO: timestamp 0:05:34.227202400; bps: 483840,000; fps: 60,002; cpu: 16;


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