@@ -383,14 +383,13 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
383383 // current id is assigned to [0], so it is the marker on the top
384384 tmpIds[0 ] = currentId;
385385 // create Charuco board layout for diamond (3x3 layout)
386- Ptr<CharucoBoard> _charucoDiamondLayout = CharucoBoard::create (3 , 3 , squareMarkerLengthRate, 1 ., *dictionary,
387- tmpIds);
386+ Ptr<CharucoBoard> _charucoDiamondLayout = new CharucoBoard (Size (3 , 3 ), squareMarkerLengthRate, 1 ., *dictionary, tmpIds);
388387
389388 // try to find the rest of markers in the diamond
390389 vector< int > acceptedIdxs;
391390 RefineParameters refineParameters (minRepDistance, -1 .f , false );
392391 ArucoDetector detector (*dictionary, DetectorParameters (), refineParameters);
393- detector.refineDetectedMarkers (grey, _charucoDiamondLayout, currentMarker, currentMarkerId, candidates,
392+ detector.refineDetectedMarkers (grey, * _charucoDiamondLayout, currentMarker, currentMarkerId, candidates,
394393 noArray (), noArray (), acceptedIdxs);
395394
396395 // if found, we have a diamond
@@ -456,9 +455,9 @@ void drawCharucoDiamond(const Ptr<Dictionary> &dictionary, Vec4i ids, int square
456455 for (int i = 0 ; i < 4 ; i++)
457456 tmpIds[i] = ids[i];
458457 // create a charuco board similar to a charuco marker and print it
459- Ptr< CharucoBoard> board = CharucoBoard::create ( 3 , 3 , (float )squareLength, (float )markerLength, *dictionary, tmpIds);
458+ CharucoBoard board ( Size ( 3 , 3 ) , (float )squareLength, (float )markerLength, *dictionary, tmpIds);
460459 Size outSize (3 * squareLength + 2 * marginSize, 3 * squareLength + 2 * marginSize);
461- board-> generateImage (outSize, _img, marginSize, borderBits);
460+ board. generateImage (outSize, _img, marginSize, borderBits);
462461}
463462
464463}
0 commit comments