TGVDenoise is a noise reduction process in PixInsight that you can use both with both linear and nonlinear images.

When open TGVDenoise, the process looks like this:

The default is the RGB/K mode, which is designed to be used with monochrome images. If you are using TGVDenoise with an RGB image, set the mode to CIE L*a*b mode.

The most important adjustment is the Edge Protection option, which you can think of  as  strength adjustment. The default settings, except for the mode, are suitable for nonlinear RGB images.

You use TGVDenoise with an inverted mask to protect high signal parts of your image from the effects of smoothing. The premise is to reduce noise in your image’s low signal regions.

Creating A Mask To Use With TGVDenoise

 If you are using the AutoIntegrate-based workflow, you already have an image that you can use for the mask: the L_HT image.

Alternately, you could extract the lightness component of your RGB image if you prefer by selecting from the menu Image – Extract – Lightness (CIE L*) – this will extract the luminance component of your RGB image which you can use as a mask.

If your image is low contrast, you could stretch the mask to make it have more contrast to protect high signal regions of your image.

Once you have the mask, remember to either invert it before you apply it to your image, or select the Mask – Invert Mask option once you apply your mask to the image.

Understanding TGVDenoise Parameters

The Mode parameter controls how TGVDenoise works with your image: use RGB/K mode for monochrome images and CIE L*a*b* mode for RGB images.

The Apply checkbox controls whether the Lightness or Chrominance setting will be used by TGVDenoise – using this setting allows you to apply the lightness and chrominance settings individually if you like.

The Strength setting controls the strength of the denoising process with higher values resulting in a smoother image. Generally, the default is suitable for nonlinear images and does not need to be adjusted; you may have to lower this value for linear images.

The Edge Protection setting is analogous to a strength parameter and it is this process’s most critical setting. Like the other settings, this setting is divided into a base and exponent. The exponent is a power of 10 and moves the decimal of the base to the right as you increase the number in the exponent field. You adjust the base using the slider or you can type in numbers.

The Smoothness parameter controls an artifact known as a staircase. The default value is suitable for most images and adjusting this value can affect the staircasing effect.

The Iterations parameter is the number of times TGVDenoise is applied to the image. When used in conjunction with the next two parameters, you can achieve a good result in the minimum amount of time necessary.

The Automatic Convergence checkbox enables the Convergence parameter. As TGVDenoise runs over its iterations, the change between two successive applications of the process becomes smaller. The Automatic Convergence checkbox lets TGVDenoise optimize the number of iterations such that it may converge before it reaches the number of iterations you specify thereby saving processing time.

The Local Support settings are useful for linear images. You use the Local Support settings instead of a mask for linear images. The support image is the lightness component of your image and is what you use for the Support image parameter. The Noise Reduction, Midtones, Shadows, and Highlights parameters allow you to modify your support image and it is generally recommended that you stretch your support image as desired instead of using these parameters.

Using TGVDenoise

Assuming you’re working with an RGB image, set the mode to CIE L*a*b*.

Use or create a mask as explained earlier and apply it to your image; ensure that your mask is inverted to protect high signal areas of your image.

Create a preview that spans a high and low signal region of your image and apply TGVDenoise at its default settings to observe the result.

Adjust the Edge Protection exponent parameter until you start to see TGVDenoise’s smoothing effect. Once you are within range, adjust the Edge Protection slider to taste.

If you modify the Iterations parameter, it is recommended to use the default Automatic Convergence parameter. Automatic Convergence does not work with Previews and the smoothing effect you see between a Preview and your actual image may be different as a result. Therefore, it is recommended that you start with the default iterations of 100 and adjust as necessary once you start seeing results from the Edge Protection parameter.

Example Of Using TGVDenoise

Here’s a zoomed in part of the Messier 51 observation that is used throughout this series – this is the LRGB_HT image that AutoInegrate-based process created:

This the same region after applying TGVDenoise:

The settings I used for this particular image are the defaults, except for Lightness Edge Protection set to 5.15 with an exponent of -3, and Chrominance Edge Protection set to 6.5 with an exponent of -3.

Applying TGVDenoise using AutoIntegrate.js

AutoIntegrate.js allows you to apply TGVDenoise to any image in the extra processing options – simply select Color noise reduction option and select your image from the listing of images in the dropdown.

Conclusion

In this article, you learned about TGVDenoise and learned how to use it on your own images.

More Articles In This Series

This article is part of a whole series of articles about processing images using PixInsight. Get the index article here, which explains an entire workflow for processing an image using PixInsight along with several useful scripts that make processing a lot easier than processing manually.