public class SoNonLocalMeansFilterProcessing extends SoImageVizEngine
SoNonLocalMeansFilterProcessing engine
The SoNonLocalMeansFilterProcessing engine implements the non-local means algorithm for image denoising.
The algorithm computes a weighted mean of a large set of voxels (search windows) around the voxel to be denoised (target voxel). The voxel weight in the search window is a function of the similarity between this voxel and the target voxel. A voxel very similar to the target voxel will be assigned to a weight close to 1.0. A voxel very different from the target voxel will be assigned to a weight close to 0 and will have a small impact on the final denoised value.
The similarity between a voxel and the target voxel is based on the squared intensity differences between 2 patches of size patchSize centered on the current voxel and the target voxel.
Images are often corrupted by noise because of acquisition process. For an image
defined on
which is the image domain, the noise added by acquisition is assimilated to an additive white gaussian noise:
where
The denoised image
is an estimation of
as following:
with
where:
is the similarity criterion (sum of squared differences)
is the similarity
is the indicator function of the search region
is the indicator function of the patch region.
The algorithm looks for matches within the search window area around each voxel.
The naive implementation of previous equation has a complexity of
that can be reduced to
where N*M*Q is the dimension of the input image, P is the patchSize and S is the kernelSize.
File format/default:
NonLocalMeansFilterProcessing {
| computeMode | MODE_AUTO |
| inImage | NULL |
| kernelShape | BALL |
| kernelSize | 6 |
| patchSize | 3 |
| similarity | 0.6f |
Library references: non_local_mean non_local_mean3d
| Modifier and Type | Class and Description |
|---|---|
static class |
SoNonLocalMeansFilterProcessing.KernelShapes
The shape of the kernel.
|
SoImageVizEngine.ComputeModes, SoImageVizEngine.EventArg, SoImageVizEngine.Neighborhood3dsInventor.ConstructorCommand| Modifier and Type | Field and Description |
|---|---|
static int |
BALL
Deprecated.
Use
SoNonLocalMeansFilterProcessing.KernelShapes.BALL instead. |
SoSFEnum<SoImageVizEngine.ComputeModes> |
computeMode
Select the compute Mode (2D or 3D or AUTO) .
|
static int |
CUBE
Deprecated.
Use
SoNonLocalMeansFilterProcessing.KernelShapes.CUBE instead. |
SoSFImageDataAdapter |
inImage
Input image.
|
SoSFEnum<SoNonLocalMeansFilterProcessing.KernelShapes> |
kernelShape
The search window shape to apply.
|
SoSFInt32 |
kernelSize
The search window size to apply.
|
SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter> |
outImage
The output image.
|
SoSFInt32 |
patchSize
The patch box size to apply.
|
SoSFFloat |
similarity
The similarity is used to compute weight assigned to each voxel in the search window (see expression of
). |
CONNECTIVITY_18, CONNECTIVITY_26, CONNECTIVITY_6, MODE_2D, MODE_3D, MODE_AUTO, onBegin, onEnd, onProgressVERBOSE_LEVEL, ZeroHandle| Constructor and Description |
|---|
SoNonLocalMeansFilterProcessing()
Constructor.
|
abortEvaluate, isEvaluating, startEvaluate, waitEvaluatecopy, getByName, getOutput, getOutputNamecopyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsdispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable, touchgetAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads@Deprecated public static final int CUBE
SoNonLocalMeansFilterProcessing.KernelShapes.CUBE instead.@Deprecated public static final int BALL
SoNonLocalMeansFilterProcessing.KernelShapes.BALL instead.public final SoSFEnum<SoImageVizEngine.ComputeModes> computeMode
public final SoSFImageDataAdapter inImage
public final SoSFEnum<SoNonLocalMeansFilterProcessing.KernelShapes> kernelShape
public final SoSFInt32 kernelSize
public final SoSFInt32 patchSize
public final SoSFFloat similarity
).
The squared similarity is proportional to the standard deviation of the assumed gaussian noise of the input image. As result, the larger the value, the more the resulting image will be smoothed. The similarity has no effect on the computation time. Default value is 0.6f.public final SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter> outImage
Generated on February 24, 2026, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com