Changes

Jump to navigation Jump to search
Line 4: Line 4:     
=== Introduction ===
 
=== Introduction ===
 +
For the use of VEYE series and CS series camera modules on the raspberry Pi platform, we provide veye_raspicam software, an application layer open source software similar to the raspicam. This series of software, without driver support, has good compatibility with different versions of piOS.
 +
 +
However, we think that the V4L2 driver mode also has a wide range of applications. The two modes cannot be used at the same time, which is embodied in whether the driver is installed or not. It will be described in detail later.
 +
 +
This article describes how to call the camera modules of VEYE series and CS series through V4L2 on the raspberry Pi platform.
    
=== Hardware Setup ===
 
=== Hardware Setup ===
 +
[[VEYE-MIPI-290/327 for Raspberry Pi#Hardware Setup|VEYE series camera module setup on rpi]]
 +
 +
[[CS-MIPI-X for Raspberry Pi#Hardware Setup|CS series camera module setup on rpi]]
    
=== RaspberryPi System Setup and Configuration ===
 
=== RaspberryPi System Setup and Configuration ===
 +
[[CS-MIPI-X for Raspberry Pi#RaspberryPi System Setup and Configuration|RaspberryPi System Setup and Configuration]]
    
=== Driver Installation ===
 
=== Driver Installation ===
 +
 +
==== Download the driver ====
 +
<code>git clone <nowiki>https://github.com/veyeimaging/raspberrypi_v4l2.git</nowiki></code>
 +
 +
==== Install the driver ====
 +
<code>cd raspberrypi_v4l2/release/</code>
 +
 +
<code>chmod +x *</code>
 +
 +
<code>sudo ./install_driver.sh [camera module]</code>
 +
 +
camera module:could be veye327,csimx307,cssc132.
 +
 +
==== Uninstall the driver ====
 +
If you need to change to using the camera by veye_raspicam software, or if you want to change to a driver of another camera module model, you must first uninstall the current driver.
 +
 +
<code>sudo ./uninstall_driver.sh [camera module]</code>
 +
 +
camera module:could be veye327,csimx307,cssc132.
    
=== Check and Test the Camera ===
 
=== Check and Test the Camera ===
 +
Check the camera probe status
 +
 +
* VEYE-MIPI-327
 +
 +
<code>dmesg | grep veye</code>
 +
 +
You can see:
 +
 +
<code>veye327 camera probed</code>
 +
 +
* CS-MIPI-IMX307
 +
 +
<code>dmesg | grep 307</code>
 +
 +
You can see:
 +
 +
<code>camera id is cs-mipi-imx307</code>
 +
 +
* CS-MIPI-SC132
 +
 +
<code>dmesg | grep 132</code>
 +
 +
You can see:
 +
 +
<code>camera id is cs-mipi-sc132</code>
 +
 +
==== List the video device ====
 +
<code>ls /dev/video0</code>
 +
 +
The device node exsit.
 +
 +
==== List the available video modes ====
 +
<code>v4l2-ctl --list-formats-ext</code>
    
=== Gstreamer usage Demo ===
 
=== Gstreamer usage Demo ===
 +
<code>export DISPLAY=:0</code>
 +
 +
* Snap a picture (VEYE-MIPI-327,CS-MIPI-IMX307 @1080p mode)
 +
 +
<code>gst-launch-1.0 v4l2src num-buffers=1 device=/dev/video0 ! 'video/x-raw, format=(string)UYVY, width=1920,height=1080' ! jpegenc ! filesink location=test_image.jpg</code>
 +
 +
* Preview (VEYE-MIPI-327,CS-MIPI-IMX307 @1080p mode)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080,framerate=(fraction)30/1" ! videoconvert ! autovideosink sync=false -v</code>
 +
 +
* Preview (CS-MIPI-IMX307,CS-MIPI-SC132 @720p mode)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)1280, height=(int)720,framerate=(fraction)60/1" ! videoconvert ! autovideosink sync=false -v</code>
 +
 +
* Preview (CS-MIPI-IMX307,CS-MIPI-SC132 @vga mode)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)640, height=(int)480" ! videoconvert ! autovideosink sync=false -v</code>
 +
 +
* Preview (CS-MIPI-SC132 @1280*1080@45 mode)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)1280, height=(int)1080,framerate=(fraction)45/1" ! videoconvert ! autovideosink sync=false -v</code>
 +
 +
* Framerate test (VEYE-MIPI-327,CS-MIPI-IMX307 @1080p mode)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080,framerate=(fraction)30/1" ! videoconvert ! fpsdisplaysink video-sink=fakesink -v</code>
    
=== Video Control Toolkits Manual ===
 
=== Video Control Toolkits Manual ===
 +
Because of the high flexibility of our camera parameters, we do not use V4L2 parameters to control, but use scripts to configure parameters.
 +
 +
<nowiki>https://github.com/veyeimaging/raspberrypi/tree/master/i2c_cmd</nowiki>
 +
 +
[[VEYE-MIPI-290/327 for Raspberry Pi#Video Control Toolkits Manual|VEYE Series Video Control Toolkits Manual]]
 +
 +
[[CS-MIPI-X for Raspberry Pi#Video Control Toolkits Manual|CS Series Video Control Toolkits Manual]]
    
=== Source code cross compilation ===
 
=== Source code cross compilation ===
 +
The main resources in this section are the [https://www.raspberrypi.org/documentation/linux/kernel/building.md official piOS building method]. We use the method of cross-compilation, and the 5.4.72 version of 32bitOS is taken as an example.
 +
 +
The following operations are done on ubuntu PC.

Navigation menu