mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
Fixed ret
This commit is contained in:
parent
e2f00ce846
commit
a0576d7b2a
@ -206,16 +206,18 @@ bool rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect&
|
||||
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++ )
|
||||
{
|
||||
*(Point2f*)(m.data + i*step) = intersection[i];
|
||||
}
|
||||
// size_t step = !m.isContinuous() ? m.step[0] : sizeof(Point2f);
|
||||
|
||||
// for( size_t i = 0; i < intersection.size(); i++ )
|
||||
// {
|
||||
// *(Point2f*)(m.data + i*step) = intersection[i];
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user