(X,Y) coordinate using python openCV

asked 2018-09-13 00:26:11 -0500

saj gravatar image

Dear all, It is my first time to work on openCV; in fact, I just heard of it two months ago.I need to get the position point value using (x,y) coordinate system so I can program motors to pick the dices. My question, can you please help to find the location of each dice and return (x,y) values for each one of them? I attached an example of what I really want.image description

Thank you.

edit retag flag offensive close merge delete

Comments

what have you tried, so far ? (we won't write your program)

berak gravatar imageberak ( 2018-09-13 00:53:51 -0500 )edit
1

Just a suggestion - If you always have an image of the scene you could simply take the image coordinate system in openCV: Top-left corner is 0,0; x-axis is horizontal, y-axis is vertical.

Grillteller gravatar imageGrillteller ( 2018-09-13 05:26:14 -0500 )edit

I think one way is to look for white color (thresholding or masks), draw contours on the new image (only the dice should be visible) and take the center of the contours.

m93c gravatar imagem93c ( 2018-09-14 02:12:08 -0500 )edit