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

Combination of parameters to solve_from_centroids for image that will solve the fastest #34

Open
windell747 opened this issue Oct 31, 2024 · 10 comments

Comments

@windell747
Copy link

windell747 commented Oct 31, 2024

Aloha,
I have an example image (google link below) and I would like to find a set of parameters that will solve the image the fastest. I have my own variable background subtraction and diffraction spike rejection algorithm (im happy to share) and it takes 0.5 seconds to compute a list of centroids from a monochrome png image, but I'm wondering if any of you are able to solve the attached picture natively without modification to the code and what parameters have you chosen to make it solve the fastest. My solver takes 1.5 seconds. I know that this is system dependent, but I wanted to just give an idea of the solve time.

Here are some givens:
fov_estimate:=10.78 deg, fov_max_error=0.25, pattern_checking_stars=15, match_radius= 0.01 (left at default), match_threshold=1e-3(left at default)

Here are my thoughts (please correct me if im wrong about what I say):

  1. A more accuracte fov_estimate shortens solving time.
  2. Decreasing fov_max_error shortens solving time (providing that its a valid max error).
  3. Decreasing pattern checking stars values decreases solve time since only 4 are needed, but more might be needed to get the probability of false positive lower.
  4. Decreasing match_radius means less iterations on distortion and shorter solve time. (Thus having better optics means shorter time)
  5. Decreasing match_threshold means a shorter match time. (Im assuming that the # of stars checked in pattern_checking_stars is increased until this threshold is met and the solver exits?

I may be incorrect about some of my statements above. I only mean to throw my assumptions out there. Please correct me if I'm off!

Here is the google link:
https://drive.google.com/drive/folders/1GNJ93yn-rDqaa0cDSLCgazjSVZR1yXyx?usp=sharing

@smroid
Copy link

smroid commented Oct 31, 2024

I don't see an attached image?

@windell747
Copy link
Author

Sorry about that. They are too large to attach. 28MB each. I updated the OP with the link.

thanks,
windell

@smroid
Copy link

smroid commented Oct 31, 2024

https://github.com/smroid/cedar-solve is a fork of Tetra3 that I maintain. Together with cedar-detect, it was able to solve your image in less than 0.4s (175ms for centroiding and 159ms for plate solving, on a Raspberry Pi 4).

It looks like there might have been some camera shake in that image, as the stars are all doubled up. The cedar-detect algorithm doesn't like the double star images, it rejected most of them.

Also, it looks like the image is somewhat over-exposed. Try reducing the shutter time? That might also help with the shake issue.

I didn't do anything special to deal with the diffraction spots. If you reduce the exposure they should be less prominent.

@windell747
Copy link
Author

windell747 commented Nov 1, 2024 via email

@windell747
Copy link
Author

windell747 commented Nov 1, 2024 via email

@smroid
Copy link

smroid commented Nov 1, 2024

No papers on Cedar-detect, but you can look at the code at https://github.com/smroid/cedar-detect/blob/main/src/algorithm.rs, it is pretty extensively commented.

Can you describe your imaging setup? What camera sensor, lens, and what exposure time for that image? What is causing the diffraction artifacts?

Regarding my tetra3 invocation-- it is at https://github.com/smroid/cedar-solve/blob/master/examples/test_tetra3.py, so:

fov_estimate: None
match_radius: 0.01
match_threshold: 1e-4
pattern_checking_stars: no longer used in cedar-solve's fork of tetra3
match_max_error: 0.002

@windell747
Copy link
Author

windell747 commented Nov 1, 2024 via email

@smroid
Copy link

smroid commented Nov 1, 2024

What was the exposure time for the image you posted?

@windell747
Copy link
Author

windell747 commented Nov 1, 2024 via email

@windell747
Copy link
Author

windell747 commented Nov 6, 2024 via email

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

2 participants