Author Topic: Sharpening with MLT and deconvolution feedback  (Read 1093 times)

Offline gamempire

  • Newcomer
  • Posts: 16
Sharpening with MLT and deconvolution feedback
« on: 2019 March 17 21:20:21 »
Hi All,

I've been trying to get the hang of sharpening my data a bit better for a 2x2 narrowband mosaic of the Carina Nebula I'm working on. Most of the basic processing workflow is down pat. My background noise reduction for narrowband images seems to be better than my LRGB images. Kayron's PixInsight guides are always wonderful, but I've been second guessing my results when it comes to deconvolution and MLT. This is the first real image I've spent a lot of time trying to learn how to sharpen, and I guess what I'm looking for is a bit of reassurance that these are the results I *should* be getting.

The one thing that I do want to share is that the stars in this hydrogen alpha aren't as round as they could be in two of the mosaic frames, but it isn't an issue with my OIII and SII data. I did give morphological transform a try to fix it, but because not all of the stars were elongated, I wasn't getting great results, so I figured to leave well enough alone.

I definitely see a positive difference between the original image and the MLTs and 10 iteration deconvolution, but as you may see in the areas I highlight in the last image, I'm a little worried about the what looks like de-ringing around dark areas that aren't stars, even in the lightest of sharpening.

Any feedback would be greatly appreciated  :D



I'm testing it out on the following preview area, which has a nice mix of dark, light, and stars.



This is the mask I'm using. Its a range mask with a star mask subtracted from it. Below it is the actual range mask minus the star mask
(but not the exact same size as this preview), and the full image with the range mask minus the star mask.






These are my settings for Multiscale Linear Transform Test 1



This is the result for Test 1



Multiscale Linear Linear Transform Test 2



Test 2 Results




Now here are my settings for Deconvolution, where I ran it through 10 iterations for my first test.



10 Iterations



And another test with deconvolution, with 20 iterations.


And here is 50, which is clearly overkill and starts oversharpening a ton.
However, I've highlighted a few of the areas that concern me in all of my tests.




Offline STEVE333

  • PixInsight Addict
  • ***
  • Posts: 231
    • sk-images
Re: Sharpening with MLT and deconvolution feedback
« Reply #1 on: 2019 March 17 22:38:10 »
To my old eyes even the 50 iteration Deconvolution looks OK. I don't see the problems about which you are concerned.

Looks like it's going to be a beautiful mosaic when you are done.

Steve
Telescopes:  WO Star71 ii, ES ED102 CF
Camera:  Canon T3 (modified)
Filters:  IDAS LPS-D1, Triad Tri-Band, STC Duo-Narrowband
Mount:  CEM40 EC
Software:  BYEOS, PHD2, PixInsight

http://www.SteveKing.Pictures/

Offline gamempire

  • Newcomer
  • Posts: 16
Re: Sharpening with MLT and deconvolution feedback
« Reply #2 on: 2019 March 18 13:39:08 »
To my old eyes even the 50 iteration Deconvolution looks OK. I don't see the problems about which you are concerned.

Looks like it's going to be a beautiful mosaic when you are done.

Steve

Thanks for the comments and feedback Steve, its greatly appreciated and helps reassure me that I was on the right track.

The issue I was concerned with on the 50 deconvolution was around the two "pillars" of gas towards the bottom right of the image. If you look around the smaller one thats in the 10 o'clock position of the pillar with the box around it, you can see an outline around that pillar of gas that looks similar to the ringing one would see from deconvolution in the stars.

Maybe I'm just overanalyzing it because its my first attempt at spending a lot of time to sharpen an image; it probably wouldn't even be very visible after a narrowband color combination unless one were really looking for it. And I hope it won't be visible when I print it (cropped) for my best friend's birthday at 4 feet by 8 feet.

If you and the community would be so kind, could you look at my MLT and MMT noise reduction below? It was applied after 40 deconvolution iterations. I used to use multiscale median transform for my narrowband images to really smooth out the darker areas that tend to be noisy in narrowband images, but I tried it (it took 2+ hours to run) and it really canceled out the improvements from sharpening.

Thanks again,
Josh


MLT noise reduction with stretched lightness mask



MMT Noise Reduction with stretched lightness mask



Offline STEVE333

  • PixInsight Addict
  • ***
  • Posts: 231
    • sk-images
Re: Sharpening with MLT and deconvolution feedback
« Reply #3 on: 2019 March 18 22:13:50 »
Hi Josh - I looked really hard to try and see the "ringing" problem that is bothering you. I still don't see it. As far as I can see you are doing minimal sharpening with your Deconvolution, so, I wouldn't expect ringing problems.

As for the noise reduction:
1) To avoid "wiping out" any sharpening make sure to use a mask to protect the brighter areas. For NB work you can just make a copy of your linear image, stretch it, apply it to your unstretched image as a mask.
2) Try several small Previews (high and low signal areas) to make sure you aren't wiping out your sharpening. This can save you a lot of time.

Hope this helps.

Steve
Telescopes:  WO Star71 ii, ES ED102 CF
Camera:  Canon T3 (modified)
Filters:  IDAS LPS-D1, Triad Tri-Band, STC Duo-Narrowband
Mount:  CEM40 EC
Software:  BYEOS, PHD2, PixInsight

http://www.SteveKing.Pictures/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Sharpening with MLT and deconvolution feedback
« Reply #4 on: 2019 March 18 22:59:32 »
if you look at the areas inside the grey boxes, you can see some "worms" - bright, linear, slightly bulbous structures that are not present in the original image.

i think you may be able to avoid this simply by masking those lower SNR areas a little better. they do seem to be present in all of your different experiments - i have usually only seen them as deconvolution artifacts but i suppose they can be caused by any sort of sharpening.

rob

Offline gamempire

  • Newcomer
  • Posts: 16
Re: Sharpening with MLT and deconvolution feedback
« Reply #5 on: 2019 March 19 15:09:54 »
Hi Josh - I looked really hard to try and see the "ringing" problem that is bothering you. I still don't see it. As far as I can see you are doing minimal sharpening with your Deconvolution, so, I wouldn't expect ringing problems.

As for the noise reduction:
1) To avoid "wiping out" any sharpening make sure to use a mask to protect the brighter areas. For NB work you can just make a copy of your linear image, stretch it, apply it to your unstretched image as a mask.
2) Try several small Previews (high and low signal areas) to make sure you aren't wiping out your sharpening. This can save you a lot of time.

Hope this helps.

Steve


Steve: Thanks for the tip on using the linear image for the mask. Do you think it makes sense to clip the blacks a bit so the darker areas get more noise reduction? I've moved over to MLT instead of MMT for noise reduction, since it was still taking 15-20 minutes for a preview with MMT and I'm getting very similar results with MLT.

if you look at the areas inside the grey boxes, you can see some "worms" - bright, linear, slightly bulbous structures that are not present in the original image.

i think you may be able to avoid this simply by masking those lower SNR areas a little better. they do seem to be present in all of your different experiments - i have usually only seen them as deconvolution artifacts but i suppose they can be caused by any sort of sharpening.

rob


Rob: thanks for explaining what was going on with a better "technical" term in 'worms'. Thanks to using that term with some googling, I was able to find a really good guide by Jon Rista that really breaks down and explains how deconvolution works at https://jonrista.com/the-astrophotographers-guide/pixinsights/proper-use-of-regularized-richardson-lucy-deconvolution/. The issue was solved by simply adding a small value to global bright; I've posted 3 examples below with 100, 150 and 200 iterations with deconvolution. The only downside is that the guide is unfinished, and was only just beginning to explain regularization and using it to do noise reduction instead of doing it as an additional step. I did notice when I pushed it to 200 that I started to get a little worming again, so 150 is probably the sweet spot.

Thank you both again for your knowledge and feedback.

-Josh

100 iterations


150 iterations


200 iterations



Offline STEVE333

  • PixInsight Addict
  • ***
  • Posts: 231
    • sk-images
Re: Sharpening with MLT and deconvolution feedback
« Reply #6 on: 2019 March 19 15:58:54 »

[/quote]
Steve: Thanks for the tip on using the linear image for the mask. Do you think it makes sense to clip the blacks a bit so the darker areas get more noise reduction?
[/quote]

Josh - You can clip if you want to. The normal stretch done by transferring the STF stretch to HistogramTransformation normally works good. I forgot to mention that you need to invert the mask after it is applied so that the bright areas are protected while the dark areas get the noise reduction.

Steve
Telescopes:  WO Star71 ii, ES ED102 CF
Camera:  Canon T3 (modified)
Filters:  IDAS LPS-D1, Triad Tri-Band, STC Duo-Narrowband
Mount:  CEM40 EC
Software:  BYEOS, PHD2, PixInsight

http://www.SteveKing.Pictures/

Offline gamempire

  • Newcomer
  • Posts: 16
Re: Sharpening with MLT and deconvolution feedback
« Reply #7 on: 2019 March 19 21:38:40 »

Steve: Thanks for the tip on using the linear image for the mask. Do you think it makes sense to clip the blacks a bit so the darker areas get more noise reduction?
[/quote]

Josh - You can clip if you want to. The normal stretch done by transferring the STF stretch to HistogramTransformation normally works good. I forgot to mention that you need to invert the mask after it is applied so that the bright areas are protected while the dark areas get the noise reduction.

Steve
[/quote]

yep, already figured that out, thanks!

One more question for you or Rob: When building the external PSF for the stars, should I build a new one for each filter of the narrowband image, or can I safely get away with using the one I built from the Ha data?

-Josh

Offline STEVE333

  • PixInsight Addict
  • ***
  • Posts: 231
    • sk-images
Re: Sharpening with MLT and deconvolution feedback
« Reply #8 on: 2019 March 19 21:59:28 »
One more question for you or Rob: When building the external PSF for the stars, should I build a new one for each filter of the narrowband image, or can I safely get away with using the one I built from the Ha data?

-Josh

Josh - For my images there can be quite a difference in the star sizes in the R/G/B channels so I need to generate a separate PSF image for each channel. Your situation may vary.

However, there is a new script that automatically creates the PSF image for you which makes it very easy.

The script is located at:

SCRIPT/Render/PSFImage

Make sure the image you want (Ha, Oiii, etc.) is selected then open the script.
Using the default settings, click on Evaluate. When the Evaluation is done it will show a PSF graph and a picture of the PSF.
Click on Create and it will instantly create a PSF image.
Done.

Really easy to use and saves a lot of work.

Steve
Telescopes:  WO Star71 ii, ES ED102 CF
Camera:  Canon T3 (modified)
Filters:  IDAS LPS-D1, Triad Tri-Band, STC Duo-Narrowband
Mount:  CEM40 EC
Software:  BYEOS, PHD2, PixInsight

http://www.SteveKing.Pictures/

Offline gamempire

  • Newcomer
  • Posts: 16
Re: Sharpening with MLT and deconvolution feedback
« Reply #9 on: 2019 March 20 21:03:33 »
One more question for you or Rob: When building the external PSF for the stars, should I build a new one for each filter of the narrowband image, or can I safely get away with using the one I built from the Ha data?

-Josh

Josh - For my images there can be quite a difference in the star sizes in the R/G/B channels so I need to generate a separate PSF image for each channel. Your situation may vary.

However, there is a new script that automatically creates the PSF image for you which makes it very easy.

The script is located at:

SCRIPT/Render/PSFImage

Make sure the image you want (Ha, Oiii, etc.) is selected then open the script.
Using the default settings, click on Evaluate. When the Evaluation is done it will show a PSF graph and a picture of the PSF.
Click on Create and it will instantly create a PSF image.
Done.

Really easy to use and saves a lot of work.

Steve

Well isn't that script just dandy! Thanks for that tip as well Steve!

One more question: should I use the script on a nonlinear or linear image to generate the PSF? I saw advice going both ways, but was just curious on what you do.

Edit: So I ran the script on the nonlinear image with the default settings and got what appears to be a good PSF. But when I tried to run it on a linear image, that had its STF applied to the HistogramTransformation then stretched, it didn't detect any stars with the default settings.
« Last Edit: 2019 March 20 21:27:59 by gamempire »

Offline STEVE333

  • PixInsight Addict
  • ***
  • Posts: 231
    • sk-images
Re: Sharpening with MLT and deconvolution feedback
« Reply #10 on: 2019 March 20 21:44:03 »
Josh -

Deconvolution should always be run on the data while it is still Linear (no stretching). Therefore, the PSF needs to be for the stars in the Linear data. DO NOT STRETCH THE DATA BEFORE RUNNING THE PSFImage SCRIPT!!

I have used the script on Linear data without any problems so far, so, you shouldn't have a problem. I tried it on a Linear image both with/without the STF applied and it didn't make any difference. Worked both ways.

Steve
Telescopes:  WO Star71 ii, ES ED102 CF
Camera:  Canon T3 (modified)
Filters:  IDAS LPS-D1, Triad Tri-Band, STC Duo-Narrowband
Mount:  CEM40 EC
Software:  BYEOS, PHD2, PixInsight

http://www.SteveKing.Pictures/

Offline STEVE333

  • PixInsight Addict
  • ***
  • Posts: 231
    • sk-images
Re: Sharpening with MLT and deconvolution feedback
« Reply #11 on: 2019 March 21 13:35:11 »
Just a clarification.

When I said I tried the PSFImage script on a Linear image both with/without the STF applied, that was NOT referring to actually stretching the image, only using the STF to view the image on screen so that the stars could be seen.

Steve
Telescopes:  WO Star71 ii, ES ED102 CF
Camera:  Canon T3 (modified)
Filters:  IDAS LPS-D1, Triad Tri-Band, STC Duo-Narrowband
Mount:  CEM40 EC
Software:  BYEOS, PHD2, PixInsight

http://www.SteveKing.Pictures/

Offline gamempire

  • Newcomer
  • Posts: 16
Re: Sharpening with MLT and deconvolution feedback
« Reply #12 on: 2019 March 21 21:00:33 »
Just a clarification.

When I said I tried the PSFImage script on a Linear image both with/without the STF applied, that was NOT referring to actually stretching the image, only using the STF to view the image on screen so that the stars could be seen.

Steve

Got it Steve, Thanks. The reason I asked the question about linear/nonlinear was because I looked up the post on the forum where the PSF script was first posted, and there was some discussion about using the script on both types of images. That threw me for a bit of a loop, because I know deconvolution is only ever applied on non linear images, while MLT can be applied to both. So thanks again for the clarification, and thanks for the feedback and help.  :D

Offline STEVE333

  • PixInsight Addict
  • ***
  • Posts: 231
    • sk-images
Re: Sharpening with MLT and deconvolution feedback
« Reply #13 on: 2019 March 21 21:15:02 »
Just a clarification.

When I said I tried the PSFImage script on a Linear image both with/without the STF applied, that was NOT referring to actually stretching the image, only using the STF to view the image on screen so that the stars could be seen.

Steve

Got it Steve, Thanks. The reason I asked the question about linear/nonlinear was because I looked up the post on the forum where the PSF script was first posted, and there was some discussion about using the script on both types of images. That threw me for a bit of a loop, because I know deconvolution is only ever applied on non linear images, while MLT can be applied to both. So thanks again for the clarification, and thanks for the feedback and help.  :D

You are welcome Josh -

If you meant to say Deconvolution is only applied to Linear images I completely agree.

Steve
Telescopes:  WO Star71 ii, ES ED102 CF
Camera:  Canon T3 (modified)
Filters:  IDAS LPS-D1, Triad Tri-Band, STC Duo-Narrowband
Mount:  CEM40 EC
Software:  BYEOS, PHD2, PixInsight

http://www.SteveKing.Pictures/