Author Topic: Drizzle in PI  (Read 21729 times)

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Drizzle in PI
« on: 2009 December 16 21:39:35 »
Hello.
Just look animation. :)
Best regards,
Nikolay.

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: Drizzle in PI
« Reply #1 on: 2009 December 17 01:30:28 »
Hi Nikolay,

Looks great. But what's going on?

Cheers
         Simon

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Drizzle in PI
« Reply #2 on: 2009 December 17 02:04:14 »
Hello Simon.
It's exactly no more then on animation.
Just two way of processing:
1. Registration > Integration > Resample to 300% (Bicubic B-Spline).
2. Resample to 300% (Nearest Neighbour up sample) > Registration > Integration.

I do it for restore resolution of H-alpha from Bayer matrix. I use only red pixels. The images was taken on Canon 40Da + EF135/2L(5).

Direct integration without re-sample "1x" and "Drizzle 3x" in attachment. You can try different methods of interpolation to "1x" and compare with my "Drizzle 3x".  ;)

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: Drizzle in PI
« Reply #3 on: 2009 December 17 06:02:09 »
Nickolay,

Very nice increase in resolution. How many images did you stack?

Max


Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Drizzle in PI
« Reply #4 on: 2009 December 17 06:44:45 »
Max, really i took too much images. I was too lazy to chose other object, so it's sum of 63x5min.

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: Drizzle in PI
« Reply #5 on: 2009 December 17 08:55:44 »
Did you use a script?
 That's a lot of images to upsample and then save.

Max

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Drizzle in PI
« Reply #6 on: 2009 December 17 09:04:18 »
Did you use a script?
 That's a lot of images to upsample and then save.
ImageContainer+Resample only.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Drizzle in PI
« Reply #7 on: 2009 December 17 17:52:55 »
Hi Nikolay,

Extremely interesting. Thank you for posting this comparison. By using nearest neighbor interpolation, your method generates a discrete distribution similar to a drizzle combination. Am I right here? Have you tried with different interpolation algorithms?

We could make a small video tutorial demonstrating this technique. What do you think?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Drizzle in PI
« Reply #8 on: 2009 December 17 21:13:44 »
Hello Juan.
By using nearest neighbor interpolation, your method generates a discrete distribution similar to a drizzle combination. Am I right here?
I think, Yes. You are right.

One more idea: Integrate up-sample to alignment. So I want ask you to add nearest neighbor interpolation to StarAlignment. I tried up-sample one image and use as reference. It's work, but StarAligment use Bicubic Spline ( it's non linear interpolation? ), so i got not so good result.

Quote
We could make a small video tutorial demonstrating this technique. What do you think?
Yes, please do it. Do you need any files from me?

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Drizzle in PI
« Reply #9 on: 2009 December 18 02:25:24 »
One more test. Now full resolution of bayer. :)

PS I use IRIS because PI Debayer don't work with ImageContainer :P

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Drizzle in PI
« Reply #10 on: 2009 December 18 03:05:26 »
Hi Nikolay,

Quote
One more idea: Integrate up-sample to alignment. So I want ask you to add nearest neighbor interpolation to StarAlignment.

Count with it implemented in StarAlignment (a new version will be released very soon).

However, instead of nearest neighbor I'll implement a binning upsample. You can try it with the IntegerResample process. A nearest neighbor interpolation is a disaster with even magnification factors, due to the fact that there is no central pixel in a neighborhood of even size. Along with that, with odd upsampling ratios the nearest neighbor algorithm will shift your images one pixel toward the top left corner. An integer binning doesn't have any of these problems.  I have attached a comparison between both algorithms.

Quote
but StarAligment use Bicubic Spline ( it's non linear interpolation? ), so i got not so good result.

Sure, bicubic spline interpolation is linear. Pixel interpolations are implemented as convolutions in PixInsight, and convolution is a linear operation. The fact that the interpolation function is nonlinear (as a cubic function) has nothing to do with the linearity of the interpolation with respect to pixel values (i.e., to the underlying relation between pixel values and incident light). In the interpolated image, each pixel is a linear combination of a set of adjacent source pixels.

In your technique, only a discrete interpolation can work. This is because real-valued interpolations always cause some smoothing in the interpolated image. Smoothing happens because the interpolation function, which must be sampled in at least a 3x3 kernel, correlates adjacent pixels. This is just what you don't wan't: your drizzling technique requires uncorrelated source pixels.

Quote
Do you need any files from me?

Indeed. As you have already created this technique, you have a data set that works well, as you've demonstrated. I think this technique is elegant and efficient. It is just the kind of things that I love to see implemented in PixInsight :)
« Last Edit: 2009 December 18 03:43:50 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Drizzle in PI
« Reply #11 on: 2009 December 18 03:42:17 »
Quote
One more test. Now full resolution of bayer. :)

Very nice! :)

Quote
PS I use IRIS because PI Debayer don't work with ImageContainer :P

Ahem, Sander?  >:D

Well I forgive you because you've used the DrawSignature script  ;D
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: Drizzle in PI
« Reply #12 on: 2009 December 18 07:05:10 »
One more question. Will data rejection work properly when intergrating the upscaled images?

Max

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: Drizzle in PI
« Reply #13 on: 2009 December 18 12:17:39 »
Hi

I have had a play and I can not get the same improvement in my images ( Like non at all )

Mind you it was fun playing with 700meg image files  ( I need a new laptop )

I was using sxvf M25 3000 x 2000 colour files and imaged at .8 arc sec per pix 

Got any ideas


Regards Harry
Harry Page

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Drizzle in PI
« Reply #14 on: 2009 December 18 12:47:07 »
Quote
Will data rejection work properly when intergrating the upscaled images?

Hi Max,

If you use IntegerResample (or nearest neighbor interpolation with an odd upsampling factor, 3, 5, ...), rejection will work exactly as it does with the original (non-upsampled) data.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/