Proceedings of the International MultiConference of Engineers and Computer Scientists 2015 Vol I, IMECS 2015, March 18 - 20, 2015, Hong Kong

Application of YIQ for Color Pattern Recognition with Shifted and Rotated Training Images in Optoelectronic Correlator

Yachu Hsieh, Chulung Chen*, Hsinyi Chen, Yiting Tsai

is deviations from purple-luminance to chartreuse–luminance. Abstractβ€”This research uses multi-channel system for It transform RGB source into one luminance and two chromatic pattern recognition, which reduces the size components by linear conversion. The requirement of liquid crystal device. We transform a transformation from RGB to YIQ is shown below. color image into three YIQ components. Via

the utilization of Mach-Zehnder joint transform 0.299 0.587 0.114 correlator, the minimum average correlation energy = 0.596 0.275 0.321 . (1) method, shifted training images, and computation, we π‘Œπ‘Œ 0.212 0.523 0.311 𝑅𝑅 will obtain the reference functions by the minimum οΏ½ 𝐼𝐼 οΏ½ οΏ½ βˆ’ βˆ’ οΏ½ �𝐺𝐺�

sidelobe energy technique and record the relevant data. It 𝑄𝑄 βˆ’ 𝐡𝐡 is found that the sidelobe energy drops substantially. The structure of optical correlator [12,13] is shown in Fig. 1. A laser is used to be the light source. In the beginning, we Index Termsβ€”Minimum average correlation energy, training define the position functions of reference and target images image, YIQ color space, Mach-Zehnder joint transform on the two input planes. There are three images hy, correlator, liquid crystal spatial light modulator. hi and hq, corresponding to the y, i and q channels of the reference image. Analogously, another three grayscale images ty, ti and tq, are matched to the Y, I and Q channels of I. INTRODUCTION the target image. The arrangement of input plane in Real time joint transform correlator (JTC) [1] is an RLCSLM1 and RLCSLM2 are shown in Figs. 2 and 3. The attractive tool for pattern recognition. It can perform reference and target image channels placed on the RLCSLM1 correlation of two functions to realize the aim. Later, and RLCSLM2 respectively can be expressed as non-zero order JTC (NOJTC) [2-4] was utilized to remove the zero order term. High correlator peak intensity and small 3 sidelobe energy were obtained. Chen et al. [5-10] utilized the βˆ‘ m ( , ++= aydxhh m ), (2) minimum average correlation energy (MACE) method based m=1 on Lagrangian method to obtain the reference function. The Mach-Zehnder JTC (MZJTC) [11,12] can accomplish the and removed zero term processing in only one step directly. In this paper, the sytem was based on MZJTC, we obtain the 3 reference functions by cross correlation optimization (), +βˆ’= aydxtt . (3) technique and find the minimum sidelobe energy by shifted βˆ‘ n n n=1 training images. In the paper, we will use MACE as well as shifted training images [13,14] to study the performance for Here d is the distance of either the reference image or target image recognition in the MZJTC system. image channel away from the horizontal axis; h represents the position function of reference image at RLCSLM1; t II. ANALYSIS represents the position function of target image at RLCSLM2. RGB color model [15-17] is used widely and is easy to After coming out of RLCSLM1 and RLCSLM2, the two understand. It consists of the red, green and blue respectively. collimated light will take the information and be Fourier However, RGB color model is not the most suitable color transformed by Fourier lens (FLs). Both lights encounter model on many applications. In this research, the system is fractional reflection and transmission at BS3. Joint transform based on YIQ color model [18]. Y means luminance that power spectrums (JTPSs) of two light fields will be detected represents the achromatic (black and white) image without by CCD1 and CCD2. The summation of spectra on CCD1 is any color. I and Q are the two chrominance components. I is deviations from orange-luminance to cyan-luminance and Q ( ) ( , ) = 3 ( , ) Manuscript received July 29, 2013.. This work was supported by the 𝑗𝑗2πœ‹πœ‹ 𝑑𝑑𝑑𝑑+π‘Žπ‘Žπ‘šπ‘šπ‘£π‘£ 1 1 π‘šπ‘š National Science Council in Taiwan, under Grant No. NSC 102-2221-E-155 𝐸𝐸 𝑒𝑒 𝑣𝑣 + οΏ½ 𝜏𝜏 βˆ™ 𝐻𝐻 (𝑒𝑒 ,𝑣𝑣 )βˆ™ 𝑒𝑒 ( ). (4) -082- MY2 π‘šπ‘š=1 3 βˆ’π‘—π‘—2πœ‹πœ‹ π‘‘π‘‘π‘‘π‘‘βˆ’π‘Žπ‘Žπ‘›π‘›π‘£π‘£ Yachu Hsieh is with the institute of Photonics Engineering, Yuan Ze 𝑛𝑛=1 1 π‘šπ‘š university, 135 Yung Tung Road, Taoyuan 32026, Taiwan. On the other hand, theβˆ‘ summation𝛾𝛾 βˆ™ 𝑇𝑇 𝑒𝑒 of𝑣𝑣 spectraβˆ™ 𝑒𝑒 on CCD2 is Chulung Chen is with the institute of Photonics Engineering, Yuan Ze university, 135 Yung Tung Road, Taoyuan 32026, Taiwan. (Corresponding author. Phone: +886-3-4638800 ext 7513; Fax: +886-3-4639355; E-mail: [email protected]).

ISBN: 978-988-19253-2-9 IMECS 2015 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online) Proceedings of the International MultiConference of Engineers and Computer Scientists 2015 Vol I, IMECS 2015, March 18 - 20, 2015, Hong Kong

64 Γ— 64 pixels. First, we transform a color image into three ( ) ( , ) = 3 ( , ) YIQ color space components. It is shown in Fig. 5. Then, 𝑗𝑗2πœ‹πœ‹ 𝑑𝑑𝑑𝑑+π‘Žπ‘Žπ‘šπ‘šπ‘£π‘£ Β° Β° 2 1 π‘šπ‘š three components are rotated angles from 5 to 360 (in step 𝐸𝐸 +𝑒𝑒 𝑣𝑣 οΏ½ 𝛾𝛾 (βˆ™ 𝐻𝐻, ) 𝑒𝑒 𝑣𝑣 βˆ™ 𝑒𝑒( ). (5) π‘šπ‘š=1 of 5Β°) and shifted (x = -5 to x = 5 in the horizontal direction, 3 βˆ’π‘—π‘—2πœ‹πœ‹ π‘‘π‘‘π‘‘π‘‘βˆ’π‘Žπ‘Žπ‘›π‘›π‘£π‘£ the interval is 1 pixel, y = -5 to y = 5 in the vertical direction, βˆ‘π‘›π‘›=1 𝜏𝜏2 βˆ™ π‘‡π‘‡π‘šπ‘š 𝑒𝑒 𝑣𝑣 βˆ™ 𝑒𝑒 We connect the outputs of the CCD1 and CCD2 to the the interval is 1 pixel) at the same time. The reference images electronic subtractor (ES) to remove the zero order term as are synthesized by the training images. Subsequently, we follows. utilize training set images with different rotation angles to be the target images for the image recognition test. We obtain ( , ) = | ( , )| | ( , )| the reference functions of the minimum sidelobe energy and = (| | | | ) 2 (2 , ) ( , ) record the relevant data. It is found that the sidelobe energy 𝐼𝐼𝑠𝑠 𝑒𝑒 𝑣𝑣 𝐸𝐸2 𝑒𝑒 𝑣𝑣 βˆ’ 𝐸𝐸1 𝑒𝑒 𝑣𝑣 2 2 3 3 βˆ— β€² drops substantially. The desired peak can be detected and 1 1 π‘šπ‘š=1 β€² π‘šπ‘š 𝛾𝛾 βˆ’ 𝜏𝜏 βˆ™ βˆ‘ βˆ‘π‘šπ‘š =1 𝐻𝐻 𝑒𝑒 𝑣𝑣 𝐻𝐻 π‘šπ‘š 𝑒𝑒 𝑣𝑣 βˆ™ sidelobes are diminished. One example is shown in Fig. 6. In 𝑗𝑗2πœ‹πœ‹οΏ½π‘§π‘§π‘šπ‘šβˆ’π‘§π‘§π‘šπ‘šβ€²οΏ½π‘£π‘£ contrast with the unshifted training images, the sidelobe +(| | | | ( , ) ( , ) 𝑒𝑒 ) energy for shifted training images decreases by 60.9%, as 3 ( 2 ) 2 3 β€² βˆ— β€² shown in Fig. 7. We also record the results of PSR for each 𝜏𝜏2 βˆ’ 𝛾𝛾2 βˆ™ βˆ‘ 𝑛𝑛=1 βˆ‘ 𝑛𝑛 =1 𝑇𝑇 𝑛𝑛 𝑒𝑒 𝑣𝑣 𝑇𝑇 𝑛𝑛 𝑒𝑒 𝑣𝑣 βˆ™ (6) 𝑗𝑗2πœ‹πœ‹ π‘§π‘§π‘›π‘›βˆ’π‘§π‘§π‘›π‘›β€² 𝑣𝑣 target image and compare the results of between original and 𝑒𝑒+( ) ( , ) ( , ) shifted. Average PSR value increases by 1.22 times, as ( βˆ— ) βˆ— 3 3 βˆ— shown in Fig. 8. 2[ 1 1 2 ] π‘šπ‘š=1 𝑛𝑛=1 π‘šπ‘š 𝑛𝑛 𝜏𝜏 𝛾𝛾 βˆ’ 𝜏𝜏 𝛾𝛾 βˆ™ βˆ‘ βˆ‘ 𝐻𝐻 𝑒𝑒 𝑣𝑣 𝑇𝑇 𝑒𝑒 𝑣𝑣 βˆ™ π‘šπ‘š 𝑛𝑛 𝑗𝑗2πœ‹πœ‹ 𝑧𝑧 βˆ’π‘§π‘§ 𝑣𝑣+2𝑑𝑑𝑑𝑑 ( ) ( ) 𝑒𝑒+( ) , , βˆ—[( ) βˆ— ] 3 3 βˆ— IV. CONCLUSION 𝜏𝜏2 𝛾𝛾1 βˆ’ 𝜏𝜏1𝛾𝛾2 βˆ™ βˆ‘ π‘šπ‘š=1 βˆ‘π‘›π‘›=1 𝐻𝐻 π‘šπ‘š 𝑒𝑒 𝑣𝑣 𝑇𝑇𝑛𝑛 𝑒𝑒 𝑣𝑣 βˆ™ βˆ’π‘—π‘—2πœ‹πœ‹ π‘§π‘§π‘šπ‘šβˆ’π‘§π‘§π‘›π‘› 𝑣𝑣+2𝑑𝑑𝑑𝑑 In this work, via the utilization of MZJTC, the minimum 𝑒𝑒 average correlation energy method, shifted training images, Using the Stokes relations from optics knowledge, we obtain and computation. This system could remove the zero order the equation = 、| | = | | and | | = | |, then term in only one step. We will obtain the reference functions rewrite the Eq. (7) as of the minimum sidelobe energy. The result in the thesis are 2 1 1 1 2 2 𝛾𝛾 βˆ’π›Ύπ›Ύ 𝛾𝛾 𝜏𝜏 𝛾𝛾 𝜏𝜏 obviously shown and indicate ideal performance as anticipated. = 2| | 3 3 | ( , )|| ( , )| βˆ— βˆ— 𝐼𝐼𝑠𝑠 {2 [𝜏𝜏(2𝛾𝛾1 βˆ’ 𝜏𝜏)1 𝛾𝛾+2 2βˆ™ οΏ½] + οΏ½+π»π»π‘šπ‘š (𝑒𝑒 ,𝑣𝑣 ) 𝑇𝑇𝑛𝑛 𝑒𝑒( 𝑣𝑣, )βˆ™, (7) π‘šπ‘š=1 𝑛𝑛=1 π‘šπ‘š 𝑛𝑛 𝑐𝑐𝑐𝑐𝑐𝑐 πœ‹πœ‹ π‘Žπ‘Žπ‘šπ‘š βˆ’ π‘Žπ‘Žπ‘›π‘› 𝑣𝑣 𝑑𝑑𝑑𝑑 πœƒπœƒ πœƒπœƒπ»π» 𝑒𝑒 𝑣𝑣 βˆ’ πœƒπœƒπ‘‡π‘‡ 𝑒𝑒 𝑣𝑣 where is the phase of , and denote the phase of | ( , )| and βˆ—| ( βˆ—, )| , respectively. The πœƒπœƒ 𝜏𝜏2𝛾𝛾1 βˆ’ 𝜏𝜏1 𝛾𝛾2 πœƒπœƒπ»π»π‘šπ‘š πœƒπœƒπ‘‡π‘‡π‘›π‘› zero order term is removed. Is is called Mach-Zehnder JTPS π‘šπ‘š 𝑛𝑛 (MZJTPS). Then𝐻𝐻 we𝑒𝑒 sen𝑣𝑣 d the MZJTPS𝑇𝑇 𝑒𝑒 𝑣𝑣 to RLCSLM3. With inverse Fourier transform by FL3, the cross-correlation output will be obtained in CCD3 as follows:

( ) ( , ) = 3 3 ( , ) ( + 2 , + ) βˆ’π‘—π‘—π‘—π‘— π‘šπ‘šπ‘šπ‘š π‘šπ‘š 𝑛𝑛 +π‘œπ‘œ π‘₯π‘₯ 𝑦𝑦 οΏ½ οΏ½ 𝑐𝑐 ( ,βˆ’π‘₯π‘₯) βˆ’π‘¦π‘¦(⨂𝛿𝛿 π‘₯π‘₯2 , 𝑑𝑑+𝑦𝑦 βˆ’π‘Žπ‘Ž π‘Žπ‘Ž) (𝑒𝑒 ). (8) π‘šπ‘š=1 𝑛𝑛=1 3 3 βˆ— 𝑗𝑗𝑗𝑗 βˆ‘π‘šπ‘š=1 βˆ‘π‘›π‘›=1 𝑐𝑐 π‘šπ‘šπ‘šπ‘š π‘₯π‘₯ 𝑦𝑦 ⨂𝛿𝛿 π‘₯π‘₯ βˆ’ 𝑑𝑑 𝑦𝑦 π‘Žπ‘Žπ‘šπ‘š βˆ’ π‘Žπ‘Žπ‘›π‘› 𝑒𝑒

Here the symbols and 。 denote correlation and Fig.1 The structure of MZJTC system. convolution operations, respectively. ⨂

III. NUMERICAL RESULTS

In this research, we choose a colorful fish pattern to be our original color target image, as shown in Fig. 4. The image has

ISBN: 978-988-19253-2-9 IMECS 2015 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online) Proceedings of the International MultiConference of Engineers and Computer Scientists 2015 Vol I, IMECS 2015, March 18 - 20, 2015, Hong Kong

Fig. 2 Arrangement of RLCSLM1 for reference channels Fig. 3 Arrangement of RLCSLM1 for target channels

Fig.4 The original target image.

Fig.5 Y (left), I (middle) and Q (right) components of target image.

Fig.6 Example of comparison of the sidelobes between the original and improved training data base (correlation peak is removed for ease of observation)

ISBN: 978-988-19253-2-9 IMECS 2015 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online) Proceedings of the International MultiConference of Engineers and Computer Scientists 2015 Vol I, IMECS 2015, March 18 - 20, 2015, Hong Kong

100 transform correlators,” Opt. Commun., vol. 182, pp. 90 91-94, 2000 80 [7] C. Chen, β€œCorrelation peak variance minimization for

nonzero order joint transform correlators in noise,” 70 Microw. Opt. Techn. Lett., vol. 29(3), pp. 190-192, 60 2001. 50 [8] C. Chen, J. Fang, S. Yin, β€œOptimized synthetic aperture 40 radar image detection with nonzero order joint transform 30 correlators,” Microw. Opt. Techn. Lett., vol. 26(5), pp. 20 312-316, 2000.

Sidelobe energy 10 [9] C. Chen, J. Fang, β€œSynthetic aperture radar image recognition by constrained joint transform correlators,” 0 Optik, vol. 112(3), pp. 125-130, 2001. 0 60 120 180 240 300 360 [10] J. Fang, C. Chen, β€œChinese seal imprint recognition by Before shift joint transform correlators,” Opt. Eng., vol. 40(10), pp. Rotation angle 2159-2164, 2001. After shift [11] C. Chen, C. Chen, C. Lee, and C. Chen, β€œConstrained Fig.7 Sidelobe energy versus rotation angle optimization on the nonzero-order joint transform correlator constructed with the Mach-Zehnder configuration,” Opt. Commun., vol. 231, pp. 165-173, 2004. [12] C. Lee, C. Chen, β€œA Mach-Zehnder nonzero order joint 450 transform correlator for aircraft pattern recognition,” 400 Microw. Opt. Techn. Lett., pp. 1290-1293, vol. 48(7), 350 2006. 300 [13] C. Chen, C. Chen, β€œDecrease of sidelobe energy by shifts in original training images for synthetic aperture radar 250 image recognition,” Microw. Opt. Techn. Lett., vol. 200 41(3), pp. 241-244, 2004. PSR 150 [14] C. Chen, C. Chen, β€œModification of training images for 100 the optimisation of the nonzero order joint transform correlator,” J. Mod. Opt., vol. 52, pp. 21-32, 2005. 50 [15] C. Wu, C. Chen, β€œPerformance comparison between 0 multi-channel polychromatic and conventional joint 0 60 120 180 240 300 360 transform correlators,” Opt. Eng., vol. 42(6), pp. 1758-1765, 2003. Rotation angle After shift [16] C. Chen, C. Wu, β€œPolychromatic pattern recognition Before… using the non-zero order joint transform correlator with cross-correlation peak optimisation,” J. Mod. Opt., vol. Fig.8 PSR versus rotation angle 50(9), pp. 1353-1364, 2003. [17] C. Chen, C. Chen, C. Lee, C. Chen, β€œColor face recognition with liquid crystal spatial light modulators,” Microw. Opt. Techn. Lett., pp. 234-237, vol. 42(3), 2004. [18] W. Wu, C. Chen, β€œColor blindness plate recognition with a YIQ multi-channel non-zero order joint transform REFERENCES correlator,” Microw. Opt. Techn. Lett., vol. 37(5), pp. [1] F. T. S. Yu and X. J. Lu, β€œA real-time programmable 343-347, 2003. joint transform correlator, ” Opt. Commun., vol. 52, pp. 10-16, 1984 [2] F. Cheng, et al., β€œRemoval of intra-class associations in joint transform power spectrum,” Opt. Commun., vol. 99, pp. 7-12, 1993. [3] S. Jutamulia and D. A. Gregory, β€œSoft blocking of the dc term in Fourier optical systems,” Opt. Eng., vol. 37, pp. 49-51, 1998. [4] G. S. Pati and K. Singh, β€œIllumination sensitivity of joint transform correlators using differential processing: computer simulation and experimental studies,” Opt. Commun., vol. 147, pp. 26-32, 1998. [5] C. Chen, J. Fang, β€œCross-correlation peak optimization on joint transform correlators,” Opt. Commun., vol. 178, pp. 315-322, 2000. [6] C. Chen, β€œMinimum-variance nonzero order joint

ISBN: 978-988-19253-2-9 IMECS 2015 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)