tag:blogger.com,1999:blog-2830576283239405772024-03-13T12:53:27.370-07:00Adventures of a BookwormAdrian's Applied Physics 186 BlogAdrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-283057628323940577.post-7397351122267372102009-09-23T19:55:00.000-07:002009-10-11T23:19:25.097-07:00Activity 19. Restoration of Blurred ImageA grayscale image were selected and processed using Scilab. Noise(Gaussian) was then introduced to the image. The parameter a, b and T was varied to see the their effects to the degraded image. The degraded images are shown in Figure 1.<br /><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/StLHbqAxjeI/AAAAAAAAAnU/gYcZ_G1LTCM/s1600-h/gsp.jpg"><img style="cursor: pointer; width: 148px; height: 123px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/StLHbqAxjeI/AAAAAAAAAnU/gYcZ_G1LTCM/s200/gsp.jpg" alt="" id="BLOGGER_PHOTO_ID_5391590981863837154" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/StLD8Os_ipI/AAAAAAAAAmc/MS7YiNvQ1wU/s1600-h/a%3D0.001+b%3D0.001+degraded+image.jpg"><img style="cursor: pointer; width: 157px; height: 123px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/StLD8Os_ipI/AAAAAAAAAmc/MS7YiNvQ1wU/s200/a%3D0.001+b%3D0.001+degraded+image.jpg" alt="" id="BLOGGER_PHOTO_ID_5391587143422282386" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/StLD8e6Fo0I/AAAAAAAAAmk/IJOYr6XZoYk/s1600-h/a%3D0.1+b%3D0.1+degraded+image.jpg"><img style="cursor: pointer; width: 158px; height: 124px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/StLD8e6Fo0I/AAAAAAAAAmk/IJOYr6XZoYk/s200/a%3D0.1+b%3D0.1+degraded+image.jpg" alt="" id="BLOGGER_PHOTO_ID_5391587147772175170" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/StLD8mkgP7I/AAAAAAAAAms/q2EvAW1rsOk/s1600-h/a%3D0.01+b%3D0.01+degraded+image.jpg"><img style="cursor: pointer; width: 157px; height: 123px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/StLD8mkgP7I/AAAAAAAAAms/q2EvAW1rsOk/s200/a%3D0.01+b%3D0.01+degraded+image.jpg" alt="" id="BLOGGER_PHOTO_ID_5391587149829128114" border="0" /></a><br /><span style="font-size:85%;">Figure1. Original and Degraded images(a=b=0.001, a=b=0.1 and a=b=0.01)</span><br /><br /><div style="text-align: left;">From the images in figure 1, it can be seen that the amount of blurring increases as the value of a and b increases.<br /><br />The degraded image were then subjected to Weiner Filtering. The resulting images are shown below.<br /><div style="text-align: left;"><br /><span style="font-weight: bold;">For a=b=0.1 and T=1:</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/StLFT4EC9GI/AAAAAAAAAm8/HqU9rIzSprA/s1600-h/a%3D0.1+b%3D0.1,T%3D1,K%3D0.0001+estimation+of+orig+image.jpg"><img style="cursor: pointer; width: 200px; height: 157px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/StLFT4EC9GI/AAAAAAAAAm8/HqU9rIzSprA/s200/a%3D0.1+b%3D0.1,T%3D1,K%3D0.0001+estimation+of+orig+image.jpg" alt="" id="BLOGGER_PHOTO_ID_5391588649173447778" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/StLFRwcAPHI/AAAAAAAAAm0/geBOnsfHGko/s1600-h/a%3D0.1+b%3D0.1,T%3D1,K%3D0.001+estimation+of+orig+image.jpg"><img style="cursor: pointer; width: 200px; height: 157px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/StLFRwcAPHI/AAAAAAAAAm0/geBOnsfHGko/s200/a%3D0.1+b%3D0.1,T%3D1,K%3D0.001+estimation+of+orig+image.jpg" alt="" id="BLOGGER_PHOTO_ID_5391588612766710898" border="0" /></a><br /><span style="font-size:85%;">Figure2. Filtered images(K=0.0001 and K=0.001)</span><br /></div><br /><span style="font-weight: bold;">For a=b=0.01 and K=0.0001:</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StLG3mC-JeI/AAAAAAAAAnE/FPfDnkW5-is/s1600-h/a%3D0.01+b%3D0.01,T%3D10,K%3D0.0001+estimation+of+orig+image.jpg"><img style="cursor: pointer; width: 200px; height: 157px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StLG3mC-JeI/AAAAAAAAAnE/FPfDnkW5-is/s200/a%3D0.01+b%3D0.01,T%3D10,K%3D0.0001+estimation+of+orig+image.jpg" alt="" id="BLOGGER_PHOTO_ID_5391590362324018658" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/StLG37u7DUI/AAAAAAAAAnM/NSl-d7LsGpE/s1600-h/a%3D0.01+b%3D0.01,T%3D100,K%3D0.0001+estimation+of+orig+image.jpg"><img style="cursor: pointer; width: 200px; height: 157px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/StLG37u7DUI/AAAAAAAAAnM/NSl-d7LsGpE/s200/a%3D0.01+b%3D0.01,T%3D100,K%3D0.0001+estimation+of+orig+image.jpg" alt="" id="BLOGGER_PHOTO_ID_5391590368145509698" border="0" /></a><br /><span style="font-size:85%;">Figure3. Filtered images(T=10 and T=1000)</span><br /><br /><div style="text-align: left;">It can be observed from Figures 2 and 3 that as the value of parameter T increases the enhanced image becomes sharper. The opposite behaviour is observed for the parameter K. As K increases, the image becomes more blurred and degraded.<br /></div><div style="text-align: left;"><br /><div style="text-align: justify;"><br />In summary, a grayscale image was degraded using gaussian noise. The degraded image was then subjected to Weiner filtering. The parameters of the noise and filter were varied to observe its effect to the enhanced image. It was observed that as the value of <span style="font-weight: bold;">a </span>and <span style="font-weight: bold;">b </span>decreases, degradation of the image becomes lesser. It was also observed that the enhanced image becomes clearer and sharper when the parameter <span style="font-weight: bold;">T</span> is increased and the parameter <span style="font-weight: bold;">K</span> is decreased. It can therefore be recommended that a low value of K and a high value of T be used in enhancing a degraded image.<br /><br />I will give myself 10/10 in this activity.<br /><br />*** My thanks to Rommel for helping me in this activity.<br /></div></div></div></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-63422678128329073332009-09-16T18:22:00.000-07:002009-10-11T22:44:06.674-07:00Activity 18. Noise Model and Basic Image RestorationAn image with 3 different levels of grayscale values was processed using Scilab. Different kinds of noise were introduced to the image. The PDF of the original image and the image with noise was generated. The original image and the image with noise are shown in Figure 1. It can be seen that the amount of distortion in the image varies with the kind of noise introduced to the original image.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/StK4bUnlrpI/AAAAAAAAAkk/dREoF05I4iE/s1600-h/sample1.jpg"><img style="cursor: pointer; width: 344px; height: 57px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/StK4bUnlrpI/AAAAAAAAAkk/dREoF05I4iE/s200/sample1.jpg" alt="" id="BLOGGER_PHOTO_ID_5391574483446640274" border="0" /></a><br /><br /><span style="font-size:85%;">Figure1. Original image and images with different noise(from the left: Original, Exponential, Gamma, Gaussian, Salt and Pepper, Uniform Function and Rayleigh)</span><br /><br /><div style="text-align: left;">The PDF of the original image and the images with noise is shown in Figure 2. The PDF exhibits 3 peaks due to the different gray levels of the selected image.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SrGVT7cfXKI/AAAAAAAAAjs/MnIpUMQGoZ0/s1600-h/PDFim.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SrGVT7cfXKI/AAAAAAAAAjs/MnIpUMQGoZ0/s200/PDFim.bmp" alt="" id="BLOGGER_PHOTO_ID_5382247199291694242" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SrGVU3_aU7I/AAAAAAAAAj8/6CWBwwFMgBc/s1600-h/PDFgn.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SrGVU3_aU7I/AAAAAAAAAj8/6CWBwwFMgBc/s200/PDFgn.bmp" alt="" id="BLOGGER_PHOTO_ID_5382247215544292274" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SrGVTqZmUGI/AAAAAAAAAjk/c2Hrf4QxMhI/s1600-h/PDFga.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SrGVTqZmUGI/AAAAAAAAAjk/c2Hrf4QxMhI/s200/PDFga.bmp" alt="" id="BLOGGER_PHOTO_ID_5382247194716164194" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SrGVUXIxLwI/AAAAAAAAAj0/jN2RstE-9Ps/s1600-h/PDFex.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SrGVUXIxLwI/AAAAAAAAAj0/jN2RstE-9Ps/s200/PDFex.bmp" alt="" id="BLOGGER_PHOTO_ID_5382247206725168898" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SrGZeKCcaQI/AAAAAAAAAkM/JBXTGCEV0zM/s1600-h/PDFsp.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SrGZeKCcaQI/AAAAAAAAAkM/JBXTGCEV0zM/s200/PDFsp.bmp" alt="" id="BLOGGER_PHOTO_ID_5382251773054183682" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SrGZdvSvpHI/AAAAAAAAAkE/l-qoNDf46E0/s1600-h/PDFun.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SrGZdvSvpHI/AAAAAAAAAkE/l-qoNDf46E0/s200/PDFun.bmp" alt="" id="BLOGGER_PHOTO_ID_5382251765874795634" border="0" /></a><br /><span style="font-size:85%;">Figure2. PDF of the original image and images with Noise((from the left: Original, Gaussian, Gamma, </span><span style="font-size:85%;">Exponential</span><span style="font-size:85%;">, Salt and Pepper and Uniform Function)</span><br /><br /><div style="text-align: left;"><br />The image with noise was then enhanced using different filters. The image with <span style="font-weight: bold;">gaussian noise </span>were then subjected to different filters. The resulting images are shown in Figure 3.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/StK5wMx7g0I/AAAAAAAAAks/OZv69ftS47w/s1600-h/gau.jpg"><img style="cursor: pointer; width: 209px; height: 54px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/StK5wMx7g0I/AAAAAAAAAks/OZv69ftS47w/s200/gau.jpg" alt="" id="BLOGGER_PHOTO_ID_5391575941631411010" border="0" /></a><br /><span style="font-size:85%;">Figure3. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)</span><br /><div style="text-align: left;"><span style="font-weight: bold;">For the image with exponential noise:</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/StK6k-ZUwGI/AAAAAAAAAk0/VlUo_d_XcPo/s1600-h/exp.jpg"><img style="cursor: pointer; width: 200px; height: 54px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/StK6k-ZUwGI/AAAAAAAAAk0/VlUo_d_XcPo/s200/exp.jpg" alt="" id="BLOGGER_PHOTO_ID_5391576848303177826" border="0" /></a></div></div></div></div><span style="font-size:85%;">Figure4. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)</span><br /><br /><div style="text-align: left;"><span style="font-weight: bold;">For the image with gamma noise:</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StK7GpqaJAI/AAAAAAAAAk8/GTQA1uxrP5g/s1600-h/gam.jpg"><img style="cursor: pointer; width: 200px; height: 54px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StK7GpqaJAI/AAAAAAAAAk8/GTQA1uxrP5g/s200/gam.jpg" alt="" id="BLOGGER_PHOTO_ID_5391577426853241858" border="0" /></a></div><br /><div style="text-align: center;"><span style="font-size:85%;">Figure5. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)</span><br /><br /><div style="text-align: left;"><br /><span style="font-weight: bold;">For the image with salt and pepper noise:</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/StK7eqN3mPI/AAAAAAAAAlE/EO8eQIcvARo/s1600-h/snp.jpg"><img style="cursor: pointer; width: 200px; height: 53px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/StK7eqN3mPI/AAAAAAAAAlE/EO8eQIcvARo/s200/snp.jpg" alt="" id="BLOGGER_PHOTO_ID_5391577839318833394" border="0" /></a></div><div style="text-align: center;"><span style="font-size:85%;">Figure6. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)<br /></span><br /><div style="text-align: left;"><span style="font-weight: bold;">For the image with uniform noise:<br /><br /></span><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/StK7u5THJ7I/AAAAAAAAAlM/1OaHu8RKdDk/s1600-h/uni.jpg"><img style="cursor: pointer; width: 200px; height: 54px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/StK7u5THJ7I/AAAAAAAAAlM/1OaHu8RKdDk/s200/uni.jpg" alt="" id="BLOGGER_PHOTO_ID_5391578118245263282" border="0" /></a></div><div style="text-align: center;"><span style="font-size:85%;">Figure7. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)</span><br /></div><span style="font-weight: bold;"><br /></span><br /><span style="font-weight: bold;">For the image with Rayleigh noise:</span><br /><br /><div style="text-align: center;"><span style="font-size:85%;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/StK85oFTitI/AAAAAAAAAlU/_g6fcc92_bY/s1600-h/ray.bmp"><img style="cursor: pointer; width: 200px; height: 54px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/StK85oFTitI/AAAAAAAAAlU/_g6fcc92_bY/s200/ray.bmp" alt="" id="BLOGGER_PHOTO_ID_5391579402114140882" border="0" /></a></span></div><div style="text-align: center;"><span style="font-size:85%;">Figure8. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)</span></div><br /><br />A grayscale image was then selected. The selected image were then subjected with different kinds of noise. The resulting images are shown in figure 9.<br /><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/StK9vYAS1TI/AAAAAAAAAlc/_niFuJpTyls/s1600-h/gs1.jpg"><img style="cursor: pointer; width: 318px; height: 59px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/StK9vYAS1TI/AAAAAAAAAlc/_niFuJpTyls/s200/gs1.jpg" alt="" id="BLOGGER_PHOTO_ID_5391580325511091506" border="0" /></a><br /><span style="font-size:85%;">Figure9. Original image and images with different noise(from the left: Original, Exponential, Gamma, Gaussian, Salt and Pepper, Uniform Function and Rayleigh)</span><br /><br /><div style="text-align: left;">The generated images with noises were then subjected to different filters. For the image with <span style="font-weight: bold;">gaussian noise</span>:<br /><div style="text-align: center;"><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StK-SGJ0GGI/AAAAAAAAAlk/ymXIrKuuGdk/s1600-h/gau.jpg"><img style="cursor: pointer; width: 200px; height: 53px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StK-SGJ0GGI/AAAAAAAAAlk/ymXIrKuuGdk/s200/gau.jpg" alt="" id="BLOGGER_PHOTO_ID_5391580922014603362" border="0" /></a><br /><div style="text-align: center;"><span style="font-size:85%;">Figure10. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)<br /></span><br /><div style="text-align: left;"><span style="font-weight: bold;">For the image with Gamma noise:<br /><br /></span><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StK-uCv4VCI/AAAAAAAAAls/PsmRvl_ZjS4/s1600-h/gam.jpg"><img style="cursor: pointer; width: 200px; height: 53px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StK-uCv4VCI/AAAAAAAAAls/PsmRvl_ZjS4/s200/gam.jpg" alt="" id="BLOGGER_PHOTO_ID_5391581402136859682" border="0" /></a></div><div style="text-align: center;"><span style="font-size:85%;">Figure11. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)</span></div><span style="font-weight: bold;">For the image with Rayleigh noise:<br /></span><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/StK_IN1piLI/AAAAAAAAAmM/cD9nMvalG6M/s1600-h/ray.jpg"><img style="cursor: pointer; width: 200px; height: 53px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/StK_IN1piLI/AAAAAAAAAmM/cD9nMvalG6M/s200/ray.jpg" alt="" id="BLOGGER_PHOTO_ID_5391581851790444722" border="0" /></a></div><div style="text-align: center;"><span style="font-size:85%;">Figure12. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)</span></div><span style="font-weight: bold;">For the image with Salt and Pepper noise:</span><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/StK_BlFAisI/AAAAAAAAAmE/6fLOoiymUow/s1600-h/snp.jpg"><img style="cursor: pointer; width: 200px; height: 52px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/StK_BlFAisI/AAAAAAAAAmE/6fLOoiymUow/s200/snp.jpg" alt="" id="BLOGGER_PHOTO_ID_5391581737769798338" border="0" /></a></div><div style="text-align: center;"><span style="font-size:85%;">Figure13. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)</span></div><span style="font-weight: bold;">For the image with Exponential noise:</span><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/StK-1L43wjI/AAAAAAAAAl0/vLxKzwwnxjo/s1600-h/exp.jpg"><img style="cursor: pointer; width: 200px; height: 54px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/StK-1L43wjI/AAAAAAAAAl0/vLxKzwwnxjo/s200/exp.jpg" alt="" id="BLOGGER_PHOTO_ID_5391581524849574450" border="0" /></a></div><div style="text-align: center;"><span style="font-size:85%;">Figure14. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)</span></div><span style="font-weight: bold;">For the image with Uniform noise:</span><br /></div></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StK-7rGiwvI/AAAAAAAAAl8/88aS_Qpye3Q/s1600-h/uni.jpg"><img style="cursor: pointer; width: 200px; height: 53px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StK-7rGiwvI/AAAAAAAAAl8/88aS_Qpye3Q/s200/uni.jpg" alt="" id="BLOGGER_PHOTO_ID_5391581636307632882" border="0" /></a></div><div style="text-align: center;"><span style="font-size:85%;">Figure15. Enhanced images using different filters(Arithmetic, Contraharmonic, Geometric and Harmonic Mean Filter)<br /><br /></span><div style="text-align: justify;"><br />In summary, different kinds of noise were introduced to a selected image. The images with noise were generated using some Scilab functions. Built-in filters in Scilab were then used to enhanced the noise containing image. From the generated filtered images, it was observed that there is no universal filter that can produce the best image for all kinds of noises. A certain filter is suited for a certain noise.<br /></div><div style="text-align: left;"><br />I will grade myself 10/10 for completing this activity.<br /><br />***Earl helped a lot in formulating the Scilab code used in this activity.<br /></div></div></div></div></div></div></div></div></div></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-43585707642311126832009-09-09T18:00:00.000-07:002009-10-11T23:23:25.979-07:00Activity 17. Photometric StereoIn this activity, the an object was recreated using photometric stereo in Scilab.<br /><br /><div style="text-align: justify;">The images of an object illuminated by a light source located from four different locations were used in this activity. The images and the locations of the light source are shown below.<br /></div><img src="file:///C:/Users/user/AppData/Local/Temp/moz-screenshot.png" alt="" /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhR64XP7oI/AAAAAAAAAhU/o_Np1T9Uhmo/s1600-h/I4.bmp"><img style="cursor: pointer; width: 122px; height: 118px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhR64XP7oI/AAAAAAAAAhU/o_Np1T9Uhmo/s200/I4.bmp" alt="" id="BLOGGER_PHOTO_ID_5379639826898218626" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhR6mfAmWI/AAAAAAAAAhM/Y5c9pP-LHUY/s1600-h/I3.bmp"><img style="cursor: pointer; width: 122px; height: 117px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhR6mfAmWI/AAAAAAAAAhM/Y5c9pP-LHUY/s200/I3.bmp" alt="" id="BLOGGER_PHOTO_ID_5379639822098930018" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SqhR6K8hAdI/AAAAAAAAAhE/yqFbs3areuc/s1600-h/I2.bmp"><img style="cursor: pointer; width: 123px; height: 117px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SqhR6K8hAdI/AAAAAAAAAhE/yqFbs3areuc/s200/I2.bmp" alt="" id="BLOGGER_PHOTO_ID_5379639814706495954" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SqhR5qN3PzI/AAAAAAAAAg8/bNlxPGIKjjg/s1600-h/I1.bmp"><img style="cursor: pointer; width: 120px; height: 117px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SqhR5qN3PzI/AAAAAAAAAg8/bNlxPGIKjjg/s200/I1.bmp" alt="" id="BLOGGER_PHOTO_ID_5379639805920886578" border="0" /></a><br /><span style="font-weight: bold;font-size:85%;" >Figure1. Images rendered in Matlab</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SqhTAsi1BCI/AAAAAAAAAhk/0qTYW5NfCUM/s1600-h/a.jpg"><img style="cursor: pointer; width: 200px; height: 95px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SqhTAsi1BCI/AAAAAAAAAhk/0qTYW5NfCUM/s200/a.jpg" alt="" id="BLOGGER_PHOTO_ID_5379641026316403746" border="0" /></a><br /><span style="font-weight: bold;font-size:85%;" >Figure2. Locations of Light Sources</span><br /><br /><br /><div style="text-align: justify;">The images from a Matlab file ('photos.mat') was loaded in Scilab using the Scilab command <span style="font-style: italic;">loadmatfile</span>. The surface normal(n) of the images were then computed in Scilab using the equations given below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhVEMG6y5I/AAAAAAAAAhs/d8R5Nwc70xQ/s1600-h/b.jpg"><img style="cursor: pointer; width: 183px; height: 48px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhVEMG6y5I/AAAAAAAAAhs/d8R5Nwc70xQ/s200/b.jpg" alt="" id="BLOGGER_PHOTO_ID_5379643285352139666" border="0" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SqhVEbrW93I/AAAAAAAAAh0/1jneuCP0Y3Y/s1600-h/c.jpg"><img style="cursor: pointer; width: 79px; height: 56px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SqhVEbrW93I/AAAAAAAAAh0/1jneuCP0Y3Y/s200/c.jpg" alt="" id="BLOGGER_PHOTO_ID_5379643289531512690" border="0" /></a><br /><div style="text-align: center;"><br />where:<br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SqhVE6MOnCI/AAAAAAAAAh8/3wUWaDcFFoo/s1600-h/d.jpg"><img style="cursor: pointer; width: 200px; height: 136px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SqhVE6MOnCI/AAAAAAAAAh8/3wUWaDcFFoo/s200/d.jpg" alt="" id="BLOGGER_PHOTO_ID_5379643297722440738" border="0" /></a><br /><div style="text-align: left;"><br />After the surface normals were computed, the elevation z was then computed using the following equations:<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhWVJ_ad9I/AAAAAAAAAiM/GIgF2Pl2mvY/s1600-h/e.jpg"><img style="cursor: pointer; width: 200px; height: 49px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhWVJ_ad9I/AAAAAAAAAiM/GIgF2Pl2mvY/s200/e.jpg" alt="" id="BLOGGER_PHOTO_ID_5379644676353193938" border="0" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SqhWUgRdEtI/AAAAAAAAAiE/BFtewDNE8Hg/s1600-h/d.jpg"><img style="cursor: pointer; width: 210px; height: 60px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SqhWUgRdEtI/AAAAAAAAAiE/BFtewDNE8Hg/s200/d.jpg" alt="" id="BLOGGER_PHOTO_ID_5379644665154573010" border="0" /></a><br /><br /><div style="text-align: left;">The integral function in the given equations was evaluated using the <span style="font-style: italic;">cumsum </span>function in Scilab. The computed elevation was then used to generate the 3D plot of the object. The generated plot is shown below.<br /><div style="text-align: center;"><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SqhTAOfDotI/AAAAAAAAAhc/2K4vZPBzRW4/s1600-h/final.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SqhTAOfDotI/AAAAAAAAAhc/2K4vZPBzRW4/s200/final.bmp" alt="" id="BLOGGER_PHOTO_ID_5379641018247520978" border="0" /></a><br /></div></div><span style="font-weight: bold;font-size:85%;" >Figure3. 3D plot of the object</span><br /><div style="text-align: left;"><br />I will give myself 10/10 for completing this activity.<br /></div><br /><br /></div></div></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-39248176557777910412009-09-06T20:02:00.001-07:002009-10-11T23:24:24.062-07:00Activity 16. Neural Networks<div style="text-align: justify;">In this activity, objects were classified using neural networks. Only two types and two features were used for this activity. The two types of bottle caps(Coke and Sprite) were used as samples to test the efficiency of neural networks as classifiers. The coke bottle caps were tagged with the value of 1 while the sprite bottle caps were given the value of 0. The training set used to train the neural network is given below. The first column is the area of the object while the second column is the color level of the object.<br /></div><br />x=[0.929186603, 0.58557;<br /> 0.653588517, 0.147957;<br /> 0.908133971, 0.615335;<br /> 0.579904306, 0.145402;<br /> 0.655502392, 0.164236;<br /> 0.956937799, 0.630004;<br /> 0.902392344, 0.638101;<br /> 0.679425837, 0.14559;<br /> 0.650717703, 0.15673;<br /> 0.677511962, 0.140274;<br /> 0.968421053, 0.618755;<br /> 0.914832536, 0.635996;<br /> 0.742583732, 0.147524;<br /> 0.96937799, 0.62855;<br /> 0.923444976, 0.642857;<br /> 0.717703349, 0.135958;<br /> 0.800956938, 0.157814;<br /> 1, 0.613532;<br /> 0.983732057, 0.668547;<br /> 0.7215311, 0.137754;];<br /><br /><div style="text-align: justify;">The first column was normalized in order for the maximum area calculated will be equal to 1. Using the provided source code(from Cole Fabros' work), the objects were classified using neural networks in Scilab. The source code is provided below.<br /></div><br />rand('seed',0);<br />N=[2,2,1];<br /><br />x=[0.929186603, 0.58557;0.653588517,0.147957;0.908133971, 0.615335;0.579904306, 0.145402;0.655502392, 0.164236;0.956937799, 0.630004;0.902392344, 0.638101;0.679425837, 0.14559;0.650717703, 0.15673;0.677511962, 0.140274;0.968421053, 0.618755;0.914832536, 0.635996;0.742583732, 0.147524;0.96937799, 0.62855;0.923444976, 0.642857;0.717703349, 0.135958;0.800956938, 0.157814;1, 0.613532;0.983732057, 0.668547;0.7215311, 0.137754;];<br /><br />x1=x';<br />t=[0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 0 0 1 ];<br />l=[0.1,0];<br />W=ann_FF_init(N);<br /><br />T=1000;<br /><br />W=ann_FF_Std_online(x1,t,N,W,l,T);<br /><br />A=ann_FF_run(x1,N,W);<br /><br />The output values of the program is shown below.<br /><br />A=[0.0698714 0.9559284 0.0604605 0.9617354 0.9494504 0.0532122 0.0541484<br /><br /> 0.9547831 0.952926 0.9568003 0.0555345 0.0539992 0.9485505 0.0529052<br /><br /> 0.0518202 0.9552809 0.9369444 0.0551047 0.0441003 0.9543265] <br /><br /><div style="text-align: justify;">The values in A were then rounded off. The resulting values are the same with the target values t given in the source code above. This means that the objects were successfully classified using neural networks. This result is for N=[2,2,1].<br /></div><br />round(A)=[ 0. 1. 0. 1. 1. 0. 0. 1. 1. 1. 0. 0. 1. 0. 0. 1. 1. 0. 0. 1.] <br /><br />For N=[2,5,1],<br /><br />A=[ 0.0550852 0.9665592 0.0434460 0.9728303 0.9595599 0.0347047 0.0358142<br /><br /> 0.9653303 0.9633175 0.9674942 0.0375346 0.0356348 0.9586883 0.0343439<br /> <br /> 0.0330257 0.9658597 0.9464930 0.0370670 0.0238807 0.9648412]<br /><br />round(A)=[ 0. 1. 0. 1. 1. 0. 0. 1. 1. 1. 0. 0. 1. 0. 0. 1. 1. 0. 0. 1.]<br /><br /><br />If the learning rate was changed to a higher value the output A changes. The result is given below.<br /><br />A=[ 0.0156586 0.9922242 0.0111422 0.9941406 0.9898376 0.0081610 0.0085014<br /><br /> 0.9918369 0.9911437 0.9925391 0.0091049 0.0084479 0.9895962 0.0080486<br /><br /> 0.0076092 0.9920324 0.9849933 0.0089606 0.0049144 0.9916999 ]<br /><br /><div style="text-align: justify;">This result was calculated when the learning rate is 0.9. Comparing the values of A when the learning rate is 0.1 and when the learning rate is 0.9, it can be observed that the values of A are nearer to the target values when the learning rate is 0.9. These means that a higher learning rate produces a more accurate result.<br /><br />I will give myself 10/10 for getting accurate results.<br /></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-52986546316990731132009-09-06T19:46:00.000-07:002009-10-11T23:25:50.557-07:00Activity 15. Probabilistic ClassificationThe goal of this activity is to classify 20 objects according to their classes.<br /><br /><div style="text-align: justify;">The objects used in this activity are 10 Coke and 10 Sprite bottle caps. The image of the objects were taken and converted into a binary image using Scilab. The original image and the binary image are shown in Figure 1.<br /><div style="text-align: center;"><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SqhdQ0ChChI/AAAAAAAAAic/8kURIKk4jjI/s1600-h/asdf1.jpg"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SqhdQ0ChChI/AAAAAAAAAic/8kURIKk4jjI/s200/asdf1.jpg" alt="" id="BLOGGER_PHOTO_ID_5379652298322545170" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sqhei1eoqzI/AAAAAAAAAi8/FU3UAebYwvA/s1600-h/pic.bmp"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sqhei1eoqzI/AAAAAAAAAi8/FU3UAebYwvA/s200/pic.bmp" alt="" id="BLOGGER_PHOTO_ID_5379653707458194226" border="0" /></a><br /><span style="font-size:85%;"><span style="font-weight: bold;">Figure1. Original and Binary image of the previous image<br /><br /></span></span><div style="text-align: left;"><br />The objects were then classified using the same method employed on activity 14. The plot showing the classification of the samples used is shown in Figure 2.<br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhdREeKdGI/AAAAAAAAAik/wePOfIkIv-w/s1600-h/ModePlot.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqhdREeKdGI/AAAAAAAAAik/wePOfIkIv-w/s200/ModePlot.bmp" alt="" id="BLOGGER_PHOTO_ID_5379652302733472866" border="0" /></a><br /><span style="font-size:85%;"><span style="font-weight: bold;">Figure2. Classification of Objects</span></span><br /><br /><div style="text-align: justify;">As seen in Figure 2, the classification of the samples is well separated. Linear Discriminant Analysis(LDA) was then used to further classify the samples. The plot of the classification using LDA is shown in Figure 3. A line separating the 2 groups was drawn to show the boundary between the two groups of samples. The separation between the two groups is small but is sufficient to show the classification of each sample.<br /><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sqheir-OUeI/AAAAAAAAAi0/PDO2xbNRpx4/s1600-h/LDA1.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sqheir-OUeI/AAAAAAAAAi0/PDO2xbNRpx4/s200/LDA1.bmp" alt="" id="BLOGGER_PHOTO_ID_5379653704906330594" border="0" /></a><br /><span style="font-weight: bold;font-size:85%;" >Figure3. LDA<br /><br /></span><div style="text-align: left;">For completing this activity successfully, I will give myself 10/10.<br /><br />***Earl tips helped a lot.<br /></div><span style="font-weight: bold;font-size:85%;" ><br /></span></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-92021475488558818742009-08-24T18:23:00.001-07:002009-10-11T23:26:38.019-07:00Activity 14. Pattern Recognition<div style="text-align: justify;">The goal of this activity is to classify the chosen samples to their respective classes (such as color and size) using Scilab.<br /><br />Objects with different characteristics were chosen as samples for this activity. In this case, 10 pieces of 2 kinds of soft drink caps and 10 pieces of 25 centavo coins were chosen. The image of the samples were taken and then processed using Scilab. Five samples for each type of object was chosen as the basis of each types color level and size. The image containing 5 samples of each type were converted into a binary image using the <span style="font-style: italic;">im2bw</span> function in Scilab. The sizes of the samples were then computed with the help of the <span style="font-style: italic;">bwlabel</span> function. The mean of the sizes of the different objects were then computed. The color level of each of type of object in the image containing 5 of each type of object were computed. The mean color level (Red channel) and the mean size or area was then compared to the sizes and color levels of the objects in the image containing 10 of each objects.<br /><br />The original image of the samples along with the binary image is shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SqWqXbJKQ2I/AAAAAAAAAgc/1Nk0GE5BtAU/s1600-h/asdf.jpg"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SqWqXbJKQ2I/AAAAAAAAAgc/1Nk0GE5BtAU/s200/asdf.jpg" alt="" id="BLOGGER_PHOTO_ID_5378892649363817314" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqWq2d206YI/AAAAAAAAAgk/YM6ENl4gzdY/s1600-h/asdfbw.jpg"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SqWq2d206YI/AAAAAAAAAgk/YM6ENl4gzdY/s200/asdfbw.jpg" alt="" id="BLOGGER_PHOTO_ID_5378893182668171650" border="0" /></a><br /><span style="font-weight: bold;font-size:85%;" >Figure1. Sample Objects </span><br /><br /><div style="text-align: left;">The generated classification graph is shown in Figure 2.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SqWup9553VI/AAAAAAAAAg0/i9-SgkBR4bE/s1600-h/asdfg.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SqWup9553VI/AAAAAAAAAg0/i9-SgkBR4bE/s200/asdfg.bmp" alt="" id="BLOGGER_PHOTO_ID_5378897365979225426" border="0" /></a><br /><span style="font-size:85%;"><span style="font-weight: bold;">Figure2. Sample Groupings</span><br /><br /></span><div style="text-align: justify;">Figure 2 shows the classification plot of the chosen samples. The x-marks represents the samples while the colored dots represent the basis or the supposed group position. The x-axis position of the group of red caps should be aligned with the position of the group of white caps since they have the same area. This is due to the enlargement of the area of the white caps when the image was converted into a binary image. The areas of the red caps seem to vary more compared to the areas of the other groups.<br /><br /><br />I give myself 10/10 in this activity.<br /></div></div></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-68864923747991811862009-08-17T17:57:00.000-07:002009-10-12T05:48:32.879-07:00Activity 13. Correcting Geometric Distortions<div style="text-align: justify;"><br /></div><div style="text-align: center;"><div style="text-align: justify;"><div style="text-align: justify;">An image of a grid line was downloaded from the internet. The image of the grid line exhibited distortion. The dimension of the portion of the grid with no distortion were taken and used to compute and generate the ideal grid. The distorted image is shown in Figure 1.<br /></div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StMexx6Qv9I/AAAAAAAAAoM/NxBF0-4T-9E/s1600-h/grid.jpg"><img style="cursor: pointer; width: 200px; height: 154px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StMexx6Qv9I/AAAAAAAAAoM/NxBF0-4T-9E/s200/grid.jpg" alt="" id="BLOGGER_PHOTO_ID_5391687019452743634" border="0" /></a><br /><span style="font-weight: bold;font-size:85%;" >Figure1. Distorted image</span><br /><br /><div style="text-align: left;"><div style="text-align: justify;">Now, the ideal vertex points can be derived from the distorted image considering Figure 2 and the following equations.<br /></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StL5rPOU7iI/AAAAAAAAAnk/Tp6K6aR_KN0/s1600-h/a.jpg"><img style="cursor: pointer; width: 200px; height: 90px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StL5rPOU7iI/AAAAAAAAAnk/Tp6K6aR_KN0/s200/a.jpg" alt="" id="BLOGGER_PHOTO_ID_5391646225132219938" border="0" /></a><br /><span style="font-weight: bold;font-size:85%;" >Figure2. Distorted and ideal image</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/StL5rVfVvBI/AAAAAAAAAns/Q1WVZh2JtM4/s1600-h/b.jpg"><img style="cursor: pointer; width: 114px; height: 48px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/StL5rVfVvBI/AAAAAAAAAns/Q1WVZh2JtM4/s200/b.jpg" alt="" id="BLOGGER_PHOTO_ID_5391646226814188562" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/StL5r8_aPQI/AAAAAAAAAn0/ipaam-sKNo4/s1600-h/c.jpg"><img style="cursor: pointer; width: 234px; height: 77px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/StL5r8_aPQI/AAAAAAAAAn0/ipaam-sKNo4/s200/c.jpg" alt="" id="BLOGGER_PHOTO_ID_5391646237417684226" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StL5sL0QzoI/AAAAAAAAAn8/dpmel10S80o/s1600-h/d.jpg"><img style="cursor: pointer; width: 228px; height: 55px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StL5sL0QzoI/AAAAAAAAAn8/dpmel10S80o/s200/d.jpg" alt="" id="BLOGGER_PHOTO_ID_5391646241397460610" border="0" /></a><br /><div style="text-align: left;"><br /><div style="text-align: justify;">Using the diagram, given equations and the vertices of the distorted image, the ideal grid vertex points were generated using Scilab. The vertices was obtained using the locate function in Scilab. The ideal grid points are shown in Figure 3.<br /></div><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StMlV-doPCI/AAAAAAAAApc/88lc4C2wflg/s1600-h/idealgrid.bmp"><img style="cursor: pointer; width: 200px; height: 154px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StMlV-doPCI/AAAAAAAAApc/88lc4C2wflg/s200/idealgrid.bmp" alt="" id="BLOGGER_PHOTO_ID_5391694238367366178" border="0" /></a><br /><span style="font-weight: bold;font-size:85%;" >Figure3. Ideal vertex points</span><br /><br /><div style="text-align: left;">The ideal grid was then generated using two methods: the nearest neighbor technique and the bilinear interpolation. The equations shown below were used in generating the ideal grid or image.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/StMghCNQ-JI/AAAAAAAAAok/nuHE8eR5QS4/s1600-h/c.jpg"><img style="cursor: pointer; width: 194px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/StMghCNQ-JI/AAAAAAAAAok/nuHE8eR5QS4/s200/c.jpg" alt="" id="BLOGGER_PHOTO_ID_5391688930792896658" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/StMggqk7QJI/AAAAAAAAAoU/F5dmmtm0Wc0/s1600-h/a.jpg"><img style="cursor: pointer; width: 200px; height: 45px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/StMggqk7QJI/AAAAAAAAAoU/F5dmmtm0Wc0/s200/a.jpg" alt="" id="BLOGGER_PHOTO_ID_5391688924449685650" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/StMgg-ayIrI/AAAAAAAAAoc/gzwdmTj-DVE/s1600-h/b.jpg"><img style="cursor: pointer; width: 231px; height: 49px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/StMgg-ayIrI/AAAAAAAAAoc/gzwdmTj-DVE/s200/b.jpg" alt="" id="BLOGGER_PHOTO_ID_5391688929775854258" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StMghibpBlI/AAAAAAAAAos/SJRp6ixHM-k/s1600-h/d.jpg"><img style="cursor: pointer; width: 200px; height: 44px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StMghibpBlI/AAAAAAAAAos/SJRp6ixHM-k/s200/d.jpg" alt="" id="BLOGGER_PHOTO_ID_5391688939443127890" border="0" /></a><br /><div style="text-align: left;"><br />The ideal images generated using the two techniques are shown in Figure 4 and Figure 5.<br /><div style="text-align: center;"><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/StMh4Wz2MzI/AAAAAAAAApM/NFZ55dWxj4Y/s1600-h/newgrid_bilinear.bmp"><img style="cursor: pointer; width: 200px; height: 154px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/StMh4Wz2MzI/AAAAAAAAApM/NFZ55dWxj4Y/s200/newgrid_bilinear.bmp" alt="" id="BLOGGER_PHOTO_ID_5391690430972048178" border="0" /></a><span style="font-size:85%;"><br /><span style="font-weight: bold;">Figure4. Bilinear Interpolation</span></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/StMiMadztxI/AAAAAAAAApU/Ibt80YtKtI4/s1600-h/newgrid_nearest_neighbor.bmp"><img style="cursor: pointer; width: 200px; height: 154px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/StMiMadztxI/AAAAAAAAApU/Ibt80YtKtI4/s200/newgrid_nearest_neighbor.bmp" alt="" id="BLOGGER_PHOTO_ID_5391690775550736146" border="0" /></a><br /><span style="font-weight: bold;font-size:85%;" >Figure5. Nearest Neighbor Technique</span><br /><br /><div style="text-align: justify;">As seen in the presented images, there is only a slight change on the distorted image after subjecting it to bilinear interpolation and nearest neighbor technique. There are only subtle differences between the images generated using the two techniques but, as expected, the image generated using bilinear interpolation exhibits a less distorted image than the image generated using the other technique. The lines in the image produced using bilinear interpolation is straighter and the gaps between squares are more uniform compared to the lines and spacing of the image generated using the nearest neighbor technique.<br /><br /><div style="text-align: justify;">In summary, a distorted image was fixed using two different techniques: the bilinear interpolation and nearest neighbor technique. The results showed that the ideal image generated using bilinear interpolation is better than the image generated using nearest neighbor technique.<br /><br /><br />I will give myself 9/10 for this activity.<br /><br />***Gilbert helped a lot in fixing the source code for this activity.<br /></div></div></div></div></div></div></div></div></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-44246620742081563912009-08-03T18:45:00.000-07:002009-08-07T00:33:08.600-07:00Activity 12. Color Image Segmentation<div style="text-align: justify;">An image was downloaded from the internet. The image was cropped in order to make simulations faster. A patch was selected from the downloaded image and loaded into Scilab. The downloaded image and the patch used is shown below. The patch shown below was resized for better illustration. The original size of the patch is 13x13 pixels.<br /></div><br /><div style="text-align: justify;"><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnpD16s2aZI/AAAAAAAAAag/mfVEm18zE_s/s1600-h/b2.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnpD16s2aZI/AAAAAAAAAag/mfVEm18zE_s/s200/b2.jpg" alt="" id="BLOGGER_PHOTO_ID_5366676499534866834" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnpD2Cb0YRI/AAAAAAAAAao/SF-rLbSpeVw/s1600-h/b2s.jpg"><img style="cursor: pointer; width: 166px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnpD2Cb0YRI/AAAAAAAAAao/SF-rLbSpeVw/s200/b2s.jpg" alt="" id="BLOGGER_PHOTO_ID_5366676501610914066" border="0" /></a><br /></div><div style="text-align: center;"><span style="font-size:78%;">(image from http://lifehackery.com/qimages/5/used-tennis-balls.jpg)</span><br /><br /></div></div>The histogram of the normalized chromaticity space is shown below. The histogram is useful in the interpretation of the results.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnpNJri77fI/AAAAAAAAAbY/Zbl4hSeTfys/s1600-h/hist.jpg"><img style="cursor: pointer; width: 200px; height: 160px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnpNJri77fI/AAAAAAAAAbY/Zbl4hSeTfys/s200/hist.jpg" alt="" id="BLOGGER_PHOTO_ID_5366686734668787186" border="0" /></a><br /><br /></div><div style="text-align: justify;">The histogram of the patch is generated using the nonparametric method. The generated histogram is shown below. The historam is in agreement with the histogram shown above since the patch selected is in the green region.<br /></div><div style="text-align: justify;"><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnpD-kyJzJI/AAAAAAAAAaw/3yuWnWxdNug/s1600-h/histb2s.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnpD-kyJzJI/AAAAAAAAAaw/3yuWnWxdNug/s200/histb2s.bmp" alt="" id="BLOGGER_PHOTO_ID_5366676648270351506" border="0" /></a><br /><div style="text-align: left;">The probability that a pixel with chromaticity r belongs to the patch was computed using the formula shown below. The probability for red and green was computed and used to derive the results for the parametric method.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnpcShAb9oI/AAAAAAAAAbg/tsl9mQNZ-Qk/s1600-h/formula.jpg"><img style="cursor: pointer; width: 200px; height: 62px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnpcShAb9oI/AAAAAAAAAbg/tsl9mQNZ-Qk/s200/formula.jpg" alt="" id="BLOGGER_PHOTO_ID_5366703379132970626" border="0" /></a></div></div></div><br />The parametric segmentation was implemented to the original image. The resulting image generated after the original image was processed using the parametric method is shown below.<br /><div style="text-align: center;"><span style="text-decoration: underline;"><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnpMriBF39I/AAAAAAAAAbI/i39f6N--BF4/s1600-h/parametric.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnpMriBF39I/AAAAAAAAAbI/i39f6N--BF4/s200/parametric.jpg" alt="" id="BLOGGER_PHOTO_ID_5366686216714837970" border="0" /></a><br /><span style="text-decoration: underline;"><br /></span><div style="text-align: left;">The original image was also processed using the nonparametric method. The resulting image is shown below.<br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnpMr0sMtoI/AAAAAAAAAbQ/Q8tVIkw73HA/s1600-h/nonparametric.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnpMr0sMtoI/AAAAAAAAAbQ/Q8tVIkw73HA/s200/nonparametric.jpg" alt="" id="BLOGGER_PHOTO_ID_5366686221727479426" border="0" /></a><br /><br /><div style="text-align: justify;">From the results generated using the two methods, parametric and nonparametric, it can be observed that the parametric method produced a finer result than the nonparametric method. The enhanced image generated by the nonparametric have more dark regions than the image generated using the parametric method. This may indicate that the nonparametric method is stricter in the selection of areas with the same color level as the selected patch. The white areas in the previous two images represent the areas of the original image with the same color level as the selected patch.<br /><br />I will give myself 10/10 for finishing this activity.<br /><br />**Gilbert and Rommel helped a lot in this activity.<br /></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-17903819036725333752009-07-29T18:42:00.000-07:002009-08-06T20:32:17.720-07:00Activity 11. Color Camera Processing<div style="text-align: justify;">Images of objects were taken using different white balance level. The images were taken using the camera of a Samsung cellular phone ith maximum resolution of 3MP. The image with the worst white balance was loaded and enhanced in Scilab using two methods: the white patch method and the gray world method.<br /></div><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnuJLea1VsI/AAAAAAAAAco/CVdeCg0Rrf0/s1600-h/Auto.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnuJLea1VsI/AAAAAAAAAco/CVdeCg0Rrf0/s200/Auto.jpg" alt="" id="BLOGGER_PHOTO_ID_5367034211179255490" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuJLqYuzlI/AAAAAAAAAcw/gTrTbMdA9Ag/s1600-h/Day.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuJLqYuzlI/AAAAAAAAAcw/gTrTbMdA9Ag/s200/Day.jpg" alt="" id="BLOGGER_PHOTO_ID_5367034214391664210" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuJL-DeYbI/AAAAAAAAAc4/WDJOAA_Gxyw/s1600-h/C.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuJL-DeYbI/AAAAAAAAAc4/WDJOAA_Gxyw/s200/C.jpg" alt="" id="BLOGGER_PHOTO_ID_5367034219671216562" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnuJMDoHZmI/AAAAAAAAAdA/facw4_zBFk0/s1600-h/Fs.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnuJMDoHZmI/AAAAAAAAAdA/facw4_zBFk0/s200/Fs.jpg" alt="" id="BLOGGER_PHOTO_ID_5367034221167076962" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuJMhQSEBI/AAAAAAAAAdI/ycgZcWB01CU/s1600-h/I.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuJMhQSEBI/AAAAAAAAAdI/ycgZcWB01CU/s200/I.jpg" alt="" id="BLOGGER_PHOTO_ID_5367034229120176146" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuJ1gADxWI/AAAAAAAAAdQ/ONTP1lLIaMc/s1600-h/Su.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuJ1gADxWI/AAAAAAAAAdQ/ONTP1lLIaMc/s200/Su.jpg" alt="" id="BLOGGER_PHOTO_ID_5367034933158331746" border="0" /></a><br /><span style="font-size:78%;">(Left to right: Auto, Daylight, Cloudy, Incandescent, Flourescent and Sunset White balance)</span><br /><br /><div style="text-align: left;">The image taken using the sunset white balance was chosen as the image to be enhanced. A white patch from the image was chosen in order to execute the white patch enhancement method. The patch used in enhancing the image is shown below.<br /><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuLdkIvlnI/AAAAAAAAAdo/mMz3OsoTkFU/s1600-h/P.jpg"><img style="cursor: pointer; width: 8px; height: 8px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuLdkIvlnI/AAAAAAAAAdo/mMz3OsoTkFU/s200/P.jpg" alt="" id="BLOGGER_PHOTO_ID_5367036720974894706" border="0" /></a><br /><br /><div style="text-align: left;"><div style="text-align: justify;">The patch itself is no longer white due to the poor white balancing. The white patch method was then applied to the image along with the gray world method of image enhancement. The resulting images are presented below.<br /></div><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuJ1gADxWI/AAAAAAAAAdQ/ONTP1lLIaMc/s1600-h/Su.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuJ1gADxWI/AAAAAAAAAdQ/ONTP1lLIaMc/s200/Su.jpg" alt="" id="BLOGGER_PHOTO_ID_5367034933158331746" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuMQzvBZJI/AAAAAAAAAd4/Ei3721PqBzQ/s1600-h/AGW.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuMQzvBZJI/AAAAAAAAAd4/Ei3721PqBzQ/s200/AGW.bmp" alt="" id="BLOGGER_PHOTO_ID_5367037601335305362" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuMQZLXvsI/AAAAAAAAAdw/OHknDKQmTX4/s1600-h/AWP.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuMQZLXvsI/AAAAAAAAAdw/OHknDKQmTX4/s200/AWP.bmp" alt="" id="BLOGGER_PHOTO_ID_5367037594206453442" border="0" /></a><br /></div><div style="text-align: center;"><span style="font-size:78%;">(Original, Gray world and White patch)</span><br /><br /><div style="text-align: justify;"><div style="text-align: justify;">From the previous set of images, it can be seen that the gray world method produced a clearer enhanced image than the white patch method but the enhanced image produced using the white patch reproduced colors close to the colors of the objects. Three images (each image containing only 1 primary color) were taken and enhanced using the white patch and the gray world image.<br /></div><br />A. Red<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnubtfBkbHI/AAAAAAAAAeI/0R9id9G0JT0/s1600-h/RP.jpg"><img style="cursor: pointer; width: 25px; height: 25px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnubtfBkbHI/AAAAAAAAAeI/0R9id9G0JT0/s200/RP.jpg" alt="" id="BLOGGER_PHOTO_ID_5367054586666577010" border="0" /></a><br /><br /></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Snubs5ytLoI/AAAAAAAAAeA/Res007V5iYg/s1600-h/Rsu.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Snubs5ytLoI/AAAAAAAAAeA/Res007V5iYg/s200/Rsu.jpg" alt="" id="BLOGGER_PHOTO_ID_5367054576672124546" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnucWv-KhTI/AAAAAAAAAeY/IG1cO-deco4/s1600-h/RWP.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnucWv-KhTI/AAAAAAAAAeY/IG1cO-deco4/s200/RWP.bmp" alt="" id="BLOGGER_PHOTO_ID_5367055295590335794" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnucWJPi3yI/AAAAAAAAAeQ/uFl_SqA-oU8/s1600-h/RGW.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnucWJPi3yI/AAAAAAAAAeQ/uFl_SqA-oU8/s200/RGW.bmp" alt="" id="BLOGGER_PHOTO_ID_5367055285194252066" border="0" /></a><br /><span style="font-size:78%;">(Above: Patch; Left to right: Original, White Patch, and Gray World)</span><br /><br /><div style="text-align: left;">B. Green<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnudSmCPTeI/AAAAAAAAAeg/Cf_8qhqjthc/s1600-h/GP.jpg"><img style="cursor: pointer; width: 31px; height: 31px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnudSmCPTeI/AAAAAAAAAeg/Cf_8qhqjthc/s200/GP.jpg" alt="" id="BLOGGER_PHOTO_ID_5367056323715223010" border="0" /></a><br /><br /></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnudS2zUdTI/AAAAAAAAAeo/Q_ZYz2kfQJE/s1600-h/Gsu.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnudS2zUdTI/AAAAAAAAAeo/Q_ZYz2kfQJE/s200/Gsu.jpg" alt="" id="BLOGGER_PHOTO_ID_5367056328216048946" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnudTzhbdzI/AAAAAAAAAe4/Yn6qccTIeRY/s1600-h/GWP.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnudTzhbdzI/AAAAAAAAAe4/Yn6qccTIeRY/s200/GWP.bmp" alt="" id="BLOGGER_PHOTO_ID_5367056344515573554" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnudTl_nkmI/AAAAAAAAAew/gGom5GJmWvg/s1600-h/GGW.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnudTl_nkmI/AAAAAAAAAew/gGom5GJmWvg/s200/GGW.bmp" alt="" id="BLOGGER_PHOTO_ID_5367056340884099682" border="0" /></a><br /><span style="font-size:78%;">(Above: Patch; Left to right: Original, White Patch, and Gray World)<br /><br /></span><div style="text-align: left;">C. Blue<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuebB1BYMI/AAAAAAAAAfI/Byd09fPyLIA/s1600-h/BP.jpg"><img style="cursor: pointer; width: 29px; height: 29px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnuebB1BYMI/AAAAAAAAAfI/Byd09fPyLIA/s200/BP.jpg" alt="" id="BLOGGER_PHOTO_ID_5367057568126558402" border="0" /></a><br /></div><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Snuea4TC1mI/AAAAAAAAAfA/jtz-PFLHlZ8/s1600-h/bt.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Snuea4TC1mI/AAAAAAAAAfA/jtz-PFLHlZ8/s200/bt.jpg" alt="" id="BLOGGER_PHOTO_ID_5367057565568128610" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnuebricLgI/AAAAAAAAAfY/itq5ENdciJE/s1600-h/BWP.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnuebricLgI/AAAAAAAAAfY/itq5ENdciJE/s200/BWP.bmp" alt="" id="BLOGGER_PHOTO_ID_5367057579322912258" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnuebVE9j6I/AAAAAAAAAfQ/7EGkslrbAZo/s1600-h/BGW.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnuebVE9j6I/AAAAAAAAAfQ/7EGkslrbAZo/s200/BGW.bmp" alt="" id="BLOGGER_PHOTO_ID_5367057573293690786" border="0" /></a><br /></div><br /><div style="text-align: center;"><span style="font-size:78%;">(Above: Patch; Left to right: Original, White Patch, and Gray World)<br /></span><div style="text-align: left;"><br /><div style="text-align: justify;">From the three sets of images, it can be concluded that the white patch method can enhance the image better than the gray world method. The white patch method produced an enhanced image that is close to the image of the original object taken with good white balancing.<br /><br />I will give myself 10/10 for this activity.<br /><br />** Tips and ideas from Gilbert were useful in this activity.<br /><br /><br /></div></div><br /></div></div></div></div></div></div></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com1tag:blogger.com,1999:blog-283057628323940577.post-57935446880832142472009-07-28T22:48:00.000-07:002009-08-05T22:16:51.510-07:00Activity 10. Preprocessing Text<div style="text-align: justify;">A preselected image was processed using Scilab. A portion of the image containing a handwritten text was selected and read using Scilab. The image was then converted into a grayscale image and was tilted using the<span style="font-style: italic;"> im2gray</span> and <span style="font-style: italic;">mogrify</span> command, respectively. The image was then enhanced using a filter. The original image, filter and the enhanced image are shown below.<br /></div><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_7zNrYDyI/AAAAAAAAAUg/ytpfnejJF9k/s1600-h/aaa.bmp"><img style="cursor: pointer; width: 189px; height: 93px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_7zNrYDyI/AAAAAAAAAUg/ytpfnejJF9k/s200/aaa.bmp" alt="" id="BLOGGER_PHOTO_ID_5363782538485042978" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_7zf_8CYI/AAAAAAAAAUo/b5RAlT3X2WM/s1600-h/aaaf9.bmp"><img style="cursor: pointer; width: 189px; height: 93px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_7zf_8CYI/AAAAAAAAAUo/b5RAlT3X2WM/s200/aaaf9.bmp" alt="" id="BLOGGER_PHOTO_ID_5363782543403125122" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_8f_6vsMI/AAAAAAAAAUw/2bsiJOMoaso/s1600-h/newimage.bmp"><img style="cursor: pointer; width: 189px; height: 93px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_8f_6vsMI/AAAAAAAAAUw/2bsiJOMoaso/s200/newimage.bmp" alt="" id="BLOGGER_PHOTO_ID_5363783307885523138" border="0" /></a><br /><br /><div style="text-align: left;">The image was then binarized and inverted. The resulting image is shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sm_9tMevuEI/AAAAAAAAAU4/LZm6PpK5u98/s1600-h/invbi.bmp"><img style="cursor: pointer; width: 189px; height: 93px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sm_9tMevuEI/AAAAAAAAAU4/LZm6PpK5u98/s200/invbi.bmp" alt="" id="BLOGGER_PHOTO_ID_5363784634107672642" border="0" /></a><br /><div style="text-align: left;"><br />The image was then further enhanced using <span style="font-style: italic;">dilate</span> and <span style="font-style: italic;">erode</span> command in Scilab. The enhanced image is shown below.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD9I7AvUJI/AAAAAAAAAXg/uP6r5UgZzoM/s1600-h/pre.bmp"><img style="cursor: pointer; width: 189px; height: 93px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD9I7AvUJI/AAAAAAAAAXg/uP6r5UgZzoM/s200/pre.bmp" alt="" id="BLOGGER_PHOTO_ID_5364065485919834258" border="0" /></a></div></div><br /><div style="text-align: justify;">Comparing the two previous images it can be seen that most of the black lines were removed in the latter image. It can also be observed that the characters are thicker than the first enhanced image. Using <span style="font-style: italic;">bwlabel </span>in Scilab, it was found out that 38 clusters were formed in the last enhanced image. The number of cluster in the enhanced image is close to the number of clusters in the original image.<br /><br />The image of the receipt was then loaded into Scilab. The image was then converted to binary image. The word 'DESCRIPTION' was then cut out from the image and another image was generated with thw word 'DESCRIPTION' at the center of the image. The newly generated image was then correlated with the image of the receipt. The results are shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnEM8ItjDkI/AAAAAAAAAXo/aRhAiuaSauw/s1600-h/Untitled_0001.jpg"><img style="cursor: pointer; width: 160px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnEM8ItjDkI/AAAAAAAAAXo/aRhAiuaSauw/s200/Untitled_0001.jpg" alt="" id="BLOGGER_PHOTO_ID_5364082858445180482" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnERtCmlA6I/AAAAAAAAAX4/-rDc-Abx5-E/s1600-h/a.bmp"><img style="cursor: pointer; width: 160px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnERtCmlA6I/AAAAAAAAAX4/-rDc-Abx5-E/s200/a.bmp" alt="" id="BLOGGER_PHOTO_ID_5364088096665437090" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnJGGk73vMI/AAAAAAAAAYA/Y_ZUAy8HqFk/s1600-h/corfinal.bmp"><img style="cursor: pointer; width: 160px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnJGGk73vMI/AAAAAAAAAYA/Y_ZUAy8HqFk/s200/corfinal.bmp" alt="" id="BLOGGER_PHOTO_ID_5364427184959634626" border="0" /></a><br /><br /><div style="text-align: left;">Three bright points on the correlated image were observed. The bright spots are where the word "DESCRIPTION" is located at the original image.<br /><br />I will give myself 10/10 for accomplishing the tasks in this activity<br /><br />**Tips from Gilbert helped a lot.<br /></div></div></div></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-79032419459868517262009-07-28T22:47:00.001-07:002009-08-06T21:34:40.474-07:00Activity 9. Binary Operations<div style="text-align: justify;">The main objective of this activity is to measure the area of the hole in an image with the help of different enhancement techniques. The activity started by selecting an image of a paper with holes. Nine representative, 256x256 images were taken from the original image. The original image is shown below along with one of the representative image.<br /><br /><div style="text-align: center;"> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Snug6duCpZI/AAAAAAAAAfg/daTUY9udiNs/s1600-h/Circles001.jpg"><img style="cursor: pointer; width: 200px; height: 165px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Snug6duCpZI/AAAAAAAAAfg/daTUY9udiNs/s200/Circles001.jpg" alt="" id="BLOGGER_PHOTO_ID_5367060307212674450" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Snup4XhI98I/AAAAAAAAAfo/m-m1uQcCH-U/s1600-h/CI6.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Snup4XhI98I/AAAAAAAAAfo/m-m1uQcCH-U/s200/CI6.jpg" alt="" id="BLOGGER_PHOTO_ID_5367070166792861634" border="0" /></a><br /><br /><div style="text-align: justify;">The representative images were then converted to binary images and enhanced(using<span style="font-style: italic;"> dilate</span> and <span style="font-style: italic;">erode</span>) to make the holes clearer. The binary image and the enhanced binary image are shown below.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuqalVSVdI/AAAAAAAAAfw/B5QHrET9zPQ/s1600-h/binarysubimage2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnuqalVSVdI/AAAAAAAAAfw/B5QHrET9zPQ/s200/binarysubimage2.bmp" alt="" id="BLOGGER_PHOTO_ID_5367070754616792530" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Snuqa9hgXeI/AAAAAAAAAf4/_ct3kVWu3XA/s1600-h/newbinarysubimage2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Snuqa9hgXeI/AAAAAAAAAf4/_ct3kVWu3XA/s200/newbinarysubimage2.bmp" alt="" id="BLOGGER_PHOTO_ID_5367070761110494690" border="0" /></a></div></div></div></div><div style="text-align: center;"><span style="font-size:78%;">(Binary and Enhanced Binary Image)</span><br /><br /><div style="text-align: left;">The area of each blob or hole was then computed from the enhanced binary image with the help of the <span style="font-style: italic;">bwlabel</span> function in Scilab. This was done for each representative image. The computed areas were then listed and used to generate the histogram of the area versus frequency. The histogram is shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnusLOL6a1I/AAAAAAAAAgA/88E2cJN78YU/s1600-h/Hist.bmp"><img style="cursor: pointer; width: 366px; height: 205px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnusLOL6a1I/AAAAAAAAAgA/88E2cJN78YU/s200/Hist.bmp" alt="" id="BLOGGER_PHOTO_ID_5367072689728678738" border="0" /></a></div><br /><div style="text-align: justify;">High area frequency is found in the computed areas ranging from 5o0 to 550. The mean area was computed and was found out to be equal to 519.35849. The standard deviation was also computed and was found out to be equal to 8.4446031. The theoretical area was then computed using the image of a single circle. The theoretical area is equal to 517. Using the theoretical and the mean area, the percent error of the computed area was found out to be equal to 0.456%. The single circle and the binarized image of the single circle is shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnusLVJl-ZI/AAAAAAAAAgI/nyKO2B7WEi0/s1600-h/CIS.bmp"><img style="cursor: pointer; width: 41px; height: 41px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnusLVJl-ZI/AAAAAAAAAgI/nyKO2B7WEi0/s200/CIS.bmp" alt="" id="BLOGGER_PHOTO_ID_5367072691597998482" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnusLu1VZRI/AAAAAAAAAgQ/gPAPTYNbXhs/s1600-h/binary1circle.bmp"><img style="cursor: pointer; width: 41px; height: 41px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnusLu1VZRI/AAAAAAAAAgQ/gPAPTYNbXhs/s200/binary1circle.bmp" alt="" id="BLOGGER_PHOTO_ID_5367072698492347666" border="0" /></a><br /><br /><br /><div style="text-align: left;">I will give myself 10/10 for this activity.<br /><br />**Neil and Gilbert gave useful tips in solving for the areas of the circles.<br /><br /><br /></div></div></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-64583310985146361902009-07-28T22:12:00.001-07:002009-08-05T18:08:03.521-07:00Activity 8. Morphological Operations<div style="text-align: justify;">Images containing different shapes were created using the Microsoft Paint. Using Scilab, the images were processed using different structural elements. The created images were a 50x50px square, a circle with 25px radius, a triangle with height equal to 30px and base equal to 50px, a 60x60px hollow square with 4px thick edges, and a plus sign with thickness equal to 8px and line length equal to 50px. The structural elements used are matrices with 4x4 ones, 2x4 ones, 4x2 ones and a cross 5px long and 1px thick. The created images are shown below. The images were processed using the erode and dilate function in Scilab. The outcome or appearance of the images after undergoing erode and dilate were first predicted before using Scilab. The following images were generated using dilate and 4x4, 2x4, 4x2 and cross structuring element, respectively. The first images in each set are the original images followed by the images generated using the structuring elements following the order stated above.<br /><div style="text-align: center;"><div style="text-align: left;"><br /><br /><span style="font-weight: bold;">A. Square</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_dTMZRHdI/AAAAAAAAASo/1nuj97HRHuk/s1600-h/SQ.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_dTMZRHdI/AAAAAAAAASo/1nuj97HRHuk/s200/SQ.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749003036007890" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_1SIQS-1I/AAAAAAAAATo/fA_mQITyhcU/s1600-h/DSQ4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_1SIQS-1I/AAAAAAAAATo/fA_mQITyhcU/s200/DSQ4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363775373023837010" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_2uwv1xzI/AAAAAAAAAUQ/iXcwLgSx5hU/s1600-h/DSQ2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_2uwv1xzI/AAAAAAAAAUQ/iXcwLgSx5hU/s200/DSQ2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363776964441524018" border="0" /></a><br /></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnDzVCavSUI/AAAAAAAAAVY/uNB66a_WAmI/s1600-h/DSQ4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnDzVCavSUI/AAAAAAAAAVY/uNB66a_WAmI/s200/DSQ4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364054698950084930" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SneJecyUbRI/AAAAAAAAAYI/HTOEcv6fa7U/s1600-h/DSQCROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SneJecyUbRI/AAAAAAAAAYI/HTOEcv6fa7U/s200/DSQCROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365908637251562770" border="0" /></a><br /><br /><div style="text-align: left;"><span style="font-weight: bold;">B. Triangle<br /><br /></span></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_dT8D5PmI/AAAAAAAAAS4/X4cx2IJs1Ho/s1600-h/TR.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_dT8D5PmI/AAAAAAAAAS4/X4cx2IJs1Ho/s200/TR.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749015831264866" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_1SfXTh0I/AAAAAAAAATw/OJ1UOeLbI9Y/s1600-h/DTR4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_1SfXTh0I/AAAAAAAAATw/OJ1UOeLbI9Y/s200/DTR4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363775379227248450" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_2udCVrFI/AAAAAAAAAUA/tumLXneck1M/s1600-h/DTR2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_2udCVrFI/AAAAAAAAAUA/tumLXneck1M/s200/DTR2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363776959150402642" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnDzVbQewbI/AAAAAAAAAVg/42eOLk0WAdU/s1600-h/DTR4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnDzVbQewbI/AAAAAAAAAVg/42eOLk0WAdU/s200/DTR4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364054705617945010" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SneK3Y-uPyI/AAAAAAAAAYQ/w8uAsBmbRPY/s1600-h/DTRCROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SneK3Y-uPyI/AAAAAAAAAYQ/w8uAsBmbRPY/s200/DTRCROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365910165238202146" border="0" /></a><br /><br /><div style="text-align: left;"><span style="font-weight: bold;">C. Circle</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_dTjJMsFI/AAAAAAAAASw/5tDKtdLbEko/s1600-h/CI.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_dTjJMsFI/AAAAAAAAASw/5tDKtdLbEko/s200/CI.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749009142624338" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_1RnxSuoI/AAAAAAAAATY/mg96LAfBsYo/s1600-h/DCI4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_1RnxSuoI/AAAAAAAAATY/mg96LAfBsYo/s200/DCI4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363775364303862402" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_2uH_QqQI/AAAAAAAAAT4/-3UuGvkT794/s1600-h/DCI2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_2uH_QqQI/AAAAAAAAAT4/-3UuGvkT794/s200/DCI2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363776953500346626" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnDzUViI6BI/AAAAAAAAAVA/HtFmpjq6jXM/s1600-h/DCI4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnDzUViI6BI/AAAAAAAAAVA/HtFmpjq6jXM/s200/DCI4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364054686901528594" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SneL6FAehrI/AAAAAAAAAYg/UvtubgQ6EUE/s1600-h/DCICROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SneL6FAehrI/AAAAAAAAAYg/UvtubgQ6EUE/s200/DCICROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365911310928086706" border="0" /></a><br /><div style="text-align: left;"><span style="font-weight: bold;">D. Hollow Square</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_dUZ5RQqI/AAAAAAAAATI/dL1ArUzGEgI/s1600-h/HSQ.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_dUZ5RQqI/AAAAAAAAATI/dL1ArUzGEgI/s200/HSQ.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749023839765154" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sm_1RRfKc2I/AAAAAAAAATQ/Cww-4qHdJcw/s1600-h/DHSQ4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sm_1RRfKc2I/AAAAAAAAATQ/Cww-4qHdJcw/s200/DHSQ4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363775358322242402" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sm_2upflq-I/AAAAAAAAAUI/YGEjHl95f6s/s1600-h/DHSQ2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sm_2upflq-I/AAAAAAAAAUI/YGEjHl95f6s/s200/DHSQ2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363776962494311394" border="0" /></a></div></div></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnDzUZVWxoI/AAAAAAAAAVI/8D58jHzKWhM/s1600-h/DHSQ4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnDzUZVWxoI/AAAAAAAAAVI/8D58jHzKWhM/s200/DHSQ4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364054687921653378" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SneMmeNmGSI/AAAAAAAAAYo/U-86J-Z_8bw/s1600-h/DHSQCROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SneMmeNmGSI/AAAAAAAAAYo/U-86J-Z_8bw/s200/DHSQCROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365912073608239394" border="0" /></a></div></div></div><div style="text-align: center;"><br /><div style="text-align: left;"><span style="font-weight: bold;">E. Plus</span><br /></div></div><div style="text-align: center;"><div style="text-align: left;"><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_dUIGxSJI/AAAAAAAAATA/iCkUOR7onvE/s1600-h/PLUS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_dUIGxSJI/AAAAAAAAATA/iCkUOR7onvE/s200/PLUS.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749019064551570" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sm_1R_uQ7VI/AAAAAAAAATg/A3P7XVktYs4/s1600-h/DPLUS4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sm_1R_uQ7VI/AAAAAAAAATg/A3P7XVktYs4/s200/DPLUS4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363775370733612370" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_2vOm2BzI/AAAAAAAAAUY/DpdxmebIvGw/s1600-h/DPLUS2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_2vOm2BzI/AAAAAAAAAUY/DpdxmebIvGw/s200/DPLUS2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5363776972456855346" border="0" /></a></div> </div> </div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnDzU8fHzmI/AAAAAAAAAVQ/qD0KIbmWeSs/s1600-h/DPLUS4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnDzU8fHzmI/AAAAAAAAAVQ/qD0KIbmWeSs/s200/DPLUS4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364054697357856354" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SneNNOHaxQI/AAAAAAAAAYw/0pp8KEDUt24/s1600-h/DPLUSCROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SneNNOHaxQI/AAAAAAAAAYw/0pp8KEDUt24/s200/DPLUSCROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365912739302262018" border="0" /></a></div></div></div></div><br /><div style="text-align: center;"><div style="text-align: left;">Using Erode and 4x4, 2x4, 4x2 and cross structuring elements, the following images were generated. Each set of images follow the same order as the images above.<br /><br /><span style="font-weight: bold;">A. Square<br /><br /></span> <div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_dTMZRHdI/AAAAAAAAASo/1nuj97HRHuk/s1600-h/SQ.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_dTMZRHdI/AAAAAAAAASo/1nuj97HRHuk/s200/SQ.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749003036007890" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD1KWPRE-I/AAAAAAAAAWA/K1fUDLz-0bQ/s1600-h/ESQ4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD1KWPRE-I/AAAAAAAAAWA/K1fUDLz-0bQ/s200/ESQ4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364056714315371490" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD4i-GFOXI/AAAAAAAAAWo/RE2Pol1JB6k/s1600-h/ESQ2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD4i-GFOXI/AAAAAAAAAWo/RE2Pol1JB6k/s200/ESQ2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364060435866007922" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnD5j3Qa9dI/AAAAAAAAAXQ/Mnd2I-aa778/s1600-h/ESQ4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnD5j3Qa9dI/AAAAAAAAAXQ/Mnd2I-aa778/s200/ESQ4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364061550721824210" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnePhJAiKfI/AAAAAAAAAY4/HkB5K81FZZc/s1600-h/ESQCROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnePhJAiKfI/AAAAAAAAAY4/HkB5K81FZZc/s200/ESQCROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365915280551848434" border="0" /></a><br /><br /><div style="text-align: left;"><span style="font-weight: bold;">B. Triangle<br /><br /></span><div style="text-align: center;"><span style="font-weight: bold;"></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_dT8D5PmI/AAAAAAAAAS4/X4cx2IJs1Ho/s1600-h/TR.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sm_dT8D5PmI/AAAAAAAAAS4/X4cx2IJs1Ho/s200/TR.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749015831264866" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD1KtA-r3I/AAAAAAAAAWI/56TrYCRWAcc/s1600-h/ETR4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD1KtA-r3I/AAAAAAAAAWI/56TrYCRWAcc/s200/ETR4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364056720429461362" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnD4jKYJjiI/AAAAAAAAAWw/Wp5z07IZHoY/s1600-h/ETR2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnD4jKYJjiI/AAAAAAAAAWw/Wp5z07IZHoY/s200/ETR2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364060439163014690" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnD5kOthC6I/AAAAAAAAAXY/pkL4eJ3XojE/s1600-h/ETR4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnD5kOthC6I/AAAAAAAAAXY/pkL4eJ3XojE/s200/ETR4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364061557017873314" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SneQI6ZSgwI/AAAAAAAAAZA/C0wpe9_IYYM/s1600-h/ETRCROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SneQI6ZSgwI/AAAAAAAAAZA/C0wpe9_IYYM/s200/ETRCROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365915963823915778" border="0" /></a><br /><br /><div style="text-align: left;"><span style="font-weight: bold;">C. Circle</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_dTjJMsFI/AAAAAAAAASw/5tDKtdLbEko/s1600-h/CI.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_dTjJMsFI/AAAAAAAAASw/5tDKtdLbEko/s200/CI.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749009142624338" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnD1JcEMT7I/AAAAAAAAAVo/1pwT4jhS_3c/s1600-h/ECI4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SnD1JcEMT7I/AAAAAAAAAVo/1pwT4jhS_3c/s200/ECI4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364056698699665330" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD4iCPsZoI/AAAAAAAAAWQ/xy9fUP0otFE/s1600-h/ECI2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD4iCPsZoI/AAAAAAAAAWQ/xy9fUP0otFE/s200/ECI2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364060419800196738" border="0" /></a></div></div></div></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD5jDtI42I/AAAAAAAAAW4/UpZAcZx2ZGw/s1600-h/ECI4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD5jDtI42I/AAAAAAAAAW4/UpZAcZx2ZGw/s200/ECI4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364061536883630946" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SneQoITRmyI/AAAAAAAAAZI/0bg86k-Z1c4/s1600-h/ECICROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SneQoITRmyI/AAAAAAAAAZI/0bg86k-Z1c4/s200/ECICROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365916500132731682" border="0" /></a><br /><br /><div style="text-align: left;"><span style="font-weight: bold;">D. Hollow Square<br /><br /></span><div style="text-align: center;"><span style="font-weight: bold;"></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_dUZ5RQqI/AAAAAAAAATI/dL1ArUzGEgI/s1600-h/HSQ.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sm_dUZ5RQqI/AAAAAAAAATI/dL1ArUzGEgI/s200/HSQ.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749023839765154" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnD1JhglfjI/AAAAAAAAAVw/rf7jh7QocGI/s1600-h/EHSQ4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnD1JhglfjI/AAAAAAAAAVw/rf7jh7QocGI/s200/EHSQ4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364056700160933426" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD4ieWDBlI/AAAAAAAAAWY/-PBUojUbonQ/s1600-h/EHSQ2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SnD4ieWDBlI/AAAAAAAAAWY/-PBUojUbonQ/s200/EHSQ2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364060427343038034" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD5jZKd-sI/AAAAAAAAAXA/nVn5ti5hJ2Q/s1600-h/EHSQ4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD5jZKd-sI/AAAAAAAAAXA/nVn5ti5hJ2Q/s200/EHSQ4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364061542643792578" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SneRHc87x-I/AAAAAAAAAZQ/J7BeaE6Sm_o/s1600-h/EHSQCROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SneRHc87x-I/AAAAAAAAAZQ/J7BeaE6Sm_o/s200/EHSQCROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365917038252115938" border="0" /></a><br /><div style="text-align: left;"><span style="font-weight: bold;">E. Plus</span><br /><br /></div></div></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_dUIGxSJI/AAAAAAAAATA/iCkUOR7onvE/s1600-h/PLUS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm_dUIGxSJI/AAAAAAAAATA/iCkUOR7onvE/s200/PLUS.bmp" alt="" id="BLOGGER_PHOTO_ID_5363749019064551570" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD1J9XjGxI/AAAAAAAAAV4/ei3piz32TPs/s1600-h/EPLUS4x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD1J9XjGxI/AAAAAAAAAV4/ei3piz32TPs/s200/EPLUS4x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364056707639221010" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnD4ivxpXHI/AAAAAAAAAWg/wDK9w0wDK94/s1600-h/EPLUS2x4.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnD4ivxpXHI/AAAAAAAAAWg/wDK9w0wDK94/s200/EPLUS2x4.bmp" alt="" id="BLOGGER_PHOTO_ID_5364060432022199410" border="0" /></a></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD5jlZQt3I/AAAAAAAAAXI/EnsrAAy7YzQ/s1600-h/EPLUS4x2.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnD5jlZQt3I/AAAAAAAAAXI/EnsrAAy7YzQ/s200/EPLUS4x2.bmp" alt="" id="BLOGGER_PHOTO_ID_5364061545927063410" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SneRHpv1BkI/AAAAAAAAAZY/gZtEKN6yHGU/s1600-h/EPLUSCROSS.bmp"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SneRHpv1BkI/AAAAAAAAAZY/gZtEKN6yHGU/s200/EPLUSCROSS.bmp" alt="" id="BLOGGER_PHOTO_ID_5365917041686808130" border="0" /></a><br /><br /><br /></div></div><div style="text-align: left;">The shape of the generated images are the same as the predicted images. The shapes' sizes agree with the predictions with only a small deviation.<br /></div><br /><br /><br /></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com1tag:blogger.com,1999:blog-283057628323940577.post-17727651805247257412009-07-13T18:37:00.000-07:002009-08-05T22:19:34.134-07:00Activity 7. Enhancement in the Frequency Domain<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SmUmh02gbkI/AAAAAAAAASQ/ifo6-nyCZN8/s1600-h/inverse+gaussian.bmp"></a><br /><br /><span style="font-weight: bold;">CONVOLUTION THEOREM<br /><br /></span><div style="text-align: justify;">Patterns, such as 2 dots, 2 circles and 2 squares, were made using the Microsoft Paint. The Fourier Transform of the patterns were then computed using <span class="blsp-spelling-error" id="SPELLING_ERROR_0">Scilab</span>. The images and their respective Fourier Transform is shown below. The command used for computing the Fourier Transform is:<br /><br /><div style="text-align: center;"><div style="text-align: left; font-style: italic;">S=gray_imread('Sq.bmp');<br /></div><div style="text-align: left; font-style: italic;">F=fftshift(fft2(S));<br /></div><div style="text-align: left;"><span style="font-style: italic;">imshow(abs(F),[]); </span> (This is for the square patterns)<br /></div><br /></div><br /><span style="font-weight: bold;">For 2 dots:</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlvjKJ3WY_I/AAAAAAAAAOI/eo5HnecajQ4/s1600-h/2dots.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlvjKJ3WY_I/AAAAAAAAAOI/eo5HnecajQ4/s200/2dots.bmp" alt="" id="BLOGGER_PHOTO_ID_5358125945273607154" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlvjKTHIx2I/AAAAAAAAAOQ/i4K0l7mWTpU/s1600-h/Fourier+Dots.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlvjKTHIx2I/AAAAAAAAAOQ/i4K0l7mWTpU/s200/Fourier+Dots.bmp" alt="" id="BLOGGER_PHOTO_ID_5358125947755743074" border="0" /></a><br /><div style="text-align: left;"><br /><span style="font-weight: bold;">For 2 Circles:</span><br /><br /></div></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Slviwruzj2I/AAAAAAAAAN4/2JdGvqVCl_w/s1600-h/2circ.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Slviwruzj2I/AAAAAAAAAN4/2JdGvqVCl_w/s200/2circ.bmp" alt="" id="BLOGGER_PHOTO_ID_5358125507687976802" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Slviw0BJt1I/AAAAAAAAAOA/3U4LU04qcEE/s1600-h/F2circ.bmp"><img style="cursor: pointer; width: 200px; height: 127px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Slviw0BJt1I/AAAAAAAAAOA/3U4LU04qcEE/s200/F2circ.bmp" alt="" id="BLOGGER_PHOTO_ID_5358125509912409938" border="0" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvmKLIrexI/AAAAAAAAAOo/8_BomgApY_E/s1600-h/2cirs.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvmKLIrexI/AAAAAAAAAOo/8_BomgApY_E/s200/2cirs.bmp" alt="" id="BLOGGER_PHOTO_ID_5358129244149611282" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvmKWfKajI/AAAAAAAAAOw/xlyMuFe8g78/s1600-h/F2cirs.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvmKWfKajI/AAAAAAAAAOw/xlyMuFe8g78/s200/F2cirs.bmp" alt="" id="BLOGGER_PHOTO_ID_5358129247196703282" border="0" /></a><br /><br /><br /><div style="text-align: left;"><span style="font-weight: bold;">For 2 Squares:</span><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlvkDQOhZ2I/AAAAAAAAAOY/jTBFW5Q3XMY/s1600-h/2Sq.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlvkDQOhZ2I/AAAAAAAAAOY/jTBFW5Q3XMY/s200/2Sq.bmp" alt="" id="BLOGGER_PHOTO_ID_5358126926233954146" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvkDrLlyRI/AAAAAAAAAOg/5q_ijOf4_0g/s1600-h/F2sq.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvkDrLlyRI/AAAAAAAAAOg/5q_ijOf4_0g/s200/F2sq.bmp" alt="" id="BLOGGER_PHOTO_ID_5358126933469415698" border="0" /></a></div><div style="text-align: center;"><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvnfJzz9DI/AAAAAAAAAO4/EEoMKmBicZQ/s1600-h/2Sqs.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvnfJzz9DI/AAAAAAAAAO4/EEoMKmBicZQ/s200/2Sqs.bmp" alt="" id="BLOGGER_PHOTO_ID_5358130704082531378" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlvnfWMowHI/AAAAAAAAAPA/hm2BKgI3bfE/s1600-h/F2Sqs.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlvnfWMowHI/AAAAAAAAAPA/hm2BKgI3bfE/s200/F2Sqs.bmp" alt="" id="BLOGGER_PHOTO_ID_5358130707407880306" border="0" /></a><br /><br /><div style="text-align: left;"><div style="text-align: justify;">From the images above, it can be observed that when the width or radius of the square or circle is increased, the size of the white center of the Fourier transform or the whole Fourier transform decreases. Images of a Gaussian function, with varying variances, were then generated using <span class="blsp-spelling-error" id="SPELLING_ERROR_1">Scilab</span>. The images and their Fourier Transforms are shown below.<br /></div><br /><span style="font-weight: bold;">For variance = 0.15:</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlvxjVWUioI/AAAAAAAAAPI/nLSDQH4FbRs/s1600-h/gaussian%28s%3D15-3%29.bmp"><img style="cursor: pointer; width: 200px; height: 115px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlvxjVWUioI/AAAAAAAAAPI/nLSDQH4FbRs/s200/gaussian%28s%3D15-3%29.bmp" alt="" id="BLOGGER_PHOTO_ID_5358141771015817858" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Slvxjo4RxJI/AAAAAAAAAPQ/i-RcAP8XcnY/s1600-h/gaussian+fourier.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Slvxjo4RxJI/AAAAAAAAAPQ/i-RcAP8XcnY/s200/gaussian+fourier.bmp" alt="" id="BLOGGER_PHOTO_ID_5358141776258516114" border="0" /></a></div><br /><span style="font-weight: bold;">For variance = 0.25:</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlvyfyMR9QI/AAAAAAAAAPw/_5_bkSLAkiw/s1600-h/gaussian%2825-3%29.bmp"><img style="cursor: pointer; width: 200px; height: 115px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlvyfyMR9QI/AAAAAAAAAPw/_5_bkSLAkiw/s200/gaussian%2825-3%29.bmp" alt="" id="BLOGGER_PHOTO_ID_5358142809550484738" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvyfsP5dkI/AAAAAAAAAPo/VMo9c4jR5to/s1600-h/Fgaussian%2825-3%29.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlvyfsP5dkI/AAAAAAAAAPo/VMo9c4jR5to/s200/Fgaussian%2825-3%29.bmp" alt="" id="BLOGGER_PHOTO_ID_5358142807955043906" border="0" /></a><br /><br /><div style="text-align: left;"><div style="text-align: justify;">It was observed that as the variance was increased, the image of the Fourier Transform decreased. The Scilab command used to generate the Gaussian function is:<br /><br /><span style="font-style: italic;font-size:85%;" ><span style="font-size:100%;">a=50;<br />b=50;<br />u=0.5;<br />s=0.5;<br />x=linspace(-1,1,a);<br />y=linspace(-1,1,b);<br />[X,Y]=meshgrid(x,y);<br />G=exp(-((X.*X)/s^2)).*exp(-(Y+u).*(Y+u)./(s^2))<br />+ exp(-((X.*X)/s^2)).*exp(-(Y-u).*(Y-u)./(s^2)); //+ exp(-((y+u).*(y-u).)/s^2);<br />//imshow(G,[]);<br /><br />imshow(abs(fftshift(fft2(G))),[]); (For the Fourier Transform of the Gaussian)<br /><br /></span></span><span style="font-size:85%;"><span style="font-size:100%;">The inverse</span></span><span style="font-size:85%;"><span style="font-size:100%;"> o</span></span><span style="font-size:85%;"><span style="font-size:100%;">f the</span></span><span style="font-style: italic;font-size:85%;" ><span style="font-size:100%;"> </span></span><span style="font-size:85%;"><span style="font-size:100%;">Gaussian was then computed. Th<span style="font-style: italic;">e </span>image and its Fourier transform is shown below. </span></span><span style="font-style: italic;font-size:85%;" ><span style="font-size:100%;"><br /></span></span><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SmUmh02gbkI/AAAAAAAAASQ/ifo6-nyCZN8/s1600-h/inverse+gaussian.bmp"><img style="cursor: pointer; width: 157px; height: 116px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SmUmh02gbkI/AAAAAAAAASQ/ifo6-nyCZN8/s200/inverse+gaussian.bmp" alt="" id="BLOGGER_PHOTO_ID_5360733294019243586" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SmUmiGf0QAI/AAAAAAAAASY/rOMJr1WCKRI/s1600-h/FFTinverseG.bmp"><img style="cursor: pointer; width: 179px; height: 116px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SmUmiGf0QAI/AAAAAAAAASY/rOMJr1WCKRI/s200/FFTinverseG.bmp" alt="" id="BLOGGER_PHOTO_ID_5360733298755911682" border="0" /></a><br /></div><span style="font-style: italic;font-size:85%;" ><span style="font-size:100%;"><br /></span></span></div><br /><span style="font-weight: bold;">FINGERPRINTS<br /><br /></span><div style="text-align: justify;">An image of a fingerprint was downloaded from the <span class="blsp-spelling-error" id="SPELLING_ERROR_2">internet</span>. The image was then converted to <span class="blsp-spelling-error" id="SPELLING_ERROR_3">grayscale</span> and then the Fourier Transform was then computed using <span class="blsp-spelling-error" id="SPELLING_ERROR_4">Scilab</span>. The image of the fingerprint was taken from www.freeclipart.com. The images below show the original image, the filter and the enhanced image. From the imgaes below, it can be observed that the blotches from the original image was lessened or removed after applying the filter.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SmUfRnRNlMI/AAAAAAAAARw/_rUhwY8VGb4/s1600-h/fingerprint-2.jpg"><img style="cursor: pointer; width: 151px; height: 200px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SmUfRnRNlMI/AAAAAAAAARw/_rUhwY8VGb4/s200/fingerprint-2.jpg" alt="" id="BLOGGER_PHOTO_ID_5360725318913856706" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SmUf1WnYBII/AAAAAAAAASA/F0LYnjA8U1U/s1600-h/Ffilter1.bmp"><img style="cursor: pointer; width: 151px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SmUf1WnYBII/AAAAAAAAASA/F0LYnjA8U1U/s200/Ffilter1.bmp" alt="" id="BLOGGER_PHOTO_ID_5360725932918703234" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SmUgVvWASwI/AAAAAAAAASI/FLr1JYXcZCA/s1600-h/Enhanced+F.bmp"><img style="cursor: pointer; width: 151px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SmUgVvWASwI/AAAAAAAAASI/FLr1JYXcZCA/s200/Enhanced+F.bmp" alt="" id="BLOGGER_PHOTO_ID_5360726489312545538" border="0" /></a></div></div><br /><br /><br /><span style="font-weight: bold;">LINE REMOVAL</span><br /><br />An image was then enhanced using different filters. The original image, filter and resulting images are shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6BC3uw5KI/AAAAAAAAAQI/JQArTLf3nRg/s1600-h/hi_res_vertical_lg.gif"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6BC3uw5KI/AAAAAAAAAQI/JQArTLf3nRg/s200/hi_res_vertical_lg.gif" alt="" id="BLOGGER_PHOTO_ID_5358862492937282722" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6AJtat3NI/AAAAAAAAAP4/6fdZW-xeMFc/s1600-h/filter3.bmp"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6AJtat3NI/AAAAAAAAAP4/6fdZW-xeMFc/s200/filter3.bmp" alt="" id="BLOGGER_PHOTO_ID_5358861510916299986" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6AJyrIswI/AAAAAAAAAQA/5huFS8jgmmw/s1600-h/filtered3.bmp"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6AJyrIswI/AAAAAAAAAQA/5huFS8jgmmw/s200/filtered3.bmp" alt="" id="BLOGGER_PHOTO_ID_5358861512327344898" border="0" /></a><br /></div><br /><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6BC3uw5KI/AAAAAAAAAQI/JQArTLf3nRg/s1600-h/hi_res_vertical_lg.gif"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6BC3uw5KI/AAAAAAAAAQI/JQArTLf3nRg/s200/hi_res_vertical_lg.gif" alt="" id="BLOGGER_PHOTO_ID_5358862492937282722" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6Cl1lw2nI/AAAAAAAAAQQ/PZXy3T_d4Ec/s1600-h/filter.bmp"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6Cl1lw2nI/AAAAAAAAAQQ/PZXy3T_d4Ec/s200/filter.bmp" alt="" id="BLOGGER_PHOTO_ID_5358864193169709682" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sl6CmR_hZaI/AAAAAAAAAQY/kJ8U66lNBkE/s1600-h/Filtered1.bmp"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sl6CmR_hZaI/AAAAAAAAAQY/kJ8U66lNBkE/s200/Filtered1.bmp" alt="" id="BLOGGER_PHOTO_ID_5358864200793941410" border="0" /></a><br /></div><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6BC3uw5KI/AAAAAAAAAQI/JQArTLf3nRg/s1600-h/hi_res_vertical_lg.gif"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6BC3uw5KI/AAAAAAAAAQI/JQArTLf3nRg/s200/hi_res_vertical_lg.gif" alt="" id="BLOGGER_PHOTO_ID_5358862492937282722" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sl6C53o96aI/AAAAAAAAAQg/pqSan3p76Dg/s1600-h/filter2.bmp"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sl6C53o96aI/AAAAAAAAAQg/pqSan3p76Dg/s200/filter2.bmp" alt="" id="BLOGGER_PHOTO_ID_5358864537317403042" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sl6C6AtsleI/AAAAAAAAAQo/eYKXQI0tctg/s1600-h/filtered2.bmp"><img style="cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sl6C6AtsleI/AAAAAAAAAQo/eYKXQI0tctg/s200/filtered2.bmp" alt="" id="BLOGGER_PHOTO_ID_5358864539753158114" border="0" /></a><br /></div><br />From the three sets of images above, it can be concluded that the first filter produced the best enhanced image of the original image. The vertical lines were removed when the first filter was used.<br /><br /><span style="font-weight: bold;">CANVAS WEAVE MODELING AND REMOVAL</span><br /><br />The selected painting was loaded in Scilab and a filter was created to remove the weave from the canvass. Shown below is the painting, the filter and the improved image. The second filter was more effective in removing the weave pattern than the first filter.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6RMV52LmI/AAAAAAAAAQw/HnBNHrSfCDg/s1600-h/canvasweave.JPG"><img style="cursor: pointer; width: 200px; height: 144px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6RMV52LmI/AAAAAAAAAQw/HnBNHrSfCDg/s200/canvasweave.JPG" alt="" id="BLOGGER_PHOTO_ID_5358880247841697378" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sl6RMy5F4tI/AAAAAAAAAQ4/ZQwrrZtWJTk/s1600-h/Cfilter10.bmp"><img style="cursor: pointer; width: 200px; height: 144px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sl6RMy5F4tI/AAAAAAAAAQ4/ZQwrrZtWJTk/s200/Cfilter10.bmp" alt="" id="BLOGGER_PHOTO_ID_5358880255623160530" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sl6RNd9TbqI/AAAAAAAAARA/GSUeeOQWwKQ/s1600-h/cfiltered8.bmp"><img style="cursor: pointer; width: 200px; height: 144px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Sl6RNd9TbqI/AAAAAAAAARA/GSUeeOQWwKQ/s200/cfiltered8.bmp" alt="" id="BLOGGER_PHOTO_ID_5358880267183550114" border="0" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6RMV52LmI/AAAAAAAAAQw/HnBNHrSfCDg/s1600-h/canvasweave.JPG"><img style="cursor: pointer; width: 200px; height: 144px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Sl6RMV52LmI/AAAAAAAAAQw/HnBNHrSfCDg/s200/canvasweave.JPG" alt="" id="BLOGGER_PHOTO_ID_5358880247841697378" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sl6RrPA9WaI/AAAAAAAAARI/dY2-seP27pk/s1600-h/Cfilter11.bmp"><img style="cursor: pointer; width: 200px; height: 144px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Sl6RrPA9WaI/AAAAAAAAARI/dY2-seP27pk/s200/Cfilter11.bmp" alt="" id="BLOGGER_PHOTO_ID_5358880778568423842" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sl6RriJQ89I/AAAAAAAAARQ/Coe8B8zWOC4/s1600-h/cfiltered11.bmp"><img style="cursor: pointer; width: 200px; height: 144px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sl6RriJQ89I/AAAAAAAAARQ/Coe8B8zWOC4/s200/cfiltered11.bmp" alt="" id="BLOGGER_PHOTO_ID_5358880783703536594" border="0" /></a><br /><br /><div style="text-align: left;">The weave pattern was recreated using the filter. The reconstruction of the weave pattern is shown below.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm5ZYXspChI/AAAAAAAAASg/aLGdI3e6pXk/s1600-h/weave.bmp"><img style="cursor: pointer; width: 200px; height: 144px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/Sm5ZYXspChI/AAAAAAAAASg/aLGdI3e6pXk/s200/weave.bmp" alt="" id="BLOGGER_PHOTO_ID_5363322481457826322" border="0" /></a><br /></div></div><div style="text-align: left;">For finishing this activity, I will give myself 10/10.<br /><br />**Gary, Raffy and Gilbert helped a lot.<br /></div><br /></div></div></div></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-63479550168530704822009-07-08T21:16:00.000-07:002009-07-09T01:16:12.389-07:00Activity 6. Propertes of the 2D Fourier Transform<span style="font-weight: bold;">A. Familiari</span><span style="font-weight: bold;">z</span><span style="font-weight: bold;">ati</span><span style="font-weight: bold;">on with Fourier Transform of Different 2D Patterns<br /></span><br />An image of an annulus, square annulus, double slit, square and 2 dots was created using Microsoft Paint. The Fourier Transform of the images were then computed using the<span style="font-style: italic;"> fft </span>function of Scilab. The Scilab code to generate the Fourier Transform is:<br /><br /><div style="text-align: left;"><span style="font-style: italic;">S=gray_imread('Sq.bmp');</span><br /><span style="font-style: italic;">SA=gray_imread('SqA.bmp');</span><br /><span style="font-style: italic;">C=gray_imread('CircleA.bmp');</span><br /><span style="font-style: italic;">SL=gray_imread('Slit.bmp');</span><br /><span style="font-style: italic;">D=gray_imread('2dots.bmp');</span><br /><br /><span style="font-style: italic;">imshow(abs(fftshift(fft2(D))), []);</span><br /><br /><span style="font-size:85%;">(Note: The image generated in this sample code is the diffraction pattern of the 2 dots aperture)</span><br /><br /></div>The created images and their corresponding transformed images are shown below.<span style="font-weight: bold;"><span style="font-weight: bold;"> </span><br /></span><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlVxBZu1MTI/AAAAAAAAAHw/PmSRxHbUFo0/s1600-h/Slit.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlVxBZu1MTI/AAAAAAAAAHw/PmSRxHbUFo0/s200/Slit.bmp" alt="" id="BLOGGER_PHOTO_ID_5356311600728191282" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV6IIRAd1I/AAAAAAAAAJI/kdMwdXwro3w/s1600-h/FSL.bmp"><img style="cursor: pointer; width: 200px; height: 127px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV6IIRAd1I/AAAAAAAAAJI/kdMwdXwro3w/s200/FSL.bmp" alt="" id="BLOGGER_PHOTO_ID_5356321611903432530" border="0" /></a></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlVxBqYLJ0I/AAAAAAAAAH4/VJB_KFDiy8Y/s1600-h/SqA.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlVxBqYLJ0I/AAAAAAAAAH4/VJB_KFDiy8Y/s200/SqA.bmp" alt="" id="BLOGGER_PHOTO_ID_5356311605196564290" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlV7JJcy5RI/AAAAAAAAAJY/uZVLqRow2F4/s1600-h/FSQA.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlV7JJcy5RI/AAAAAAAAAJY/uZVLqRow2F4/s200/FSQA.bmp" alt="" id="BLOGGER_PHOTO_ID_5356322728912807186" border="0" /></a></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlVxWoS323I/AAAAAAAAAIA/jhkRiJOg3Ug/s1600-h/CircleA.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlVxWoS323I/AAAAAAAAAIA/jhkRiJOg3Ug/s200/CircleA.bmp" alt="" id="BLOGGER_PHOTO_ID_5356311965414710130" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV5jtp2RcI/AAAAAAAAAJA/sxUsnqHeDxg/s1600-h/FC.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV5jtp2RcI/AAAAAAAAAJA/sxUsnqHeDxg/s200/FC.bmp" alt="" id="BLOGGER_PHOTO_ID_5356320986284574146" border="0" /></a></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlVxWxGycEI/AAAAAAAAAII/yIOPtJrn3r8/s1600-h/2dots.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlVxWxGycEI/AAAAAAAAAII/yIOPtJrn3r8/s200/2dots.bmp" alt="" id="BLOGGER_PHOTO_ID_5356311967779942466" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlV4dLg7A6I/AAAAAAAAAIY/r8U-u63rAsI/s1600-h/F2dots.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlV4dLg7A6I/AAAAAAAAAIY/r8U-u63rAsI/s200/F2dots.bmp" alt="" id="BLOGGER_PHOTO_ID_5356319774529487778" border="0" /></a></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlVxBNXNN-I/AAAAAAAAAHo/fVR18jiJwDc/s1600-h/Sq.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlVxBNXNN-I/AAAAAAAAAHo/fVR18jiJwDc/s200/Sq.bmp" alt="" id="BLOGGER_PHOTO_ID_5356311597407877090" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlV6xofpgjI/AAAAAAAAAJQ/_vIYJ-QsFQw/s1600-h/FSQ.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlV6xofpgjI/AAAAAAAAAJQ/_vIYJ-QsFQw/s200/FSQ.bmp" alt="" id="BLOGGER_PHOTO_ID_5356322324929413682" border="0" /></a></div><br />The images on the left act as the aperture and the images, the Fourier Transform, on the right displays the diffraction pattern of the respective apertures.<br /><span style="font-weight: bold;"><br />B. Anamorphic Property of Fourier Transform<br /><br /></span><div style="text-align: justify;"><span>A sinusoidal wav</span><span>e was c</span><span>reated in Scilab. The Fourier Transform and the image of the wave was then generated for</span><span> different wave frequencies. </span><span>A rotated sine wave was then generated. The Fourier Transform and the image of the transform was also computed and generated for different frequencies using Scilab. The sample Scilab code is shown below:<br /><br /><span style="font-style: italic;">nx=100;</span><br /><span style="font-style: italic;">ny=100;</span><br /><span style="font-style: italic;">x=linspace(-1,1,nx);</span><br /><span style="font-style: italic;">y=linspace(-1,1,ny);</span><br /><span style="font-style: italic;">[X,Y]= ndgrid(x,y);</span><br /><span style="font-style: italic;">f=1;<br />z=sin(2*%pi*f*X);<br />wave=abs(fftshift(fft2(z)));<br />scf(1);<br />imshow(wave,[]);<br />scf(2);<br />mesh(wave);<br />scf(3);<br />imshow(z,[]);<br /><br /></span>The image of the wave, the transformed wave, and the 3D plot of the wave is shown below. </span><br /><br /><br /><div style="text-align: center; font-weight: bold;"><div style="text-align: left;">For f=1</div></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlV8U9LCHUI/AAAAAAAAAKQ/rVPB_cE_loA/s1600-h/sinef1.bmp"><img style="cursor: pointer; width: 168px; height: 101px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlV8U9LCHUI/AAAAAAAAAKQ/rVPB_cE_loA/s200/sinef1.bmp" alt="" id="BLOGGER_PHOTO_ID_5356324031287139650" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV7yz4d4vI/AAAAAAAAAJg/y3WND9UXwG8/s1600-h/2Df1.bmp"><img style="cursor: pointer; width: 166px; height: 102px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV7yz4d4vI/AAAAAAAAAJg/y3WND9UXwG8/s200/2Df1.bmp" alt="" id="BLOGGER_PHOTO_ID_5356323444677796594" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlV8plcDBCI/AAAAAAAAAKY/QkHdwEzTLEU/s1600-h/mesh2df1.bmp"><img style="cursor: pointer; width: 200px; height: 142px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlV8plcDBCI/AAAAAAAAAKY/QkHdwEzTLEU/s200/mesh2df1.bmp" alt="" id="BLOGGER_PHOTO_ID_5356324385693303842" border="0" /></a><div style="text-align: left;"><br /><span style="font-weight: bold;">For f=2</span><br /></div></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlV9FWApHDI/AAAAAAAAAKg/yNJA-d75jiY/s1600-h/sinef2.bmp"><img style="cursor: pointer; width: 175px; height: 100px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlV9FWApHDI/AAAAAAAAAKg/yNJA-d75jiY/s200/sinef2.bmp" alt="" id="BLOGGER_PHOTO_ID_5356324862588165170" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV9l4uhhmI/AAAAAAAAAKo/XpxM2_gyuic/s1600-h/2Df2.bmp"><img style="cursor: pointer; width: 163px; height: 100px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV9l4uhhmI/AAAAAAAAAKo/XpxM2_gyuic/s200/2Df2.bmp" alt="" id="BLOGGER_PHOTO_ID_5356325421663225442" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV-Ew2JqXI/AAAAAAAAAK4/g45_ftFpRA8/s1600-h/mesh2df2.bmp"><img style="cursor: pointer; width: 190px; height: 131px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV-Ew2JqXI/AAAAAAAAAK4/g45_ftFpRA8/s200/mesh2df2.bmp" alt="" id="BLOGGER_PHOTO_ID_5356325952123677042" border="0" /></a><br /><div style="text-align: left;"><br /><span style="font-weight: bold;">For f=3</span><br /><div style="text-align: center;"><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlV-44pbcVI/AAAAAAAAALA/gZBLlEQsq1A/s1600-h/sinef3.bmp"><img style="cursor: pointer; width: 176px; height: 101px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlV-44pbcVI/AAAAAAAAALA/gZBLlEQsq1A/s200/sinef3.bmp" alt="" id="BLOGGER_PHOTO_ID_5356326847570997586" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlV_b0RSFxI/AAAAAAAAALI/0HLbaYpA5vI/s1600-h/2Df3.bmp"><img style="cursor: pointer; width: 179px; height: 101px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlV_b0RSFxI/AAAAAAAAALI/0HLbaYpA5vI/s200/2Df3.bmp" alt="" id="BLOGGER_PHOTO_ID_5356327447691400978" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV_lZrr2MI/AAAAAAAAALQ/dCZEGhw6qi4/s1600-h/mesh2df3.bmp"><img style="cursor: pointer; width: 180px; height: 131px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlV_lZrr2MI/AAAAAAAAALQ/dCZEGhw6qi4/s200/mesh2df3.bmp" alt="" id="BLOGGER_PHOTO_ID_5356327612353075394" border="0" /></a><br /><div style="text-align: left;"><br /><br /></div></div></div></div><br />The distance between the white spots in the transformed image widens as the frequency of the wave increases. The sinusoidal wave was then rotated 30 degrees. The wave was tested for different frequencies. The wave, the Fourier Transform and the 3D plot of the wave is shown below. The Scilab code used to generate the images below is the same as the code given for part b except that a different expression for z was used and a angle component was added. (In this case, z=sin(2*%pi*f*(Y*sin(theta) + X*cos(theta)))).<br /><br /><br /><span style="font-weight: bold;">For f=1</span><br /><div style="text-align: center;"><div style="text-align: left;"><div style="text-align: center;"> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWBYEdePsI/AAAAAAAAALg/EOZCs6RLGeg/s1600-h/P5sinef1.bmp"><img style="cursor: pointer; width: 161px; height: 101px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWBYEdePsI/AAAAAAAAALg/EOZCs6RLGeg/s200/P5sinef1.bmp" alt="" id="BLOGGER_PHOTO_ID_5356329582341275330" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWA2Y7EaPI/AAAAAAAAALY/2SvHVVk6isg/s1600-h/P5f1FT.bmp"><img style="cursor: pointer; width: 168px; height: 103px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWA2Y7EaPI/AAAAAAAAALY/2SvHVVk6isg/s200/P5f1FT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356329003718568178" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWCnNmSw8I/AAAAAAAAALw/d5potcKG2h8/s1600-h/P5meshf1.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWCnNmSw8I/AAAAAAAAALw/d5potcKG2h8/s200/P5meshf1.bmp" alt="" id="BLOGGER_PHOTO_ID_5356330942003856322" border="0" /></a><br /></div><br /><span style="font-weight: bold;">For f=2</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWDQB6FhII/AAAAAAAAAL4/ZF3a1Opd2C4/s1600-h/P5sinef2.bmp"><img style="cursor: pointer; width: 168px; height: 94px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWDQB6FhII/AAAAAAAAAL4/ZF3a1Opd2C4/s200/P5sinef2.bmp" alt="" id="BLOGGER_PHOTO_ID_5356331643240285314" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlWDuXdLgPI/AAAAAAAAAMA/N3xQqKI2KtM/s1600-h/P5f2FT.bmp"><img style="cursor: pointer; width: 157px; height: 98px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlWDuXdLgPI/AAAAAAAAAMA/N3xQqKI2KtM/s200/P5f2FT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356332164420698354" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWEGlZo0dI/AAAAAAAAAMI/O1k9qySaP50/s1600-h/P5meshf2.bmp"><img style="cursor: pointer; width: 187px; height: 101px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWEGlZo0dI/AAAAAAAAAMI/O1k9qySaP50/s200/P5meshf2.bmp" alt="" id="BLOGGER_PHOTO_ID_5356332580480799186" border="0" /></a></div> </div> </div><br /><span style="font-weight: bold;">For f=3</span><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWFkSIZgDI/AAAAAAAAAMQ/IsdMqneMy8g/s1600-h/P5sinef3.bmp"><img style="cursor: pointer; width: 167px; height: 98px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWFkSIZgDI/AAAAAAAAAMQ/IsdMqneMy8g/s200/P5sinef3.bmp" alt="" id="BLOGGER_PHOTO_ID_5356334190215921714" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlWGCnNGlfI/AAAAAAAAAMY/Hntb6Cjj3YE/s1600-h/P5f3FT.bmp"><img style="cursor: pointer; width: 163px; height: 93px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlWGCnNGlfI/AAAAAAAAAMY/Hntb6Cjj3YE/s200/P5f3FT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356334711268873714" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWHleT1sxI/AAAAAAAAAMg/dux0rHXEe_o/s1600-h/P5meshf3.bmp"><img style="cursor: pointer; width: 187px; height: 93px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWHleT1sxI/AAAAAAAAAMg/dux0rHXEe_o/s200/P5meshf3.bmp" alt="" id="BLOGGER_PHOTO_ID_5356336409688257298" border="0" /></a><br /><br /><br /><div style="text-align: left;">The wave appearance when theta is equal to 60 is shown in the images below. The frequency of the wave is 1.<br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWlHjIkhYI/AAAAAAAAANg/-xoSVA3jQT4/s1600-h/wavef160.bmp"><img style="cursor: pointer; width: 172px; height: 94px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWlHjIkhYI/AAAAAAAAANg/-xoSVA3jQT4/s200/wavef160.bmp" alt="" id="BLOGGER_PHOTO_ID_5356368880935929218" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWlrwIqT_I/AAAAAAAAANo/1iO69-FH2X0/s1600-h/FTf160.bmp"><img style="cursor: pointer; width: 181px; height: 96px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWlrwIqT_I/AAAAAAAAANo/1iO69-FH2X0/s200/FTf160.bmp" alt="" id="BLOGGER_PHOTO_ID_5356369502901260274" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWmMVL0UkI/AAAAAAAAANw/iVDfzSFtLes/s1600-h/3df160.bmp"><img style="cursor: pointer; width: 173px; height: 104px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWmMVL0UkI/AAAAAAAAANw/iVDfzSFtLes/s200/3df160.bmp" alt="" id="BLOGGER_PHOTO_ID_5356370062602424898" border="0" /></a><br /><br /><div style="text-align: left;">The shift in the direction of the wave is clearly observed when the angle used was shifted from 30 to 60 degrees. A pattern was then generated using two sinusoidal waves. The wave was rotated to a certain angle. The images of the wave are shown below. The expression for z in this case is given by:<br /><br /><span style="font-style: italic;">z=sin(2*%pi*4*X).*sin(2*%pi*4*Y) + sin(2*%pi*f*(Y*sin(theta) + X*cos(theta)))</span><br /><br /><br /><span style="font-weight: bold;">For theta=30 degrees</span><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWJO7BDCzI/AAAAAAAAAMo/yKOeH2kDiFs/s1600-h/P7wavef130.bmp"><img style="cursor: pointer; width: 167px; height: 97px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlWJO7BDCzI/AAAAAAAAAMo/yKOeH2kDiFs/s200/P7wavef130.bmp" alt="" id="BLOGGER_PHOTO_ID_5356338221280332594" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlWJ_qohLyI/AAAAAAAAAMw/IKANaWtEuRQ/s1600-h/P7f130FT.bmp"><img style="cursor: pointer; width: 162px; height: 96px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlWJ_qohLyI/AAAAAAAAAMw/IKANaWtEuRQ/s200/P7f130FT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356339058696072994" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWKcdPksdI/AAAAAAAAAM4/DSLEXKKZvGU/s1600-h/P7meshf130.bmp"><img style="cursor: pointer; width: 152px; height: 98px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlWKcdPksdI/AAAAAAAAAM4/DSLEXKKZvGU/s200/P7meshf130.bmp" alt="" id="BLOGGER_PHOTO_ID_5356339553317990866" border="0" /></a></div></div><div style="text-align: left;"><br /><span style="font-weight: bold;">For theta=45 degrees<br /></span><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlWLN0o1qAI/AAAAAAAAANA/bYJiuzM8Pis/s1600-h/P7wavef145.bmp"><img style="cursor: pointer; width: 177px; height: 95px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlWLN0o1qAI/AAAAAAAAANA/bYJiuzM8Pis/s200/P7wavef145.bmp" alt="" id="BLOGGER_PHOTO_ID_5356340401411565570" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlWL4pgSszI/AAAAAAAAANQ/mQrUe5G8zdY/s1600-h/P7f145FT.bmp"><img style="cursor: pointer; width: 162px; height: 98px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlWL4pgSszI/AAAAAAAAANQ/mQrUe5G8zdY/s200/P7f145FT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356341137157305138" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlWMUaIyRoI/AAAAAAAAANY/huEUkUALKDw/s1600-h/P7meshf145.bmp"><img style="cursor: pointer; width: 173px; height: 102px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlWMUaIyRoI/AAAAAAAAANY/huEUkUALKDw/s200/P7meshf145.bmp" alt="" id="BLOGGER_PHOTO_ID_5356341614068516482" border="0" /></a><br /></div><span><br /><br />I will give myself 10/10 for this completing this activity.<br /><br />**Special thanks to Raffy and Gilbert for tips during the activity.</span><span style="font-weight: bold;"><br /></span></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-51813382847111572582009-07-07T05:58:00.000-07:002009-07-07T07:02:21.420-07:00Activity 5. Fourier Transform Model of Image Formation<span style="font-weight: bold;">A. Familia</span><span style="font-weight: bold;">rization with Discrete FFT</span><br /><br /><div style="text-align: justify;">A 128x128 image of a circle and letter 'A' was created using paint. The images was then loaded in Scilab using the <span style="font-style: italic;">imread(</span><span style="font-style: italic;">) </span>function. The images was then converted to grayscale images using the <span style="font-style: italic;">im2gr</span><span style="font-style: italic;">ay()</span> function in Scilab. The Fourier Transform of the images was then computed using the <span style="font-style: italic;">fft()</span> function incorporated in Scilab. Fourier Transform shift was then employed to the transformed images using the function<span style="font-style: italic;"> fftshift()</span>. The original images with their shifted images and transformed images are shown below.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNIlL0sMLI/AAAAAAAAAFo/A_QC62AM9v8/s1600-h/121.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNIlL0sMLI/AAAAAAAAAFo/A_QC62AM9v8/s200/121.bmp" alt="" id="BLOGGER_PHOTO_ID_5355704185539801266" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNJ6GUwITI/AAAAAAAAAGA/eWxXibbVwA8/s1600-h/FFTC.bmp"><img style="cursor: pointer; width: 198px; height: 131px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNJ6GUwITI/AAAAAAAAAGA/eWxXibbVwA8/s200/FFTC.bmp" alt="" id="BLOGGER_PHOTO_ID_5355705644352545074" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlNKRdC5h6I/AAAAAAAAAGI/79I2JtDOQHU/s1600-h/FFTFFTC.bmp"><img style="cursor: pointer; width: 183px; height: 116px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlNKRdC5h6I/AAAAAAAAAGI/79I2JtDOQHU/s200/FFTFFTC.bmp" alt="" id="BLOGGER_PHOTO_ID_5355706045588670370" border="0" /></a></div><br /></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNIgwDi5HI/AAAAAAAAAFg/_RuvZxdlBO8/s1600-h/A.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNIgwDi5HI/AAAAAAAAAFg/_RuvZxdlBO8/s200/A.bmp" alt="" id="BLOGGER_PHOTO_ID_5355704109366436978" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlNJM5RMvUI/AAAAAAAAAFw/0Hg7lsmihqc/s1600-h/FFTA.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlNJM5RMvUI/AAAAAAAAAFw/0Hg7lsmihqc/s200/FFTA.bmp" alt="" id="BLOGGER_PHOTO_ID_5355704867753868610" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNJfkkaJCI/AAAAAAAAAF4/2WI6A3RVKJU/s1600-h/FFTFFTA.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNJfkkaJCI/AAAAAAAAAF4/2WI6A3RVKJU/s200/FFTFFTA.bmp" alt="" id="BLOGGER_PHOTO_ID_5355705188614808610" border="0" /></a><br /></div><br />The size of the transformed image differs from the original image. The transformed images' appearance is just the inverted original image.<br /><br /><br /><span style="font-weight: bold;">B. Simula</span><span style="font-weight: bold;">tion o</span><span style="font-weight: bold;">f an Imaging Device</span><br /><br /><div style="text-align: justify;">Images of a circle with different radii were generated using Microsoft paint. An image with the text 'VIP' was also created using paint. The images was then converted into gray scale images. The Fourier shift of the images of a circle was computed. The Fourier transform of the image with text was then computed. The Fourier Transform of the image with text and the Fourier shift of the images with a circle was multiplied. The Fourier transform of the product was then computed and the image of the absolute value of the Fourier Transform was generated. The images of the circle, text and transform is shown below.<br /><br />For r=46:</div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNNWrIvKbI/AAAAAAAAAGQ/vARfcoSPMss/s1600-h/vip.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNNWrIvKbI/AAAAAAAAAGQ/vARfcoSPMss/s200/vip.bmp" alt="" id="BLOGGER_PHOTO_ID_5355709433805482418" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlNNgOTCRjI/AAAAAAAAAGY/EEWq0Vg90EM/s1600-h/92.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlNNgOTCRjI/AAAAAAAAAGY/EEWq0Vg90EM/s200/92.bmp" alt="" id="BLOGGER_PHOTO_ID_5355709597862741554" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNOGbwzehI/AAAAAAAAAGg/3tI6hdQmSAI/s1600-h/vc2.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNOGbwzehI/AAAAAAAAAGg/3tI6hdQmSAI/s200/vc2.bmp" alt="" id="BLOGGER_PHOTO_ID_5355710254312290834" border="0" /></a></div><span style="font-weight: bold;"><br /></span><span>For r=26:</span><span style="font-weight: bold;"><br /></span><br /><span style="font-weight: bold;"><br /><br /></span><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNNWrIvKbI/AAAAAAAAAGQ/vARfcoSPMss/s1600-h/vip.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNNWrIvKbI/AAAAAAAAAGQ/vARfcoSPMss/s200/vip.bmp" alt="" id="BLOGGER_PHOTO_ID_5355709433805482418" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlNOeO8zqiI/AAAAAAAAAGo/WgAYxlroQpg/s1600-h/52.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SlNOeO8zqiI/AAAAAAAAAGo/WgAYxlroQpg/s200/52.bmp" alt="" id="BLOGGER_PHOTO_ID_5355710663189834274" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNOm3A2EKI/AAAAAAAAAGw/ONskfbjj7Lk/s1600-h/vc3.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNOm3A2EKI/AAAAAAAAAGw/ONskfbjj7Lk/s200/vc3.bmp" alt="" id="BLOGGER_PHOTO_ID_5355710811383140514" border="0" /></a><br /><br /><br /><div style="text-align: left;">The transformed image when r=46 is smoother than the transformed image when r=26.<br /><br /><br /><span style="font-weight: bold;">C. Template Matching Using Correlation</span><br /><br /><div style="text-align: justify;">A 128x128 image with text "THE RAIN IN SPAIN STAYS MAINLY IN THE PLAIN" and "A" was created using Paint. The font and font size of the images were held constant. The images were then converted into gray scale. The Fourier transform of the image with "A" was then computed and multiplied with the conjugate of the Fourier Transform of the image with the other text. The Fourier Transform of the product was then computed. The original images and the results are shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlNRImeMojI/AAAAAAAAAG4/Aej7jK4dqk4/s1600-h/TT.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SlNRImeMojI/AAAAAAAAAG4/Aej7jK4dqk4/s200/TT.bmp" alt="" id="BLOGGER_PHOTO_ID_5355713590081659442" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNRLzaNIsI/AAAAAAAAAHA/62TTXEQgHig/s1600-h/A2.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNRLzaNIsI/AAAAAAAAAHA/62TTXEQgHig/s200/A2.bmp" alt="" id="BLOGGER_PHOTO_ID_5355713645094183618" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNRO86SpLI/AAAAAAAAAHI/mJPzlH0fXIs/s1600-h/out1.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNRO86SpLI/AAAAAAAAAHI/mJPzlH0fXIs/s200/out1.bmp" alt="" id="BLOGGER_PHOTO_ID_5355713699184288946" border="0" /></a></div><div style="text-align: left;">The third image scarcely contain the text inside the original image.<br /><br /><span style="font-weight: bold;">D. Edge Detection Using Convolution Integral</span><br /><div style="text-align: justify;">Several matrices were generated and tested against the image with "VIP" text. The convolution of the image with the matrices was computed using the function <span style="font-style: italic;">imcorrcoef() </span>in Scilab. The matrices with the convolution is shown below.<br /><br />For matrix=[1 1 1; -2 -2 -2; 1 1 1]:<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNS19i6rjI/AAAAAAAAAHQ/638_lEbF7JE/s1600-h/VIPDc.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SlNS19i6rjI/AAAAAAAAAHQ/638_lEbF7JE/s200/VIPDc.bmp" alt="" id="BLOGGER_PHOTO_ID_5355715468881210930" border="0" /></a><br /><div style="text-align: left;">For matrix=[3 1 3; 3 1 3; 3 1 3]:<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNTjSy_1WI/AAAAAAAAAHY/QNey59u3VVQ/s1600-h/VIPDd.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNTjSy_1WI/AAAAAAAAAHY/QNey59u3VVQ/s200/VIPDd.bmp" alt="" id="BLOGGER_PHOTO_ID_5355716247679915362" border="0" /></a><br /></div><br />For matrix= [2 2 2; 2 3 2; 2 2 2]:<br /><br /></div></div> </div></div></div></div></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNTuduPvfI/AAAAAAAAAHg/cZXN5RjrSSM/s1600-h/VIPDe.bmp"><img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlNTuduPvfI/AAAAAAAAAHg/cZXN5RjrSSM/s200/VIPDe.bmp" alt="" id="BLOGGER_PHOTO_ID_5355716439591337458" border="0" /></a><br /><div style="text-align: center;"><div style="text-align: left;">The text is clearest when a spot patterned matrix was used. The vertical lines of the text is more defined when the vertical patterned matrix was used. On the other hand, the horizontal lines of the text is more defined when the horizontal patterned matrix was used.<br /><br />I grade myself 9/10 for completing this activity.<br /></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-70022765083646279182009-06-29T19:16:00.000-07:002009-08-06T01:02:14.349-07:00Activity 4. Enhancement by Histogram ManipulationThis activity focused on the enhancement of a low resolution image using histogram manipulation. The activity was started by selecting and downloading a low contrast image from the internet. The image is shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Skl1qH0mLrI/AAAAAAAAAEo/18UlvcyeqlA/s1600-h/c.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 256px; height: 256px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Skl1qH0mLrI/AAAAAAAAAEo/18UlvcyeqlA/s320/c.jpg" alt="" id="BLOGGER_PHOTO_ID_5352938998621154994" border="0" /></a><span style="font-size:78%;">(static.photo.net)</span></div><br /><div style="text-align: center;"><div style="text-align: justify;">The image was then resized and converted into grayscale using the <span style="font-style: italic;">im2gray </span>command in Scilab. The histogram of the gray levels was then generated using the same program. The generated histogram is shown below.<br /></div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/Skl16T29agI/AAAAAAAAAEw/0IeMmbX4Zkg/s1600-h/histplot.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 212px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/Skl16T29agI/AAAAAAAAAEw/0IeMmbX4Zkg/s320/histplot.jpg" alt="" id="BLOGGER_PHOTO_ID_5352939276730198530" border="0" /></a><br />The CDF of the image was then generated using Scilab. The CDF is presented in the figure below.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Skl3_WHUmyI/AAAAAAAAAFA/yPLiQJ9OdYc/s1600-h/cdf.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 212px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Skl3_WHUmyI/AAAAAAAAAFA/yPLiQJ9OdYc/s320/cdf.jpg" alt="" id="BLOGGER_PHOTO_ID_5352941562258299682" border="0" /></a>The image was then enhanced using a linear function. The enhanced image is shown below.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/Snp6lvnpU6I/AAAAAAAAAbo/V5c02dIR-jo/s1600-h/linear+Enhanced.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/Snp6lvnpU6I/AAAAAAAAAbo/V5c02dIR-jo/s200/linear+Enhanced.jpg" alt="" id="BLOGGER_PHOTO_ID_5366736694821868450" border="0" /></a><br /><div style="text-align: left;"><br />The CDF and the PDF of the enhanced image was generated using Scilab. The CDF and the PDF of the enhanced image above is shown below, respectively.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnqBZrleShI/AAAAAAAAAbw/NGbuWNiX70E/s1600-h/CDF1.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SnqBZrleShI/AAAAAAAAAbw/NGbuWNiX70E/s200/CDF1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366744184161978898" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnqBZ2peZPI/AAAAAAAAAb4/385kI-0ZNWo/s1600-h/PDF1.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnqBZ2peZPI/AAAAAAAAAb4/385kI-0ZNWo/s200/PDF1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366744187131553010" border="0" /></a><br /><div style="text-align: left;"><div style="text-align: justify;">The primary axis of the two plots above represent grayscale values. The image was then enhanced using a nonlinear (x^3) function. The image enhanced using the nonlinear function is shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnqId_OiuHI/AAAAAAAAAcQ/K7Mmk6ZfPYQ/s1600-h/NL.jpg"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnqId_OiuHI/AAAAAAAAAcQ/K7Mmk6ZfPYQ/s200/NL.jpg" alt="" id="BLOGGER_PHOTO_ID_5366751954735380594" border="0" /></a><br /><br /></div> The CDF and the PDF was then computed and generated using Scilab. The CDF and PDF of the enhanced image enhanced using the nonlinear function is shown below. The first image is the CDF and the second image is the PDF.<br /></div><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnqLOgb3EkI/AAAAAAAAAcY/sKRYSO7-5W4/s1600-h/cdf.bmp"><img style="cursor: pointer; width: 200px; height: 116px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnqLOgb3EkI/AAAAAAAAAcY/sKRYSO7-5W4/s200/cdf.bmp" alt="" id="BLOGGER_PHOTO_ID_5366754987306586690" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnqLO2bupRI/AAAAAAAAAcg/LvmfgxxGmhk/s1600-h/pdf.bmp"><img style="cursor: pointer; width: 200px; height: 151px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SnqLO2bupRI/AAAAAAAAAcg/LvmfgxxGmhk/s200/pdf.bmp" alt="" id="BLOGGER_PHOTO_ID_5366754993211614482" border="0" /></a></div><br /></div></div>From the images enhanced using linear and nonlinear function, it can be observed that the image generated or enhanced using the nonlinear function has a higher level of contrast than the image generated after enhancing the original image by the linear function.<br /><br /><br />I will give myself 8/10 for this activity.<br /><br />**Neil and Gilbert helped me in debugging the Scilab code.<br /></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-29421082979263851132009-06-22T19:03:00.000-07:002009-07-05T23:10:22.908-07:00Activity 3. Image Types and Basic Image Enhancement<div style="text-align: justify;">Images were categorized into true image, binary image, grayscale image and indexed image in this activity. Different images were selected and downloaded from the internet or drawn through Paint. The sample images for the categories of images are shown below.<br /></div><br /><span style="font-weight: bold;">A. Binary Image</span><br />Pixel Dimension: 640 x 360 pixels<br />Resolution: 72 x 72 ppi<br /><br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SkLNk1pAF7I/AAAAAAAAADw/_S4n9Jg0gbI/s1600-h/bi.bmp"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SkLNk1pAF7I/AAAAAAAAADw/_S4n9Jg0gbI/s320/bi.bmp" alt="" id="BLOGGER_PHOTO_ID_5351065340027606962" border="0" /></a><span style="font-weight: bold;">B. Grayscale</span><br />Pixel Dimension:1982 x 1973 pixels<br />Resolution: 300 x 300 ppi<br />Source:www.press.roncarter.net<br /><br /><div style="text-align: left;"><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SkLKTGeRw7I/AAAAAAAAADY/rJDqWRdcyPk/s1600-h/RonCarter2_300grayscale.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 318px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SkLKTGeRw7I/AAAAAAAAADY/rJDqWRdcyPk/s320/RonCarter2_300grayscale.jpg" alt="" id="BLOGGER_PHOTO_ID_5351061736773501874" border="0" /></a><br /><span style="font-weight: bold;">C. True Color</span><br />Pixel Dimension:640 x 418 pixels<br />Resolution:96 x 96 ppi<br />Source:www.jma.go.jp<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SkLKz1KF-kI/AAAAAAAAADg/gLlmEruu4SQ/s1600-h/mayon1.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 209px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SkLKz1KF-kI/AAAAAAAAADg/gLlmEruu4SQ/s320/mayon1.jpg" alt="" id="BLOGGER_PHOTO_ID_5351062299061123650" border="0" /></a><br /><br /><span style="font-weight: bold;">D. Indexed Image</span><br />Pixel Dimension:300 x 300 pixels<br />Resolution: 72 x 72 ppi<br />Source:www.crazylikethat.com<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SkLLvnJHg1I/AAAAAAAAADo/tFvRq_mgonM/s1600-h/300_binary.gif"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 300px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SkLLvnJHg1I/AAAAAAAAADo/tFvRq_mgonM/s320/300_binary.gif" alt="" id="BLOGGER_PHOTO_ID_5351063326091084626" border="0" /></a><br />An object was then selected and scanned. The image of the object was then converted into gray and black and white. The conversion of the images were done using Scilab. The images are shown below. The first image is the scanned image, followed by the converted grayscale image and the inverse black and white image.<br /><br /><br /><div style="text-align: center;">.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/Skwc0AhSGkI/AAAAAAAAAFI/J4r39bQz2i4/s1600-h/edrian.JPG"><img style="cursor: pointer; width: 108px; height: 200px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/Skwc0AhSGkI/AAAAAAAAAFI/J4r39bQz2i4/s200/edrian.JPG" alt="" id="BLOGGER_PHOTO_ID_5353685736855050818" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SkwdXIlxZxI/AAAAAAAAAFQ/mKg3nIbelWo/s1600-h/ed_gray.jpg"><img style="cursor: pointer; width: 108px; height: 200px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SkwdXIlxZxI/AAAAAAAAAFQ/mKg3nIbelWo/s200/ed_gray.jpg" alt="" id="BLOGGER_PHOTO_ID_5353686340316784402" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlGCyBXmszI/AAAAAAAAAFY/crmSgEIcNLU/s1600-h/ed123.bmp"><img style="cursor: pointer; width: 107px; height: 200px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SlGCyBXmszI/AAAAAAAAAFY/crmSgEIcNLU/s200/ed123.bmp" alt="" id="BLOGGER_PHOTO_ID_5355205227792741170" border="0" /></a></div><br /><div style="text-align: justify;">The area of the white portion of the third image was computed using Scilab, using a paint and using ruler. The area measured by the ruler was converted from inch to pixels by multiplying the measured value by 75 (since the image is 75dpi). The computed and measured area was then compared. The area computed using Scilab is 90624 pixels and the measured area is 90816.pixels The area measured using the ruler is 96736.275 pixels. The percent error of the area calculation when the area computed by Scilab and the area measured using the ruler was compared is 6.31%. The error in area when the two measured values was compared, with the ruler measurement set as reference, is 6.12%. The code used to compute the area in Scilab is shown below.<br /></div><br /><div style="text-align: center;">a=imread('ed123.bmp')<br />[x_ed,y_ed]=follow(a);<br />Area=[]<br />l=length(x_ed);<br />for i=1:l-1<br />Area(i)=x_ed(i)*y_ed(i+1)-y_ed(i)*x_ed(i+1);<br />end<br />TotalArea=sum(Area)/2<br /><br /><div style="text-align: left;">I will give myself 10/10 for completing this activity.<br /><br />**Gilbert helped in debugging the code.<br /></div><div style="text-align: left;"><br /></div></div></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-86320982498877953932009-06-22T18:39:00.000-07:002009-06-28T19:18:59.445-07:00Activity 2. Area Estimation For Images with Defined EdgesDifferent images were drawn using Microsoft Paint. The images are shown below.<br /><br /><div style="text-align: left;"><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SkA0mJK7nNI/AAAAAAAAAC4/MtDhbthAXQY/s1600-h/aaa.bmp"> <img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 252px; height: 179px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SkA0mJK7nNI/AAAAAAAAAC4/MtDhbthAXQY/s320/aaa.bmp" alt="" id="BLOGGER_PHOTO_ID_5350334187217591506" border="0" /></a></div><div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SkLtvt2roMI/AAAAAAAAAEI/Q913-OM3mCY/s1600-h/Circ.bmp"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 249px; height: 223px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SkLtvt2roMI/AAAAAAAAAEI/Q913-OM3mCY/s320/Circ.bmp" alt="" id="BLOGGER_PHOTO_ID_5351100711288152258" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SkLPV09f2AI/AAAAAAAAAD4/ozwiXoEXfOA/s1600-h/aaaa1.bmp"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 246px; height: 180px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SkLPV09f2AI/AAAAAAAAAD4/ozwiXoEXfOA/s320/aaaa1.bmp" alt="" id="BLOGGER_PHOTO_ID_5351067281170356226" border="0" /></a>The area of the white area of the images was then computed using the conventional method of computing the area( such as length multiplied by height for a rectangular area) and using Scilab. The area computed by the conventional method was treated as the theoretical value and the area computed using Scilab was treated as the experimental value. The computation of the area using Scilab is based on the Green's Theorem. The formula of the area is given by:<div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BMSXz3KqIA4/SkghIHARTpI/AAAAAAAAAEQ/C4264sSvGxI/s1600-h/d.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 209px; height: 58px;" src="http://4.bp.blogspot.com/_BMSXz3KqIA4/SkghIHARTpI/AAAAAAAAAEQ/C4264sSvGxI/s320/d.jpg" alt="" id="BLOGGER_PHOTO_ID_5352564580332686994" border="0" /></a></div><div style="text-align: center;"><img src="file:///C:/Users/user/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></div></div></div>The code used to compute the Area of the white area of the images is shown below.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SkgihaMNGuI/AAAAAAAAAEY/yDslJ-Mf9Us/s1600-h/e.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 367px; height: 249px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SkgihaMNGuI/AAAAAAAAAEY/yDslJ-Mf9Us/s320/e.jpg" alt="" id="BLOGGER_PHOTO_ID_5352566114491374306" border="0" /></a><div style="text-align: left;">The theoretical and experimental area summarized in Table 1.<br /><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SkgjBkGuCFI/AAAAAAAAAEg/rtpZq0fP30k/s1600-h/c.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 95px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SkgjBkGuCFI/AAAAAAAAAEg/rtpZq0fP30k/s320/c.jpg" alt="" id="BLOGGER_PHOTO_ID_5352566666908534866" border="0" /></a><span style="font-size:85%;"><span style="font-weight: bold;">Table 1.</span> Summary of the Theoretical and Experimental Area</span><br /><br /><div style="text-align: left;">The data presented in Table 1 shows that there is only a small difference between the theoretical and the experimental area therefore the use of the Green's theorem is valid for the computation of the area of the generated images.<br /><br />For accomplishing the given task, I grade myself 10/10.<br /><br />**Gilbert's corrections and tips helped a lot.<br /><br /></div><br /></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com0tag:blogger.com,1999:blog-283057628323940577.post-52814276934411912412009-06-15T19:46:00.000-07:002009-06-17T23:52:42.447-07:00Digital Scanning<span style="font-weight: bold;">June 18, 2009: First Activity </span><br /><br /><div style="text-align: justify;">The relationship between variables in experiments are often shown using graphs. Before the 20th century, graphs were hand-drawn. The advancement in technology made the presentation of experimental data easier. Graphs can now be generated with a click of a button. The challenge that scientists and researchers faced is to convert the old hand-drawn graphs and charts into digital charts and data. In this activity, I used ratio and proportion to compute the numerical data and convert a certain graph, taken from a 1940 Botany journal, into digital data.<br /><br />A graph was first selected and photocopied from the vast array of journals and publications in the College of Science Library. The photocopied graph was then digitally scanned in order to convert it into a digital image. After scanning the graph, the image of the graph was then viewed and edited using the Nero PhotoSnap Viewer Essential in order to remove the unwanted parts and to remove the tilt of the image. The edited image was then opened using Microsoft Paint in order to determine the pixel coordinates of the points in the graph. The measured pixel coordinates was then tabulated using the OpenOffice Calc program. The pixel coordinates was then converted into the physical values of the data presented in the graph. The conversion factor used for the x-axis is 2 units/ 70 pixels while a conversion factor of 10 units/ 71 pixels was used for the y-axis. The original, edited and the two converted graphs are presented in the figures below, respectively.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BMSXz3KqIA4/SjnMFrdMlCI/AAAAAAAAABQ/m2_nw_qwH_s/s1600-h/adrian1.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 461px; height: 229px;" src="http://2.bp.blogspot.com/_BMSXz3KqIA4/SjnMFrdMlCI/AAAAAAAAABQ/m2_nw_qwH_s/s320/adrian1.jpg" alt="" id="BLOGGER_PHOTO_ID_5348530430415770658" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SjnLWF2JNII/AAAAAAAAABI/9NbV30IxM0o/s1600-h/adrian10.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 419px; height: 237px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SjnLWF2JNII/AAAAAAAAABI/9NbV30IxM0o/s320/adrian10.jpg" alt="" id="BLOGGER_PHOTO_ID_5348529612866008194" border="0" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SjnD24vSDDI/AAAAAAAAAAo/T-7yExYfyLw/s1600-h/Adriana.bmp"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 515px; height: 276px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SjnD24vSDDI/AAAAAAAAAAo/T-7yExYfyLw/s320/Adriana.bmp" alt="" id="BLOGGER_PHOTO_ID_5348521380190227506" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SjnJ7xUQGdI/AAAAAAAAABA/E9kxB9Motpk/s1600-h/ad.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 566px; height: 285px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SjnJ7xUQGdI/AAAAAAAAABA/E9kxB9Motpk/s320/ad.jpg" alt="" id="BLOGGER_PHOTO_ID_5348528061166918098" border="0" /></a><br />The first two images show the scanned image of the graph. The third image presented shows the XY scatter of the converted data points. The square marks in the third image are the computed value of the data points while the circle marks are the data points of the original graph. The graph shows that the data points presented in the original graph closely match those of the converted graph. The last image shows the converted fit and the original fit of the graph. The blue line represents the converted fit while the black line is the fit of the original graph. The image also show that there is a very close resemblance between the original graph and the converted graph. The data points used in generating the last 2 graphs are shown in the tables below.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BMSXz3KqIA4/SjnQNchSjlI/AAAAAAAAABg/_RWf4CZmcTY/s1600-h/data1.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 365px; height: 295px;" src="http://3.bp.blogspot.com/_BMSXz3KqIA4/SjnQNchSjlI/AAAAAAAAABg/_RWf4CZmcTY/s320/data1.jpg" alt="" id="BLOGGER_PHOTO_ID_5348534961891872338" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BMSXz3KqIA4/SjnTqm9HMXI/AAAAAAAAABo/-vRX8RzXiQc/s1600-h/data2.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 349px; height: 254px;" src="http://1.bp.blogspot.com/_BMSXz3KqIA4/SjnTqm9HMXI/AAAAAAAAABo/-vRX8RzXiQc/s320/data2.jpg" alt="" id="BLOGGER_PHOTO_ID_5348538761444012402" border="0" /></a>The first table shows the data points of the XY scatter while the second table shows the data points of the fit of the graph.<br /><br />In summary, a hand-drawn graph was successfully converted into a digital graph. The values presented by the original graph was also measured and computed using ratio and proportion.<br /><br />I will grade myself 10/10 for completing the assigned tasks in the activity and getting a converted graph that closely fits the original graph.<br /><br />***Raffy's and Gilbert's tips really helped a lot.<br /><br /><br /><br /></div>Adrianhttp://www.blogger.com/profile/11217820035552689116noreply@blogger.com1