top of page

How Hard can it be to create a Denoiser?

James Green

Recently whilst working on some new shots for showreels I saw this interesting video on the inbuilt Denoise node in Nuke by Nodes Aren't Scary and how to make it perform better, when replicating this I noticed that whilst what is shown in the video does work really well it can also introduce noticeable issues in footage which can produce artifacts that cause colours to be shifted out of place and look like printer misalignment. so after seeing this, I saw a challenge to see if I could either further improve the same design using the default denoise node or create my own denoising tool from scratch thinking that it can't be too difficult (I was very wrong lol) I would also like to quickly add that I decided to go into this entire process knowing practically nothing about how to achieve what I wanted this tool to do so used it as one big learning experience.

This is more of a here is what I am working on post instead of here is a finished tool I have made, and if anyone has any ideas and suggestions on how to improve or nice features to have I would be happy to hear them.


initially, I recreated what was shown in the video and added a colourspace node to convert footage into a log format and then converted it back after as I find this usually has preferable results and can keep more sharpness. after this, I was thinking about how else to improve it and remembered about frequency separation in photography and thought that a similar method could be useful here and decided to implement it, which worked quite nicely as noise does not impact the low-frequency channel as much as it does the high frequency although this may not be the case with incredibly noisy footage as of yet I haven't had the chance to test this scenario.

this method had the issue of reducing sharpness and sometimes could make it look like a blur had been applied to some areas of the image.


my next iteration of this design involved splitting up the high frequencies into the RGB Channels to denoise separately as certain channels produce more noise than others, at this time I also tried seeing what would happen when denoising the luminance channel in a similar way which didn't work out great at all and produced tons of artefacts so that got disabled early on I also filtered each channels high pass a second time which sort of improved results but the improvements were so minor it didn't make a difference. when making this version I used a Denoise node per channel which whilst it did work it made the usability of this as a tool complicated as I wanted to be able to package it up as a group so it could just be dropped into a script it and having to go into 3 separate denoise settings for each channel wasn't working out too well and would often run into issues.

it was also with this version I made proper controls to allow for user control and this is where I personally found using the nuke denoise node per channel to be frustrating from a user standpoint as you had to move multiple noise analysis boxes but they would always show on screen, this may be fixable however at this time I don't know how you would go about doing this.


Section of Original plate

Version 2 of my denoise tool

in these 2 images, you can see that this 2nd version does indeed work well at removing noise however it was about here when I realised that when doing frequency separation the green channel holds a lot of the data to do with sharpness and texture but also can impact a lot of noise so whilst now I had a denoise tool that worked remarkably well it still had the issue of reducing sharpness.


in my latest iteration of trying to create this denoising tool, I moved away from the idea of using nukes built-in Denoise node and started a path of making a denoise tool from complete scratch again thinking it couldn't be too difficult or confusing.


like the previous version, it uses frequency separation and splits the high frequency into RGB and then merges them back together, however, this time it uses a median node on a value of 1 and the amount of denoise per channel can be controlled via the low frequency of each channel since the strength of the blur node directly impacts how much detail and noise is brought into the high frequency. whilst this method works slightly it wasn't effective at removing noise completely.

when inspecting the plate with gain levels increased to see the noise easier I realised that a lot of the noise that wasn't dealt with well was in the dark areas of the plate. to combat this I added a luminance key that isolated just dark areas of the plate to use as a mask for area-specific filtering of noise using median filters and also using a temporal median filter, which greatly reduced how noticeable the noise in the dark areas were, i also added a saturation node to allow desaturating the noise in the dark areas to make it even less noticeable however this only really works in areas where it should be either black or shade of grey although desaturating a tiny bit does work well at reducing the noise


next, I wanted to deal with one of the main issues I would face with each iteration which was the loss of sharpness and texture, initially, I played with the idea of using a sharpen node however I found that this technique introduced a few too many sharpening artifacts and didn't sharpen the image in the right way. my next idea involved the use of a 3x3 high pass filter matrix that only brought back detail in specific areas of the image based on a luma key of the light areas, whilst thinking that this could reintroduce a lot of noise into the plate it surprisingly didn't and worked perfectly to reintroduce lost detail.




Original Plate


Plate using my Denoise tool


now a keen eye will notice that whilst yes my tool has removed a large chunk of the noise and made it much less visible it hasn't removed it completely, so to resolve this issue I made use of Nukes Denoise tool just before bringing back the detail to the plate so if it caused any loss of texture it should mostly be brought back via the method previously stated, this worked perfectly to remove a lot of that noise that was still noticeable without destroying the image and compared to using the denoise node on its own this final outcome at least to me is far superior.


Result with the addition of the denoise node

Denoise node on the left and my tool on the right

here is a quick video showing the tool in use compared to the original plate



whilst I know that this version of the tool does require quite a few fixes and changes to make it better I feel like this was quite a successful dive into trying to create a custom denoise tool starting from near zero knowledge of how a denoising tool or algorithm works and I will definitely in future carry on learning new things and see how I can improve this tool as it really has been such a great learning tool. as I continue to update and improve the tool I will make some new blog posts showcasing the changes, improvements, and additions especially since I still want to get it to a point where it doesn't use nukes denoise node at all.

 
 

Comments


© 2023 by James Green.

  • LinkedIn
bottom of page