3D Filters and Statistics

3D Filters

The EFilters .NET Python class contains static methods used to apply filters to ZMaps or depth maps.

RemoveNoise

The EFilters::RemoveNoise .NET Python method removes outliers from a depth map or a ZMap.

  • It takes a depth map or a ZMap as input and generates a depth map or a ZMap respectively.

The undefined points are not taken into account.

  • It is based on a square moving kernel. The size of the kernel is (2 × halfKernelSize + 1) where halfKernelSize is a parameter of the method.

  • The threshold parameter is scaled with regard to the Z resolution of the filtered depth map or ZMap.

  • There are 3 variations of this filter, depending on the method parameter:

See also

Code snippet

Median

The EFilters::Median .NET Python method removes the outliers from a depth map or a ZMap.

  • It takes a depth map or a ZMap as input and generates a depth map or a ZMap respectively.

    • The undefined points are not taken into account.

  • There are options for this method:

    • You can adjust the width and the height of the median filter.

    • The function can ignore the undefined pixels or take them into account (as the lowest possible value) when computing the medians.

      • Taking the undefined pixels into account removes spickles in the middle of undefined pixels and smoothens the edges between defined and undefined pixels.

      • Ignoring them does not. It can also be much slower.

3D Statistics

The EStatistics .NET Python class contains static methods used to compute statistics on ZMaps or depth maps.

ComputeAverageMap

The EStatistics::ComputeAverageMap .NET Python method computes the local average map.

  • You can use this method as a low-pass filter.

  • Undefined points are not taken into account.

  • This method is based on a square moving kernel. The size of the kernel is (2 × halfKernelSize + 1) where halfKernelSize is a parameter of the method.

ComputeStandardDeviationMap

The EStatistics::ComputeStandardDeviationMap .NET Python method computes a map of the local standard deviation.

Note

Be aware, however, that in the generated map, a pixel with the value 0 can either be undefined or have a standard deviation equal to zero.

See also

Code snippet

ComputePixelStatistics

The EStatistics::ComputePixelStatistics .NET Python method returns basic statistical information about pixel values:

  • Minimum

  • Maximum

  • Average

  • Standard deviation

  • Number of valid (not undefined) pixels.

Use an ERegion .NET Python object to specify the region of the ZMap or depth map used to compute the statistics.

ComputeStatistics

The EStatistics::ComputeStatistics .NET Python method returns the same information as the EStatistics::ComputePixelStatistics .NET Python method, but scaled with respect to the Z resolution.

Use an ERegion .NET Python object to specify the region of the ZMap or depth map used to compute the statistics.