dimonk33 / cvblob

Automatically exported from code.google.com/p/cvblob
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Bug in cvSetImageROItoBlob #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The width and height of the resulting ROI are off by one.  The inline code 
right now is:

inline void cvSetImageROItoBlob(IplImage *img, CvBlob const *blob)
  {
    cvSetImageROI(img, cvRect(blob->minx, blob->miny, blob->maxx-blob->minx+1, blob->maxy-blob->miny+1));
  };

The correct code should be:

inline void cvSetImageROItoBlob(IplImage *img, CvBlob const *blob)
  {
    cvSetImageROI(img, cvRect(blob->minx, blob->miny, blob->maxx-blob->minx+1, blob->maxy-blob->miny+1));
  };

Original issue reported on code.google.com by m...@adornably.com on 15 Jul 2013 at 9:39

GoogleCodeExporter commented 9 years ago
Sorry, I posted the corrected code in place of the current code, as well.  I 
meant to say that the current code is:

inline void cvSetImageROItoBlob(IplImage *img, CvBlob const *blob)
  {
    cvSetImageROI(img, cvRect(blob->minx, blob->miny, blob->maxx-blob->minx, blob->maxy-blob->miny));
  };

Original comment by m...@adornably.com on 15 Jul 2013 at 9:40