Added cv2.boxPoints() functionality to Python bindings (Feature #2023)
http://www.code.opencv.org/issues/2023 eg: In [3]: box = ((10,10),(5,5),0) In [4]: cv2.boxPoints(box) Out[4]: array([[ 7.5, 12.5], [ 7.5, 7.5], [ 12.5, 7.5], [ 12.5, 12.5]], dtype=float32)
This commit is contained in:
@@ -398,3 +398,10 @@ cvMinAreaRect2( const CvArr* array, CvMemStorage* /*storage*/ )
|
||||
return (CvBox2D)rr;
|
||||
}
|
||||
|
||||
void cv::boxPoints(cv::RotatedRect box, OutputArray _pts)
|
||||
{
|
||||
_pts.create(4, 2, CV_32F);
|
||||
Mat pts = _pts.getMat();
|
||||
box.points((Point2f*)pts.data);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user