Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArUco marks not being detected #43

Closed
erikx50 opened this issue May 13, 2021 · 2 comments
Closed

ArUco marks not being detected #43

erikx50 opened this issue May 13, 2021 · 2 comments

Comments

@erikx50
Copy link

erikx50 commented May 13, 2021

Hi! I am trying to use ArUco marks with the open AR sandbox software but it looks like the software doesnt recognize the marks. Here is a picture when ArUco detection is enabled.
ArUco marks
I also get this error when trying to run the sandbox with aruco.
ERROR:tornado.application:Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x00000198E368E278>>, <Task finished coro=<_needs_document_lock.<locals>._needs_document_lock_wrapper() done, defined at c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\bokeh\server\session.py:51> exception=AttributeError("'NoneType' object has no attribute 'dpi'")>) Traceback (most recent call last): File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\tornado\ioloop.py", line 741, in _run_callback ret = callback() File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\tornado\ioloop.py", line 765, in _discard_future_result future.result() File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\bokeh\server\session.py", line 67, in _needs_document_lock_wrapper result = func(self, *args, **kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\bokeh\server\session.py", line 195, in with_document_locked return func(*args, **kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\bokeh\document\document.py", line 1183, in wrapper return doc._with_self_as_curdoc(invoke) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\bokeh\document\document.py", line 1169, in _with_self_as_curdoc return f() File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\bokeh\document\document.py", line 1182, in invoke return f(*args, **kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\bokeh\document\document.py", line 972, in remove_then_invoke return callback(*args, **kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\panel\pane\base.py", line 153, in _update_object self._update(ref, old_model) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\panel\pane\plot.py", line 195, in _update model.update(**self._get_properties()) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\panel\pane\image.py", line 104, in _get_properties data = self._img() File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\panel\pane\plot.py", line 222, in _img self.object.canvas.print_figure(b, bbox_inches=bbox_inches) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\backend_bases.py", line 2217, in print_figure **kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\backend_bases.py", line 1639, in wrapper return func(*args, **kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\backends\backend_agg.py", line 509, in print_png FigureCanvasAgg.draw(self) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\backends\backend_agg.py", line 407, in draw self.figure.draw(self.renderer) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\figure.py", line 1864, in draw renderer, self, artists, self.suppressComposite) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\image.py", line 131, in _draw_list_compositing_images a.draw(renderer) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\cbook\deprecation.py", line 411, in wrapper return func(*inner_args, **inner_kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\axes\_base.py", line 2747, in draw mimage._draw_list_compositing_images(renderer, self, artists) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\image.py", line 131, in _draw_list_compositing_images a.draw(renderer) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\text.py", line 681, in draw bbox, info, descent = textobj._get_layout(renderer) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\text.py", line 274, in _get_layout key = self.get_prop_tup(renderer=renderer) File "c:\users\sandy\appdata\local\programs\python\python37\lib\site-packages\matplotlib\text.py", line 848, in get_prop_tup self.figure.dpi, weakref.ref(renderer), AttributeError: 'NoneType' object has no attribute 'dpi'

@danielsk78
Copy link
Collaborator

Hi @erikx50.

The error is described in issue #3.

For the aruco markers, we use the aruco.DICT_4X4_50 to create and detect the arucos. It seems you are using another dictionary, so you will need to specify that when initializing the MarkerDetection class. For example:

aruco = MarkerDetection(sensor=sensor, aruco_dict=cv.aruco.DICT_6X6_100) 

@erikx50
Copy link
Author

erikx50 commented May 18, 2021

Thank you @danielsk78. Looks like it works when we changed to aruco.DICT_4X4_50.

@erikx50 erikx50 closed this as completed May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants