Page 1 of 1

ROI bug or expected behaviour

Posted: Sun Jun 22, 2014 7:03 pm
by gagle

Code: Select all

/opt/vc/bin/raspivid -o vid.h264 -w 640 -h 480 -t 2000 --roi 0.5,0.0,1.0,1.0
1.jpg
1.jpg (29.68 KiB) Viewed 1127 times
There's a white line in the right edge.

PD: I don't understand how the parameter it's supposed to work. 0.5,0.0,1.0,1.0 from my understanding should be the same as 0.5,0.0,0.5,0.5 if we want to maintain the aspect ratio, that is, the upper right corner.

Re: ROI bug or expected behaviour

Posted: Sun Jun 22, 2014 9:18 pm
by jamesh
It's a normalised coordinate system. Assume 1.0 is full frame width, so 0.25 would be half a frame width.

So 0.5,0.5,1.0,1.0 is actually a full frame starting at the middle of the frame, which will actually be clipped to the frame edge, so is the same as 0.5,0.5,0.5,0.5

Done like this so when you change frame size the ROI parameters don't need to be adjust to get the same result.

Re: ROI bug or expected behaviour

Posted: Mon Jun 23, 2014 7:01 am
by gagle
And the white edge? It is something about the rounding up to the nearest multiple of 32? 640*0.5 = 320, multiple of 32, so... :?:

Re: ROI bug or expected behaviour

Posted: Mon Jun 23, 2014 7:54 am
by jamesh
gagle wrote:And the white edge? It is something about the rounding up to the nearest multiple of 32? 640*0.5 = 320, multiple of 32, so... :?:
No idea. Maybe.