Author Topic: Deconv deringing wrecks images ?  (Read 37566 times)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Deconv deringing wrecks images ?
« Reply #15 on: 2011 January 14 08:07:08 »
Sander,

Quote
As far as the SNR goes, this image is pretty typical for what amateurs can achieve with a budget of only a few thousand dollars. In fact it's probably lower noise than most 'low effort' images. This is only a few hours of exposure but with a C11 at F/2 so it brings in quite a bit of light.

If what I've said leads you to think that I am underestimating your work, please accept my apologies because I didn't intend to mean so. In fact your image is very nice and even more valuable considering your light pollution conditions.

When I say that "your image does not have a very high SNR", I speak in purely technical terms. For example, if you perform a wavelet decomposition of your image, you'll see that there is significant noise in at least the three first scales throughout the whole image, even over the main DSOs. For deconvolution purposes, this is challenging because deconvolution requires relatively high SNR values for best performance.

Quote
We can't all use professional instruments and we can't all spend several nights on an image.

I am well aware of that. Astrophotography should not be understood as a race to see who produces the most spectacular images. It is a path for personal growth, and what is important is being able to improve with each image, and to achieve the best possible results with the available equipment and conditions.

That said, don't think that the data acquired with professional instruments have less problems than the images produced with amateur cameras and telescopes. It is just the opposite. Regarding SNR, it's true that the CCD cameras available at professional observatories are better in terms of quantum efficiency, and that sky conditions are usually very good, but along with that advantages there are many problems, some of them very difficult to overcome.


Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline yock1960

  • Newcomer
  • Posts: 29
Re: Deconv deringing wrecks images ?
« Reply #16 on: 2011 January 14 08:42:27 »
I'm happy to see this example/thread! This should give me something to experiment with, while I wait for clear skies.

Would this work with an image created with the HDRComposition process? Or would I need to deconvolve each component image that is used in HDRComposition? Hopefully I wouldn't have to do it....4 times in this case.

Steve

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Deconv deringing wrecks images ?
« Reply #17 on: 2011 January 14 08:56:30 »
Yes, since the HDRComposition result is a linear image, is a perfect target for deconvolution.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline dsnay

  • PixInsight Addict
  • ***
  • Posts: 100
Re: Deconv deringing wrecks images ?
« Reply #18 on: 2011 January 14 13:19:12 »
Okay, I'm confused.
I walked through Juan's example using my narrowband M42 image that I posted here http://pixinsight.com/forum/index.php?topic=2718.0 and saw very little difference.

Is it possible that once the image has been saved as a tiff file I shouldn't expect significant change?
I'm also now sure about process of applying the star mask. How do you do that? I see that the mask is specified in the deringing section of the deconvolution window. I assume that's all you need to do if you're using it for decon. However, I think it would be helpful for other tasks as well. So how does one make use of the star mask? Also, do starmasks in PI protect the stars or everything but the stars?

Thanks,
Dave

P.S.  I'm beginning to think I should start a "Help Dave understand" thread....
« Last Edit: 2011 January 14 13:27:00 by dsnay »

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Deconv deringing wrecks images ?
« Reply #19 on: 2011 January 14 17:15:45 »
Hi Simon,

I also never do that. Perhaps that explains why my images suck :) I figured that the default RGB ratios were 1:1:1 and that this would be fine. Ah, if only things were that simple.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline yock1960

  • Newcomer
  • Posts: 29
Re: Deconv deringing wrecks images ?
« Reply #20 on: 2011 January 15 05:13:32 »
Dave,

I haven't had enough time to experiment yet using Juan's info above, but in other processes at least, star masks can protect or not protect stars, simply by clicking the invert icon on the toolbar. I'm not sure if the mask inversion icon works with the deconvolution process or not, seems like maybe not since you specify the mask in the dialog, which is different than most other processes. In any case, in the few minutes I have played with this, using pretty much the same settings that Jaun did, the whole image was deconvolved. Up to now, whenever I had tried this process, all I got was rings around the stars. I'm still getting that  :), but the effect of on the nebula (M42 also) was like putting on a pair of corrective lenses to bring things into focus. Neat!

I'll work on this over the weekend to see if I can puzzle some things out and get rid of the rings.

Steve

Offline Ginge

  • PixInsight Addict
  • ***
  • Posts: 215
Re: Deconv deringing wrecks images ?
« Reply #21 on: 2011 January 15 06:36:29 »
It is not recommended because deconvolution uses a model of the PSF of your image to convert it in a perfect, unblurred dot. In a linear image, the PSF doesn't vary with object brightness (roughly... In the real world, the dimmer stars are tighter because the outer areas of the Gaussian bell are lost in the noise). 

But in a stretched image, the PSF varies extremely. Think on two stars: the first very bright and the second very dimm. You cannot say to the algorithm the correct PSF to deconvolve, because is changed extremely, depending on the brightness of the object. 

On the practice, although is much less rigorous, you can apply a deconvolution to a stretched image, but you will get better result with a linear image. 

Regards,
Vicent

Thanks for clearing this up Vicent!

Ginge

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Deconv deringing wrecks images ?
« Reply #22 on: 2011 January 15 12:43:03 »
Hi Dave,

Quote
I see that the mask is specified in the deringing section of the deconvolution window. I assume that's all you need to do if you're using it for decon.

Please note that the deringing support image in Deconvolution is not a mask. It doesn't work as a mask, but as a special grayscale image to drive the local deringing routine in the Deconvolution process.

Quote
So how does one make use of the star mask? Also, do starmasks in PI protect the stars or everything but the stars?

A star mask is just a particular case and application of mask images in PixInsight. A mask in PixInsight can be just any image (forget all that stuff of masks embedded in layers; things are much more natural here). If you have two images I and M, M can be a mask for I if the following conditions hold:

1. M and I have the same geometry (width and height in pixels).

2. If I is a color image, then M can be either grayscale or color. If M is grayscale, then it applies equally to all channels of I. If M is a color image, then the masking operations are applied on a per-channel basis (M's red channel is a mask for I's red channel, and so on).

3. If I is a grayscale image, then M must be also a grayscale image.

4. If M is a mask for I, then I cannot be a mask for M (circular masking relations not allowed).

A mask works in the standard way: white mask pixels allow full processing, black mask pixels prevent processing completely, and intermediate gray mask pixels provide partial protection, as a function of the mask pixel value.

Put in a bit more technical way, the masking operation is as follows:

I' = I*(1 — M) + f(I)*M

where I' is the processed/masked pixel value, I is the original pixel value, M is the corresponding mask pixel value, and f() denotes the process being applied. In the above equation, pixel values are in the [0,1] range, where 0=black and 1=white.

In PixInsight, a mask can be inverted. When a mask is inverted, it is applied in the opposite way: black mask allows processing and white mask protects.

To manage masks, use the Mask item of the main menu. Masks can be selected, enabled/disabled, inverted, and shown/hidden. You can also control how masks are rendered on images.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline RobF2

  • PixInsight Addict
  • ***
  • Posts: 189
  • Rob
    • Rob's Astropics
Re: Deconv deringing wrecks images ?
« Reply #23 on: 2011 February 05 20:07:45 »
This is an awesome "How to" thread for deconvolution -IMHO one the standout routines that really distinguishes PI from the rest of the crowd.  I'm sure I've read before somehow how wonderful it would be if these sorts of threads (where Juan gives detailed examples and explanations of individual parameters on real world images) could be made sticky in a designated part of the forum (or even linked to in the documentation system). 

I feel like I'm back in 1st year at Uni listening to the Professor lecturing   8)
These threads really are THAT good. 

Thanks all for the goldmine of info.  I'm going to have to invest some time into getting my head around linear colourspace too I see... :'(
FSQ106/8" Newt on NEQ6/HEQ5Pro via EQMOD | QHY9 | Guiding:  ZS80II/QHY5IIL | Canon 450D | DBK21 and other "stuff"
Rob's Astropics

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Deconv deringing wrecks images ?
« Reply #24 on: 2011 February 05 21:42:12 »
Indeed whenever I hear that engineers (Juan) don't like writing documentation I point at threads like this. He's clearly capable of writing excellent tutorials. Some of that energy needs to be directed towards wrapping up the actual docs. Good forum threads no documentation make :)
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Astrocava

  • PixInsight Addict
  • ***
  • Posts: 180
    • Astrocava.com
Re: Deconv deringing wrecks images ?
« Reply #25 on: 2011 February 06 01:09:28 »
Thanks to this thread I'll give deconvolution a try. Deconvolution and ATW are the two tools I hardly use because I never got good results. Yes. I know they are the key to improve the images but... I'm lost with all those possibilities and parameters. ???

Sergio
Moonfish ED80 over a Meade LX200GPS 8"

Offline zvrastil

  • PixInsight Addict
  • ***
  • Posts: 179
    • Astrophotography
Re: Deconv deringing wrecks images ?
« Reply #26 on: 2011 February 06 03:52:21 »
Thanks to this thread I'll give deconvolution a try. Deconvolution and ATW are the two tools I hardly use because I never got good results. Yes. I know they are the key to improve the images but... I'm lost with all those possibilities and parameters. ???

Sergio

Hi Sergio,

feel free to experiment with deconvolution, but I would like to warn you, based on my personal experience :). It is very easy to overprocess your image. I think the best way is to start with minimalistic approach to processing and then try to apply advanced techniques and compare results. By minimalistic processing I mean something like following:
  • 1. Color calibration
  • 2. Background extraction and removal
  • 3. Histogram transformation (I usually do two of them. First one unmasked to set the black point and to do the initial stretch. Second masked to stretch objects more but keep backgroun dark)
  • 4. Color saturation, masked to protect dark areas from increasing chrominance noise.
This should give you very good impression of the quality of your data - what's really there. Then, you can start to experiment. For example deconvolution must be applied before point 3 - while image is still linear. But it should be restricted with mask to only regions with strong signal - otherwise, it will wreck your image.
It is also very good idea to do the noise reduction with ACNDR after point 3 or 4. Again, protecting high signal areas where the noise is low.
If your intention is to sharpen your image, try to compare ATWT processing with Unsharp Mask - ATWT is much more powerful, but also much easier to use incorrectly.
There is much more to try - Morphological Transform to soften stars, HDRWT to compress dynamic range, etc.
At all cases - you have the original "minimalistic" processed image to easily evaluate if you were successful and improved your image or if you done more damage then good (which happens quite often, but that's the only way to learn HOW and WHEN use the great tools PixInsight offers). Best result is usually not achieved by using every single tool in the box, but using right subset of them, depending on image you're working on.

best regards, Zbynek

Offline Astrocava

  • PixInsight Addict
  • ***
  • Posts: 180
    • Astrocava.com
Re: Deconv deringing wrecks images ?
« Reply #27 on: 2011 February 06 12:01:56 »
Zbynek,

Now I do the "minimalistic" processing you have listed, combined with ACDNR and Morphological transform. But I want start to use two of the most advanced tools of PI: deconvolution and ATWT.  :)

Check this recent images:

http://gallery.astrocava.com/main.php?g2_itemId=44&g2_page=4

I think I can extract more from them with deconvolution and/or ATWT.

Sergio
Moonfish ED80 over a Meade LX200GPS 8"

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Deconv deringing wrecks images ?
« Reply #28 on: 2011 February 15 06:26:11 »
Hi Sander,


The standard deviation of the Gaussian PSF is 1.1 pixels. I have derived this value from measuring the smallest stars in your image, and after some experimentation. I think it is very close to the true PSF in your image (I haven't measured it; this is a quick test).

Juan,

This is great information and I tried it on my M74 luminance image using the settings you used. I got ringing around my smaller stars and realize I need to tweak the settings for my images. What process did you use to measure the PSF? To eliminate the ringing I doubled the local amount setting under local deringing from .20 to .40. While the impact on the image isn't overly obvious at the optimal fit view, zoom in to at least full view and the difference is impressive.
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline Emiel Kempen

  • Newcomer
  • Posts: 23
    • www.ekempen.com
Re: Deconv deringing wrecks images ?
« Reply #29 on: 2011 March 02 07:52:26 »
Hello all,
I am learning PixInsight and saw this tread which is very interesting.

I his explaination Juan wrote:
Quote
The standard deviation of the Gaussian PSF is 1.1 pixels. I have derived this value from measuring the smallest stars in your image, and after some experimentation. I think it is very close to the true PSF in your image (I haven't measured it; this is a quick test).

I would like to ask: how do you determine the standard deviation of the Gaussian PSF by measuring the smallest stars?
It would take out a lot of guessing and thus time in applying deconvolution for me.

Best regards,
Emiel Kempen.