New MaskedStretch Tool

cdesselles said:
Geoff:  Have you tried sstretching without using the new tool to see the difference?  Just curious.
Yes. While I get a better stretch in the main feature (galaxy, nebulosity), the stars do seem sharper with a more conventional stretch.
 
Geoff said:
One thing I have noticed is that using the masked stretch can soften and slightly blur the edges of the stars.

The MaskedStretch algorithm is a point operator. This means that neighbor pixels are not correlated by MS, so there's no way it can blur the image.

IMO, we are all heavily accustomed to nearly-saturated stars. This is just because of the tools and algorithms that we have been applying to stretch images for many years. However, hard star edges should be considered artifacts because they denote data losses caused by deficient handling of bright image features, just as ringing artifacts for example.

The MS algorithm generates much better star profiles because it protects the highlights from excessive amplification. Your image is an excellent example:

http://www.astrobin.com/76328/

The stars are very nice in this image. They have soft profiles, which allows them to show different star colors with good color saturation. Since the stars have been protected by MS, they have moderate lightness levels that leave room for chroma components to vary across a wide range of hues.
 
Thanks Juan for your nice comments about the stars. On rethinking, i can appreciate that this is the way stars should look. A hard edge doesn't fit well with the usual bell-shaped curve expected of a typical star profile. As you say, we come to accept wrong things as normal because we see so many examples.
Geoff
 
When is the best time to use Masked Stretch. This is my typical flow:

1) Dynamic Crop
2) DBE
3) BN
4) CC
5) MMT to reduce noise while image is still linear
6) HT
7) HDR
8: LHE
9) ACDNR
10) Curves Transformation
11) UnSharp Mask

Would Masked Stretch be used after step 5? Is Masked Stretch best use on linear images?

Thanks,
Peter
 
According to your routine now I would sub it for the HT and see how that works. I don't do any noise reduction until the end of my images. maybe I need to rethink this.

-Steve
 
How about tweak with HT after Masked Stretch or anywhere else during post processing of non-linear image if necessary?

So, Masked Stretch is supposed to be some kind of alternative to HT?

I will play with Masked Stretch on some of my old images and compare with HT.

Thanks,
Peter
 
What I've found for my images, and this is personal taste, is usually using a background image and a setting of 0.09. If this seems too different than what I'd like I experiment between that and 0.14. Regardless I usually find that I'll followup with a curves stretch to increase contrast which is what I usually do after using the Histogram Stretch tool as well. For my luminance after calibration, alignment, stacking, crop, dbe as needed (almost always), I'll do a masked stretch with a sampled background (preview) void of stars and object, HDRW, maybe an unsharp mask, masked Local histogram stretch, and then a final curves adjustment. If I have enough data I usually don't need any noise reduction (in my opinion) but even still I would combine with my RGB image before and see how the result looks. What I have found in PI is usually to get an appealing L+RGB image (again personal taste) I usually need a darker than I would normally do luminance background. If and when we get layering in PI this would be a bit easier by adjusting the opacity of each layer. After the final image is made I'll look at possible noise reduction. I try to stay away from this process as I usually see the final image blurring the sharper details but then it may be my use of noise reduction and I'm doing it wrong.

The only real difference when creating the RGB image is I add the background neutralization and color calibration after DBE. Most everything else follows except the HDRW on the RGB data unless there is no luminance for that image. Then a dynamic align (I bin my RGB 2x2 and Lum 1x1) and use LRGB Combination to create the L+RGB image. Then maybe noise reduction if needed.

But then again there are far better PI processors here than me but this is my basic routine.

-Steve
 
Yes, yes Torsinadoc! This is what I see consistently. I'd talked privately with Carlos some about this but never did show you an example Carlos. I Do like MaskedStretch. I Do now agree that loss of contrast (compared w/ HT) can be recovered sufficiently w/ Curves or LHE. What I Can't seem to make work is combining L w/ RGB, without that star artifact. Any thoughts Juan/Carlos?

If I use HT for L but use MaskedStretch on RGB it occurs at LRGBC. If I MS both and then combine, I don't like the result. If I try to combine while still linear, doing one MS afterward, I get an usable result. Any suggestions? Thanks all!
 
Have you tried the ImportL process in my development set? It uses a different strategy to import lightness, modifying the RGB channels depending on both the old and the new lightness. This is used in HDR processing, to account for the strong data compression, to retain original colors.
 
Torsinadoc said:
As you can see below, I get an odd coloration of a star.  I tried several settings but not sure how to avoid this?

Hi Torsinadoc,

I think that there are two alternative to solve it. The main is to have data that allow make a HDR, and the second is to repair the stars.
I do not have a good set of image to make an example with HDR but I am just processing an Antares that is useful to show the reparation.

stars01.png


First I have applied Masked Stretch tool to a crop of the image with Antares using the default values. As expected the center of the star does not look fine.

stars02.png


Over a clone of the linear image apply the Repaired HSV Separation script. Set the desired levels to Clip Shadows and Repair level and check V- no repairs for the scrip to generate also the Unrepaired V

stars03.png


You will get four new images:
Unrepaired V
V
Sv
H

stars04.png


I have seen in some cases that is better to generate the new image using the Unrepaired V instead of V. Using channel Combination tool generate the new image.

stars05.png


The center of the stars look better now in the linear image:

stars06.png


Finally apply the same Masked stretch process to the repaired image.

stars07.png


I also recomend that you see Bob Andersson post about this script.

Saludos, Alejandro.
 
Back
Top