produce the unwanted artifacts and still retains the angular information about the ... complexity due to the need to rotate filter mask to detect details with different ...
Complex 2D Matched Filtering Without Halo Artifacts Mihails Pudzs, Modris Greitans, and Rihards Fuksis Institute of Electronics and Computer Science 14 Dzerbenes Str., Riga, LV1006, Latvia Email: {Mihails.Pudzs; Modris.Greitans; Rihards.Fuksis}@edi.lv http://www.edi.lv
Abstract—Accurate extraction of previously defined objects from noisy images is still a challenge for most image processing systems. There is a trade-off between the unwanted and useful amount of extracted information. From quality aspect, the matched filtering approach is preferable, as it significantly reduces the amount of unwanted information; however, the segmentation of filtered images usually is difficult. Complex matched filtering does the opposite: it provides the additional information, which simplifies the segmentation procedure; however, the resulting images are filled with the unwanted artifacts. This paper introduces the improved 2D complex matched filtering approach. The approach discussed in this paper doesn’t produce the unwanted artifacts and still retains the angular information about the extracted objects. This improvement is significant for the systems that are sensitive to noise and demand precise segmentation results. Index Terms—Image processing, feature extraction, matched filters.
I. I NTRODUCTION
a) Re part Fig. 1.
b) Im part
CMF complex kernel for dark LLO detection
II. C OMPLEX 2D M ATCHED FILTERING CMF is based on MF, and extends this approach using complex numbers. In its short form, CMF requires one convolution operation with the complex kernel to detect LLO of given intensity, with any orientation. Figure 1 shows the CMF kernel, composed using MF masks from Fig. 2, and used for dark line detection. The result of CMF of image f (x, y) is a matrix of vectors: ~c(x, y) = c(x, y) · ejϕ(x,y) ,
Matched filtering (MF) [1], [2], [3] is often used for known object extraction in images with poor quality (noise present). It maximizes the signal to noise ratio, however has a few drawbacks. One disadvantage of the MF is computational complexity due to the need to rotate filter mask to detect details with different angular orientations. If MF mask M (x, y) has X and Y mirror symmetries, for minimum angular precision 4 mask angles are necessary, which leads to at least 4 convolution operations. At least 4 mask images must be stored in the systems memory, or mask rotation algorithm must be implemented. Usage of traditional MF (TMF) is a trade-off between angular precision, speed and systems memory. Other disadvantage is that the further image segmentation procedure is complicated, because the MF output is a matrix of scalar values. We have introduced complex 2D MF (CMF) in [4] as an angle invariant line-like object (LLO) detection filter. Fragments of lines and edges are the LLO that we observe in this paper. Each LLO is characterized by its angular orientation, and the intensity (it is either darker or brighter than the surrounding background). CMF provides additional information about angular orientation of extracted objects, which simplifies the segmentation procedure. We have successfully used CMF for palm blood vessel image processing in biometrics [5], [6].
(1)
where c and ϕ are magnitude and phase of CMF reactions. Additional operations are performed after CMF, such as angle decrement by half, to obtain: ~v (x, y) = v(x, y) · ejψ(x,y) = c(x, y) · ej
ϕ(x,y) 2
,
(2)
where ~v (x, y) are matching intensity vectors. Magnitude v shows the matching intensity of image fragment with MF masks; phase ψ points the direction of detected LLO. In its full form, without combining masks into one complex kernel, CMF requires matched filtering with the MF masks, rotated in the angular interval ϕn ∈ [0; π): n · π, (3) ϕn = N where n = 0. . . (N -1), N is total number of used MF mask angles (specifies the angular precision). Figure 2 shows the MF masks for N =8, further referred to as M (x, y; ϕn ): gray color represents the zero level, dark pixels have negative values, and white − positive values. MF response at the particular point (x0 , y0 ) can be formally expressed as: M F (x0 , y0 ; ϕn ) ≡ sn (x0 , y0 , ϕn ) = ZZ f (x, y) · M (x − x0 , y − y0 ; ϕn ) · dxdy D
(4)
Fig. 2.
MF masks for dark LLO detection (8 angles)
(a) Objects
(b) vectors
(c) vectors
Fig. 3. Matched filtering responses for LLO and non-LLO (a) in vector form (b and c) Fig. 5.
In (4), f (x, y) is the image being filtered, and D is the MF mask M overlay area. After MF at different angles, the acquired scalar MF responses sn (x0 , y0 ; ϕn ) are transformed into complex responses cn (x0 , y0 ; ϕn ) by assigning the phase value, which is equal to the double of MF masks orientation angle: ~cn (x0 , y0 ; ϕn ) = sn (x0 , y0 ; ϕn ) · ej2ϕn (5) This operation was proposed in [4] to assign opposite phases to complex MF responses from the perpendicularly oriented masks (∆ϕ = 90◦ ). The proposition was based on the observation of different MF responses in cases of LLO, and non-LLO (including noise). MF responses to LLO are mostly oriented in the LLO direction, while responses, perpendicular to LLO, are weaker (Fig.3b); in case of non-LLO both parallel and perpendicular (to the initially observed LLO) responses are similar in value (Fig.3c). Figures 3b and c show the MF responses for objects in (a) in vector form of sn (x0 , y0 ; ϕn ) · ejϕn . MF mask in Fig. 3 is placed into the center of the observed objects. The result of CMF is obtained by summing all complex reactions together:
III. H ALO ARTIFACT We use slightly noised test image with blurred circle (Fig.4a) to examine all possible angular orientations of the circular line. CMF is aimed to detect dark LLO, which in this image are represented by the: 1) dark line, 2) edges of the white line. White line and black line edges (further referred to as LLO of opposite intensity) should not be detected, however, the magnitude of matching intensity vectors shows the opposite (Fig.4b). Figure 4c divides the test image into areas where the detection should (”+”) and should not (”×”) occur. Further, the areas, where incorrect detection has occurred, are referred to as the Halo areas; and the matching intensity vectors in these areas are called Halo artifact. Halo artifacts are perpendicular to the LLO of the opposite intensity (Fig. 5). LLO areas
Given the opposite phases, complex responses from perpendicularly oriented MF masks will jointly attenuate preventing filter from detection of non-LLO. We intentionally skip the part about combining MF masks together into one complex kernel. CMF produces Halo artifact, which is discussed in next sections.
L INE
(6)
E DGE
~cn (x0 , y0 ; ϕn )
n=0
O BJECT AREAS
~c(x0 , y0 ) =
N −1 X
Matching intensity vectors for test image
Fig. 4.
(b) CMF result
(c) Detection areas
Test image and its CMF result
L INE E DGE
(a) Test image
O BJECT AREAS
Halo areas
V. H ALO ARTIFACT REMOVAL The proposed technique of Halo artifact elimination is based on the avoidance of the negative values of correlation, which gives a desired result of ~v (x0 , y0 ) ≈ 0 in the Halo areas. This is achieved by applying the ramp function (11) [7] to the MF results. ( x, x ≥ 0 (11) R[x] = 0, x < 0
(a) with positive values
For convenience, we call the CMF, which does not produce the Halo artifact, as Non-Halo CMF (NH−CMF). Previously stated solution is summarized in the following algorithm of NH−CMF:
(b) with negative values Fig. 6.
Mask correlation with LLO of different intensities
IV. N EGATIVE VALUES OF CORRELATION Sixteen areas of the test image are observed, where we calculate MF reactions sn (x0 , y0 ; ϕn ) of LLO and LLO of the opposite intensity, with horizontal, vertical and diagonal orientations. These are demonstrated in vector form of sn (x0 , y0 ; ϕn ) · ejϕn in the given table. Positive MF reactions sn · ejϕn will lie in the first and second quadrants, because of the MF mask rotation interval of ϕn ∈ [0; π) that was set in (3). It can be seen that in the Halo areas negative MF reactions are dominant. When the filter mask is opposite to the image fragment it is placed on, the value of the correlation (4) is negative. In cases of LLO represented by the edge, filter mask is only partially correlated with the image fragment; therefore, the MF reactions are less intense. Six different cases of mask and LLO correlation are shown in Fig. 6. Due to the correlation with negative value, sn (x0 , y0 ; ϕn ) < 0,
(7)
and after assigning the phase value of 2ϕn ,
1. Performing the Matched filtering at each angle ϕn sn (x, y; ϕn ) = M F (x, y; ϕn ), 2. Applying the ramp function cn (x, y; ϕn ) = R[sn (x, y; ϕn )], 3. Assigning the angle of 2ϕn ~cn (x, y; ϕn ) = cn (x, y; ϕn ) · ej2ϕn , 4. Summing the complex reactions NP −1 ~c(x, y) = ~cn (x, y; ϕn ) = c(x, y) · ejϕ(x,y) , n=0
5. Decreasing the angle by half ϕ(x,y) ~v (x, y) = c(x, y) · ej 2 . MF mask must be bipolar (with no mean value) to have property to produce negative responses. VI. E XAMPLES Figure 7 shows an improved performance of NH−CMF, compared to CMF, shown previously in Fig.4b. Comparing to the TMF, which is defined by (12) [1], NH−CMF extracts fewer details, that do not represent the circle line in the test image in Fig.4a. T M F (x0 , y0 ) = maxϕn [M F (x0 , y0 ; ϕn )]
~cn (x0 , y0 ; ϕn ) = −|sn (x0 , y0 ; ϕn )| · ej2ϕn = ◦
|sn (x0 , y0 ; ϕn )| · ej2ϕn · ej·180
(12)
(8)
If most of the complex reactions are negative and intense, then the sum in (6) is approximately equal to ◦
~c(x0 , y0 ) ≈ ej·180 ·
N −1 X
ej2ϕn · |sn (x0 , y0 ; ϕn )| =
n=0
e
j·180◦
· ~g (x0 , y0 ) = e
j·180◦
· g(x0 , y0 ) · e
(9)
jϕ
where ~g (x0 , y0 ) is the vector, that is acquired by detecting the LLO of the opposite intensity. that the opposite MF mask (of the LLO of the opposite intensity) would produce. By applying the angle decrement operation (2), vector, which is perpendicular to the LLO of the opposite intensity, is expected: ◦
~v (x0 , y0 ) = g(x0 , y0 ) · ejψ(x,y) · ej·90
(10)
This analysis explains the tendency, observed in the Fig. 5.
(a) TMF Fig. 7.
(b) NH-CMF
NH-CMF performance
Figures 8 and 9 compare the performance of different filters on two test images: palm blood vessels (line detection task), and palm (contour detection task).
This additional information simplifies the LLO tracing/segmentation procedure, that usually follows after the image filtration. Our future and current work is based on the development of fast algorithms for NH−CMF, that requires less arithmetical operations than TMF. a) Input image
b) TMF result
a) Input image
b) TMF result
c) CMF result
c) CMF result Fig. 9.
d) NH-CMF result
Different filter performance for edge detection
d) NH-CMF result R EFERENCES Fig. 8.
Different filter performance for line detection
VII. C ONCLUSION The method, proposed in this paper improves the quality of complex matched filter, as seen in previous section. The results are less filled with the unwanted details, because, unlike CMF, NH−CMF only detects LLO that positively correlates with the MF mask. However, the NH−CMF is only available in its full form because of applied non-linear operations (11): linear combination of MF masks into one complex mask [5], [4] is not possible. Therefore, the NH−CMF approach still needs at least 4 convolution operations (with the MF masks stored in systems memory). The results of NH−CMF are comparable to TMF, however, it has better angular resolution, also providing the additional information about angular orientation of extracted LLO.
[1] S. Chaudhuri, S. Chatterjee, N. Katz, M. Nelson, and M. Goldbaum, “Detection of blood vessels in retinal images using two-dimensional matched filters,” in IEEE transactions on medical imaging, Vol.8, Issue:3. IEEE, 1989, pp. 263–269. [2] R. C. Gonzalez and R. E. Woods, Digital image processing, 3rd ed. Prentice Hall, 2007. [3] M. Sonka, V. Hlavac, and R. Boyle, Image Processing, Analysis, and Machine Vision, 3rd ed. CL-Engineering, 2007. [4] M. Greitans, M. Pudzs, and R. Fuksis, “Object analysis in images using complex 2d matched filters,” in EUROCON 2009: Proceedings of IEEE Region 8 conference. IEEE, 2009, pp. 1392–1397. [5] M. Greitans, M. Pudzs, and R. Fuksis, “Palm vein biometrics based on infrared imaging and complex matched filtering,” in MM&Sec ’10: Proceedings of the 12th ACM workshop on Multimedia and security. New York, NY, USA: ACM, 2010, pp. 101–106. [6] O. Nikisins, M. Greitans, R. Fuksis, M. Pudzs, and Z. Serzane, “Increasing the reliability of biometric verification by using 3d face information and palm vein patterns,” in BIOSIG 2010, Proceedings of the Special Interest Group on Biometrics and Electronic Signatures, 2010, pp. 133– 138. [7] I. Nagrath, S. Sharan, and R. Ranjan, Signals and Systems, 2nd ed. Tata McGraw Hill Eduaction Private Limited, 2009.