Author Topic: Better image weighting with Subframe Selector  (Read 2757 times)

Offline robyx

  • Newcomer
  • Posts: 47
Better image weighting with Subframe Selector
« on: 2019 July 17 07:26:06 »
Hi all,

I've read many posts in several forums talking about a formula that you can use to compute the weights to be used during the Image Integration step. The (probably well known) formula is:

20*(1-(FWHM-FWHMMinimum)/(FWHMMaximum-FWHMMinimum))+20*(1-(Eccentricity-EccentricityMinimum)/(EccentricityMaximum-EccentricityMinimum))+10*(SNRWeight-SNRWeightMinimum)/(SNRWeightMaximum-SNRWeightMinimum)+50

where the relative weights (20, 20, 10) can be changed and determine the contribution of the FWHM, eccentricity and SNR to the final weight.

My question is about the reliability of this formula: does it really work? is it substantially better than weighting subs just using the noise estimation? Does is work better if the range changes from 50-100 to maybe 30-100 or 10-100?

Moreover, I have a doubt about applying this formula BEFORE the registration or AFTER the registration: the registration itself could increase the noise because of the introduction of some artifacts so I assume that it would be worth to apply it to the registered images in order to take into account also this additional noise (at the end registered images are the one to be integrated). Someone could have different opinion such that the real noise should be measured before registration so the formula should be applied before.

Would anyone share its experience on using this formula and opinions about the improvements achieved?

Many thanks,
Roberto

Offline Dvelledge

  • Newcomer
  • Posts: 8
Re: Better image weighting with Subframe Selector
« Reply #1 on: 2019 July 21 07:54:56 »
I weight before the SA but if you weight after SA, you will be comparing images that actually were able to be star aligned so this would seem to be better.  This is a good point.  I have automated my calibration and II process  and it runs every morning automatically using  JavaScript but does measurements before SA.  I might need to change this and do it twice.   What I do with SS is the following...

1. reject frames that are 2.5 SD away from mean in the wrong direction for SNR, ECC, FWHM, and # of stars.   So for example, if we have 200 as the average # of stars with an SD is 20, if we get a frame with say 50 stars, it automatically rejects the frame.

2. I select reference frames for Reg and II based on  attributes against the 4 characteristics using a formula similar to the weights you show but looking for the best frames.  For example, for the Registration reference frames, I use look the best frame against 50% FWHM, 25% Ecc, 25% # of stars.

3. I weight all the frames based on the formula you have but add # of stars as a choice to weight against.   the number of stars basically takes care of cloudy images.... 

this is all automated and I do it before sa because I need the measurements to auto select the reference frame for registration..   I think if you had a choice to weight frames before or after SA, you would weight after SA because you would remove the data from the frames you could not register which should not really go into the calculation.

Don

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Better image weighting with Subframe Selector
« Reply #2 on: 2019 July 22 04:47:39 »
Hi Roberto,

Quote
I have a doubt about applying this formula BEFORE the registration or AFTER the registration

Image registration necessarily interpolates pixel data to perform the image alignment task. Since interpolation acts basically as a low-pass filter, if you measure registered images — not just with the above formula; this applies to any image analysis task — you won't be evaluating the original calibrated data, but a smoothed version of them. In addition, interpolation does not work equally for all of the registered frames (for example, registration reference frames are not interpolated), and will generate different aliasing artifacts depending on specific geometric transformations (for example, aliasing can be worse for small rotation angles). For all of these reasons, registered data should never be used, in general, to perform comparative analyses, such as quality and noise evaluation. So the brief answer to your question is, in general terms, "before".
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline robyx

  • Newcomer
  • Posts: 47
Re: Better image weighting with Subframe Selector
« Reply #3 on: 2019 July 22 07:21:16 »
Hi Roberto,

Quote
I have a doubt about applying this formula BEFORE the registration or AFTER the registration

Image registration necessarily interpolates pixel data to perform the image alignment task. Since interpolation acts basically as a low-pass filter, if you measure registered images — not just with the above formula; this applies to any image analysis task — you won't be evaluating the original calibrated data, but a smoothed version of them. In addition, interpolation does not work equally for all of the registered frames (for example, registration reference frames are not interpolated), and will generate different aliasing artifacts depending on specific geometric transformations (for example, aliasing can be worse for small rotation angles). For all of these reasons, registered data should never be used, in general, to perform comparative analyses, such as quality and noise evaluation. So the brief answer to your question is, in general terms, "before".

Hi Juan,

Thanks for this clarification. Here my doubt becomes even higher.

Let's assume that I'm mixing two frames A and B, being A the reference. You're saying that transformation applied to B generates B* for which the evaluation of FWHM, eccentricity and SNR, could significantly change for a set of circumstances.

Said that, since I'm going to integrate the signal in B* including the artifacts, why should I really care about B?
Calibration, Cosmetic Correction, Debayer and Registration are just preparatory steps that generates the family of images to be integrated, in each step each destination image is different from its source. I don't see anything special in registration.

Should I really weight more B* just because B was better? Intuitively I would say no, I would take into account its degradation and weight B* less exactly because of its artifacts.

That's where my confusion comes from.