Ask Your Question
0

ROI in StereoRectify

asked 2016-03-17 20:48:20 -0500

ems316 gravatar image

Hey all,

I was wondering if I could get a formal definition of the region of interest for stereo rectification. I have my calibration complete and I have minimized the error for calibration. I have highlighted my ROI with a red box. My understanding is that the ROI is the region where there is a corresponding pixel in both the left and the right image. The image below is my rectified and undistorted stereo image. As you can see the ROI highlights a region on the left border and of the right image and the right border of the left image that has no matching corresponding pixels. I was wondering if this is usual. It doesn't really make sense to me that the ROI would include pixels that have no corresponding ones in the other image.

Rectified images:

image description

Error output:

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-03-18 03:21:25 -0500

The ROI you have is (per images) the region where all pixels have been correctly rectified. IE, the ROI is made by:

  • top left corner: first pixel where a full row and a full colon as been remapped (no black pixel),
  • top right corner: the Y is the same as the previous, the X coordinate is the latest pixel where a full colon can be used,
  • bottom right corner: the X is the same as the previous, the Y is the latest pixel where a full row could be used,
  • bottom left corner: The Y is the same as the previous, the X is the same as the top left corner.

This is why ROI are not the same on left and right images, and you have to specify them to the Stereo algorithm (at least Block Matching) and not directly apply them to the images before stereo reconstruction (images won't be aligned anymore if you do that and an error will be thrown as the images won't have the same size anymore...)

This is my understanding of the ROI, but for a formal definition, you should probably say that this is the biggest included (aligned to the axes) rectangle containing only valid pixels after stereo rectification.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-03-17 20:48:20 -0500

Seen: 1,330 times

Last updated: Mar 18 '16