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

Problems when using multiple sets of images with multiple patterns #22

Closed
ElectronicElephant opened this issue Feb 10, 2022 · 7 comments

Comments

@ElectronicElephant
Copy link

Hello,

I successfully ran multiple cameras with a single set of images. i.e.,

multical calibrate --cameras h0 h1 h2 h3 r05 r08 r22 r47
- cam1
     - im0.png
- cam2
     - im0.png
- cam3
     - im0.png
- cam4
     - im0.png

, where the five boards are generated from cube_10x10.yaml config. The cost converges to 5.0243e+02, the RMS is below 1, and the visualization looks good.
image

However, after I changed how the boards are placed and took multiple sets of images, things get worse. (The cameras are static.)

multical calibrate --cameras h0 h1 h2 h3 r05 r08 r22 r47
- cam1
     - im0.png
     - im1.png
- cam2
     - im0.png
     - im1.png
- cam3
     - im0.png
     - im1.png
- cam4
     - im0.png
     - im1.png

The cost is around 8e+7, and the RMS is larger than 100. The visualization does not look good.

image

However, I'm pretty sure that the detections are good. For example,
image

So it looks like that there are some problems in the optimization process, when there are multiple sets of images. How can I diagnose what's going wrong?

Best wishes,

@ElectronicElephant ElectronicElephant changed the title The models do not converge well when using multiple sets of images Problems when using multiple sets of images with multiple patterns Feb 10, 2022
@oliver-batchelor
Copy link
Owner

Hi!

Thanks for having a look! I'm not quite sure what's going wrong, however... there are a couple of things to check. Can you check the logs and see what it says around the initialization? If this goes doesn't initialize robustly then the optimization likely won't converge.

You can also check this in the UI - up the top there's a dropdown which says Stage: Calibration - there will be another entry "Initialization" - have a look what the projected patterns after initialization look like.

Usually when I've had this problem previously there is some mismatch between my board config and how I've printed the patterns, but since you've used my config file this seems less likely.

I would say your line of reasoning is probably good - but this is the normal use case for the software (i.e. this is how I'm usually using it, multiple boards, multiple sets of images and multiple cameras)

Cheers,
Oliver

@ElectronicElephant
Copy link
Author

Hello @oliver-batchelor !

Thanks for your detailed reply, and this awesome project!

I have checked the initialization stage and found that it looks not good.

image

And here is the log.
log.txt

Also, I have checked all detections, and found there is no false positive, although the true positive rate is low. For example,
image

Does it mean that I need to improve the image quality? (Probably I should go for a better camera.)

Finally, I'm glad to share the images I used. I will appreciate it if you could take your time to help me check them.

https://drive.google.com/file/d/1qfEU-3ftzjOda6p4CzvquxMzJUpY64LW/view?usp=sharing

The command I used is

multical calibrate --cameras h0 h1 h2 h3 r05 r08 r22 r47

Bests,

@ElectronicElephant
Copy link
Author

After a few days, I came to realize that during the calibration process, the relative position of boards should not be changed. This explains why, in my situation, it works when there is only one set of photos, but not when there are multiple sets of photos.

Great thanks for this awesome repo!

@oliver-batchelor
Copy link
Owner

oliver-batchelor commented Feb 25, 2022 via email

@kl2005ad
Copy link

kl2005ad commented Oct 31, 2022

Hmm. During the calibration process the relative position of the boards IS refined, though this can be turned on and off (see --fix_board_poses option).

On Sat, Feb 26, 2022 at 12:23 AM T.T. Tang @.> wrote: After a few days, I came to realize that during the calibration process, the relative position of boards should not be changed. This explains why, in my situation, it works when there is only one set of photos, but not when there are multiple sets of photos. Great thanks for this awesome repo! — Reply to this email directly, view it on GitHub <#22 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAITRZISSE2ADFNGV3PNEVLU45REPANCNFSM5OAON67A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.>

@oliver-batchelor Do you mean that setting "--fix_board_poses False" should allow multiple boards change relative poses when taking multiple sets of images? I tried and found that it does not work no matter I turn it on or off.
My case is multiple static cameras and I assume by default it should allow the boards to change poses between different sets of images, because otherwise only one moment of images can be used...
If it is like this by design, can you suggest an easy way to modify the code so that it can work on multi-camera image sets of multiple boards that are moving independently across time?

@oliver-batchelor
Copy link
Owner

oliver-batchelor commented Nov 1, 2022 via email

@kl2005ad
Copy link

kl2005ad commented Nov 1, 2022

I agree with you. But my point is that multical now does not support using multiple moving boards to do multi-camera calibration. I just wonder how to change the code to make it possible.

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

3 participants