There are cases where all you have is an RGB image, and yet you need to create a mask based on the image. While you could use a RangeMask, using the actual image is often more beneficial because the image itself includes all the details about the dark and light areas of your image that you probably need to mask.

You can create a mask based on the image by extracting the lightness component of the RGB image, and then modifying the stretch of the new image which you use as your mask.

Extracting The Lightness Component of Your Image

Use the following directions to extract the lightness component from your RGB image:

1. Open an RGB image

2. From the menu, select Image – Extract – Lightness (CIE L*)

After a few moments, PixInsight will create a new monochrome image, which is the lightness component of your RGB image.

You could use this image as-is for your mask, however, it is common to stretch the image so that it has more contrast to better mask the light and dark regions.

Adjusting The Image’s Contrast

1. Refer to this article for the location of the black point slider and midtones slider

2. Move the black point slider so that the image becomes darker overall – the idea is to make the background much darker

3. Move the midtones slider so that the object of your image becomes brighter

Using NGC 2070 as an example, this is what my image looks like after the adjustment:

You can use this image as a mask since it masks both your object and the background, depending on how you use the mask.

Conclusion

In this article, you learned how to create a mask using the lightness component of an RGB image and you learned how to stretch the mask to make it have more contrast to better protect the highlights and background.

More Articles In This Series

This article is part of a whole series of articles about processing images using PixInsight: