Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Testing SharpCap Autofocus with Autostakkert's Quality Analysis

  • Please log in to reply
8 replies to this topic

#1 Borodog

Borodog

    Gemini

  • *****
  • topic starter
  • Posts: 3,251
  • Joined: 26 Oct 2020

Posted 16 October 2021 - 12:57 AM

Objective

Test SharpCap's autofocus accuracy by using Autostakkert's quality analysis metric.

 

Method

Critical focus was found using the Fourier Detail focus assist method in SharpCap. A course sweep with a step size of 20 steps performed and then re-sampled with a step size of 10 steps (this was not a necessary part of the procedure; I just wanted to verify the repeatability and look at the calculated critical focus position for the two steps sizes, which were nearly identical). Once critical focus was located, the Focus Motor was indexed to it, and then in-focused 40 steps. Capture was started, and the Focus Motor was indexed 10 steps out every 30 seconds, for a total of 9 samples, 4 inside focus, one at critical, and 4 outside focus. The ser file was then processed in Autostakkert, first to determine the quality graph for the entire video, and then chunked into 9 56% stacks using the Expand function. The 9 stacks were processed identically in Astra Image, and an animated gif was created.

 

Results

I was already losing the good seeing. Focusing with autofocus is like manual focusing; better seeing makes it easier while poorer seeing makes it harder. Nevertheless, in the same conditions I find autofocusing to be much easier and produces better results (for me; your mileage may vary if you are a steely-eyed missile man with years of experience manually focusing).

 

gallery_346195_17566_136447.jpg

 

The results speak for themselves; the best segment is clearly the middle chunk, which is the chunk at the critical focus as determined by SharpCap. The chunk immediately after it is a pretty close second. The chunk before critical focus is poorer than the chunk after it, and this asymmetry perhaps indicates that I was not quite on critical focus. However, the fact that the focus quality graph in SharpCap is parabolic and the frame quality graph in Autostakkert is Gaussian argues that "close enough" is likely good enough (mathematically the slope of both graphs is zero at critical focus, so a small error does not produce much penalty). 

 

Here's the animated gif created from the recording. The frame at SharpCap's critical focus is denoted with a red border. The animation bounces from inside to outside focus and back. Click to see the full sized animation.

 

tn_gallery_346195_17566_621892.gif

 

Conclusion

The Celestron Focus Motor combined with SharpCap was able to accurately find critical focus.

 

 


  • Kenny V., troyt, KpS and 6 others like this

#2 troyt

troyt

    Apollo

  • -----
  • Posts: 1,140
  • Joined: 19 Nov 2008
  • Loc: Hunter Valley, Australia

Posted 16 October 2021 - 05:24 AM

 Looking at your animation it does look like you are finding good focus.

 

I would of though that focusing with the primary mirror would have led to image shift, but it doesn't look like it in your images which I'm surprised. 

Unless the final focus adjustment is in the anti-clockwise direction? I'm just not sure how the Celestron focus motor works. 

 

If you own a traditional crayford focuser? Maybe you could get even better results with the fourier detail focus method as all movement with the primary 

mirror will be non existing. smile.gif

 

Have you tried the focus methods in Fircapture? and is there anything comparable? 

 

 

Troy


Edited by troyt, 16 October 2021 - 05:26 AM.

  • Borodog likes this

#3 Borodog

Borodog

    Gemini

  • *****
  • topic starter
  • Posts: 3,251
  • Joined: 26 Oct 2020

Posted 16 October 2021 - 08:18 AM

There was image shift, but it was very small due to the small excursions of the focuser. SharpCap always ends with a counter-clockwise motion of the focus motor. In any event, the image shift is centered out by Autostakkert.



#4 RedLionNJ

RedLionNJ

    Aurora

  • *****
  • Posts: 4,753
  • Joined: 29 Dec 2009
  • Loc: Red Lion, NJ, USA

Posted 16 October 2021 - 12:52 PM

I particularly like the appearance of the quality assessment graph in AS!3.

 

I'm not quite sure I followed along 100%, though - might it be possible to do an assessment during a SINGLE capture with the focus moving the entire time? i.e. from outside focus, through focus to inside focus?  Then see if the AutoStakkert assessment for sharpest frames corresponds to the same point Sharpcap would assess as best focus?

 

Please keep this up - I'm deeply interested.

 

Grant



#5 JMP

JMP

    Apollo

  • *****
  • Posts: 1,240
  • Joined: 31 Oct 2005

Posted 16 October 2021 - 01:03 PM

Good stuff, Borodog!! I'm tempted to buy one of these and try to adapt it to an older C11. I'm surprised that it works this well!

#6 dcaponeii

dcaponeii

    Vanguard

  • -----
  • Posts: 2,279
  • Joined: 01 Sep 2019
  • Loc: Waxahachie, TX

Posted 18 October 2021 - 12:57 PM

I particularly like the appearance of the quality assessment graph in AS!3.

 

I'm not quite sure I followed along 100%, though - might it be possible to do an assessment during a SINGLE capture with the focus moving the entire time? i.e. from outside focus, through focus to inside focus?  Then see if the AutoStakkert assessment for sharpest frames corresponds to the same point Sharpcap would assess as best focus?

 

Please keep this up - I'm deeply interested.

 

Grant

This is what he did as is evident in the capture quality graph.  He then used the feature in AS!3 called Expand to split that video into equal parts and then stacked each of the parts into individual images.  All of the images come from the original video capture.



#7 Borodog

Borodog

    Gemini

  • *****
  • topic starter
  • Posts: 3,251
  • Joined: 26 Oct 2020

Posted 21 October 2021 - 12:07 PM

Following up with some more thoughts after using autofocus a few more times.

 

First, autofocus seems to handle mediocre seeing fairly well. What it does NOT handle very well, is intensely *variable* seeing. For one set of focus samples you might have one "quality" of seeing, and then in the very next set of samples the quality might go significantly up or down, making a hash of the graph and fit. If this happens, you just have to fall back on manual focus.

 

The second thing that autofocus cannot handle is variable transparency. As the transparency changes, so do the scores, again making the graph and fit useless, and again you have to fall back on manual focus.

 

With all of these exceptions, you might be better off sticking with manual focus in the first place. Electronic focusing certainly makes it vastly easier. If you still find yourself vacillating back and forth, "Is this better? Or this?,"  it's probably because you are very near critical focus and the difference between the two is not significant. Pick one. Or split the difference. It won't matter. I will say that running through the autofocus procedure has made me much, much better at manual focusing, so it's worth all of these experiments if only for that.


Edited by Borodog, 21 October 2021 - 12:07 PM.

  • JMP and RedLionNJ like this

#8 Kiwi Paul

Kiwi Paul

    Apollo

  • -----
  • Posts: 1,226
  • Joined: 13 Jul 2020
  • Loc: Carterton, New Zealand

Posted 21 October 2021 - 02:29 PM

A very interesting experiment. Firstly I thought it was useful because it actually proves that AS!3 actually does work well and identifies the sharpest images.
I’m still thinking about your experiment. You say the critical focus was found by the SharpCap algorithm, but did you also eyeball and agree that it was the best focus? I’m thinking here that there is a third angle and that is the focus arrived by the human eye.
Cheers Paul
  • dcaponeii and Borodog like this

#9 Borodog

Borodog

    Gemini

  • *****
  • topic starter
  • Posts: 3,251
  • Joined: 26 Oct 2020

Posted 21 October 2021 - 03:01 PM

A very interesting experiment. Firstly I thought it was useful because it actually proves that AS!3 actually does work well and identifies the sharpest images.
I’m still thinking about your experiment. You say the critical focus was found by the SharpCap algorithm, but did you also eyeball and agree that it was the best focus? I’m thinking here that there is a third angle and that is the focus arrived by the human eye.
Cheers Paul

Yes, I did. However, it becomes extremely difficult if not impossible to judge by eye once you are very close, especially if the seeing is not above average.

 

It did seem at one point like the best focus score was not at the point that minimized the FWHM of the moons. That could be because the moons have a finite diameter, and that minimizing their FWHM does not actually put them in focus. But it could also be that the seeing was not great and the focus scores were simply spurious. In fact that was my assumption at the time and I focused by eye on the moons. :Op


  • Kiwi Paul likes this


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics