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

Trick for removing Newton's Rings / Fringes from images

This topic has been archived. This means that you cannot reply to this topic.
21 replies to this topic

#1 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:30 PM

Hi folks -

Here's a workflow for getting rid of interference fringes in solar images.

Let me start off by saying that the best way to remove interference fringes / Newton's Rings from images is to use a tilt device to correct for the problem at its source.

However, if you have an image that you like and it has an objectionable case of interference fringes, then this approach should help ameliorate the problem.

 

1. Download and install ImageJ (freeware from NIH) - https://imagej.nih.g...j/download.html

 

2. Launch ImageJ and open the offending image (you can drag and drop image files such as FITS or PGM onto the ImageJ window to open them) - Here's a single frame from back in July of 2013:
UKrku3r.png



#2 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:31 PM

3. Adjust the screen stretch so you can easily see the fringes (CTRL+Shift+C):

hcDpSUc.png



#3 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:31 PM

4. Select a portion of the image with obvious fringes and duplicate it:

qZXBytI.png



#4 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:32 PM

5. Perform a Fourier Transform on that selected portion of the image ("FFT" is "fast fourier transform" and it's just a particular algorithm for doing the transform):

SNOhZul.png



#5 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:32 PM

6. This is what the FFT result looks like for the small image portion:

x1nP36y.png

 

**Note the dimensions of the FFT result image are 1024x1024** - This will be important later. See the top left corner of the FFT result window for dimensions. The dimensions of the FFT result will always be the nearest power of 2 that is larger than the image you performed the FFT on. In this case, we performed the FFT on a 627x516 image, so a 1024 square is the largest power of 2 dimension that would work. You don't need to understand this, just note that it's 1024...



#6 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:33 PM

7. Now zoom in on the middle of this image and adjust the screen contrast so you can see any bright spots (use the + and - keys to zoom in and out on wherever you point with the mouse). Obvious bright spots (other than the center of the image) correspond to strong sinusoidal signals in the image (i.e. fringes). The exact position of the bright spots depends on the angle and spacing (spatial frequency) of the fringes. Tighter spaced fringes will be farther from the center - wider fringes will be closer in.

gF1kXOL.png



#7 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:33 PM

8. Look for bright spots or bright regions, like these:

1mAvEzn.png



#8 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:34 PM

9. If you need a hint about where to look, look at the angle of the fringes in your original image. The angle they make with vertical will be the complement of the angle from horizontal along which the bright spots lie in the FFT image:

wigjjQE.png

FxLK4ZP.png



#9 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:35 PM

10. Place a selection box around the areas of the FFT that you have identified as potential sources of your fringes, and hit the Backspace key to delete them to black. 2D FFTs like this have 4 quadrants, and opposite quadrants are symmetrical, so you need to make the same deletions on both sides of the FFT image as shown below. This does not have to be perfect... You can freehand the selection box sizes and locations - it is very forgiving:

UXXwRNJ.png



#10 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:35 PM

11. Now perform an Inverse FFT on that edited FFT image to see if you removed the fringes. In this example I made two deletions - when you are starting off, just do one at a time to see which ones are actually contributing to your fringes - sometimes there are multiple components:

MBIinFL.png



#11 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:36 PM

12. If you picked the right areas, the result should be pretty much fringe-free (original on the Left, edited version on the Right):

Pjm0yxv.png



#12 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:37 PM

13. If you are happy with that result, go back to your edited FFT window and figure out the position of the spots you erased relative to the middle of the image (use a rectangular selection, and watch the coordinates reported in the ImageJ status bar - double Red box below - again, note the size of your FFT window, double yellow box below). In this case, the rough center of one area I deleted is (26,8) pixels away from the center of the image.

AzeNFqw.png



#13 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:37 PM

14. Now go back to your original image, and perform an FFT. It will look like this, and unless your whole image is filled with fringes it will not be easy to eyeball where the local maxima are in the FFT (this is why you start off with a small area that has very obvious fringes - because it's often hard to see where they are in the FFT of the full image):

ncEGP26.png



#14 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:38 PM

15. Note the dimensions of your new FFT result. In my case it's 4096x4096. Remember that the FFT window for the small region of interest was 1024. So the location of the areas that I want to delete in my new full size FFT window will be four times farther from the center of the image - (26,8) x 4 = (104,32). So zoom in the the center of the image and make a roughly (104,32) selection box and then delete the region at the far vertex. Do this in both quadrants. You might see an area at the vertex that appears to be a local maximum, or it might just look like noise... Either way, make a small selection box (guesstimate the size) and Backspace to clear it to black:

rVbtj6p.png



#15 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:39 PM

16. Now perform an inverse FFT and see if you got rid of the fringes. The result is improved quite a bit in this example. If you still see fringes in your full image, but you know you didn't see fringes in your small cropped test image, go back to the FFT of your full image and delete a slightly larger area around the spot you previously deleted. :

QnLaqMp.png



#16 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 02:39 PM

The End.

 

The sample image here obvious has some other flat-field issues (brightness around the edges caused by CCD cover glass reflections, and some uneven illumination probably caused by the etalon not being well adjusted). You can get rid of quite a bit of that by further editing of the FFT, but I will leave that for another walkthrough.

 

Hopefully this is useful to someone.



#17 jbalsam

jbalsam

    Viking 1

  • *****
  • topic starter
  • Posts: 978
  • Joined: 06 Jul 2012

Posted 09 October 2017 - 03:33 PM

Here's an example with a worse case of fringing. In this image, there are two distinct fringe patterns. One low frequency the is almost horizontal in orientation, and the other a very high frequency which seems to have a semi-circular pattern (changing from near vertical in the upper right corner to about diagonal in the lower left corner). The resulting image is quite a bit better after about 20 minutes of playing with it. Not perfect (again, it's better to correct the problem at the source), but better than when we started.

 

Between the two images is a difference image (Original minus Result) so you can see what the mathematical difference is between the images after playing with the FFT.

 

bECzEbl.png



#18 Glenn Graham

Glenn Graham

    Mariner 2

  • *****
  • Posts: 276
  • Joined: 26 Feb 2008

Posted 09 October 2017 - 03:56 PM

Thank you for taking the time to write this up Josh. Really interesting. I have a tilt device but it is insufficient when I use a 3x barlow. I'll have to give this a try next time.



#19 zippeee

zippeee

    Ranger 4

  • -----
  • Posts: 358
  • Joined: 27 Dec 2010

Posted 09 October 2017 - 06:22 PM

Indeed interesting but looks like a lot more work than doing a flat. Though this could be useful for those time I forget to take one, which is more often than not.



#20 RickV

RickV

    Vanguard

  • -----
  • Posts: 2,474
  • Joined: 17 May 2013

Posted 09 October 2017 - 07:35 PM

Quite useful and interesting too!  Thanks!



#21 RickV

RickV

    Vanguard

  • -----
  • Posts: 2,474
  • Joined: 17 May 2013

Posted 03 November 2017 - 04:09 AM

Hi Josh...

I downloaded ImageJ and I'm going to give this a go.

The approach of working in the Fourier domain appeals to me... kind of like the optical information processing that I used to do - way back when!  Thanks!!  Whoowee... can't wait to give this a try!



#22 RickV

RickV

    Vanguard

  • -----
  • Posts: 2,474
  • Joined: 17 May 2013

Posted 08 November 2017 - 06:43 PM

Hey Josh,

 

I tried this on one of my H-alpha solar images with about 7 diagonal bands at 45 degrees across the image due to misalignment of focuser with the etalon.  While not a complete success, I was about 60% better.  I just need more practice and knowledge of what's going on.  For knowledge, I think I'll prepare some phony images with high contrast (e.g. White bands against dark grey) and play.

 

This ImageJ is a powerful program... thank you so much for pointing this out. waytogo.gif




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