Noise Reduction by Integration
Functional Guide | Reference

Functional Guide | Reference: Oper
///////////////////////////////////////////////////
// This code snippet shows how to perform noise //
// reduction by temporal averaging. //
///////////////////////////////////////////////////
// Images constructor
EImageBW16 noisyImage, cleanImage;
// 16 bits work image used as an accumulator
EImageBW16 store;
// ...
// All images must have the same size
cleanImage.SetSize(&noisyImage);
store.SetSize(&noisyImage);
// Clear the accumulator image
EasyImage::Oper(EArithmeticLogicOperation_Copy, (EBW16)0, &store);
// Accumulation loop
int n;
for (n=0; n < 10; n++)
{
// Acquire a new image into noisyImage
// ...
// Add this new noisy image into the accumulator
EasyImage::Oper(EArithmeticLogicOperation_Add, &noisyImage, &store, &store);
}
// Perform noise reduction
EasyImage::Oper(EArithmeticLogicOperation_Divide, &store, (EBW16)n, &cleanImage);
'///////////////////////////////////////////////////
'// This code snippet shows how to perform noise //
'// reduction by temporal averaging. //
'///////////////////////////////////////////////////
' EasyImage context constructor
Dim EasyImage As New EasyImage
' Images constructor
Dim noisyImage As New EImageBW16
Dim cleanImage As New EImageBW16
' 16 bits work image used as an accumulator
Dim store As New EImageBW16
' ...
' All images must have the same size
cleanImage.SetSize noisyImage.Width, noisyImage.Height
' ...
' Clear the accumulator image
Dim bw16 As EBW16
bw16.value = 0
EasyImage.OperPixel EArithmeticLogicOperation_Copy, bw16, store
' Accumulation loop
Dim n As Long
For n = 0 To 10
' Acquire a new image into noisyImage
' ...
' Add this new noisy image into the accumulator
EasyImage.OperImageImage EArithmeticLogicOperation_Add, noisyImage, store, store
Next
' Perform noise reduction
bw16.value = n
EasyImage.OperImagePixel EArithmeticLogicOperation_Divide, store, bw16, cleanImage
///////////////////////////////////////////////////
// This code snippet shows how to perform noise //
// reduction by temporal averaging. //
///////////////////////////////////////////////////
// Images constructor
EImageBW16 noisyImage= new EImageBW16();
EImageBW16 cleanImage= new EImageBW16();
// 16 bits work image used as an accumulator
EImageBW16 store= new EImageBW16();
// ...
// All images must have the same size
cleanImage.SetSize(noisyImage);
store.SetSize(noisyImage);
// Clear the accumulator image
EBW16 bw16= new EBW16(0);
EasyImage.Oper(EArithmeticLogicOperation.Copy, bw16, store);
// Accumulation loop
int n;
for (n = 0; n < 10; n++)
{
// Acquire a new image into noisyImage
// ...
// Add this new noisy image into the accumulator
EasyImage.Oper(EArithmeticLogicOperation.Add, noisyImage, store, store);
}
// Perform noise reduction
bw16.Value= (byte)n;
EasyImage.Oper(EArithmeticLogicOperation.Divide, store, bw16, cleanImage);

Functional Guide | Reference: Oper, SetRecursiveAverageLUT, RecursiveAverage
///////////////////////////////////////////////////
// This code snippet shows how to perform noise //
// reduction by recursive averaging. //
///////////////////////////////////////////////////
// Images constructor
EImageBW8 noisyImage, cleanImage;
// 16 bits work image used as an accumulator
EImageBW16 store;
// ...
// All images must have the same size
cleanImage.SetSize(&noisyImage);
store.SetSize(&noisyImage);
// Clear the accumulator image
EasyImage::Oper(EArithmeticLogicOperation_Copy, (EBW16)0, &store);
// Prepare the transfer lookup table (reduction factor = 3)
EBW16Vector lut;
EasyImage::SetRecursiveAverageLUT(&lut, 3.f);
// Perform the noise reduction
EasyImage::RecursiveAverage(&noisyImage, &store, &cleanImage, &lut);
'///////////////////////////////////////////////////
'// This code snippet shows how to perform noise //
'// reduction by recursive averaging. //
'///////////////////////////////////////////////////
' EasyImage context constructor
Dim EasyImage As New EasyImage
' Images constructor
Dim noisyImage As New EImageBW8
Dim cleanImage As New EImageBW8
' 16 bits work image used as an accumulator
Dim store As New EImageBW16
' ...
' All images must have the same size
cleanImage.SetSize noisyImage.Width, noisyImage.Height
' ...
' Clear the accumulator image
Dim bw16 As EBW16
bw16.value = 0
EasyImage.OperPixel EArithmeticLogicOperation_Copy, bw16, store
' Prepare the transfer lookup table (reduction factor = 3)
Dim lut As New EBW16Vector
EasyImage.SetRecursiveAverageLUT lut, 3#
' Perform the noise reduction
EasyImage.RecursiveAverage noisyImage, store, cleanImage, lut
///////////////////////////////////////////////////
// This code snippet shows how to perform noise //
// reduction by recursive averaging. //
///////////////////////////////////////////////////
// Images constructor
EImageBW8 noisyImage= new EImageBW8();
EImageBW8 cleanImage= new EImageBW8();
// 16 bits work image used as an accumulator
EImageBW16 store= new EImageBW16();
// ...
// All images must have the same size
cleanImage.SetSize(noisyImage);
store.SetSize(noisyImage);
// Clear the accumulator image
EBW16 bw16= new EBW16(0);
EasyImage.Oper(EArithmeticLogicOperation.Copy, bw16, store);
// Prepare the transfer lookup table (reduction factor = 3)
EBW16Vector lut= new EBW16Vector();
EasyImage.SetRecursiveAverageLUT(lut, 3.0f);
// Perform the noise reduction
EasyImage.RecursiveAverage(noisyImage, store, cleanImage, lut);
See also in the Functional Guide
See also in the Reference