okalachev / arucogen

Online ArUco markers generator
http://chev.me/arucogen/
MIT License
413 stars 50 forks source link

why online generate marker are difference to opencv marker #3

Closed Chrislzy1993 closed 5 years ago

Chrislzy1993 commented 5 years ago

hi, thanks for your great online aruco marker generator ! and i have a question, when i generate 4x4 id= 0 marker , it show different from opencv same id marker, and i try other ,it is also differenct. so it is different dictionary ??? or how can i get the same marker with opencv https://docs.opencv.org/3.2.0/d5/dae/tutorial_aruco_detection.html Thanks a lot

okalachev commented 5 years ago

Hello!

Should be the same! Please, show, what you get on the site and in OpenCV.

Chrislzy1993 commented 5 years ago

@okalachev , thanks for your reply. on opencv aruco tutorials, the following aruco marker comes from cv::aruco::DICT_6X6_250. image we can see the marker id is: 203, 124, 23, 62, 98, 40 when i use online aruco generator to the same size and id marker, it look different of all: image image image image image image thanks again, and please tell me where is wrong ?? hope for you reply!!!

okalachev commented 5 years ago

Maybe something wrong with the illustration in the OpenCV documentation?

I tried this code:

import cv2
import cv2.aruco as aruco

d = aruco.getPredefinedDictionary(aruco.DICT_6X6_250)
cv2.imwrite('aruco-6x6-203.png', aruco.drawMarker(d, 203, 200))

And it gives the picture exactly like the generator:

aruco-6x6-203

okalachev commented 5 years ago

@Chrislzy1993, is issue resolved? Can I close for now?

Chrislzy1993 commented 5 years ago

thanks for you nice answer, happy new year!