meyerls / aruco-estimator

Automatic Scale Factor Estimation of 3D Reconstruction in COLMAP Utilizing Aruco Marker
MIT License
32 stars 3 forks source link

Visualization problems even markers are correctly detected #17

Closed Baptiste-AIST closed 1 year ago

Baptiste-AIST commented 1 year ago

Hello, I'm having some visualization issues, I checked if the aruco marker is correctly detected in the views and it seems correct. But when I use the visualization it gives something wrong, I'm not sure how we can debug that

example_1 example_2

It might not be very clear on the pictures, but the marker position is missed. I don't know where the problem comes from and how we can investigate that.

Also concerning the scaling factor, I'm wondering about the size of the marker, you put in cm (like 15 for 15cm), but when I do so it gives an incorrect scaling factor, but if I put in meters (0.15 for 15cm) then it starts giving me a more accurate result. I got confused because in your download.py file you wrote self.scale = 0.15 # cm is it 0.15cm or 0.15m? I think meter makes more sense.

Thank you

meyerls commented 1 year ago

Okay, do you mind sending me your photos? Then I can check in detail what is going wrong.

As for the size of the Aruco marker, it is correct that it should be 0.15m. I'll change the default settings.

meyerls commented 1 year ago

I finally found the reason for the faulty analysis and visualization. It seems that I only used the model of the simple pinhole camera for my purposes. Since the camera you chose is a radial camera, I mistakenly assigned a negative value (k1 - radial distortion coefficient) to the principal point in the y-direction. As a result, all calculations were incorrect.

Screenshot from 2022-10-01 13-46-35

Screenshot from 2022-10-01 13-45-57

Additionally I might suggest to undistort your images (by creating a dense model) to further increase the accuracy of the scaling process.

@Baptiste-AIST thanks a lot for the provided data!

Baptiste-AIST commented 1 year ago

Thank you for fixing the bug!