lambdaloop / anipose

🐜🐀🐒🚶 A toolkit for robust markerless 3D pose estimation
http://anipose.org
BSD 2-Clause "Simplified" License
351 stars 66 forks source link

Could not build calibration graph #106

Open LWitter opened 1 year ago

LWitter commented 1 year ago

When trying to calibrate we sometimes get an error on non-overlap between detections. When looking at the number of detected boards however, there should be overlap. We have a three-camera setup where the two outside cameras often don't see the board at the same time, but there is plenty of overlap between cameras 1-2 and 2-3; just 1-3 is rare. Why should there be overlap? In the attached example there are 2009 frames. Camera 1 sees 882 boards, 2 sees 1374 and camera 3 sees 1082 boards. So, between cam 1 & cam 2 we should have 882+1374-2009 = 247 overlap. And between 2 & 3 we should have 1374+1082-2009= 447 overlap. Why do we then get the error that camera 1 and 3 belong to a different (non-overlapping) group as compared to camera 2?

I am so confused about this. What do we do wrong?

IMG_5370 ng to a different (n IMG_5371 on-overlapping) group as compared to camera 2?

kmoeri commented 1 year ago

Hi @LWitter

I faced the same issue with my camera setup. It might be a shot in the dark but try the following: 1.) Go to the path, where the source-files of the aniposelib library are located 2.) Open the "cameras.py" file 3.) Scroll down to the function "calibrate_rows()" (around line 1550 in my case) 4.) Increase the minimum number of simultaneously detected object points per frame (in my case, "10" instead of "7" worked for all calibrations that failed previously in a similar fashion to your example)

--> The value to change can be found in the list comprehension that results in the variable "mixed" (see comment in attached image).

I am currently working on improving certain code sections for my specific setup (around 10 cameras). I will share my improvements as soon as I reach a stable, reliable version.

4389E5D0-36F9-4F37-94D0-DC0C88C0F273

I hope that helps.