Changes

Jump to navigation Jump to search
Line 1: Line 1:  
[[VEYE MIPI 290/327 for Raspberry Pi/zh|查看中文]]
 
[[VEYE MIPI 290/327 for Raspberry Pi/zh|查看中文]]
   −
'''How to Use Veye Mipi Camera with Raspberry Pi'''
+
'''[[VEYE-MIPI-290/327 for Raspberry Pi|<big><big><big><big>How to use VEYE-MIPI-290/327 camera module on Raspberry Pi</big></big></big></big>]]'''
    
===Introduction===
 
===Introduction===
Line 19: Line 19:  
*Connect Dupont Wire as shown below. VEYE-MIPI-290/327 need an addtional power.
 
*Connect Dupont Wire as shown below. VEYE-MIPI-290/327 need an addtional power.
 
*Startup RaspberryPi.
 
*Startup RaspberryPi.
 +
 +
[[File:Mini adpter with VEYE-MIPI-290-327 front.jpg|center|thumb|Mini adpter with VEYE-MIPI-290-327 front|alt=|600x600px]]
 +
[[File:Mini adpter with VEYE-MIPI-290-327 back.jpg|center|thumb|Mini adpter with VEYE-MIPI-290-327 back|alt=|600x600px]]
 +
 +
    
<br />[[File:Veye-raspberry 3m.jpg|center|thumb|600x600px|Connect VEYE to RPI]][[File:Veye-Wiring scheme01.jpg|center|thumb|600x600px|Connect VEYE to RPI (part1)]]<br />[[File:Veye 290-327Wiring scheme00.jpg|center|thumb|600x600px|Connect VEYE(mini adaptor board) to RPI (part2)]]
 
<br />[[File:Veye-raspberry 3m.jpg|center|thumb|600x600px|Connect VEYE to RPI]][[File:Veye-Wiring scheme01.jpg|center|thumb|600x600px|Connect VEYE to RPI (part1)]]<br />[[File:Veye 290-327Wiring scheme00.jpg|center|thumb|600x600px|Connect VEYE(mini adaptor board) to RPI (part2)]]
Line 44: Line 49:  
====Toolkits Overview====
 
====Toolkits Overview====
 
[[File:Rpi github overview.jpg|alt=|center|thumb|600x600px|Software Tookits on github]]
 
[[File:Rpi github overview.jpg|alt=|center|thumb|600x600px|Software Tookits on github]]
Software toolkits contains threeparts. ''veye_raspcam'' is raspcam alike Video Stream Toolkits, D_mipi_rpi is D-SDK Video Stream Toolkits, ''i2c_cmd'' is Video Control Toolkits.
+
Software toolkits contains three parts. ''veye_raspcam'' is raspcam alike Video Stream Toolkits, D_mipi_rpi is D-SDK Video Stream Toolkits, ''i2c_cmd'' is Video Control Toolkits.
    
*Video Stream Tookkits provides real-time display, capture, video recording, etc.
 
*Video Stream Tookkits provides real-time display, capture, video recording, etc.
Line 53: Line 58:     
====veye_raspcam: raspcam alike toolkits====
 
====veye_raspcam: raspcam alike toolkits====
 +
<code>cd raspberrypi/veye_raspcam/bin/</code>
 +
 +
<code>chmod +x *</code>
 +
 
VS toolkits provides several ELF file.
 
VS toolkits provides several ELF file.
   Line 65: Line 74:  
If t is -1, Show continuous Real-time display to HDMI output,full screen.
 
If t is -1, Show continuous Real-time display to HDMI output,full screen.
   −
*veye_raspivid recording
+
*veye_raspivid
    
<code>./veye_raspivid -t 5000 -o ~/test.h264</code>
 
<code>./veye_raspivid -t 5000 -o ~/test.h264</code>
   −
Implement H.264 format encoding and record for 5 seconds,Record the stream data to file ~/test.h264.
+
Implement H.264 format encoding and record for 5 seconds,Record the stream data to file ~/test.h264.
 +
 
 +
At the same time,Dispaly real-time video to HDMI output.(use ''-n'' if you do not want preview)
 +
 
 +
*veye_raspivid (stream over tcp using gstreamer)
 +
 
 +
'''''RPI side'''''
 +
 
 +
<code>./veye_raspivid -b 4000000 -t 0 -o -  | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=x.x.x.x port=5000</code>
 +
 
 +
H.264 encoding on bitrate 4Mbps,forever,listen on TCP port 5000.
 +
 
 +
'''''PC side,using gstreamer(Powershell recommended)'''''
 +
 
 +
<code>gst-launch-1.0 -v tcpclientsrc host=x.x.x.x port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! autovideosink sync=false</code>
 +
 
 +
x.x.x.x is RPI IP address
 +
 
 +
'''''gstreamer''''' windows version download.
    
*veye_raspivid  (direct tcp stream with '''netcat,gstreamer''' etc..)
 
*veye_raspivid  (direct tcp stream with '''netcat,gstreamer''' etc..)
Line 127: Line 154:  
Capturing one image every 50 milliseconds and save to /dev/shm directory(which is in DDR).1920*1080 BMP format.
 
Capturing one image every 50 milliseconds and save to /dev/shm directory(which is in DDR).1920*1080 BMP format.
    +
<code>./veye_raspistill -k -o ~/test%d.jpg -t 0</code>
 +
 +
Display video to HDMI,capture jpg image using keyboard,Enter to capture,X Enter to quit.
 +
 +
veye_raspistill support preview,-n will not preview。
 
====D-SDK Toolkits Manual====
 
====D-SDK Toolkits Manual====
 
It contains three parts: C language SDK(libdmipicam.so),C language sample,Python language sample.
 
It contains three parts: C language SDK(libdmipicam.so),C language sample,Python language sample.
Line 144: Line 176:  
*compile:
 
*compile:
   −
<code>./build</code>
+
<code>./buildme</code>
    
*install:
 
*install:
Line 215: Line 247:  
Shows how to get yuv stream,transfer to opencv format and display it.
 
Shows how to get yuv stream,transfer to opencv format and display it.
 
===Video Control Toolkits Manual===
 
===Video Control Toolkits Manual===
On Raspberry Pi, I2C-0 is used by GPU. We use I2C-1 as control bus for VEYE Camera Module. We provide a Shell Script — camera_i2c_config— to config pin usage.
+
On Raspberry Pi, We use I2C-0 as control bus for VEYE Camera Module. We provide a Shell Script — camera_i2c_config— to config pin usage.
    
Video Control Toolkits Manual : [[VEYE-MIPI-290/327 i2c/|VEYE-MIPI-290/327 i2c]]
 
Video Control Toolkits Manual : [[VEYE-MIPI-290/327 i2c/|VEYE-MIPI-290/327 i2c]]
<br />
+
 
 
===RPI Computer Module and RPI Zero Additional Info===
 
===RPI Computer Module and RPI Zero Additional Info===
   Line 251: Line 283:     
For WAVESHARE CMIO board, as shown below.
 
For WAVESHARE CMIO board, as shown below.
 +
[[File:Adpter with VEYE-MIPI-290-327 front.jpg|center|thumb|Adpter with VEYE-MIPI-290-327 front|alt=|600x600px]]
 +
[[File:Adpter with VEYE-MIPI-290-327 back.jpg|center|thumb|Adpter with VEYE-MIPI-290-327 back|alt=|600x600px]]
 +
<br />
 
[[File:Veye-computer module.jpg|center|thumb|600x600px|RPI CM2 to dual VEYE modules]]
 
[[File:Veye-computer module.jpg|center|thumb|600x600px|RPI CM2 to dual VEYE modules]]
   Line 280: Line 315:  
====Video Control Toolkits====
 
====Video Control Toolkits====
 
Downloading dt-blob.bin file from link,and upload it to /root/,reboot RPI.  
 
Downloading dt-blob.bin file from link,and upload it to /root/,reboot RPI.  
 +
 +
CM3 use I2C-1 to control 2 cameras,It is time-sharing multiplexing.
    
<code>./camera_i2c_config [cameranum]</code>
 
<code>./camera_i2c_config [cameranum]</code>
Line 291: Line 328:  
|1
 
|1
 
|CAM1
 
|CAM1
|}<code>./veye_mipi_i2c.sh -b [i2c bus num]</code>
+
|}<code>./veye_mipi_i2c.sh -b 1</code>
{| class="wikitable"
+
 
!i2c bus num
+
<br />Other options see : [[VEYE-MIPI-290/327 i2c/zh|VEYE-MIPI-290/327 i2c]]
!description
  −
|-
  −
|0
  −
|CAM0
  −
|-
  −
|1
  −
|CAM1
  −
|}<br />Other options see : [[VEYE-MIPI-290/327 i2c/zh|VEYE-MIPI-290/327 i2c]]
   
===FFC Cable Remarks===
 
===FFC Cable Remarks===
  

Navigation menu