NormandErwan / ArucoUnity

Bring augmented reality to Unity by tracking Aruco markers in real time.
https://normanderwan.github.io/ArucoUnity/
BSD 3-Clause "New" or "Revised" License
205 stars 38 forks source link

Error while calibrating #20

Closed qhua948 closed 5 years ago

qhua948 commented 6 years ago

I get this error when I press the calibrate button in the calibrate scene.

I am using the 2.0 alpha of the build

Exception: OpenCV(4.0.0-pre) C:\Users\user\Documents\p4p\ArucoUnity\ArucoUnityPlugin\build\opencv\OpenCVAruco-prefix\src\OpenCVAruco\modules\calib3d\src\calibration.cpp:3139: error: (-210:Unsupported format or combination of formats) objectPoints should contain vector of vectors of points of type Point3f in function 'cv::collectCalibrationData'

ArucoUnity.Calibration.ArucoCameraCalibration.LateUpdate () (at Assets/third-party/ArucoUnity/Scripts/Calibration/ArucoCameraCalibration.cs:145)
NormandErwan commented 6 years ago

Thank for pinpointing this error! The build was using OpenCV 4.0 which is unstable.

I've re-builded with OpenCV 3.4.2 and updated the package in the 2.0 alpha release: https://github.com/NormandErwan/ArucoUnity/releases/tag/v2.0-alpha Could you test again to calibrate with the updated package?

Meanwhile, I'm going to re-test calibration too.

qhua948 commented 6 years ago

@NormandErwan Thanks, I will test it when I get around

NormandErwan commented 5 years ago

Have you been able to calibrate?

NormandErwan commented 5 years ago

I'm closing this issue until there is a reply.

krisrok commented 5 years ago

downloaded today and tried to calibrate my laptop's webcam. throws the exact same error.

i guess you should reopen the issue :/

vinizel commented 4 years ago

Normand, I am also getting the same error - please advice - your package is super cool.

kefcom commented 1 year ago

I was getting the same error. Make sure you are calibrating using the Charuco (ArUcoUnity_ChArUcoBoard_Dict4x4_50_X_7_Y_5_SquareSize_200_MarkerSize_120.png) or grid board (ArUcoUnity_GridBoard_Dict4x4_50_X_7_Y_5_MarkerSize_120). I had the best results using the Charuco board. Hope this helps.