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

Unable to reproduce image results from test_fits.py #21

Open
batzera opened this issue Sep 9, 2022 · 0 comments
Open

Unable to reproduce image results from test_fits.py #21

batzera opened this issue Sep 9, 2022 · 0 comments

Comments

@batzera
Copy link

batzera commented Sep 9, 2022

Hi. I've been exploring cameratransform to understand how to perform backprojections on a single image. I'm not obtaining the correct backprojected penguin points nor horizon line as shown in the documentation. I know the backprojected points are incorrect because backprojected horizon line is at the bottom of the image and backprojected landmarks are outside of the field of view:

My information fit image:
information_fit_metropolis1e3

My camera trace from metropolis algorithm:
camera_trace_metropolis1e3

The only changes I made to the original script are the addition of a line for CameraImage2.jpg image reading (via cv2.imread, and I also tried plt.imread) and replacing the matplotlib backend to one that works for me (via matplotlib.use('TkAgg')). A difference I noticed between the script and the documentation is that metropolis is set by default to run for 1,000 iterations vs 10,000, but even changing 1e3 to 1e4 to match the value in the documentation snippet I get the same wrong backprojections in the image.

I'm also confused as to why in this test first camera.metropolis(...) is used to estimate the camera extrinsic parameters but then camera.fit(...) uses the same initial values to obtain a completely different estimated values. The values with higher probability given by metropolis are the ones supposed to be the estimates for [elevation_m, rot_deg, tilt_deg, heading_deg] and with these fill in the extrinsic parameter matrices and be used for backprojection, right?

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

1 participant