<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7318264123829861887</id><updated>2012-02-16T10:06:19.391-08:00</updated><category term='plot'/><category term='image'/><category term='overlay'/><category term='digitize'/><category term='scan'/><title type='text'>ap186 ni raffy</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-2967456611424096560</id><published>2009-09-30T23:13:00.000-07:00</published><updated>2009-09-30T23:14:20.458-07:00</updated><title type='text'>LAST POST</title><content type='html'>THIS IN THEORY IS THE LAST POST IN THIS BLOG!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-2967456611424096560?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/2967456611424096560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/last-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/2967456611424096560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/2967456611424096560'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/last-post.html' title='LAST POST'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-333281671297971623</id><published>2009-09-30T23:11:00.000-07:00</published><updated>2009-10-12T17:55:11.990-07:00</updated><title type='text'>Activity 19: Restoration of Blurred Images</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3UgjRWXiG0Y/StLMS5zhW8I/AAAAAAAAAUc/Ld-NPxa_-TU/s1600-h/eq2.jpg"&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Objectives: &lt;/b&gt;To demonstrate the concept of motion blur and its restoration as well as basic noise filtering.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP toolbox.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Procedure: &lt;/b&gt;We begin with an ordinary image with text written on it, in this case we use a grayscale image of the Apollo 13 Mission Patch  with the words "Apollo XIII" and "Ex Luna Scientia." &lt;/div&gt;&lt;div&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StLKU3coKsI/AAAAAAAAATs/67zmfHFC9mc/s200/Apollo_13-insignia.png" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 200px; height: 199px; " border="0" alt="" id="BLOGGER_PHOTO_ID_5391594163746122434" /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We are in theory to simulate motion blur using the equation:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/StLMShTXkhI/AAAAAAAAAUU/fYyngKUVsjE/s320/eq1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391596322465223186" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 56px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;However, some difficulty was encountered in implementing this. As such the images were blurred using Photoshop, with varying distances of blur. After this, we add noise to the blurred image using the Gaussian image routine established in the previous activity, resulting in image like the one below:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/StLKfPRhm9I/AAAAAAAAAT0/PdLbDsMkjoQ/s320/Blur_tile.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391594341940698066" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 320px; height: 109px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Then using the filtering method described in the activity, Weiner filtering, the original image is reconstructed using different parameters. The working equation is given as:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/StLMS5zhW8I/AAAAAAAAAUc/Ld-NPxa_-TU/s320/eq2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391596329042533314" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 95px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; The reconstructed images for the middle sample above (with medium blur) follow:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StLKfkKVmzI/AAAAAAAAAT8/dCo32fDHtxg/s320/recon_tile.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391594347547695922" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 320px; height: 110px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Interestingly, the filtering routine seems to have worked even if the blurring functions used are of uncertain similarity. It appears that the blurring routine used in PS is similar to the routine we are to use here, but of course the correlation may be purely coincidental. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation:&lt;/b&gt; For the properly reconstructed images a grade of 10 is proper. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Acknowledgements:&lt;/b&gt; As usual Mr. Cabello and Panganiban have rendered invaluable assistance in this activity.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-333281671297971623?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/333281671297971623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-19-restoration-of-blurred.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/333281671297971623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/333281671297971623'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-19-restoration-of-blurred.html' title='Activity 19: Restoration of Blurred Images'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3UgjRWXiG0Y/StLKU3coKsI/AAAAAAAAATs/67zmfHFC9mc/s72-c/Apollo_13-insignia.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-6903192593082848035</id><published>2009-09-30T23:10:00.000-07:00</published><updated>2009-10-12T06:52:13.314-07:00</updated><title type='text'>Activity 18: Noise Models and Basic Image Restoration</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/StM0bN5wFJI/AAAAAAAAAWM/gszo6rNcBI8/s1600-h/RAY_Recons.jpg"&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/StMxcoZa9CI/AAAAAAAAAWE/wYGXXDNp3vw/s1600-h/noise_tile.jpg"&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/StMD1oJOZwI/AAAAAAAAAV8/4YZXGNg5zfk/s1600-h/UNI_Recons.jpg"&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;Objectives: &lt;/b&gt;To demonstrate basic noise modelling and the removal of noise from images using filters&lt;div&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP toolbox, grayscale test and sample images&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Procedure: &lt;/b&gt;We begin with a grayscale image of three gray levels from white to black. Simultaneously we use a real world image (in this case a grayscale image of the Apollo 13 Mission Patch) with more than three gray levels.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/StL-9AAOYdI/AAAAAAAAAVE/BQxI3BSFBWg/s200/test_plate.jpg" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 100px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5391652027842322898" /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StLnPiX1NfI/AAAAAAAAAUk/75hL5RDSaag/s320/Apollo13.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5391625958026720754" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 318px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We model the different types of noise using mathematical models presented and add these noise matrices to both the test image and the real-world image. The following plate shows the images with different noise models added:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/StMxcoZa9CI/AAAAAAAAAWE/wYGXXDNp3vw/s400/noise_tile.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391707546842756130" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 158px; height: 400px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;From top to bottom, the noise models are: Exponential, Gamma, Gaussian, Salt and Pepper, Uniform and Rayleigh noise. The added noise is then filtered on all the images using a variety of filters, described in the text (Arithmetic mean, Geometric mean, Harmonic mean and contraharmonic mean filters). The images above are processed using each of these filters and the results are shown below for each of the added noise types:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. Exponential Noise&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StMDQVaxM5I/AAAAAAAAAVc/1xQwK6SL9Z0/s400/EXP_Recons.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391656758054826898" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 309px; height: 400px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. Gamma Noise&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/StMDZydK3PI/AAAAAAAAAVk/uW5slot1Qss/s1600-h/GAM_Recons.jpg" style="text-decoration: none;"&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/StMDZydK3PI/AAAAAAAAAVk/uW5slot1Qss/s400/GAM_Recons.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391656920468348146" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 309px; height: 400px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. Gaussian Noise&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StMDjS0ZZII/AAAAAAAAAVs/BUtPTau2Ojw/s400/GAU_Recons.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391657083774526594" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 309px; height: 400px; " /&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;4. Salt and Pepper Noise&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StMDsyQz6qI/AAAAAAAAAV0/oxsq5AltYQ8/s400/SNP_Recons.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391657246834027170" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 309px; height: 400px; " /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. Uniform Noise&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/StMD1oJOZwI/AAAAAAAAAV8/4YZXGNg5zfk/s1600-h/UNI_Recons.jpg"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/StMD1oJOZwI/AAAAAAAAAV8/4YZXGNg5zfk/s400/UNI_Recons.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391657398736676610" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 309px; height: 400px; " /&gt;&lt;/a&gt;6. Rayleigh Noise&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/StM0bN5wFJI/AAAAAAAAAWM/gszo6rNcBI8/s400/RAY_Recons.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391710821085615250" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 309px; height: 400px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation: &lt;/b&gt;For correct noise models and filtering a grade of 10 is acceptable.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Acknowledgements:&lt;/b&gt; I would like to thank Mr. Panganiban for the invaluable assistance in this activity.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-6903192593082848035?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/6903192593082848035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-18-noise-models-and-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6903192593082848035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6903192593082848035'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-18-noise-models-and-basic.html' title='Activity 18: Noise Models and Basic Image Restoration'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/StL-9AAOYdI/AAAAAAAAAVE/BQxI3BSFBWg/s72-c/test_plate.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-7538578669665149921</id><published>2009-09-09T18:56:00.004-07:00</published><updated>2009-09-09T19:47:20.962-07:00</updated><title type='text'>Activity 17: Photometric Stereo</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Objectives: &lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;To reconstruct a three dimensional image using a set of 2-D images with different illumination positions.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Tools:&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; Scilab with SIP.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Procedure:&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; We start with four images of a spherical calibration target illuminated by a point source at these locations:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;S1 = (0.085832, 0.17365, 0.98106)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;S2 = (0.085832, -0.17365, 0.98106)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;S3 = (0.17365, 0, 0.98481)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;S4 = (0.16318, -0.34202, 0.92542)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SqhjypEiCoI/AAAAAAAAARs/vMStbT_e9_k/s1600-h/matI1.jpg"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SqhjypEiCoI/AAAAAAAAARs/vMStbT_e9_k/s200/matI1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5379659476563528322" style="cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SqhjyQTc9xI/AAAAAAAAARk/H8mVdO4p1GM/s200/matI2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5379659469915223826" style="cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/Sqhjx5q8XKI/AAAAAAAAARc/ojQCAGAi8-o/s200/matI3.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5379659463839734946" style="cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SqhjxmlUcWI/AAAAAAAAARU/WKJfpj729XY/s200/matI4.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5379659458715873634" style="cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The positions vary by very small increments and hence the images do not appear to be any different to the eye. We find the surface normal vector to the points on the surface using the equation:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SqhkxqausyI/AAAAAAAAAR8/ETy0s1MSiLY/s200/eqn_n.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5379660559256826658" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 91px; height: 71px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Where g is given by:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SqhlIbmplnI/AAAAAAAAASE/oEaW0jwcjUw/s200/eqn2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5379660950417282674" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 200px; height: 50px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;With V taken from the images. The slope with respect to z of each point in both x and y is given by:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/Sqhl0QtsOLI/AAAAAAAAASM/_4bSB5JMieU/s200/eqn3.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5379661703408269490" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 200px; height: 55px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The function f is fiven by the sum of the integrals of the partials in x and y. Numerically we use the cumulative sum fucntion to find these integrals and the resulting funtion is plotted in 3-D. The result is somehting like the plot below:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SqhmYe0va8I/AAAAAAAAASU/_pmKoY4bAMU/s320/3dplot.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5379662325671226306" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 320px; height: 250px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;As we can see, the plot is hemispherical which is the result expected. It is of interest to examine the effect of varying the illumination shift on the accuracy of the reconstruction. It is also of note that this approach is from the stanpoint of intensity. That is, the changes in the illumination allow for the measurement of slope and shape. Another approach may involve the phase of the illuminating light which has been shown to yield better results in terms of reconstruction ability. &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Evaluation&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: For the proper reconstruction of the shape, a grade of 10 is appropriate.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Acknowledgements:&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; The assistance of Neil Cabello and Earl Panganiban is greatly appreciated.  &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-7538578669665149921?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/7538578669665149921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-17-photometric-stereo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/7538578669665149921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/7538578669665149921'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-17-photometric-stereo.html' title='Activity 17: Photometric Stereo'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/SqhjypEiCoI/AAAAAAAAARs/vMStbT_e9_k/s72-c/matI1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-2652839480181206074</id><published>2009-09-09T18:56:00.003-07:00</published><updated>2009-10-12T08:12:17.401-07:00</updated><title type='text'>Activity 16: Neural Networks</title><content type='html'>&lt;b&gt;Objectives: &lt;/b&gt;To demonstrate the application of neural networks in pattern recognition&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP and ANN toolboxes&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Procedure: &lt;/b&gt;As most of the details of the procedure are canned and those which are distinct are graphically repetitive, we shall go through what was done only in broad sweeping strokes. As mentioned, we used canned code for this, available through various channels. We first set a seed for consistency. We then create a training set of several values of two parameters, in this case as before, the area and red-color channel value of the intensities. For example we utilize the set:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;y=&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;0.04   0.44&lt;/div&gt;&lt;div&gt;0.05   0.41&lt;/div&gt;&lt;div&gt;0.07   0.45&lt;/div&gt;&lt;div&gt;0.18   0.43&lt;/div&gt;&lt;div&gt;0.21   0.45&lt;/div&gt;&lt;div&gt;0.33   0.44&lt;/div&gt;&lt;div&gt;0.36   0.42&lt;/div&gt;&lt;div&gt;0.38   0.43&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For this set, we classify this, in a manner similar to Boolean, as &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[ 0 0 0 0 0 1 1 1]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That is to say, for our purposes, the last three sets, with the corresponding parameters are the ones to be classified under a certain heading and all the others effectively discarded.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we define a test set of object parameters we wish to classify:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;x=&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;0.20   0.44&lt;/div&gt;&lt;div&gt;0.23   0.45&lt;/div&gt;&lt;div&gt;0.40   0.41&lt;/div&gt;&lt;div&gt;0.38   0.39&lt;/div&gt;&lt;div&gt;0.36   0.40&lt;/div&gt;&lt;div&gt;0.04   0.41&lt;/div&gt;&lt;div&gt;0.05   0.42&lt;/div&gt;&lt;div&gt;0.24   0.40&lt;/div&gt;&lt;div&gt;0.37    0.41&lt;/div&gt;&lt;div&gt;0.39    0.39&lt;/div&gt;&lt;div&gt;0.38    0.42&lt;/div&gt;&lt;div&gt;0.36    0.38&lt;/div&gt;&lt;div&gt;0.39    0.45&lt;/div&gt;&lt;div&gt;0.06   0.35&lt;/div&gt;&lt;div&gt;0.22   0.33&lt;/div&gt;&lt;div&gt;0.38   0.40&lt;/div&gt;&lt;div&gt;0.40   0.39&lt;/div&gt;&lt;div&gt;0.37   0.38&lt;/div&gt;&lt;div&gt;0.02   0.31&lt;/div&gt;&lt;div&gt;0.04   0.34&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The output of the code, at a learning rate of 1 and with 1000 training cycles,rounded off to the nearest integer (1 or 0) is&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[ 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 1 1 1 0 0]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Which is in exact agreement with what is expected. It is of note that when the learning rate is decreased, the pointwise accuracy of the network decreases. Additionally, the training cycle also has the same direct effect which agrees with intuitive understanding. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Evaluation:&lt;/b&gt; For proper classification a grade of 10 is appropriate.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Acknowledgement:&lt;/b&gt; As usual, Mr. earl Panganiban is of mention for his assistance. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-2652839480181206074?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/2652839480181206074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-16-neural-networks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/2652839480181206074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/2652839480181206074'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-16-neural-networks.html' title='Activity 16: Neural Networks'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-6202511502861940958</id><published>2009-09-09T18:44:00.000-07:00</published><updated>2009-09-12T21:04:25.878-07:00</updated><title type='text'>Activity 15: Probabilistic Classification</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;Objectives: &lt;/b&gt;To apply Linear Discriminant Analysis to classify and sort objects from two distinct classes.&lt;/span&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab and data from Activity 14.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Procedure: &lt;span class="Apple-style-span" style="font-weight: normal;"&gt;The aim of the activity is to classify the objects in an &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;image into distinct groups in much the same way as the previous activity. Instead of using the distance method, we use linear discriminant analysis or LDA, the details of which can be found elsewhere. We utilize the same set of images from the previous activity, that of the coins. &lt;/div&gt;&lt;b&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SquNTHz91aI/AAAAAAAAASc/Q0K3w-0hY2w/s320/sample+final.jpg" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 320px; height: 240px; " border="0" alt="" id="BLOGGER_PHOTO_ID_5380549539478230434" /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;As mentioned the data from the previous activity is used with same classification characteristics, that is area and color. Since we want to examine the usage of LDA on two classes of objects only, we sort our data set according to area and exclude the first ten values, as these correspond to one class of objects. This is to eliminate the need to mask one of the object test classes and redoing the image processing routines.  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We then apply the LDA routine per the tutorial provided and plot in two axes, we get a figure similar to the previous activity. The crosses represent the loci of the objects in the image with respect to area and color. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SqxqgsIQ5tI/AAAAAAAAASk/qD0FsJo6FC0/s1600-h/plot4.jpg"&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SqxqgsIQ5tI/AAAAAAAAASk/qD0FsJo6FC0/s320/plot4.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5380792764635080402" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 242px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Note the distinctive separation of the two classes with the lower set representing the lower denomination coins. Also of note is the better discrimination between the two classes compared to the previous activity. In the said procedure, the distinctions between two almost similar classes is unclear. In this case the deliniation is much clearer and hence it can be expected that this method will yield a better grouping and classification result. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation: &lt;/b&gt;For the proper classification of the objects a grade of 10 is appropriate.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Acknowledgements: &lt;/b&gt;The usual thanks to Neil Cabello and Earl Panganiban for the unfailing assistance. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-6202511502861940958?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/6202511502861940958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-15-lda.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6202511502861940958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6202511502861940958'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/09/activity-15-lda.html' title='Activity 15: Probabilistic Classification'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/SquNTHz91aI/AAAAAAAAASc/Q0K3w-0hY2w/s72-c/sample+final.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-5014680879654284623</id><published>2009-08-26T17:45:00.000-07:00</published><updated>2009-09-06T23:46:11.285-07:00</updated><title type='text'>Activity 14: Pattern Recognition</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Objectives: &lt;/b&gt;To demonstrate the application of pattern recognition in describing a set or ensemble of objects in an image.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP, an assembly of items with differnt shapes and sizes&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Procedure: &lt;/b&gt;We begin by assembling a set of 30 coins representing our test objects. We use 10 each of .25, 1 and 5 Peso coins. The size of these coins increase with their denomination hence we can use that as one of our test parameters. Also the coins have different colors with the 25-centavo coin being bright copper, the one having a silver color and the 5 having a dull yellow-green tinge. We first take five of each coin and take a picture which we will use as our training set. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SqSJ3-zg6HI/AAAAAAAAAQE/L4RjXttS2U4/s1600-h/train+final.JPG"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SqSJ3-zg6HI/AAAAAAAAAQE/L4RjXttS2U4/s320/train+final.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5378575449832089714" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 320px; height: 240px; " /&gt;&lt;/a&gt;&lt;div style="text-align: justify;"&gt;We then use a binarized copy of the image to find the areas of the coins using bwlabel. We do this for all the coins in the training set and group the similar values together. We then take the first five values and find the average which will then represent the average area of the one-peso coin. We do this for the next two sets of fives to get the areas for the other two coins. Then using the original image, we find the red-channel colors of each of the coins and in a similar manner find the average values. These two values, the area and the color represent our classifiation parameters which we then apply to a test set consisting of 10 coins of each denomination. arranged randomly within the field. &lt;/div&gt;&lt;div&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SqSJ4VHK9mI/AAAAAAAAAQM/aQUu37MvyYY/s320/sample+final.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5378575455820117602" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 320px; height: 240px; " /&gt;&lt;div style="text-align: justify;"&gt;Using the same processing scheme as with the training set sans the averaging segment, we find our two classification parameters from the image and plot this with the x-axis being the area and the y-axis representing the color values of the red-channel.&lt;/div&gt;&lt;span class="Apple-style-span" style="text-decoration: none; "&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SqSJ3-zg6HI/AAAAAAAAAQE/L4RjXttS2U4/s1600-h/train+final.JPG"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="text-decoration: none;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SqSJ3eS2ucI/AAAAAAAAAP8/LcsBKOinlD0/s1600-h/plot3.bmp"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SqSJ3eS2ucI/AAAAAAAAAP8/LcsBKOinlD0/s1600-h/plot3.bmp"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SqSJ3eS2ucI/AAAAAAAAAP8/LcsBKOinlD0/s320/plot3.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5378575441105172930" style="text-align: justify;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 320px; height: 246px; " /&gt;&lt;/a&gt;&lt;div style="text-align: justify;"&gt;Note that the cirlces represent the training parameters, that is the average color and area of each of the coins. We see a good clustering of the test points around the training values in the x-axis. This means that in terms of area, the coins in the test sample are quite distinguishable. However we still see a deviation from the ideal area which we can attribute to the changes in the area caused by the conversion from RGB to binary of the area measurement. Some of the coins shrink or expand depending on the lighting conditions and the thresholding value. Similarly in the y-axis we see a greater deviation from the average color values which again may be attributed to the lighting. Notice that the test and training images do not have exactly identical lighting conditions. As such some degree of deviation is expected. Of course this can be alleviated by employing more consistent lighting or in some cases, adding more features to test.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation:&lt;/b&gt; For the generally accpetable results, a grade of 10 is warranted.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Acknowledgements: &lt;/b&gt;The invaluable assitance of Mr. Earl Panganiban is greatly appreciated and is key to the completion of this excercise. &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-5014680879654284623?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/5014680879654284623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-14-pattern-recognition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/5014680879654284623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/5014680879654284623'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-14-pattern-recognition.html' title='Activity 14: Pattern Recognition'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3UgjRWXiG0Y/SqSJ3-zg6HI/AAAAAAAAAQE/L4RjXttS2U4/s72-c/train+final.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-6487531574915791663</id><published>2009-08-26T17:43:00.000-07:00</published><updated>2009-10-10T23:43:52.592-07:00</updated><title type='text'>Activity 13: Correcting Geometric Distortion</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StF-lWE7q0I/AAAAAAAAATM/SwzekQ5KCug/s1600-h/mat.jpg"&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StF93uPCwnI/AAAAAAAAATE/HLEXJZ4XtPg/s1600-h/raw.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/StF923lIdmI/AAAAAAAAAS0/UrUeZR09kRw/s1600-h/bi.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StF92T-rXaI/AAAAAAAAASs/917WBo4dWKU/s1600-h/nn.jpg"&gt;&lt;/a&gt;&lt;b&gt;Objectives: &lt;/b&gt;To demonstrate the process of correcting geometric distortions present in images.&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Procedure: &lt;/b&gt;In order to simplify the computation, we use a grid of horizontal and vertical lines with barrel distortion present like the one we have below:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StF93uPCwnI/AAAAAAAAATE/HLEXJZ4XtPg/s320/raw.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391228625196597874" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 256px; height: 256px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Using an idealized matrix of points, that is in the proper perpendicular vertex loci which is derived either using software or manually through the interface, we establish our reference grid. This is represented as a set of points occurring on the intersections of the lines. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/StF93W505LI/AAAAAAAAAS8/YHeX3dPE12I/s320/ideal.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391228618933593266" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 256px; height: 256px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now using the least distorted part of the test grid image, we compute c1 through c8 using the following matrices:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StF-lWE7q0I/AAAAAAAAATM/SwzekQ5KCug/s1600-h/mat.jpg"&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StF-lWE7q0I/AAAAAAAAATM/SwzekQ5KCug/s320/mat.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391229408985721666" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 276px; height: 320px; " /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Using linear algebra, the details of which we will omit as they are redundant, we get an expression for the coordinates of all the points of the image translated into the undistorted or proper frame:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This gives us the coordinates of the vertices in the correct frame. We use 2 interpolation methods to generate the points in between. We first use the bilinear interpolation which yields a grid like:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/StF923lIdmI/AAAAAAAAAS0/UrUeZR09kRw/s320/bi.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391228610525296226" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 256px; height: 256px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And then using the nearest neighbor interpolation we get:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/StF92T-rXaI/AAAAAAAAASs/917WBo4dWKU/s320/nn.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5391228600968764834" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 256px; height: 256px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;As is consistent with theory, the bilinear method yields better results in terms of reconstructions. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Evaluation:&lt;/b&gt; For the properly reconstructed grid, a grade of 10 is justified.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Acknowledgements: &lt;/b&gt;As usual I thank Earl Panganiban and Gilbert Gubatan for their assistance. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-6487531574915791663?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/6487531574915791663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-13-correcting-geometric.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6487531574915791663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6487531574915791663'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-13-correcting-geometric.html' title='Activity 13: Correcting Geometric Distortion'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3UgjRWXiG0Y/StF93uPCwnI/AAAAAAAAATE/HLEXJZ4XtPg/s72-c/raw.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-788175440384688743</id><published>2009-08-07T03:55:00.001-07:00</published><updated>2009-08-17T18:28:00.477-07:00</updated><title type='text'>Activity 11: Color Camera Processing</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Objectives: &lt;/b&gt;To demonstrate the principle of color balancing in color cameras especially the post recording correction of improperly color balanced images.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP toolbox&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Procedure: &lt;/b&gt;We begin with several improperly color balanced images with several objects of different colors present. These have their color balance settings varied to show the effects of white balancing.&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SnwNFmwl5TI/AAAAAAAAAPM/0EOP1mxg9BE/s320/tiles.JPG" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 170px; height: 320px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5367179245873653042" /&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The right panel shows the result of the correction using the white patch algorithm. The images below show a drastically wrongly color balanced image corrected using both the white patch and grayworld algorithms&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SnwOWT6J3MI/AAAAAAAAAPU/zlYoSL-xr8E/s320/cor.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5367180632382889154" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 82px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;As can be seen from the images, the correction for both algorithms is generally acceptable. The white patch has more color fidelity especially in the red region while the grayworld is more uniform. However, for images which are dominated by a ceratin color, the gray world algorithm fails in that it generally overcorrects for a complimentary color. Hence, the white patch algorithm is a better all around method.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation:&lt;/b&gt; For the partially completed work, a grade of 7 is the highest appropriate score, as the algortihms were already implemented. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-788175440384688743?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/788175440384688743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-11-color-camera-processing.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/788175440384688743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/788175440384688743'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-11-color-camera-processing.html' title='Activity 11: Color Camera Processing'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3UgjRWXiG0Y/SnwNFmwl5TI/AAAAAAAAAPM/0EOP1mxg9BE/s72-c/tiles.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-4786958269904128394</id><published>2009-08-06T22:43:00.000-07:00</published><updated>2009-08-07T03:53:59.029-07:00</updated><title type='text'>Activity 10: Preprocessing Text</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SnvEAPm_MnI/AAAAAAAAAOk/P6NlsAhWHuk/s1600-h/ft_et.bmp"&gt;&lt;/a&gt;&lt;b&gt;Objectives: &lt;/b&gt;To apply image processing methods to isolate handwritten text from an imaged document.&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP toolbox&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Procedure: &lt;/b&gt;We begin with a scanned image of text both handwritten and in type. Since the image is tilted, we make it upright using the &lt;b&gt;mogrify() &lt;/b&gt;command in Scilab. For computing expediency we also resize the image to more managable dimensions.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SnvEBNvlSiI/AAAAAAAAAO8/CrmHJYRJnFk/s320/Text_full.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5367098906090228258" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 256px; height: 320px; " /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We then crop a small portion of the image, with handwritten text to isolate then convert this to grayscale. Taking the FT as shown in the center image below allows us to see the components that we do not need, in this case the bright vertical line at the center corresponding to the horizontal lines on the image. Using a mask like the one on the right we can cancel this component out.&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SnvEAPm_MnI/AAAAAAAAAOk/P6NlsAhWHuk/s320/ft_et.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5367098889411179122" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 75px; " /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;After eliminating the lines, we clean the images using morphological operators such as closing and opening and resizing .  After cleaning, we use &lt;b&gt;bwlabel()&lt;/b&gt; to label the text as we have in the middle frame below. Then we convert to binary to get just the hand written text.&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SnvEAoUW53I/AAAAAAAAAO0/f8yvx3o17ck/s320/res1.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5367098896043927410" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 99px; " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We also use image processing methods, in this case image correlation to find the occurences of a tempalte word, in this case "DESCRIPTION". The images below show the template word and the results of the correlation. The images appear to indicate very roughly the instances of occurence but are not as properly correlated as can be expected.&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SnwGNtZ1-iI/AAAAAAAAAPE/YtTRaJf1ReY/s320/corr_res.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5367171688514845218" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 189px; height: 107px; " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation: &lt;/b&gt;Since the text is not as clearly isolated and the correlation is not as proper, only 7 out of the possible 10 points is proper.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Acknowledgement:&lt;/b&gt; I would like to thank Mr. Cabello for constructive discussions. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-4786958269904128394?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/4786958269904128394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-10-preprocessing-text.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/4786958269904128394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/4786958269904128394'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-10-preprocessing-text.html' title='Activity 10: Preprocessing Text'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/SnvEBNvlSiI/AAAAAAAAAO8/CrmHJYRJnFk/s72-c/Text_full.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-8460916060594646348</id><published>2009-08-05T20:04:00.000-07:00</published><updated>2009-08-06T20:39:31.509-07:00</updated><title type='text'>Activity 9: Binary Operations</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/Snugyb9D5RI/AAAAAAAAAOc/eDco29ZlJ44/s1600-h/hist.bmp"&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Objectives: To apply image processing techniques to the analysis of binary images and to do area measurement on such images&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Tools: Scilab with SIP&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Procedure:&lt;/b&gt;We start with an image of a sheet of paper with holes randomly punched through, simulating cells in a microscope slide for example. &lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SnugVs1HKcI/AAAAAAAAAOU/ujRSreEGfds/s200/full.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5367059675613702594" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 200px; height: 162px; " /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;For computing expediency,  cut up the image into nine panels of 256 by 256 pixels each. The images are read in grayscale and are binarized individually using im2bw with their own threshold values. This is done since there are areas of the original image which are darker or lighter than the rest of the image. As such each image needs a different threshold for converted to binary. After conversion, the "salt and pepper" noise on the converted images are removed by morphologically closing and opening the image. We have below the 9 binary images concatenated into a composite image:&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SnugVUghgdI/AAAAAAAAAOM/TyROjiwouCs/s1600-h/ybw.bmp"&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SnugVUghgdI/AAAAAAAAAOM/TyROjiwouCs/s200/ybw.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5367059669084897746" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 200px; height: 162px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Using  the &lt;b&gt;bwlabel() &lt;/b&gt;function in Scilab, we label each individual hole and blob with a distinct integer. Then we use the &lt;b&gt;find&lt;/b&gt; function to search for each of these values. We sum up all the values to find the area of each blob. Below, we have a histogram showing the number of occurences of a range of areas. We see that the most common areas are the small values corresponding to individual holes. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/Snugyb9D5RI/AAAAAAAAAOc/eDco29ZlJ44/s320/hist.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5367060169299846418" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 250px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation&lt;/b&gt;: Since the results correlate closely with what is expected, a grade of 10 is proper.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Acknowledgements:&lt;/b&gt; I would like to thank Mr. Neil Cabello for his invaluable assistance.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-8460916060594646348?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/8460916060594646348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-9-binary-operations.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/8460916060594646348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/8460916060594646348'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/08/activity-9-binary-operations.html' title='Activity 9: Binary Operations'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/SnugVs1HKcI/AAAAAAAAAOU/ujRSreEGfds/s72-c/full.bmp' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-2207763290351723334</id><published>2009-07-27T17:44:00.000-07:00</published><updated>2009-07-27T19:24:13.833-07:00</updated><title type='text'>Activity 8: Morphological Operations</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;Objective: &lt;/b&gt;To demonstrate the concepts of image dilation and erosion via a structuring element.&lt;/span&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP toolbox&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Procedure: &lt;/b&gt;We use an image set as shown below. The square is 50 by 50 pixels while the hollow square is 60 by 60 and 4 pixels in width. The traingle is 30 by 50 while the circle is 25 pixels in radius. On the other hand, the cross is 8 pixels wide and each arm is 50 pixels long.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LD1Y77RI/AAAAAAAAAOE/84wqQvSqCj8/s1600-h/orig.bmp"&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LD1Y77RI/AAAAAAAAAOE/84wqQvSqCj8/s400/orig.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5363306735488199954" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 80px; " /&gt;&lt;/a&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;         &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;ORIGINAL&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;We use the following structuring elements:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;SE1= &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;1 1 1 1 &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;          1 1 1 1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;          1 1 1 1&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LD4tvgII/AAAAAAAAAN8/sSJ__CYG1jE/s1600-h/r1.bmp"&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LD4tvgII/AAAAAAAAAN8/sSJ__CYG1jE/s400/r1.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5363306736380772482" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 160px; " /&gt;&lt;/a&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;      &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;DILATION AND EROSION USING SE 1&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;SE2= &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;1 1 1 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;            1 1 1 1 &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LDg1ePnI/AAAAAAAAAN0/7XY1V2I1HIQ/s1600-h/r2.bmp"&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LDg1ePnI/AAAAAAAAAN0/7XY1V2I1HIQ/s400/r2.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5363306729970744946" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 160px; " /&gt;&lt;/a&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;b&gt;      &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;DILATION AND EROSION USING SE 2&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;SE3= &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;1 1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;1 1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;           1 1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;           1 1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LDYfEoeI/AAAAAAAAANs/vaoc-Mc-HeM/s1600-h/r3.bmp"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LDYfEoeI/AAAAAAAAANs/vaoc-Mc-HeM/s400/r3.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5363306727729308130" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 160px; " /&gt;&lt;/a&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;b&gt;      &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;DILATION AND EROSION USING SE 3&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;SE4= &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;0 0 1 0 0&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;0 0 1 0 0&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;           1  1  1  1 1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;           0 0  1  0 0&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;           0 0  1  0 0&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LDBcTwnI/AAAAAAAAANk/2vTuA-90VUY/s1600-h/r4.bmp"&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LDBcTwnI/AAAAAAAAANk/2vTuA-90VUY/s400/r4.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5363306721543701106" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 160px; " /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;b&gt;      &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;DILATION AND EROSION USING SE 4&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We notice distinct changes in the images (which incidentally do not correspond to the predictions made previously). Using a square SE we simply see a transfromation of the structure either as an expansion of the lines in case of dilation and compression with erosion. For the non-symmetric elements( like the 2x4 and 4x2 ones), the expansion or contraction only applies to the elements parallel to the longitudinal axis of the SE. On the other hand, the cross SE yields transformations on both axes as well as the characteristic edge rounding of small SEs.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Acknowledgements: &lt;/b&gt;I would like to thank Mr. Cabello and Mr. Panganiban for their assistance.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation: &lt;/b&gt;Since the predictions do not match the result only a grade of 8 is seen as appropriate.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-2207763290351723334?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/2207763290351723334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-8-morphological-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/2207763290351723334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/2207763290351723334'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-8-morphological-operations.html' title='Activity 8: Morphological Operations'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/Sm5LD1Y77RI/AAAAAAAAAOE/84wqQvSqCj8/s72-c/orig.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-5195384230804610875</id><published>2009-07-23T00:32:00.000-07:00</published><updated>2009-07-27T19:57:05.546-07:00</updated><title type='text'>Activity 7:Enhancement in the Frequency Domain</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;b&gt;Objectives: &lt;/b&gt;To  demonstrate the concept of filtering in the frequency domain and how this affect the quality of images.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP toolbox&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Procedure: &lt;/b&gt;We begin by finding the FTs of pairs of apertures such as the ones we have below. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/Smg80c9BT_I/AAAAAAAAAMc/C4tPnJbtgfE/s320/result1.bmp" style="cursor:pointer; cursor:hand;width: 320px; height: 155px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5361602228207570930" /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;As with the previous activity, the FTs of the various patterns appear as a convolution of the paterns of a single aperture. It is also of note that the Gaussian FT is still a Gaussian but is tranformed in the frequency space. That is, a wider, more spread out Gaussian function has a narrower transform in the FT space.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The next set of examples illustrate the us of filtering in the Fourier space to cancel out certain undesirable components in the images.For example, the image of the moon below has a set of vertical lines which are very pronounced. Also it has some horizontal scan lines which may be an artifact of the mosaic process. In order to remove these, we implement the following steps:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. Take the FT of the image.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. Create a mask to remove certain components.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. Shift (fftshift) the mask so that the lower order componenents are on the outer portions of the image.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. Multiply the mask and the FT&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. Take the FT of the product. and normalize.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;For this image we use a cross shaped filter to cancel out the periodic, cosinusoidal frequencies in the x and y direction. Note that the mask does not cover the DC component as this contains a lot of information about all the points on the object. Hence if it is removed we lose valuable information. The resulting filtered image is shown below the original. Note that the lines have been removed and the image is cleare. However since we inadvertently removed other useful components, the image has less contrast and detail in some parts than the original.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SmhAZUI8S3I/AAAAAAAAAMk/sQlO7dATj94/s320/result2.bmp" style="cursor:pointer; cursor:hand;width: 320px; height: 241px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5361606160031697778" /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;On the other hand, we a decidedly more difficult image with the next one which is a patch from a painting on stretched canvas. The task is to remove the weave pattern to enhance the actual image. For this we work directly with the FT of the image. The bright spots symmetric about either the x or y axis are the frequencies we want to dscard for these indicate periodic, cosinusoidal patterns in image space. Thus we place circular masks at the positions of these points. We see that when such a mask is used to filter the image, we get a weave free image. Also if we now take our mask and use the centers as the locations of bight spots, that is if we invert the mask, then take the FT, we come up with a weave pattern similar to what we removed from the original image. &lt;/div&gt;&lt;div&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SmmFuT7povI/AAAAAAAAAMs/FltmbqVUyqg/s320/result3.JPG" style="cursor:pointer; cursor:hand;width: 320px; height: 240px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5361963862032229106" /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For the last section, we attempt to enhance the ridges and lines on an image of a fingerprint. From the FT we discern that our region of interest is the band like structure centered about the DC component. We make a mask to leave only this and the DC component. We see that indeed we can recover the medium frequency components and enace the lines while removing most of the high order noise. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SmmFunZJNZI/AAAAAAAAAM0/IYK1Ay4WxxI/s320/result4.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5361963867256206738" style="cursor: pointer; width: 320px; height: 110px; " /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Evaluation: &lt;/b&gt;Since all the images were adequately enhanced using FT methods, a grade of 10 is applicable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Acknowledgements: &lt;/b&gt;I would like to thank Misters. Garcia, Gubatan, Panganiban and Cabello for their helpful inputs.  &lt;b&gt; &lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Rating:&lt;/b&gt; Since all the results tally with what is expected and the images are well filtered, a score of 10 is warranted. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-5195384230804610875?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/5195384230804610875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-7enhancement-in-frequency.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/5195384230804610875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/5195384230804610875'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-7enhancement-in-frequency.html' title='Activity 7:Enhancement in the Frequency Domain'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3UgjRWXiG0Y/Smg80c9BT_I/AAAAAAAAAMc/C4tPnJbtgfE/s72-c/result1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-9105656553059290081</id><published>2009-07-08T19:18:00.001-07:00</published><updated>2009-07-09T18:30:44.122-07:00</updated><title type='text'>Activity 6: Properties of the 2D Fourier Transform</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlWTapQ4UgI/AAAAAAAAAK8/s__ZvbjC8lM/s1600-h/sine.bmp"&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Objective:&lt;/span&gt; To increase familiarity with the various&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tools: &lt;/span&gt;&lt;span&gt;Scilab with SIP toolbox.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Procedure:&lt;/span&gt;&lt;div&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;1. Familiarization of FT of Different 2D Patterns.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Using&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;th&lt;/span&gt;&lt;span&gt;e&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;sa&lt;/span&gt;&lt;span&gt;me routines as with the previous activity, we take the FTs of the following apertures:&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SlVUOH_D4xI/AAAAAAAAAKk/w1Svt1J1zYI/s1600-h/section1_apertures.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 64px;" src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SlVUOH_D4xI/AAAAAAAAAKk/w1Svt1J1zYI/s400/section1_apertures.bmp" alt="" id="BLOGGER_PHOTO_ID_5356279933465518866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span&gt;This yields the following FT patterns:&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlVUoGge9hI/AAAAAAAAAKs/qun1gJzNL8g/s1600-h/section1_patterns.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 64px;" src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlVUoGge9hI/AAAAAAAAAKs/qun1gJzNL8g/s400/section1_patterns.bmp" alt="" id="BLOGGER_PHOTO_ID_5356280379745433106" border="0" /&gt;&lt;/a&gt;The first two patterns are identical to the ones from the previous activity. The third image is from an annulus and if we compute the far-field diffraction pattern(which is the same as the FT) we see that the result is a difference between two orders of Bessel functions. Hence we see a set of missing orders or fringes. The fourth is essentially the same only now the functions are sinc functions in x and y. The fourth is the double slit pattern at far field. This can be thought of as coherent oscillators interfering with each other. This means that the upper and lower sections cancel each others contribution. This leaves the central strip hence we only see a pattern at the center of the strip. The last image represents two circular apertures, this results in a modulation of the phase from the other hole causing the interfernce fringes that are superposed on the circular diffraction fringes.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Anamorphic Property of the Fourier Transform&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;A. We take a 2-D Sinusoid with frequency f=4:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlWTapQ4UgI/AAAAAAAAAK8/s__ZvbjC8lM/s320/sine.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5356349417789608450" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 196px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We then take the FT of this pattern which yields two points in the transform plane. This corresponds to the frequency of the input. We do this for two other frequencies,f=1 and f=15 to get the following images arranged in increasing f:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlWXg39nYlI/AAAAAAAAALM/eIVeN49l31A/s400/sines_result.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5356353922861064786" style="cursor: pointer; width: 306px; height: 100px; " /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We see that as the frequency increases, the points move further from the center. This makes sense if we treat the points as the frequncies of the sine waves (which they are). Thus as the frequency is increased the points move away from the center.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Now if we add a constant bias, we essentially add a field with all the possible frequencies present. Hence from Fourier theory, the FT of this is a single point. We see this when we get the mesh() of the biased sine wave. For comparison, we place on the left a mesh plot of the FT of the same wave without a bias:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlWdLZnFDUI/AAAAAAAAALU/ytxe919trFI/s400/mesh1_results.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5356360151005990210" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 149px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The spike at the center represents the frequency of the bias or what is known as the zero-order component. Note that this is of a greater intesity than the sine spikes. If in a real image this becomes an issue, it is possible to subtract the constant value from the input image. This would leave the two spikes represnting the sine. The position of the spikes corresponds directly to the frequency hence we can find the spatial frequency of the fringes in areal image. On the other hand, if the bias is not constantand is a low f sine, we can use the FTs and remove the lower frequency component. We can then take the inverse transform to leave us with the filtered sinusoidal wave.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If we rotate the sine waves like the ones below:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SlWmSAA_1zI/AAAAAAAAALk/jipJAD-Q3p4/s320/rotation.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5356370159999113010" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 212px; height: 97px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We get the following patterns, which are consistent with the previous result:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlWpHIB1prI/AAAAAAAAAL0/WLP3gEwhf-4/s320/rotation_result.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5356373271706445490" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 208px; height: 100px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If we multiply two sines or any function with two frequencies, we get a superposition of the transforms of both. In this case we use a product of two sne functions:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlWsGd1ZfdI/AAAAAAAAAL8/qd0bCwfbaQk/s320/sixxsin_f_1.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5356376558914862546" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 242px; " /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Which has a transform like:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlWsceV_87I/AAAAAAAAAME/DFnQ-XUGHEA/s320/msh_sinxsin_ft.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5356376937008722866" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 100px; height: 100px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This corresponds with what we expected as we see two sets of spikes which individually look like the pattern for a simple sine function. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;For the last part, if wee add this function to the rotated sines above, we get an image which looks like:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlWs-grn1YI/AAAAAAAAAMM/vJxcqp2S_tQ/s320/msh_sin_sin_plus_rotate.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5356377521751840130" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 100px; height: 100px; " /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Which has a transform like:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlWtQMB1WBI/AAAAAAAAAMU/W95nlJKm0cA/s320/msh_sin_sin_plus_rotate_ft.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5356377825445500946" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 100px; height: 100px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;All this essentially tells us that the 2D FT obeys the priciple of superposition.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Reference: &lt;/b&gt;AP 186 Activity 6 Manual&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation: &lt;/b&gt;For the proper results, a grade of 10 is warranted.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-9105656553059290081?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/9105656553059290081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-6-properties-of-2d-fourier.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/9105656553059290081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/9105656553059290081'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-6-properties-of-2d-fourier.html' title='Activity 6: Properties of the 2D Fourier Transform'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/SlVUOH_D4xI/AAAAAAAAAKk/w1Svt1J1zYI/s72-c/section1_apertures.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-8118882589409029216</id><published>2009-07-06T19:30:00.000-07:00</published><updated>2009-07-07T04:55:48.847-07:00</updated><title type='text'>Activity 5: Fourier Transform Model of Image Formation</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;span style="font-weight: bold;"&gt;Objective:&lt;/span&gt; To introduce the use of the Fourier Transform or FT as the standard model for imaging applications highlighting the varied uses of this method for image processing. &lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Tools: &lt;/span&gt;Scilab with SIP toolbox.&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Procedure:&lt;/span&gt;The activity is divided into 5 parts each with its own focus.&lt;br /&gt;&lt;br /&gt;1. Familiarization with the discrete FFT:&lt;br /&gt;This section focuses on the use of the FFT as the mathematical equivalent of a lens. For this section we use two shapes, a circle and a square as our object and essentially image it with a lens of infinite aperture via the 2-D FFT function:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlK5lmqye4I/AAAAAAAAAGM/HIlgzmU8u0U/s1600-h/circ.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlK5lmqye4I/AAAAAAAAAGM/HIlgzmU8u0U/s200/circ.bmp" alt="" id="BLOGGER_PHOTO_ID_5355546962583255938" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlK5t-CQELI/AAAAAAAAAGU/nqSWd_a2QNU/s1600-h/square.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlK5t-CQELI/AAAAAAAAAGU/nqSWd_a2QNU/s200/square.bmp" alt="" id="BLOGGER_PHOTO_ID_5355547106294632626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The corresponding FTs for these are as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlK531yixXI/AAAAAAAAAGc/qQa4SoOXTEg/s1600-h/circ_ft.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlK531yixXI/AAAAAAAAAGc/qQa4SoOXTEg/s200/circ_ft.jpg" alt="" id="BLOGGER_PHOTO_ID_5355547275879957874" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlK6w0G2TeI/AAAAAAAAAGk/VS0vDgT8pzY/s1600-h/square_ft.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlK6w0G2TeI/AAAAAAAAAGk/VS0vDgT8pzY/s200/square_ft.jpg" alt="" id="BLOGGER_PHOTO_ID_5355548254680796642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;These image on the left represents the Airy disk of a point like image and the left image represnts the sinc(x)*sinc(y) function from a square aperture. This is how the patterns will appear on the transform plane on the back focal plane of a lens. Incidentally, these two images represent the far field or Fraunhofer diffraction pattern of the two aperture illuminated by a plane wave. When the FT of these images are taken we get the FT of the FT which are just the original images. On the other hand, if we use as our image a capital letter "A" as we have below:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlK8nppBkeI/AAAAAAAAAG0/WjSmtO_y5FQ/s1600-h/rd1.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlK8nppBkeI/AAAAAAAAAG0/WjSmtO_y5FQ/s200/rd1.bmp" alt="" id="BLOGGER_PHOTO_ID_5355550296275784162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;We get a Fourier transform like the one we have below:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlK85STEkTI/AAAAAAAAAG8/REnqNYtfCiw/s1600-h/A_ft.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlK85STEkTI/AAAAAAAAAG8/REnqNYtfCiw/s200/A_ft.jpg" alt="" id="BLOGGER_PHOTO_ID_5355550599247335730" border="0" /&gt;&lt;/a&gt;This indicates a center of symmetry even if the original image is only laterally symmetric. We also note that this patten may be thought of as a superposition of many point spread functions interfering with each other thus yielding this complex pattern. If we now take the FT of this image, we get an inverted "A" which can be thought of as the image of the object as seen through a lens system:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlK91AlcUuI/AAAAAAAAAHE/BoXFi-SkdYE/s1600-h/rd1.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlK91AlcUuI/AAAAAAAAAHE/BoXFi-SkdYE/s200/rd1.bmp" alt="" id="BLOGGER_PHOTO_ID_5355551625284702946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Convolution-Simulation of an Imaging Device.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Convolution theorem essentially states that when the transform of two functions are multiplied it is equal to the transform of the product of the original functions. When this is translated into imaging, the image of an object ban be thought of as the convolution of the aperture function and the transfer function of the lens (or any other imaging system). In this case we use the the capital letters  "VIP" in white against a blackbackground and a series of circular apertures simulating the aperture stop of the imaging lens. We take the FT of the aperture as imaged by a lens and then multiply it with the aperture which is in the transfrom plane. we then take the FT one more time to simulate another imaging lens.  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SlMZlAMRoHI/AAAAAAAAAHM/ky2u8WZ4JJo/s200/vip.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355652505370992754" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We use the following apertures with increasing size.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlMuRhSQC0I/AAAAAAAAAIM/fUzvuM6WbUQ/s200/ap1.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355675260401224514" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlMuYUjx1gI/AAAAAAAAAIU/M-VWIAfj9R0/s200/ap2.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355675377244165634" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SlMudxzqX1I/AAAAAAAAAIc/F1mDE9hF_PQ/s200/ap3.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355675470994759506" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlMultn9YAI/AAAAAAAAAIk/3pZOSDOoo9Y/s200/ap4.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355675607310884866" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SlMsNtH3KRI/AAAAAAAAAH8/hnfgSY41DBA/s1600-h/ap4.bmp"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SlMr3GQpE8I/AAAAAAAAAHs/HjRzPbdo3oY/s1600-h/ap4.bmp"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; "&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;The corresponding imaged convolutions are:&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; "&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; "&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlMu5osNqxI/AAAAAAAAAIs/W6kpjoPruX4/s200/ap_conv_1.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355675949583936274" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlMu58cM81I/AAAAAAAAAI0/AHSrQuUSS3M/s200/ap_conv_2.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355675954885489490" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlMu6OdcjcI/AAAAAAAAAI8/uYHWV-5Pj-A/s200/ap_conv_3.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355675959722544578" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlMu6Rkb6JI/AAAAAAAAAJE/PSOp_sWVx7U/s1600-h/ap_conv_4.bmp"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlMu6Rkb6JI/AAAAAAAAAJE/PSOp_sWVx7U/s200/ap_conv_4.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355675960557168786" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;These correspond well to the fact that a larger aperture will produce a clearer image compared to a smaller aperture. At small apertures, the diffraction from the aperture actually limits the resolution of the imaging system.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;b&gt;3. Correlation-Template Matching&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;The section on correlation utilizes an image with certain text and a template letter. The correlatio is maximum when the section of the image matches completely with the template. This results in a large spot or spread function at the location of the match. In this case, we use the image on the left and then a template for the letter "A." The correlation is displayed on the right of these two:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlMxDRuLsMI/AAAAAAAAAJc/HjatpXJXRo0/s200/text.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355678314240127170" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlMxDm2Zi0I/AAAAAAAAAJk/Nf_PRYIPjjU/s200/text3.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355678319911734082" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlMxDmAuI2I/AAAAAAAAAJs/lJFfEq3znoI/s1600-h/cor.bmp"&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlMxDmAuI2I/AAAAAAAAAJs/lJFfEq3znoI/s200/cor.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355678319686591330" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlMrwQRTpyI/AAAAAAAAAHk/QQC6di0LWso/s1600-h/ap4.bmp"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The bright points indicate the regions of maximum correlation and these correspond clearly with the locations of the letter A in the image on the left.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;4. Edge detection using convolution integral&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In this last section we use the same concept as template matching to find the edges of an image pattern. This time we use matrices as our teplate instead of imges. Again we use the VIP image and find its edges using the following matrices:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A= -1 -1 -1 &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;2   2   2 &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; -1 -1 -1&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;B= -1 2 -1&lt;/div&gt;&lt;div style="text-align: justify;"&gt;      -1 2 -1&lt;/div&gt;&lt;div style="text-align: justify;"&gt;      -1 2 -1&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;and&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;C= -1 -1 -1&lt;/div&gt;&lt;div style="text-align: justify;"&gt;      -1  8  -1&lt;/div&gt;&lt;div style="text-align: justify;"&gt;      -1  -1 -1&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;With the following results:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlM3MeFCN9I/AAAAAAAAAJ8/g_WEbXB9RNA/s200/edge2.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355685069245790162" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;div style="text-align: center; "&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlM3MAyDaGI/AAAAAAAAAJ0/GkX728gOHrc/s200/edge1.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355685061381548130" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;/div&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SlM3MTxTZkI/AAAAAAAAAKE/jO19OETojz8/s200/edge3.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5355685066478675522" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 128px; height: 128px; " /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SlMZlAMRoHI/AAAAAAAAAHM/ky2u8WZ4JJo/s1600-h/vip.bmp"&gt;&lt;/a&gt;&lt;span style="font-weight: bold; "&gt;&lt;/span&gt;&lt;span style="font-weight: bold; "&gt;&lt;/span&gt;&lt;span style="font-weight: bold; "&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Reference: &lt;/b&gt;AP 186 Activity 5 Manual&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Evaluation: &lt;/b&gt;For the sheer amount of work expended as well as the proper results a grade of &lt;/div&gt;&lt;div style="text-align: justify;"&gt;10 is warranted.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Acknowledgements: &lt;/b&gt;I would like to thank the usual people for their assistance.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-8118882589409029216?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/8118882589409029216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-5-fourier-transform-model-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/8118882589409029216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/8118882589409029216'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-5-fourier-transform-model-of.html' title='Activity 5: Fourier Transform Model of Image Formation'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlK5lmqye4I/AAAAAAAAAGM/HIlgzmU8u0U/s72-c/circ.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-4386231477788652839</id><published>2009-07-05T20:35:00.000-07:00</published><updated>2009-07-06T03:28:44.685-07:00</updated><title type='text'>Activity 4:Enhancement by Histogram Manipulation</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Objective: &lt;/b&gt;To manipulate images via their corresponding histogram and to enhance images by altering the gray levels as indicated by the histograms.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tools: &lt;/b&gt;Scilab with SIP toolbox.&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Procedure: &lt;/b&gt;The first order of business is to convert a colored image into grayscale or find a low contrast grayscale image. In this case we use an image of the M17 Nebula taken by the Hubble Space Telescope from the site:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" color: rgb(75, 99, 32); font-family:Helvetica;"&gt;http://www1.cs.columbia.edu/~johnc/ta_page/6998s07/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" color: rgb(75, 99, 32); font-family:Helvetica;"&gt;schedule/proj1/proj1.html&lt;/span&gt;&lt;/div&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlHHZJnMGmI/AAAAAAAAAEs/_IiEBznyo3A/s320/page3_2.png" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 246px; height: 200px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5355280666811177570" /&gt;&lt;span class="Apple-style-span"   style=" color: rgb(75, 99, 32);  font-family:Helvetica;font-size:13px;"&gt;&lt;div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;div&gt;We then take the histogram of this, as in the previous activity, by finding and counting the number of pixels which have a specific grayscale value and plotting these against the actual values. This yields a histogram like this:&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlHJDxgJxKI/AAAAAAAAAE0/YZqhA4m2gu8/s320/hist_orig.bmp" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 136px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5355282498585216162" /&gt;&lt;/div&gt;&lt;div&gt;We then take another function related to the histogram &lt;/div&gt;&lt;div&gt;called the CDF. This is essentially the cumulative sum&lt;/div&gt;&lt;div&gt; of the histogrm at each grayscale value. This is found simply by using the cumsum() function in Scilab. The CDF of the image above looks like:&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlHKaYjvsUI/AAAAAAAAAE8/8qre_b6lhWI/s320/CDF_orig.bmp" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 129px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5355283986538017090" /&gt;&lt;div&gt;In order to enhance the image the idealized CDF for thi&lt;/div&gt;&lt;div&gt;s is a straight, increasing line. Thus after generating such a f&lt;/div&gt;&lt;div&gt;unction, we use projection to replace the grayscale values in the original image with the grayscale values of the y-axis equivalents. This effectively replaces the grayscale values which cause the CDF to deviate from the ideal. The net effect, at least in theory is an increase in the contrast between light and dark regions. However as shown by the new, enhanced image below, the contrast does not change too drastically.&lt;/div&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlHNrSHj1yI/AAAAAAAAAFE/sW7afM6l3t0/s320/page3_2_en_line_fxn.png" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 246px; height: 200px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5355287575401846562" /&gt;&lt;div&gt;But if we look at the histogram and the CDF of this new image, we see that the new CDF is already ideal:&lt;/div&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SlHP6XKY31I/AAAAAAAAAFM/0Zi9uxDueN4/s320/data_line_image.bmp" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 242px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5355290033477181266" /&gt;&lt;div&gt;Additionally, we present other examples of images enhanced using  respectively:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-4386231477788652839?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/4386231477788652839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-4enhancement-by-histogram.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/4386231477788652839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/4386231477788652839'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/07/activity-4enhancement-by-histogram.html' title='Activity 4:Enhancement by Histogram Manipulation'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3UgjRWXiG0Y/SlHHZJnMGmI/AAAAAAAAAEs/_IiEBznyo3A/s72-c/page3_2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-3712916864322794657</id><published>2009-06-22T19:49:00.000-07:00</published><updated>2009-07-05T20:33:03.800-07:00</updated><title type='text'>Activity 3:Image types and basic image enhancement</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238);"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;Objective: &lt;/span&gt;Differentiate image formats and apply basic image processing and conversion.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tools&lt;/span&gt;: Image processing software and Scilab&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Procedure:&lt;/span&gt; We use several different images:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/Skg-5IG481I/AAAAAAAAAEU/QlOpxnR3X90/s200/hs-2000-07-a-small_web.jpg" style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 200px;" alt="" id="BLOGGER_PHOTO_ID_5352597308279681874" border="0" /&gt;&lt;br /&gt;1. RGBImage of NGC 2392, Eskimo Nebula&lt;br /&gt;Taken from www.hubblesite.org200 x 200 pixels.&lt;br /&gt;72x72 dpi&lt;br /&gt;4kB in RGB&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SkBHpU6gJ3I/AAAAAAAAADc/O8Kmp92EIB8/s200/page3_2.png" style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 163px;" alt="" id="BLOGGER_PHOTO_ID_5350355132630443890" border="0" /&gt;&lt;br /&gt;2. GrayscaleImage of M17 Nebula taken by HST&lt;/div&gt;&lt;div&gt;Taken from: http://www1.cs.columbia.edu&lt;/div&gt;&lt;div&gt;/~johnc/ta_page/&lt;br /&gt;6998s07/schedule/proj1/proj1.html&lt;br /&gt;200 x200 pixels&lt;br /&gt;149.987 x149.987 dpi&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;  &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Indexed&lt;div&gt;&lt;img src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/SkgzMiTE31I/AAAAAAAAAEM/j10H1GL8p_M/s200/egret_gro.gif" style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 124px;" alt="" id="BLOGGER_PHOTO_ID_5352584447588097874" border="0" /&gt;&lt;/div&gt; &lt;div&gt; &lt;div&gt;  &lt;/div&gt; &lt;/div&gt;&lt;/div&gt;&lt;div&gt;Colorized image of the entire sky at&lt;/div&gt;&lt;div&gt; gamma-ray energies  &lt;/div&gt;&lt;div&gt;Taken from: &lt;a href="http://www.phys.ncku.edu.tw/~astrolab/mirrors/apod/ap950623.html"&gt;http://www.phys.ncku.edu&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.phys.ncku.edu.tw/~astrolab/mirrors/apod/ap950623.html"&gt;.tw/&lt;/a&gt;&lt;a href="http://www.phys.ncku.edu.tw/~astrolab/mirrors/apod/ap950623.html"&gt;~astrolab&lt;/a&gt;&lt;a href="http://www.phys.ncku.edu.tw/~astrolab/mirrors/apod/ap950623.html"&gt;/mirrors/apod&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.phys.ncku.edu.tw/~astrolab/mirrors/apod/ap950623.html"&gt;/ap950623&lt;/a&gt;&lt;div&gt; &lt;div&gt;  &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;div&gt;&lt;a href="http://www.phys.ncku.edu.tw/~astrolab/mirrors/apod/ap950623.html"&gt;.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;477x297 pixels&lt;/div&gt;&lt;div&gt;96 x 96 dpi &lt;/div&gt;&lt;div&gt;46.2 kB&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt; &lt;div&gt;  &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Then in order to apply basic image processing techniques, we use a colored image and convert it to binary using a histogram routine to find the appropriate threshold value. Then we use the routine from the previous Activity to find the are of the ROI. Specifically, we use the figure shown below (taken from E. Marolda,&lt;span&gt;&lt;span style="font-family:Verdana;color:#333333;"&gt; The U.S. Navy in the Vietnam War)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt; &lt;div&gt; &lt;div&gt; &lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SkwhTNMnSAI/AAAAAAAAAEc/AdKHZe9kL6M/s1600-h/map2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 295px;" src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SkwhTNMnSAI/AAAAAAAAAEc/AdKHZe9kL6M/s320/map2.jpg" alt="" id="BLOGGER_PHOTO_ID_5353690670880475138" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;/div&gt;&lt;br /&gt;This is then converted to binary using the im2bw routine which uses a threshold value to specify the gray level which is converted to either white or black. The following code is used to generate the historgram of the image:&lt;br /&gt;&lt;br /&gt;clc&lt;br /&gt;clf&lt;br /&gt;&lt;br /&gt;img=imread('C:\Documents and Settings\2005-09860\Desktop\page3_2_en_sub.png');&lt;br /&gt;//imshow(img);&lt;br /&gt;a = 1;&lt;br /&gt;&lt;br /&gt;g= [];&lt;br /&gt;p= [];&lt;br /&gt;for j = 1:256&lt;br /&gt;[x, y] = find(img== j);&lt;br /&gt;g(a) = j;&lt;br /&gt;p(a) = length(x);&lt;br /&gt;a = a + 1;&lt;br /&gt;end&lt;br /&gt;subplot(211)&lt;br /&gt;//p=p/max(max(p));&lt;br /&gt;&lt;br /&gt;plot(g,p)&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------&lt;br /&gt;After conversion, the area of the image is taken using the routine in the previous activity. The routine indicates that this image has an are of 84500.5 units. Compared to the previous images processed, this appears to be a fairly accurate result.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Evaluation:&lt;/b&gt;For the effort expended and the acceptable result I can rate this as a 10.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Acknowledgements:&lt;/span&gt;I would like to thank Mr. Gubatan for insights on the histogram process as well as the usual folks for their assistance.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight: bold;"&gt;References: &lt;/span&gt;AP 186 Activity 3 Manual&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-3712916864322794657?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/3712916864322794657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/06/activity-3image-types-and-basic-image.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/3712916864322794657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/3712916864322794657'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/06/activity-3image-types-and-basic-image.html' title='Activity 3:Image types and basic image enhancement'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/Skg-5IG481I/AAAAAAAAAEU/QlOpxnR3X90/s72-c/hs-2000-07-a-small_web.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-6694841803821660245</id><published>2009-06-22T18:25:00.000-07:00</published><updated>2009-06-24T20:07:40.596-07:00</updated><title type='text'>Activity 2:Area estimation for images with defined edges</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;Objective: &lt;/span&gt;Use image processing software and Green's Theorem to compute the area of a regular polygon and compare this with the analytically computed area.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tools:&lt;/span&gt; Scilab specifically the Image Processing Toolbox, MS Paint&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Procedure: &lt;/span&gt;We use four different regular shapes drawn in black and white using MS paint.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SkBBuvbyQcI/AAAAAAAAAC0/36VogoyTK_Y/s1600-h/rect1.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SkBBuvbyQcI/AAAAAAAAAC0/36VogoyTK_Y/s200/rect1.bmp" alt="" id="BLOGGER_PHOTO_ID_5350348628578943426" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SkBBu5ZRAMI/AAAAAAAAADE/GwZ9VcczDvA/s1600-h/rect12.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SkBBu5ZRAMI/AAAAAAAAADE/GwZ9VcczDvA/s200/rect12.bmp" alt="" id="BLOGGER_PHOTO_ID_5350348631252730050" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SkBBuqaVcmI/AAAAAAAAAC8/f8xnTs8DrCc/s1600-h/tri.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SkBBuqaVcmI/AAAAAAAAAC8/f8xnTs8DrCc/s200/tri.bmp" alt="" id="BLOGGER_PHOTO_ID_5350348627230683746" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SkLeAXo2jlI/AAAAAAAAADk/fQ0XfPOsStI/s1600-h/circ.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_3UgjRWXiG0Y/SkLeAXo2jlI/AAAAAAAAADk/fQ0XfPOsStI/s200/circ.bmp" alt="" id="BLOGGER_PHOTO_ID_5351083405196299858" border="0" /&gt;&lt;/a&gt;&lt;div style="text-align: justify;"&gt;These have areas of 10285, 6545, 5676 and 42121 square units respectively. Using the "follow" command in Scilab, we can get the x and y coordinates of the contour forming the border of the black and white regions. This creates two arrays of numbers called X and Y.&lt;br /&gt;&lt;br /&gt;We then use a "for" loop to substitute these values of X and Y into the equation:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SkLgXa8UIcI/AAAAAAAAAD0/8YfNrPBgBBw/s1600-h/eq.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 110px;" src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SkLgXa8UIcI/AAAAAAAAAD0/8YfNrPBgBBw/s400/eq.bmp" alt="" id="BLOGGER_PHOTO_ID_5351086000243483074" border="0" /&gt;&lt;/a&gt;where x and y are the coordinate arrays and the index i is the length of the array. This code is implemeted as follows:&lt;br /&gt;______________________________________________________________&lt;br /&gt;clc&lt;br /&gt;clf&lt;br /&gt;&lt;br /&gt;fig=imread('C:\Documents and Settings\2005-09860\Desktop\circ.bmp');&lt;br /&gt;fig=im2bw(fig,0.5);&lt;br /&gt;imshow(fig);&lt;br /&gt;&lt;br /&gt;[x,y]=follow(fig);&lt;br /&gt;&lt;br /&gt;i=length(x);&lt;br /&gt;a=[];&lt;br /&gt;&lt;br /&gt;for j=1:i-1&lt;br /&gt;a(j)=x(j)*(y(j+1))-y(j)*x(j+1);&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Area=sum(a)/2&lt;br /&gt;&lt;br /&gt;______________________________________________________________&lt;br /&gt;&lt;br /&gt;This code outputs a number which corresponds to the are of the polygon.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Results:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The following results were obtained using the shapes above:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SkLpyNvqnKI/AAAAAAAAAD8/erVwMjNGt4A/s1600-h/results.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 123px;" src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SkLpyNvqnKI/AAAAAAAAAD8/erVwMjNGt4A/s400/results.bmp" alt="" id="BLOGGER_PHOTO_ID_5351096356161887394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;These results correspond closely with the computed values. With the exception of the triangle, the deviations were all below 5% which indicates consistency. The triangle area may have a larger difference due to the manner in which a diagonal line is drawn in MSPaint. The line is drawn as a series of steps instead of a straight line.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Acknowledgements: &lt;/span&gt;&lt;span&gt;I would like to thank the usual people for their help.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Refernces: &lt;/span&gt;AP 186 Activity 2 Manual.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Rating: &lt;/span&gt;For this Activity, the acceptable correlation of the results with the actual values allow for a rating of 10.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-6694841803821660245?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/6694841803821660245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/06/activity-2area-estimation-for-images.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6694841803821660245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6694841803821660245'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/06/activity-2area-estimation-for-images.html' title='Activity 2:Area estimation for images with defined edges'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/SkBBuvbyQcI/AAAAAAAAAC0/36VogoyTK_Y/s72-c/rect1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-6222604448986574331</id><published>2009-06-17T19:31:00.000-07:00</published><updated>2009-06-22T17:39:07.261-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='image'/><category scheme='http://www.blogger.com/atom/ns#' term='scan'/><category scheme='http://www.blogger.com/atom/ns#' term='overlay'/><category scheme='http://www.blogger.com/atom/ns#' term='digitize'/><category scheme='http://www.blogger.com/atom/ns#' term='plot'/><title type='text'>Activity 1:  Digital Sacnning</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Objective&lt;/span&gt;: Use ratio and proportion to find the numerical values of a hand-drawn (or machine printed) plot.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tools&lt;/span&gt;: MS Paint, Spreadsheet, image processing software&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Description of procedure&lt;/span&gt;: We start with an scanned image of an old plot from some journal.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SjmwrIG7oII/AAAAAAAAAAU/52qryoxC2V8/s1600-h/raph.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 241px;" src="http://3.bp.blogspot.com/_3UgjRWXiG0Y/SjmwrIG7oII/AAAAAAAAAAU/52qryoxC2V8/s320/raph.jpg" alt="" id="BLOGGER_PHOTO_ID_5348500287436595330" border="0" /&gt;&lt;/a&gt;Figure 1. Original image of the plot.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;We then take a fixed interval in an axis of the plot (which corresponds to a physical value) and note the number of pixels comprising this interval in the image. This give us a ratio of the physical quantity per pixel. For example, if the plot shows 100 units in the x axis and consists of 200 pixels in the image, we get a ratio of:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;100 units/ 200 pixel= 0.5 units per pixel&lt;br /&gt;&lt;br /&gt;We do this for both a and y axes. We then take the coordinates of the points in the plot and copy these into a spreadsheet. Using the ratios we derived earlier, we can then get the values corresponding to the physical quantities for both x and y axes. When these are plotted and the graph axes are adjusted to reflect the scale on the image, we get a plot that should correspond to the original drawing as we see below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3UgjRWXiG0Y/Sjmxm1YiXJI/AAAAAAAAAA8/BIewmHbuJN8/s1600-h/result.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 231px;" src="http://1.bp.blogspot.com/_3UgjRWXiG0Y/Sjmxm1YiXJI/AAAAAAAAAA8/BIewmHbuJN8/s400/result.JPG" alt="" id="BLOGGER_PHOTO_ID_5348501313202314386" border="0" /&gt;&lt;/a&gt;Figure 2. Overlay of origial plot and the plotted points from spreadsheet.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Comments&lt;/span&gt;: The results correspond well to the curve on the image. Note that the plotted points are represented as squares on the plot above. The main difficulty encountered is the scaling and the correlation of the axes which turns out to be a bit trickier than anticipated.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Source&lt;/span&gt;: Wood and Petrie, "&lt;span style="font-style: italic;"&gt;Nitrogen metabolism of plants&lt;/span&gt;," Annals of Botany, Vol 2. 1938.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Acknowledgements:&lt;/span&gt; I would like to thank Doctors Soriano and Perez for their instruction. Also I would like to thank Misters Cabello, Dilla, Garcia, Gubatan and Villoan for their invaluable assistance.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Evaluation: &lt;/b&gt;For this activity I give mysely a grade of ten (10) for my output is quite acceptable and that the procedure for this exercise was thoroughly understood.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Additional Image:&lt;/span&gt; Trendline from spreadsheet showing logarithmic fit (compare with original scanned line)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SkAj-EbrzII/AAAAAAAAABE/0jnQ9HhhVAE/s1600-h/with_line.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 222px;" src="http://2.bp.blogspot.com/_3UgjRWXiG0Y/SkAj-EbrzII/AAAAAAAAABE/0jnQ9HhhVAE/s400/with_line.bmp" alt="" id="BLOGGER_PHOTO_ID_5350315906564869250" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-6222604448986574331?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/6222604448986574331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/06/activity-1-digital-sacnning.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6222604448986574331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/6222604448986574331'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/06/activity-1-digital-sacnning.html' title='Activity 1:  Digital Sacnning'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3UgjRWXiG0Y/SjmwrIG7oII/AAAAAAAAAAU/52qryoxC2V8/s72-c/raph.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7318264123829861887.post-1526724913561523914</id><published>2009-06-15T19:53:00.001-07:00</published><updated>2009-06-15T19:53:45.833-07:00</updated><title type='text'>First Post</title><content type='html'>Read the tiltle.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7318264123829861887-1526724913561523914?l=ap186niraffy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ap186niraffy.blogspot.com/feeds/1526724913561523914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ap186niraffy.blogspot.com/2009/06/first-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/1526724913561523914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7318264123829861887/posts/default/1526724913561523914'/><link rel='alternate' type='text/html' href='http://ap186niraffy.blogspot.com/2009/06/first-post.html' title='First Post'/><author><name>raffy</name><uri>http://www.blogger.com/profile/11974382600033933216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
