A Couple of small feature requests

Got an idea for something that SharpCap should do? Share it here.
Forum rules
'+1' posts are welcome in this area of the forums to indicate your support for a particular feature suggestion. Suggestions that get the most +1's will be seriously considered for inclusion in future versions of SharpCap.
Borodog
Posts: 487
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#31

Post by Borodog »

Thanks Robin.

What do you think about the idea of calculating scores with multiple methods?
User avatar
admin
Site Admin
Posts: 17540
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: A Couple of small feature requests

#32

Post by admin »

Hi,

to be honest, it's a worrying idea! At the moment we are struggling to understand why the focusing works in a particular way under certain circumstances, and without that understanding it's hard to understand or fix problems. If you start combining the scores calculated in different ways to make some sort of blended score then you end up with even more complexity :( That's even before you have to start thinking about how to combine those scores - what weightings/scalings? Are they fixed or variable or dynamic?

My preference is to find and fix whatever gremlins are causing the current system to trip up I think.

cheers,

Robin
Borodog
Posts: 487
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#33

Post by Borodog »

Ok; I guess I wasn't thinking about trying to calculate a blended score so much as just calculating and plotting scores from all 3 methods and perhaps letting the user pick one to focus to, if some are obviously better than others. Like display them as red, green, and blue perhaps.

By the way, I thought of a 4th focus metric that might be useful for planetary, which is simply the number of pixels excluded by the black level. At critical focus that should be maximized. Might be worth testing to see how it performs.
User avatar
admin
Site Admin
Posts: 17540
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: A Couple of small feature requests

#34

Post by admin »

Hi,

yeah, the idea of pixels excluded by the black level is kind of 'FWHM' for planets - you are trying to measure how much the planet is being spread out by the poor focus. I think you would have to have the selection area around the whole planet and it would need to stay there otherwise movement/seeing would change the score as different parts drifted through the selection area.

cheers,

Robin
Borodog
Posts: 487
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#35

Post by Borodog »

Yes; you'd have to surround the whole planet and not run off the edge. That's how I've been using the focus tools all along, because it never occurred to me to try to keep a tiny focus box inside of a planet, especially because of the image shift when the focuser moves (SCT).
Borodog
Posts: 487
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#36

Post by Borodog »

More autofocus disasters tonight. I tried to use edge detection, restrict the focus box to inside the planet, and use planet stabilization. SharpCap rolled straight through critical focus, and the worse the focus got, the better the score was. It was the same when I expanded the focus box to surround the entire planet.
focus_disaster_1.png
focus_disaster_1.png (644.8 KiB) Viewed 1263 times
focus_disaster_2.png
focus_disaster_2.png (597.79 KiB) Viewed 1263 times
I reverted to Fourier Detail method again, box larger than the planet and eventually just ended up manually focusing.

This was in 4.1.
User avatar
admin
Site Admin
Posts: 17540
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: A Couple of small feature requests

#37

Post by admin »

Hi,

could the upper graph be explained by SCT mirror shift or the planet moving with respect to the selection box - I can see that the bottom right corner of the selection box is starting to be outside the planetary disk, so I am wondering if the rise in contrast has come from the transition from light planet to dark background creeping in to the selection area?

cheers,

Robin
Borodog
Posts: 487
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#38

Post by Borodog »

It did the same thing whether the focus box was inside or outside the planet. Planet stabilization neutralized any image shift during focusing.
User avatar
admin
Site Admin
Posts: 17540
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: A Couple of small feature requests

#39

Post by admin »

Ok, useful info...

still got my thinking hat on about how that could happen!

cheers,

Robin
Borodog
Posts: 487
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#40

Post by Borodog »

Maybe I should give the intensity method a try. Thinking about it more, it should work whether or not the image is grainy, no?

But there has to be something strange with the "edge detection" method compared to what Autostakkert does. You say the method is similar, based on the Laplacian, but there is no way that Autostakkert would mark those images in my screen grabs as the highest quality, ever.

Can you detail what *exactly* the edge detection method is doing, mathematically?

One thing that Autostakkert does is bin the image before quality scoring it, using the "Noise Robust" value, which my understanding from Emil is literally just binning. The general advice I have seen, and it works well for me, is to leave this set to 6, i.e. 6x6 binning, regardless of seeing or SNR, or whether the target is lunar or planetary. Are you binning before calculating the focus score? If not, can you test that on the data I sent you?

One thing that would potentially mess up the scoring would be if there were some normalization built in that tried to adjust for brightness. I think that would be a mistake. Autostakkert scores brighter images as higher quality all else being equal, and people complain about it under certain situations, i.e. imaging when there is variable transparency or the sky background level is changing quickly (twilight), but I believe it's a feature under constant transparency and lighting conditions, as an in-focus image will be brighter than an out of focus image. Hence Autostakkert is scoring BOTH the contrast via the Laplacian and the absolute brightness at the same time.

For what it's worth, I recently when through an exercise trying to get PIPP's quality scores to behave more like Autostakkert's, and I was fairly successful. The default settings for the Ninox based quality scoring were pretty bad, but you could set them to mimic Autostakkert's better, and get similar results. That also came down to simply binning the image, in that case 5x5 because it wouldn't allow 6x6.
Post Reply