Ask Your Question

Revision history [back]

It seems that the ROI is not defined in top-left+width,height but chopping from the margin.

I got ROIs like:

    %YAML:1.0
validRoi1: !!opencv-matrix
   rows: 1
   cols: 4
   dt: i
   data: [ 60, 40, 36, 59 ]
validRoi2: !!opencv-matrix
   rows: 1
   cols: 4
   dt: i
   data: [ 14, 55, 45, 1 ]

and the max of data[0-3] referring left,top, right,bottom chopping pixels.

I have a 640*480 retify image and line(retify,Point(60,55),Point(480-45,640-59),Scalar(0,255,0),1); goes through the ROI successfully.

If these helps, please share what you see and why this ROI is not top-left+width,height like other opencv roi. I have seem others stereoRectify() out the top-left+width,height roi.

Strange.......