mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 19:44:14 +08:00
Merge pull request #3011 from gokberkgul:wrapper-drawCharucoDiamond
* Add wrapper to drawCharucoDiamond * add test to drawCharucoDiamond Co-authored-by: aguel <ahmet.goekberk.guel@igd.fraunhofer.de>
This commit is contained in:
@@ -328,8 +328,7 @@ CV_EXPORTS_W void drawDetectedDiamonds(InputOutputArray image, InputArrayOfArray
|
|||||||
*
|
*
|
||||||
* This function return the image of a ChArUco marker, ready to be printed.
|
* This function return the image of a ChArUco marker, ready to be printed.
|
||||||
*/
|
*/
|
||||||
// TODO cannot be exported yet; conversion from/to Vec4i is not wrapped in core
|
CV_EXPORTS_W void drawCharucoDiamond(const Ptr<Dictionary> &dictionary, Vec4i ids, int squareLength,
|
||||||
CV_EXPORTS void drawCharucoDiamond(const Ptr<Dictionary> &dictionary, Vec4i ids, int squareLength,
|
|
||||||
int markerLength, OutputArray img, int marginSize = 0,
|
int markerLength, OutputArray img, int marginSize = 0,
|
||||||
int borderBits = 1);
|
int borderBits = 1);
|
||||||
|
|
||||||
|
@@ -30,5 +30,10 @@ class aruco_test(NewOpenCVTests):
|
|||||||
with self.assertRaises(cv.error):
|
with self.assertRaises(cv.error):
|
||||||
board.setIds(np.array([0]))
|
board.setIds(np.array([0]))
|
||||||
|
|
||||||
|
def test_drawCharucoDiamond(self):
|
||||||
|
aruco_dict = cv.aruco.Dictionary_get(cv.aruco.DICT_4X4_50)
|
||||||
|
img = cv.aruco.drawCharucoDiamond(aruco_dict, np.array([0, 1, 2, 3]), 100, 80)
|
||||||
|
self.assertTrue(img is not None)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
NewOpenCVTests.bootstrap()
|
NewOpenCVTests.bootstrap()
|
||||||
|
Reference in New Issue
Block a user