Temporal Noise Reduction
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. // /////////////////////////////////////////////////// // 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);