@@ -1731,30 +1731,12 @@ void drawDetectedMarkers(InputOutputArray _image, InputArrayOfArrays _corners,
1731
1731
1732
1732
/* *
1733
1733
*/
1734
- void drawAxis (InputOutputArray _image, InputArray _cameraMatrix, InputArray _distCoeffs,
1735
- InputArray _rvec, InputArray _tvec, float length) {
1736
-
1737
- CV_Assert (_image.getMat ().total () != 0 &&
1738
- (_image.getMat ().channels () == 1 || _image.getMat ().channels () == 3 ));
1739
- CV_Assert (length > 0 );
1740
-
1741
- // project axis points
1742
- vector< Point3f > axisPoints;
1743
- axisPoints.push_back (Point3f (0 , 0 , 0 ));
1744
- axisPoints.push_back (Point3f (length, 0 , 0 ));
1745
- axisPoints.push_back (Point3f (0 , length, 0 ));
1746
- axisPoints.push_back (Point3f (0 , 0 , length));
1747
- vector< Point2f > imagePoints;
1748
- projectPoints (axisPoints, _rvec, _tvec, _cameraMatrix, _distCoeffs, imagePoints);
1749
-
1750
- // draw axis lines
1751
- line (_image, imagePoints[0 ], imagePoints[1 ], Scalar (0 , 0 , 255 ), 3 );
1752
- line (_image, imagePoints[0 ], imagePoints[2 ], Scalar (0 , 255 , 0 ), 3 );
1753
- line (_image, imagePoints[0 ], imagePoints[3 ], Scalar (255 , 0 , 0 ), 3 );
1734
+ void drawAxis (InputOutputArray _image, InputArray _cameraMatrix, InputArray _distCoeffs, InputArray _rvec,
1735
+ InputArray _tvec, float length)
1736
+ {
1737
+ drawFrameAxes (_image, _cameraMatrix, _distCoeffs, _rvec, _tvec, length, 3 );
1754
1738
}
1755
1739
1756
-
1757
-
1758
1740
/* *
1759
1741
*/
1760
1742
void drawMarker (const Ptr<Dictionary> &dictionary, int id, int sidePixels, OutputArray _img, int borderBits) {
0 commit comments