0

I'm having trouble specifying the "region of interests" to perform feature finding in image stitching method (Stitcher::stitch). I get the following error

"OpenCV Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in Mat, file /Users/Aziz/Documents/Projects/opencv_sources/trunk/modules/core/src/matrix.cpp, line 308 terminate called throwing an exception"

but when I checked the regions and the image cols and rows, it seems to be fine. Any help of suggestion would be appreciated.

M_Leo
  • 23
  • 1
  • 5
  • are you sure you have everything the correct way round? cv::Mat ctor is (rows,cols) but roi rect is (x,y,cols,rows) that's got me a few times – Martin Beckett Jun 06 '12 at 15:26
  • I tried swapping the rows and cols.. no luck with that either. Do you have any examples of using Vector > roes in opencv? – M_Leo Jun 06 '12 at 18:21

1 Answers1

0

OpenCV 2.4.0 have bug in Stitcher::Status Stitcher::matchImages() method (stiicher.cpp): the algo scales the input image but the input roi remain unchanged.

moribvndvs
  • 42,191
  • 11
  • 135
  • 149
lamer
  • 1
  • But I'm using a older version of opencv and stitching takes a lot of time.. anyways to improve it? – M_Leo Jun 20 '12 at 12:33
  • I have examined the svn-logs of stitcher.cpp file and found no changes in ROIs (after adding this feature to OpenCV stitcher). I made changes to the library to solve my problem and error. But my changes is not tested yet unfortunatly. – lamer Jun 20 '12 at 18:37