Line 409:
Line 409:
===== Save image to file =====
===== Save image to file =====
−
======MV-MIPI-IMX178M======
*raw8
*raw8
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-3104x2064.raw</code>
+
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-$WIDTHx$HEIGHT.raw</code>
−
Or
+
or
−
<code>./yavta -c1 -Fy8-3104x2064.raw --skip 0 -f Y8 -s 3088x2064 /dev/video0</code>
+
<code>./yavta -c1 -F"y8-${WIDTH}x${HEIGHT}.raw" --skip 0 -f Y8 -s "${WIDTH}x${HEIGHT}" /dev/video0</code>
−
−
Since the memory requested by Raspberry Pi for the image, the width is 32-align and the height is 16-align, the 3088*2064 image will be saved as 3104*2064 size.
*raw10
*raw10
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=3088,height=2064,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-3088x2064.raw</code>
+
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-$WIDTHx$HEIGHT.raw</code>
*raw12
*raw12
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=3088,height=2064,pixelformat='Y12 ' --stream-mmap --stream-count=1 --stream-to=y12-3088x2064.raw</code>
+
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat='Y12 ' --stream-mmap --stream-count=1 --stream-to=y12-$WIDTHx$HEIGHT.raw</code>
−
======MV-MIPI-SC130M======
−
−
*raw8
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=1024,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-1280x1024.raw</code>
−
−
*raw10
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=1024,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-1280x1024.raw</code>
−
====== MV-MIPI-IMX296M======
−
−
* raw8
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1440,height=1088,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-1440x1088.raw</code>
−
*raw10
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1440,height=1088,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-1440x1088.raw</code>
+
Note: Since the memory requested by Raspberry Pi for the image, the width is 32-align and the height is 16-align, the 3088*2064 image will be saved as 3104*2064 size.
−
======MV-MIPI-IMX265M======
−
−
* raw8
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=2048,height=1544,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-2048x1544.raw</code>
−
−
*raw10
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=2048,height=1544,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-2048x1544.raw</code>
−
−
*raw12
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=2048,height=1544,pixelformat='Y12 ' --stream-mmap --stream-count=1 --stream-to=y12-2048x1544.raw</code>
−
======MV-MIPI-IMX264M======
−
−
*raw8
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=2432,height=2056,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-2432x2056.raw</code>
−
−
*raw10
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=2432,height=2056,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-2432x2056.raw</code>
−
−
* raw12
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=2432,height=2056,pixelformat='Y12 ' --stream-mmap --stream-count=1 --stream-to=y12-2432x2056.raw</code>
−
======RAW-MIPI-SC132M======
−
−
* raw8
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1024,height=1280,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-1024x1280.raw</code>
−
−
*raw10
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1024,height=1280,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-1024x1280.raw</code>
−
======MV-MIPI-IMX287M======
−
−
*raw8
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=704,height=544,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-704x544.raw</code>
−
−
* raw10
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=704,height=544,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-704x544.raw</code>
−
−
*raw12
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=704,height=544,pixelformat='Y12 ' --stream-mmap --stream-count=1 --stream-to=y12-704x544.raw</code>
−
====== RAW-MIPI-IMX462M======
−
−
*raw10
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1088,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-1920x1088.raw</code>
−
−
*raw12
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1088,pixelformat='Y12 ' --stream-mmap --stream-count=1 --stream-to=y12-1920x1088.raw</code>
−
====== RAW-MIPI-AR0234M======
−
−
*raw8格式
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1200,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-1920x1200.raw</code>
−
−
*raw10格式
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1200,pixelformat='Y10 ' --stream-mmap --stream-count=1 --stream-to=y10-1920x1200.raw</code>
−
====== RAW-MIPI-SC535M======
−
−
*raw8格式
−
−
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=2448,height=2048,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-2448x2048.raw</code>
PS. This y8 file can be used with this player: [https://yuv-player-deluxe.software.informer.com/2.6/ YUV Displayer Deluxe].
PS. This y8 file can be used with this player: [https://yuv-player-deluxe.software.informer.com/2.6/ YUV Displayer Deluxe].
=====Preview=====
=====Preview=====
−
On a raspberry pi 5, VLC for preview is now having problems and not working.
+
In the latest version of Raspberry Pi OS, there is currently an issue with VLC for playback, and it cannot be used. Please use `qv4l2` as an alternative.
======Preview using VLC======
======Preview using VLC======
Line 542:
Line 453:
1. Open VLC with command line <code>vlc</code> to launch.
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 on RPI|link=http://wiki.veye.cc/index.php/File:Mvcam_via_qv4l2.png]]
+
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 on RPI|link=http://wiki.veye.cc/index.php/File:Mvcam_via_qv4l2.png]]<br />
−
====== Preview UYVY format images using gstreamer ======
−
<code>export DISPLAY=:0</code>
−
−
For easy installation, the MV series cameras provide UYVY mode. The maximum width supported by UYVY mode is 2880, and real-time preview can be performed using the following command.
−
−
'''Note:''' To increase the maximum frame rate and bandwidth, some modules no longer support the UYVY format. Please use the "fmtcap" command in the script to read the registers to confirm the specific configuration.
−
−
* install gstreamer
−
−
<code>sudo apt-get install gstreamer1.0-tools</code>
−
−
<code>sudo apt-get install libx264-dev libjpeg-dev</code>
−
−
<code>sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-ugly gstreamer1.0-tools gstreamer1.0-gl gstreamer1.0-gtk3</code>
−
−
* MV-MIPI-IMX178M
−
−
<code>v4l2-ctl --set-selection=target=crop,top=0,left=0,width=2816,height=2064</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" ! v4l2convert ! "video/x-raw,format=(string)NV12" ! autovideosink sync=false -v</code>
−
−
* MV-MIPI-SC130M, MV-MIPI-IMX296M, MV-MIPI-IMX265M,MV-MIPI-IMX264M,MV-MIPI-IMX287M
−
−
<code>v4l2-ctl --set-selection=target=crop,top=0,left=0,width=$WIDTH,height=$HEIGHT</code>
−
−
<code>v4l2-ctl --set-ctrl frame_rate=$FPS</code>
−
−
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)$WIDTH, height=(int)$HEIGHT,framerate=(fraction)$FPS/1" ! v4l2convert ! "video/x-raw,format=(string)NV12" ! autovideosink sync=false -v</code>
−
−
Or just simply:
−
−
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! autovideosink</code>
====== Preview GREY format images using opencv ======
====== Preview GREY format images using opencv ======
Line 608:
Line 487:
====== Start acquisition ======
====== Start acquisition ======
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to=y8-3104x2064.yuv</code>
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to=y8-$WIDTHx$HEIGHT.yuv</code>
====== Perform soft trigger operation ======
====== Perform soft trigger operation ======
Line 628:
Line 507:
====== Start acquisition ======
====== Start acquisition ======
−
<code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to=y8-3104x2064.yuv</code>
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to=y8-$WIDTHx$HEIGHT.yuv</code>
====== Perform hardware trigger operation ======
====== Perform hardware trigger operation ======
Line 882:
Line 761:
Add description of mv_probe.sh.
Add description of mv_probe.sh.
+
+
Remove the description about using Gstreamer to preview the UYVY format.
*2024-07-08
*2024-07-08