diff --git a/modules/aruco/misc/pattern_generator/MarkerPrinter.py b/modules/aruco/misc/pattern_generator/MarkerPrinter.py index 4cf9185c3f5..2ce69f97f06 100644 --- a/modules/aruco/misc/pattern_generator/MarkerPrinter.py +++ b/modules/aruco/misc/pattern_generator/MarkerPrinter.py @@ -409,8 +409,8 @@ def GenChessMarkerImage(filePath, chessboardSize, squareLength, subSize=None, pa subChessboardBlockX = np.clip ( np.arange(0, subSize[0] * subDivide[0] + 1, subSize[0]), 0, chessboardSize[0]) subChessboardBlockY = np.clip ( np.arange(0, subSize[1] * subDivide[1] + 1, subSize[1]), 0, chessboardSize[1]) - subChessboardSliceX = subChessboardBlockX.astype(np.float) * squareLength - subChessboardSliceY = subChessboardBlockY.astype(np.float) * squareLength + subChessboardSliceX = subChessboardBlockX.astype(float) * squareLength + subChessboardSliceY = subChessboardBlockY.astype(float) * squareLength for subXID in range(subDivide[0]): for subYID in range(subDivide[1]): @@ -722,8 +722,8 @@ def GenCharucoMarkerImage(filePath, dictionary, chessboardSize, squareLength, ma subChessboardBlockX = np.clip ( np.arange(0, subSize[0] * subDivide[0] + 1, subSize[0]), 0, chessboardSize[0]) subChessboardBlockY = np.clip ( np.arange(0, subSize[1] * subDivide[1] + 1, subSize[1]), 0, chessboardSize[1]) - subChessboardSliceX = subChessboardBlockX.astype(np.float) * squareLength - subChessboardSliceY = subChessboardBlockY.astype(np.float) * squareLength + subChessboardSliceX = subChessboardBlockX.astype(float) * squareLength + subChessboardSliceY = subChessboardBlockY.astype(float) * squareLength for subXID in range(subDivide[0]): for subYID in range(subDivide[1]): @@ -922,8 +922,8 @@ def GenArucoGridMarkerImage(filePath, dictionary, chessboardSize, markerLength, subChessboardBlockX = np.clip ( np.arange(0, subSize[0] * subDivide[0] + 1, subSize[0]), 0, chessboardSize[0]) subChessboardBlockY = np.clip ( np.arange(0, subSize[1] * subDivide[1] + 1, subSize[1]), 0, chessboardSize[1]) - subChessboardSliceX = subChessboardBlockX.astype(np.float) * (markerLength + markerSeparation) - subChessboardSliceY = subChessboardBlockY.astype(np.float) * (markerLength + markerSeparation) + subChessboardSliceX = subChessboardBlockX.astype(float) * (markerLength + markerSeparation) + subChessboardSliceY = subChessboardBlockY.astype(float) * (markerLength + markerSeparation) subChessboardSliceX[-1] -= markerSeparation subChessboardSliceY[-1] -= markerSeparation