×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Autofocusing the moon

  • Posts: 179
  • Thank you received: 7
Hi,

My question is quite simple. Is it posible to use ekos auto focus procedure with the moon, rather than stars?

Regards

Enviado desde mi MI 9 mediante Tapatalk
2 years 8 months ago #74556

Please Log in or Create an account to join the conversation.

  • Posts: 1221
  • Thank you received: 565

Replied by Hy Murveit on topic Autofocusing the moon

I would guess that it won't work well. KStars autofocus depends on detecting "stars" and minimizing their size. It is not using contrast-detection (nor phase detection). Best to auto-focus on stars somewhere else, then move to the moon.

Hy
The following user(s) said Thank You: Miguel
2 years 8 months ago #74565

Please Log in or Create an account to join the conversation.

  • Posts: 179
  • Thank you received: 7

Replied by Miguel on topic Autofocusing the moon

great, thanks for the reply. Just as I suspected :)
2 years 8 months ago #74582

Please Log in or Create an account to join the conversation.

  • Posts: 300
  • Thank you received: 57

Replied by Scott Denning on topic Autofocusing the moon

This would be a fantastic feature, especially for imaging the moon during daylight or twilight when stars are unavailable.

Because this is unavailable in Ekos, I routinely switch to TheSkyX *just for autofocus* and then switch back to Ekos. TheSkyX "@Focus3" uses a gradient (contrast)-based focus metric that produces razor-sharp results by focusing on the Moon. @Focus3's gradient-based method also works very well on star fields or even single stars.

Implementing this in Ekos would require an alternative focus metric but (in my naive expectation) no new code or logic for moving the focuser, computing the curve, solving for the optimum position, etc.

"Sharpness" metrics are well-studied because it's the basis for autofocus in conventional photography. Daytime photography (eg, in your phone) can't use star sizes. The kind of focus metric required for Ekos to autofocus on the Moon is in fact the metric used by virtually all autofocus logic in the world.

The math is well defined and there are gradient libraries available in many languages to make it fast and reliable.

openaccess.thecvf.com/content_CVPR_2020/..._CVPR_2020_paper.pdf

www.spiedigitallibrary.org/journals/opti....2.023106.full?SSO=1

www.osapublishing.org/DirectPDFAccess/6E...6205&seq=0&mobile=no
The following user(s) said Thank You: Miguel
Last edit: 2 years 8 months ago by Scott Denning.
2 years 8 months ago #74608

Please Log in or Create an account to join the conversation.

  • Posts: 1221
  • Thank you received: 565

Replied by Hy Murveit on topic Autofocusing the moon

Scott,  I totally agree that a contrast-detection metric would be a very nice addition to Ekos. It is something I've been mulling over for quite a while. I was coming at it as a benefit for out-of-focus images (when things are too out-of-focus so that star-detection is unreliable, then Ekos auto-focus currently breaks down), but yes, it would be great for imaging the Moon as well. I can't promise a timeline for this, it would take some time to experiment and get  right.  In my previous research on it, I found sources suggesting a simply a standard-deviation of pixel values would work (perhaps computed in several regions in the image), and another suggestion of convolving Sobel Operators on the image. I believe you are right that one would change the image quality metric (from HFR to contrast), but leave the algorithmic logic intact.

FWIW, (minor point) I believe most modern autofocus schemes use phase-detection algorithms (which are much quicker because they compute which direction the focus should move and by how much) but that requires a hardware component we wouldn't have. However a contrast detection scheme should be OK for Ekos.
The following user(s) said Thank You: Scott Denning, Miguel
2 years 8 months ago #74611

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 2

Replied by Bill on topic Autofocusing the moon

So to be clear, since this thread is a year old, the Gradient (focus) Process will not work for the Moon?
1 year 6 months ago #86684

Please Log in or Create an account to join the conversation.

  • Posts: 1221
  • Thank you received: 565

Replied by Hy Murveit on topic Autofocusing the moon

I honestly am not sure what's in the gradient autodocus scheme. The Linear and Linear 1-Pass schemes depend on star detection, so won't work on images without stars.
1 year 6 months ago #86686

Please Log in or Create an account to join the conversation.

Moderators: Radek Kaczorek
Time to create page: 0.857 seconds