pupil-labs / apriltags

Python bindings for the apriltags3 library
https://pupil-apriltags.readthedocs.io/en/latest/index.html
Other
106 stars 29 forks source link

tagStandard41h12 Segmentation fault (core dumped) #19

Closed TON14 closed 4 years ago

TON14 commented 4 years ago

Detecting tagStandard41h12 AprilTag library compiled from source

at_detector = Detector(searchpath=['/usr/local/lib'],
                       families='tagStandard41h12',
                       nthreads=1,
                       quad_decimate=1.0,
                       quad_sigma=0.0,
                       refine_edges=1,
                       decode_sharpening=0.25,
                       debug=0)

Output

[]
Segmentation fault (core dumped)

When change nthreads=1 to nthreads=2

at_detector = Detector(searchpath=['/usr/local/lib'],
                       families='tagStandard41h12',
                       nthreads=2,
                       quad_decimate=1.0,
                       quad_sigma=0.0,
                       refine_edges=1,
                       decode_sharpening=0.25,
                       debug=0)

Output

[]

My image IMG_6263

pfaion commented 4 years ago

Hi @TON14 can you try removing the searchpath keyword from the Detector() initialization and see if it works?

This keyword is actually not needed anymore in the adjusted wrapper that we are providing. We are internally shipping the original apriltag libraries as part of the python package and thus know where the searchpath is.

TON14 commented 4 years ago

@pfaion

at_detector = Detector(families='tagStandard41h12',
                       nthreads=1,
                       quad_decimate=1.0,
                       quad_sigma=0.0,
                       refine_edges=1,
                       decode_sharpening=0.25,
                       debug=1
)

Debug images were created. Now with nthreads=1 no error Segmentation fault (core dumped). But 0 tag founded Output []

TON14 commented 4 years ago

LOL =) i print tagStandard52h13 tags but try detect tagStandard41h12

True Solution remove the searchpath keyword from the Detector()

Please update info on https://pypi.org/project/pupil-apriltags/

pfaion commented 4 years ago

@TON14 Glad to hear this fixed the issue. The README is already updated on GitHub from #18 Guess we'll have to push a new release to PyPI for updating the docs there as well 😞