Line 407:
Line 407:
===== 保存图片到文件 =====
===== 保存图片到文件 =====
−
======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>
或者
或者
−
<code>./yavta -c1 -Fy8-3104x2064.raw --skip 0 -f Y8 -s 3088x2064 /dev/video0</code>
+
<code>./yavta -c1 -Fy8-$WIDTHx$HEIGHT.raw --skip 0 -f Y8 -s $WIDTHx$HEIGHT /dev/video0</code>
−
−
由于Raspberry Pi为图像申请的内存,宽度为32对齐,高度为16对齐,所以3088*2064的图像将被保存为3104*2064大小。
*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格式
+
由于Raspberry Pi为图像申请的内存,宽度为32对齐,高度为16对齐,所以3088*2064的图像将被保存为3104*2064大小。
−
−
<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>
−
======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>
图片格式请参考下面:raw data图片格式说明 章节。
图片格式请参考下面:raw data图片格式说明 章节。