Skip to main content
. 2024 Oct 2;24(19):6397. doi: 10.3390/s24196397
Algorithm 3: The Difference-of-Gaussian filter to invalidate all image pixels belonging to weakly textured areas.
  • Data: 

    unfiltered depth, normal and confidence maps (D, N and C) as well as corresponding reference image Iref.

  • Result: 

    filtered D, N and C, in which all estimates corresponding to weakly-textured areas in Iref are removed.

1 Use a Gaussian filter with a kernel of 7×7 pixels to smooth the reference frame Iref, yielding Irefsmooth.
2 Compute the DoG image depicting local image gradients, according to: IrefDoG=IrefIrefsmooth.
3 Apply a binary threshold to compute the DoG mask MDoG, marking all image areas in which the intensity change is greater than 0.5.
4 Remove activation areas smaller than 7 pixels in MDoG by applying a speckle filter.
5 Dilate MDoG with a kernel size of 3×3 pixels to fill small holes in activation areas.
6 Remove deactivation areas smaller than 21 pixels by applying a speckle filter to the inverted DoG mask MDoG-inv=1MDoG.
7 Invalidate pixels in D, N and C for which MDoG=1.