Note
- The latest Raspberry PI OS(Kernel 5.4)driver already support cam-mipi290mono;
- Drivers difference between Inno-maker and raspberry pi os
Inno-maker driver | Raspberry PI OS driver |
---|---|
|
|
Quick Start For Inno-Maker Driver
How to Set up
Step1Download firmware
Step2 Enable your Device
- $sudo vim /boot/config.txt
Add Below To the last line then save
dtparam=i2c_vc=on
dtoverlay=vc_mipi_imx290llr- $ sudo vim /boot/cmdline.txt
Add Below To the last line then save
cma=128MStep4 Choose Hardware And System
(We take PI4 and Kernel 4.19.57 (date19.7.10) for example)
$cd cam-mipi290mono
$sudo chmod -R a+rwx *
$uname -a #check system kernal version
$cd Linux_4.19.75/pi4 #Must choose your hardware and kernal version, like pi3 and Linux_4.19.97, you should enter cd Linux_4.19.97/pi3
$make install #Intall Driver For CAM-MIPI290MONO
You will see below information that means successful
- $cd cam-mipi290mono/Linux_4.19.75/pi4
- $make setmode1 #set this module work in mode1
You will see below information
Mode Instruction
This module support 3 work modes.
Mode0: 1920x1080 30fps, SRGGB10P (option,with 37.125MHZ OSC)
Mode1: 1920x1080 60fps, SRGGB10P
Mode2: 1920x1080 50fps, SRGGB12P
Note : by default this module’s hardware with 74.25MHZ OSC so it can’t work at Mode0.
Make setmode1 to set this module work in mode1.
Test
1,Frame rate test
- $cd cam-mipi290mono/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
2,Sample programs1:vcmipidemo
- ./vcmipidemo -s 3000 -g 0x88 -f >/dev/null
Press Ctrl+Alt+F1 See the Demo, Press Ctrl+Alt+F7 quit demo,press ctrl+c to enter next test
It can setting the shutter and gain value of this module and capture the frame into frame buffer or PPM file.
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: 29us to 1S ,unit us
-g: setting the sensor gain: range 0-----240d
3, Sample programs2:using the camera for capture frames into file
- ./v4l2_capture_raw12 -s 3000 -g 0x88 -h 1 -v 1 -c 5
Capture y12 format output into file while module work in mode2
-s: setting the shutter : range: 29us to 1S ,unit us
-g: setting the sensor gain: range 0-----240
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use./v4l2_capture_y12
--help
- ./v4l2_capture_raw10 -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: 29us to 1S ,unit us
-g: setting the sensor gain: range 0-----240d
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use./v4l2_capture_y10
--help
- $./raw10p2raw8 <y10file name> <y8file name>
tools to handle y10 captured file into 8bit gray formate
./raw10p2raw8 <file_input> <file_output>
Quick Start For Raspberry PI OS
Step1 Download tools
Step2,set up
- $sudo nano /boot/config.txt
#Add Below To the last line then save
dtparam=i2c_vc=on
dtoverlay=imx290,clock-frequency=74250000,mono
- $sudo nano /boot/cmdline.txt
#Add Below To the last line then save
cma=128M
- sudo reboot
- ls /dev/video*
#Then you'll see video0
Test
1,Frame rate test
- $ 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,press ctrl+c to stop
2,Sample programs1:vcmipidemo
- $cd cam-mipi290mono
- $sudo chmod -R a+rwx *
- $cd cam-mipi290mono/tools
- $./vcmipidemo-1028 -s 0 -g 0x88 -f
Press Ctrl+Alt+F1 See the Demo, Press Ctrl+Alt+F7 quit demo,press ctrl+c to next test.
More detail please use
./vcmipidemo-1028 --help
Remark:
How to get the shutter range and sensor gain:
v4l2-ctl -l
3, Sample programs2:using the camera for capture frames into file
- $./v4l2_capture_raw12 -s 3000 -g 0x88 -h -v 1 -c 5
More detail please use
./v4l2_capture_y12
--helpRemark:
How to get the shutter range and sensor gain:
v4l2-ctl -l
- $./v4l2_capture_raw10 -s 3000 -g 0x88 -h -v 1 -c 5
More detail please use
./v4l2_capture_raw10
--helpRemark:
How to get the shutter range and sensor gain:
v4l2-ctl -l
- $./raw10p2raw8 <y10file name> <y8file name>
tools to handle y10 captured file into 8bit gray formate
./raw10p2raw8 <file_input> <file_output>
Add Comment