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

How to simulate Undersampled Images - Drizzling

  • Please log in to reply
18 replies to this topic

#1 Daniel Dance

Daniel Dance

    Eastern Voltage Research, LLC

  • *****
  • Vendors
  • topic starter
  • Posts: 1662
  • Joined: 08 Jun 2016
  • Loc: Philadelphia, PA

Posted 11 February 2019 - 08:54 AM

I'm putting together a presentation on Drizzling next month for my local astrophotography club.

 

I'd like to show a worst case example of what severely undersampled stars look like.

Is there a method I can  use to simulate this undersampling using my own images?

 

I do have 50mm lens images of my own using an ASI1600, but even those images have pretty decent looking stars despite being very undersampled.

Thanks

Dan

 

 



#2 zakry3323

zakry3323

    Viking 1

  • *****
  • Posts: 939
  • Joined: 11 Apr 2016
  • Loc: Pittsburgh

Posted 11 February 2019 - 09:05 AM

Looks like some folks posted some shots here https://www.cloudyni...lgorithm-yesno/



#3 Midnight Dan

Midnight Dan

    Voyager 1

  • *****
  • Posts: 13165
  • Joined: 23 Jan 2008
  • Loc: Hilton, NY, Yellow Zone (Bortle 4.5)

Posted 11 February 2019 - 09:10 AM

It's easy to simulate if you have Photoshop or something similar.  Just reduce the size of your image, and set the scaling algorithm to "nearest neighbor".  If it's too small to see the undersampling clearly, then just enlarge the image again afterwards.  Here's one where I had an image about 1200 pixels across, and I reduced it to 200 pixels across with nearest neighbor, then increased it to 800 pixels across, also with nearest neighbor:

 

Undersampled.jpg

 

-Dan


Edited by Midnight Dan, 11 February 2019 - 09:11 AM.

  • zakry3323, 2ghouls and OldManSky like this

#4 johnsoda

johnsoda

    Apollo

  • *****
  • Moderators
  • Posts: 1010
  • Joined: 30 May 2014
  • Loc: SW Ohio, USA

Posted 11 February 2019 - 09:17 AM

Not sure if you’re looking for this, but here’s a real-world example where drizzling worked. 

 

https://www.cloudyni...orks/?p=8908428

 

Along with the obvious improvement in the Horsehead, note the small stars before and after. 


Edited by johnsoda, 11 February 2019 - 09:20 AM.


#5 Daniel Dance

Daniel Dance

    Eastern Voltage Research, LLC

  • *****
  • Vendors
  • topic starter
  • Posts: 1662
  • Joined: 08 Jun 2016
  • Loc: Philadelphia, PA

Posted 11 February 2019 - 09:24 AM

Not sure if you’re looking for this, but here’s a real-world example where drizzling worked. 

 

https://www.cloudyni...orks/?p=8908428

 

Along with the obvious improvement in the Horsehead, note the small stars before and after. 

Which is very weird.

 

I took the same photos using the same camera and lens, and I don't get square looking stars.  In fact, I find little difference between the drizzled and non-drizzled version other than massive file size.

 

How are you preprocessing your image?



#6 johnsoda

johnsoda

    Apollo

  • *****
  • Moderators
  • Posts: 1010
  • Joined: 30 May 2014
  • Loc: SW Ohio, USA

Posted 11 February 2019 - 09:29 AM

Well, if you are resolving small stars in an image, once the star size is on the order of the pixel size, you’ll get pixelation.  In other words, at some zoom level you can’t have round stars. I can’t make a round star out of a couple of square pixels. Have you zoomed in to the pixel level?  Do you have stars with a size on the order of the pixel size? 



#7 johnsoda

johnsoda

    Apollo

  • *****
  • Moderators
  • Posts: 1010
  • Joined: 30 May 2014
  • Loc: SW Ohio, USA

Posted 11 February 2019 - 09:33 AM

Those stars are about as round as you can get at that size scale relative to the pixel scale. That’s where drizzling (and dithering and focus) really helps. 


Edited by johnsoda, 11 February 2019 - 09:35 AM.


#8 Daniel Dance

Daniel Dance

    Eastern Voltage Research, LLC

  • *****
  • Vendors
  • topic starter
  • Posts: 1662
  • Joined: 08 Jun 2016
  • Loc: Philadelphia, PA

Posted 11 February 2019 - 09:40 AM

Well, if you are resolving small stars in an image, once the star size is on the order of the pixel size, you’ll get pixelation. In other words, at some zoom level you can’t have round stars. I can’t make a round star out of a couple of square pixels. Have you zoomed in to the pixel level? Do you have stars with a size on the order of the pixel size?


Its probably the fact you have a much better focus than I do. Since my focus isnt as good, my stars are larger and do fill up more adjacent pixels.

#9 johnsoda

johnsoda

    Apollo

  • *****
  • Moderators
  • Posts: 1010
  • Joined: 30 May 2014
  • Loc: SW Ohio, USA

Posted 11 February 2019 - 09:46 AM

Maybe.  To be honest, I try to get my focus as good as possible, mostly because of habits from doing imaging work on the job, but at the eyeballing scale, which is what I really care about, you can’t really see any difference between yours and mine. I’m more interested in the aesthetics.  I don’t go into the Louvre with a magnifying glass, ready to pounce on Da Vinci for some small flaw in the Mona Lisa.


Edited by johnsoda, 11 February 2019 - 09:47 AM.


#10 johnsoda

johnsoda

    Apollo

  • *****
  • Moderators
  • Posts: 1010
  • Joined: 30 May 2014
  • Loc: SW Ohio, USA

Posted 11 February 2019 - 09:48 AM

I do find drizzling a fascinating and clever technique, though. 



#11 Daniel Dance

Daniel Dance

    Eastern Voltage Research, LLC

  • *****
  • Vendors
  • topic starter
  • Posts: 1662
  • Joined: 08 Jun 2016
  • Loc: Philadelphia, PA

Posted 11 February 2019 - 10:05 AM

You are right David.

I was looking at my 200mm and 135mm Ha images.

 

When I zoom in to the horsehead with the 50mm lens, I do see a significant difference between non-drizzled and drizzled.

It matches what you have in your post.



#12 johnsoda

johnsoda

    Apollo

  • *****
  • Moderators
  • Posts: 1010
  • Joined: 30 May 2014
  • Loc: SW Ohio, USA

Posted 11 February 2019 - 10:15 AM

You are right David.

I was looking at my 200mm and 135mm Ha images.

 

When I zoom in to the horsehead with the 50mm lens, I do see a significant difference between non-drizzled and drizzled.

It matches what you have in your post.

That’s good. Unfortunately, people sometimes use “undersampled” as a perjorative. The fact is that if you’re going to do widefields, unless you do a mosaic or until they develop a 100,000 X 75,000 pixel sensor, you’re going to be undersampled. Dithering and drizzling can definitely help. 



#13 bobzeq25

bobzeq25

    Hubble

  • *****
  • Posts: 16760
  • Joined: 27 Oct 2014

Posted 11 February 2019 - 11:42 AM

Getting back to the question.  <smile>

 

You can bin pixels in software.  In PixInsight, the process is "Resample".  I believe StarTools uses a BIN module.   Both can do any desired degree of downsampling, it does not have to be an integer.

 

Resample stuff all the time for posting here.


Edited by bobzeq25, 11 February 2019 - 11:45 AM.


#14 Jon Rista

Jon Rista

    ISS

  • *****
  • Posts: 23558
  • Joined: 10 Jan 2014
  • Loc: Colorado

Posted 11 February 2019 - 12:14 PM

It should be noted that downsampling better-sampled data is not going to quite be the same as actually imaging undersampled. You will want to pay attention to the interpolation algorithm. Nearest neighbor will certainly produce the "Scratchiest" results, with the worst noise profile...but, it may not be the best way to simulate more poorly sampled original results. 

 

It might be better to try to convolve the image slightly, to spread the signal out over a slightly larger area, then downsample with simple bilinear. That might better simulate the effect that larger pixels have when paired with most wider field scopes (which usually have smaller apertures, which also means they have more diffraction, which will blur the signal a bit more as well.) 

 

Even the worst undersampling will still usually result in stars being 2-3 pixels across at the halo (FWHM may still only be a pixel.) 


  • bobzeq25 likes this

#15 johnsoda

johnsoda

    Apollo

  • *****
  • Moderators
  • Posts: 1010
  • Joined: 30 May 2014
  • Loc: SW Ohio, USA

Posted 11 February 2019 - 01:04 PM

What would be interesting would be to take a high resolution image, then downsample it to pixelate the stars.  Then go back to the original image, shift it by a pixel by a rotation in one or both directions, and downsample it again. If you were really ambitious and had the right software, you could do a nice animation by rotating the high resolution image randomly and down sampling. This would illustrate dithering and you could explain how you can get better resolution by dithering and drizzling. All drizzling does, simplistically, is somewhat make up for the shortcomings of having discrete pixels when your actual optical image has better spatial resolution than your sensor (the horrible undersampling - shudder!)

 

Edit:  I meant "rotation" in the sense of moving all pixels to the right or left or up or down, not actually rotating in the image by some angle.  Sorry, I was in my image-analysis frame of mind.


Edited by johnsoda, 11 February 2019 - 01:11 PM.


#16 johnsoda

johnsoda

    Apollo

  • *****
  • Moderators
  • Posts: 1010
  • Joined: 30 May 2014
  • Loc: SW Ohio, USA

Posted 11 February 2019 - 03:04 PM

Well, as I often say, talking about imaging is like dancing about architecture.  Here’s a simple example of a dithering simulation I put together. 

 

https://www.dropbox....05 PM.mp4?dl=0 

 

I realize the topic is drizzling, but without good dithering you can’t drizzle. 


Edited by johnsoda, 11 February 2019 - 03:08 PM.


#17 Daniel Dance

Daniel Dance

    Eastern Voltage Research, LLC

  • *****
  • Vendors
  • topic starter
  • Posts: 1662
  • Joined: 08 Jun 2016
  • Loc: Philadelphia, PA

Posted 11 February 2019 - 03:30 PM

Good info.

 

Yeah, I just need something very simple to flash up on an overhead for a few seconds as an example of what "undersampled" would look like.  Most of the people in our club meetings are beginners, so they won't understand what "undersampling" means without a photo to explain it.

 

Thanks again



#18 johnsoda

johnsoda

    Apollo

  • *****
  • Moderators
  • Posts: 1010
  • Joined: 30 May 2014
  • Loc: SW Ohio, USA

Posted 11 February 2019 - 03:59 PM

Sometimes the 1D situation is easier for folks to understand. You could gin up a sine wave, then show what happens if you sample at twice the wavelength of the wave, where you can’t see the waveform at all, to where you’re sampling at maybe a tenth of the wavelength, where you can see the waveform, albeit stairstepped. Actually, undersampling is easier to show than oversampling. For oversampling, you get into what your measurement capability for the signal (“seeing”j is and pushing your sampling to well below that, which is wasted effort.  



#19 bobzeq25

bobzeq25

    Hubble

  • *****
  • Posts: 16760
  • Joined: 27 Oct 2014

Posted 11 February 2019 - 06:34 PM

Resampled 25% in PI, resized in Irfanview.

 

well sampled.jpg

 

undersampled.jpg


Edited by bobzeq25, 11 February 2019 - 06:38 PM.



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