Author Topic: LUMINANCE MASK  (Read 4926 times)

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
LUMINANCE MASK
« on: 2008 April 30 12:58:23 »
Hi All

Next up on my question list is in reference to the luminance mask option in the HDRwavelet
transform
does this build its own mask when enabled or do you build a separate mask?
If so How do you build it easily as the option in ACDNR is very good and easy to use

Regards Harry Page
Harry Page

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
LUMINANCE MASK
« Reply #1 on: 2008 April 30 14:29:00 »
Hi Harry,

The HDRWaveletTransform (HDRWT) tool generates its own luminance mask, just as ACDNR does. However, in general a simple luminance mask is all you need with HDRWT, so you don't need to tweak it as tightly as an ACDNR mask; that's why there are no mask generation controls in HDRWT.

If you need more control, you must build and use your own mask. It's very easy:

1. Select your image.

2. If it's a grayscale image, simply duplicate it (Image > Duplicate). If it's a color image, extract its luminance (Image > Extract > Luminance).

3. Now select the luminance image you've extracted in step 2. To simplify things, you can rename it. For example, select Image > Identifier and type "Mask" (for example; you can use the identifier you prefer) in the Set Image Identifier dialog.

4. Open the HistogramTransform interface (on the Process Explorer, double click the corresponding item in the Favorites category). Select your Mask image in the view list of HistogramTransform (the combo box).

5. Activate the Real Time Preview option of HistogramTransform. It's the small blue button with an elliptic shape (an "eye" shape, actually) on the bottom bar of the interface. Now you can adjust your mask by changing histogram parameters. You can see the changes in real time on the Real Time Preview window.

6. When you're happy with the mask, close the Real Time Preview window and apply HistogramTransform to your Mask image (e.g., press F5 when the HistogramTransform window is active, or drag the small triangle (blue, at the lower left corner) to the Mask image).

7. Now select the image you want to process (you extracted its luminance at step 2). Select Mask > Select Mask and choose the Mask image.

8. The mask is visible by default. Select Mask > Show Mask to hide the mask.

9. Now you can apply any (maskable) process to the image, including HDRWT, and it will be masked automatically.

Note that there is no problem in combining the Luminance Mask option of HDRWT with a custom mask: both masks will be applied in sequence (the automatically generated mask first). Doing this is not a usual practice, but it's perfectly legal.

Hope this helps. Keep questions coming! ;)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
LUMINANCE MASK
« Reply #2 on: 2008 April 30 14:39:25 »
Hi Juan

Excellent answer thanks very much, but why we are on HDRWavelet transform would you apply this
before any stretching takes place, or some stretching as it can be difficult to see whats going on
if no stretch has taken place
What do you think

Regards Harry
Harry Page

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
LUMINANCE MASK
« Reply #3 on: 2008 May 01 04:20:08 »
Hi Harry,

Thanks. The HDRWT algorithm works much better with nonlinear images. So you should use it once you've stretched your image (after histograms, curves, etc.).

In this aspect, HDRWT is a special case. Most wavelet-based algorithms work better with linear images. For example, ATrousWaveletTransform (ATWT) performs much better with linear data when it is being used for detail enhancement / noise reduction. Here is a processing example that demonstrates how to use ATWT with linear data, then HDRWT after a nonlinear stretch:

http://pixinsight.com/examples/wavelets/NGC7000/en.html
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
LUMINANCE MASK
« Reply #4 on: 2008 May 01 14:12:25 »
Thanks for the help and quick answer

Regards Harry
Harry Page