Hello,
I can't set proper roi on rpi5 and imx178 . Command history:
./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
<
(data captured)
Second example:
# ./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
no matter what "number" I set in "v4l2-ctl --set-ctrl roi_x='number'"
there is no effect on image - always roi begins at 0,0.
Script ./mv_mipi_i2c.sh -r -f roi -b 4
always return: r roi is 0,0,2600,2064
Second problem is "overflow" at 256 pixels in setting roi by mv_mipi_i2c.sh. Image captured after setting roi:
./mv_mipi_i2c.sh -w -f roi -p1 256 -p2 0 -p3 2600 -p4 2064 -b 4
Is the same when:
./mv_mipi_i2c.sh -w -f roi -p1 0 -p2 0 -p3 2600 -p4 2064 -b 4;
setting x-offset at maximus 248 pix works ok:
./mv_mipi_i2c.sh -w -f roi -p1 248 -p2 0 -p3 2600 -p4 2064 -b 4;