OpenCV 4.9.0 Bug: Markers in generated ChArUco board are not centered

I am using OpenCV 4.9.0 to generate a ChArUco board with the following configuration in python.

arucoDict = cv2.aruco.DICT_4X4_1000
boardSize = [2,7]
squareLength = 13
markerLength = 10
dictionary = cv2.aruco.getPredefinedDictionary(arucoDict)
board = cv2.aruco.CharucoBoard(boardSize, squareLength, markerLength, dictionary)
image = board.generateImage([200, 150],1,1);

But I see the ArUco markers in the generated ChArUco board are not centered like you can see in the bottom of the image below:

I see that this issue does not exist in the older version of OpenCV 4.7.0.

v4.7 is outdated. update to 4.9 and see if it still happens.

if this is only reproducible on v4.7 and not later, then it’s already been fixed. I hope you’ll understand why any complaints against an obsolete version cannot be heard.

I tried v4.9 python version and the issue still exists!

Just to be clear: are you claiming that essentially identical application code, in C++ and in Python, using APIs of the same OpenCV version, produces different results?

Sorry that is not what I meant. I have corrected my problem description.

note that this could be considered “cosmetic” because the markers themselves only serve to identify the squares. the actual corners are derived not from any markers but from the saddle points of the checkerboard pattern.

it’s very ugly though and ought to be fixed.

the markers also appear to “creep” ever further away from their center positions… I wonder if any code will eventually touch and overlap with an adjacent square.

I see that you did already file a bug: