Line 410:
Line 410:
*raw8格式
*raw8格式
−
<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>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>
或者
或者
Line 418:
Line 418:
*raw10格式
*raw10格式
−
<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>
+
<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格式
*raw12格式
−
<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>
+
<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>
由于Raspberry Pi为图像申请的内存,宽度为32对齐,高度为16对齐,所以3088*2064的图像将被保存为3104*2064大小。
由于Raspberry Pi为图像申请的内存,宽度为32对齐,高度为16对齐,所以3088*2064的图像将被保存为3104*2064大小。
Line 493:
Line 493:
====== 开始取图 ======
====== 开始取图 ======
−
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to=y8-$WIDTHx$HEIGHT.yuv</code>
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to="y8-${WIDTH}x${HEIGHT}.raw"</code>
====== 进行软触发操作 ======
====== 进行软触发操作 ======
Line 515:
Line 515:
====== 开始取图 ======
====== 开始取图 ======
−
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to=y8-$WIDTHx$HEIGHT.raw</code>
+
<code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to="y8-${WIDTH}x${HEIGHT}.raw"</code>
====== 进行硬触发操作 ======
====== 进行硬触发操作 ======