Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...



Panel

Table of Contents



 


Driver Features Comparison


Inno-maker Unique DriverOffcial Raspbian Build-in Driver
  • The driver relies on the kernel version of Raspbian.  one kernel version corresponding to one driver.
  • Support 12 working modes
Mode 

Resolution

Format   F/R
01280x800Y10   120fps
11280x800Y8   144fps
21280x800Y10    EXT_TRIG
31280x800Y8   EXT_TRIG
41280x720Y10 120fps
51280x720  Y8 144fps
61280x720  Y10EXT_TRIG
71280x720 Y8EXT_TRIG
8640x400 Y10210fps
9640x400 Y8253fps
10640x400 Y10EXT_TRIG
11640x400 Y8EXT_TRIG
12320X200  Y8453fps


  • No install driver requirement,  just enable the driver in overlay file
  • Support 2 working modes, do not support the external trigger.

. 

Mode    ResoluationFormat  F/R
   0     1280x800  Y10120fps
   1      1280x800   Y8144fps


   






Install Inno-Maker Unique Driver

How to Set up

  • Step2 Chmod

    Using chmod command set all the read, write, and execute permissions for these file.

           sudo chmod -R a+rwx *

  • Step3 Execute

  Execute this script on terminal and input ‘y’ to reboot.

  ./autoinstall_driver.sh


  • Step4 Checkout Device       
    ls /dev/video0   

          Installed Successfully :

       

       Installed  Unsuccessfully

      

Test For Kernel Above 5.4

  • 1,VLC Capture Video(8bit Mode)

    • Follow below step

               

  • 2,Frame rate test

cd 

cd cam-mipiov9281/tools

v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null

It will show you a frames-per-second information of your module

  • 3,vcmipidemo  Preview (Only For Raspberry PI3,Not support Raspberry PI4 Yet)

./vcmipidemo-1028 -s 4135500 -g 0x88 -f >/dev/null                        # support pi3 only

              #  Press Ctrl+Alt+F1 See the Demo, Press Ctrl+Alt+F7 quit demo, then press ctrl+c to stop the program

It can setting the shutter and gain value of this module and capture the frame into frame buffer or PPM file.,Example:
It will setting the shutter to 3ms ,gain value to 0x88 and copy the capture frame into framebuffer.
More detail please use ./vcmipidemo-1028 --help
-s: setting the shutter : range: 8721ns to 8721*885ns ,unit ns
-g: setting the sensor gain: range 0-----254d

  • 4, Capture Y8 Rawdata picture

./v4l2_capture_y8 -s 4135500 -g 0x88 -h 1 -v 1 -c 5

using the camera for capture frames into file. Capture y8 format output into file while module work in mode2
-s: setting the shutter : range: 8721ns to 8721*885ns ,unit ns
-g: setting the sensor gain: range 0-----254d
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use ./v4l2_capture_y8 --help

You can preview y8 rawdata files directly by following our usermanual

  • 5, Capture Y10 Rawdata picture

./v4l2_capture_y10-16-5.4 -s 3000 -g 0x88 -h 1 -v 1 -c 5

Capture y10 format output into file while module work in mode0 or mode1
-s: setting the shutter : range: 8721ns to 8721*885ns ,unit ns
-g: setting the sensor gain: range 0-----254d
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use ./v4l2_capture_y10-16-5.4 --help

y10 must be transfer to y8 then you can preview.

               

  • 6, Y10 format file transfer toY8 file

                ./raw16p10p2raw8 <10bit file name> <8bit file name>

tools to handle ov9281 y10 captured file into 8bit gray formate
./raw16p10p2raw8 <file_input> <file_output>

  • 7,Strobe Adjustment

step1, strobe generates a pulse with a reference starting point at the time when the pixel array starts integration.

    Following a delay after the reference starting point, which is controlled by :

a width of strobe_frame_span[31:0] is generated.


$cd cam-mipiov9281/tools

I2c tool read and write register. 

  • Read:

          $./i2c_read 0 0x60 [start addr of reg ] [num of regs]

//example:

Read  value  of  register  0x3928  

$./i2c_read  0  0x60  0x3928  1

  • Write:

          $./i2c_write  0  0x60 [ reg addr] [reg value]

//example:

Write 0x32 to register 0x3928.

$./i2c_write  0  0x60  0x3928  0x32

$./i2c_write  0  0x60  0x3928  0x32

Test For Linux Kernel Under 5.4

  • 1,VLC Capture Video(8bit Mode)

    • Follow below step

               

  • 2,Frame rate test

cd 

cd cam-mipiov9281/tools

v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null

It will show you a frames-per-second information of your module

  • 3,vcmipidemo Preview

./vcmipidemo -s 4135500 -g 0x88 -f >/dev/null

              #  Press Ctrl+Alt+F1 See the Demo, Press Ctrl+Alt+F7 quit demo, then press ctrl+c to stop the program

It can setting the shutter and gain value of this module and capture the frame into frame buffer or PPM file.,Example:
It will setting the shutter to 3ms ,gain value to 0x88 and copy the capture frame into framebuffer.
More detail please use ./vcmipidemo --help
-s: setting the shutter : range: 8721ns to 8721*885ns ,unit ns
-g: setting the sensor gain: range 0-----254d

  • 4, Capture Y8Rawdata picture

./v4l2_capture_y8 -s 4135500 -g 0x88 -h 1 -v 1 -c 5

using the camera for capture frames into file. Capture y8 format output into file while module work in mode2
-s: setting the shutter : range: 8721ns to 8721*885ns ,unit ns
-g: setting the sensor gain: range 0-----254d
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use ./v4l2_capture_y8 --help

  • 5, Capture Y10 Rawdata picture

./v4l2_capture_y10 -s 3000 -g 0x88 -h 1 -v 1 -c 5

Capture y10 format output into file while module work in mode0 or mode1
-s: setting the shutter : range: 8721ns to 8721*885ns ,unit ns
-g: setting the sensor gain: range 0-----254d
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use ./v4l2_capture_y10 --help

  • 6,Transfer y10 file to y8 file for preview.

            ./raw10p2raw8 <10bit file name> <8bit file name>

tools to handle ov9281 y10 captured file into 8bit gray formate
./raw16p10p2raw8 <file_input> <file_output>

  • 7,Strobe Adjustment

step1, strobe generates a pulse with a reference starting point at the time when the pixel array starts integration.

    Following a delay after the reference starting point, which is controlled by :

a width of strobe_frame_span[31:0] is generated.


$cd cam-mipiov9281/tools

I2c tool read and write register. 

  • Read:

          $./i2c_read 0 0x60 [start addr of reg ] [num of regs]

//example:

Read  value  of  register  0x3928  

$./i2c_read  0  0x60  0x3928  1

  • Write:

          $./i2c_write  0  0x60 [ reg addr] [reg value]

//example:

Write 0x32 to register 0x3928.

$./i2c_write  0  0x60  0x3928  0x32

$./i2c_write  0  0x60  0x3928  0x32

User Raspberry PI OS Driver

How to Set up

  • Step1 Download firmware

$sudo git clone https://gitee.com/inno-maker/cam-mipiov9281.git

  • Step2 Enable your Device

$sudo nano /boot/config.txt

  • Add Below To the last line then save

    Code Block
    languagebash
    linenumberstrue
    dtparam=i2c_vc=on
    dtoverlay=ov9281


$sudo nano /boot/cmdline.txt

  • Add Below To the last line then save
    cma=128M

  •    
  •      $sudo reboot

Test For Kernel Above 5.4

More information please refer to:

1,VLC Capture Video(8bit Mode)

  • Follow below step

               

2 Framerate Test

           $cd cam-mipiov9281

           $sudo chmod -R a+rwx *

           $cd tools

           $v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null

It will show you a frames-per-second information of your module


3,vcmipidemo  Preview 

 $./vcmipidemo-1028 -s 4 -g 0x88 -a -f              

 #  Press Ctrl+Alt+F1 See the Demo, Press Ctrl+Alt+F7 quit demo, then press ctrl+c to stop the program

More detail please use ./vcmipidemo-1028 --help
Remark:

How to get the shutter range and sensor gain:$v4l2-ctl -l

Stereopi with 2Inno-Maker ov9281 camera sensors

https://stereopi.com/