<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[IMX178 roi problem - rpi5]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I can't set proper roi on rpi5 and imx178 . Command history:</p>
<pre><code>./media_setting_rpi5.sh mvcam -fmt RAW8 -w 3088 -h 2064
This is a Raspberry Pi 5.
camera name mvcam; width 3088; height 2064; media_fmt Y8_1X8; pixel_fmt GREY
CAM1 probed: media device is /dev/media2
set CAM1 finish, plese get frame from /dev/video0 and use /dev/v4l-subdev2 for camera setting
# v4l2-ctl --set-fmt-video=width=2600,height=2064 -d /dev/video0
# v4l2-ctl -d /dev/video0 --set-fmt-video=width=2600,height=2064,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-2600x2064.raw
  VIDIOC_STREAMON returned -1 (Invalid argument)
# v4l2-ctl -d /dev/video0 --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-2600x2064.raw
&lt;
</code></pre>
<p dir="auto">(data captured)</p>
<p dir="auto">Second example:</p>
<pre><code># ./media_setting_rpi5.sh mvcam -fmt RAW8 -w 2600 -h 2064 -c 1
# v4l2-ctl --set-ctrl roi_x=100 -d /dev/v4l-subdev2
# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! "video/x-raw,format=GRAY8,width=2600,height=2064, framerate=25/1" ! jpegenc ! filesink location=/tmp/test_roi100.jpg
</code></pre>
<p dir="auto">no matter what "number" I set in "v4l2-ctl --set-ctrl roi_x='number'"<br />
there is no effect on image - always roi begins at 0,0.<br />
Script ./mv_mipi_i2c.sh -r -f roi -b 4<br />
always return: r roi is 0,0,2600,2064</p>
<p dir="auto">Second problem is "overflow" at 256 pixels in setting roi by  mv_mipi_i2c.sh. Image captured after setting roi:</p>
<pre><code> ./mv_mipi_i2c.sh -w -f roi -p1 256 -p2 0 -p3 2600 -p4 2064 -b 4
</code></pre>
<p dir="auto">Is the same when:</p>
<pre><code> ./mv_mipi_i2c.sh -w -f roi -p1 0 -p2 0 -p3 2600 -p4 2064 -b 4; 
</code></pre>
<p dir="auto">setting x-offset at maximus 248 pix works ok:<br />
./mv_mipi_i2c.sh -w -f roi -p1 248 -p2 0 -p3 2600 -p4 2064 -b 4;</p>
]]></description><link>http://forum.veye.cc/topic/655/imx178-roi-problem-rpi5</link><generator>RSS for Node</generator><lastBuildDate>Sun, 13 Sep 2026 20:39:27 GMT</lastBuildDate><atom:link href="http://forum.veye.cc/topic/655.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 Nov 2024 15:40:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Thu, 21 Nov 2024 08:31:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/veye_xumm" aria-label="Profile: veye_xumm">@<bdi>veye_xumm</bdi></a><br />
Perfect. Now is working as expected. Thanks!</p>
]]></description><link>http://forum.veye.cc/post/4634</link><guid isPermaLink="true">http://forum.veye.cc/post/4634</guid><dc:creator><![CDATA[sanlu]]></dc:creator><pubDate>Thu, 21 Nov 2024 08:31:22 GMT</pubDate></item><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Thu, 21 Nov 2024 02:32:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sanlu" aria-label="Profile: sanlu">@<bdi>sanlu</bdi></a><br />
This is indeed a bug, please refer to this <a href="https://wiki.veye.cc/index.php/Mvcam_firmware_update_manual" rel="nofollow ugc">link</a> below to upgrade the camera firmware to version MV-MIPI-IMX178M_C1.44_L2.01_upgrade_20241121.bin.</p>
]]></description><link>http://forum.veye.cc/post/4632</link><guid isPermaLink="true">http://forum.veye.cc/post/4632</guid><dc:creator><![CDATA[veye_xumm]]></dc:creator><pubDate>Thu, 21 Nov 2024 02:32:04 GMT</pubDate></item><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Wed, 20 Nov 2024 10:44:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/veye_xumm" aria-label="Profile: veye_xumm">@<bdi>veye_xumm</bdi></a>  Ok - now "mv_mipi_i2c.sh -r -f roi" show right values, but main problem exists: image not begin at 344px but 88.<br />
But problem exists only at "x" - I've tested image 1200x1200 offseted by 512 and "y" begins at right position</p>
]]></description><link>http://forum.veye.cc/post/4631</link><guid isPermaLink="true">http://forum.veye.cc/post/4631</guid><dc:creator><![CDATA[sanlu]]></dc:creator><pubDate>Wed, 20 Nov 2024 10:44:56 GMT</pubDate></item><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Wed, 20 Nov 2024 09:54:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sanlu" aria-label="Profile: sanlu">@<bdi>sanlu</bdi></a> said in <a href="/post/4629">IMX178 roi problem - rpi5</a>:</p>
<blockquote>
<p dir="auto">./media_setting_rpi5.sh mvcam -fmt RAW10 -x 344 -y 0  -w 2400 -h 2064 -c 1</p>
</blockquote>
<p dir="auto">Sorry , please pull a new update from github.</p>
]]></description><link>http://forum.veye.cc/post/4630</link><guid isPermaLink="true">http://forum.veye.cc/post/4630</guid><dc:creator><![CDATA[veye_xumm]]></dc:creator><pubDate>Wed, 20 Nov 2024 09:54:56 GMT</pubDate></item><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Wed, 20 Nov 2024 09:07:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/veye_xumm" aria-label="Profile: veye_xumm">@<bdi>veye_xumm</bdi></a> Results below:</p>
<pre><code>root@allsky2:~/raspberrypi_v4l2/rpi5_scripts# ./media_setting_rpi5.sh mvcam -fmt RAW10 -x 344 -y 0  -w 2400 -h 2064 -c 1
This is a Raspberry Pi 5.
Kernel version is 6.6.51, do not support unpacked format.
camera name mvcam; roi_x 344; roi_y 0;width 2400; height 2064; media_fmt Y10_1X10; pixel_fmt Y10P
CAM1 probed: media device is /dev/media1
set CAM1 finish, plese get frame from /dev/video0 and use /dev/v4l-subdev2 for camera setting
root@allsky2:~/raspberrypi_v4l2/rpi5_scripts# cd ../mv_tools_rpi/
/root/raspberrypi_v4l2/mv_tools_rpi
root@allsky2:~/raspberrypi_v4l2/mv_tools_rpi# ./mv_mipi_i2c.sh -r -f roi -b 4
r roi is 0,0,2400,2064 
</code></pre>
]]></description><link>http://forum.veye.cc/post/4629</link><guid isPermaLink="true">http://forum.veye.cc/post/4629</guid><dc:creator><![CDATA[sanlu]]></dc:creator><pubDate>Wed, 20 Nov 2024 09:07:22 GMT</pubDate></item><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Wed, 20 Nov 2024 01:16:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sanlu" aria-label="Profile: sanlu">@<bdi>sanlu</bdi></a><br />
Please download a new <a href="https://github.com/veyeimaging/raspberrypi_v4l2/tree/main/rpi5_scripts" rel="nofollow ugc">https://github.com/veyeimaging/raspberrypi_v4l2/tree/main/rpi5_scripts</a><br />
Try</p>
<pre><code>./media_setting_rpi5.sh mvcam -fmt RAW10 -x 344 -y 0 -w 2400 -h 2064 -c 1
</code></pre>
<p dir="auto">then</p>
<pre><code>mv_mipi_i2c.sh -r -f roi -b yourbus
</code></pre>
]]></description><link>http://forum.veye.cc/post/4621</link><guid isPermaLink="true">http://forum.veye.cc/post/4621</guid><dc:creator><![CDATA[veye_xumm]]></dc:creator><pubDate>Wed, 20 Nov 2024 01:16:27 GMT</pubDate></item><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Tue, 19 Nov 2024 08:24:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/veye_xumm" aria-label="Profile: veye_xumm">@<bdi>veye_xumm</bdi></a> Results:</p>
<pre><code># ./media_setting_rpi5.sh mvcam -fmt RAW8 -w 2400 -h 2064 -c 1
This is a Raspberry Pi 5.
camera name mvcam; width 2400; height 2064; media_fmt Y8_1X8; pixel_fmt GREY
CAM1 probed: media device is /dev/media1
set CAM1 finish, plese get frame from /dev/video0 and use /dev/v4l-subdev2 for camera setting
# v4l2-ctl --set-ctrl roi_x=344 -d /dev/v4l-subdev2 
# v4l2-ctl --set-ctrl roi_y=0 -d /dev/v4l-subdev2 
# v4l2-ctl --set-fmt-video=width=2400,height=2064 -d /dev/video0
# ./mv_mipi_i2c.sh -r -f roi -b 4
r roi is 0,0,2400,2064 
# ./mv_mipi_i2c.sh -r -f version -b 4
version is C 01.36 and L 02.01
</code></pre>
]]></description><link>http://forum.veye.cc/post/4619</link><guid isPermaLink="true">http://forum.veye.cc/post/4619</guid><dc:creator><![CDATA[sanlu]]></dc:creator><pubDate>Tue, 19 Nov 2024 08:24:21 GMT</pubDate></item><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Mon, 18 Nov 2024 09:23:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sanlu" aria-label="Profile: sanlu">@<bdi>sanlu</bdi></a></p>
<p dir="auto">Sorry, I didn't explain clearly earlier.</p>
<p dir="auto">Based on your requirements, I recommend not using <code>mv_mipi_i2c.sh</code> for configuration because it directly changes the settings inside the camera, but the v4l2 driver won't be aware of your parameter modifications.</p>
<p dir="auto">The following three commands form a complete ROI configuration:</p>
<pre><code>v4l2-ctl --set-ctrl roi_x=344 
v4l2-ctl --set-ctrl roi_y=0
v4l2-ctl --set-fmt-video=width=2400,height=2064
</code></pre>
<p dir="auto">As for the module issue you mentioned, after performing the above configuration, use the following commands to verify the actual parameters inside the camera:</p>
<pre><code>mv_mipi_i2c.sh -r -f roi -b yourbus
mv_mipi_i2c.sh -r -f version -b yourbus
</code></pre>
<p dir="auto">Please send me the results once you've checked.</p>
]]></description><link>http://forum.veye.cc/post/4616</link><guid isPermaLink="true">http://forum.veye.cc/post/4616</guid><dc:creator><![CDATA[veye_xumm]]></dc:creator><pubDate>Mon, 18 Nov 2024 09:23:59 GMT</pubDate></item><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Mon, 18 Nov 2024 08:40:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/veye_xumm" aria-label="Profile: veye_xumm">@<bdi>veye_xumm</bdi></a> Your example at full resolution works fine. I don't want full resolution but width 2400px centered - it require ROI offseted by 344px, but after setting roi via mv_mipi_i2c.sh script (./mv_mipi_i2c.sh -w -f roi -p1 344 -p2 0 -p3 2400 -p4 2064 -b 4) image is offseted only 88px - offset is "modulo" 256px (i've send you images via e-mail).</p>
<p dir="auto">Second example: How to set all 4 param in one command while  "v4l2-ctl --set-ctrl roi_x " works on device /dev/v4l-subdev2 during "v4l2-ctl --set-fmt-video" works on /dev/video0 ?</p>
]]></description><link>http://forum.veye.cc/post/4615</link><guid isPermaLink="true">http://forum.veye.cc/post/4615</guid><dc:creator><![CDATA[sanlu]]></dc:creator><pubDate>Mon, 18 Nov 2024 08:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to IMX178 roi problem - rpi5 on Sun, 17 Nov 2024 07:54:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sanlu" aria-label="Profile: sanlu">@<bdi>sanlu</bdi></a> First example:<br />
media_setting_rpi5.sh has internally called media-ctl and v4l2-ctl to configure the resolution. So there is no need to run v4l2-ctl after calling media_setting_rpi5.sh.<br />
Try this:</p>
<pre><code>./media_setting_rpi5.sh mvcam -fmt RAW8 -w 3088 -h 2064 -c 1
v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=1 --stream-to=y8-3104x2064.raw
</code></pre>
<p dir="auto">Second example:</p>
<p dir="auto">The configuration of roi requires all 4 relevant parameters to be configured together, not just one. This will not take effect.</p>
]]></description><link>http://forum.veye.cc/post/4585</link><guid isPermaLink="true">http://forum.veye.cc/post/4585</guid><dc:creator><![CDATA[veye_xumm]]></dc:creator><pubDate>Sun, 17 Nov 2024 07:54:55 GMT</pubDate></item></channel></rss>