Find the directional vector of an object and the centre of square

Hi guys,
I am working on a project that allows me to play chess with a robotic arm.
I want to use a camera to find out the alignment of the horse, (the directional vector) because the horse can only be captured in a certain direction.
So I can use principal component analysis (PCA) to calculate the directional vector.
And with the Harris corner detector, I can extract the corners (of each square) and deduce the characteristics of the chessboard. If I can find all the corners, is it possible to find the centre of each square? (is there a function that allows me to find it?)
Thank you

seriously ? it’s the same grid of chessboard square (corner)s, offset by square width / 2

well, your bot put it there, so it cant be in “any” orientation
(and, using magnetic pieces, and moving those from below, will be far easier, than with a gripper from above)

you dont need that. get the chessboard outline, the rest is maths

thank you Berak.
I know the bot will put it there but if I want to know the alignment of the horse, can I use PCA?
and the idea is that when I use the Horris corner detector I can find all 4 corners of each square (64 squares) and then with the maths I can find the centre of each square.
Thank you very much, I’m really sorry, I’m just a beginner with Opencv.

I just want to make sure that the robot places all the chess pieces in the centre of each square.

maybe, depends on the camera orientation, and how much of the horses snout / tail is visible over the usually round baseplate

anyway, here’s a tutorial


Hey there is no answers here
Tahnk you