Line 15:
Line 15:
|MV series
|MV series
|MV-MIPI-IMX178M
|MV-MIPI-IMX178M
+
|Done
+
|-
+
|MV series
+
|MV-MIPI-SC130M
+
|Done
+
|-
+
|MV series
+
|MV-MIPI-IMX296M
+
|Done
+
|-
+
|MV series
+
|MV-MIPI-IMX287M
+
|Done
+
|-
+
|MV series
+
|MV-MIPI-IMX265M
+
|Done
+
|-
+
|MV series
+
|MV-MIPI-IMX264M
+
|Done
+
|-
+
|RAW series
+
|RAW-MIPI-SC132M
+
|Done
+
|-
+
|RAW series
+
|RAW-MIPI-IMX462M
+
|Done
+
|-
+
|RAW series
+
|RAW-MIPI-AR0234M
+
|Done
+
|-
+
|RAW series
+
|RAW-MIPI-SC535M
|Done
|Done
|}
|}
+
In addition, the driver for the V-by-One HS connection mode has been finished.
==== Jetson Board List ====
==== Jetson Board List ====
Line 39:
Line 76:
|-
|-
|TX2 Devkit
|TX2 Devkit
−
|Coming soon
+
|Done
|-
|-
|AGX Xavier
|AGX Xavier
−
|Coming soon
+
|Done
+
|-
+
|AGX Orin
+
|Done
|-
|-
−
|Orin Series
+
|Orin NX
−
|Coming soon
+
|Done
+
|-
+
|Orin Nano
+
|Done
|}
|}
Line 51:
Line 94:
* Jetpack4.6.1,L4T r32.7.1
* Jetpack4.6.1,L4T r32.7.1
+
*Jetpack4.6.3,L4T r32.7.3
+
*Jetpack5.0.2,L4T r35.1
+
*Jetpack5.1,L4T r35.2.1
+
*Jetpack5.1.1,L4T r35.3.1
+
*Jetpack5.1.2,L4T r35.4.1
+
*Jetpack5.1.3,L4T r35.5
+
*Jetpack5.1.4,L4T r35.6
+
*Jetpack6.0,L4T r36.3
+
*Jetpack6.1,L4T r36.4
+
*Jetpack6.2,L4T r36.4.3
=====How to check the current L4T version=====
=====How to check the current L4T version=====
Line 66:
Line 119:
MV series cameras require an adapter board to access the Jetson platform. The following table shows the support status.
MV series cameras require an adapter board to access the Jetson platform. The following table shows the support status.
{| class="wikitable"
{| class="wikitable"
+
!Camera Model
!Jetson Board
!Jetson Board
!adapter board
!adapter board
−
! camera number
+
!FFC(to adapter board)
−
!Power
+
!FFC(to Jetson board)
+
!camera number
+
!extra power
|-
|-
+
| rowspan="10" |MV Series
|Nano A02
|Nano A02
|ADP-MV1
|ADP-MV1
+
|30pin Opposite-side contacts FFC
+
|15pin Opposite-side contacts FFC
|1
|1
|5V DC(Required)
|5V DC(Required)
|-
|-
|Nano B01
|Nano B01
−
| ADP-MV1
+
|ADP-MV1
−
|1
+
|30pin Opposite-side contacts FFC
+
|15pin Opposite-side contacts FFC
+
|2
|5V DC(Required)
|5V DC(Required)
|-
|-
|Nano 2GB
|Nano 2GB
|ADP-MV1
|ADP-MV1
−
|2
+
|30pin Opposite-side contacts FFC
−
| 5V DC(Required)
+
|15pin Opposite-side contacts FFC
+
|1
+
|5V DC(Required)
|-
|-
|TX2 NX
|TX2 NX
|ADP-MV1
|ADP-MV1
+
|30pin Opposite-side contacts FFC
+
|15pin Opposite-side contacts FFC
|2
|2
|5V DC(Required)
|5V DC(Required)
Line 93:
Line 158:
|XAVIER NX
|XAVIER NX
|ADP-MV1
|ADP-MV1
+
|30pin Opposite-side contacts FFC
+
|15pin Opposite-side contacts FFC
+
|2
+
|5V DC(Required)
+
|-
+
|Orin Nano
+
Orin NX
+
|ADP-MV1
+
|30pin Opposite-side contacts FFC
+
|15-to-22 pin Same-side contacts FFC
|2
|2
|5V DC(Required)
|5V DC(Required)
|-
|-
−
| TX2 Devkit
+
|Orin Nano
+
Orin NX
+
|ADP-MV1-V2
+
Support 4-lane
+
|30pin Opposite-side contacts FFC
+
|22pin Opposite-side contacts FFC
+
|2
+
|5V DC(Required)
+
|-
+
|TX2 Devkit
|ADP-N4
|ADP-N4
+
|30pin Opposite-side contacts FFC
+
|board-to-board connector
|6
|6
−
| 12V DC (Optional)
+
|5V or 12V DC (Required)
|-
|-
|AGX Xavier
|AGX Xavier
|ADP-N4
|ADP-N4
+
|30pin Opposite-side contacts FFC
+
|board-to-board connector
+
|6
+
| 5V or 12V DC (Required)
+
|-
+
|AGX Orin
+
|ADP-N4
+
|30pin Opposite-side contacts FFC
+
|board-to-board connector
+
|6
+
|5V or 12V DC (Required)
+
|-
+
| rowspan="10" |RAW-MIPI-SC132M
+
|Nano A02
+
|N/A
+
|N/A
+
|15pin Opposite-side contacts FFC
+
|1
+
|N/A
+
|-
+
|Nano B01
+
|N/A
+
|N/A
+
|15pin Opposite-side contacts FFC
+
|2
+
|N/A
+
|-
+
|Nano 2GB
+
|N/A
+
|N/A
+
|15pin Opposite-side contacts FFC
+
|1
+
|N/A
+
|-
+
|TX2 NX
+
|N/A
+
|N/A
+
|15pin Opposite-side contacts FFC
+
|2
+
|N/A
+
|-
+
|XAVIER NX
+
|N/A
+
|N/A
+
|15pin Opposite-side contacts FFC
+
|2
+
|N/A
+
|-
+
|Orin Nano
+
|N/A
+
|N/A
+
|15-to-22 pin Same-side contacts FFC
+
|2
+
|N/A
+
|-
+
|Orin NX
+
|N/A
+
|N/A
+
|15-to-22 pin Same-side contacts FFC
+
|2
+
|N/A
+
|-
+
|TX2 Devkit
+
|ADP-N5
+
|15pin Opposite-side contacts FFC
+
|board-to-board connector
+
|6
+
|N/A
+
|-
+
|AGX Xavier
+
|ADP-N5
+
|15pin Opposite-side contacts FFC
+
|board-to-board connector
+
|6
+
|N/A
+
|-
+
|AGX Orin
+
|ADP-N5
+
|15pin Opposite-side contacts FFC
+
|board-to-board connector
+
|6
+
|N/A
+
|-
+
| rowspan="10" |RAW Series(Except for RAW-MIPI-SC132M)
+
|Nano A02
+
|N/A
+
|N/A
+
|15-to-22 pin Same-side contacts FFC
+
|1
+
|N/A
+
|-
+
|Nano B01
+
|N/A
+
|N/A
+
|15-to-22 pin Same-side contacts FFC
+
|2
+
|N/A
+
|-
+
|Nano 2GB
+
|N/A
+
|N/A
+
|15-to-22 pin Same-side contacts FFC
+
|1
+
|N/A
+
|-
+
|TX2 NX
+
|N/A
+
|N/A
+
|15-to-22 pin Same-side contacts FFC
+
|2
+
|N/A
+
|-
+
|XAVIER NX
+
|N/A
+
|N/A
+
|15-to-22 pin Same-side contacts FFC
+
|2
+
|N/A
+
|-
+
|Orin Nano
+
|N/A
+
|N/A
+
|22pin Opposite-side contacts FFC
+
|2
+
|N/A
+
|-
+
|Orin NX
+
|N/A
+
|N/A
+
|22pin Opposite-side contacts FFC
+
|2
+
|N/A
+
|-
+
|TX2 Devkit
+
|ADP-N5
+
|15-to-22 pin Same-side contacts FFC
+
|board-to-board connector
+
|6
+
|N/A
+
|-
+
|AGX Xavier
+
|ADP-N5
+
|15-to-22 pin Same-side contacts FFC
+
|board-to-board connector
|6
|6
−
|12V DC (Optional)
+
|N/A
|-
|-
−
|Orin series
+
|AGX Orin
−
| TODO
+
|ADP-N5
−
|TODO
+
|15-to-22 pin Same-side contacts FFC
−
| TODO
+
|board-to-board connector
+
|6
+
|N/A
|}
|}
−
==== Connection of MV-MIPI-IMX178M and ADP-MV1 ====
+
==== MV series cameras use the ADP-MV1 connection ====
−
The two are connected using 0.5 mm pitch*30P FFC cable with opposite direction. The cable must be inserted with the silver contacts facing outside.
−
[[File:ADP-MV1-MV-MIPI-X 01.jpg|alt=ADP-MV1 to MV-MIPI-X|center|thumb|800x800px|ADP-MV1 to MV-MIPI-X]]
−
<br />
−
==== Connection using ADP-MV1 (using Xavier NX as an example) ====
+
===== Connection of MV series cameras and ADP-MV1 =====
+
The two are connected using 0.5 mm pitch*30P FFC cable with Opposite-side contacts. The cable must be inserted with the silver contacts facing outside.
+
{| class="wikitable"
+
!TOP
+
!BOTTOM
+
|-
+
|[[File:ADP-MV1-MV-MIPI-X 01.jpg|center|thumb|600x600px|ADP-MV1 to MV-MIPI-X|alt=]]
+
|[[File:ADP-MV1-MV-MIPI-X 02.jpg|alt=|center|thumb|600x600px|ADP-MV1 to MV-MIPI-X]]
+
|}
===== Power supply =====
===== Power supply =====
The ADP-MV1 requires a separate 5V power supply and can be powered directly from the Jetson board using a Dupont cable.
The ADP-MV1 requires a separate 5V power supply and can be powered directly from the Jetson board using a Dupont cable.
[[File:ADP-MV1-MV-MIPI-X 07.jpg|alt=ADP-MV1 power supply|center|thumb|800x800px|ADP-MV1 power supply]]
[[File:ADP-MV1-MV-MIPI-X 07.jpg|alt=ADP-MV1 power supply|center|thumb|800x800px|ADP-MV1 power supply]]
−
<br />
−
==== Connection using ADP-MV1 ====
+
===== Connection with Nano and NX using ADP-MV1 =====
The Nano Series and NX Series are connected in this way.
The Nano Series and NX Series are connected in this way.
[[File:MV camera and Xavier NX connection.jpg|alt=MV camera and Xavier NX connection|center|thumb|800x800px|MV camera and Xavier NX connection]]
[[File:MV camera and Xavier NX connection.jpg|alt=MV camera and Xavier NX connection|center|thumb|800x800px|MV camera and Xavier NX connection]]
+
+
===== Connection with Orin Nano and NX using ADP-MV1 =====
+
Use a 15P to 22 pin FFC Cable with the Same-side contacts. Pay attention to the direction of the contact surface.
+
[[File:MV camera connect to Orin Nano and Orin NX.jpg|center|thumb|800x800px|MV camera connect to Orin Nano and Orin NX]]
+
+
==== MV series cameras use the ADP-N4 connection ====
+
+
===== Connection of MV series cameras and ADP-N4 =====
+
The two are connected using 0.5 mm pitch*30P FFC cable with Same-side contacts. The cable must be inserted with the silver contacts facing outside.
+
[[File:ADP-N4 and MV-MIPI-CAM.jpg|link=http://wiki.veye.cc/index.php/File:ADP-N4%20and%20MV-MIPI-CAM.jpg|center|thumb|800x800px|MV-MIPI-CAM to ADP-N4]]
<br />
<br />
−
==== Connection using ADP-N4 ====
+
===== Power supply =====
−
The AGX Series and TX2 Devkit are connected in this way.
+
The ADP-N4 requires power supply. It supports two types of power supply, any one of them will work.
+
+
* 5V DC is connected to J19-9, which can be powered directly from the Jetson motherboard using a DuPont cable.
+
+
* 12V DC is connected to J11, which needs to be powered by an external adapter.
+
+
===== Connection with TX2 Devkit and AGX Series using ADP-N4 =====
+
'''Be sure to screw the ADP adapter board to the bottom board.'''
+
<br />[[File:ADP-N4 to AGX XAVIER.jpg|alt=ADP-N4 to AGX XAVIER|center|thumb|800x800px|ADP-N4 to AGX XAVIER]]
+
[[File:ADP-N4 to AGX Orin.jpg|center|thumb|800x800px|ADP-N4 to AGX Orin]]
+
[[File:ADP-N4 to TX2 Devkit.jpg|center|thumb|800x800px|ADP-N4 to TX2 Devkit]]
+
+
==== RAW series cameras directly connected to the Jetson Board ====
+
+
=====Connect to Nano or Xavier NX=====
+
The RAW-MIPI-SC132M use a 15-pin opposite-side FFC cable, while other RAW series cameras use a 15-to-22-pin same-side FFC cable.[[File:RAW-MIPI-AR0234-NANO 01.jpg|center|thumb|800x800px|RAW camera and Jetson Nano connection|link=http://wiki.veye.cc/index.php/File:RAW-MIPI-AR0234-NANO_01.jpg]]
+
=====Connet to Orin Nano or Orin NX =====
+
The RAW-MIPI-SC132M use a 15-to-22-pin same-side FFC cable, while other RAW series cameras use a 22-pin opposite-side FFC cable.[[File:RAW-MIPI-IMX462-ORIN NX.jpg|center|thumb|800x800px|RAW-MIPI-IMX462-ORIN NX|link=http://wiki.veye.cc/index.php/File:RAW-MIPI-IMX462-ORIN_NX.jpg]]
−
TODO
+
==== RAW series cameras use the ADP-N5 connection ====
+
===== Connection of RAW series cameras and ADP-N5 =====
+
The RAW-MIPI-SC132M use a 15-pin opposite-side FFC cable, while other RAW series cameras use a 15-to-22-pin same-side FFC cable.[[File:RAW-MIPI-IMX462-ADP-N5.jpg|center|thumb|800x800px|RAW-MIPI-IMX462 connect with ADP-N5|link=http://wiki.veye.cc/index.php/File:RAW-MIPI-IMX462-ADP-N5.jpg]]<br />
+
=====Connection with TX2 Devkit and AGX Series using ADP-N5=====
+
[[File:RAW-MIPI-IMX462 connect to ADP-N5-AGX XAVIER.jpg|center|thumb|800x800px|ADP-N5 to AGX Xavier|link=http://wiki.veye.cc/index.php/File:RAW-MIPI-IMX462_connect_to_ADP-N5-AGX_XAVIER.jpg]]<br />
+
==== V-by-One-HS-KIT Camera Connection Diagram ====
+
[[File:VBYONE connection with Jetson.jpg|center|thumb|800x800px|V-by-One-HS-KIT Camera Connection Diagram]]
+
<br />
=== Upgrade Jetson system ===
=== Upgrade Jetson system ===
−
This section describes how to upgrade the Jetson system to support MV camera module. For OS update method, please refer to [[VEYE CS Camera for Jetson TX2#Upgrade Jetson Nano.2C Jetson TX2.2C TX2 NX.2CAGX Xavier and Xavier NX system|Update Jetson OS]].
+
This section describes how to upgrade the Jetson system to support MV camera module. For OS update method, please refer to [[How to upgrade the Jetson system to support VEYE cameras|Update Jetson OS]].
−
Specially, for MV series camera, besides adding the camera driver in Linux system, we also add a kernel patch - veye_mv_l4t_32.7.1.patch.
+
Specially, for MV series camera, besides adding the camera driver in Linux system, we also add a kernel patch - veye_mv_l4t_<version>.patch. We provide compiled Image files.
This patch has two features:
This patch has two features:
Line 143:
Line 413:
# Added support for trigger mode.
# Added support for trigger mode.
−
==== Description of raw data image format ====
+
=== How to Use 4-Lane Mode ===
+
The following guide uses the Orin NX devkit as an example to introduce the configuration and usage of 4-lane mode.
+
+
==== Confirming Hardware Support for 4-Lane Mode ====
+
The Orin NX devkit and Orin Nano devkit each have two MIPI CSI-2 interfaces, but only CAM1 supports 4-lane mode.
+
+
Refer to the camera manual to confirm whether your camera supports 4-lane mode. At this stage, the following models support 4-lane mode:
+
+
* MV-MIPI-GMAX4002M
+
* RAW-MIPI-SC535M
+
* RAW-MIPI-AR0234M
+
+
For MV-MIPI-GMAX4002M, use the **ADP-MV1-V2** adapter board, which supports 4-lane mode.
+
+
==== Configuring the Camera for 4-Lane Mode ====
+
Use the following script to configure the camera to 4-lane mode and save the settings:
+
+
<code>./mv_mipi_i2c_new.sh -w lanenum 4 -b your_i2c_bus_number</code>
+
+
<code>./mv_mipi_i2c_new.sh -w paramsave -b your_i2c_bus_number</code>
+
+
==== Using the 4-Lane Mode DTB ====
+
We provide [https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/dtbs/Orin/JetPack_6.2_Linux_JETSON_ORIN_TARGETS/orin_nx_nano DTS and DTB files for JetPack 6.2] as a sample. When [https://wiki.veye.cc/index.php/How_to_upgrade_the_Jetson_system_to_support_VEYE_cameras updating the Jetson operating system], ensure that the appropriate DTB is used.
+
+
For Orin NX devkit:
+
+
* If using '''MV-MIPI-GMAX4002M''' or '''RAW-MIPI-SC535M''', select:
+
+
<code>tegra234-p3767-camera-p3768-veye_mvcam-dual-4lane-cam1.dtbo</code>
+
+
* If using '''RAW-MIPI-AR0234M''', select:
+
+
<code>tegra234-p3767-camera-p3768-raw_ar0234m-dual-4lane-cam1.dtbo</code>
+
=== Support for trigger mode ===
+
The default driver for Jetson systems only supports video streaming mode. In its VI driver, the data reception function has a timeout mechanism. We have added a settable vi_time_out_disable option to dynamically turn this timeout mechanism on and off.
+
+
Refer to the following application example for specific applications.
+
+
=== Check system status ===
+
After system update, reboot the Jetson board.
+
+
During the Jetson system boot process, it detects the presence of cameras on all i2c buses and generates the /dev/videoX device node if it exists.
+
+
Execute the following command on the Jetson board to check if the camera is properly connected.
+
+
<code>dmesg | grep mvcam</code>
+
+
You can see the camera model and the camera version number probed.
+
+
A prompt as below indicates that the MV-MIPI-IMX178M camera is detected on the i2c-10 bus.
+
+
<code>mvcam 10-003b: camera is: MV-MIPI-IMX178M</code>
+
+
<code>mvcam 10-003b: firmware version: 0x1080103</code>
+
+
==== /dev/videoX node ====
+
The camera module is mapped as /dev/videoX device node in the Jetson system.
+
+
During the OS boot process, the cameras are detected in the order of the i2c bus. The X value is incremented from 0 according to the logical order of detection.
+
+
For instance, if only one camera is connected, X is 0 regardless of the location to which the hardware is connected. If 5 cameras are connected, X is [0-4] according to i2c bus from smallest to largest.
+
+
The v4l2-ctl command uses -d /dev/videoX to access different cameras.
+
+
In gstreamer, v4l2src can access different cameras by specifying device=/dev/videoX.
+
==='''State Detection and Environment Variable Configuration'''===
+
[https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/mv_tools_jetson/i2c_tools Here], we provide an <code>mv_probe.sh</code> script that automatically detects the connected camera and configures environment variables with its default model, width, height, frame rate, and other information.
+
+
Usage:
+
+
<code>source ./mv_probe.sh</code>
+
+
A typical output:
+
+
<code>$ source ./mv_probe.sh</code>
+
+
<code>The mvcam driver is loaded on i2c-10, but the camera is not detected!</code>
+
+
<code>Found veye_mvcam camera on i2c-11.</code>
+
+
<code>Setenv CAMERAMODEL = RAW-MIPI-SC535M</code>
+
+
<code>Setenv FPS = 49</code>
+
+
<code>Setenv HEIGHT = 2048</code>
+
+
<code>Setenv WIDTH = 2432</code>
+
+
You can verify the environment variable output using:
+
+
<code>echo $CAMERAMODEL</code>
+
+
Note that these environment variables are only valid for the current session.
+
+
'''Important Notes:'''
+
+
*This script requires the <code>mvcam</code> driver version '''1.1.06 or later'''.
+
*If your driver version is '''earlier than 1.1.06''' or you need to use different width, height, or frame rate values, refer to the camera module manual and manually configure the following environment variables. Otherwise, subsequent programs may not function correctly.
+
+
Example:
+
+
<code>export WIDTH=2432</code>
+
+
<code>export HEIGHT=2048</code>
+
+
<code>export FPS=50</code>
+
=== Description of raw data image format ===
On TX2 and XAVIER, 10 bit depth and 12 bit depth raw data is stored in memory in a format that is not compliant with the V4L2 standard. We have extended the definition in the linux kernel to support this case.
On TX2 and XAVIER, 10 bit depth and 12 bit depth raw data is stored in memory in a format that is not compliant with the V4L2 standard. We have extended the definition in the linux kernel to support this case.
Line 192:
Line 568:
|V4L2_PIX_FMT_TX2_Y12
|V4L2_PIX_FMT_TX2_Y12
|}
|}
−
=====XAVIER=====
+
=====XAVIER and Orin=====
{| class="wikitable"
{| class="wikitable"
!Depth
!Depth
Line 217:
Line 593:
We recommend using [https://www.offminor.de/ vooya] as the player.
We recommend using [https://www.offminor.de/ vooya] as the player.
−
+
=== v4l2-ctl Application examples ===
−
===== Support for trigger mode =====
−
The default driver for Jetson systems only supports video streaming mode. In its VI driver, the data reception function has a timeout mechanism. We have added a settable vi_time_out_disable option to dynamically turn this timeout mechanism on and off.
−
−
Refer to the following application example for specific applications.
−
−
=== Check system status ===
−
After system update, reboot the Jetson board.
−
−
During the Jetson system boot process, it detects the presence of cameras on all i2c buses and generates the /dev/videoX device node if it exists.
−
−
Execute the following command on the Jetson board to check if the camera is properly connected.
−
−
<code>dmesg | grep mvcam</code>
−
−
You can see the camera model and the camera version number probed.
−
−
A prompt as below indicates that the MV-MIPI-IMX178M camera is detected on the i2c-10 bus.
−
−
<code>mvcam 10-003b: camera is: MV-MIPI-IMX178M</code>
−
−
<code>mvcam 10-003b: firmware version: 0x1080103</code>
−
−
==== /dev/videoX node ====
−
The camera module is mapped as /dev/videoX device node in the Jetson system.
−
−
During the OS boot process, the cameras are detected in the order of the i2c bus. The X value is incremented from 0 according to the logical order of detection.
−
−
For instance, if only one camera is connected, X is 0 regardless of the location to which the hardware is connected. If 5 cameras are connected, X is [0-4] according to i2c bus from smallest to largest.
−
−
The v4l2-ctl command uses -d /dev/videoX to access different cameras.
−
−
In gstreamer, v4l2src can access different cameras by specifying device=/dev/videoX.
−
−
=== v4l2-ctl Application Examples ===
=====Install v4l2-utils=====
=====Install v4l2-utils=====
Line 259:
Line 601:
<code>v4l2-ctl --list-formats-ext</code>
<code>v4l2-ctl --list-formats-ext</code>
−
The following is an example in the XAVIER system:
+
The following is an example of MV-MIPI-IMX178M in the XAVIER system.
<code>ioctl: VIDIOC_ENUM_FMT</code>
<code>ioctl: VIDIOC_ENUM_FMT</code>
Line 329:
Line 671:
<code>User Controls</code>
<code>User Controls</code>
−
−
<code> horizontal_flip 0x00980914 (bool) : default=0 value=0</code>
−
−
<code> vertical_flip 0x00980915 (bool) : default=0 value=0</code>
<code> trigger_mode 0x00981901 (int) : min=0 max=2 step=1 default=0 value=0 flags=volatile, execute-on-write</code>
<code> trigger_mode 0x00981901 (int) : min=0 max=2 step=1 default=0 value=0 flags=volatile, execute-on-write</code>
Line 365:
Line 703:
Each of them is described below:
Each of them is described below:
−
======horizontal and <small>vertical</small> flip======
−
−
*horizontal flip
−
−
<code>v4l2-ctl --set-ctrl horizontal_flip=1</code>
−
−
*<small>vertical flip</small>
−
−
<code>v4l2-ctl --set-ctrl <small>vertical_flip</small>=1</code>
======Trigger Mode======
======Trigger Mode======
<code>v4l2-ctl --set-ctrl <small>trigger_mode=[0-2]</small></code>
<code>v4l2-ctl --set-ctrl <small>trigger_mode=[0-2]</small></code>
Line 396:
Line 725:
======Set ROI and pixel format======
======Set ROI and pixel format======
−
For example, for MV-MIPI-IMX178M:
+
For example:
<code>v4l2-ctl --set-ctrl roi_x=0</code>
<code>v4l2-ctl --set-ctrl roi_x=0</code>
Line 402:
Line 731:
<code>v4l2-ctl --set-ctrl roi_y=0</code>
<code>v4l2-ctl --set-ctrl roi_y=0</code>
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY</code>
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY</code>
The maximum frame rate will be adjusted automatically after setting ROI. Please note that the camera ROI parameters need to comply with the requirements in the camera manual.
The maximum frame rate will be adjusted automatically after setting ROI. Please note that the camera ROI parameters need to comply with the requirements in the camera manual.
Line 426:
Line 755:
==== Video Streaming mode====
==== Video Streaming mode====
=====Set ROI and format=====
=====Set ROI and format=====
−
Take MV-MIPI-IMX178M, 3088*2064 as an example.
+
Take set ROI to sensor size as an example.
<code>v4l2-ctl --set-ctrl roi_x=0</code>
<code>v4l2-ctl --set-ctrl roi_x=0</code>
Line 432:
Line 761:
<code>v4l2-ctl --set-ctrl roi_y=0</code>
<code>v4l2-ctl --set-ctrl roi_y=0</code>
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY</code>
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY</code>
+
+
<code>v4l2-ctl --set-ctrl frame_rate=$FPS</code>
=====Frame rate statistics=====
=====Frame rate statistics=====
In streaming mode, the following commands can be used for frame rate statistics.
In streaming mode, the following commands can be used for frame rate statistics.
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=-1 --stream-to=/dev/null</code>
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=-1 --stream-to=/dev/null</code>
===== Save image to file =====
===== Save image to file =====
+
+
====== Typically ======
+
Where WIDTH should be a multiple of 256.
*raw8
*raw8
−
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=3136</code>
+
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to="y8-${WIDTH}x${HEIGHT}.raw"</code>
+
+
or
+
+
<code>./yavta -c1 -F"y8-${WIDTH}x${HEIGHT}.raw" --skip 0 -f Y8 -s "${WIDTH}x${HEIGHT}" /dev/video0</code>
+
+
*raw10
+
+
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to="y10-${WIDTH}x${HEIGHT}.raw"</code>
+
+
* raw12
+
+
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat='Y12 ' --stream-mmap --stream-count=1 --stream-to="y12-${WIDTH}x${HEIGHT}.raw"</code>
+
====== MV-MIPI-IMX178M ======
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-3136x2064.raw</code>
+
*raw8
−
or
+
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=3136</code>
−
<code>./yavta -c1 -Fy8-3136x2064.raw --skip 0 -f Y8 -s 3088x2064 /dev/video0</code>
+
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-3136x2064.raw</code>
* raw10
* raw10
Line 454:
Line 801:
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=6208</code>
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=6208</code>
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=XY10 --stream-mmap --stream-count=1 --stream-to=y10-3104x2064.raw</code>
+
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=3088,height=2064,pixelformat=XY10 --stream-mmap --stream-count=1 --stream-to=y10-3104x2064.raw</code>
*raw12
*raw12
Line 460:
Line 807:
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=6208</code>
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=6208</code>
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=XY12 --stream-mmap --stream-count=1 --stream-to=y12-3104x2064.raw</code>
+
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=3088,height=2064,pixelformat=XY12 --stream-mmap --stream-count=1 --stream-to=y12-3104x2064.raw</code>
+
=====Preview=====
+
For cameras that support the GREY format, you can use qv4l2 or VLC for video preview.
−
For the image format, please refer to the section above: Description of raw data image format.
+
====== Preview using qv4l2 ======
−
=====Preview=====
+
Install qv4l2,
−
The camera can be previewed in real time using the following command:
+
+
<code>sudo apt install qv4l2</code>
+
+
1. Open VLC with command line <code>vlc</code> to launch.
+
+
2. Hit the <code>▶</code>(Play) button to call the open media window.[[File:Mvcam via qv4l2.png|center|thumb|800x800px|Play mv camera using qv4l2|link=http://wiki.veye.cc/index.php/File:Mvcam_via_qv4l2.png]]<br />
+
======Preview using VLC======
+
Install vlc,
+
+
<code>sudo apt-get install vlc</code>
+
+
1. Open VLC with command line <code>vlc</code> , or click the icon to launch.
+
+
2. Hit the <code>▶</code>(Play) button to call the open media window.
+
+
3. In <code>Capture Device</code> >> <code>Device Selection</code> >> <code>Video device name</code>, select the camera video node.
+
+
4. Hit <code>Advanced Options...</code> button
+
+
5. Type in the <code>width</code> and <code>height</code>, for example, 1280 and 1024.
+
+
6. Hit <code>OK</code> to save the settings and see the video feed.
+
+
+
[[File:Mvcam via VLC.png|center|thumb|800x800px|Play mv camera using VLC|link=http://wiki.veye.cc/index.php/File:Mvcam_via_VLC.png]]<br />
−
<code>v4l2-ctl --set-fmt-video=width=2816,height=2064,pixelformat=UYVY</code>
+
====== Preview GREY format images using opencv ======
+
<code>sudo apt install python3-opencv</code>
−
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)2816, height=(int)2064, framerate=(fraction)22/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvoverlaysink sync=false</code>
+
* Preview using this [https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/samples/opencv/raw_camera sample]:
−
The maximum width supported by UYVY mode is 2880.
+
<code>python3 ./v4l2dev_2_opencv_show_grey.py --roix 0 --roiy 0 --width 640 --height 480 --fps 30</code>
−
==== Trigger mode(Using v4l2-ctl) ====
+
==== Trigger mode ====
===== Prepare =====
===== Prepare =====
−
Take MV-MIPI-IMX178M, 3088*2064 as an example.
−
<code>v4l2-ctl --set-ctrl roi_x=0</code>
<code>v4l2-ctl --set-ctrl roi_x=0</code>
Line 483:
Line 855:
<code>v4l2-ctl --set-ctrl low_latency_mode=1</code>
<code>v4l2-ctl --set-ctrl low_latency_mode=1</code>
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY</code>
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY</code>
+
+
Set proper preferred_stride if necessary.
+
+
For MV-MIPI-IMX178M,3088*2064:
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=3136</code>
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=3136</code>
+
+
For MV-MIPI-IMX296M,1440*1088:
+
+
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=1472</code>
=====Software trigger mode =====
=====Software trigger mode =====
======Set mode======
======Set mode======
Line 494:
Line 874:
<code>v4l2-ctl --set-ctrl vi_time_out_disable=1</code>
<code>v4l2-ctl --set-ctrl vi_time_out_disable=1</code>
======Start acquisition======
======Start acquisition======
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=-1 --stream-to=y8-3104x2064.raw</code>
+
+
* Typically
+
+
Where WIDTH should be a multiple of 256.
+
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=-1 --stream-to="y8-${WIDTH}x${HEIGHT}.raw"</code>
+
+
* MV-MIPI-IMX178M
+
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=-1 --stream-to=y8-3104x2064.raw</code>
====== Perform soft trigger operation ======
====== Perform soft trigger operation ======
In other shell terminals, you can execute the following command multiple times for multiple triggers.
In other shell terminals, you can execute the following command multiple times for multiple triggers.
Line 515:
Line 904:
====== Hardware Connection ======
====== Hardware Connection ======
−
<br />[[File:MV camera hardware trigger connection.jpg|center|thumb|800x800px|MV camera hardware trigger connection|link=http://wiki.veye.cc/index.php/File:MV_camera_hardware_trigger_connection.jpg]]<br />
+
+
* Using ADP-MV1<br />[[File:MV camera hardware trigger connection.jpg|center|thumb|800x800px|MV camera hardware trigger connection|link=http://wiki.veye.cc/index.php/File:MV_camera_hardware_trigger_connection.jpg]]
+
+
* Using ADP-N4
+
+
If a common trigger source connection is used, J7 is first shorted in pairs, and then connect the jetson GPIO40 to J19-1.
+
[[File:ADP-N4 common trigger source.jpg|center|thumb|800x800px|ADP-N4 common trigger source]]
+
+
+
If the independent trigger source connection is used, the GPIO40 is directly connected to J7-1 ---- J7-11.<br />
======Set mode======
======Set mode======
<code>v4l2-ctl --set-ctrl <small>trigger_mode=1</small></code>
<code>v4l2-ctl --set-ctrl <small>trigger_mode=1</small></code>
Line 523:
Line 921:
<code>v4l2-ctl --set-ctrl vi_time_out_disable=1</code>
<code>v4l2-ctl --set-ctrl vi_time_out_disable=1</code>
======Start acquisition======
======Start acquisition======
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=-1 --stream-to=y8-3104x2064.raw</code>
+
+
*Typically
+
+
Where WIDTH should be a multiple of 256.
+
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=-1 --stream-to="y8-${WIDTH}x${HEIGHT}.raw"</code>
+
+
* MV-MIPI-IMX178M
+
+
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-3104x2064.raw</code>
====== Perform hardware trigger operation ======
====== Perform hardware trigger operation ======
<code>python gpio_trigger_jetson.py</code>
<code>python gpio_trigger_jetson.py</code>
−
Note: script link.
+
Note: script [https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/mv_tools_jetson/examples/v4l2grab_mvcam link].
====== Stop triggering and capturing ======
====== Stop triggering and capturing ======
Line 538:
Line 945:
=== Application demo ===
=== Application demo ===
−
====Video Streaming mode====
+
====v4l2grab_mvcam_jetson====
+
v4l2grab_mvcam is a sample developed in C language, supporting stream mode and trigger mode.
+
+
Please refer to:https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/mv_tools_jetson/examples/v4l2grab_mvcam
+
====yavta(Video Streaming mode only)====
=====install yavta=====
=====install yavta=====
<code>git clone <nowiki>https://github.com/veyeimaging/yavta.git</nowiki></code>
<code>git clone <nowiki>https://github.com/veyeimaging/yavta.git</nowiki></code>
Line 550:
Line 961:
<code>v4l2-ctl --set-ctrl roi_y=0</code>
<code>v4l2-ctl --set-ctrl roi_y=0</code>
=====Save image to file=====
=====Save image to file=====
+
+
====== Typically ======
+
Where WIDTH should be a multiple of 256.
+
+
*raw8
+
+
<code>./yavta -c1 -F"y8-${WIDTH}x${HEIGHT}.raw" --skip 0 -f Y8 -s "${WIDTH}x${HEIGHT}" /dev/video0</code>
+
+
*raw10
+
+
Take XAVIER as example.
+
+
<code>./yavta -c1 -F"y8-${WIDTH}x${HEIGHT}.raw" --skip 0 -f XY10 -s "${WIDTH}x${HEIGHT}" /dev/video0</code>
+
+
*raw12
+
+
Take XAVIER as example.
+
+
<code>./yavta -c1 -F"y8-${WIDTH}x${HEIGHT}.raw" --skip 0 -f XY12 -s "${WIDTH}x${HEIGHT}" /dev/video0</code>
+
======MV-MIPI-IMX178M======
*raw8
*raw8
Line 572:
Line 1,003:
<code>./yavta -c1 -Fy12-3104x2064.raw --skip 0 -f XY12 -s 3088x2064 /dev/video0</code>
<code>./yavta -c1 -Fy12-3104x2064.raw --skip 0 -f XY12 -s 3088x2064 /dev/video0</code>
+
For the image format, please refer to the section above: Description of raw data image format.
For the image format, please refer to the section above: Description of raw data image format.
+
======RAW-MIPI-SC535M======
+
+
*raw8
+
+
<code>./yavta -c1 -Fy8-2432x2048.raw --skip 0 -f Y8 -s 2432x2048 /dev/video0</code>
===i2c script for parameter configuration===
===i2c script for parameter configuration===
We provide shell scripts to configure the parameters.
We provide shell scripts to configure the parameters.
Line 579:
Line 1,016:
[http://wiki.veye.cc/index.php/Mv_mipi_i2c.sh_user_guide mv_mipi_i2c.sh user guide]
[http://wiki.veye.cc/index.php/Mv_mipi_i2c.sh_user_guide mv_mipi_i2c.sh user guide]
===References===
===References===
−
<br />
===Document History===
===Document History===
−
*2022-05-19
+
*2025-03-23
+
+
Add description of ADP-MV1-V2.
+
+
Add support for mv_probe.sh.
+
+
*2024-08-13
+
+
Support Jetpack6.0.
+
+
* 2024-05-22
+
+
Add support for RAW-MIPI-SC535M.
+
+
Support Jetpack5.1.3.
+
+
*2023-08-16
−
Release 1st version.
+
Add support for RAW-MIPI-IMX462M and RAW-MIPI-AR0234M.
−
<br />
+
+
* 2023-07-31
+
+
Support V-by-One.
+
+
*2023-04-27
+
+
Support Jetpack5.1.1.
+
+
* 2023-04-16
+
+
Remove flip function.
+
+
* 2023-03-29
+
+
Add opencv samples.
+
+
*2023-03-37
+
+
Add description about MV-MIPI-IMX287M.
+
+
*2023-02-22
+
+
Support Jetpack5.1
+
+
*2022-12-11
+
+
Add description about MV-MIPI-IMX264M.
+
+
* 2022-10-14
+
+
Add description about MV-MIPI-IMX296M and MV-MIPI-IMX265M.
+
+
* 2022-08-31
+
+
Support Jetpack5.0.2
+
+
*2022-06-23
+
+
Add ADP-N4 related descriptions.
+
+
*2022-05-20
+
+
Release 1st version.<br />