Thoughts on denoise algoryhtms. (coding)

I’m thinking about denoising here, and maybe some people could join the discussion, no code has yet been written.
But i’m thinking of restarting an old project, and thus i could use some input
So if you can code and have ideas maybe give some coding input of observational views to address it.

Observations

  • Blender noise is mostly luma noise (as compared to real photographs).
  • Blender noise can contain spikes
  • Blender noise is more ‘random in darker areas’
  • Occasionally we got spikes, too bright pixels.

Luma is used in the HSL color model, Blender doesnt have it in compositor, but HSL is quite close to how we humans adress collor, as explained in this diagram :


On top HSL next HSV and bottem RGB

Some ideas of what is possible when colors are into HSL (L luma) some Luma operation ideas :

  • On L take “weighted average”, on a pixel scan line comparison
    Sloped average; take 9 samples in array, weight the pixels around center (pixel 5), take average.
  • On L “remove small peaks”, an an pixel row(x/y axis) array of 9 (or more), find peek top and down, as vectors remove vectors whose slope is smaller then x degrees.
  • for a whole image calculate difference map, this is on a 3x3 or 5x5 grid of pixels
    example of 3x3 => ABS ( for a center pixel weight it x8 minus sum of surrounding pixels) = difference.
    Now for slight differences smooth them… or some next chain operation. (chain as smooth H or S or L or …)

I thought the Y in YUV was a luma component?

i find that i use the pde heat flow in Gmic for most denoising
gmic used to be called GreyCstoration years ago

i normally run a “hot pixel” removal ( part of gmic) on bakes , this removes the “spikes” VERY well without blurring the image

and gmic works with many formats ( cmy, hsi,hsl,hsv,lab,lch,luv,xyz,ycbcr,and of course RGB and sRGB )