Why Masking and Local Support with PixInsight’s TGV Denoise is Important

As astrophotographers, we constantly strive to capture the beauty of the cosmos in our images, revealing the intricate details of distant galaxies, nebulae, and celestial wonders. But noise is an inevitable companion in astrophotography, often emerging as an unwanted pixels, marring the clarity and precision of our celestial images. Whether you are grappling with thermal noise, readout noise, or the notorious “grain” in your long-exposure shots, TGV Denoise (Total Generalized Variation Denoise) offers a solution to suppress the noise while highlighting the true beauty.

TGV Denoise employs a unique approach that goes beyond mere pixel-level processing. It takes into account the broader context of the image, understanding the relationships between pixels and preserving the fine details while effectively reducing noise.

But oftentimes, there are different suggestions on the configuration of the PixInsight process. For example, TGV Denoise is used in the narrowband and broadband workflows on this site. And the tutorial recommends you create two separate masks. One mask focuses on the background signal and a second mask provides local support. The local support mask provides information and context about the surrounding pixels of a given pixel, helping the process determine how much noise to suppress in that pixel.

Are both needed? Let’s take a look

Impact on Stars

The first part of the test is to see what impact the two masks have on a section of the image containing only stars and background noise. The four samples include

  • Test 1: No mask or local support
  • Test 2: A mask focusing on background noise
  • Test 3: Local support enabled
  • Test 4: A background mask applied and local support enabled

Each test used the same parameters in TGV Denoise

  • Strength: 0.5
  • Edge Protection: .000287
  • Smoothness: 2.0
  • Iterations: 500

It’s quite easy to see that the test leveraging a mask and local support comes out the cleanest.

Impact on Nebula

The second part of the test is to see what impact the two masks have on a section of the image containing stars and nebula. Because the nebula has a stronger signal than the background, there is less noise to correct. The four samples include

  • Test 1: No mask or local support
  • Test 2: A mask focusing on background noise
  • Test 3: Local support enabled
  • Test 4: A background mask applied and local support enabled

Each test used the same parameters in TGV Denoise

  • Strength: 0.5
  • Edge Protection: .000287
  • Smoothness: 2.0
  • Iterations: 500

This time, there isn’t much different between the test using local support and the test using a mask with local support.

Conclusion

The second test showed a similar end result for the test with local support and the test with a mask and local support. But if you take into consideration the results of the test when only looking at stars and background noise, the configuration using a mask with local support definitely comes out as the best option.