Open Domihk opened 4 years ago
The following error happens when trying to create my own marker following the tutorial, opening the scene CreateMarkers and clicking play:
Exception: OpenCV(3.4.2) c:\projects\arucounityplugin\build\opencv\opencvcontrib-prefix\src\opencvcontrib\modules\aruco\src\dictionary.cpp:169: error: (-215:Assertion failed) id < bytesList.rows in function 'cv::aruco::Dictionary::drawMarker' ArucoUnity.Plugin.Cv+Exception.Check () (at Assets/ArucoUnity/Scripts/Plugin/Cv/Exception.cs:64) ArucoUnity.Plugin.Aruco+Dictionary.DrawMarker (System.Int32 id, System.Int32 sidePixels, ArucoUnity.Plugin.Cv+Mat& img, System.Int32 borderBits) (at Assets/ArucoUnity/Scripts/Plugin/Aruco/Dictionary.cs:126) ArucoUnity.Objects.ArucoMarker.Draw () (at Assets/ArucoUnity/Scripts/Objects/ArucoMarker.cs:44) ArucoUnity.Objects.Displayers.ArucoObjectDisplayer.CreateImage () (at Assets/ArucoUnity/Scripts/Objects/Displayers/ArucoObjectDisplayer.cs:155) ArucoUnity.Objects.Displayers.ArucoObjectDisplayer.UpdateImage () (at Assets/ArucoUnity/Scripts/Objects/Displayers/ArucoObjectDisplayer.cs:207) ArucoUnity.Objects.Displayers.ArucoObjectCreator.UpdateImage () (at Assets/ArucoUnity/Scripts/Objects/Displayers/ArucoObjectCreator.cs:63) ArucoUnity.Objects.Displayers.ArucoObjectDisplayer.Update () (at Assets/ArucoUnity/Scripts/Objects/Displayers/ArucoObjectDisplayer.cs:112)
I think the error might be due to an Aruco ID not being on the dictionary. At least for me solved. Maybe we could display a custom error message in that case since I think it could be a very common scenario.
The following error happens when trying to create my own marker following the tutorial, opening the scene CreateMarkers and clicking play: