Phase congruence measurement for image similarity assessment
Transcript of Phase congruence measurement for image similarity assessment
www.elsevier.com/locate/patrec
Pattern Recognition Letters 28 (2007) 166–172
Phase congruence measurement for image similarity assessment
Zheng Liu, Robert Laganiere *
School of Information Technology and Engineering (SITE), University of Ottawa, 800 King Edward, Ottawa, Ont., Canada K1N 6N5
Received 22 September 2005Available online 24 August 2006
Communicated by L. Younes
Abstract
In the performance assessment of an image processing algorithm, an image is often compared with an available reference. Measuringimage similarity can be achieved in many ways; comparison algorithm varies from pixel-based mean square error method to structure-based image quality index. In this paper, we present a new feature-based approach that utilizes image phase congruency measurement toquantify the assessment of the similarities or differences between two images. Test results with standard images and industrial inspectionimages are presented.� 2006 Elsevier B.V. All rights reserved.
Keywords: Feature extraction; Phase congruence; Image comparison; Image quality evaluation
1. Introduction
The assessment of an image can be carried out by com-paring it with a reference image, which is assumed to beperfect for a particular application. Usually, such compar-ison is implemented on pixel-based operations, like meansquare error (MSE) or root mean square error (RMSE).However, such operations’ performance is questionablebecause the same MSE or RMSE value does not alwaysassure a comparable image similarity under different distor-tion to perceptually significant features (Paolo, 1998).
According to Wilson et al. (1997), there are three majormethods for comparing images: human perception, objec-tive measures based on theoretical models, and subjectivemeasures defined mathematically. In their publication(Wilson et al., 1997), they used a distance measure of twosets of pixels to characterize the numerical differencebetween two images. Metrics for binary image (Db) andgray-scale image (Dg) comparison were developed. Leesand Henshaw (1986) used a phase-only approach for
0167-8655/$ - see front matter � 2006 Elsevier B.V. All rights reserved.
doi:10.1016/j.patrec.2006.06.019
* Corresponding author. Tel.: +1 613 5625800; fax: +1 613 5625664.E-mail addresses: [email protected] (Z. Liu), [email protected].
ca (R. Laganiere).
printed circuit board (PCB) inspection. The phase-onlyimaging has the advantages of being light intensity invari-ant, insensitive to illumination gradients, and tolerant tomisregistration. Lorenzetoo and Kovesi proposed to com-pute phase difference between images using Gabor filters(Leronzetto and Kovesi, 1999). One strength of this algo-rithm resides in its ability to discriminate simple translationfrom distortion.
In practical applications, some post-processing opera-tions largely depends on the availability of image features.Operations, like classification, segmentation, and quantifi-cation, are often carried out in a feature space. Therefore,the availability of image features plays an important rolefor further analysis. This paper proposes a new feature-based method to quantitatively assess image similarity byemploying the phase congruency measurement suggestedby Kovesi (2000, 1996). Phase congruency provides anabsolute measure of image features such as step edges, linesand Mach bands; it is viewing condition-independent andinvariant to changes in illumination and magnification. Alocal cross-correlation of the phase congruence map canthen be calculated between a processed image and a refer-ence image. The averaged cross-correlation value providesa quantitative assessment of the overall image similarity.
Z. Liu, R. Laganiere / Pattern Recognition Letters 28 (2007) 166–172 167
Experiments are carried out on some standard images andon nondestructive inspection images.
The rest of the paper is organized as follows: in Section2, a brief review of current available techniques is pre-sented. Then, the proposed feature-based metric isdescribed. Experimental results are demonstrated in Sec-tion 3. Finally Section 4 is a conclusion.
2. Comparison of images
2.1. Relevant works
There are a number of metrics available for imagecomparison. The commonly used approaches include rootmean square error (RMSE), normalized least-square error(NLSE), peak signal to noise ration (PSNR), and correla-tion (CORR). The definition of these metrics mentionedabove are given in Eqs. (1)–(4) in which R(x,y) andI(x,y) stand for the reference and target image respectivelyand L is the maximum pixel value; the size of the images isM · N. These methods are widely used because they repre-sent simple algebraic quality measures that can be easilycomputed. However, they often do not match very wellwith human perception of visual quality. For example,images with a similar RMSE value may exhibit a quitedifferent appearance.
RMSE ¼
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiPMm¼1
PNn¼1½Rðm; nÞ � Iðm; nÞ�2
MN
sð1Þ
NLSE ¼
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiPMm¼1
PNn¼1½Rðm; nÞ � Iðm; nÞ�2PM
m¼1
PNn¼1½Rðm; nÞ�
2
sð2Þ
PSNR ¼ 10log10
L2
1MN
PMm¼1
PNn¼1½Rðm; nÞ � Iðm; nÞ�2
!ð3Þ
CORR ¼ 2PM
m¼1
PNn¼1Rðm; nÞIðm; nÞPM
m¼1
PNn¼1Rðm; nÞ2 þ
PMm¼1
PNn¼1Iðm; nÞ2
ð4Þ
More sophisticated methods include difference entropy(DE), mutual information (MI), and structure similarityindex measure (SSIM) (Wang and Lohmann, 2000; Wanget al., 2004). The entropy difference between two imagesreflects the difference between the average amount ofinformation they contained. It is defined as
DE ¼XL�1
g¼0
P RðgÞlog2P RðgÞ �XL�1
g¼0
P IðgÞlog2P IðgÞ�����
����� ð5Þ
where PR(g) and PI(g) are the probability of pixel value g
for the reference and input image, respectively. The mutualinformation between the input and reference images are de-fined on the normalized joint gray level histogram hRI(i, j)and normalized marginal histogram of the two images i.e.hR(i) and hI(j):
MI ¼XL
i¼1
XL
j¼1
hRIði; jÞlog2
hRIði; jÞhRðiÞhIðjÞ
ð6Þ
The SSIM metric proposed by Wang et al. (2004) isbased on the evidence that human visual system is highlyadapted to structural information and a measurement ofthe loss of structural information can provide a goodapproximation of the perceived image distortion. Thedefinition of the SSIM metric is expressed as
SSIM ¼ð2lxly þ C1Þð2rxy þ C2Þ
ðl2x þ l2
y þ C1Þðr2x þ r2
y þ C2Þð7Þ
where lx and ly are the mean values of the two images. rx,ry, and rxy are the corresponding variance values. In theabove equation, two constant values C1 and C2 are definedto avoid the instability when the denominators are veryclose to zero. These two values are further determined bytwo subjectively selected values K1, K2, and the dynamicrange of the pixel values, i.e. C1 = (K1L)2 and C2 = (K2L)2.
2.2. Feature-based image comparison
2.2.1. Phase congruency measurement
Morrone and Owens (1987) proposed an image featureperception model, which postulated that features were per-ceived at points in an image where Fourier componentswere maximally in phase. A wide range of feature typesgive rise to points of high phase congruency. Kovesi(2000) proposed a scheme to calculate the phase congru-ency with logarithmic Gabor wavelets, which allow arbi-trarily large bandwidth filters to be constructed while stillmaintaining a zero DC component in the even-symmetricfilter. The equation of the phase congruency PC(x) at somelocation x is expressed as the summation over orientation o
and scale n:
PCðxÞ ¼P
o
PnW oðxÞbAnoðxÞDUnoðxÞ � T ocP
o
PnAnoðxÞ þ e
ð8Þ
where bc denotes that the enclosed quantity is not permit-ted to be negative. An represents the amplitude of the nthcomponent in the Fourier series expansion. A very smallpositive constant e is added to the denominator in case ofsmall Fourier amplitudes. To compensates for the influenceof noise and is estimated empirically. DUn(x) is a moresensitive phase deviation and defined as
AnðxÞDUnðxÞ ¼ enðxÞ�/eðxÞ þ onðxÞ�/oðxÞ� jenðxÞ�/oðxÞ � onðxÞ�/eðxÞj ð9Þ
where �/eðxÞ ¼P
nenðxÞ=EðxÞ and �/oðxÞ ¼P
nonðxÞEðxÞ.The term E(x) is the local energy function and is expressed
asffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiðP
nenðxÞÞ2 þ ðP
nonðxÞÞ2q
. The convolution results of
the input image I(x) with quadrature pairs of filters at scalen, enðxÞ ¼ IðxÞ � M e
n and onðxÞ ¼ IðxÞ � Mon , consist of the
basic components to calculate PC(x). M en and Mo
n denotethe even-symmetric and odd-symmetric wavelet at thisscale respectively. A flowchart that describes the procedureof computing the image phase congruency map with theimage ‘‘Einstein’’ is given in Fig. 1. Only one orientationis shown and the final result is obtained by summing the
168 Z. Liu, R. Laganiere / Pattern Recognition Letters 28 (2007) 166–172
results along all the pre-defined orientations. For detailedinformation about the theory, readers are referred to Kove-si (1996).
2.2.2. Proposed strategy for image comparison
The comparison of images can be carried out by com-paring their corresponding phase congruency feature maps.It is indeed appropriate to evaluate the space-variant fea-tures locally and combine them together to obtain a globalquality index (Wang and Bovik, 2002). Cross-correlationcan be used to measure the similarity between the phasecongruency maps, which are divided into sub-blocks ini-tially. A typical choice for the size of the sub-block windowis 5 · 5.
In a phase congruency map, the sub-block windowcould be blank, i.e. all the feature points are zero at thelocations without any features. Therefore, when either ofthe sub-block windows is blank, the local cross-correlation
Fig. 1. The calculation of phase cong
value is set to zero. Conversely, if both the sub-block win-dows are blank, the cross-correlation value is set to one.For the other cases, the value is computed by the zero-mean normalized cross-correlation (ZNCC) (Martin andCrowley, 1995):
ZNCC
¼PM
m¼1
PNn¼1ðAðm; nÞ � AÞðBðm; nÞ � BÞffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiPM
m¼1
PNn¼1ðAðm; nÞ � AÞ2 �
PMm¼1
PNn¼1ðBðm; nÞ � BÞ2
qð10Þ
The above procedure is implemented as shown in Fig. 2.An overall assessment is achieved by averaging the cross-correlation values from each pre-defined region.
The phase congruency measurement is claimed to beinvariant to illumination and contrast changes. This mech-anism is in accordance with the human visual system that
ruence map (for one orientation).
Fig. 2. The procedure for computing local cross-correlation of two phasecongruence maps.
Z. Liu, R. Laganiere / Pattern Recognition Letters 28 (2007) 166–172 169
demonstrates good invariance to lighting conditions. Thefollowing experiment confirms that invariance property of
Fig. 3. The contrast-invariant prope
(a) Image ‘‘Einstein’’ o
0.7
0.75
0.8
0.85
0.9
0.95
1
1.05
1 3 5 7
Images of D
Imag
e C
om
par
iso
n
S
(b) The comparison with th
the phase congruency measure. The Matlab� function‘‘imadjust’’ was used to adjust an image contrast at differ-ent levels, as shown in Fig. 3a. Results obtained with theSSIM algorithm and our proposed method are shown inFig. 3b. Compared to SSIM, the PC metric is not sensitiveto changes in contrast.
3. Experimental results
3.1. Comparison with a reference image
An experiment involving different degraded versions ofa source image has been performed. The resulting imageswere transformed such to result in an identical root meansquare error (RMSE) although they differ in appearance.In these various processes, the original image is contami-nated by salt-pepper noise, Gaussian noise, speckle noise,mean shifting, contrast stretching, blurring operation,and JPEG compressing respectively. Besides the RMSE,a group of metrics are also computed for comparison: nor-malized least-square error (NLSE), peak signal-to-noiseratio (PSNR), correlation (CORR), difference entropy(DE), mutual information (MI), structure similarity mea-sure (SSIM), and the proposed phase congruence basedmethod (PC). The numerical results are listed in Table 1.
RMSE and NLSE have similar behavior; they cannotdistinguish the different levels of distortions that the
rty of the proposed metric (PC).
f different contrast.
9 11 13 15 17
ifferent Contrast
SIM PC
e SSIM and PC metric.
Table 1The comparison of standard images in Fig. 4
Distortion RMSE NLSE (·10�2) PSNR CORR DE MI SSIM PC
(1) Salt-pepper noise 10.9640 8.9483 25.3140 0.9960 0.0141 3.4111 0.8643 0.7569(2) Gaussian noise 11.0060 8.9823 25.4100 0.9960 0.1163 1.4347 0.6556 0.5079(3) Speck noise 11.0200 8.9935 24.5020 0.996 0.0754 1.6964 0.7032 0.5311(4) Mean shift 11.0000 8.9776 Inf 0.9963 0.0000 3.9347 0.9927 1.0000(5) Contrast stretch 10.9950 8.9739 38.6860 0.9961 0.0770 3.4654 0.9698 0.9948(6) Blur 11.0430 9.0123 25.4150 0.9959 0.0934 1.5601 0.6671 0.3478(7) JPEG compression 10.8390 8.8458 24.9880 0.9961 1.0005 1.4656 0.6824 0.3795
170 Z. Liu, R. Laganiere / Pattern Recognition Letters 28 (2007) 166–172
transformations have imposed. With MI, the larger thevalue, the more similar are the compared images. This valueis however not normalized; the MI value of the sourceimage with itself is required for an absolute measure of sim-ilarity. With DE, a value zero indicates a perfect match oftwo images. This method does not seem to be very discrim-inative but is very sensitive to compression artifacts.
As illustrated in Fig. 5, PC and SSIM seem to behavesimilarly. Phase congruency is however more sensitive to
Fig. 4. The ‘‘gold hill’’ image of different distortions: (a) original image (recontaminated image; (d) speck noise contaminated image; (e) mean shifted imaimage. (Courtesy of Dr. Z. Wang, New York University.)
the annoying degradations induced by blurring and com-pression. Most methods were not able to capture the simi-larity of the mean-shifted image. This one is obtained byadding a constant value to the image; such operation doesnot alter or destroy the structural information conveyed byan image. As a result, the PC metric reaches it maximumvalue one while the DE value is zero.
The sensitivity of the proposed method has been alsotested by the following experiment. A group of images,
ference); (b) salt-pepper noise contaminated image; (c) Gaussian noisedge; (f) contrast stretch image; (g) blurred image; and (h) JPEG compressed
0
0.2
0.4
0.6
0.8
1
1 2 3 4 5 6 7
Different Image Types
Imag
e C
om
par
iso
n
CORR
DE
SSIM
PC
Fig. 5. Comparison of an image before and after processing (index 1–7corresponds to the different distortion types listed in Table 1).
0
0.2
0.4
0.6
0.8
1
1 2 3 4 5 6 7 8 9 10
Different JPEG Compression
Met
ric
Val
ue
for
Co
mp
aris
on
SSIM
PC
Fig. 7. The comparison of JPEG compressed images.
Z. Liu, R. Laganiere / Pattern Recognition Letters 28 (2007) 166–172 171
shown in Fig. 6, has been compressed using JPEG at differ-ent level of compression. The compressed images with dif-ferent quality indices are compared with the reference oneby using the SSIM and our PC metric. The average valuesof the resulting SSIM and PC metrics are plotted in Fig. 7.The proposed PC metric appears to be more sensitive tothe structural alterations and successfully differentiatesthe results.
3.2. Nondestructive inspection tests
Images used in nondestructive testing are evaluatedbased on the X-ray thickness map, which is used as theground truth reference. In this application, the images frommulti-frequency eddy current (MF-ET) inspection andpulsed eddy current (P-ET) lift-off-intersection (LOI) scanwere fused to estimate the first layer thickness of a multi-layered aircraft lap joint structure (Liu et al., 2005). Theamount of material loss is an important metric to charac-terize the corrosion damage quantitatively. The X-raythickness map was obtained by teardown inspection inwhich the lap joint was disassembled and cleaned toremove the corroded products. Four excitation frequencieswere used based on the thickness of the aluminum plate,i.e. 5.5 kHz, 8 kHz, 17 kHz, and 30 kHz. The eddy current
Fig. 6. The images used for te
will penetrate deeper at a lower frequency; therefore, themulti-frequency results can provide information at differentdepth. The P-ET LOI scan is a time domain features ofP-ET A-scan signal and invariant to lift-off effect (Lepineet al., 2001). A so-called generalized additive model wasemployed and a backfitting algorithm was implementedto carry out the fusion operation.
In Fig. 8, the top image is the X-ray thickness map. Thefollowings are the fusion results as indicated by the firstrow of Table 2. The comparison with the X-ray referenceis assessed by SSIM, DE, MI, and PC. Results can befound in Table 2.
In this case, the SSIM metric cannot tell the differencebetween the fused results. The PC and MI reach a consis-tency in ranking the fused images.
4. Conclusion
In this paper, a new feature-based metric for image com-parison was proposed. It is based on phase congruency fea-tures that are locally correlated and from which a globalsimilarity measure is obtained. The effectiveness of thismetric has been investigated through different experimentswith standard images and NDE images. The measure isinvariant to changes in image contrast or in illumination
st of JPEG compression.
Table 2The evaluation of NDE fusion results
ET17 + ET30+ PET
ET5.5 + ET17+ PET
ET5.5 + ET8+ PET
ET5.5 + ET30+ PET
SSIM 1.0000 (*) 1.0000 (*) 1.0000 (*) 1.0000 (*)DE 0.6816 (3) 0.6701 (2) 1.0407 (4) 0.6697 (1)MI 0.8139 (1) 0.7880 (2) 0.7851 (4) 0.7878 (3)PC 0.6421 (1) 0.6131 (2) 0.5914 (4) 0.6130 (3)
The number in the bracket shows the rank assigned by the comparisonmetric.
Fig. 8. The nondestructive inspection images (from top to bottom): X-ray thickness map; image fusion results obtained by (1) ET17 + ET30 +PET; (2) ET5.5 + ET17 + PET; (3) ET5.5 + ET8 + PET; and (4) ET5.5 +ET30 + PET.
172 Z. Liu, R. Laganiere / Pattern Recognition Letters 28 (2007) 166–172
and exhibits good sensitivity to various image distortioncategories.
Comparisons with different metrics have been made;each metric having its own advantage. When assessingimage quality, the metric to be used must be carefully
selected or tailored for the particular application. Some-times, a single metric cannot completely tell the ‘‘truth’’about image quality and the use of multiple metrics couldbe a choice. Actually, image quality and image comparisonare two related but distinct topics. For example, if there is aspatial shift on the resulting image, the image is ‘‘different’’from the original one, but what should be stated about itsquality? Universal image quality measurement is still extre-mely difficult to achieve.
One limitation of the proposed approach is its comput-ational efficiency. Nevertheless, through using a separableapproximation, the non-separable orientational filters canbe decomposed into a sum of separable filters as proposedin (Kubota, 1995). The computational load can be reduced.In our implementation, we use cross-correlation to evaluatethe similarity of the feature maps. In future works, the dis-tance measure used for Dg could also be considered.
References
Kovesi, P., 1996. Invariant measures of image features from phaseinformation, Ph.D. thesis, University of Western Australia.
Kovesi, P., 2000. Phase congruency: A low-level image invariant. Psychol.Res. 64, 134–148.
Kubota, T., 1995. Orientational filters for real–time computer visionproblems, Ph.D. thesis, Georgia Institute of Technology.
Lees, D.E.B., Henshaw, P.D., 1986. Printed circuit board inspection – anovel approach. In: Proc. SPIE (Automated Inspection and Measure-ment), pp. 164–173.
Lepine, B.A., Giguere, J.S.R., Forsyth, D.S., Dubois, J.M.S., Chahbaz,A., 2001. Applying pulsed eddy current NDI to the aircraft hiddencorrosion problem. In: Proc. 5th NASA/FAA/DoD Conf. on AgingAircraft, Orlando, Florida.
Leronzetto, G.P., Kovesi, P., 1999. A phase based image comparisontechnique. In: Proc. DICTA, Western Australia.
Liu, Z., Forsyth, D.S., Komorowski, J.P., 2005. Fusion of multimodal NDIimages for aircraft corrosion detection and quantification. In: Blum, R.,Liu, Z. (Eds.), Multi-Sensor Image Fusion and Its Applications,Signal Processing and Communications. CRC Press, pp. 393–422,Chapter 13.
Martin, J., Crowley, J.L., 1995. Experimental comparison of correlationtechniques. In: Proc. Internat. Conf. on Intelligent AutonomousSystems.
Morrone, M.C., Owens, R.A., 1987. Feature detection from local energy.Pattern Recognition Lett., 303–313.
Paolo, G., Image comparison metrics: A review, May 1998. Availablefrom: <http://www.csse.uwa.edu.au/gian/research. htm>.
Wang, Z., Bovik, A.C., 2002. A universal image quality index. IEEESignal Process. Lett. 9 (3), 81–84.
Wang, Y., Lohmann, B. 2000. Multisensor image fusion: Concept, methodand applications, Technical Report, Institut fur Automatisierungs-technik, Universitat Bremen, German.
Wang, Z., Bovik, A.C., Sheikh, H.R., Simoncelli, E.P., 2004. Imagequality assessment: From error visibility to structural similarity. IEEETrans. Image Process. 13 (4), 600–612.
Wilson, D.L., Baddeley, A.J., Owens, R.A., 1997. A new metric forgrey-scale image comparison. Internat. J. Comput. Vision 24 (1),5–17.