OmniVision OS08A10 Linux driver

From RidgeRun Developer Connection
Revision as of 16:30, 22 November 2018 by Acervantes (talk | contribs) (Demo SD card for Jetson TX1 J20)
Jump to: navigation, search

Template:Eval SDK Download, Demo Image download and Contact Us buttons

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

Keywords: OS08A10 Jetson TX2, Gstreamer, NVIDIA, RidgeRun, V4L2 Driver


OS08A10 Features

The Omnivision OS08A10 is an image sensor with the following features:

  • 2 µm x 2 µm pixel
  • Optical size of 1/1.8"
  • Programmable controls for:
    • Frame rate
    • Mirror and flip
    • Cropping
    • Windowing
  • Supports output formats:
    • 12-/10-bit RGB RAW
  • Supports image sizes:
    • 4K2K (3840x2160)
    • 2560 x 1440
    • 1080p (1920x1080)
    • 720p (1280x720)
  • Supports 2x2 binning
  • Standard serial SCCB interface
  • 12-bit ADC
  • Up to 4-lane MIPI/LVDS serial output interface (supports maximum speed up to 1500 Mbps/lane)
  • 2-exposure staggered HDR support
  • Programmable I/O drive capability
  • Light sensing mode (LSM)
  • PLL with SCC support
  • Support for FSIN


RidgeRun has developed a driver for the Jetson TX1 platform with the following support:

  • L4T 28.2.1 and Jetpack 3.3
  • V4l2 Media controller driver
  • Tested resolution 3840 x 2160 @ 30 fps
  • Capture with v4l2src and also with nvcamerasrc using the ISP.

Enabling the driver

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


Using Jetpack

  • Once you have the source code, apply the following three patches in order to add the changes required for the os08a10 cameras at kernel and dtb level.
3.2.1_os08a10.patch
  • Follow the instructions in (Build Kernel) for building the kernel, and then flash the image.

Make sure to enable os08a10 driver support:

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

Using the driver

Gstreamer examples

The Gstreamer version distributed with Jetpack doesn't support bayer RAW12 only RAW8 so gstreamer needs to be patched in order to capture using v4l2src. Follow the steps in the following wiki page to add the support for RAW12:

(add support in GStreamer and V4L RAW12)

Important Note: When you are accessing to the board through serial or ssh and you want to run a pipeline to display with autovideosink, nveglglessink, xvimagesink or any other video sink, you have to run your pipeline with DISPLAY=:0 at the beginning of the description:

DISPLAY=:0 gst-launch-1.0 ...

Capture

Nvcamerasrc

  • 3840x2160
gst-launch-1.0 nvcamerasrc sensor-id=0 fpsRange="30 30" ! 'video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)30/1' ! autovideosink

Dual Capture

Using the following pipelines we can test the performance of the Jetson TX2 when doing dual capture:

Nvcamerasrc

gst-launch-1.0 nvcamerasrc sensor-id=0 fpsRange="30 30" ! 'video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)30/1' ! \
fakesink nvcamerasrc sensor-id=1 fpsRange="30 30" ! 'video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)30/1' ! \
 fakesink

We noticed that using two cameras with the max resolution 3840x2160, the cpu load consumption measured with tegrastats doesn't change considerably, and it remains almost the same:

  • Tegrastats in normal operation:

RAM 2037/7847MB (lfb 1268x4MB) CPU [0%@345,off,off,0%@345,0%@345,0%@345] 
RAM 2037/7847MB (lfb 1268x4MB) CPU [3%@345,off,off,1%@345,2%@345,0%@345] 
RAM 2037/7847MB (lfb 1268x4MB) CPU [6%@345,off,off,0%@345,2%@345,1%@345] 
RAM 2037/7847MB (lfb 1268x4MB) CPU [0%@345,off,off,4%@345,0%@345,0%@345] 
RAM 2037/7847MB (lfb 1268x4MB) CPU [6%@345,off,off,3%@345,3%@345,2%@345] 
RAM 2037/7847MB (lfb 1268x4MB) CPU [2%@345,off,off,0%@345,1%@345,3%@345] 
RAM 2037/7847MB (lfb 1268x4MB) CPU [1%@345,off,off,0%@345,2%@345,1%@345]
  • Tegrastats with the above pipeline running
RAM 1999/7847MB (lfb 1305x4MB) CPU [31%@345,off,off,29%@345,26%@345,26%@345] 
RAM 1999/7847MB (lfb 1305x4MB) CPU [28%@345,off,off,31%@345,26%@345,30%@345] 
RAM 1999/7847MB (lfb 1305x4MB) CPU [27%@345,off,off,28%@345,28%@345,33%@345] 
RAM 2000/7847MB (lfb 1305x4MB) CPU [26%@345,off,off,29%@345,26%@345,26%@345] 
RAM 2000/7847MB (lfb 1305x4MB) CPU [26%@345,off,off,29%@345,30%@345,28%@345] 
RAM 2000/7847MB (lfb 1305x4MB) CPU [30%@345,off,off,28%@345,28%@345,27%@345] 
RAM 2001/7847MB (lfb 1304x4MB) CPU [32%@345,off,off,22%@345,27%@345,28%@345] 
RAM 2001/7847MB (lfb 1304x4MB) CPU [33%@345,off,off,26%@345,26%@345,28%@345] 
RAM 2001/7847MB (lfb 1304x4MB) CPU [30%@345,off,off,26%@345,29%@345,22%@345] 
RAM 2001/7847MB (lfb 1304x4MB) CPU [28%@345,off,off,29%@345,27%@345,28%@345] 
RAM 2001/7847MB (lfb 1304x4MB) CPU [29%@345,off,off,33%@345,28%@345,26%@345]

Dual capture and dual display

DISPLAY=:0 gst-launch-1.0 nvcamerasrc sensor-id=0 fpsRange="30 30" ! 'video/x-raw(memory:NVMM), width=(int)1640, height=(int)1232, format=(string)I420, \
framerate=(fraction)21/1' ! nvegltransform ! nveglglessink nvcamerasrc sensor-id=2 fpsRange="30 30" ! 'video/x-raw(memory:NVMM), width=(int)1640, \
height=(int)1232, format=(string)I420, framerate=(fraction)21/1' ! nvegltransform ! nveglglessink -e

Video Encoding Transport Stream 3840x2160@30fps

CAPS="video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)30/1"

gst-launch-1.0 nvcamerasrc sensor-id=1 fpsRange="30 30" num-buffers=500 ! capsfilter caps="$CAPS" ! omxh264enc ! \
               mpegtsmux ! filesink location=test.ts

Snapshots

gst-launch-1.0 -v nvcamerasrc sensor-id=1 fpsRange="30 30" num-buffers=10 ! 'video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, \
framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw, width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)30/1' ! multifilesink location=test_%d.yuv

Jetson os08a10 glass to glass latency

Contact Us

If you are interested in the evaluation version or for technical questions please send an email to support@ridgerun.com. If you are interested in purchasing the driver, please post your inquiry at our Contact Us link.