Falcon4 86M Cameras
Contents
41
The median filter algorithm, below, is used to replace defection rows and columns.
Median Filter
Enable the median filter by setting the medianFilter to Active (Image Format Controls). Setting this
filter to Off disables the medianFilter.
When the Median Filter is Active, then the Median Filter Threshold value controls the decision to
replace the pixel value. Replacement occurs when a pixel‘s current value differs from the median
value of a 3 x 3 kernel by more than the threshold value. The pixel is replaced by the median value
of a 3 x 3 kernel.
The algorithm is described below for monochrome cameras. Color cameras use the pixels of same
color in the matrix.
1.
3X3 2D median filter algorithm
a.
First step calculation the 5 elements median value Pm1 and Pm2
P1 P2 P3 P1 P3
P4 P5 P6 => P5 => Med{P1, P3, P5, P7, P9} => Pmx;
P7 P8 P9 P7 P9
P1 P2 P3 P2
P4 P5 P6 => P4 P5 P6 => Med{P2, P4, P5, P6, P8} => Pmc;
P7 P8 P9 P8
b.
Second step calculation the 3 elements median
Med{P5, Pmx, Pmc} => Pm;
c.
Third step check the threshold(8bit value and default=255)
if (|P5 – Pm| > threshold) then
P5 output <= Pm;
else
P5 output <= P5;
end if;
2.
Defect Pixel Replacement 3x3 2D Replacement
Each pixel with input defect flag associated if the flag is 1 the pixel will be do the 2D median
filter but without check threshold.
File Access via the CamExpert Tool
1.
Click on the “Setting…” button to show the file selection menu.