Line 6: |
Line 6: |
| | | |
| Theoretically,VEYE Camera Modules support all Raspberry Pi. For performance reasons, I recommend you use 3,3+,4 version. This article uses Raspberry Pi 4 as an example to explain how the CS-MIPI-X camera module working with Raspberry Pi. It also explain the specials of RPI Computer Module and Zero using VEYE Camera Module. | | Theoretically,VEYE Camera Modules support all Raspberry Pi. For performance reasons, I recommend you use 3,3+,4 version. This article uses Raspberry Pi 4 as an example to explain how the CS-MIPI-X camera module working with Raspberry Pi. It also explain the specials of RPI Computer Module and Zero using VEYE Camera Module. |
| + | |
| + | === About piOS---Bullseye === |
| + | The latest system of Raspberry Pi - bullseye has removed the support of raspicam by default. But we still have 2 ways to use it. |
| + | |
| + | * 1, Use the legacy version of the OS, that is, do not upgrade to Bullseye. |
| + | |
| + | https://www.raspberrypi.com/software/operating-systems/ |
| + | |
| + | * 2, Open legacy camera support in raspi-config on Bullseye. We have upgraded the program to accommodate this usage. |
| + | |
| + | <blockquote><u>If you want to add the legacy camera interfaces to Bullseye, please click your update icon in the taskbar to update. Then open a terminal (Ctrl-Alt-T) and type ‘sudo raspi-config’, go to ‘Interface Options’ and then ‘Legacy Camera’, and reboot. These camera interfaces are deprecated, and we are not supporting them going forwards.</u></blockquote>https://www.raspberrypi.com/news/new-old-functionality-with-raspberry-pi-os-legacy/ |
| + | |
| + | By the way, Use this cmd to check your system version: |
| + | |
| + | <code>lsb_release -a</code> |
| ===Hardware Setup=== | | ===Hardware Setup=== |
| '''Essentials You Need:''' | | '''Essentials You Need:''' |
Line 17: |
Line 32: |
| *Connect Dupont Wire as shown below. CS-MIPI-X need an addtional power. | | *Connect Dupont Wire as shown below. CS-MIPI-X need an addtional power. |
| *Startup RaspberryPi. | | *Startup RaspberryPi. |
| + | *'''The default power supply mode of CS-MIPI-SC132、CS-MIPI-IMX307 is 3.3V via FFC cable, and there is no need to plug in red and black power cable.''' |
| | | |
| [[File:CS-MIPI-IMX307树莓派连接图001.jpg|center|thumb|600x600px|connect CS-MIPI-X to Raspberry Pi 001(CS-MIPI-IMX307 as an example)]] | | [[File:CS-MIPI-IMX307树莓派连接图001.jpg|center|thumb|600x600px|connect CS-MIPI-X to Raspberry Pi 001(CS-MIPI-IMX307 as an example)]] |
Line 24: |
Line 40: |
| [[File:CS-MIPI-IMX307树莓派连接图004.jpg|center|thumb|600x600px|connect CS-MIPI-X to Raspberry Pi 004(CS-MIPI-IMX307 as an example)]] | | [[File:CS-MIPI-IMX307树莓派连接图004.jpg|center|thumb|600x600px|connect CS-MIPI-X to Raspberry Pi 004(CS-MIPI-IMX307 as an example)]] |
| [[File:CS-MIPI-IMX307树莓派连接图005.jpg|center|thumb|600x600px|connect CS-MIPI-X to Raspberry Pi 005(CS-MIPI-IMX307 as an example)]] | | [[File:CS-MIPI-IMX307树莓派连接图005.jpg|center|thumb|600x600px|connect CS-MIPI-X to Raspberry Pi 005(CS-MIPI-IMX307 as an example)]] |
| + | [[File:CS-MIPI-SC132-N005.jpg|alt=connect CS-MIPI-SC132 to Raspberry Pi|center|thumb|600x600px|connect CS-MIPI-SC132 to Raspberry Pi]] |
| | | |
| | | |
Line 97: |
Line 114: |
| | | |
| =====veye_raspivid (video encoding and record)===== | | =====veye_raspivid (video encoding and record)===== |
− | <code>./veye_raspivid -md 1 -t 5000 -o ~/test.h264</code> | + | <code>./veye_raspivid -t 5000 -w 1280 -h 720 -fps 60 -stm -o ~/test.h264</code> |
| | | |
| Implement H.264 format encoding(720p@60) and record for 5 seconds,Record the stream data to file ~/test.h264. | | Implement H.264 format encoding(720p@60) and record for 5 seconds,Record the stream data to file ~/test.h264. |
Line 161: |
Line 178: |
| | | |
| =====veye_raspistill(record JPG,BMP image)===== | | =====veye_raspistill(record JPG,BMP image)===== |
− | <code>./veye_raspistill -md 1 -o ~/test.jpg</code> | + | <code>./veye_raspistill -md 0 -o ~/test.jpg</code> |
| | | |
− | Capturing one image and save to home directory.1280*720 JPG format. | + | Capturing one image and save to home directory.1920*1080 JPG format. |
| | | |
| <code>./veye_raspistill -e bmp -tl 50 -t 1000 -o /dev/shm/test%d.bmp</code> | | <code>./veye_raspistill -e bmp -tl 50 -t 1000 -o /dev/shm/test%d.bmp</code> |
Line 176: |
Line 193: |
| | | |
| ====D-SDK Toolkits Manual==== | | ====D-SDK Toolkits Manual==== |
− | [[VEYE-MIPI-290/327 for Raspberry Pi#D-SDK Toolkits Manual|Please refer VEYE-MIP-327 D-SDK part]] | + | It contains three parts: C language SDK(libdmipicam.so),C language sample,Python language sample. |
| + | =====Install support package===== |
| + | <code>sudo apt-get update && sudo apt-get install libopencv-dev</code> |
| + | |
| + | <code>sudo apt-get install python-opencv</code> |
| + | |
| + | <code>sudo apt-get install libzbar-dev</code> |
| + | |
| + | =====Video Format Description===== |
| + | D-SDK does not configure any parameters for the module. To config the module, please refer to: Video Control Toolkits Manual : [[CS-MIPI-X i2c]]。 |
| + | |
| + | The ''pvideofmt'' parameter of the ''D_init_camera_ex'' function needs to be consistent with the current module resolution mode. |
| + | |
| + | <code>./cs_mipi_i2c.sh -r -f videofmt</code> |
| + | |
| + | =====D-SDK===== |
| + | |
| + | *interface: |
| + | |
| + | opensource,D_mipicam.h |
| + | |
| + | *compile: |
| + | |
| + | <code>./buildme</code> |
| + | |
| + | *install: |
| + | |
| + | <code>sudo install -m 644 ./libdmipicam.so /usr/lib/</code> |
| + | =====C sample===== |
| + | |
| + | *preview |
| + | |
| + | Dispaly real-time video to HDMI output |
| + | |
| + | *preview-dualcam |
| + | |
| + | Dispaly real-time video to HDMI output for dual cameras(RPI CM) |
| + | |
| + | *video |
| + | |
| + | H.264 format encoding and record to file. |
| + | |
| + | *capture |
| + | |
| + | Capture one jpeg image. |
| + | |
| + | *video2stdout |
| + | |
| + | H.264 format encoding and send to stdout,which could be used by pipe. It's like <code>veye_raspivid -o -</code>. |
| + | |
| + | <code>./video2stdout | nc -l -p 5000</code> |
| + | |
| + | *capture_yuv |
| + | |
| + | Capture one yuv image. |
| + | |
| + | *capture-dualcam |
| + | |
| + | Capture jpeg images for dual cameras. |
| + | |
| + | *yuv_stream |
| + | |
| + | Shows how to get yuv stream. |
| + | |
| + | *capture2opencv |
| + | |
| + | Shows how to get yuv stream,transfer to opencv format and display it. |
| + | |
| + | *qrcode_detection |
| + | |
| + | Shows how to get yuv stream,transfer to opencv format and display it and detect QR code. |
| + | =====Python sample===== |
| + | |
| + | *preview.py |
| + | |
| + | Dispaly real-time video to HDMI output |
| + | |
| + | *capture.py |
| + | |
| + | Capture one jpeg image. |
| + | |
| + | *capture_yuv.py |
| + | |
| + | capture_yuv |
| + | |
| + | *video.py |
| + | |
| + | H.264 format encoding and record to file. |
| + | |
| + | *capture2opencv.py |
| + | |
| + | Shows how to get yuv stream,transfer to opencv format and display it. |
| ===Video Control Toolkits Manual=== | | ===Video Control Toolkits Manual=== |
| 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. | | 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 : [[CS-MIPI-X i2c]] | | Video Control Toolkits Manual : [[CS-MIPI-X i2c]] |
| + | |
| + | The new version of PiOS use i2c-10. If i2c-0 doesn't work, try -b 10. |
| + | |
| + | ===RPI Computer Module and RPI Zero Additional Info=== |
| + | Please refer to : [[VEYE-MIPI-290/327 for Raspberry Pi#RPI Computer Module and RPI Zero Additional Info|RPI Computer Module and RPI Zero Additional Info]]. |