<?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:blogger='http://schemas.google.com/blogger/2008' 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-5775070589527721226</id><updated>2026-02-11T21:34:49.979+08:00</updated><title type='text'>Applied Physics 186</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-5649440042559808846</id><published>2008-10-08T18:29:00.006+08:00</published><updated>2008-10-08T19:57:09.813+08:00</updated><title type='text'>A19 - Probabilistic Classification</title><content type='html'>I used the test image data in Activity 18.&lt;br /&gt;group 1 - one peso coins&lt;br /&gt;group 2 - 25 centavo coins&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;x - features of all data&lt;/span&gt;&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 171px; height: 122px;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 48pt;&quot; span=&quot;2&quot; width=&quot;64&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt; width: 48pt;&quot; align=&quot;right&quot; width=&quot;64&quot; height=&quot;20&quot;&gt;66511&lt;/td&gt;   &lt;td style=&quot;width: 48pt;&quot; align=&quot;right&quot; width=&quot;64&quot;&gt;0.926294&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt;&quot; align=&quot;right&quot; height=&quot;20&quot;&gt;66473&lt;/td&gt;   &lt;td align=&quot;right&quot;&gt;0.949915&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt;&quot; align=&quot;right&quot; height=&quot;20&quot;&gt;66511&lt;/td&gt;   &lt;td align=&quot;right&quot;&gt;0.777889&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt;&quot; align=&quot;right&quot; height=&quot;20&quot;&gt;45555&lt;/td&gt;   &lt;td align=&quot;right&quot;&gt;1.163125&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt;&quot; align=&quot;right&quot; height=&quot;20&quot;&gt;48126&lt;/td&gt;   &lt;td align=&quot;right&quot;&gt;0.777889&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt;&quot; align=&quot;right&quot; height=&quot;20&quot;&gt;47958&lt;/td&gt;   &lt;td align=&quot;right&quot;&gt;0.930314&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;y - group of the object of all data.&lt;/span&gt;&lt;br /&gt;y = [1;1;1;2;2;2]&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;x1 - group 1&lt;/span&gt;&lt;br /&gt;x1 = [66511 0.926294;66473 0.949915; 66511 0.777889];&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;x2 - group 2&lt;/span&gt;&lt;br /&gt;x2 = [45555 1.163125; 48126 0.777889; 47958 0.930314];&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;u1 - mean of features of group 1&lt;/span&gt;&lt;br /&gt;66498.333&lt;br /&gt;     0.8846993&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;u2 - mean of features of group 2&lt;/span&gt;&lt;br /&gt;47213.&lt;br /&gt;0.9571093&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;u - mean features of all&lt;/span&gt;&lt;br /&gt;56855.667&lt;br /&gt;   0.9209043&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;x0 - mean corrected data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Therefore,&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 199px; height: 139px;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 48pt;&quot; span=&quot;2&quot; width=&quot;64&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl63&quot; style=&quot;height: 15pt; width: 48pt;&quot; width=&quot;64&quot; height=&quot;20&quot;&gt;x01&lt;/td&gt;   &lt;td class=&quot;xl63&quot; style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;x02&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl63&quot; style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;9655.333&lt;/td&gt;   &lt;td class=&quot;xl63&quot;&gt; -11300.7&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl63&quot; style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;0.00539&lt;/td&gt;   &lt;td class=&quot;xl63&quot;&gt;0.242221&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl63&quot; style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;9617.333&lt;/td&gt;   &lt;td class=&quot;xl63&quot;&gt;-8729.67&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl63&quot; style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;0.029011&lt;/td&gt;   &lt;td class=&quot;xl63&quot;&gt;-0.14302&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl63&quot; style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;9655.333&lt;/td&gt;   &lt;td class=&quot;xl63&quot;&gt;-8897.67&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl63&quot; style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;-0.14302&lt;/td&gt;   &lt;td class=&quot;xl63&quot;&gt;0.00941&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;c1 and c2 are covariance of each group.&lt;/span&gt;&lt;br /&gt;c1  =&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 160px; height: 48px;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 48pt;&quot; span=&quot;2&quot; width=&quot;64&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 15pt; width: 48pt; text-align: center;&quot; width=&quot;64&quot; height=&quot;20&quot;&gt;92981341&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;width: 48pt; text-align: center;&quot; width=&quot;64&quot;&gt;-349.939&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 15pt; text-align: center;&quot; height=&quot;20&quot;&gt;-349.939&lt;/td&gt;   &lt;td style=&quot;text-align: center;&quot; class=&quot;xl65&quot;&gt;0.007108&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;c2 =&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 160px; height: 44px;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 48pt;&quot; span=&quot;2&quot; width=&quot;64&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt; width: 48pt;&quot; align=&quot;right&quot; width=&quot;64&quot; height=&quot;20&quot;&gt;94360206&lt;/td&gt;   &lt;td style=&quot;width: 48pt;&quot; align=&quot;right&quot; width=&quot;64&quot;&gt;-524.168&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt;&quot; align=&quot;right&quot; height=&quot;20&quot;&gt;-524.168&lt;/td&gt;   &lt;td align=&quot;right&quot;&gt;0.026404&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;C - group Covariance&lt;/span&gt;&lt;br /&gt;C  =&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 162px; height: 42px;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 48pt;&quot; span=&quot;2&quot; width=&quot;64&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt; width: 48pt; text-align: center;&quot; width=&quot;64&quot; height=&quot;20&quot;&gt;93670774&lt;/td&gt;   &lt;td style=&quot;width: 48pt; text-align: center;&quot; width=&quot;64&quot;&gt;-437.053&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt; text-align: center;&quot; height=&quot;20&quot;&gt;-437.053&lt;/td&gt;   &lt;td style=&quot;text-align: center;&quot;&gt;0.016756&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;We then find the inverse of C&lt;br /&gt;InvC  =&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 184px; height: 40px;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 48pt;&quot; span=&quot;2&quot; width=&quot;64&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt; width: 48pt; text-align: center;&quot; width=&quot;64&quot; height=&quot;20&quot;&gt;     1.215D-08&lt;/td&gt;   &lt;td style=&quot;width: 48pt; text-align: center;&quot; width=&quot;64&quot;&gt;0.000317&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td style=&quot;height: 15pt; text-align: center;&quot; height=&quot;20&quot;&gt;0.000317&lt;/td&gt;   &lt;td style=&quot;text-align: center;&quot;&gt;67.94902&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;f1 and f2 are the Linear Discriminat Functions&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 170px; height: 139px;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 48pt;&quot; span=&quot;2&quot; width=&quot;64&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 15pt; width: 48pt; text-align: center;&quot; width=&quot;64&quot; height=&quot;20&quot;&gt;f1&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;width: 48pt; text-align: center;&quot; width=&quot;64&quot;&gt;f2&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 15pt; text-align: center;&quot; height=&quot;20&quot;&gt;74.81613&lt;/td&gt;   &lt;td style=&quot;text-align: center;&quot; class=&quot;xl65&quot;&gt;72.76803&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 15pt; text-align: center;&quot; height=&quot;20&quot;&gt;76.69272&lt;/td&gt;   &lt;td style=&quot;text-align: center;&quot; class=&quot;xl65&quot;&gt;74.62444&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 15pt; text-align: center;&quot; height=&quot;20&quot;&gt;62.76609&lt;/td&gt;   &lt;td style=&quot;text-align: center;&quot; class=&quot;xl65&quot;&gt;60.89518&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 15pt; text-align: center;&quot; height=&quot;20&quot;&gt;71.22988&lt;/td&gt;   &lt;td style=&quot;text-align: center;&quot; class=&quot;xl65&quot;&gt;73.33025&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 15pt; text-align: center;&quot; height=&quot;20&quot;&gt;42.74908&lt;/td&gt;   &lt;td style=&quot;text-align: center;&quot; class=&quot;xl65&quot;&gt;44.76578&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 15pt;&quot; height=&quot;20&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 15pt; text-align: center;&quot; height=&quot;20&quot;&gt;54.94263&lt;/td&gt;   &lt;td style=&quot;text-align: center;&quot; class=&quot;xl65&quot;&gt;56.81285&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;We will use a test image( a 25 centavo coin). Let&#39;s pretend that we did not know what it is.&lt;br /&gt;T = [48392 0.7848263]&lt;br /&gt;&lt;br /&gt;The Linear Discriminant Functions are&lt;br /&gt;f1T = 43.601981&lt;br /&gt;f2T = 45.554149&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjyPmplwuOPgI9Qyu2UHhLKAXNGS474W4rBOktEPeMN5lbG6L_kIhWu-BQR7OShekgX9220llWEm0RH-zEILam17swIgQa7opsHECTln9LKtFKUkKq2ykLa0ztvhsqXLZqLssVXW2Zyh8v/s1600-h/Untitled.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 436px; height: 133px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjyPmplwuOPgI9Qyu2UHhLKAXNGS474W4rBOktEPeMN5lbG6L_kIhWu-BQR7OShekgX9220llWEm0RH-zEILam17swIgQa7opsHECTln9LKtFKUkKq2ykLa0ztvhsqXLZqLssVXW2Zyh8v/s320/Untitled.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5254748408086008674&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnqgyGuo3_g_ucpRTgcnYooHNdDpTT1K4w_bpZKYRERUGyQBa_ZfnmN62kuD9nkgnvabhQRnYKW9syOy2E7Nix6cYXeh3NVUfAWmotR_SUtRMfGpKzbOTHE0a8lvXHVi714clA8p_Wq4yP/s1600-h/graph.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnqgyGuo3_g_ucpRTgcnYooHNdDpTT1K4w_bpZKYRERUGyQBa_ZfnmN62kuD9nkgnvabhQRnYKW9syOy2E7Nix6cYXeh3NVUfAWmotR_SUtRMfGpKzbOTHE0a8lvXHVi714clA8p_Wq4yP/s320/graph.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5254749904927511650&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;From the graph, it shows that the test function is close to the 25 centavos. So I think our prediction is right. :)&lt;br /&gt;&lt;br /&gt;Acknowledgments:&lt;br /&gt;Linear Discriminant Analysis Lecture&lt;br /&gt;&lt;br /&gt;Grade: 10/10 because I think that my result is right.</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/5649440042559808846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/5649440042559808846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5649440042559808846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5649440042559808846'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/10/probabilistic-classification.html' title='A19 - Probabilistic Classification'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjyPmplwuOPgI9Qyu2UHhLKAXNGS474W4rBOktEPeMN5lbG6L_kIhWu-BQR7OShekgX9220llWEm0RH-zEILam17swIgQa7opsHECTln9LKtFKUkKq2ykLa0ztvhsqXLZqLssVXW2Zyh8v/s72-c/Untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-1243083096073397658</id><published>2008-09-18T10:30:00.010+08:00</published><updated>2008-10-08T19:18:03.194+08:00</updated><title type='text'>A18 - Pattern Recognition</title><content type='html'>Pattern recognition is the act of taking in raw data and taking an action based on the category&lt;a href=&quot;http://en.wikipedia.org/wiki/Category_%28taxonomy%29&quot; title=&quot;Category (taxonomy)&quot; class=&quot;mw-redirect&quot;&gt;&lt;/a&gt; of the data.(Wikipedia)&lt;br /&gt;&lt;br /&gt;For this activity, the goal is to classify images of one peso coins and 25 centavo coins using features extracted from the training images. I have three training images from both the one-peso coin and 25-centavo coin.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpWHO6bmjbUa9AOk5Qff1ZuJQkijv9tyhbKzoVeqNwUHf8pJuJqpkLXN1pNPekuDNIMqdxQvBCGBMMxvywbFrBjS4NcwFc2E8ve7c35VIuzeijuASNgBzWrGgf8-n8-9fDVSO2rdaqNLQG/s1600-h/-rix--0063+%282%29.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpWHO6bmjbUa9AOk5Qff1ZuJQkijv9tyhbKzoVeqNwUHf8pJuJqpkLXN1pNPekuDNIMqdxQvBCGBMMxvywbFrBjS4NcwFc2E8ve7c35VIuzeijuASNgBzWrGgf8-n8-9fDVSO2rdaqNLQG/s320/-rix--0063+%282%29.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5254603471066177570&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMSYl5ZQn3D_b2eqyRq9EUPQ0DZWs_LW_uhN0QWmbxbC0R6y04Iy2A21F19H3pbO8JzNVHGD38W96tOB-Gcad8EzUi7l5MKzjprsJQhpaHbIICXBHqPJnDFTLIKsxS-K46Kz25xeJjWhxf/s1600-h/-rix--0064+%282%29.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMSYl5ZQn3D_b2eqyRq9EUPQ0DZWs_LW_uhN0QWmbxbC0R6y04Iy2A21F19H3pbO8JzNVHGD38W96tOB-Gcad8EzUi7l5MKzjprsJQhpaHbIICXBHqPJnDFTLIKsxS-K46Kz25xeJjWhxf/s320/-rix--0064+%282%29.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5254603987029052514&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;The features I extracted from the images are their area and RED-GREEN contrast. To find the area, I binarize the image and to pixel counting.&lt;br /&gt;&lt;br /&gt;I assigned 1 for piso and 2 for 25 centavos.&lt;br /&gt;&lt;br /&gt;The result of pattern recognition is:&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrGhIbcCrkkkwT2YaiCmbUmpKaCsbpanGAPoeYfttSse5lQse4jUstJhKXd10C6teF74B2qR31FFYIKRgtz0HJtUFRe-mcAKIlEP3iaxvXA9hdT5oJVm_WdzSl2ameEeaC6_gbD6AP5AUo/s1600-h/Untitled.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrGhIbcCrkkkwT2YaiCmbUmpKaCsbpanGAPoeYfttSse5lQse4jUstJhKXd10C6teF74B2qR31FFYIKRgtz0HJtUFRe-mcAKIlEP3iaxvXA9hdT5oJVm_WdzSl2ameEeaC6_gbD6AP5AUo/s320/Untitled.jpg&quot; alt=&quot;&quot; id=&quot;BLOGG_ID_HOTO_ID_5254605042832951346&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;There is a 100% accuracy in determing the right coin.&lt;br /&gt;&lt;br /&gt;Acknowledgments:&lt;br /&gt;&lt;br /&gt;Aiyin, April - for the help.&lt;br /&gt;&lt;br /&gt;Grade: 10/10 although I had difficulty in making this activity, I think I made a correct activity.</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/1243083096073397658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/1243083096073397658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/1243083096073397658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/1243083096073397658'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/09/a18-pattern-recognition.html' title='A18 - Pattern Recognition'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpWHO6bmjbUa9AOk5Qff1ZuJQkijv9tyhbKzoVeqNwUHf8pJuJqpkLXN1pNPekuDNIMqdxQvBCGBMMxvywbFrBjS4NcwFc2E8ve7c35VIuzeijuASNgBzWrGgf8-n8-9fDVSO2rdaqNLQG/s72-c/-rix--0063+%282%29.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-7868649967468583716</id><published>2008-09-04T21:11:00.002+08:00</published><updated>2008-10-08T20:30:58.863+08:00</updated><title type='text'>A17 – Basic Video Processing</title><content type='html'>This activity is all about video processing.&lt;br /&gt;&lt;br /&gt;Video is a sequence of still  images representing scenes in motion. Video processing is the use of different image processing techniques for each still images in a video.&lt;br /&gt;&lt;br /&gt;In our video, we are concern with the diffusion of ink in water. &lt;span&gt;Diffusion is the natural process of intermingling of the molecules of two substances. We are concerned with the area of the ink that is diffused in water.&lt;br /&gt;&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbiZV4SwtjnGSiVxIgCKjmHb_pYNVi2gJGGecxDPrD92zfpPZ0HD9g-1683vL5MzO4B5qnNTMmjwwjLyg4_7gzjdwAHNbC_uG1BBGozsJspJa6f4RXH4PI-Z5qHBhkx9RrNj9ekaNHqi1u/s1600-h/theoretical.jpg&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dwHPhptPWfx9GV1avqu7IwoSH8WmJx0SDzy4ezLtFoCjbFBDE2idbcO55332rJn2TaTXhP1nrnUx1efrRZKgA&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Using the images below,&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-Bic8_22X7ELHNtCookHUWTvcVLNSVJXqRifx4BohKGxRXxY3XBa-EJanK-6Y76anvmNS2AZdCcKQnhnOL17vQkf-7QcosimuxCtCeRqUn49p5-PQcvEGttxEoFqYAS1WKJfwh1YOQB1X/s1600-h/ink.gif&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-Bic8_22X7ELHNtCookHUWTvcVLNSVJXqRifx4BohKGxRXxY3XBa-EJanK-6Y76anvmNS2AZdCcKQnhnOL17vQkf-7QcosimuxCtCeRqUn49p5-PQcvEGttxEoFqYAS1WKJfwh1YOQB1X/s320/ink.gif&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5244382165055752706&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;image 1&lt;br /&gt;&lt;/div&gt;Finding the threshold of the image, using the image below&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZMJesovv8wkCWaaQOpff9IfIDWUF8aIwuUKI9ZrEvcdXmdXHwOvKMBKo3Y_XmZ6S5CtkXRCgGqHL68RM7pAM5PDlRg2Pmy_ouwEV2gMy08eeP5jL-hotfzi6h8S5fvJsRfv45n4ha4Zay/s1600-h/-rix--0060.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 178px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZMJesovv8wkCWaaQOpff9IfIDWUF8aIwuUKI9ZrEvcdXmdXHwOvKMBKo3Y_XmZ6S5CtkXRCgGqHL68RM7pAM5PDlRg2Pmy_ouwEV2gMy08eeP5jL-hotfzi6h8S5fvJsRfv45n4ha4Zay/s320/-rix--0060.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5244384237311803682&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;image 2&lt;br /&gt;&lt;/div&gt;After finding the threshold, we can change the images to binary.&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhntTstp2WqX6LG7kEygG5PGihIS4NIBMNbgUY3mpCHmRbpMRA-AiTBknBv1zwbe9CR23e1EIY_5HEc-L1XqJ1714lbyiDCeCxaM07IzeT1Cv7YtimJVHBzecaUsLgBrKfwY5Jzl1P0gFle/s1600-h/inkbnw.gif&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhntTstp2WqX6LG7kEygG5PGihIS4NIBMNbgUY3mpCHmRbpMRA-AiTBknBv1zwbe9CR23e1EIY_5HEc-L1XqJ1714lbyiDCeCxaM07IzeT1Cv7YtimJVHBzecaUsLgBrKfwY5Jzl1P0gFle/s320/inkbnw.gif&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5244384548228529746&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;image 3&lt;br /&gt;&lt;/div&gt;Our region of interest is the ink in the middle of the water. Finding the area of the ROI for each images by pixel counting. We can find the plot below&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeTVvA3nvAAM8y0e12eZUwI01Multx7CxAix7kVv9O58NBH9598Expue-IRn7G1-1nKRZnd-jahyRTppzGSZvGNr5cyHqYHNqmlNfgX4SZ9M1iKshWXOZ8Ijp6ysOMGZEo0nSUQ-XxDTPQ/s1600-h/graph.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 271px; height: 204px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeTVvA3nvAAM8y0e12eZUwI01Multx7CxAix7kVv9O58NBH9598Expue-IRn7G1-1nKRZnd-jahyRTppzGSZvGNr5cyHqYHNqmlNfgX4SZ9M1iKshWXOZ8Ijp6ysOMGZEo0nSUQ-XxDTPQ/s400/graph.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5244387002501695554&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;image 4&lt;br /&gt;&lt;/div&gt;We will compare image 4 with the image below.&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbiZV4SwtjnGSiVxIgCKjmHb_pYNVi2gJGGecxDPrD92zfpPZ0HD9g-1683vL5MzO4B5qnNTMmjwwjLyg4_7gzjdwAHNbC_uG1BBGozsJspJa6f4RXH4PI-Z5qHBhkx9RrNj9ekaNHqi1u/s1600-h/theoretical.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbiZV4SwtjnGSiVxIgCKjmHb_pYNVi2gJGGecxDPrD92zfpPZ0HD9g-1683vL5MzO4B5qnNTMmjwwjLyg4_7gzjdwAHNbC_uG1BBGozsJspJa6f4RXH4PI-Z5qHBhkx9RrNj9ekaNHqi1u/s320/theoretical.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5244386837005561826&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;image 5&lt;/div&gt;We will consider image 5 as the theoretical values for area. This plot is from &#39;Ink diffusion in water&#39; by Lee S. et. al, 2004.&lt;br /&gt;&lt;br /&gt;We can see that there is error in the area of the diffusion of ink in water. It is because of the other part of the images that is not part of the ROI but is still considered in pixel counting.&lt;br /&gt;&lt;br /&gt;//code//&lt;br /&gt;t=108/255;&lt;br /&gt;c=[];&lt;br /&gt;for i=1:9&lt;br /&gt;im=imread(&#39;vid000&#39;+string(i)+&#39;.jpg&#39;);&lt;br /&gt;imb=im2bw(im, t);&lt;br /&gt;c(i)=sum(abs(1-imb));&lt;br /&gt;end&lt;br /&gt;for i=10:99&lt;br /&gt;im=imread(&#39;vid00&#39;+string(i)+&#39;.jpg&#39;);&lt;br /&gt;imb=im2bw(im, t);&lt;br /&gt;c(i)=sum(abs(1-imb));&lt;br /&gt;end&lt;br /&gt;plot(c);&lt;br /&gt;&lt;br /&gt;Acknowledgements:&lt;br /&gt;Instru Lab- for the place&lt;br /&gt;Gerold - for the code&lt;br /&gt;Benj and Billy - for being my groupmates.. :)&lt;br /&gt;http://mitgcm.org/eh3/Tracer_work/papers/ejp4_2_020.pdf&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Grade: 10/10&lt;br /&gt;because I think I did what is needed to do. :)&lt;br /&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=797d43e52a3acced&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/7868649967468583716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/7868649967468583716' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/7868649967468583716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/7868649967468583716'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/09/a17-basic-video-processing.html' title='A17 – Basic Video Processing'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-Bic8_22X7ELHNtCookHUWTvcVLNSVJXqRifx4BohKGxRXxY3XBa-EJanK-6Y76anvmNS2AZdCcKQnhnOL17vQkf-7QcosimuxCtCeRqUn49p5-PQcvEGttxEoFqYAS1WKJfwh1YOQB1X/s72-c/ink.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-4164644073883094230</id><published>2008-09-02T08:59:00.011+08:00</published><updated>2008-09-03T21:49:41.642+08:00</updated><title type='text'>A16 – Color Image Segmentation</title><content type='html'>In image segmentation, a region of interest (ROI) is picked out from the rest of the image such that further processing can be done on it. Selection rules are based on features unique to the ROI.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;normalized chromaticity coordinates&lt;/span&gt;&lt;br /&gt;- represent color space not by the RGB but by one that can separate brightness and chromaticity (pure color) information&lt;br /&gt;&lt;br /&gt;Per pixel, let I = R+G+B. Then the normalized chromaticity coordinates are&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqdhvH2FiG7K7s9Hr1lOeK04OvNTY7xPBNz3pvbPn3F4WR28me48kwxzy5bDKAEwhWd2qub-mwsoDMbxVWTd2JYSQ5XbBvQxHjmGOWSH3EcFKXempzCVnHbAzQfTYg7-CViGlWfMmeqjyi/s1600-h/ncc.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqdhvH2FiG7K7s9Hr1lOeK04OvNTY7xPBNz3pvbPn3F4WR28me48kwxzy5bDKAEwhWd2qub-mwsoDMbxVWTd2JYSQ5XbBvQxHjmGOWSH3EcFKXempzCVnHbAzQfTYg7-CViGlWfMmeqjyi/s320/ncc.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5241223233535540626&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;We note that r+g+b = 1 which implies r,g and b can only have values between 1 and 0 and b is dependent on r and g since b = 1-r-g.from R G B, the color space has been transformed to r g I where chromatic information is in r and g while brightness information is in I.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHEtS_uBKdQwwDDesB0J4Vx5mF_uncd5w3IMf5cCfkjm2b_67ujlvEVmeMpTW-XsRZWhMNEeu9r96neW6AjcFyIfbk6k_fFEKr__dS23c48-mqwQmW0nLNmHd0QkYejeuB1FOQZjiP25gx/s1600-h/1.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHEtS_uBKdQwwDDesB0J4Vx5mF_uncd5w3IMf5cCfkjm2b_67ujlvEVmeMpTW-XsRZWhMNEeu9r96neW6AjcFyIfbk6k_fFEKr__dS23c48-mqwQmW0nLNmHd0QkYejeuB1FOQZjiP25gx/s320/1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5241224006262075938&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Parametric vs Non-Parametric Probability Distribution Estimation&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Segmentation based on color can be performed by determining the probability that a pixel belongs to a color distribution of interest.&lt;br /&gt;&lt;br /&gt;The probability that a pixel with chromaticity r belongs to the ROI is then&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6SO_bZhzHhMyALNym2TL0tGWNeTv9795b0lmisj3EgNLK04-7vr_jtQkFX2SSp25Ygx3QhCih4peJF6WIDXrg7M0n9oAPwazTcS0fjcaIzT1VrIqpQrb4gniT64HCAsaxSGkUH9pBRyOJ/s1600-h/2.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6SO_bZhzHhMyALNym2TL0tGWNeTv9795b0lmisj3EgNLK04-7vr_jtQkFX2SSp25Ygx3QhCih4peJF6WIDXrg7M0n9oAPwazTcS0fjcaIzT1VrIqpQrb4gniT64HCAsaxSGkUH9pBRyOJ/s320/2.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5241225229451757666&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Histogram backprojection&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Histogram backprojection is one such technique where based on the color histogram, a pixel location is given a value equal to its histogram value in chromaticity space.&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Using the image&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;:&lt;br /&gt;&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGsnejF7L620sC2wlXdz1zJahBi697MfG999J4vRAUNOBbKkUgYX-PJzB01K-DBvP-3gbjt2N_aVbnCGx3pIIJbG2TlwS83hbycw-HcEnGzfLuA4Pr5VTSYC2hAhve9nhnznKas4Hsduex/s1600-h/yellow.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGsnejF7L620sC2wlXdz1zJahBi697MfG999J4vRAUNOBbKkUgYX-PJzB01K-DBvP-3gbjt2N_aVbnCGx3pIIJbG2TlwS83hbycw-HcEnGzfLuA4Pr5VTSYC2hAhve9nhnznKas4Hsduex/s320/yellow.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5241790779974507250&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;cropping an the image:&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_f5dZaaiG5KUf5CInCm4wK2pn4ruwTNAbTnQmjXzs12G5MdfD0X1da1WGhfi2kY7Ph8FTA45yMV5q1A2F2_B-l8bjMQeN9zx5QDSmX0N-ZppZXKhhHN8u0UWoZyaRQThil0K4aeG2vVcL/s1600-h/crop.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_f5dZaaiG5KUf5CInCm4wK2pn4ruwTNAbTnQmjXzs12G5MdfD0X1da1WGhfi2kY7Ph8FTA45yMV5q1A2F2_B-l8bjMQeN9zx5QDSmX0N-ZppZXKhhHN8u0UWoZyaRQThil0K4aeG2vVcL/s320/crop.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5241790941243201074&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Thus, we will use the yellow ball as the ROI.&lt;br /&gt;&lt;br /&gt;We will use to techniques.&lt;br /&gt;Parametric:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ZHnVWZEssgn4V4Nn3N9EgevL_7rArmko952x4QCtVcB1QUo8IxGM1LBO3_QkVReNaOzTtLhXNT5U4-x4HbA1xB4JlFR57DBS40a0Wn1h-r9z5sWM_zTJCePGAhykp6znc0KSbzVZRli5/s1600-h/1.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ZHnVWZEssgn4V4Nn3N9EgevL_7rArmko952x4QCtVcB1QUo8IxGM1LBO3_QkVReNaOzTtLhXNT5U4-x4HbA1xB4JlFR57DBS40a0Wn1h-r9z5sWM_zTJCePGAhykp6znc0KSbzVZRli5/s320/1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5241791297951897746&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Non-Parametric&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh95wW90MVv5mZVhNdpT6aqweQhJeysbCIeoSSZ5qvgdtVlymHwTWx58S0q3df1aIfs_U2x2lLR_6bTXJkD9Z5VHtQ6vYfmoVgSiFjBDJALw_l5QWD-3GNEf0iKaCVLonq7G8Y20g3Jk7rb/s1600-h/2.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh95wW90MVv5mZVhNdpT6aqweQhJeysbCIeoSSZ5qvgdtVlymHwTWx58S0q3df1aIfs_U2x2lLR_6bTXJkD9Z5VHtQ6vYfmoVgSiFjBDJALw_l5QWD-3GNEf0iKaCVLonq7G8Y20g3Jk7rb/s320/2.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5241791612371853442&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Acknowledgements:&lt;br /&gt;&lt;br /&gt;Mark Leo  - for the help.&lt;br /&gt;&lt;br /&gt;Grade:&lt;br /&gt;10/10&lt;br /&gt;- because I think I did what is needed to do. And I think the image is well segmented.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/4164644073883094230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/4164644073883094230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/4164644073883094230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/4164644073883094230'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/09/a16-color-image-segmentation.html' title='A16 – Color Image Segmentation'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqdhvH2FiG7K7s9Hr1lOeK04OvNTY7xPBNz3pvbPn3F4WR28me48kwxzy5bDKAEwhWd2qub-mwsoDMbxVWTd2JYSQ5XbBvQxHjmGOWSH3EcFKXempzCVnHbAzQfTYg7-CViGlWfMmeqjyi/s72-c/ncc.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-5097632571253034046</id><published>2008-08-28T10:50:00.012+08:00</published><updated>2008-08-28T22:27:33.856+08:00</updated><title type='text'>A15 – Color Image Processing</title><content type='html'>A colored digital image is an array of pixels each having red, green and blue light overlaid in various proportions, Per pixel, the color captured by a digital color camera is an integral of the product of the spectral power distribution of the incident light source S(l), the surface reflectance r(l) and the spectral sensitivity of the camera h(l).&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;White Balancing&lt;/span&gt;&lt;br /&gt;This setting allows the user to select the white balancing constants appropriate for the capturing conditions.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;White Balance Settings&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Daylight&lt;/span&gt; &lt;/span&gt;- not all cameras have this setting because it sets things as fairly ‘normal’ white balance settings.&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;Incandescent/ Tungsten &lt;/span&gt;- this mode is usually symbolized with a little bulb and is for shooting indoors, especially under tungsten (incandescent) lighting (such as bulb lighting). It generally cools down the colors in photos.&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;Flourescent&lt;/span&gt; - this compensates for the ‘cool’ light of fluorescent light and will warm up your shots.&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;Cloudy&lt;/span&gt; - this setting generally warms things up a touch more than ‘daylight’ mode.&lt;br /&gt;&lt;br /&gt;There are two popular algorithms of achieving automatic white balance. The first is &lt;span style=&quot;font-weight: bold;&quot;&gt;Reference White Algorithm&lt;/span&gt; and the second is the&lt;span style=&quot;font-weight: bold;&quot;&gt; Gray World Algorithm&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;In the Reference White Algorithm, you capture an image using an unbalanced camera and use the RGB values of a known white object as the divider.&lt;br /&gt;&lt;br /&gt;In the Gray World Algorithm, it is assumed that the average color of the world is gray.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ7UM3kLHu0G6wM-4pNOhqr3MDupCxwjXYwkSOYEWmkUS_2UTA_9AR2_EDTimbqEAGt1xXjmX1vPgyBoQleNaLISv3PmwEW3zMqlLlBUM_I0ea2wgIvBxwP06IPFGHM1SsDLZXRiBqBKK_/s1600-h/cloudy.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ7UM3kLHu0G6wM-4pNOhqr3MDupCxwjXYwkSOYEWmkUS_2UTA_9AR2_EDTimbqEAGt1xXjmX1vPgyBoQleNaLISv3PmwEW3zMqlLlBUM_I0ea2wgIvBxwP06IPFGHM1SsDLZXRiBqBKK_/s400/cloudy.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5239545342783528546&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Using a cloudy white balance, the color of the original image is yellowish. Using reference white, the image became whiter. And when we use gray world, the image is also whiter than the original but it is darker than the image using reference white.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeIno0o8rqlbdCgN-armhdWTp0Towm0xBIwQ47uKt6crC1civOM1_h1KnLhOfu2c6bdQ5zpvRzF8dSFIt7qpl5gAx4r19q_aal35lxo-_Rby1fDfx_Oq90XRBu9rjXrv8nPD_2t5IfVNps/s1600-h/i+-+incandescent.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeIno0o8rqlbdCgN-armhdWTp0Towm0xBIwQ47uKt6crC1civOM1_h1KnLhOfu2c6bdQ5zpvRzF8dSFIt7qpl5gAx4r19q_aal35lxo-_Rby1fDfx_Oq90XRBu9rjXrv8nPD_2t5IfVNps/s400/i+-+incandescent.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5239546377208093026&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Using an incandescent white balance, the image is bluish in color. Using reference white, the image became whiter and brighter than the original. Using gray world, the image is darker but whiter than the original.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3sVYqhFC7yMXTbLEkrwbofwZa8ZYNDsxcNWARDnBIwQ_NSAfkGws6nvFRtR98CcQaEV-0wdChKoPfD-3sx0YFKU9jiMf5bNpS3rWZ3pBrSEgfqwJI6kTpONRAVzihkMDz6WHIZqtd6y91/s1600-h/daylight.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3sVYqhFC7yMXTbLEkrwbofwZa8ZYNDsxcNWARDnBIwQ_NSAfkGws6nvFRtR98CcQaEV-0wdChKoPfD-3sx0YFKU9jiMf5bNpS3rWZ3pBrSEgfqwJI6kTpONRAVzihkMDz6WHIZqtd6y91/s400/daylight.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5239574967302959330&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Using daylight settings, the image became whiter in the reference white than the gray world. It also becomes brighter using reference white.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSGiidiYOLhHCqStFoyRZ7avjgRjQFvpdTTpT7W29w4zV4s0Y8b-h16GuDy1LGMu5ITwhe9dWDlrqOttnNkchp53BzVXbSCoq5XbDERjJr9BMl9bFDj8LtqNvQ1rVQalMlnTFF2ct5cEd0/s1600-h/flourescent.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSGiidiYOLhHCqStFoyRZ7avjgRjQFvpdTTpT7W29w4zV4s0Y8b-h16GuDy1LGMu5ITwhe9dWDlrqOttnNkchp53BzVXbSCoq5XbDERjJr9BMl9bFDj8LtqNvQ1rVQalMlnTFF2ct5cEd0/s400/flourescent.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5239547296383636322&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Using flourescent white balance. The image become white using both reference white and gray world. But i think it is brighter using gray world.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia5inuL-iiVl0efmMYMdWO-DyCawZo-zQ6_zFWQ_CyG6Jwi2veZP_aUwazJlVN-oC3I7i2azsVBj_tucwSVunSRSuNAw1WaSsUgAsLdSoSjdlVmQGTzKqXfOnJxMNggooL-du0A9MsLnak/s1600-h/leaf.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia5inuL-iiVl0efmMYMdWO-DyCawZo-zQ6_zFWQ_CyG6Jwi2veZP_aUwazJlVN-oC3I7i2azsVBj_tucwSVunSRSuNAw1WaSsUgAsLdSoSjdlVmQGTzKqXfOnJxMNggooL-du0A9MsLnak/s400/leaf.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5239548005241144562&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Using incandescent white balance, the image is bluish. After implementing reference white, the color of the leaves became green and the paper became white. After implementing gray world, the leaves became green, and the paper is close to gray.&lt;br /&gt;&lt;br /&gt;I think that the reference white algorith is better than the gray world because of the results in the images.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;-- code --&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;//white balance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;stacksize(20000000);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;image = imread(&#39;rix.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;im = imread(&#39;rix-white.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;RW = mean(im(:,:,1));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;GW = mean(im(:,:,2));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;BW = mean(im(:,:,3));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;new = zeros(image);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;new(:,:,1) = image(:,:,1)./RW;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;new(:,:,2) = image(:,:,2)./GW;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;new(:,:,3) = image(:,:,3)./BW;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;maxall = max(max(max(new)));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;newim = new./maxall;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;imwrite(newim,&#39;rix-new-white.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;//gray world&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;stacksize(20000000);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;image = imread(&#39;rix1.jpg&#39;C/3B&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;new = zeros(image);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;new(:,:,1) = image(:,:,1)./mean(image(:,:,1));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;new(:,:,2) = image(:,:,2)./mean(image(:,:,2));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;new(:,:,3) = image(:,:,3)./mean(image(:,:,3));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;maxall = max(max(max(new)));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;newim = new./maxall;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;imwrite(newim,&#39;rix1-new-gray.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Acknowledgements&lt;br /&gt;Activity 15 manual&lt;br /&gt;http://digital-photography-school.com/blog/introduction-to-white-balance/&lt;br /&gt;&lt;br /&gt;Benj - for the help with the codes&lt;br /&gt;&lt;br /&gt;Grade:&lt;br /&gt;10/10&lt;br /&gt;- because I think I implemented the algorithms well. The color of the images were improved. :)</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/5097632571253034046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/5097632571253034046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5097632571253034046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5097632571253034046'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/08/a15-color-image-processing.html' title='A15 – Color Image Processing'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ7UM3kLHu0G6wM-4pNOhqr3MDupCxwjXYwkSOYEWmkUS_2UTA_9AR2_EDTimbqEAGt1xXjmX1vPgyBoQleNaLISv3PmwEW3zMqlLlBUM_I0ea2wgIvBxwP06IPFGHM1SsDLZXRiBqBKK_/s72-c/cloudy.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-3700034536006952507</id><published>2008-08-26T08:46:00.004+08:00</published><updated>2008-08-28T11:02:12.814+08:00</updated><title type='text'>A14 – Stereometry</title><content type='html'>Objective: To reconstruct a 3D object.&lt;br /&gt;&lt;br /&gt;Stereo imaging is the technique we will use in this experiment and it is inspired by how our two eyes allow us to discriminate depth.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXhl5y35x9MAJZBViHFaCOoPXVW6TGwF8sliwcJFKgvdyBEcyjbfmi6o6keG1VYr3JvlUgdNnK25M9tycIR__FNy7AZxT0o4VJMdyFWr41-MjcA6v_WGBL4LHlxU59rSKFcsqxXHTHCdXc/s1600-h/111.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 249px; height: 257px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXhl5y35x9MAJZBViHFaCOoPXVW6TGwF8sliwcJFKgvdyBEcyjbfmi6o6keG1VYr3JvlUgdNnK25M9tycIR__FNy7AZxT0o4VJMdyFWr41-MjcA6v_WGBL4LHlxU59rSKFcsqxXHTHCdXc/s400/111.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5238624782771968242&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/3700034536006952507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/3700034536006952507' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/3700034536006952507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/3700034536006952507'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/08/a14-stereometry.html' title='A14 – Stereometry'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXhl5y35x9MAJZBViHFaCOoPXVW6TGwF8sliwcJFKgvdyBEcyjbfmi6o6keG1VYr3JvlUgdNnK25M9tycIR__FNy7AZxT0o4VJMdyFWr41-MjcA6v_WGBL4LHlxU59rSKFcsqxXHTHCdXc/s72-c/111.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-6475989644993286291</id><published>2008-08-07T09:26:00.007+08:00</published><updated>2008-08-28T11:04:29.693+08:00</updated><title type='text'>A13 – Photometric Stereo</title><content type='html'>We can estimate the shape of the surface by capturing multiple images of the surface with the sources at different locations. The information about the surface will be coded in the shadings obtained from the images.&lt;br /&gt;&lt;img src=&quot;file:///C:/DOCUME%7E1/AP186U%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;Let there be N sources in 3-d space. We can define a matrix&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93RyR6iZEfqmVzm2Ompj4SyyWq71Aiort8mFwTiIvtgJ9Dq3RUtewU0RhkYtyGh5j-sc9XLwNEBfe5Xns1eZpn7R6iq72aD34u7wSZKtCI37pd6pRfBkeSEn-TwSDiVxR6LrzXSLGSjx3/s1600-h/vector.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93RyR6iZEfqmVzm2Ompj4SyyWq71Aiort8mFwTiIvtgJ9Dq3RUtewU0RhkYtyGh5j-sc9XLwNEBfe5Xns1eZpn7R6iq72aD34u7wSZKtCI37pd6pRfBkeSEn-TwSDiVxR6LrzXSLGSjx3/s400/vector.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5231608913565273154&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;where each row is a source, each column is the x,y,z component of the source.&lt;br /&gt;&lt;br /&gt;Procedure:&lt;br /&gt;1. Load the matlab file photos.mat which contains 4 images I1, I2, I3,&lt;br /&gt;and I4. The images are synthetic spherical surfaces illuminated by a far&lt;br /&gt;away point source located respectively at&lt;br /&gt;V1 = {0.085832, 0.17365, 0.98106}&lt;br /&gt;V2 = {0.085832, -0.17365, 0.98106}&lt;br /&gt;V3 = {0.17365, 0, 0.98481}&lt;br /&gt;V4 = {0.16318, -0.34202, 0.92542}&lt;br /&gt;Use loadmatfile in Scilab.&lt;br /&gt;&lt;br /&gt;Sperical surfaces&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09t98AlvVnTHSMEN9NG4tt9MWUrsuRrCelyLKIjMla2OmJ9bdhzPfPxUizk9aBL85SuBwsK2UdC4JS4TwnZLknenM2nn40e0295Sw6ODqu31JTv20H9h5xbSnA2YdLWOq8IiOLUyqcTrx/s1600-h/I.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09t98AlvVnTHSMEN9NG4tt9MWUrsuRrCelyLKIjMla2OmJ9bdhzPfPxUizk9aBL85SuBwsK2UdC4JS4TwnZLknenM2nn40e0295Sw6ODqu31JTv20H9h5xbSnA2YdLWOq8IiOLUyqcTrx/s400/I.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5233194121166883714&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;2. Compute the surface normals using Equation 10 and 11.&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXBiURnmSsKEUIw5m55zzvlpSioZHMnPybu2ZtDY6vU0CQFl2HDO_MDrj5UGjxJ-uzX74gxHGeqzQObO1D4BK_4DtYBKTGm453UYaRBkEEaLgMPYSkyJ_UJd9y2H_5ZyhwOCQdwbLhNsCf/s1600-h/10.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXBiURnmSsKEUIw5m55zzvlpSioZHMnPybu2ZtDY6vU0CQFl2HDO_MDrj5UGjxJ-uzX74gxHGeqzQObO1D4BK_4DtYBKTGm453UYaRBkEEaLgMPYSkyJ_UJd9y2H_5ZyhwOCQdwbLhNsCf/s400/10.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5231610316294962370&quot; border=&quot;0&quot; /&gt; &lt;/a&gt;Equation 10&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;To get the normal vector we simplify normalize g by its length&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1W7NnpO72kyO1HGN6j02PSFvNd2j_KDYc_gwX87-ZN1g4luwdfYKYHSl5BoSUela2463yyZcO7oeTSMhUVtAvDpV-fd-nU_0BmM1IYEFEmQqm_qmYxPppTBs_ee4loz4ldnbZOYkD4bWQ/s1600-h/11.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1W7NnpO72kyO1HGN6j02PSFvNd2j_KDYc_gwX87-ZN1g4luwdfYKYHSl5BoSUela2463yyZcO7oeTSMhUVtAvDpV-fd-nU_0BmM1IYEFEmQqm_qmYxPppTBs_ee4loz4ldnbZOYkD4bWQ/s400/11.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5231610632014958034&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Equation 11&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;3. From the surface normals compute the elevation z=f(u,v) and display a 3D plot of the object shape.&lt;br /&gt;Once the surface normals (nx, ny, nz) are estimated using photometric stereo, they are related to the partial derivative of f as&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK30ktMiKoFY8DCo0Zm6nF7O5HZoJnecHMlDIXIqg7FIYHx6aTdFloZsMf2M2d0YHXSvP5QvvRp7qSd78FWTbayefKmeTx23WTyrf896E3fJ78zwocF3vJcDyl-7nfKPTTigCrIYQ9r0Id/s1600-h/untitled.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK30ktMiKoFY8DCo0Zm6nF7O5HZoJnecHMlDIXIqg7FIYHx6aTdFloZsMf2M2d0YHXSvP5QvvRp7qSd78FWTbayefKmeTx23WTyrf896E3fJ78zwocF3vJcDyl-7nfKPTTigCrIYQ9r0Id/s400/untitled.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5231612296291429426&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;The surface elevation z at point (u,v) is given by f(u,v) and is evaluated by a line integral&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ3E8vAnxLbzWwWkZwGE9Ntc9B59uASAb3nbROfUzL6ufXsTHOJ-_RySwCZOT41HIWPit9UwzMmxUoRdXMWE8ATy78OZgwav9jJpT2wlL6dp5hGEEBppAzdBLAlqs_VDtaK2cl83SmTqg5/s1600-h/13.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ3E8vAnxLbzWwWkZwGE9Ntc9B59uASAb3nbROfUzL6ufXsTHOJ-_RySwCZOT41HIWPit9UwzMmxUoRdXMWE8ATy78OZgwav9jJpT2wlL6dp5hGEEBppAzdBLAlqs_VDtaK2cl83SmTqg5/s400/13.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5231612563011850162&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglPa3ztyV8jdvNBVMFBMdq5seOAQgZsjgdxHV0LxaWkbBb6Reudk0qcl8QLfF7v8vJhyxR-PGK-9FHQeaR7AHR969O2ZoyvHZ8_i-5j98snFrJimD-RALrGZflnH9fklrQrkH5-Sym1N0R/s1600-h/dome.gif&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglPa3ztyV8jdvNBVMFBMdq5seOAQgZsjgdxHV0LxaWkbBb6Reudk0qcl8QLfF7v8vJhyxR-PGK-9FHQeaR7AHR969O2ZoyvHZ8_i-5j98snFrJimD-RALrGZflnH9fklrQrkH5-Sym1N0R/s400/dome.gif&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5231611622707407634&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;This is the resulting image.&lt;br /&gt;--&lt;br /&gt;codes&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;loadmatfile(&#39;Photos.mat&#39;,[&#39;I1&#39;,&#39;I2&#39;,&#39;I3&#39;, &#39;I4&#39;]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;scf(1)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;subplot(141);imshow(I1,[]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;subplot(142);imshow(I2,[]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;subplot(143);imshow(I3,[]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;subplot(144);imshow(I4,[]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;V = [0.085832 0.17365 0.98106; 0.085832 -0.17365 0.98106; 0.17365 0 0.98481; 0.16318 -0.34202 0.92542];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;I = [I1(:)&#39;;I2(:)&#39;;I3(:)&#39;;I4(:)&#39;];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;g = inv(V&#39;*V)*V&#39;*I;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;[A,B] = size(g);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;for i=1:A;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;for j=1:B;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;c(j)=sqrt((g(1,j)**2)+(g(2,j)**2)+(g(3,j)**2));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;c = c+ 0.000000001;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;n(1,:) = g(1,:)./c&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;n(2,:) = g(2,:)./c&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;n(3,:) = g(3,:)./c&#39;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;dfx= -n(1,:)./(n(3,:)+0.000000001);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;dfy= -n(2,:)./(n(3,:)+0.000000001);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;imx = matrix(dfx,128,128);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;imy = matrix(dfy,128,128);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;fx =cumsum(imx,2);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;fy =cumsum(imy,1);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;Image = fx+fy;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;mesh(Image)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Acknowledgements:&lt;br /&gt;April, Lei, Mark Leo and Aiyin&lt;br /&gt;- for helping me&lt;br /&gt;&lt;br /&gt;Grade&lt;br /&gt;10/10&lt;br /&gt;-since I was able to find the correct 3D plot.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/6475989644993286291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/6475989644993286291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/6475989644993286291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/6475989644993286291'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/08/activity-13.html' title='A13 – Photometric Stereo'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93RyR6iZEfqmVzm2Ompj4SyyWq71Aiort8mFwTiIvtgJ9Dq3RUtewU0RhkYtyGh5j-sc9XLwNEBfe5Xns1eZpn7R6iq72aD34u7wSZKtCI37pd6pRfBkeSEn-TwSDiVxR6LrzXSLGSjx3/s72-c/vector.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-307196174473969506</id><published>2008-07-31T09:26:00.002+08:00</published><updated>2008-10-06T14:05:18.955+08:00</updated><title type='text'>A12 – Correcting Geometric Distortions</title><content type='html'>There are two types of geometric distortion.&lt;br /&gt;1. pincushion - the image seems pinched in the middle and expanded in the boundaries.&lt;br /&gt;2. barrel - the image seems bloated in the middle and pinched at the sides.&lt;br /&gt;&lt;br /&gt;For this activity, we will use bilinear interpolation. &quot;the graylevel v at an arbitrary location (x , y)&lt;br /&gt;in the distorted image can be found using v (x , y )=ax+by+c xy+d.&lt;br /&gt;&lt;br /&gt;We used a distored capiz window shown below,&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBUpJZeMMfjFwfCQ4FDKU90b0-i5mIp-DS70I8oiXyVGUzrQb4ego-4DqAloVsZ3jXyUItB-U10OJAC3h9vS0LMTRH4p75244sew1CIOkp9Jh5FvbQYu3G4_CSz0JX2s45mM6HF5j8ypzk/s1600-h/distorted+capiz+window.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBUpJZeMMfjFwfCQ4FDKU90b0-i5mIp-DS70I8oiXyVGUzrQb4ego-4DqAloVsZ3jXyUItB-U10OJAC3h9vS0LMTRH4p75244sew1CIOkp9Jh5FvbQYu3G4_CSz0JX2s45mM6HF5j8ypzk/s320/distorted+capiz+window.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5253914125960815026&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;I cropped the image&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQNNbviOU1CxyGabZypyklzCl06u_SpPOpRP8T9OkMDOqnXvjh9JBx8CQUBpKkRghxQq6JRRN_18upDct7SYqIq1f2iZKEsxdM6q5dqSTvw9MjCEG_iYruYNO7CNUNGWjRbOnnKXXGyaoN/s1600-h/rix.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQNNbviOU1CxyGabZypyklzCl06u_SpPOpRP8T9OkMDOqnXvjh9JBx8CQUBpKkRghxQq6JRRN_18upDct7SYqIq1f2iZKEsxdM6q5dqSTvw9MjCEG_iYruYNO7CNUNGWjRbOnnKXXGyaoN/s320/rix.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5253914018774788482&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;and using bilinear interpolation, the result is&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikH7OsMwiWQtszWPvn9-C4qpt4Y1QJQtRyIQn09BvEBZ2H-UTQhy8jp1C5sHezl6JVDhvLdjE8mfphTaKYUcnWRBsno9IRrDD7GlZSd0KFD5sf8W7cxlcwxwZtGj6-Pu0PjjJEI1FHSEQO/s1600-h/window.gif&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikH7OsMwiWQtszWPvn9-C4qpt4Y1QJQtRyIQn09BvEBZ2H-UTQhy8jp1C5sHezl6JVDhvLdjE8mfphTaKYUcnWRBsno9IRrDD7GlZSd0KFD5sf8W7cxlcwxwZtGj6-Pu0PjjJEI1FHSEQO/s320/window.gif&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5253914225533915202&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Acknowledgements:&lt;br /&gt;&lt;br /&gt;Activity 12 manual&lt;br /&gt;&lt;br /&gt;Grade:&lt;br /&gt;9/10 - because I think that even though I find an undistorted image. It is far from what is expected.</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/307196174473969506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/307196174473969506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/307196174473969506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/307196174473969506'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/07/activity-12.html' title='A12 – Correcting Geometric Distortions'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBUpJZeMMfjFwfCQ4FDKU90b0-i5mIp-DS70I8oiXyVGUzrQb4ego-4DqAloVsZ3jXyUItB-U10OJAC3h9vS0LMTRH4p75244sew1CIOkp9Jh5FvbQYu3G4_CSz0JX2s45mM6HF5j8ypzk/s72-c/distorted+capiz+window.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-1309534774019965500</id><published>2008-07-30T13:18:00.022+08:00</published><updated>2008-07-31T20:11:43.268+08:00</updated><title type='text'>A11 – Camera Calibration</title><content type='html'>An image is a projection of brightness values from surfaces existing in 3D world space to 2D sensor space. The aim of this activity is to be able to model the physical processes involved in the geometric aspects of image formation.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiPzXMsuloIszsos37THiT0MqLEerb-Zt-vapZ_RpJ-GcjHFLvAT49C4EJjJqJbraWremTYCqHMr71TWBYP6JxGYAOPudxA5S4dOxJ9_iWYXQRXMvGHpcziH190ch1ACS36hW3KIEaHzgF/s1600-h/image.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiPzXMsuloIszsos37THiT0MqLEerb-Zt-vapZ_RpJ-GcjHFLvAT49C4EJjJqJbraWremTYCqHMr71TWBYP6JxGYAOPudxA5S4dOxJ9_iWYXQRXMvGHpcziH190ch1ACS36hW3KIEaHzgF/s320/image.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5228679121834422594&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Procedure:&lt;br /&gt;1.Mount a 3D calibration checkerboard (to be provided) onto a surface and steady your camera with a tripod. Take an image of the checkerboard.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA6XsYwY4erUgmf3csDJio9KxpWUOxNGQi1-G8GzGfoJjbkWhRT1RAQMB6wDE-eW6rTaCFbg01uIuVHYMW42EKevnibdB6AEMPc0WdhBEph0woouA3saA16iqPjRiGO4vC3U5CX2_UwqJr/s1600-h/rix.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 353px; height: 339px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA6XsYwY4erUgmf3csDJio9KxpWUOxNGQi1-G8GzGfoJjbkWhRT1RAQMB6wDE-eW6rTaCFbg01uIuVHYMW42EKevnibdB6AEMPc0WdhBEph0woouA3saA16iqPjRiGO4vC3U5CX2_UwqJr/s400/rix.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5228673634990561602&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;2. Pick an origin and a right-handed coordinate system in the grid and measure coordinates of around 20 to 25 corners of the squares of the checkerboard pattern.&lt;br /&gt;&lt;br /&gt;I picked 23 corners.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQJlMFDIgu896cNv23ZEFYFl8AHQyNKNZTkqPMLlq1ho_eBSXUswVRYaTdDoulSdOPY6sgc2CE4FU6HF6kb7zK7VLtbym-VdJby3OIRrvF-hcohSr2K5KFbAFLA2WfhofT70EZhuco9oVh/s1600-h/points.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQJlMFDIgu896cNv23ZEFYFl8AHQyNKNZTkqPMLlq1ho_eBSXUswVRYaTdDoulSdOPY6sgc2CE4FU6HF6kb7zK7VLtbym-VdJby3OIRrvF-hcohSr2K5KFbAFLA2WfhofT70EZhuco9oVh/s400/points.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5228674167010244258&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;3.From the image of the same points, find their [xi,yi] coordinates in image space. Use locate to get the coordinates in the image figure window using a mouse.&lt;br /&gt;&lt;br /&gt;we have two coodinates since the image is flat. We will have two equations.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiWduutGb3rNv5Wt5NRWu5HYDZ8TQBnzR6xPy69M4y_2ldr2c1N2LKyle5DkRQ3gdhQ4uX1I8rB4Q5H3WwbCnxNqZrWGwzh6K2quJKRibdVcWehMXZetKvUmKUscn353OWud0l2Tlhuj3J/s1600-h/eq1.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiWduutGb3rNv5Wt5NRWu5HYDZ8TQBnzR6xPy69M4y_2ldr2c1N2LKyle5DkRQ3gdhQ4uX1I8rB4Q5H3WwbCnxNqZrWGwzh6K2quJKRibdVcWehMXZetKvUmKUscn353OWud0l2Tlhuj3J/s400/eq1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5228677091189746994&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;The o subscript corresponds to the object and i subscript corresponds to image.&lt;br /&gt;finding the coordinates of selected points.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaFu0Inmm64uBcKVrsys8BtBO54yA3s02XANVF55ABuLt4NWsx-PPlffdroCzAZU8EW8E5a0M2hE6eDrSddVJri28Zu3vaERdIKThxkNrNhcBJcIno20lWebG2JqHOCJ_oGabc8GvkyoF_/s1600-h/location.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaFu0Inmm64uBcKVrsys8BtBO54yA3s02XANVF55ABuLt4NWsx-PPlffdroCzAZU8EW8E5a0M2hE6eDrSddVJri28Zu3vaERdIKThxkNrNhcBJcIno20lWebG2JqHOCJ_oGabc8GvkyoF_/s400/location.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5228675315859517730&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;4. From Lecture 2, rederive Equation 13 this time with the z or Z axis as the camera axis, and x,y as the planar coordinates. Using all the points you&#39;ve selected, set up the left and right-hand side matrices in Equation 13. Compute the elements of the matrix A using Equation 15.&lt;br /&gt;&lt;br /&gt;Equation 13.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitExLSpS3nA3N7db7xPEyd_Z4aXyKdBZ6aV_tiCWb-tti6Nbs03IY0w5KJ0ALU0XE5rxt9RXnDqjatYRnYmrd3ywIasvxltPGr4zvwc0STteB0sXi84sqA8xbSIoGawp07ZkjxsheQ6L5W/s1600-h/eq13.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitExLSpS3nA3N7db7xPEyd_Z4aXyKdBZ6aV_tiCWb-tti6Nbs03IY0w5KJ0ALU0XE5rxt9RXnDqjatYRnYmrd3ywIasvxltPGr4zvwc0STteB0sXi84sqA8xbSIoGawp07ZkjxsheQ6L5W/s320/eq13.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5228680648119929106&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHzovpisz91cUGgUcW_QgW0O6XyEqJ3Gq2g0ckSR9e1haC4Ug7hQjebrzx-eZbuXWgkUxfDLJMHeG7S-qS4IFHN70csBUhwUje_ENVTL2icaliJwzh3LPc3uvm8gCDAsqxwm62yXURJe8D/s1600-h/eq14.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 489px; height: 74px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHzovpisz91cUGgUcW_QgW0O6XyEqJ3Gq2g0ckSR9e1haC4Ug7hQjebrzx-eZbuXWgkUxfDLJMHeG7S-qS4IFHN70csBUhwUje_ENVTL2icaliJwzh3LPc3uvm8gCDAsqxwm62yXURJe8D/s400/eq14.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5228681871598890690&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Thus,&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaskRLVnvMczwWCxnynUbIIUzByLrmiNJjiNTdikxHuOHhmLd_fgsFdvXpz7G6nbdU8zBRLZ3w8Fwroxku7m1MpTRM76l0c6y7gX79jJutMm-fszf-XXkEeFUB47UNGf5_f1NWRK33yUN7/s1600-h/a.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaskRLVnvMczwWCxnynUbIIUzByLrmiNJjiNTdikxHuOHhmLd_fgsFdvXpz7G6nbdU8zBRLZ3w8Fwroxku7m1MpTRM76l0c6y7gX79jJutMm-fszf-XXkEeFUB47UNGf5_f1NWRK33yUN7/s400/a.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5228815491383301250&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;5. To verify if you got the calibration correctly, predict the image coordinates of some cornerpoints of the checkerboard which were not used in the calibration. Overlay the predicted cornerpoints on the image. Comment on the accuracy of your prediction.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPTmSP7Xf3ClaZUaXUAtDv_gNb6PsU1oOZQprbRCX5XSidORdY_O-H2eLheNfCrExlKcch_0Q7nWgyTVyaVyLaUZ3TA3HQFfM0Ez20zQrbpKdctqXu8tRCK-vetmfQo28ZK68Itu_2XtHe/s1600-h/new.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPTmSP7Xf3ClaZUaXUAtDv_gNb6PsU1oOZQprbRCX5XSidORdY_O-H2eLheNfCrExlKcch_0Q7nWgyTVyaVyLaUZ3TA3HQFfM0Ez20zQrbpKdctqXu8tRCK-vetmfQo28ZK68Itu_2XtHe/s400/new.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5228839548480185266&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;I found out that the average error for &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt; yi is  0.016708 and for zi is 0.0045 .&lt;/span&gt; And I think it this is accurate.&lt;br /&gt;&lt;br /&gt;Using points that are not used in finding a&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuFhJQj-YPdo7_Ng1HPJ2x6r5fdZrWCFzHBVdTOyK6rAHkkWabh_RE9s0EBu5R8EaUcNd3d46Ln2hAJTdgeLsaHbpJ6cmfZ-NiIb1h835btx5_P97rw0FzgsFLm0XrRFxZLyO1sIWDZQ8g/s1600-h/ewan.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuFhJQj-YPdo7_Ng1HPJ2x6r5fdZrWCFzHBVdTOyK6rAHkkWabh_RE9s0EBu5R8EaUcNd3d46Ln2hAJTdgeLsaHbpJ6cmfZ-NiIb1h835btx5_P97rw0FzgsFLm0XrRFxZLyO1sIWDZQ8g/s400/ewan.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5229149274048059890&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;average error:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;yi  = 0.013684&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;zi =  0.010258&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I think this is still acccurate.&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------&lt;br /&gt;codes&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;stacksize(20000000);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;img = imread(&#39;rix.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;imshow(img);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;x = locate(23);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;yi = [326.66667 357.77778 424.66667 300.22222b 356.22222 393.55556 497.77778 508.66667 491.55556 150.88889 217.77778 113.55556 183.55556 118.22222 185.11111 88.666667 301.77778 241.11111 32.666667 28 147.77778 336 326.66667];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;zi = [340.44444 184.88889 251.77778 161.55556 111.77778 500.66667 328 550.44444 158.44444 331.11111 178.66667 461.77778 373.11111 194.22222 505.33333 58.888889 419.77778 295.33333 366.88889 564.44444 552 534.88889 265.77778];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;xo = [0 0 0 0 0 0 0 0 0 5 3 6 4 6 4 7 0 2 8 8 5 0 0];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;yo = [1 2 4 1 2 3 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 1 1];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;zo = [7 3 5 2 1 11 7 12 3 7 3 10 8 4 11 1 9 6 8 12 12 12 5];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;//finding a&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;for i = 1:length(xo)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;O((2*i)+1) = [xo(i) yo(i) zo(i) 1 0 0 0 0 -(yi(i)*xo(i)) -(yi(i)*yo(i)) -(yi(i)*zo(i))];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;O((2*i)+2) = [0 0 0 0 xo(i) yo(i) zo(i) 1 -(zi(i)*xo(i)) -(zi(i)*yo(i)) -(zi(i)*zo(i))];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;I((2*i)+1) = yi(i);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;I((2*i)+2) = zi(i);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;a = inv(O&#39;*O)*O&#39;*I;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;//prediction&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;for j = 1:length(xo)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;yinew(j) = ((a(1,1)*xo(j))+(a(1,2)*yo(j))+(a(1,3)*zo(j))+a(1,4))/((a(3,1)*xo(j))+(a(3,2)*yo(j))+(a(3,3)*zo(j))+1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;zinew(j) = ((a(2,1)*xo(j))+(a(2,2)*yo(j))+(a(2,3)*zo(j))+a(2,4))/((a(3,1)*xo(j))+(a(3,2)*yo(j))+(a(3,3)*zo(j))+1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;end&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Acknowledgements:&lt;br /&gt;Activity 11 manual.&lt;br /&gt;&lt;br /&gt;Beth, Aiyin, Lei&lt;br /&gt;- for answering my questions&lt;br /&gt;&lt;br /&gt;Grade :&lt;br /&gt;10/10 because I think that my data is accurate and I did what the activity asked. :)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/1309534774019965500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/1309534774019965500' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/1309534774019965500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/1309534774019965500'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/07/a11-camera-calibration.html' title='A11 – Camera Calibration'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiPzXMsuloIszsos37THiT0MqLEerb-Zt-vapZ_RpJ-GcjHFLvAT49C4EJjJqJbraWremTYCqHMr71TWBYP6JxGYAOPudxA5S4dOxJ9_iWYXQRXMvGHpcziH190ch1ACS36hW3KIEaHzgF/s72-c/image.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-4240119018389368983</id><published>2008-07-22T17:55:00.016+08:00</published><updated>2008-08-11T18:27:55.927+08:00</updated><title type='text'>A10 – Preprocessing Handwritten Text</title><content type='html'>In this activity, we will try to extract handwritten text from an imaged document with lines. In handwriting recognition, individual examples of letters must be extracted.&lt;br /&gt;&lt;br /&gt;Procedure.&lt;br /&gt;1. Download one of the images DSC00469.JPG or Untitled_0001.jpg.&lt;br /&gt;2. Crop a portion of the image with handwritten text within lines in the form.&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-QrJJvI8R2AbAODYDC5T-jCO4tM8egIZ4rcjEdeyl-1Lbv9p1eaCr2Rh_Uu8r0tYyDIhN1oj7xZfpjPDEc_j5rrX9nFnX8AizRkCTnwXwH0ORpEcx4pU5w9W0Upl0espikKCQj4p0qhoO/s1600-h/Untitled_0001.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 150px; height: 189px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-QrJJvI8R2AbAODYDC5T-jCO4tM8egIZ4rcjEdeyl-1Lbv9p1eaCr2Rh_Uu8r0tYyDIhN1oj7xZfpjPDEc_j5rrX9nFnX8AizRkCTnwXwH0ORpEcx4pU5w9W0Upl0espikKCQj4p0qhoO/s400/Untitled_0001.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5225775273792078402&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;image 1&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;I cropped image 1 to&lt;br /&gt;&lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6x-JTZNn3FHenbf_JcUqqdyCX2nYQm82Ma8DR6rhME5IJJSuoXjI_LKSD9mKKHhyphenhyphen9XIEmiKR9RzGzjo8F4UYiDBXcWt7StefYdkDJInNaq5AnlV93_5tQgAMgnCx8xzlhU0YR9N-FwQcn/s1600-h/image.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6x-JTZNn3FHenbf_JcUqqdyCX2nYQm82Ma8DR6rhME5IJJSuoXjI_LKSD9mKKHhyphenhyphen9XIEmiKR9RzGzjo8F4UYiDBXcWt7StefYdkDJInNaq5AnlV93_5tQgAMgnCx8xzlhU0YR9N-FwQcn/s400/image.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5225775717230319490&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;image 2 - cropped image&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;3. Remove the lines using image processing techniques.&lt;br /&gt;To remove the horizontal lines we will use the filter below.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkj3JTHWpL8QZEhc7C4AC_1ZUrwS8FxYzsHesXL1-xSwkH8gVkA8Qz0aflvTRK39jLEAh2-RJLhD6fsr9bnn1BnZv0YikkAulMaD3Q-7Eyu_Ak8cKoagJbvzJMbNBx87ZVzi-7ng6JHqiS/s1600-h/filter.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkj3JTHWpL8QZEhc7C4AC_1ZUrwS8FxYzsHesXL1-xSwkH8gVkA8Qz0aflvTRK39jLEAh2-RJLhD6fsr9bnn1BnZv0YikkAulMaD3Q-7Eyu_Ak8cKoagJbvzJMbNBx87ZVzi-7ng6JHqiS/s400/filter.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5225776611556608050&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;image 3 - filter&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;This filter is based on the fft of the cropped image which is shown in figure 4.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsH9b_jEL24rKZ3oEsAQqC5dm3rOdX9PHfXZPtSZ_8zxO3INpiBrYdNoqpxWh68GgGVtev27I3tT0FMdwPuAqr7tqy9SCoOG_rv8wez_j7XjrObbw28gAoQpMSkwVlowJrOlDwvJgUbcgR/s1600-h/11.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 222px; height: 76px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsH9b_jEL24rKZ3oEsAQqC5dm3rOdX9PHfXZPtSZ_8zxO3INpiBrYdNoqpxWh68GgGVtev27I3tT0FMdwPuAqr7tqy9SCoOG_rv8wez_j7XjrObbw28gAoQpMSkwVlowJrOlDwvJgUbcgR/s400/11.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5233204251067911986&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;image 4 - fft of cropped image&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Then we will filter the image by convolution,&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDULpQwKLwj5vmvM2L0g2CEc7UABrDzHe0cb5um7jPQBfUPhcNh_tO7T0Xa3ptjqHXy_m0bVElPe4MLAMXLdvHwn9czbhr-s_5-qSvD1FdgK3_U7ijoX8tsjYbW7_OaYUFW1YclvUOcXeH/s1600-h/1.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDULpQwKLwj5vmvM2L0g2CEc7UABrDzHe0cb5um7jPQBfUPhcNh_tO7T0Xa3ptjqHXy_m0bVElPe4MLAMXLdvHwn9czbhr-s_5-qSvD1FdgK3_U7ijoX8tsjYbW7_OaYUFW1YclvUOcXeH/s400/1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5226139144737257426&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;image 5 - filtered image&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;4.Binarize the handwriting, clean the image and process such that each handwritten letter is one pixel thick.&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsISangrTNg0NC67aBT0Jy3u3yFwHVLbj5FCw3EFkkxt-2GYcTYfwzpzxFHpnJg3ukdhv1ouEYx2qcwUJZRUG6fREYXn7GrLs_ytpDLwTurDE68ynIj9Vd38KH87p7sJE9592nOFY9oo/s1600-h/13.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 282px; height: 97px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsISangrTNg0NC67aBT0Jy3u3yFwHVLbj5FCw3EFkkxt-2GYcTYfwzpzxFHpnJg3ukdhv1ouEYx2qcwUJZRUG6fREYXn7GrLs_ytpDLwTurDE68ynIj9Vd38KH87p7sJE9592nOFY9oo/s400/13.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5233204368621536402&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;image 6 - binarized image&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0xssjkBf3-kTO3OnMgnHADV2JBUg2u3FxFmlKUecFWz3ZFCNTlPDdYNfjIg5K4rXrkFmwBod-K5g0RtCl9Zt0S09yL7w_8oEgPaXwxDzEM9DJP_jDldJgPCaxRsczBQXXDDg4OKf6cKaj/s1600-h/14.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 245px; height: 83px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0xssjkBf3-kTO3OnMgnHADV2JBUg2u3FxFmlKUecFWz3ZFCNTlPDdYNfjIg5K4rXrkFmwBod-K5g0RtCl9Zt0S09yL7w_8oEgPaXwxDzEM9DJP_jDldJgPCaxRsczBQXXDDg4OKf6cKaj/s400/14.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5233204494278933666&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;image 7 - image after using opening operator&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;5. Use bwlabel to label each letter. Comment on the quality of your preprocessing.&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7aAnhn0OWXrahsV4NHij4WRdOQAmxGHbW9pcPSCqh0DS2oXRUJ9fXsRh_wUKA_vMd_UAjM_7mJ5NCqfb0UurkrWBQMhBs-hecX7Au_FaSzq9WZ__JWEDZzneFR1S5JG5hiwzd3brpSnxE/s1600-h/15.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 237px; height: 81px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7aAnhn0OWXrahsV4NHij4WRdOQAmxGHbW9pcPSCqh0DS2oXRUJ9fXsRh_wUKA_vMd_UAjM_7mJ5NCqfb0UurkrWBQMhBs-hecX7Au_FaSzq9WZ__JWEDZzneFR1S5JG5hiwzd3brpSnxE/s400/15.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5233204715675310018&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;image 8 - labeled image&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;code used:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im=imread(&#39;image.jpg&#39;);&lt;br /&gt;img=imread(&#39;filter.jpg&#39;);&lt;br /&gt;im = im2gray(im);&lt;br /&gt;imf = im2gray(img);&lt;br /&gt;ff1=fft2(im);&lt;br /&gt;ff2=fftshift(imf);&lt;br /&gt;imft=ff1.*ff2;&lt;br /&gt;imshow(ff1);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//filtering the image&lt;br /&gt;a=real(fft2(imft));&lt;br /&gt;scf(1)&lt;br /&gt;imshow(a,[]);&lt;br /&gt;&lt;br /&gt;//binarize the image&lt;br /&gt;b=im2bw(a, 127/255);//threshold from GIMP&lt;br /&gt;c=1-b;&lt;br /&gt;scf(2);&lt;br /&gt;imshow(c,[]);&lt;br /&gt;&lt;br /&gt;// structuring element&lt;br /&gt;SE = ones(2,2)&lt;br /&gt;&lt;br /&gt;//opening operation&lt;br /&gt;d=erode(c,SE);&lt;br /&gt;e=dilate(d,SE)&lt;br /&gt;scf(3);&lt;br /&gt;imshow(e,[]);&lt;br /&gt;&lt;br /&gt;//label the image&lt;br /&gt;f=bwlabel(e);&lt;br /&gt;scf(4);&lt;br /&gt;imshow(f,[]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;From the labeled image, the processed image is not that clear. :(&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Acknowledgements:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Ed&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;- for the help&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Grade:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;10/10&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;- because I did my best and I was able to use what I learned in the activities before.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/4240119018389368983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/4240119018389368983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/4240119018389368983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/4240119018389368983'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/07/a10-preprocessing-handwritten-text.html' title='A10 – Preprocessing Handwritten Text'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-QrJJvI8R2AbAODYDC5T-jCO4tM8egIZ4rcjEdeyl-1Lbv9p1eaCr2Rh_Uu8r0tYyDIhN1oj7xZfpjPDEc_j5rrX9nFnX8AizRkCTnwXwH0ORpEcx4pU5w9W0Upl0espikKCQj4p0qhoO/s72-c/Untitled_0001.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-2161743954212750525</id><published>2008-07-17T21:10:00.022+08:00</published><updated>2008-07-22T18:55:38.461+08:00</updated><title type='text'>A9 – Binary Operations</title><content type='html'>In image-based measurements, it is often desired that the region of interest (ROI) is made well segmented from the background either by edge detection or by specifying the ROI as a blob.&lt;br /&gt;&lt;br /&gt;Binarizing an image simplifies the separation of background from ROI. However, the optimum threshold must be found by examing the histogram.&lt;br /&gt;&lt;br /&gt;Procedure:&lt;br /&gt;1. Cut the image in 256 x 256 subimages.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVl0hZisboKbt5XvJdi33m3ssfXc7xQ0Kint5bquQ65WA6iXJp-DZTIFYMXDDIkPJzhyphenhyphenk02rWYUn2pjaV7o9jsZAeC5f5yb0ND8vCKgsX7MHYEKwx9-rgPN1zLXh4vSY2bf6pOSjQPy1XW/s1600-h/Circles001.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 265px; height: 220px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVl0hZisboKbt5XvJdi33m3ssfXc7xQ0Kint5bquQ65WA6iXJp-DZTIFYMXDDIkPJzhyphenhyphenk02rWYUn2pjaV7o9jsZAeC5f5yb0ND8vCKgsX7MHYEKwx9-rgPN1zLXh4vSY2bf6pOSjQPy1XW/s400/Circles001.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223976869955103970&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;In my case, I have 12 subimages.&lt;br /&gt;&lt;br /&gt;2. Find the threshold of the image.&lt;br /&gt;&lt;br /&gt;3. Binarize the image&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;bw = im2bw(im, 0.84);&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;subplot(142)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(bw, [])&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xtitle(&#39;binary&#39;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4. Closing operator - dilate then erode&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;//closing operator&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;SE = ones (4,4);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imdilatec = dilate(bw, SE);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imerodec = erode(imdilatec, SE);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;subplot(143)&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;imshow(imerodec, [])&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xtitle(&#39;closing&#39;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;Opening operator - erode then dilate&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;//opening operator&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;SE = ones (4, 4);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imerodeo = erode(bw, SE);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imdilateo = dilate(imerodeo, SE);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;subplot(144)&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;imshow(imdilateo, [])&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xtitle(&#39;opening&#39;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* we will not use both operators, we will just choose which one will show a good image where the blobs are defined.&lt;br /&gt;&lt;br /&gt;5.Use bwlabel to label each contiguous blob on the binarized image.&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;// Label every connected component with a unique number.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;[L, n] = bwlabel(imdilateo);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;// Shows each component with a different color&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(1)&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;subplot(121)&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;imshow(imdilateo, [])&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;subplot(122)&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;imshow(L+1,rand(n+1,3));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xtitle(&#39;label&#39;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;6. Find the area&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;for i=1:n&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;[r,c] = find(L==i);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;a=size(r);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;area(i) = a(2)&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One of the subimages is shown below:&lt;br /&gt;&lt;br /&gt;subimage1&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyrSOYdn2ahXhW5Mkvbq_VQ676QWtWknxE0zReaTZ-bsnG7hqeYy3wG0XEneW_TucxlEDHOFFKZYeH_qfXSLgov-pKwCEzKf1w5xW-2eDdDZFXEfmbdSUyS2IAehV0YKkhfDe4l4HVs02n/s1600-h/1-1.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyrSOYdn2ahXhW5Mkvbq_VQ676QWtWknxE0zReaTZ-bsnG7hqeYy3wG0XEneW_TucxlEDHOFFKZYeH_qfXSLgov-pKwCEzKf1w5xW-2eDdDZFXEfmbdSUyS2IAehV0YKkhfDe4l4HVs02n/s400/1-1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223983585175494146&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLnZ0sH38udBDGIfAxSMLTcciYgzFr9-kI4kh6aXaYV1FN0xIgVSLJlYE1JmkvBIALcEhDaHuVO91affekqjENc4qSIzd5JetkGhIWlm7P3xraS8xPutvkLU0k0IxzSv9VBzJ-GdJ1Nk0w/s1600-h/1-2.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLnZ0sH38udBDGIfAxSMLTcciYgzFr9-kI4kh6aXaYV1FN0xIgVSLJlYE1JmkvBIALcEhDaHuVO91affekqjENc4qSIzd5JetkGhIWlm7P3xraS8xPutvkLU0k0IxzSv9VBzJ-GdJ1Nk0w/s400/1-2.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223985378821762466&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;/span&gt;&lt;br /&gt;After finding the area by pixel counting, it will show this histogram(using Excel)&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYUXDhKU19xm0AtP1IGkQuCiw2N5m0cp4qVTSkEsQjuLi3fiTb9u_Nn0CmYD0dO2RI32qEjcIwE5Qz2hhXtPagilUqya4R_ihVmPPjMB7Bch7toJ4MjS6KWbjnTiBBf2GLHW0VJcOsenrK/s1600-h/hist.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYUXDhKU19xm0AtP1IGkQuCiw2N5m0cp4qVTSkEsQjuLi3fiTb9u_Nn0CmYD0dO2RI32qEjcIwE5Qz2hhXtPagilUqya4R_ihVmPPjMB7Bch7toJ4MjS6KWbjnTiBBf2GLHW0VJcOsenrK/s400/hist.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5225149267512328578&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;From the graph, it shows that the area of the blob is near 525-500. I only use the areas of the circle from 400 to 700 because I think that below 400, the circle is truncated and more than 700 there is overlapping of circles.&lt;br /&gt;&lt;br /&gt;Verifying our assumption:&lt;br /&gt;&lt;br /&gt;1. I find the diameter of the blob, using GIMP, the diameter is around 26 pixels. Hence, the radius is 13 pixels. Using the formula for circle, which is pi*(r^2), the area should be 531 pixels which is in the range.&lt;br /&gt;&lt;br /&gt;2. Another method is to pixel count a blob, it is found that the area is around 537 pixels, which is still in the range.&lt;br /&gt;&lt;br /&gt;3. We will get the mean and the standard deviation.&lt;br /&gt;Mean: 527 pixels&lt;br /&gt;Standard Deviation: 22 pixels&lt;br /&gt;which is still in the range of the peak from the histogram.&lt;br /&gt;&lt;br /&gt;Acknowledgements:&lt;br /&gt;Lei&lt;br /&gt;Beth&lt;br /&gt;Aiyin&lt;br /&gt;Ed&lt;br /&gt;- for the help. :)&lt;br /&gt;&lt;br /&gt;Grade:&lt;br /&gt;10/10&lt;br /&gt;because I did what is needed to do.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb_GOJSgeidXbWXQNzpHzJ_e8QblOAwFBUUNDH2NXhmdu815qR2RbHktcCwulYbEBTD2oDbfgUvuZblyE4ZrRPDAQM1jRki7_IYECiXP0TSWXMynueZ86nUe4QmBOSIwRA15C6WcOu9sk5/s1600-h/6-1.bmp&quot;&gt;&lt;br /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/2161743954212750525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/2161743954212750525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/2161743954212750525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/2161743954212750525'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/07/a9-binary-operations.html' title='A9 – Binary Operations'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVl0hZisboKbt5XvJdi33m3ssfXc7xQ0Kint5bquQ65WA6iXJp-DZTIFYMXDDIkPJzhyphenhyphenk02rWYUn2pjaV7o9jsZAeC5f5yb0ND8vCKgsX7MHYEKwx9-rgPN1zLXh4vSY2bf6pOSjQPy1XW/s72-c/Circles001.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-4888402441259782438</id><published>2008-07-15T21:25:00.025+08:00</published><updated>2008-07-22T18:56:30.447+08:00</updated><title type='text'>A8 – Morphological Operations</title><content type='html'>Morphology refers to shape or structure. In image processing, classical morphological operations are treatments done on binary images, particularly aggregates of 1&#39;s that form a particular shape, to improve the image for further processing or to extract information from it. All morphological operations affect the shape of the image in some way, for example, the shapes may be expanded, thinned, internal holes could be closed, disconnected blobs can be joined. In a binary image, all  pixels which are “OFF” or have value equal to zero are considered background and all pixels which are “ON” or 1 are foreground.&lt;br /&gt;&lt;br /&gt;We will deal with two types of morphological operation, dilation and erosion.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijiQc_9pCx6zAXnAUYdbpZRQZ9XOgHAie05V12JlhuI8RoQjlZ_qFv-3nd24iU546T9AveJcCL3BQASpiWKC0zMtXVeY1w9GXiqSmMMfUNrfuRlpVUCMNeAJZDp6JIwqfbIR-whSaHYa8q/s1600-h/dilation.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijiQc_9pCx6zAXnAUYdbpZRQZ9XOgHAie05V12JlhuI8RoQjlZ_qFv-3nd24iU546T9AveJcCL3BQASpiWKC0zMtXVeY1w9GXiqSmMMfUNrfuRlpVUCMNeAJZDp6JIwqfbIR-whSaHYa8q/s400/dilation.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223234205503418354&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;and&lt;br /&gt;&lt;br /&gt;The erosion operator is defined as&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidLkZUrU-eh5Wo9RGDpnZaeE4LSgz1dcsge_6kEFk5APKEsoJhJJQTR5bFjJIV9bXbKBdxVSgf3aER2tM7KUpFbhm2A_QGA-l1_T3sgib0LmC3hgy2LFIqVZXcpK0rAJApFH1-lOPfxU8A/s1600-h/erosion.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidLkZUrU-eh5Wo9RGDpnZaeE4LSgz1dcsge_6kEFk5APKEsoJhJJQTR5bFjJIV9bXbKBdxVSgf3aER2tM7KUpFbhm2A_QGA-l1_T3sgib0LmC3hgy2LFIqVZXcpK0rAJApFH1-lOPfxU8A/s400/erosion.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223234556954451634&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;For this activity we will use 5 binary images.&lt;br /&gt;1. square ( 50 x 50)&lt;br /&gt;2.triangle (base = 50 , height = 30)&lt;br /&gt;3. circle (radius 25)&lt;br /&gt;4.  hollow square (60×60, edges are 4 pixels thick)&lt;br /&gt;5. plus sign (8 pixels thick and 50 pixels long for each line)&lt;br /&gt;&lt;br /&gt;and we will use structuring element for dilation and erosion&lt;br /&gt;1. 4×4 ones&lt;br /&gt;2. 2×4 ones&lt;br /&gt;3. 4×2 ones&lt;br /&gt;4. cross, 5 pixels long, one pixel thick.&lt;br /&gt;&lt;br /&gt;The algorithm for dilation is:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;img = imread(&#39;filename.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;SE = [1 1 1 1; 1 1 1 1; 1 1 1 1; 1 1 1 1];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;SE2 = [ 1 1 1 1; 1 1 1 1];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;SE3 = [ 1 1; 1 1; 1 1; 1 1];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;SE4=[0 0 1 0 0; 0 0 1 0 0; 1 1 1 1 1; 0 0 1 0 0; 0 0 1 0 0];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im = dilate(img,SE);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im2 = dilate(img, SE2);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im3 = dilate(img, SE3);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im4 = dilate(img, SE4);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imwrite(im, &#39;filename1.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imwrite(im2, &#39;filename2.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imwrite(im3, &#39;filename3.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imwrite(im4, &#39;filename4.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Dilation:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmH6wUmeTjBqkhn837ULxIbPOlReEHSslAxx7mQdKg3EVXd4AiiaY0eHtgIhRNonvzqh6aDbbhTOZjp6D7xZBpF7JgNbSSv0gAtG8an4uNjnnr0u3MwLIt0cCiZtKxPPVvYT05RvRTTc8F/s1600-h/1.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmH6wUmeTjBqkhn837ULxIbPOlReEHSslAxx7mQdKg3EVXd4AiiaY0eHtgIhRNonvzqh6aDbbhTOZjp6D7xZBpF7JgNbSSv0gAtG8an4uNjnnr0u3MwLIt0cCiZtKxPPVvYT05RvRTTc8F/s400/1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223422673028894706&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;        &lt;/div&gt; &lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkqleAoMbRCxOhyJPdGr6zukmq9n7RT-fnUQ5NGiXXayJXi5ObOOxtxJ_aHCNiZrcx5na6nbftS8Ol2f-UukgPe1y2TnmxLq9vbGIsXJYjwQfVtU-kzg9xv-5-DOknBFeGxpZa8Qlz2n4W/s1600-h/2.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkqleAoMbRCxOhyJPdGr6zukmq9n7RT-fnUQ5NGiXXayJXi5ObOOxtxJ_aHCNiZrcx5na6nbftS8Ol2f-UukgPe1y2TnmxLq9vbGIsXJYjwQfVtU-kzg9xv-5-DOknBFeGxpZa8Qlz2n4W/s400/2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223422806815522146&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheTe55hkcuSTCsv964vr1wj6lzkqAMW6yZdqFKjTKK_D_WM_ZOqfXv1Z75pvs1gGk3kZEDJlLKrnO18p0umnchNsPlBFa0AOy_ty72VhQu-x9Tr5vv2zwmAe8XEhMERyI1xNg6GyC2WFo3/s1600-h/4.jpg&quot;&gt; &lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyxJBhZjzEjpsELJe0bVm6Rhj4xCyNgTLPnnnVR-ICy3Jj-u6_UM8NZ01bnS19J9HRZx-ox_f7-ZUQv9l92nGR2rVBqPGmha1ruiFMRPdjkIl8BUsUV_1sZYb8jkQxOilkhyukQ_e8mAk0/s1600-h/3.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyxJBhZjzEjpsELJe0bVm6Rhj4xCyNgTLPnnnVR-ICy3Jj-u6_UM8NZ01bnS19J9HRZx-ox_f7-ZUQv9l92nGR2rVBqPGmha1ruiFMRPdjkIl8BUsUV_1sZYb8jkQxOilkhyukQ_e8mAk0/s400/3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223422902348524770&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFYdTFIaXFBNxcvZ4vbja_i0SefS_hyphenhyphenci1qJpnKUwMd0_WEqgDwA-I19N8t-3SXT0_HrLnIzo_enW13_L6GEBqBjTPNzTFqm3K_IDvcIEyXguBniCw2L4YqqapgRAIXM7T_2xkUIXc_282/s1600-h/4.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFYdTFIaXFBNxcvZ4vbja_i0SefS_hyphenhyphenci1qJpnKUwMd0_WEqgDwA-I19N8t-3SXT0_HrLnIzo_enW13_L6GEBqBjTPNzTFqm3K_IDvcIEyXguBniCw2L4YqqapgRAIXM7T_2xkUIXc_282/s400/4.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223423003725078930&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: left;&quot;&gt; &lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiKhQ7BgksKVT49XUeJ87YKwGlHr1xF4UXIbz4iuVDlxzJV_o7716pXZsrvOuDWH07W_4PGufyUrPvaB7IMgjeFhZKfHO4XlAeyqLzkvUTqw79DteS0Tkwwv0f8ImrDqlpJkN397-N2TQ6/s1600-h/5.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiKhQ7BgksKVT49XUeJ87YKwGlHr1xF4UXIbz4iuVDlxzJV_o7716pXZsrvOuDWH07W_4PGufyUrPvaB7IMgjeFhZKfHO4XlAeyqLzkvUTqw79DteS0Tkwwv0f8ImrDqlpJkN397-N2TQ6/s400/5.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223423090688777394&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: left;&quot;&gt;The algorithm for erosion is&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;img = imread(&#39;filename.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;SE = [1 1 1 1; 1 1 1 1; 1 1 1 1; 1 1 1 1];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;SE2 = [ 1 1 1 1; 1 1 1 1];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;SE3 = [ 1 1; 1 1; 1 1; 1 1];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;SE4=[0 0 1 0 0; 0 0 1 0 0; 1 1 1 1 1; 0 0 1 0 0; 0 0 1 0 0];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im = erode(img,SE);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im2 = erode(img, SE2);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im3 = erode(img, SE3);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im4 = erode(img, SE4);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imwrite(im, &#39;filename1.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imwrite(im2, &#39;filename2.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imwrite(im3, &#39;filename3.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imwrite(im4, &#39;filename4.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Erosion:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkmMT1ksmWOv0mV6hq0zdleCmx40Y-SjBXui5ASJ5NLf1h8zOIWTruKnHXa6uPAvzzWQIWPTQqExUETngjmzc-X1v_v-puFtiehCooDi9JOYA0hhORGJorov9G3tNy8zL8ufYFoHuMd43e/s1600-h/1.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkmMT1ksmWOv0mV6hq0zdleCmx40Y-SjBXui5ASJ5NLf1h8zOIWTruKnHXa6uPAvzzWQIWPTQqExUETngjmzc-X1v_v-puFtiehCooDi9JOYA0hhORGJorov9G3tNy8zL8ufYFoHuMd43e/s400/1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223432494598373042&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLEwot-3qkaYLDdpFNVXHgDDt_OLDuQtg3c3mojM50TPmqdBXGw0fzg6s_81tU3ZbxQRRbf7Tv5zE8Etl9e0xNNthDKOqGd4sogR8Xm7-FOnOB3Gjn4NcCMm58BLpzgsw_Ybw56_kB3lRI/s1600-h/2.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLEwot-3qkaYLDdpFNVXHgDDt_OLDuQtg3c3mojM50TPmqdBXGw0fzg6s_81tU3ZbxQRRbf7Tv5zE8Etl9e0xNNthDKOqGd4sogR8Xm7-FOnOB3Gjn4NcCMm58BLpzgsw_Ybw56_kB3lRI/s400/2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223432601980745602&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjncC8cNxwCE5204NfropDQbvUrHYkOD2qkSJk0DLdzukj3grrGjqptYPTKzodSlD7AbhFeHYpeuxClrk3WAUyy182sgtPADXDFTPsQxd3pczdgnxsUImGMyvizY0iZdGpBISzx5SrRnLoy/s1600-h/3.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjncC8cNxwCE5204NfropDQbvUrHYkOD2qkSJk0DLdzukj3grrGjqptYPTKzodSlD7AbhFeHYpeuxClrk3WAUyy182sgtPADXDFTPsQxd3pczdgnxsUImGMyvizY0iZdGpBISzx5SrRnLoy/s400/3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223432717302082946&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOh6ka-Zjr1LUWLIqJV4nSTL1rwdegXk9hBXChTzlLGKhspqM7Y0KfW4heYPqe3pvniMrv5wRBbbJf2bkrGpVHXkrUgeEr3LIJGWz0GIguM-ecwF18txRPTOTD70CvG5w74Kw8OsCU7l2-/s1600-h/4.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOh6ka-Zjr1LUWLIqJV4nSTL1rwdegXk9hBXChTzlLGKhspqM7Y0KfW4heYPqe3pvniMrv5wRBbbJf2bkrGpVHXkrUgeEr3LIJGWz0GIguM-ecwF18txRPTOTD70CvG5w74Kw8OsCU7l2-/s400/4.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223432812645327682&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf4IQjUdf_nAf6NymI3zXujgYsocXBZmir3v6dOTG1oaIH4c4m-FW-WSpxVFXVrg9xtI-RXjO-M0MJzYr9zOLnC3HrkzXLdiwSbcab9o7mkAfttHCA-ij6cL5nyr5FBQpgvIbkFlcJj993/s1600-h/5.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf4IQjUdf_nAf6NymI3zXujgYsocXBZmir3v6dOTG1oaIH4c4m-FW-WSpxVFXVrg9xtI-RXjO-M0MJzYr9zOLnC3HrkzXLdiwSbcab9o7mkAfttHCA-ij6cL5nyr5FBQpgvIbkFlcJj993/s400/5.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223432933271770386&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Other morphological operations&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;thin - thinning by border deletion&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvhx1rNgMMGLZUUwDvOsceRt_caVMa9aNDl0PJCheGE_D4xWseYer5JLi3vE-hEwKK4abQwYDFPropF2xjH9d4Y1a2GtoPhLBuFcwENN2fwgLiKHrYXPkfawfPcbmzcmqDFHNslKCH5NC_/s1600-h/thin1.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvhx1rNgMMGLZUUwDvOsceRt_caVMa9aNDl0PJCheGE_D4xWseYer5JLi3vE-hEwKK4abQwYDFPropF2xjH9d4Y1a2GtoPhLBuFcwENN2fwgLiKHrYXPkfawfPcbmzcmqDFHNslKCH5NC_/s400/thin1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5223267351330235666&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;use thin in the original square image.&lt;br /&gt;&lt;br /&gt;skel - skeletonization, thinning, Medial Axis Transform&lt;br /&gt;&lt;br /&gt;Acknowledgements:&lt;br /&gt;Activity 8 Manual&lt;br /&gt;&lt;br /&gt;BETH&lt;br /&gt;JULIE&lt;br /&gt;AIYIN&lt;br /&gt;ANGEL&lt;br /&gt;APRIL&lt;br /&gt;- for helping me.&lt;br /&gt;&lt;br /&gt;Grade:&lt;br /&gt;10/10 - because sone of my predictions are right with the simulated image.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;  &lt;/div&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/4888402441259782438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/4888402441259782438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/4888402441259782438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/4888402441259782438'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/07/a8-morphological-operations.html' title='A8 – Morphological Operations'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijiQc_9pCx6zAXnAUYdbpZRQZ9XOgHAie05V12JlhuI8RoQjlZ_qFv-3nd24iU546T9AveJcCL3BQASpiWKC0zMtXVeY1w9GXiqSmMMfUNrfuRlpVUCMNeAJZDp6JIwqfbIR-whSaHYa8q/s72-c/dilation.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-3349651620698387591</id><published>2008-07-10T08:54:00.018+08:00</published><updated>2008-07-22T18:57:59.843+08:00</updated><title type='text'>A7 – Enhancement in the Frequency Domain</title><content type='html'>&lt;span&gt;&lt;br /&gt;The Fourier Transform (FT) of a signal gives the spatial frequency distribution of&lt;br /&gt;that signal. Essentially, the Fourier Theorem states that any image or signal can be&lt;br /&gt;expressed as a superposition of sinusoids. Unique to the 2D FT (as compared to&lt;br /&gt;the 1D FT) is the fact that rotation of the sinusoids result to the rotation of their&lt;br /&gt;FT&#39;s.&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;For this activity we have three tasks:&lt;br /&gt;A. Anamorphic Property of Fourier Transform&lt;br /&gt;B. Ridge Enhancement&lt;br /&gt;C. Line Removal&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;7A. A Anamorphic property of the Fourier Transform&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create a 2D sinusoid using Scilab in the X direction.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;nx = 100; ny = 100;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;x = linspace(-1,1,nx);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;y = linspace(-1,1,ny);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;[X,Y] = ndgrid(x,y);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;f = 4;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;z = sin(2*%pi*f*X);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(z,[]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHGGsi74Hard8HhKFWtMPNzZS04SK9S9mX0LG05LDiw1MuzqSmHvUEQMyeeo_VEqLxUuvQ_pDXyKJGl4_X9beZbPHAFeUHLGk6yCDe9d8L19NuHYkI2H8-8AJ-slEvUWn8TzCkk1wvWTWw/s1600-h/rooforig.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHGGsi74Hard8HhKFWtMPNzZS04SK9S9mX0LG05LDiw1MuzqSmHvUEQMyeeo_VEqLxUuvQ_pDXyKJGl4_X9beZbPHAFeUHLGk6yCDe9d8L19NuHYkI2H8-8AJ-slEvUWn8TzCkk1wvWTWw/s320/rooforig.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5221187075059218610&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;The image is like a corrugated roof. The image is a sine function.&lt;br /&gt;&lt;br /&gt;Then we will get the fourier transform of the image.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;I = imread(&#39;roof.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;Igray = im2gray(I);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;FIgray = fft2(Igray);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(fftshift(abs(FIgray)),[]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xset(&quot;colormap&quot;, hotcolormap(255));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdcAoWDRBEDzguY74Nk-mzxYXQ0KMZP3jLMk3sNUUVOxx2cWJIS9z7gT0O4ZmpoSU_FwPaglQaAi_EInObYW9hFc3KMPaGYDbqD11qfo_M8zrFc3Pa_jcCNPMBPBcOaKLD9EBMHNFOO7Zj/s1600-h/origfft.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdcAoWDRBEDzguY74Nk-mzxYXQ0KMZP3jLMk3sNUUVOxx2cWJIS9z7gT0O4ZmpoSU_FwPaglQaAi_EInObYW9hFc3KMPaGYDbqD11qfo_M8zrFc3Pa_jcCNPMBPBcOaKLD9EBMHNFOO7Zj/s320/origfft.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5221187629417982050&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;The image shows two dots at the center of the image.The dots represent the frequency of the sine function. There are no pixels in the x-direction, because the image is the same everywhere in that direction.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When we increase the frequency, we will see that&lt;br /&gt;&lt;br /&gt;f = 10&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4QH4eq7gDzbpi-dLAN7XTzytx_ikp0N76YIFPVlj-8x3i_BuE7bQhX_gVXYChJ3qk9c5d0rGWgcSnYoWrIcQkWWqjZSTRnefxs8_gH0CmA14VV8LaPjGH0ob-Mkb45kFIfy8r3g3NTPXA/s1600-h/7a2.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4QH4eq7gDzbpi-dLAN7XTzytx_ikp0N76YIFPVlj-8x3i_BuE7bQhX_gVXYChJ3qk9c5d0rGWgcSnYoWrIcQkWWqjZSTRnefxs8_gH0CmA14VV8LaPjGH0ob-Mkb45kFIfy8r3g3NTPXA/s320/7a2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5221188863433975922&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;We can see that the number of lines increases and the dots are near the edges of the image.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNrupiRFNrMr35MusUdmmK2wctdpBDbHfV2r9aBLsEGGUDrhyUsmAtgEsHvJgtfJTdv8_n4c84wgb5Ry6GzqgZ7uNZe_bhKl_1bHnImiTQc-NcnsufTO_0fc3AwmLd7gEQty1B86LfDeR-/s1600-h/7a5.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNrupiRFNrMr35MusUdmmK2wctdpBDbHfV2r9aBLsEGGUDrhyUsmAtgEsHvJgtfJTdv8_n4c84wgb5Ry6GzqgZ7uNZe_bhKl_1bHnImiTQc-NcnsufTO_0fc3AwmLd7gEQty1B86LfDeR-/s320/7a5.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5221195936344997794&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;As the frequency increases, the dots go farther from each other.&lt;br /&gt;&lt;br /&gt;When we create a 2-D sinusoid in the X- direction,the dots are in Y-direction.&lt;br /&gt;&lt;br /&gt;Then we will rotate the sinusoid,&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;f = 4;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;theta = 30;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;z = sin(2*%pi*f*(Y*sin(theta) + X*cos(theta)));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSrJ-9tW0gMHpDv56RShSZTCtiOwQ68EwiEoDu4jHUl_xyZPQjZbV6MFSXQt1dc0AfP-ezb3CZzzfBIp8zJpBvOWyuuwRG3uuPr3pYaGfkq1PRA9FFgdfIfL6c25kFOIZFkPWQ1CKlgYgo/s1600-h/7a3.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSrJ-9tW0gMHpDv56RShSZTCtiOwQ68EwiEoDu4jHUl_xyZPQjZbV6MFSXQt1dc0AfP-ezb3CZzzfBIp8zJpBvOWyuuwRG3uuPr3pYaGfkq1PRA9FFgdfIfL6c25kFOIZFkPWQ1CKlgYgo/s320/7a3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5221190133212606402&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;In the FT image, the dots are in the X- direction and the second dot is tilted, at the same degree as the sinusoid is rotated.&lt;br /&gt;&lt;br /&gt;Using different values of theta&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipkctJWs_4-nV6Ke2S_lZnrnaCTpV3Sk6B6j6RVxw0nPk_WITHZNC3G_q6vuhKQJuSvigRo3SdKp5EQlXZYmIPcF_gq8ps_fTiaVTLuBPYayY4U3K9G3KeKBKJSWtNoPWJ1Fh0SdJr2nXh/s1600-h/Untitled.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 201px; height: 361px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipkctJWs_4-nV6Ke2S_lZnrnaCTpV3Sk6B6j6RVxw0nPk_WITHZNC3G_q6vuhKQJuSvigRo3SdKp5EQlXZYmIPcF_gq8ps_fTiaVTLuBPYayY4U3K9G3KeKBKJSWtNoPWJ1Fh0SdJr2nXh/s320/Untitled.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5221362275106086290&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;We will then create a pattern. I used the pattern given in the manual&lt;br /&gt;z = sin(2*%pi*4*X).*sin(2*%pi*4*Y); this is a product of two corrugated roofs, one running in the X-direction, the other in Y.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;f = 4;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;z = sin(2*%pi*4*X).*sin(2*%pi*4*Y);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigWrthzxm90EIIDxqj9kdstPhPNKENugDFDd4aEtGlf9XSvvcwYYeuS1c_IQ1z4-WdcDa-2uIHXPHVKUarD8wj55lazOxu4J5hJG5rfsxGHryhGrOQftZiU4dGk5LAdp5ncO28sf6oyV_q/s1600-h/7a4.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigWrthzxm90EIIDxqj9kdstPhPNKENugDFDd4aEtGlf9XSvvcwYYeuS1c_IQ1z4-WdcDa-2uIHXPHVKUarD8wj55lazOxu4J5hJG5rfsxGHryhGrOQftZiU4dGk5LAdp5ncO28sf6oyV_q/s320/7a4.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5221191982970001154&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;We can see that the resulting image is a checkered black and white image.  The image 2D cosine with both horizontal and vertical components. They have 4 cycles horizontally and vertically.  And the FT image has for dots forming a square near the center of the image.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;fx = 4;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;fy = 8&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;z = sin(2*%pi*fx*X).*sin(2*%pi*fy*Y);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsaZOwX4cX3WTLx3vzgTwfK6BlvrMqdIy9eqHmjEYO7S_wAamdKjEMNx3PX5i0laQHOKVAbPavv21LZj5WmCoEjsCLQwAE2D3Ezv5e6S_QyWPMkhm9D5VUrUt0ixbrqJnTirlo5McR4RVY/s1600-h/Untitled.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsaZOwX4cX3WTLx3vzgTwfK6BlvrMqdIy9eqHmjEYO7S_wAamdKjEMNx3PX5i0laQHOKVAbPavv21LZj5WmCoEjsCLQwAE2D3Ezv5e6S_QyWPMkhm9D5VUrUt0ixbrqJnTirlo5McR4RVY/s400/Untitled.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5222823147661421650&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;The dots in the FT image correspond to the frequency of the stripes in the original image.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Activity 7.B Fingerprints : Ridge Enhancement&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For this activity, we will use fingerprint.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;img = imread(&#39;finger.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(1)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(img)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;img = im2gray(img);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;image =img-mean(img); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(2); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(image);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im=fft2(image);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;ff=real((im).*conj(im));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(3); imshow(fftshift(log(ff+1)),[]); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xset(&#39;colormap&#39;,jetcolormap(64));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;//Transfer function&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;filter=mkfftfilter(image,&#39;exp&#39;,30); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(4); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(filter);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;//High-pass filter&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;IM=im.*fftshift(1-filter);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;IMAGE=real(fft2(IM));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(5); imshow(IMAGE);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(6);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(abs(fftshift(fft2(IMAGE))), []);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xset(&#39;colormap&#39;, jetcolormap(64));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using the image in the Activity 7 manual&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJGk2iH-I7MOousYENiEKhAsLSLm3SUtMnAcKUR9WkL7NlvzYe2-vjIJdCegMIUUZE1TuSuq-JEqitVTPYOJUSLUcj-WxeDTOFo6ZTct1Bh6OWeEsu1RlQpFlKnXCNYk9UJaURYAgqfxlu/s1600-h/8.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJGk2iH-I7MOousYENiEKhAsLSLm3SUtMnAcKUR9WkL7NlvzYe2-vjIJdCegMIUUZE1TuSuq-JEqitVTPYOJUSLUcj-WxeDTOFo6ZTct1Bh6OWeEsu1RlQpFlKnXCNYk9UJaURYAgqfxlu/s400/8.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5222805316365853938&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span&gt;Using my own image(c/0 Julie D.)&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QPNWmbiW3xxQ8tNwm3ycWC_9evtyWZoKTvCIxBgDlM8y6_o1H50rQ1WpQ7dl2-2Xm6gbi2z7uXSS2zV_yezGIKl8I7XQjIgasyS8dCoJeeyTuNKKSGG6Oaoi3TnC21dWzhyphenhyphenaz7ATJo6r/s1600-h/ewan.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QPNWmbiW3xxQ8tNwm3ycWC_9evtyWZoKTvCIxBgDlM8y6_o1H50rQ1WpQ7dl2-2Xm6gbi2z7uXSS2zV_yezGIKl8I7XQjIgasyS8dCoJeeyTuNKKSGG6Oaoi3TnC21dWzhyphenhyphenaz7ATJo6r/s400/ewan.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5222826665643535602&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Activity 7.C Lunar Landing Scanned Pictures : Line removal&lt;/span&gt;&lt;br /&gt;Using the same commands we used in the previous activity for getting the fft and using filters.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;// getting the FT of original image&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;im = imread(&#39;moon.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imgray = im2gray(im); // convert to grayscale&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;Fimgray = fft2(imgray);// Fourier Transform&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(fftshift(abs(Fimgray)),[]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xset(&quot;colormap&quot;, hotcolormap(255));// using colormap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;// getting the enhanced image by filtering&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;b = imread(&#39;filter.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;a= imread(&#39;moon.jpg&#39;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;bgray = im2gray(b);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;agray = im2gray(a);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;Fb = fftshift(bgray);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;Fa = fft2(agray);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;FRA = Fb.*(Fa);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;IRA = fft2(FRA); //inverse FFT&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;FImage = abs(IRA);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(FImage, [ ]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_M1HL1LXKptF7mQM3H9lT32wvjA5n3GoqQK51-fmGYgY0RymemdeJOZxpFGkSuF17J4iak6lXu_IrmrbRqiPJdq_-PgW1B8Pyyl8yayHbjA7f9gP9NQXp2xWBMADl26dVVXDm7MCJaKId/s1600-h/3.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_M1HL1LXKptF7mQM3H9lT32wvjA5n3GoqQK51-fmGYgY0RymemdeJOZxpFGkSuF17J4iak6lXu_IrmrbRqiPJdq_-PgW1B8Pyyl8yayHbjA7f9gP9NQXp2xWBMADl26dVVXDm7MCJaKId/s400/3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5222820739563455826&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;The lines in the filter corresponds to the line in the original image which we want to remove.&lt;br /&gt;&lt;br /&gt;Acknowledgements:&lt;br /&gt;http://www.cs.unm.edu/~brayer/vision/fourier.html&lt;br /&gt;http://student.kuleuven.be/~m0216922/CG/fourier.html&lt;br /&gt;&lt;br /&gt;Julie D. - for the scanned fingerprint&lt;br /&gt;Aiyin and Beth - for answering my questions&lt;br /&gt;&lt;br /&gt;Grade:&lt;br /&gt;10/10&lt;br /&gt;- because I did what the activity asks to do.</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/3349651620698387591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/3349651620698387591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/3349651620698387591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/3349651620698387591'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/07/a7-enhancement-in-frequency-domain.html' title='A7 – Enhancement in the Frequency Domain'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHGGsi74Hard8HhKFWtMPNzZS04SK9S9mX0LG05LDiw1MuzqSmHvUEQMyeeo_VEqLxUuvQ_pDXyKJGl4_X9beZbPHAFeUHLGk6yCDe9d8L19NuHYkI2H8-8AJ-slEvUWn8TzCkk1wvWTWw/s72-c/rooforig.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-5331527446931026690</id><published>2008-07-08T08:50:00.025+08:00</published><updated>2008-07-22T18:59:35.664+08:00</updated><title type='text'>A6 - Fourier Transform Model of Image Formation</title><content type='html'>&lt;span style=&quot;color: rgb(0, 0, 0);font-family:times new roman;&quot; &gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Activity 6.A – Familiarization with discrete FFT&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);font-family:times new roman;&quot; &gt;First we made a 128 x 128 image of a circle using paint&lt;/span&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizjBQ042H5UsCfsO0as8Mw00QZXx6ORwB1lwY5vLM39QxyMZ9j4EShzd0rKa-bjLxFLCXIJyt-V3fHYlAvbSDfO6R9DvLe20wdywAxFVd5EuPb7JAY3bOARrtxtLQxoLo50rGUzoHJ-R9Q/s1600-h/circle3.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizjBQ042H5UsCfsO0as8Mw00QZXx6ORwB1lwY5vLM39QxyMZ9j4EShzd0rKa-bjLxFLCXIJyt-V3fHYlAvbSDfO6R9DvLe20wdywAxFVd5EuPb7JAY3bOARrtxtLQxoLo50rGUzoHJ-R9Q/s320/circle3.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220445291326187186&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Using scilab, we will convert the image to grayscale and apply Fourier transform.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;im = imread(&#39;circle.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imgray = im2gray(im); // convert to grayscale&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;Fimgray = fft2(imgray);// Fourier Transform&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;scf(1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imshow(abs(Fimgray),[]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;xset(&quot;colormap&quot;, hotcolormap(255)); // using colormap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO1kLi3UgXTxf7qXTwfTuLWdTjpWCCnvzNETbpuD8Wltbs3vRnVvgUH4NaI6DrW_JH_lU2DkdbRnmi9EX7azb1U1z7FMWS8p0VTqZvgUq2Kc3JenesoKy-sPbSYFJdCXCMbmxKPxqv2Hag/s1600-h/scf(1).bmp.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO1kLi3UgXTxf7qXTwfTuLWdTjpWCCnvzNETbpuD8Wltbs3vRnVvgUH4NaI6DrW_JH_lU2DkdbRnmi9EX7azb1U1z7FMWS8p0VTqZvgUq2Kc3JenesoKy-sPbSYFJdCXCMbmxKPxqv2Hag/s320/scf(1).bmp.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220453937250611234&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;applying fftshift&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;scf(2);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;imshow(fftshift(abs(Fimgray)),[]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;xset(&quot;colormap&quot;, hotcolormap(255));// using colormap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0rf2q_k60oKyAzhS_iFOpafge-2xbJzgDcXCKmwFdVct30_2mjfLnPvIRrvTT5kFSAXpCthI9_M2vobc5lAfI-ST7QLnm_odZ7nqhEUDtyLmKSAxeGFixEMgIX7o8CFGUb4PYKWBQRb-y/s1600-h/scf(2).bmp.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0rf2q_k60oKyAzhS_iFOpafge-2xbJzgDcXCKmwFdVct30_2mjfLnPvIRrvTT5kFSAXpCthI9_M2vobc5lAfI-ST7QLnm_odZ7nqhEUDtyLmKSAxeGFixEMgIX7o8CFGUb4PYKWBQRb-y/s320/scf(2).bmp.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220454103717417106&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The result is an airy disc.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;applying Fourier transform again&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;scf(3);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imshow(abs(fft2(Fimgray)),[]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ3cBdPVeR0bIiVh96ysYw0xxtmFhfQNiatZ_ne8NtrOskswRFwJKHmrWzDxb8E5fqOWfO3c9sEVSNTEfOtLXlU70bskBo1yH7odb0Yz__pgrvPGdGO2JN2hJ1gCuvt4En_YTj3wNeSQrB/s1600-h/SCF(3).bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ3cBdPVeR0bIiVh96ysYw0xxtmFhfQNiatZ_ne8NtrOskswRFwJKHmrWzDxb8E5fqOWfO3c9sEVSNTEfOtLXlU70bskBo1yH7odb0Yz__pgrvPGdGO2JN2hJ1gCuvt4En_YTj3wNeSQrB/s320/SCF(3).bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220454256961607970&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The resulting image is the original image but the circle is shifted from the center to the left.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The next task is to apply the coomands to a letter A.&lt;/span&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgENBRsorJeaUCflp-OljtGfMfe6kHy-EVKlhsksxrUZ342eF2Eb7p_igpJv8sNlAmebKQNfRXI3kxOgC054_U08f64EHX5I7zgu3DCkYXRAGyZ0AkjQPbpHl_kgDurWS1trlRkw9LWC5qF/s1600-h/A.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgENBRsorJeaUCflp-OljtGfMfe6kHy-EVKlhsksxrUZ342eF2Eb7p_igpJv8sNlAmebKQNfRXI3kxOgC054_U08f64EHX5I7zgu3DCkYXRAGyZ0AkjQPbpHl_kgDurWS1trlRkw9LWC5qF/s320/A.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220454413296111090&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;im = imread(&#39;A.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imgray = im2gray(im); // convert to grayscale&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;Fimgray = fft2(imgray);// Fourier Transform&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;scf(1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imshow(abs(Fimgray),[]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;xset(&quot;colormap&quot;, hotcolormap(255)); // using colormap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt0bw5tYi74uOjM2Ajaosx1DS9hWS1HbtkV-4IZ4OW2aBZjpn1wk2yQ1FPG62DRjmMQm_2EVKjWVMYmF2kNNAiz1hIxXzee1axkMBBsJ-DRuq7jswnZSv6TMT8qeZ1tBDKOR-HQXAZHX2M/s1600-h/ascf(1).bmp.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt0bw5tYi74uOjM2Ajaosx1DS9hWS1HbtkV-4IZ4OW2aBZjpn1wk2yQ1FPG62DRjmMQm_2EVKjWVMYmF2kNNAiz1hIxXzee1axkMBBsJ-DRuq7jswnZSv6TMT8qeZ1tBDKOR-HQXAZHX2M/s320/ascf(1).bmp.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220455321524065906&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;applying fftshift&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;scf(2);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imshow(fftshift(abs(Fimgray)),[]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;xset(&quot;colormap&quot;, hotcolormap(255));// using colormap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQN0aq4jo5a-6ye1nRWn1QqTyBl0k-wU5NB6C_Waycl2lwkNF4cfg5zW20X_giF-zSNMHHkMk6s3Dtjxtka7VCoe_i7U7iEc_uB2Kz3DFdpbGJpjTtLnWvnOv_4611sqQpIqxML3OV2xVN/s1600-h/ascf(2).bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQN0aq4jo5a-6ye1nRWn1QqTyBl0k-wU5NB6C_Waycl2lwkNF4cfg5zW20X_giF-zSNMHHkMk6s3Dtjxtka7VCoe_i7U7iEc_uB2Kz3DFdpbGJpjTtLnWvnOv_4611sqQpIqxML3OV2xVN/s320/ascf(2).bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220455599397631650&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;applying Fourier transform again&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;scf(3);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imshow(abs(fft2(Fimgray)),[]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVjmsbmaomrCKXJVpWPaieXgrYhdzT1D0YzofrP4dplr_Afi4FO7eUbs_tA5EuhwExT88t5_m1hm2s9D2BCqICzJwQta_pjF_Ks0A0nEBWCx8cYIijJ3I75_ZXfudcyjnWcAJSbrCugC15/s1600-h/ascf(3).bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVjmsbmaomrCKXJVpWPaieXgrYhdzT1D0YzofrP4dplr_Afi4FO7eUbs_tA5EuhwExT88t5_m1hm2s9D2BCqICzJwQta_pjF_Ks0A0nEBWCx8cYIijJ3I75_ZXfudcyjnWcAJSbrCugC15/s320/ascf(3).bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220456525633275330&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The resulting image is an inverted letter A.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;Activity 6.B Simulation of an imaging device.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;I created an image &quot;VIP&quot; using paint.&lt;/span&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkFEWpZ9bGpFUHG4IE9UeYdDjmJolA0ylE81aaeGb6oH_Z1IR56U5v61G3fDDAJO0GzKxubO77YESK83nK6Xos3cHKWioWInkN13TvPRrrIW9CG4cg_0LdUysj4viHeug3u-YbNxKDopZH/s1600-h/vip.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkFEWpZ9bGpFUHG4IE9UeYdDjmJolA0ylE81aaeGb6oH_Z1IR56U5v61G3fDDAJO0GzKxubO77YESK83nK6Xos3cHKWioWInkN13TvPRrrIW9CG4cg_0LdUysj4viHeug3u-YbNxKDopZH/s320/vip.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220614771715717298&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;This will be the &quot;object&quot;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Using the commands&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;b = imread(&#39;circle.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;a= imread(&#39;vip.bmp&#39;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;bgray = im2gray(b);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;agray = im2gray(a);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;Fb = fftshift(rgray);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;Fa = fft2(agray);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;FRA = Fb.*(Fa);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;IRA = fft2(FRA); //inverse FFT&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;FImage = abs(IRA);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imshow(FImage, [ ]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;xset(&quot;colormap&quot;, hotcolormap(255));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;We will use different radii of circles. The circles will be the &quot;lens&quot;.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;text-decoration: underline; color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;radius 1:&lt;br /&gt;&lt;/span&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2u3FQ3a3pzYjpmteNI9ztjDggBuv1pRyQ81ulQOt4mvOGE1ZG51Qbl7WErAYt6Tpbb_QX_K6ksZORQVILGEYdBzqQTvJ7GtYCTwj34b4zoJ9PnzpSCOq7Vw8NxrAAwaxwjWzGTUh9YWgj/s1600-h/circle.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2u3FQ3a3pzYjpmteNI9ztjDggBuv1pRyQ81ulQOt4mvOGE1ZG51Qbl7WErAYt6Tpbb_QX_K6ksZORQVILGEYdBzqQTvJ7GtYCTwj34b4zoJ9PnzpSCOq7Vw8NxrAAwaxwjWzGTUh9YWgj/s320/circle.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220617082340956114&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The resulting image will be&lt;/span&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk431yw8NSioIbR88q6bKoOTQ3y-Ipv94c-R2foie0P3n-SliHJyKmgkhNPOuhv9t7JDpoRl9eexfyUpX_j5gZMAdl-avXfP80dlFqPQkCj0LMAj91rs25ZAk-JJFQmvYzrgRZt4XPTDvO/s1600-h/vip1.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk431yw8NSioIbR88q6bKoOTQ3y-Ipv94c-R2foie0P3n-SliHJyKmgkhNPOuhv9t7JDpoRl9eexfyUpX_j5gZMAdl-avXfP80dlFqPQkCj0LMAj91rs25ZAk-JJFQmvYzrgRZt4XPTDvO/s320/vip1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220617416218029922&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;radius 2:&lt;/span&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz17YzKqWJ_0_h6OJhChsQKY55LoIAj2cERylns77I7sM3lLPs_auTxNZxnCdyu4BXGJ3jkd5YQjPSQmjxSsCZdE2V5-xGG1hyglAW-y9qeXsLZY_OhKAjqZQoxcW0egMAljmEgFK1Y6S8/s1600-h/circle2.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz17YzKqWJ_0_h6OJhChsQKY55LoIAj2cERylns77I7sM3lLPs_auTxNZxnCdyu4BXGJ3jkd5YQjPSQmjxSsCZdE2V5-xGG1hyglAW-y9qeXsLZY_OhKAjqZQoxcW0egMAljmEgFK1Y6S8/s320/circle2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220617676105315938&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The resulting image will be:&lt;/span&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfk_f-NSuA8PEc36Int184Ai0Y1R724uak6CK9eV5NmwkyLEV1EybZXn2Pr1-AvTtiIR7r87AMzpH6rkUh_1jYMYM0KNiMqRMcXshM2io4ALAhh-PzH5W6o3Qo5rfF9c1Umk78Ic2KSQlc/s1600-h/vip2.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfk_f-NSuA8PEc36Int184Ai0Y1R724uak6CK9eV5NmwkyLEV1EybZXn2Pr1-AvTtiIR7r87AMzpH6rkUh_1jYMYM0KNiMqRMcXshM2io4ALAhh-PzH5W6o3Qo5rfF9c1Umk78Ic2KSQlc/s320/vip2.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220617859110672098&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;radius3:&lt;/span&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8SwB4fBB-Vf3ArXZVm2qmGUO-YDDbZSvMpTeogS11mOyd9TGYIbNHKcCG3UNu1lDyX1ROdUikkLs7h5SGJ7ziwS6PxS4i5fIFcUV8NiZ66C5bytdzpWBzcLwPS9rw9nKal7KohfJPGdN_/s1600-h/circle3.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8SwB4fBB-Vf3ArXZVm2qmGUO-YDDbZSvMpTeogS11mOyd9TGYIbNHKcCG3UNu1lDyX1ROdUikkLs7h5SGJ7ziwS6PxS4i5fIFcUV8NiZ66C5bytdzpWBzcLwPS9rw9nKal7KohfJPGdN_/s320/circle3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220618044241673746&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The resulting image will be:&lt;/span&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjstwkCu2icw0IJAJMz5XXcW2cXoMpdmeZsW6AvZKPv3d8y4tR-mvnQoWDx74oZ3n-QDG9ljaNMjDe-oj4crsSsM6yq0RdhV_f2SBv5Z9e_bP9WTnI4ySFD_qjhJeBrFweb0jEZCWJO052c/s1600-h/vip3.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjstwkCu2icw0IJAJMz5XXcW2cXoMpdmeZsW6AvZKPv3d8y4tR-mvnQoWDx74oZ3n-QDG9ljaNMjDe-oj4crsSsM6yq0RdhV_f2SBv5Z9e_bP9WTnI4ySFD_qjhJeBrFweb0jEZCWJO052c/s320/vip3.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220618272668908178&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;A smaller lens aperture will results in a blurred image. Comparing this with the bigger aperture, the image is sharper and most closely resembles the original.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;Activity 6.C Template Matching using correlation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 0);&quot;&gt;Template Matching is a pattern recognition technique suitable for finding exactly&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 0);&quot;&gt;identical patterns in a scene such as in the case of finding a certain word in a&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 0);&quot;&gt;document.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;We made two images.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;First, with the words &quot;THE RAIN IN SPAIN STAYS MAINLY IN THE PLAIN.&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Second, the letter A.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-style: italic;&quot;&gt;Using the commands&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-style: italic;&quot;&gt;i&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;m = imread(&#39;rain.bmp&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;img = imread(&#39;A2.bmp&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imgray = im2gray(im);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imggray = im2gray (img);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;Fim = fft2(imgray);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;Fimg = fft2(imggray);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;FRA = Fimg.*conj(Fim);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;IRA = fft2(FRA);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;FImage = abs(IRA);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imshow(fftshift(FImage), [ ]);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;xset(&quot;colormap&quot;, hotcolormap(255));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;will produce the image below:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYBi9YUrM9tOw1nMAkf19mLf6-WyRvKa5pTWyKuUPRRt30imsVMKTJQf2MDxEPO9BDWq1jPrJkZRkoSYRgM7WBjtuAdfz4GJSL7rrTpAJGnW7e7eUS3JdCFT6MRE9IExIlC4rnXrvUVUSe/s1600-h/rain1.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYBi9YUrM9tOw1nMAkf19mLf6-WyRvKa5pTWyKuUPRRt30imsVMKTJQf2MDxEPO9BDWq1jPrJkZRkoSYRgM7WBjtuAdfz4GJSL7rrTpAJGnW7e7eUS3JdCFT6MRE9IExIlC4rnXrvUVUSe/s320/rain1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220478612341141826&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;In the image, there are 5 dots which corresponds to the 5 A&#39;s in the sentence.&lt;br /&gt;The A&#39;s are from words &quot;rain&quot;, &quot;spain&quot;, &quot;stays&quot;, &quot;mainly&quot;, &quot;plain&quot;.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;Activity 6.D Edge detection using the convolution integral&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 0);&quot;&gt;Edge detection can be seen as template matching of an edge pattern with an&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 0);&quot;&gt;image&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Using the commands,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;hor = [-1 -1 -1; 2 2 2; -1 -1 -1]; //horizontal pattern&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;ver = [-1 2 -1; -1 2 -1; -1 2 -1]; //vertical pattern&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;spot = [-1 -1 -1; -1 8 -1; -1 -1 -1]; //spot pattern&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;pattern = spot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;vip = gray_imread(&#39;vip.png&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;im = imcorrcoef(vip, pattern);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;imshow(im);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The image that will appear in horizontal pattern is&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTDkqY7eIlezxVH1SkYtgkY2HZZCjCwLGrCsPEFJxtdXDo96mjsi-38RprTlJwvf5aZPohqLvvKnKKiuskT4dcMd5OeSZJJJLkYpSSfSwLudZeLHaM4GO90a1evnCBx0eSwSJ9Iw7tqLv6/s1600-h/hor.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTDkqY7eIlezxVH1SkYtgkY2HZZCjCwLGrCsPEFJxtdXDo96mjsi-38RprTlJwvf5aZPohqLvvKnKKiuskT4dcMd5OeSZJJJLkYpSSfSwLudZeLHaM4GO90a1evnCBx0eSwSJ9Iw7tqLv6/s320/hor.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220626946008830290&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;For vertical pattern:&lt;/span&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQqCalkGlgrmNsjnBTwQ9LRF6Raq3Gwai8sWTzk4K4f0g8QBqfQpw3KZZy0aAL4W1Sngy5IJbR7mYiX1-FRBYzpvq6r0Cfhgk1GI-78Qcoz1crUaR10DOgFdPHb5PrCO4Y6YDt7EADOs8L/s1600-h/vert.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQqCalkGlgrmNsjnBTwQ9LRF6Raq3Gwai8sWTzk4K4f0g8QBqfQpw3KZZy0aAL4W1Sngy5IJbR7mYiX1-FRBYzpvq6r0Cfhgk1GI-78Qcoz1crUaR10DOgFdPHb5PrCO4Y6YDt7EADOs8L/s320/vert.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220627113635304498&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;And for spot pattern:&lt;/span&gt;&lt;br /&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigKVmLqGblaXEHpUIieJH8Bsu36XxRQEtLwZjWePMMnSjsrAZh_oLc2JBCcT84fhvjjVP6THbUDZIm1tjJ_tMSe0aUbjLhgP_9BAtIipUoyvXiyVAuI4m7Jhcz0tU_0kZkV7H1I1rYDw1e/s1600-h/spot.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigKVmLqGblaXEHpUIieJH8Bsu36XxRQEtLwZjWePMMnSjsrAZh_oLc2JBCcT84fhvjjVP6THbUDZIm1tjJ_tMSe0aUbjLhgP_9BAtIipUoyvXiyVAuI4m7Jhcz0tU_0kZkV7H1I1rYDw1e/s320/spot.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5220627272948729522&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The edges are more prominent depending on what kind of pattern the image was convolved with.&lt;br /&gt;&lt;br /&gt;Acknowledgements:&lt;br /&gt;Mark Leo&lt;br /&gt;Aiyin&lt;br /&gt;Beth&lt;br /&gt;- for answering my questions&lt;br /&gt;&lt;br /&gt;Grade: 10/10&lt;br /&gt;because I know I did well and I did what the activity needed.&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/5331527446931026690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/5331527446931026690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5331527446931026690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5331527446931026690'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/07/a6-fourier-transform-model-of-image.html' title='A6 - Fourier Transform Model of Image Formation'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizjBQ042H5UsCfsO0as8Mw00QZXx6ORwB1lwY5vLM39QxyMZ9j4EShzd0rKa-bjLxFLCXIJyt-V3fHYlAvbSDfO6R9DvLe20wdywAxFVd5EuPb7JAY3bOARrtxtLQxoLo50rGUzoHJ-R9Q/s72-c/circle3.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-1888887380863723283</id><published>2008-07-03T09:11:00.012+08:00</published><updated>2008-07-22T19:01:26.210+08:00</updated><title type='text'>A5 – Physical Measurements from Discrete Fourier Transforms</title><content type='html'>The activity for today is to create correct frequency scales for FFT patterns.&lt;br /&gt;&lt;br /&gt;I. Generate a 1-D sinusoid of the form sin (2*pif t) specifying Δt, and N and the frequency f.&lt;br /&gt;Using the commands:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;T = 2 //total time the signal was sampled&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;N = 256 // total number of samples&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;dt = T/256 // sampling interval&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;t = [0:dt:(N-1)*dt];&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;f = 5&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;y = sin(2*%pi*f*t);//function&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;f1 = scf(1);&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;plot(t,y);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will give the plot below&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCzokbHz-WTfROYJfTRndlLbTvJEZsN4HIdg1fySx-IVuKAy73JDZ7WneJZSQ7yMYGSwZoyQDQluDV9gAB-9FF7-hvVhCOTMmziAk-meJTeayt3DFPZiY_wMqSJNGeaZVI_Eu_IqDKq1JX/s1600-h/a51.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCzokbHz-WTfROYJfTRndlLbTvJEZsN4HIdg1fySx-IVuKAy73JDZ7WneJZSQ7yMYGSwZoyQDQluDV9gAB-9FF7-hvVhCOTMmziAk-meJTeayt3DFPZiY_wMqSJNGeaZVI_Eu_IqDKq1JX/s320/a51.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218592925383137890&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;II. Get the Fourier transform and compute the frequency scale&lt;br /&gt;Using the commands:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;FY = fft(y); // fourier transform&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;F = 1/(2*dt); // maximum frequency&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;df = 2*F/256; // discrete frequency in the FT domain&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;f = [-(df*(N/2)):df:df*(N/2 -1)]; //frequency&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;plotting the frequency and the shifted fft&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;f2 = scf(2);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;plot(f, fftshift(abs(FY)));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;gives the image below:&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTQIbbAysRofbZnK2rFulXOpCLzXauUwlQf3UmoykrmegMJg3vO_ckMpQze6gwWnN-PgCU0qwRB0vEKwqh2-TeX_95jpW3MwHusvaClSXrUuAjg2k_PNWs36Aga_EX3ct5J9S-AEnbm4jX/s1600-h/A52.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTQIbbAysRofbZnK2rFulXOpCLzXauUwlQf3UmoykrmegMJg3vO_ckMpQze6gwWnN-PgCU0qwRB0vEKwqh2-TeX_95jpW3MwHusvaClSXrUuAjg2k_PNWs36Aga_EX3ct5J9S-AEnbm4jX/s320/A52.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218597073236876066&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;frequency: -4.5, -5.5, 4.5, 5.5&lt;br /&gt;Note: x axis - frequency and  y axis - shifted fft&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In an image:&lt;br /&gt;The Discrete Fourier Transform is given by:&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-a0HZI_7j1oibK2Xx4dlXLXUpvGFDum8GwT-uTBnxcf8Pat1UdsHUv2c2fk1nm-p38ckItLO_XeQ4iaQuaT8H0ucrLWz2e45y3-sbAib1N6iOfBzL1nIBmXiGx8RDTH_S2oY8bPPbpzP0/s1600-h/DFT.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-a0HZI_7j1oibK2Xx4dlXLXUpvGFDum8GwT-uTBnxcf8Pat1UdsHUv2c2fk1nm-p38ckItLO_XeQ4iaQuaT8H0ucrLWz2e45y3-sbAib1N6iOfBzL1nIBmXiGx8RDTH_S2oY8bPPbpzP0/s320/DFT.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218599123464125154&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;In 2-D&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX5vZeneE63M7A-aqSkcXQzpeJW93ewoZ7kFcswwFO41N5VMEvSMlSx3wUVC4L1yCJ_2LaCFAjn80DAi-kjxt4DLsLE5eLCku3VHFtS5IQsvK7bETzAGZohcrEDM2Wdz_NPskiuudcEgg_/s1600-h/2ddft.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX5vZeneE63M7A-aqSkcXQzpeJW93ewoZ7kFcswwFO41N5VMEvSMlSx3wUVC4L1yCJ_2LaCFAjn80DAi-kjxt4DLsLE5eLCku3VHFtS5IQsvK7bETzAGZohcrEDM2Wdz_NPskiuudcEgg_/s320/2ddft.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218599737082726834&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;IN DFT, the number of frequencies correponds to the number of pixels in the domain image.&lt;br /&gt;&lt;br /&gt;The Fourier Transform is used to help us find the geometric characteristics of an image.&lt;br /&gt;To use it in an image, we will use a grayscale image. Find its histogram and PDF. And then we will use the 2-D DFT to find the Fourier image. We will mainly used sine or cosine functions. After using DFT, the image is now decomposed to its sinusoidal components. Then we can find the frequency which corresponds to the number of pixels.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Questions:&lt;br /&gt;a) Light from a fluorescent lamp is known to flicker at 120Hz. What should be the threshold sampling interval for accurate FT analysis?&lt;br /&gt;using the formula:&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-0uDbJy0EC2g2V-9a2H2k3N9_NxU1K9n4KHjRVppPefg0WA8zqzNpdb5FKjiojh4q85c5Q-WQjSooNA-Cm4lEHe7jv-7gLZWv4e54rtJy7h52YD2SEcZv9j4eRgtOmnv64McwXg0JaJxn/s1600-h/Untitled.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-0uDbJy0EC2g2V-9a2H2k3N9_NxU1K9n4KHjRVppPefg0WA8zqzNpdb5FKjiojh4q85c5Q-WQjSooNA-Cm4lEHe7jv-7gLZWv4e54rtJy7h52YD2SEcZv9j4eRgtOmnv64McwXg0JaJxn/s320/Untitled.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218614500197674818&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;where&lt;br /&gt;Fmax is the maximun frequency = 120 Hz&lt;br /&gt;We are looking for deltaT which is the threshold sampling interval.&lt;br /&gt;Calculating, the threshold sampling interval is&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSWYIbybFoJ3iGxCWLTpzgzIMULLNWCKvMo-Jrbjpp2r7z08gBMDE3b6SRPz-syVhWK8G8xP-sbSY92DHwcAHO8GB-KJTNO0xXAgH2o4O1Uwa7gusWexoCYy__2qFtZjlxM8VzsLnshIjz/s1600-h/delta.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSWYIbybFoJ3iGxCWLTpzgzIMULLNWCKvMo-Jrbjpp2r7z08gBMDE3b6SRPz-syVhWK8G8xP-sbSY92DHwcAHO8GB-KJTNO0xXAgH2o4O1Uwa7gusWexoCYy__2qFtZjlxM8VzsLnshIjz/s320/delta.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218616026296210626&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;b) What is the effect of increasing the number of samples N in the FT?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; increasing the number of samples,increases the peaks.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using N= 1000, the plot of the FT and frequencies will look like the image below&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilz3jrfv3W0iPjw16T_53KXcf1lAy_RloAEwOFMEqWYegmMmppNowZhYl5-8saEZ4R99AGB344D0yg6Eo2aktjAycQhynpI9q95f8mw5Mhl3LkU2qIvykjmMgKZeBaO7qgDO41ZnvDE3Hx/s1600-h/a53.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilz3jrfv3W0iPjw16T_53KXcf1lAy_RloAEwOFMEqWYegmMmppNowZhYl5-8saEZ4R99AGB344D0yg6Eo2aktjAycQhynpI9q95f8mw5Mhl3LkU2qIvykjmMgKZeBaO7qgDO41ZnvDE3Hx/s320/a53.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218607228814896674&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;frequency: - 4.5, -5.5, 4.5, 5.5&lt;br /&gt;&lt;br /&gt;c) What is the effect of decreasing the sampling interval Δt in the FT?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; we can decrease the sampling interval by either increasing the number of samples or decreasing the total time or both. We saw that when the total time is decreased, the frequencies increased. Decreasing the time interval, doesn&#39;t affect the peaks of the plot. When we increased the number of samples, we increased the peaks. When we increased the number of samples and decreased the total time, the frequency and peaks increases.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using T =1&lt;br /&gt;N = 500&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2ivdQMnDjjipP88TwSlLNDTjJq0plqVIF5roAlswOvat18SwnIOatZInhlMSkSPeY9fbbc0oli47jiVNdHPRw1Q1fE5iv2AyYNrUHUul-ShifwvAvIZjQHzNwE_WUZSU83s3kBY88LPSi/s1600-h/a54.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2ivdQMnDjjipP88TwSlLNDTjJq0plqVIF5roAlswOvat18SwnIOatZInhlMSkSPeY9fbbc0oli47jiVNdHPRw1Q1fE5iv2AyYNrUHUul-ShifwvAvIZjQHzNwE_WUZSU83s3kBY88LPSi/s320/a54.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5218622377370625122&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;frequency: -5,-6, 5, 6&lt;br /&gt;&lt;br /&gt;d) What is the effect of fixing the total time interval T but increasing the&lt;br /&gt;number of samples N?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; when the total time interval is fixed  but the number of samples is increased, the peaks are increased.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Acknowledgements:&lt;br /&gt;http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm&lt;br /&gt;&lt;br /&gt;BETH&lt;br /&gt;AIYIN&lt;br /&gt;- for helping me.&lt;br /&gt;&lt;br /&gt;Grade:&lt;br /&gt;10/10. because I think I answered all the questions.</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/1888887380863723283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/1888887380863723283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/1888887380863723283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/1888887380863723283'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/07/a5-physical-measurements-from-discrete.html' title='A5 – Physical Measurements from Discrete Fourier Transforms'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCzokbHz-WTfROYJfTRndlLbTvJEZsN4HIdg1fySx-IVuKAy73JDZ7WneJZSQ7yMYGSwZoyQDQluDV9gAB-9FF7-hvVhCOTMmziAk-meJTeayt3DFPZiY_wMqSJNGeaZVI_Eu_IqDKq1JX/s72-c/a51.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-2097215806812192429</id><published>2008-06-26T08:55:00.042+08:00</published><updated>2008-07-22T19:03:39.976+08:00</updated><title type='text'>A4 – Enhancement by Histogram Manipulation</title><content type='html'>&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;The task &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;for this activity is to enhanced an image using histogram manipulation.&lt;br /&gt;&lt;br /&gt;For this activity, we are asked to find grayscale images. I looked for an image in the web. The image is from: &lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/Face_sapa14.jpg/800px-Face_sapa14.jpg&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIuxmU8gQTsGopAZ4vwtFKzDDf-0TlgFlWlYAMb5-iAfrZhcphR3nEGPksRVIzJNNN6SnKIlD9iR3tkSx41j3qXUCs2PNUNCYBYmgMjsrsm7q5nlzmDNu1xES_m3FkJJ3kmikKMUerdVFN/s1600-h/face.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIuxmU8gQTsGopAZ4vwtFKzDDf-0TlgFlWlYAMb5-iAfrZhcphR3nEGPksRVIzJNNN6SnKIlD9iR3tkSx41j3qXUCs2PNUNCYBYmgMjsrsm7q5nlzmDNu1xES_m3FkJJ3kmikKMUerdVFN/s200/face.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217989745217179314&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;To find the histogram of the image:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-style: italic;&quot;&gt;&lt;br /&gt;Change the directory where the image is saved.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;img = imread(&#39;face.jpg&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-style: italic;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;// plot histogram&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;gsval=[];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;pixelnum=[];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;counter=1;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;for i=0:1:255&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;[x,y]=find(img==i);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;gsval(counter)=i;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;pixelnum(counter)=length(x);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;counter = counter+1;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;end;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;scf(1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;plot(gsval,pixelnum);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;// puts the titles&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;xtitle( &#39;Histogram&#39;) ;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;This will show&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfkMekbcUSEoT27wFU48nhUp91uE_Q4PTREIkXTT-zKwXRU3AMXWDli81_Va6PYTMIkQRE9Hqa9DxQGMaC1fxn_X4k5yEMzN9MkXxzXdiETQgHMTO2eaYHOUxNLw5tHPhya_o4QZfFd7Kn/s1600-h/hist1.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfkMekbcUSEoT27wFU48nhUp91uE_Q4PTREIkXTT-zKwXRU3AMXWDli81_Va6PYTMIkQRE9Hqa9DxQGMaC1fxn_X4k5yEMzN9MkXxzXdiETQgHMTO2eaYHOUxNLw5tHPhya_o4QZfFd7Kn/s320/hist1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217987293543036882&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Note: x-axis is the grayscale values and the y-axis is the number of pixels.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;It ii show in the histogram that the grayscale values is well spread in the image.&lt;br /&gt;&lt;br /&gt;After finding the histogram, we can find the probability distribution function (PDF). PDF can be find by normalizing the pixel values of the histogram. After finding the PDF, we will find the cumulative distribution function (CDF).&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;To find the PDF (normalized histogram) and CDF&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;//plot PDF&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;a = gsval;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;b = pixelnum;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;c = size(img,1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;d = size(img,2);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;e = c.*d&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;f = b/e;&lt;br /&gt;scf(2);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;plot(a,f);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;g = cumsum(f);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;xtitle (&#39;Normalized Histogram&#39;)&lt;/span&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCxBv6rRAOlxafrT2g_zncr8XawvYglbQYyXD2MvGFBlGNlQLlSgoNHNQa6fpdXb69GhyIfGp-UBZKGdnOxiw41IRRWlIwYPXZ0aFgPvIfdIMiZf8_dEXDz4PKqWCXbXi2x77N1iAgD2MM/s1600-h/nhist1.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCxBv6rRAOlxafrT2g_zncr8XawvYglbQYyXD2MvGFBlGNlQLlSgoNHNQa6fpdXb69GhyIfGp-UBZKGdnOxiw41IRRWlIwYPXZ0aFgPvIfdIMiZf8_dEXDz4PKqWCXbXi2x77N1iAgD2MM/s320/nhist1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217988048765066098&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Note: x-axis is the grayscale image and the y-axis is the normalized number of pixels.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;//plot CDF&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;scf(3);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;plot(a,g);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153); font-style: italic;&quot;&gt;xtitle(&#39;CDF&#39;);&lt;/span&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf42OXMyfbwt6U0KkWUjwS2meTkanGwM1b3XR31h-_IWcE3R-91WTXupEczca5A9Upox6wN4prZnUUYdPQelCIAkRaeNlFR6nVAfL_aj2euvKRaKW-4CLJtrPtSow0p_kGRqoxd8bMHmZj/s1600-h/cdf.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf42OXMyfbwt6U0KkWUjwS2meTkanGwM1b3XR31h-_IWcE3R-91WTXupEczca5A9Upox6wN4prZnUUYdPQelCIAkRaeNlFR6nVAfL_aj2euvKRaKW-4CLJtrPtSow0p_kGRqoxd8bMHmZj/s320/cdf.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217988887407743762&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Note: x-axis is the grayscale values while y-axis is the cumulative sum of the normalized number of pixels.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;________________________________________________________&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;Then the next thing to do is the Back Projection of the Image&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;//Back Projection&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;gray = [];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;for ii = 1:1:size(img,1)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;for jj = 1:1:size(img,2)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;gray(ii,jj) = g(img(ii,jj));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imwrite(gray, &#39;gray.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;After back projection,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjK7ndu0S5w0OAhlsGK_UKsI-oFeJJvxTnjp-v0_mZGTjA-YR7twtUk6XIWz2J0XTk0Z9vUxMExtMTI_CZcleVuwXhlWM9iWi3_GvK3lvdqnh8xn2W3klYvMBO1RXI3ML7hxLebwoQJbsL/s1600-h/gray.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjK7ndu0S5w0OAhlsGK_UKsI-oFeJJvxTnjp-v0_mZGTjA-YR7twtUk6XIWz2J0XTk0Z9vUxMExtMTI_CZcleVuwXhlWM9iWi3_GvK3lvdqnh8xn2W3klYvMBO1RXI3ML7hxLebwoQJbsL/s200/gray.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217989918381987810&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjK7ndu0S5w0OAhlsGK_UKsI-oFeJJvxTnjp-v0_mZGTjA-YR7twtUk6XIWz2J0XTk0Z9vUxMExtMTI_CZcleVuwXhlWM9iWi3_GvK3lvdqnh8xn2W3klYvMBO1RXI3ML7hxLebwoQJbsL/s1600-h/gray.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjK7ndu0S5w0OAhlsGK_UKsI-oFeJJvxTnjp-v0_mZGTjA-YR7twtUk6XIWz2J0XTk0Z9vUxMExtMTI_CZcleVuwXhlWM9iWi3_GvK3lvdqnh8xn2W3klYvMBO1RXI3ML7hxLebwoQJbsL/s200/gray.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217989918381987810&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Then we will find the histogram and the CDF of the new image.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;// New Histogram&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;im = imread(&#39;gray.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;gval=[];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;pnum=[];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;count=1;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;for i=0:1:255&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;[x1,y1]=find(im==i);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;gval(count)=i;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;pnum(count)=length(x1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;count = count+1; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;end;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(4);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;plot(gval,pnum);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xtitle(&#39;Histogram&#39;);&lt;/span&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnE403XKtl9u5Vy40BxuhwlnD4mv3dT0pPAZDY-JhtM14xvHLFJR4LXDDhNxjslj7HjQxaLrJvSkaTrxSM1puNnIKVgX3O09d4F26gjjvOeaV5rWQKPOQFQ7XIxM8eQSUItkRVBEi9Ap0f/s1600-h/hist2.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnE403XKtl9u5Vy40BxuhwlnD4mv3dT0pPAZDY-JhtM14xvHLFJR4LXDDhNxjslj7HjQxaLrJvSkaTrxSM1puNnIKVgX3O09d4F26gjjvOeaV5rWQKPOQFQ7XIxM8eQSUItkRVBEi9Ap0f/s320/hist2.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217990258623814546&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Note: x-axis is the grayscale values and the y-axis is the number of pixels.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;// New PDF and CDF&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;//plot PDF&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;h = gval;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;i = pnum;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;j = size(im,1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;k = size(im,2);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;l = j.*k;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;m = i/l;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;plot(h,m);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;xtitle(&#39;Normalized Histogram&#39;)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjevqb1XIwAybHSO84e81_lCUr-6eXsBGS2qoQxEfj4wEGrGG7WER3qXjkYy7V84LzGHCTjJ1bKF5uIVNuOQPEBwtXDcLHqKWMtKTYQbCNNTX-btkAHXa5NifiGg5GAz8f0d64mPHqskSj5/s1600-h/nhist2.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjevqb1XIwAybHSO84e81_lCUr-6eXsBGS2qoQxEfj4wEGrGG7WER3qXjkYy7V84LzGHCTjJ1bKF5uIVNuOQPEBwtXDcLHqKWMtKTYQbCNNTX-btkAHXa5NifiGg5GAz8f0d64mPHqskSj5/s320/nhist2.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217990851125859026&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Note: x-axis is the grayscale image and the y-axis is the normalized number of pixels.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;//plot new CDF&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;n= cumsum(m);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;scf(5);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;plot(h,n);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;xtitle(&#39; CDF&#39;);&lt;/span&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjiJtwsnS_LCv-_uG3hJdAdX73LyjVWd8tst_sw9XIWXrsdx8_VVC6ceXvYc_BshKAXz4vmiy0G1vJf-jfzoJjEr9QQdFuzJyoAb6VUy71N3ubU5mbXFXJ9hBpSbpZqsgeN87eeZLCmIPO/s1600-h/cdf2.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjiJtwsnS_LCv-_uG3hJdAdX73LyjVWd8tst_sw9XIWXrsdx8_VVC6ceXvYc_BshKAXz4vmiy0G1vJf-jfzoJjEr9QQdFuzJyoAb6VUy71N3ubU5mbXFXJ9hBpSbpZqsgeN87eeZLCmIPO/s320/cdf2.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217991163529496530&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Note: x-axis is the grayscale values while y-axis is the cumulative sum of the normalized number of pixels.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;After finding the PDF and CDF of the new image. These plots show that the new image has a good contrast.&lt;br /&gt;&lt;br /&gt;_________________________________________________________&lt;br /&gt;&lt;br /&gt;The next task is to remap the CDF of the grayscale image to find the desired CDF.&lt;br /&gt;&lt;img src=&quot;file:///C:/Users/gabz/AppData/Local/Temp/moz-screenshot.jpg&quot; alt=&quot;&quot; /&gt;&lt;img src=&quot;file:///C:/Users/gabz/AppData/Local/Temp/moz-screenshot-1.jpg&quot; alt=&quot;&quot; /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgngMSntLYLHerCXcn_ubel8AACG3C0qhXXNKG3Da7zT3RDsOBK5zP64AQs9g2-8zqy6xJNYB1PhiP_7sKl_AowGlz9cLemNnZw5BMO-dGRTO_rOre7MKeQdxeVv3Up9lsRwmBwYpl_7pFg/s1600-h/Untitled.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgngMSntLYLHerCXcn_ubel8AACG3C0qhXXNKG3Da7zT3RDsOBK5zP64AQs9g2-8zqy6xJNYB1PhiP_7sKl_AowGlz9cLemNnZw5BMO-dGRTO_rOre7MKeQdxeVv3Up9lsRwmBwYpl_7pFg/s320/Untitled.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217992232338905906&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;I used the function&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;G = 0.5*[tanh(6*((Z-128)/255))+1]&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;where Z = [0:255]&lt;/span&gt;&lt;br /&gt;The graph of this function is our desired CDF&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT6xEYLDOGOWHq72ihojHdfCsWjLlioSul1-YAsr-Xgz8t3IqixUJ8P5scxXjpUFC4juzz7aNZBuE9Td77P2o2xLbgFadB_mtDhaAnbu2MiWChXfP37oI5sVQ2VzSeT328hlEyLPnYVhIQ/s1600-h/desiredcdf.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT6xEYLDOGOWHq72ihojHdfCsWjLlioSul1-YAsr-Xgz8t3IqixUJ8P5scxXjpUFC4juzz7aNZBuE9Td77P2o2xLbgFadB_mtDhaAnbu2MiWChXfP37oI5sVQ2VzSeT328hlEyLPnYVhIQ/s320/desiredcdf.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217993235963114418&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Applying the function by interpolation.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;Z = [0:255];&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;G = tanh(6.*(Z-128)./255);&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;G = (G+1)/2;&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;A = interp1(a,g,img);&lt;/span&gt; &lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;graynew = interp1(G,Z,A);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 0, 153);&quot;&gt;imshow(graynew, [0 255]);&lt;/span&gt;&lt;br /&gt;The final image is&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXUVoLno_Zx9gj8yWHzC33Z2wrLgrRwxMocs7VezP_UTJ22iGw-36LAXq33kTBD8mwJajtVOkyK6G831QinaT27j94zEKP8oK9TN7Tum-szI-NKRZPYUjmH6Jfmyiq-TTubTgPl3z52ssa/s1600-h/face3.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXUVoLno_Zx9gj8yWHzC33Z2wrLgrRwxMocs7VezP_UTJ22iGw-36LAXq33kTBD8mwJajtVOkyK6G831QinaT27j94zEKP8oK9TN7Tum-szI-NKRZPYUjmH6Jfmyiq-TTubTgPl3z52ssa/s200/face3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217993911961145186&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;We then find the histogram, PDF and CDF using same commands we used in finding the histogram, PDF and CDF of the original image.&lt;br /&gt;Histogram:&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDuu92oi1R0uM7FLSqfxY68VJB7CMwb_gfncV1y65qYz4FAiOAyjrn5bK62y2IIO02zLt2gF7oJjHtVJF1B6nhAZcFcItQgOvW0TzMWipBq41srpkvfrI4hmasvW-Ce6yj3JiOnLILT2jT/s1600-h/hist3.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDuu92oi1R0uM7FLSqfxY68VJB7CMwb_gfncV1y65qYz4FAiOAyjrn5bK62y2IIO02zLt2gF7oJjHtVJF1B6nhAZcFcItQgOvW0TzMWipBq41srpkvfrI4hmasvW-Ce6yj3JiOnLILT2jT/s320/hist3.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217996412668321010&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Note: x-axis is the grayscale values and the y-axis is the number of pixels.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;PDF:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs4YbvzmmbMAzL2_jOcYZQDqvJfGXdrJPHOTEyQrPnBdLuszB7pT9q34PzaIaCUA9Sv8V3FuQmJtRoEZf5AyXarNlR0HpBRP9pI3M5s2gYfRdXhuL4S0gS8Y7VSV0rGBLd9ygYFrOnzgm2/s1600-h/nhist3.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs4YbvzmmbMAzL2_jOcYZQDqvJfGXdrJPHOTEyQrPnBdLuszB7pT9q34PzaIaCUA9Sv8V3FuQmJtRoEZf5AyXarNlR0HpBRP9pI3M5s2gYfRdXhuL4S0gS8Y7VSV0rGBLd9ygYFrOnzgm2/s320/nhist3.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217996811938509954&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Note: x-axis is the grayscale image and the y-axis is the normalized number of pixels.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;CDF:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdifNDjFrD2lxKJWD9HVTCt0hgMPtWHia9qH2OJu4pCIIMN20Cv-8mJULCL4NIuRIJ1RMDjqTin7IbqepNW97xTF_4VVK8ze2zXA8__p44Gnci73SctIeaz397Hc_oCHnT4wmHK75ZqNeY/s1600-h/cdf3.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdifNDjFrD2lxKJWD9HVTCt0hgMPtWHia9qH2OJu4pCIIMN20Cv-8mJULCL4NIuRIJ1RMDjqTin7IbqepNW97xTF_4VVK8ze2zXA8__p44Gnci73SctIeaz397Hc_oCHnT4wmHK75ZqNeY/s320/cdf3.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217996971982805698&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Note: x-axis is the grayscale values while y-axis is the cumulative sum of the normalized number of pixels.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Comparing the three images:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjK7ndu0S5w0OAhlsGK_UKsI-oFeJJvxTnjp-v0_mZGTjA-YR7twtUk6XIWz2J0XTk0Z9vUxMExtMTI_CZcleVuwXhlWM9iWi3_GvK3lvdqnh8xn2W3klYvMBO1RXI3ML7hxLebwoQJbsL/s1600-h/gray.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjK7ndu0S5w0OAhlsGK_UKsI-oFeJJvxTnjp-v0_mZGTjA-YR7twtUk6XIWz2J0XTk0Z9vUxMExtMTI_CZcleVuwXhlWM9iWi3_GvK3lvdqnh8xn2W3klYvMBO1RXI3ML7hxLebwoQJbsL/s200/gray.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217989918381987810&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjK7ndu0S5w0OAhlsGK_UKsI-oFeJJvxTnjp-v0_mZGTjA-YR7twtUk6XIWz2J0XTk0Z9vUxMExtMTI_CZcleVuwXhlWM9iWi3_GvK3lvdqnh8xn2W3klYvMBO1RXI3ML7hxLebwoQJbsL/s1600-h/gray.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjK7ndu0S5w0OAhlsGK_UKsI-oFeJJvxTnjp-v0_mZGTjA-YR7twtUk6XIWz2J0XTk0Z9vUxMExtMTI_CZcleVuwXhlWM9iWi3_GvK3lvdqnh8xn2W3klYvMBO1RXI3ML7hxLebwoQJbsL/s200/gray.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217989918381987810&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdw-a_en4g7kUeygJFXJ9j4tyXN4v6579FbKBL567ZIaFJbzAkFqMGp8GyoOOHlJ5VgXoxs3ltNV0RcVBtqG6T9SpLCSFtIJboEGzjGM1jf02dbIat-sPNrwF9w_Jd2EJaO7__r-HcczHj/s1600-h/face3.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdw-a_en4g7kUeygJFXJ9j4tyXN4v6579FbKBL567ZIaFJbzAkFqMGp8GyoOOHlJ5VgXoxs3ltNV0RcVBtqG6T9SpLCSFtIJboEGzjGM1jf02dbIat-sPNrwF9w_Jd2EJaO7__r-HcczHj/s200/face3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5217996203620941490&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The last image is darker than the other two but I think that the middle image has the best contrast. This is also based on the PDF and CDF of the images.&lt;br /&gt;&lt;br /&gt;Acknowledgements:&lt;br /&gt;Julie D.&lt;br /&gt;Ed&lt;br /&gt;Beth&lt;br /&gt;Angel&lt;br /&gt;Aiyin&lt;br /&gt;for helping me and answering my questions.&lt;br /&gt;&lt;br /&gt;Grade :&lt;br /&gt;10/10, because I did my best and I enhanced the original image.</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/2097215806812192429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/2097215806812192429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/2097215806812192429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/2097215806812192429'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/06/a4-enhancement-by-histogram.html' title='A4 – Enhancement by Histogram Manipulation'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIuxmU8gQTsGopAZ4vwtFKzDDf-0TlgFlWlYAMb5-iAfrZhcphR3nEGPksRVIzJNNN6SnKIlD9iR3tkSx41j3qXUCs2PNUNCYBYmgMjsrsm7q5nlzmDNu1xES_m3FkJJ3kmikKMUerdVFN/s72-c/face.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-5290418899032116261</id><published>2008-06-24T11:05:00.009+08:00</published><updated>2008-06-27T19:29:48.822+08:00</updated><title type='text'>A3 - Image Types and Basic Image Enhancement</title><content type='html'>&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;PART 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;There are 4 types of images&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;1. True Color&lt;/span&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;Image&lt;/span&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKf7N4y6fH9KFyDbdny-K7uHBGxjrAyhrOlm_IMo67dETcP9qEOGb4HecvBdCsMPXXIUQc1bgG2nDT2MKZ7XeX6wS0va-1BtIVZteNTmwZ8ULiiqoTX8OYdQah9d7g7cDzSHJsUXedvKK4/s1600-h/flower1.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKf7N4y6fH9KFyDbdny-K7uHBGxjrAyhrOlm_IMo67dETcP9qEOGb4HecvBdCsMPXXIUQc1bgG2nDT2MKZ7XeX6wS0va-1BtIVZteNTmwZ8ULiiqoTX8OYdQah9d7g7cDzSHJsUXedvKK4/s320/flower1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5215824215295899330&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;photo from: www.cssnz.org/flower.jpg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using the command in Scilab&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; imfinfo (&#39;flower1.jpg&#39;)&lt;/span&gt;&lt;br /&gt;shows the following results&lt;br /&gt;&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 162pt;&quot; width=&quot;216&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 108pt;&quot; width=&quot;144&quot;&gt;  &lt;col style=&quot;width: 54pt;&quot; width=&quot;72&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt; width: 108pt;&quot; width=&quot;144&quot; height=&quot;17&quot;&gt;File   Name&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-left: medium none; width: 54pt;&quot; width=&quot;72&quot;&gt;flower1.jpg&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;File Size&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;3348&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;File Format&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;jpeg&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;Width&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;115&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;Height&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;118&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;Depth&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;8&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;Storage Type&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;truecolor&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;Number of   Colors&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;0&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;Resolution   Unit&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;centimeter&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;X Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;0&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; height: 12.75pt;&quot; height=&quot;17&quot;&gt;Y Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;border-top: medium none; border-left: medium none;&quot;&gt;0&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Using the properties in Windows&lt;table style=&quot;border-collapse: collapse; width: 227pt;&quot; width=&quot;302&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 173pt;&quot; width=&quot;230&quot;&gt;  &lt;col style=&quot;width: 54pt;&quot; width=&quot;72&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt; width: 173pt;&quot; width=&quot;230&quot; height=&quot;17&quot;&gt;Width&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;width: 54pt;&quot; width=&quot;72&quot;&gt;115&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Height&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;118&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Horizontal Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;96 dpi&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Vertical Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;96 dpi&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Bit Depth&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;24&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;2. Gray Scale image&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-aJVDhbL-Euls94aLYZytJD88mpUsjwEaZB9b1HWMVp__79H5P9cJFnRbCmkgyBK_aqKCi1AFOlYV6ljYaauJWtJHbUh-0wu4k6WHx8GVLtjha6FCFcOyyoGx3ZNrE0pTWFriKPt-wGkO/s1600-h/flower2.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-aJVDhbL-Euls94aLYZytJD88mpUsjwEaZB9b1HWMVp__79H5P9cJFnRbCmkgyBK_aqKCi1AFOlYV6ljYaauJWtJHbUh-0wu4k6WHx8GVLtjha6FCFcOyyoGx3ZNrE0pTWFriKPt-wGkO/s320/flower2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5215825349861219634&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;photo from: digital-photography-school.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using the command in Scilab&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; imfinfo (&#39;flower2.jpg&#39;)&lt;/span&gt;&lt;br /&gt;shows the following results&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 205pt;&quot; width=&quot;273&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 149pt;&quot; width=&quot;198&quot;&gt;  &lt;col style=&quot;width: 56pt;&quot; width=&quot;75&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt; width: 149pt;&quot; width=&quot;198&quot; height=&quot;17&quot;&gt;File   Name&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;width: 56pt;&quot; width=&quot;75&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;flower2.jpg&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;File Size&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;4225&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;File Format&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;JPEG&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Width&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;120&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Height&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;120&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Depth&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;8&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Storage Type&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;indexed&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Number of Colors&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;256&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Resolution Unit&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;inch&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;X Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;76&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 13.5pt;&quot; height=&quot;18&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 13.5pt;&quot; height=&quot;18&quot;&gt;Y Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;76&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Using the properties in Windows&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 205pt;&quot; width=&quot;273&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 149pt;&quot; width=&quot;198&quot;&gt;  &lt;col style=&quot;width: 56pt;&quot; width=&quot;75&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt; width: 149pt;&quot; width=&quot;198&quot; height=&quot;17&quot;&gt;Width&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;width: 56pt;&quot; width=&quot;75&quot;&gt;120&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Height&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;120&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Horizontal Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;72 dpi&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Vertical Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;72 dpi&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Bit Depth&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;8&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;3.&lt;span style=&quot;font-weight: bold;&quot;&gt;Indexed Image&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGGXGqFFZvEP6FVxjwgKDirmOiSNj2NJyEYLyLH_5OFq4bLmBQEFf0wDo_cEyfrtdb7tRFW3Zd6CTKO2EplOLyeDY2LX40YlQiGAYbN9CloWcJKMCp0nKfreei5W_Us6cM0_JU548MhtIY/s1600-h/flower3.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGGXGqFFZvEP6FVxjwgKDirmOiSNj2NJyEYLyLH_5OFq4bLmBQEFf0wDo_cEyfrtdb7tRFW3Zd6CTKO2EplOLyeDY2LX40YlQiGAYbN9CloWcJKMCp0nKfreei5W_Us6cM0_JU548MhtIY/s320/flower3.bmp&quot; alt=&quot;&quot; iLOGG&quot;BLOGGER_PHOTO_ID_5215826034117100194&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;photo from:www.digitalphotoartistry.com/rose1.jpg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using the command in Scilab&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; imfinfo (&#39;flower3.bmp&#39;)&lt;/span&gt;&lt;br /&gt;shows the following results  &lt;table style=&quot;border-collapse: collapse; width: 227pt;&quot; width=&quot;303&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 153pt;&quot; width=&quot;204&quot;&gt;  &lt;col style=&quot;width: 74pt;&quot; width=&quot;99&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt; width: 153pt;&quot; width=&quot;204&quot; height=&quot;17&quot;&gt;File   Name&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;width: 74pt;&quot; width=&quot;99&quot;&gt;flower3.bmp&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;File Size&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;16306&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;File Format&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;bmp&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Width&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;106&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Height&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;141&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Depth&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;8&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Storage Type&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;indexed&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Number of Colors&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;256&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Resolution Unit&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;centimeter&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;X Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt; 28.350000&lt;br /&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 13.5pt;&quot; height=&quot;18&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 13.5pt;&quot; height=&quot;18&quot;&gt;Y Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;28.350000&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Using the properties in Windows&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 227pt;&quot; width=&quot;303&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 153pt;&quot; width=&quot;204&quot;&gt;  &lt;col style=&quot;width: 74pt;&quot; width=&quot;99&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt; width: 153pt;&quot; width=&quot;204&quot; height=&quot;17&quot;&gt;Width&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;width: 74pt;&quot; width=&quot;99&quot;&gt;106&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Height&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;141&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Bit Depth&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;8&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;4. &lt;span style=&quot;font-weight: bold;&quot;&gt;Binary Image&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIHCW2A9OBoQzJu1vcMuQ-MyrE7bPphKqBdV9F7jLkAP2G7AMa1opGGtNEhUPjtkCaPuFgkV4WG3xfH905fGjqEVqILwUyT7Gdt3b_-gfb_JWmATeIumdnNJchHzb4GDqEru54O1ZGCl9n/s1600-h/flower4.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIHCW2A9OBoQzJu1vcMuQ-MyrE7bPphKqBdV9F7jLkAP2G7AMa1opGGtNEhUPjtkCaPuFgkV4WG3xfH905fGjqEVqILwUyT7Gdt3b_-gfb_JWmATeIumdnNJchHzb4GDqEru54O1ZGCl9n/s320/flower4.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5215826802091410146&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;photo from:www.botany.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using the command in Scilab&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; imfinfo (&#39;flower4.bmp&#39;)&lt;/span&gt;&lt;br /&gt;shows the following results&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 230pt;&quot; width=&quot;306&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 151pt;&quot; width=&quot;201&quot;&gt;  &lt;col style=&quot;width: 79pt;&quot; width=&quot;105&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt; width: 151pt;&quot; width=&quot;201&quot; height=&quot;17&quot;&gt;File   Name&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;width: 79pt;&quot; width=&quot;105&quot;&gt;flower4.bmp&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;File Size&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;1550&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;File Format&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;bmp&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Width&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;124&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Height&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;93&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Depth&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;8&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Storage Type&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;indexed&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Number of Colors&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;2&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Resolution Unit&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;centimeter&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;X Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt; 28.350000&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 13.5pt;&quot; height=&quot;18&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 13.5pt;&quot; height=&quot;18&quot;&gt;Y Resolution&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt; 28.350000&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Using the properties in Windows&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; width: 307px; height: 54px;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;col style=&quot;width: 151pt;&quot; width=&quot;201&quot;&gt;  &lt;col style=&quot;width: 79pt;&quot; width=&quot;105&quot;&gt;  &lt;tbody&gt;&lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt; width: 151pt;&quot; width=&quot;201&quot; height=&quot;17&quot;&gt;Width&lt;/td&gt;   &lt;td class=&quot;xl65&quot; style=&quot;width: 79pt;&quot; width=&quot;105&quot;&gt;124&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Height&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;93&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;   &lt;td class=&quot;xl65&quot; style=&quot;height: 12.75pt;&quot; height=&quot;17&quot;&gt;Bit Depth&lt;/td&gt;   &lt;td class=&quot;xl65&quot;&gt;1&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;PART 2:&lt;/span&gt;&lt;br /&gt;This part of the activity is concerned with our scanned image.&lt;br /&gt;Cambodian money( c/o Anthony Amarra)&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8EtLtFNW7wSgZ9RFPe03uWu1TST0OcUJltxOq58AFklQLOWnnNBt2wzSWzZseiXVBNBjKXl6yPOrhF96cCnL94ssELbVvl8jwYyQ1kbQTCMc_bY7Ht0hIczLuA9erliZLJFNQVospgfQv/s1600-h/gray_2.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8EtLtFNW7wSgZ9RFPe03uWu1TST0OcUJltxOq58AFklQLOWnnNBt2wzSWzZseiXVBNBjKXl6yPOrhF96cCnL94ssELbVvl8jwYyQ1kbQTCMc_bY7Ht0hIczLuA9erliZLJFNQVospgfQv/s320/gray_2.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5215827917018193634&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;I cropped the image so that the rulers will not be included in reading the area of the scanned image.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijUCmCwZc3SWjbqZOZz_URba9hn9bkkgIICxSTiT5NsZhyE5k5c3dH_uDsfXFLcD13pRCQePdzhtiGB9_ezJFlKwg_thjuvoFRBjbkrmfiHf3Xbe0L8lprBS8vZfJSlf1zF4QlQ6SDDFur/s1600-h/gray2.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijUCmCwZc3SWjbqZOZz_URba9hn9bkkgIICxSTiT5NsZhyE5k5c3dH_uDsfXFLcD13pRCQePdzhtiGB9_ezJFlKwg_thjuvoFRBjbkrmfiHf3Xbe0L8lprBS8vZfJSlf1zF4QlQ6SDDFur/s320/gray2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5215828340730755730&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Using&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;image = imread(&#39;gray2.jpg&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;imfinfo(&#39;gray2.jpg&#39;) &lt;/span&gt;&lt;br /&gt;shows the following properties&lt;br /&gt;FileName: gray2.jpg&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;FileSize: 20680&lt;br /&gt;Format: JPEG&lt;br /&gt;Width: 422&lt;br /&gt;Height: 201&lt;br /&gt;Depth: 8&lt;br /&gt;StorageType: indexed&lt;br /&gt;NumberOfColors: 256&lt;br /&gt;ResolutionUnit: inch&lt;br /&gt;XResolution: 96.000000&lt;br /&gt;YResolution: 96.000000&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Using the command&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;histplot ([0:1:255], image)&lt;/span&gt;&lt;br /&gt;We find the histogram of the image&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYOKsMoQUSymelKGAqZ9nF33AvGAT_coFl3i3x6PAHP4AawYgIVbT8Zlflv2SazM7xUTx93rE1VPtBGhbjx0cthGulIWC-fRYlWWvKFNSwRPOfn6APiybaPS2C1whbIkYcfLMRp-SaQAyR/s1600-h/bmp.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYOKsMoQUSymelKGAqZ9nF33AvGAT_coFl3i3x6PAHP4AawYgIVbT8Zlflv2SazM7xUTx93rE1VPtBGhbjx0cthGulIWC-fRYlWWvKFNSwRPOfn6APiybaPS2C1whbIkYcfLMRp-SaQAyR/s320/bmp.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5216118963900001282&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;From the histogram we can say that the image is low in contrast.&lt;br /&gt;We can also check the histogram and threshold by using imageJ.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV1XWM0K4ChP-h3-uenkRjbV_RpSKr4r8LUUo9rMY0Iz80ZMLtRjhqUFg5anm-mutG2TIZos9rxAJ5ejbUx4y9Mlfg5c6HkLUE6yg-YFPJU49gOFbHKbBoEIg0jAXhR5sQkViLSbhNIVW7/s1600-h/histo&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV1XWM0K4ChP-h3-uenkRjbV_RpSKr4r8LUUo9rMY0Iz80ZMLtRjhqUFg5anm-mutG2TIZos9rxAJ5ejbUx4y9Mlfg5c6HkLUE6yg-YFPJU49gOFbHKbBoEIg0jAXhR5sQkViLSbhNIVW7/s320/histo&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5215840255613646162&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;We can also find the histogram using the following commands:&lt;br /&gt;-&lt;span style=&quot;font-style: italic;&quot;&gt;-&gt;gsval=[]&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;pixelnum=[]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;counter=1;&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;for i=0:1:255&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;[x,y]=find(image==i);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;gsval(counter)=i;&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;pixelnum(counter)=length(x);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;counter = counter+1;&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;end;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;plot(gsval,pixelnum);&lt;/span&gt;&lt;br /&gt;This will show the image below:&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAQplLdPZEGA_S1IKKMVQm0BFIMSQY74FIOn0SRhIJSwPwwQyE2x9tbWh7U1VGQ-bHz1BrPmtAlG2Ak0o8WHyyY1yKR25Pzebh5veBZQzBpKvYyEsv12EuJoOCy4No8plCumzysVsRIrnO/s1600-h/hi.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAQplLdPZEGA_S1IKKMVQm0BFIMSQY74FIOn0SRhIJSwPwwQyE2x9tbWh7U1VGQ-bHz1BrPmtAlG2Ak0o8WHyyY1yKR25Pzebh5veBZQzBpKvYyEsv12EuJoOCy4No8plCumzysVsRIrnO/s320/hi.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5216106498210908402&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Using the histogram, i find the best threshold is at 189 or 74.117647% of 255. I used this threshold to convert the image to binary&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;bw = im2bw(image,0.74117647);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; imshow(bw,2) &lt;/span&gt;&lt;br /&gt;It shows the image below&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8j50mkxU1t9yT0bodQ0STvc42Hl_d-he0QGqenJmRBzL8dy5mceKzoYjHUojYgCDSwG7MuPDdktjSwuS24axsuO-PAbP9zWpDBDKSRZwY-1VsOJJgiH19lrhu63HHlX3IJ2d6ZXVg61H6/s1600-h/gray3.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8j50mkxU1t9yT0bodQ0STvc42Hl_d-he0QGqenJmRBzL8dy5mceKzoYjHUojYgCDSwG7MuPDdktjSwuS24axsuO-PAbP9zWpDBDKSRZwY-1VsOJJgiH19lrhu63HHlX3IJ2d6ZXVg61H6/s320/gray3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5215830929504030082&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Inverting the image using the commands,&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; binary = abs(bw-1);&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; imshow (binary)&lt;/span&gt;&lt;br /&gt;shows the image below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOzguwrhQODZO10aUIknB3XoFbCGntjKXF7_LHKaUANITMZlffkIGWBdr7-By3iq4AqSgv8UuWzkKJFs0XdBAIE4bciBdgVK9YJBdzi6QO7Jq9WAc0MXrb244SFuaEAgYj-nybHbsQdMpV/s1600-h/gray5.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOzguwrhQODZO10aUIknB3XoFbCGntjKXF7_LHKaUANITMZlffkIGWBdr7-By3iq4AqSgv8UuWzkKJFs0XdBAIE4bciBdgVK9YJBdzi6QO7Jq9WAc0MXrb244SFuaEAgYj-nybHbsQdMpV/s320/gray5.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5216110934097483922&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Using the commands, in the previous activity, to find the area&lt;br /&gt;--&lt;span style=&quot;font-style: italic;&quot;&gt;&gt;[x,y] = follow(binary);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;size(x)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;ans  =&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;   924.    1.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;size(y)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;ans  =&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;   924.    1.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;x_2(1) = x(924) ;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;x_2(2:924) = x(1:923);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;y_2(1) = y(924) ;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;y_2(2:924) = y(1:923);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;area=0.5*sum(x.*y_2-y.*x_2)&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; Area = abs(area)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Area  =&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; 84200.         &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The experimental value for area is &lt;span style=&quot;font-weight: bold;&quot;&gt;84200 square pixels.&lt;/span&gt;&lt;br /&gt;The theoretical value for area is ( 419 x 199)&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;83381 square pixels.&lt;/span&gt; This can be solve by pixel counting&lt;br /&gt;The percent error is &lt;span style=&quot;font-weight: bold;&quot;&gt;0.9822%.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Acknowledgments:&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;JULIE D.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;ED&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;BETH&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;AIYIN&lt;/span&gt;&lt;br /&gt;- for answering some of my questions&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;JORGE&lt;/span&gt;&lt;br /&gt;- for the histplot&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;JERIC&lt;/span&gt;&lt;br /&gt;- for the histogram code&lt;br /&gt;&lt;br /&gt;GRADE:&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;10/10&lt;/span&gt; because I did my best in this activity and the error is acceptable.</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/5290418899032116261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/5290418899032116261' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5290418899032116261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5290418899032116261'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/06/part-1-there-are-4-types-of-images-1.html' title='A3 - Image Types and Basic Image Enhancement'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKf7N4y6fH9KFyDbdny-K7uHBGxjrAyhrOlm_IMo67dETcP9qEOGb4HecvBdCsMPXXIUQc1bgG2nDT2MKZ7XeX6wS0va-1BtIVZteNTmwZ8ULiiqoTX8OYdQah9d7g7cDzSHJsUXedvKK4/s72-c/flower1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-5355858391740409121</id><published>2008-06-19T10:58:00.005+08:00</published><updated>2008-06-19T11:41:14.798+08:00</updated><title type='text'>A2 = Area estimation of images</title><content type='html'>Using the sip toolbox in the scilab program, we have can view images.&lt;br /&gt;&lt;br /&gt;We open the scilab program then we open the sip toolbox but we encounter error in the imagemagick path so we type command so that we can use sip toolbox.&lt;br /&gt;The commands used are:&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;chdir(ImageMAgickPath);&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;link(CORE_RL_Magick_.dll);&lt;/span&gt;&lt;br /&gt;after entering this command, we can use the sip toolbox.&lt;br /&gt;&lt;br /&gt;I first studied how to insert images in the sip toolbox. I first changed the directory using the command&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;chdir (&#39;C:\Documents and Settings\AP186user13\My Documents\My Pictures&#39;).&lt;/span&gt;&lt;br /&gt;After changing the directory, I can now read the image using sip tool box.&lt;br /&gt;To read the image, I used the commands&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;image = imread(&#39;square.bmp&#39;);&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;xbasc();&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;imshow(image);&lt;/span&gt;&lt;br /&gt;Then, the image is shown in the sip graphic window. This image(which is binary) will appear&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMV6oKyFXX1Emc2qKWiDa8HkiUjnBPH4-wZFqh8JxKvY2m4G5JqiDerl_Ojo5Z1nQSkNB1Pk9f9UDRfMWcSQ38tkuOBc0P66k4RvLwyk25QWx_mZovGzXT6gC5JTA-T4ZfhdZxKjyXklTJ/s1600-h/square.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMV6oKyFXX1Emc2qKWiDa8HkiUjnBPH4-wZFqh8JxKvY2m4G5JqiDerl_Ojo5Z1nQSkNB1Pk9f9UDRfMWcSQ38tkuOBc0P66k4RvLwyk25QWx_mZovGzXT6gC5JTA-T4ZfhdZxKjyXklTJ/s320/square.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5213424701872384978&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Now, i am ready to use &quot;follow&quot; and find the area of the image using scilab.&lt;br /&gt;I enter the following commands to find the area of the square.&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; [x,y] = follow(image);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; size(x);(the size of x is 584)&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt; size(y); (the size of y is 584)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; x2(1) = x(584) ;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; x2(2:584) = x(1:583);&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;y2(1) = y(584) ;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;y2(2:584) = y(1:583);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; area=0.5*sum(x.*y2-y.*x2);&lt;/span&gt;&lt;br /&gt;area = 21316.&lt;br /&gt;The dimensions of the square is 148x148. Therefore the theoretical value of the square is 21904.&lt;br /&gt;The error from the value at the scilab to the value of the theoretical is 2.69%.&lt;br /&gt;&lt;br /&gt;For the second, rectangle&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfb10s3PxY617CU5tO1WTUnchchmYlnzWXG1HWsVL8vp779b0SThg3BgUXUFk3Ao5RNsf3-DIiNxuiKic3hjwJALQi4tCRUJTQhtx-6sFcIt_EeiGMfincTU62uImP15vlITfxoGQpNrRx/s1600-h/rectangle.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfb10s3PxY617CU5tO1WTUnchchmYlnzWXG1HWsVL8vp779b0SThg3BgUXUFk3Ao5RNsf3-DIiNxuiKic3hjwJALQi4tCRUJTQhtx-6sFcIt_EeiGMfincTU62uImP15vlITfxoGQpNrRx/s320/rectangle.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5213429220037591586&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Using the same commands as the square,&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;image = imread(&#39;rectangle.bmp&#39;);&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;xbasc();&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;imshow(image);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; [x,y] = follow(image);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; size(x);(the size of x is 510)&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt; size(y); (the size of y is 510)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; x2(1) = x(510) ;&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt; x2(2:510) = x(1:509);&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;y2(1) = y(510) ;&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;y2(2:510) = y(1:509);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; area=0.5*sum(x.*y2-y.*x2);&lt;/span&gt;&lt;br /&gt;area = 14534.&lt;br /&gt;we find the scilab value of area to be 14534 and the theoretical to be 14960. Therefore the error is 2.84%.&lt;br /&gt;&lt;br /&gt;For the third image,&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUDVJrHK0q_0-v4xD_AQNsnUuHNSPr3oFc4xx1Na0OHuDzv2BGfhA5Am8O-4EXhiRhckw9LpUrl1A8T-bjTY001fx32OD6hDrhqmJYZWUWwM2JTCD1lx-FtxKLJhXsikcv2ON0NMtdLCxg/s1600-h/circle.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUDVJrHK0q_0-v4xD_AQNsnUuHNSPr3oFc4xx1Na0OHuDzv2BGfhA5Am8O-4EXhiRhckw9LpUrl1A8T-bjTY001fx32OD6hDrhqmJYZWUWwM2JTCD1lx-FtxKLJhXsikcv2ON0NMtdLCxg/s320/circle.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5213431797614352034&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Using the same commands.&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;image = imread(&#39;circle.bmp&#39;);&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;xbasc();&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;imshow(image);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; [x,y] = follow(image);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; size(x);(the size of x is 548)&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt; size(y); (the size of y is 548)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; x2(1) = x(548) ;&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt; x2(2:548) = x(1:547);&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;--&gt;y2(1) = y(548) ;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt;y2(2:548) = y(1:547);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;--&gt; area=0.5*sum(x.*y2-y.*x2);&lt;/span&gt;&lt;br /&gt;area = 29477&lt;br /&gt;The scilab value of area is 29477. While the theoretical(having a radius of 97) is 29599. The error is 0.02%.&lt;br /&gt;&lt;br /&gt;Acknowledgements...&lt;br /&gt;Beth, for answering all my questions...&lt;br /&gt;Lei, for helping me with the commands...&lt;br /&gt;&lt;br /&gt;I will give myself a grade of 10/10.&lt;br /&gt;&lt;br /&gt;Good day.</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/5355858391740409121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/5355858391740409121' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5355858391740409121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/5355858391740409121'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/06/a2-area-estimation-of-images.html' title='A2 = Area estimation of images'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMV6oKyFXX1Emc2qKWiDa8HkiUjnBPH4-wZFqh8JxKvY2m4G5JqiDerl_Ojo5Z1nQSkNB1Pk9f9UDRfMWcSQ38tkuOBc0P66k4RvLwyk25QWx_mZovGzXT6gC5JTA-T4ZfhdZxKjyXklTJ/s72-c/square.bmp" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5775070589527721226.post-3593693238329749155</id><published>2008-06-12T09:04:00.003+08:00</published><updated>2008-06-16T15:22:37.181+08:00</updated><title type='text'>A1-Digital Scanning</title><content type='html'>&lt;span style=&quot;color: rgb(0, 0, 0);font-family:arial;&quot; &gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;Using the scanned handwritten graph found in the College of Science Library.&lt;br /&gt;from &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;  style=&quot;text-align: justify; color: rgb(0, 0, 0);font-family:times new roman;&quot;&gt;Title: Electrolytic Determinations &amp;amp; Separations with the Use of a Rotating Anode.&lt;span style=&quot;font-family:times new roman;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;  style=&quot;text-align: justify; color: rgb(0, 0, 0);font-family:times new roman;&quot;&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;Reference: J. Langness, The Journal of the American Chemical Soc. &lt;/span&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;29&lt;/span&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;, 459-472  (1907).&lt;/span&gt; &lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuIcsIaGF0P4PO9LhNNjFoJzbq_dqBwnqzQTrAKKfa8rqKgn4UtyqDxj4dumVZSR1ALPekt3PXqFmQBhv-S0rbOZxnMiZ8GxEnhvff-vUMRkadLyCCQY4jZNF5d1cWKy2KpGvXLjGx1d3f/s1600-h/1.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 152px; height: 271px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuIcsIaGF0P4PO9LhNNjFoJzbq_dqBwnqzQTrAKKfa8rqKgn4UtyqDxj4dumVZSR1ALPekt3PXqFmQBhv-S0rbOZxnMiZ8GxEnhvff-vUMRkadLyCCQY4jZNF5d1cWKy2KpGvXLjGx1d3f/s320/1.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5210820500914720466&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;For x-axis, the major grid is 2 and for the y-axis the major grid is 0.05.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;span style=&quot;color: rgb(0, 0, 0);font-family:arial;&quot; &gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;I have found out that the pixel values for x a&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);font-family:arial;&quot; &gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;nd y are 60.75 and 58.16667 respectively. Finding the pixel locations of each point includin&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);font-family:arial;&quot; &gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;g the origin we have found the following data.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a style=&quot;color: rgb(0, 0, 0);&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaxtfd6daOl-Y3GJ3oD3ICNzdSxpp0n4La855lbX9sMqzwLkZXK59OkkYS6byAUaXPvz5s57MqCuQP2WPK6fyMyuSEUIFYQ9H090aijs1t30FsA8h7WuCMkhAs35WxOZqe1yG3GGyXWBF1/s1600-h/data.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 357px; height: 90px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaxtfd6daOl-Y3GJ3oD3ICNzdSxpp0n4La855lbX9sMqzwLkZXK59OkkYS6byAUaXPvz5s57MqCuQP2WPK6fyMyuSEUIFYQ9H090aijs1t30FsA8h7WuCMkhAs35WxOZqe1yG3GGyXWBF1/s320/data.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5210820823037267682&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0);font-family:times new roman;&quot; &gt;The second and third columns are the pixel locations of the data points. The fourth and fifth columns are the points when the pixel location of a data is  subtracted to the pixel location of the origin. However, in the x-axis I use the absolute value.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);font-family:times new roman;&quot; &gt;The last two columns are the ratio of the x and y. We multiply the value of the major grid to the value of the pixel location and divide it by the pixel value. For example, data point 1(x-axis)&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;text-align: center; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;(2*30)/60.75 = 0.987654&lt;/span&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Finding the ratio for all points in x and y and plotting it in excel.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs78W1fGa5pss1AYKsHyjRs9zAwArgFZTQJwJrxBGZU9fkDUDF-6h9dwLR1WuXzvqWDNw3EFlekTSEchJPJTgQfYMA8syOyWmCjLiVOch-j7adPmbFXDB6M3LbV7E_KL9R_dj4GqMvMnoC/s1600-h/graph.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs78W1fGa5pss1AYKsHyjRs9zAwArgFZTQJwJrxBGZU9fkDUDF-6h9dwLR1WuXzvqWDNw3EFlekTSEchJPJTgQfYMA8syOyWmCjLiVOch-j7adPmbFXDB6M3LbV7E_KL9R_dj4GqMvMnoC/s320/graph.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5210823103664901874&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Comparing the two graphs,&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnqwg1g11APndmWvpM7hbSFyEBH4AN7Y_voUzNeP04d47tQa6P657_8QTTIBBM2q0LVUYDqIECXu7ugX-OPRj8lglpIJTFcJhDLqutYMI9OvyxX7VWeAVUosS_h1rcY14YiToYfphc5sEL/s1600-h/1.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnqwg1g11APndmWvpM7hbSFyEBH4AN7Y_voUzNeP04d47tQa6P657_8QTTIBBM2q0LVUYDqIECXu7ugX-OPRj8lglpIJTFcJhDLqutYMI9OvyxX7VWeAVUosS_h1rcY14YiToYfphc5sEL/s200/1.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5210825221083778850&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBRiT1rR-O-HdgnU4b-kItKrfWqY9j9H_qFsLbynlNpWGRP99ENnDvoZupmFskILovPJzsTBLp_XhK3g3qd-8bMhDtHQm3kKNipKoDKy9nEOggw83Ly2gFb2HweSLi8rEFSFNwsxc3eqxF/s1600-h/graph.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBRiT1rR-O-HdgnU4b-kItKrfWqY9j9H_qFsLbynlNpWGRP99ENnDvoZupmFskILovPJzsTBLp_XhK3g3qd-8bMhDtHQm3kKNipKoDKy9nEOggw83Ly2gFb2HweSLi8rEFSFNwsxc3eqxF/s200/graph.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5210823958363393810&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have found out that the graphs are almost the same. But because of human error of looking at the exact value of the data points, the graph will look like this.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPss3gM34PbQbGhNoo1m7XIzbJXVHL02MjYt98Y2p-XaAOJFVY5k1GkWvYHEKG1t9tzaUGlk_Xt7LQjQZUC4C6gbkd59v3s4InAIo3XsNodsi3R_vYZsLb4HJ6Wom3l8Le5afyTcOECTTv/s1600-h/3.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPss3gM34PbQbGhNoo1m7XIzbJXVHL02MjYt98Y2p-XaAOJFVY5k1GkWvYHEKG1t9tzaUGlk_Xt7LQjQZUC4C6gbkd59v3s4InAIo3XsNodsi3R_vYZsLb4HJ6Wom3l8Le5afyTcOECTTv/s320/3.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5210831642059886402&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I made some errors but I still did my best so I will give myself 10/10...&lt;br /&gt;&lt;br /&gt;Credits to:&lt;br /&gt;&lt;br /&gt;Elizabeth Ann Prieto for scanning the images and for answering some of my questions... :D&lt;br /&gt;Good day.. :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anarix186.blogspot.com/feeds/3593693238329749155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5775070589527721226/3593693238329749155' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/3593693238329749155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5775070589527721226/posts/default/3593693238329749155'/><link rel='alternate' type='text/html' href='http://anarix186.blogspot.com/2008/06/a1-digital-scanning.html' title='A1-Digital Scanning'/><author><name>anarica</name><uri>http://www.blogger.com/profile/08325550679175462730</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV8avlCLGTHwsb22EoIXg-5et8dw8W8iBLpVoAwht76RpQFZ6dxyoTt7sMQ_6zmxPqi8HswEnTMYmFJVFFYRsMfwSOuI_ISPoRCkn21aFvKtF1OhEczMHjECAORQAK33U/s220/12082461101375.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuIcsIaGF0P4PO9LhNNjFoJzbq_dqBwnqzQTrAKKfa8rqKgn4UtyqDxj4dumVZSR1ALPekt3PXqFmQBhv-S0rbOZxnMiZ8GxEnhvff-vUMRkadLyCCQY4jZNF5d1cWKy2KpGvXLjGx1d3f/s72-c/1.JPG" height="72" width="72"/><thr:total>1</thr:total></entry></feed>