Using EFilters to Remove the Noise on a ZMap Based on the Standard Deviation Code Snippet¶
The code below removes pixels with a standard deviation higher than a defined threshold in a ZMap.
C++¶
#include <eVision/Easy3D/EFilters.h>
using namespace eVision::Easy3D;
// Load the ZMap data
EZMap16 zmap;
zmap.Load("");
// Compute the filtered ZMap. The new ZMap is called filteredZmap
// The size of the kernel is 7x7, the threshold is 30.0
EZMap16 filteredZmap;
filteredZmap.SetSize(zmap);
EFilters::RemoveNoise(zmap, filteredZmap, ENoiseRemovalMethod_HighStandardDeviation, 3, 30.0, 0.0);
C#¶
using eVision;
using eVision.Easy3D;
// Load the ZMap data
EZMap16 zmap = new EZMap16();
zmap.Load("...");
// Compute the filtered ZMap. The new ZMap is called filteredZmap // The size of the kernel is 7x7, the threshold is 30.0
EZMap16 filteredZmap = new EZMap16();
filteredZmap.SetSize(zmap);
EFilters.RemoveNoise(zmap, filteredZmap, ENoiseRemovalMethod.HighStandardDeviation, 3, 30.0F, 0.0F);
Python¶
from eVision import Easy3D
# Load the ZMap data
zmap = Easy3D.EZMap16()
zmap.Load("...")
# Compute the filtered ZMap. The ZMap is called filtered_zmap # The size of the kernel is 7x7, the threshold is 30.0
filtered_zmap = Easy3D.EZMap16()
filtered_zmap.SetSize(zmap)
Easy3D.EFilters.RemoveNoise(zmap, filtered_zmap, Easy3D.ENoiseRemovalMethod.HighStandardDeviation, 3, 30., 0.)