Commit a0576d7b authored by Nghia Ho's avatar Nghia Ho

Fixed ret

parent e2f00ce8
...@@ -206,16 +206,18 @@ bool rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& ...@@ -206,16 +206,18 @@ bool rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect&
return false; return false;
} }
intersectingRegion.create(intersection.size(), 1, CV_MAKETYPE(intersectingRegion.depth(), 2) ); //intersectingRegion.create(intersection.size(), 2, CV_32F);
Mat m = intersectingRegion.getMat(); // Mat ret = intersectingRegion.getMat();
size_t step = !m.isContinuous() ? m.step[0] : sizeof(Point2f); Mat(intersection).copyTo(intersectingRegion);
for( size_t i = 0; i < intersection.size(); i++ ) // size_t step = !m.isContinuous() ? m.step[0] : sizeof(Point2f);
{
*(Point2f*)(m.data + i*step) = intersection[i]; // for( size_t i = 0; i < intersection.size(); i++ )
} // {
// *(Point2f*)(m.data + i*step) = intersection[i];
// }
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment