<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8991473534494862708</id><updated>2011-07-09T04:51:49.024+09:00</updated><title type='text'>(NOT) An Introduction to SHIFT-JIS Programming</title><subtitle type='html'>アール先輩のAP１８６ブラグサイトへようこそ -- There are plenty of ways to do it, but here's how I do it. Fresh from the world of coffee percolators (it better not be decaf..), I'm surprised to actually see myself imaging image systems.. xD</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-9161319497812573952</id><published>2009-10-11T17:11:00.013+09:00</published><updated>2009-10-11T21:21:16.300+09:00</updated><title type='text'>終わりだ　(Activity # 19)</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGc3qQ4aDI/AAAAAAAAAmE/KKB77CRGFSc/s1600-h/dc2-nanaka+%287%29.jpg"&gt;&lt;img style="cursor: pointer; width: 240px; height: 180px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGc3qQ4aDI/AAAAAAAAAmE/KKB77CRGFSc/s320/dc2-nanaka+%287%29.jpg" alt="" id="BLOGGER_PHOTO_ID_5391262708991027250" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Activity # 19 - Restoration of Blurred Images.. this is the last of the AP 186 activities which means this sem is finally over.. well, not quite but at least it's almost done. xD&lt;br /&gt;&lt;br /&gt;In this activity, our objective would be to restore an image corrupted by a blurring function and some noise. This entire activity can be summarized in the form of a flowchart:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGUX8V4pEI/AAAAAAAAAkM/S1ybWgRkYYo/s1600-h/flow.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 125px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGUX8V4pEI/AAAAAAAAAkM/S1ybWgRkYYo/s320/flow.jpg" alt="" id="BLOGGER_PHOTO_ID_5391253367995016258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In simple terms, just as the objective states, we start by taking an image, then we give it a blur by introducing a blurring function and adding a noise in the Fourier domain, and then finally restoring it using a Minimum Square Error Filter.&lt;br /&gt;&lt;br /&gt;Since the equation for a blurred image with T as the length of exposure is defined by the equation:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGVqhLsP5I/AAAAAAAAAkU/GhMYshBBCak/s1600-h/blur.jpg"&gt;&lt;img style="cursor: pointer; width: 289px; height: 55px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGVqhLsP5I/AAAAAAAAAkU/GhMYshBBCak/s320/blur.jpg" alt="" id="BLOGGER_PHOTO_ID_5391254786633645970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;for adding a blur, the degradation function would then be expressed as (also in terms of T):&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGVq7oeLVI/AAAAAAAAAkc/O849LDJM2Go/s1600-h/blur2.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 68px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGVq7oeLVI/AAAAAAAAAkc/O849LDJM2Go/s320/blur2.jpg" alt="" id="BLOGGER_PHOTO_ID_5391254793733680466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;As for the noise, we make use of the Gaussian Noise that was &lt;a href="http://aru-sempai.blogspot.com/2009/09/activity-18.html"&gt;already discussed in the previous activity&lt;/a&gt;. The operations are performed in the Fourier domain and is described by the following equation:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGVrLvmrAI/AAAAAAAAAkk/sV5u-I0el4E/s1600-h/fourier.jpg"&gt;&lt;img style="cursor: pointer; width: 257px; height: 44px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGVrLvmrAI/AAAAAAAAAkk/sV5u-I0el4E/s320/fourier.jpg" alt="" id="BLOGGER_PHOTO_ID_5391254798058564610" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The filter used for the activity is the Weiner Filter or the &lt;span style="font-style: italic;"&gt;minimum mean square error &lt;/span&gt;filter given by either this&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGZlI9DfoI/AAAAAAAAAlM/tP5qEhWm0iI/s1600-h/weiner2.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 62px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGZlI9DfoI/AAAAAAAAAlM/tP5qEhWm0iI/s320/weiner2.jpg" alt="" id="BLOGGER_PHOTO_ID_5391259092276969090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;or this&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGXIdSs3FI/AAAAAAAAAks/WtUDFi4NAdQ/s1600-h/weiner.jpg"&gt;&lt;img style="cursor: pointer; width: 241px; height: 67px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGXIdSs3FI/AAAAAAAAAks/WtUDFi4NAdQ/s320/weiner.jpg" alt="" id="BLOGGER_PHOTO_ID_5391256400497007698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;where K is a constant (alternative when Sn and Sf are unknown).&lt;br /&gt;&lt;br /&gt;So that's practically all the physics you'll ever need for the activity--what we need to do now is apply those equations to a test image. For this activity, the I grabbed a &lt;a href="http://www.gibson.com/en-us/Lifestyle/Features/Legendary%20Guitar_%20The%20Saga%20of/"&gt;photo of Eric Clapton with 'The Fool' guitar from Gibson's site&lt;/a&gt;:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGXlTus57I/AAAAAAAAAk0/E4LA8ODZsag/s1600-h/claptonfoolguitar.jpg"&gt;&lt;img style="cursor: pointer; width: 300px; height: 226px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGXlTus57I/AAAAAAAAAk0/E4LA8ODZsag/s320/claptonfoolguitar.jpg" alt="" id="BLOGGER_PHOTO_ID_5391256896146302898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The blurred image generated by the degradation function looks like this:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGYhrqqQ3I/AAAAAAAAAk8/opgZCjdAIxI/s1600-h/a1_b1_T1.jpg"&gt;&lt;img style="cursor: pointer; width: 300px; height: 225px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGYhrqqQ3I/AAAAAAAAAk8/opgZCjdAIxI/s320/a1_b1_T1.jpg" alt="" id="BLOGGER_PHOTO_ID_5391257933363954546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Now, since there are two equations for the filter, we therefore have two reconstructions for the image: one using Sn and Sf (Left) and another one using K=0.01 (Right).&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGaByYqjCI/AAAAAAAAAlc/zLnxuUr6lUs/s1600-h/snsf_reconstruction.jpg"&gt;&lt;img style="cursor: pointer; width: 160px; height: 120px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGaByYqjCI/AAAAAAAAAlc/zLnxuUr6lUs/s320/snsf_reconstruction.jpg" alt="" id="BLOGGER_PHOTO_ID_5391259584434965538" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGaBpai8DI/AAAAAAAAAlU/M5gan6RcpiQ/s1600-h/kpt01_reconstruction.jpg"&gt; &lt;img style="cursor: pointer; width: 160px; height: 121px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGaBpai8DI/AAAAAAAAAlU/M5gan6RcpiQ/s320/kpt01_reconstruction.jpg" alt="" id="BLOGGER_PHOTO_ID_5391259582026936370" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We can see that we have a better image using the Sn and Sf reconstruction. However, we can observe the following trend for various K's (K=1, K=0.1, K=0.01 and K=0.001 respectively:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGbgCOzWYI/AAAAAAAAAlk/57lIabawr1U/s1600-h/k1_reconstruction.jpg"&gt;&lt;img style="cursor: pointer; width: 90px; height: 67px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGbgCOzWYI/AAAAAAAAAlk/57lIabawr1U/s320/k1_reconstruction.jpg" alt="" id="BLOGGER_PHOTO_ID_5391261203596269954" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGbgqyIVlI/AAAAAAAAAls/vDPIMJoME_c/s1600-h/kpt1_reconstruction.jpg"&gt;&lt;img style="cursor: pointer; width: 90px; height: 67px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGbgqyIVlI/AAAAAAAAAls/vDPIMJoME_c/s320/kpt1_reconstruction.jpg" alt="" id="BLOGGER_PHOTO_ID_5391261214481864274" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGbg27KcUI/AAAAAAAAAl0/kIPJmh_i-ss/s1600-h/kpt01_reconstruction.jpg"&gt;&lt;img style="cursor: pointer; width: 90px; height: 67px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/StGbg27KcUI/AAAAAAAAAl0/kIPJmh_i-ss/s320/kpt01_reconstruction.jpg" alt="" id="BLOGGER_PHOTO_ID_5391261217740976450" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGbhXKKZGI/AAAAAAAAAl8/jLONleBF4N0/s1600-h/kpt0001_reconstruction.jpg"&gt;&lt;img style="cursor: pointer; width: 90px; height: 67px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGbhXKKZGI/AAAAAAAAAl8/jLONleBF4N0/s320/kpt0001_reconstruction.jpg" alt="" id="BLOGGER_PHOTO_ID_5391261226393822306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;From the set, we can infer that K approaching integer values is biased towards the blur, while small values of K are biased towards the noise. On a side note, the optimal value is hence in between K=0.1 and K=0.001.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;This activity was rather easy compared to the other activities, so I'll give myself a &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;. I'd like to acknowledge Neil for his help in this activity.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-9161319497812573952?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/9161319497812573952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/10/activity-19.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/9161319497812573952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/9161319497812573952'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/10/activity-19.html' title='終わりだ　(Activity # 19)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_n3LhpZXYr_g/StGc3qQ4aDI/AAAAAAAAAmE/KKB77CRGFSc/s72-c/dc2-nanaka+%287%29.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-7961078558769057421</id><published>2009-10-11T11:56:00.014+09:00</published><updated>2009-10-11T17:57:33.085+09:00</updated><title type='text'>AP186のアクチヴィチ１３が、完了した!! (Activity # 13)</title><content type='html'>This is probably the most difficult (if not tedious) activity in AP 186. This activity (Activity # 13) is entitled Correcting Geometric Distortions.&lt;br /&gt;&lt;br /&gt;Since a camera uses a lens to focus an image to its sensor, lens distortions can be observed. For spherical lenses, there are two common types: Barrel Distortion and Pin Cushion Distortion. Here are the examples for each kind (c/o &lt;a href="http://www.imagetrendsinc.com/products/specpage_hemi.asp"&gt;imagetrendsinc.com&lt;/a&gt;):&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StFLG5ET6NI/AAAAAAAAAi0/2q9MKZz1XFA/s1600-h/tech_hemi_08.jpg"&gt;&lt;img style="cursor: pointer; width: 150px; height: 146px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/StFLG5ET6NI/AAAAAAAAAi0/2q9MKZz1XFA/s320/tech_hemi_08.jpg" alt="" id="BLOGGER_PHOTO_ID_5391172810709395666" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StFLHfPJ4YI/AAAAAAAAAi8/WuHh6ceCulo/s1600-h/tech_hemi_09.jpg"&gt; &lt;img style="cursor: pointer; width: 150px; height: 142px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/StFLHfPJ4YI/AAAAAAAAAi8/WuHh6ceCulo/s320/tech_hemi_09.jpg" alt="" id="BLOGGER_PHOTO_ID_5391172820955423106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;In order to correct the distortion, we need a reference image with a regularly occuring pattern and visuallize the distortion across the image frame. If we let &lt;span style="font-style: italic;"&gt;f(x,y) &lt;/span&gt;be the correct ideal image, and &lt;span style="font-style: italic;"&gt;g(x,y)&lt;/span&gt; be the distorted image, we can assume that there exists a transformation function that mapped &lt;span style="font-style: italic;"&gt;f(x,y)&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;g(x',y')&lt;/span&gt;:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGCJoVOVKI/AAAAAAAAAjE/mpBIVupxTa8/s1600-h/mapping.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 134px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGCJoVOVKI/AAAAAAAAAjE/mpBIVupxTa8/s320/mapping.jpg" alt="" id="BLOGGER_PHOTO_ID_5391233330896065698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The aim would be to invert the transformation in order to obtain our ideal image. Two image properties will be corrected in the process: the pixel locations, and their respective graylevel values.&lt;br /&gt;&lt;br /&gt;We start by expressing x'=r(x,y) and y'=s(x,y), where r and s are the transformation functions used to map the ideal image to the distorted image frame. It is good to assume that these functions take the form of bilinear functions, r(x,y) = c1*x+c2*y+c3*xy+c4 and s(x,y) = c5*x+c6*y+c7*xy+c8.&lt;br /&gt;&lt;br /&gt;That's basically the physics of this activity as the rest of the steps would make use of matrix manipulations. First, I obtained a barrel-distorted image from &lt;a href="http://www.imatest.com/docs/images/distortion_radcorr_image.jpg"&gt;imatest.com&lt;/a&gt; and cropped it to get this image:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGEL7Izt-I/AAAAAAAAAjM/tVVlueyCd0o/s1600-h/distortion_radcorr_image.jpg"&gt;&lt;img style="cursor: pointer; width: 148px; height: 145px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGEL7Izt-I/AAAAAAAAAjM/tVVlueyCd0o/s320/distortion_radcorr_image.jpg" alt="" id="BLOGGER_PHOTO_ID_5391235569327257570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;It's cropped for two reasons: one, this activity aims to demonstrate the concepts used in geometric distortion correction and thus a large grid is not advisable; two, since Scilab works faster with small matrices or images. Notice that the centered square on the grid features the least amount of distortion and our ideal grid was generated from the dimensions of that square. Here are the pixel locations of the points of intersection of the distorted and ideal grids respectively:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGE87DBprI/AAAAAAAAAjc/qlDkaxjMKYk/s1600-h/di_grid.bmp"&gt;&lt;img style="cursor: pointer; width: 147px; height: 148px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGE87DBprI/AAAAAAAAAjc/qlDkaxjMKYk/s320/di_grid.bmp" alt="" id="BLOGGER_PHOTO_ID_5391236411116594866" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGE8eUy3PI/AAAAAAAAAjU/BOGt5H7osRc/s1600-h/id_grid.bmp"&gt;&lt;img style="cursor: pointer; width: 147px; height: 148px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGE8eUy3PI/AAAAAAAAAjU/BOGt5H7osRc/s320/id_grid.bmp" alt="" id="BLOGGER_PHOTO_ID_5391236403406494962" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;After obtaining the pixel coordinates for the ideal image, we then solve for the coefficients c1 to c8 by setting up the following matrices for each square (thus making the procedure similar to a moving averages run):&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGFuqOwYII/AAAAAAAAAjk/pnppXU1fUJ4/s1600-h/coeffs.jpg"&gt;&lt;img style="cursor: pointer; width: 231px; height: 271px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGFuqOwYII/AAAAAAAAAjk/pnppXU1fUJ4/s320/coeffs.jpg" alt="" id="BLOGGER_PHOTO_ID_5391237265595850882" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;and solving for the coefficients using the following equations:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGPDKSDAPI/AAAAAAAAAjs/DVLxA1XbqHk/s1600-h/coeffs2.jpg"&gt;&lt;img style="cursor: pointer; width: 251px; height: 35px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGPDKSDAPI/AAAAAAAAAjs/DVLxA1XbqHk/s320/coeffs2.jpg" alt="" id="BLOGGER_PHOTO_ID_5391247513401622770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Once the coefficients are obtained, we get the corresponding pixel locations from our distorted image using the set of transformation equations listed above (x' = r(x,y) = c1*x+c2*y+c3*xy+c4 and y' = s(x,y) = c5*x+c6*y+c7*xy+c8) and map out these pixel coordinates to the ideal image map. For the points in the ideal image plane with no corresponding point from the distorted image, we use interpolation methods (bilinear or nearest neighbor) to obtain their grayscale values. Since I practically patterned out my interpolation routine from Gilbert's source (by the way, Gilbert helped me to get this thing working after we consulted Mandy several times), please refer to his &lt;a href="http://gilbert-ap186.blogspot.com/2009/08/activity-13-correcting-geometric.html"&gt;source&lt;/a&gt; for the interpolation part.&lt;br /&gt;&lt;br /&gt;Here are the results I obtained from this activity:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGQqCHMnxI/AAAAAAAAAj0/hfebs_UkMcc/s1600-h/distortion_radcorr_image.jpg"&gt;&lt;img style="cursor: pointer; width: 120px; height: 118px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGQqCHMnxI/AAAAAAAAAj0/hfebs_UkMcc/s320/distortion_radcorr_image.jpg" alt="" id="BLOGGER_PHOTO_ID_5391249280735158034" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGQqUgxtmI/AAAAAAAAAj8/97aVxmP_BTc/s1600-h/bi_grid.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 117px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGQqUgxtmI/AAAAAAAAAj8/97aVxmP_BTc/s320/bi_grid.bmp" alt="" id="BLOGGER_PHOTO_ID_5391249285674284642" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGQq8IlUkI/AAAAAAAAAkE/c_GVWwVyiF4/s1600-h/nn_grid.bmp"&gt; &lt;img style="cursor: pointer; width: 120px; height: 117px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGQq8IlUkI/AAAAAAAAAkE/c_GVWwVyiF4/s320/nn_grid.bmp" alt="" id="BLOGGER_PHOTO_ID_5391249296310227522" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The images above are for the original image, the bilinearly-interpolated image and the image for nearest neighbor interpolation. Although the image was not fully restored, the bilinearly-interpolated image has better quality than the nearest neighbor-interpolated image.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGdM_2lRPI/AAAAAAAAAmM/UGXqLJ--8Yk/s1600-h/1196722783513.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/StGdM_2lRPI/AAAAAAAAAmM/UGXqLJ--8Yk/s320/1196722783513.jpg" alt="" id="BLOGGER_PHOTO_ID_5391263075563554034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Once again, I'd like to acknowledge Gilbert and Mandy for helping me in getting my version of the source to work. I'm getting a 9 for this activity.. minus one for the delay but &lt;span style="font-weight: bold;"&gt;9&lt;/span&gt; for finishing it anyway.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/StGQqUgxtmI/AAAAAAAAAj8/97aVxmP_BTc/s1600-h/bi_grid.bmp"&gt; &lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-7961078558769057421?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/7961078558769057421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/10/ap186-activity-13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/7961078558769057421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/7961078558769057421'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/10/ap186-activity-13.html' title='AP186のアクチヴィチ１３が、完了した!! (Activity # 13)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_n3LhpZXYr_g/StFLG5ET6NI/AAAAAAAAAi0/2q9MKZz1XFA/s72-c/tech_hemi_08.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-573746087082970272</id><published>2009-09-21T21:25:00.019+09:00</published><updated>2009-10-11T17:56:48.592+09:00</updated><title type='text'>日本人彼女募集中。（Activity # 18)</title><content type='html'>This activity is entitled 'Noise Models and Basic Image Restoration.' It introduced me to the different noise models, and the filters to use whenever they're encountered in real life (not likely). As usual, although this activity will orient the reader on the different image restoration techniques, the best advice is still to start off with a good image--one that doesn't need restoration in the first place. The second best advice would be to use Photoshop--that's why, this post and Scilab with SIPtoolbox should come as a last resort (after Matlab).&lt;br /&gt;&lt;br /&gt;The original test image and its pdf looks like this:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srgxfp7qfuI/AAAAAAAAAiM/-_Xqe8r99YQ/s1600-h/image.bmp"&gt;&lt;img style="cursor: pointer; width: 180px; height: 180px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srgxfp7qfuI/AAAAAAAAAiM/-_Xqe8r99YQ/s320/image.bmp" alt="" id="BLOGGER_PHOTO_ID_5384107774423236322" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrgxgGAfW1I/AAAAAAAAAiU/Q0er8zHcNyE/s1600-h/image_pdf.bmp"&gt;&lt;img style="cursor: pointer; width: 180px; height: 180px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrgxgGAfW1I/AAAAAAAAAiU/Q0er8zHcNyE/s320/image_pdf.bmp" alt="" id="BLOGGER_PHOTO_ID_5384107781959670610" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Different Types of Noise&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrdxILPGfkI/AAAAAAAAAdk/o5Y6q-7nfXU/s1600-h/exponential_noise.jpg"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrdxILPGfkI/AAAAAAAAAdk/o5Y6q-7nfXU/s320/exponential_noise.jpg" alt="" id="BLOGGER_PHOTO_ID_5383896264813739586" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrdxIt-EAJI/AAAAAAAAAds/oHgYRPQTnGg/s1600-h/gamma_noise.jpg"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrdxIt-EAJI/AAAAAAAAAds/oHgYRPQTnGg/s320/gamma_noise.jpg" alt="" id="BLOGGER_PHOTO_ID_5383896274137514130" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrdxIxIgy7I/AAAAAAAAAd0/yyWdExA5sFM/s1600-h/gaussian_noise.jpg"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrdxIxIgy7I/AAAAAAAAAd0/yyWdExA5sFM/s320/gaussian_noise.jpg" alt="" id="BLOGGER_PHOTO_ID_5383896274986650546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrguJwqENmI/AAAAAAAAAhc/PZBhi9mF7Qo/s1600-h/exponential_pdf.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrguJwqENmI/AAAAAAAAAhc/PZBhi9mF7Qo/s320/exponential_pdf.bmp" alt="" id="BLOGGER_PHOTO_ID_5384104099736467042" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrguKYXsi2I/AAAAAAAAAhk/DQoP82VeDPA/s1600-h/gamma_pdf.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrguKYXsi2I/AAAAAAAAAhk/DQoP82VeDPA/s320/gamma_pdf.bmp" alt="" id="BLOGGER_PHOTO_ID_5384104110396836706" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrguK_PCWTI/AAAAAAAAAhs/31s6fl3kXVg/s1600-h/gaussian_pdf.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrguK_PCWTI/AAAAAAAAAhs/31s6fl3kXVg/s320/gaussian_pdf.bmp" alt="" id="BLOGGER_PHOTO_ID_5384104120829499698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrguJnI8qXI/AAAAAAAAAhU/TDp3YyLWa-0/s1600-h/rayleigh.jpg"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrguJnI8qXI/AAAAAAAAAhU/TDp3YyLWa-0/s320/rayleigh.jpg" alt="" id="BLOGGER_PHOTO_ID_5384104097181641074" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrdxJWLNItI/AAAAAAAAAd8/HVgMlWTxouc/s1600-h/salt_pepper_noise.jpg"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrdxJWLNItI/AAAAAAAAAd8/HVgMlWTxouc/s320/salt_pepper_noise.jpg" alt="" id="BLOGGER_PHOTO_ID_5383896284930056914" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrdxJ0afoYI/AAAAAAAAAeE/eJ3oZkrxJ8Y/s1600-h/uniform_noise.jpg"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrdxJ0afoYI/AAAAAAAAAeE/eJ3oZkrxJ8Y/s320/uniform_noise.jpg" alt="" id="BLOGGER_PHOTO_ID_5383896293047247234" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrguLX3cV4I/AAAAAAAAAh0/rRFurFf-mC0/s1600-h/rayleigh_pdf.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrguLX3cV4I/AAAAAAAAAh0/rRFurFf-mC0/s320/rayleigh_pdf.bmp" alt="" id="BLOGGER_PHOTO_ID_5384104127441426306" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srgvc6KLTSI/AAAAAAAAAh8/bnmAe73Lzjg/s1600-h/saltpepper_pdf.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srgvc6KLTSI/AAAAAAAAAh8/bnmAe73Lzjg/s320/saltpepper_pdf.bmp" alt="" id="BLOGGER_PHOTO_ID_5384105528216210722" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SrgvdK0MoQI/AAAAAAAAAiE/N0RShdQaFTc/s1600-h/uniform_pdf.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 120px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SrgvdK0MoQI/AAAAAAAAAiE/N0RShdQaFTc/s320/uniform_pdf.bmp" alt="" id="BLOGGER_PHOTO_ID_5384105532687425794" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In the activity, we were given six image models, as well as the equations needed for the models to act on the probability distribution function (refer to Activity 3) of the image. These noise models are: Exponential Noise, Gamma Noise, Gaussian Noise, Salt-and-Pepper Noise, Uniform Noise and Rayleigh Noise. Note that I listed them in the order the sample images above are arranged, except for Rayleigh Noise. (Rayleigh noise is currently in the works.)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;While there are six noise models, only four filters were given for us to examine. These filters are: Arithmetic Mean, Geometric Mean, Harmonic Mean and Contra-harmonic Mean.&lt;br /&gt;&lt;br /&gt;Exponential Noise&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrdzJTcvF2I/AAAAAAAAAes/V0v2Zw5xF8M/s1600-h/desu_exp_am.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrdzJTcvF2I/AAAAAAAAAes/V0v2Zw5xF8M/s320/desu_exp_am.bmp" alt="" id="BLOGGER_PHOTO_ID_5383898483221534562" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrdyLutqWnI/AAAAAAAAAeU/GtsiNMgUvIg/s1600-h/desu_exp_gm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrdyLutqWnI/AAAAAAAAAeU/GtsiNMgUvIg/s320/desu_exp_gm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383897425388395122" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrdyMLFDXkI/AAAAAAAAAec/K2m_6qSmymQ/s1600-h/desu_exp_hm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrdyMLFDXkI/AAAAAAAAAec/K2m_6qSmymQ/s320/desu_exp_hm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383897433002696258" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrdyMZRP5iI/AAAAAAAAAek/4DEnJYjgxwg/s1600-h/desu_exp_cm-2.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SrdyMZRP5iI/AAAAAAAAAek/4DEnJYjgxwg/s320/desu_exp_cm-2.bmp" alt="" id="BLOGGER_PHOTO_ID_5383897436811945506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Gamma Noise&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/Srdz2MkAZQI/AAAAAAAAAe0/dQLFqhcxY14/s1600-h/desu_gam_am.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/Srdz2MkAZQI/AAAAAAAAAe0/dQLFqhcxY14/s320/desu_gam_am.bmp" alt="" id="BLOGGER_PHOTO_ID_5383899254467093762" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srdz2VF4uKI/AAAAAAAAAe8/p2QOSNeLqHo/s1600-h/desu_gam_gm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srdz2VF4uKI/AAAAAAAAAe8/p2QOSNeLqHo/s320/desu_gam_gm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383899256756680866" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srdz20RugPI/AAAAAAAAAfE/cafIzglhFKg/s1600-h/desu_gam_hm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srdz20RugPI/AAAAAAAAAfE/cafIzglhFKg/s320/desu_gam_hm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383899265127842034" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srdz3RewB-I/AAAAAAAAAfM/kGq2vtevpnI/s1600-h/desu_gam_cm-2.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srdz3RewB-I/AAAAAAAAAfM/kGq2vtevpnI/s320/desu_gam_cm-2.bmp" alt="" id="BLOGGER_PHOTO_ID_5383899272967096290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Gaussian Noise&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srd0mOEZPBI/AAAAAAAAAfU/9VL7avZv0oA/s1600-h/desu_gau_am.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srd0mOEZPBI/AAAAAAAAAfU/9VL7avZv0oA/s320/desu_gau_am.bmp" alt="" id="BLOGGER_PHOTO_ID_5383900079505095698" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd0mq6dbLI/AAAAAAAAAfc/5qPM55jPWJE/s1600-h/desu_gau_gm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd0mq6dbLI/AAAAAAAAAfc/5qPM55jPWJE/s320/desu_gau_gm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383900087248055474" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Srd0nEQ6EKI/AAAAAAAAAfs/sQFF992s7SQ/s1600-h/desu_gau_hm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Srd0nEQ6EKI/AAAAAAAAAfs/sQFF992s7SQ/s320/desu_gau_hm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383900094053093538" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd0mwc8P3I/AAAAAAAAAfk/Nkc0xIAzIeY/s1600-h/desu_gau_cm-2.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd0mwc8P3I/AAAAAAAAAfk/Nkc0xIAzIeY/s320/desu_gau_cm-2.bmp" alt="" id="BLOGGER_PHOTO_ID_5383900088734859122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Rayleigh Noise&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrgsS2eyeqI/AAAAAAAAAg0/6DhGzTdSRgk/s1600-h/desu_ray_am.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SrgsS2eyeqI/AAAAAAAAAg0/6DhGzTdSRgk/s320/desu_ray_am.bmp" alt="" id="BLOGGER_PHOTO_ID_5384102056895347362" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrgsTfTtCBI/AAAAAAAAAg8/sxUwYsakH1g/s1600-h/desu_ray_gm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrgsTfTtCBI/AAAAAAAAAg8/sxUwYsakH1g/s320/desu_ray_gm.bmp" alt="" id="BLOGGER_PHOTO_ID_5384102067854706706" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SrgsT5lZIUI/AAAAAAAAAhE/bDgY-x5heI0/s1600-h/desu_ray_hm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SrgsT5lZIUI/AAAAAAAAAhE/bDgY-x5heI0/s320/desu_ray_hm.bmp" alt="" id="BLOGGER_PHOTO_ID_5384102074908221762" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrgsUpE4FMI/AAAAAAAAAhM/pDmRgLHCSH0/s1600-h/desu_ray_cm-2.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SrgsUpE4FMI/AAAAAAAAAhM/pDmRgLHCSH0/s320/desu_ray_cm-2.bmp" alt="" id="BLOGGER_PHOTO_ID_5384102087656740034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Salt and Pepper Noise&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Srd1ft4s_3I/AAAAAAAAAf0/hYtOoJ1UYGA/s1600-h/desu_snp_am.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Srd1ft4s_3I/AAAAAAAAAf0/hYtOoJ1UYGA/s320/desu_snp_am.bmp" alt="" id="BLOGGER_PHOTO_ID_5383901067298537330" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srd1gIB55EI/AAAAAAAAAf8/iX-d0jHWBdU/s1600-h/desu_snp_gm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srd1gIB55EI/AAAAAAAAAf8/iX-d0jHWBdU/s320/desu_snp_gm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383901074316452930" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srd1gY3wGiI/AAAAAAAAAgE/B5fUWF7jbsg/s1600-h/desu_snp_hm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srd1gY3wGiI/AAAAAAAAAgE/B5fUWF7jbsg/s320/desu_snp_hm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383901078837271074" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd1gyAMB7I/AAAAAAAAAgM/cUWgLqiP5ow/s1600-h/desu_snp_cm-2.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd1gyAMB7I/AAAAAAAAAgM/cUWgLqiP5ow/s320/desu_snp_cm-2.bmp" alt="" id="BLOGGER_PHOTO_ID_5383901085583542194" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Uniform Noise&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/Srd2Xtj6lEI/AAAAAAAAAgU/2vvl5mRy4N0/s1600-h/desu_uni_am.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/Srd2Xtj6lEI/AAAAAAAAAgU/2vvl5mRy4N0/s320/desu_uni_am.bmp" alt="" id="BLOGGER_PHOTO_ID_5383902029284021314" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd2YMOvg6I/AAAAAAAAAgc/OAV4SRyCMuk/s1600-h/desu_uni_gm.bmp"&gt;&lt;img style="cursor: pointer; width: 91px; height: 91px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd2YMOvg6I/AAAAAAAAAgc/OAV4SRyCMuk/s320/desu_uni_gm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383902037516714914" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd2YXTWKKI/AAAAAAAAAgk/XhYs234_6tw/s1600-h/desu_uni_hm.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Srd2YXTWKKI/AAAAAAAAAgk/XhYs234_6tw/s320/desu_uni_hm.bmp" alt="" id="BLOGGER_PHOTO_ID_5383902040488814754" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Srd2Ygoc5eI/AAAAAAAAAgs/xTmTMs2RndE/s1600-h/desu_uni_cm-2.bmp"&gt;&lt;img style="cursor: pointer; width: 90px; height: 90px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Srd2Ygoc5eI/AAAAAAAAAgs/xTmTMs2RndE/s320/desu_uni_cm-2.bmp" alt="" id="BLOGGER_PHOTO_ID_5383902042993255906" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Arithmetic Mean as the name implies, takes the average of the sum of color values for each subimage (hence, a moving average; sub-image means 3x3 patch); Geometric Mean takes the average via an n-th root; Harmonic Mean divides the patch dimensions by the inverse sum; and finally, the Contra-harmonic filter takes the sum raised to an order value Q, and divides it by the sum raised to the order of Q-1.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Since this activity is pretty much about learning what kind of filter to use for a specific kind of noise, the images below can serve as a guide for the reader. Though most of the time, the arithmetic mean and geometric mean filters obtain a similar looking image, the images are different for the Gaussian and Salt-and-Pepper noise. It is also important to note that for the contra-harmonic filter, we obtain different images for different values of Q.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/Srg7kCrjJAI/AAAAAAAAAic/8udzBa-mvLs/s1600-h/ef212_01_snp_cm--2.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 67px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/Srg7kCrjJAI/AAAAAAAAAic/8udzBa-mvLs/s320/ef212_01_snp_cm--2.bmp" alt="" id="BLOGGER_PHOTO_ID_5384118844902286338" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srg7kkY-McI/AAAAAAAAAik/yZjyRX1gV5s/s1600-h/ef212_01_snp_cm-0.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 67px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Srg7kkY-McI/AAAAAAAAAik/yZjyRX1gV5s/s320/ef212_01_snp_cm-0.bmp" alt="" id="BLOGGER_PHOTO_ID_5384118853951173058" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Srg7lMJNzKI/AAAAAAAAAis/FGjtx5fU0Bo/s1600-h/ef212_01_snp_cm-2.bmp"&gt;&lt;img style="cursor: pointer; width: 120px; height: 67px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Srg7lMJNzKI/AAAAAAAAAis/FGjtx5fU0Bo/s320/ef212_01_snp_cm-2.bmp" alt="" id="BLOGGER_PHOTO_ID_5384118864622505122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The images above show the contra-harmonic filter acting on Salt-and-Pepper Noise for Q=-2, Q=0 and Q=+2 respectively. From this, we can infer that the value of Q to use would depend on the image being restored--negative values for grayscale images biased towards black, while positive values for grayscale images biased towards the white. In the case of my Yuuko sketch, since it's biased towards white, it is greatly restored at Q~+2.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;I thank Neil and Gilbert for their help with the noise addition parts, and myself for helping others with the filtering part. xD Anyway, since all the objectives for this activity was accomplished, and I had my own batch processing script as a bonus, I'll give myself a &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-573746087082970272?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/573746087082970272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/activity-18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/573746087082970272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/573746087082970272'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/activity-18.html' title='日本人彼女募集中。（Activity # 18)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_n3LhpZXYr_g/Srgxfp7qfuI/AAAAAAAAAiM/-_Xqe8r99YQ/s72-c/image.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-7307855374352741276</id><published>2009-09-10T09:43:00.007+09:00</published><updated>2009-10-11T17:58:53.197+09:00</updated><title type='text'>「ai sp@ce」 のバイトは、どうしますか? (Activity # 17)</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SqhbVlBMhEI/AAAAAAAAAc8/TonduJBjIag/s1600-h/higurashi_01.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 320px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SqhbVlBMhEI/AAAAAAAAAc8/TonduJBjIag/s320/higurashi_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5379650181166564418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This activity focuses on photometric stereo, a method of extracting shape and surface detail from shadows. Using this method, we are able to reconstruct an image with surface detail from a series of several images taken at different point sources.&lt;br /&gt;&lt;br /&gt;Suppose we have &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SqhStRmQ7aI/AAAAAAAAAcU/nxMBDxtbJ8Q/s1600-h/Activity_17.jpg"&gt; &lt;/a&gt;the matrix V given by&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SqhWaSLY44I/AAAAAAAAAc0/m_0JuBH1D0M/s1600-h/Activity_17_V.jpg"&gt;&lt;img style="cursor: pointer; width: 252px; height: 162px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SqhWaSLY44I/AAAAAAAAAc0/m_0JuBH1D0M/s320/Activity_17_V.jpg" alt="" id="BLOGGER_PHOTO_ID_5379644764450251650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;where the first index of V represents the image while the second index refers to x, y, and z coordinate of the light source respectively. Assuming these sources illuminate a common object of interest, we can obtain a series of images with intensities defined by&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SqhWZ7zr6CI/AAAAAAAAAcs/vPQ7mIjK1qk/s1600-h/Activity_17_I.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 103px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SqhWZ7zr6CI/AAAAAAAAAcs/vPQ7mIjK1qk/s320/Activity_17_I.jpg" alt="" id="BLOGGER_PHOTO_ID_5379644758445254690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;for each point (x,y). We would then have to find g for each point using the usual matrix operation (i.e. inv(V'*V)*V'*I) and normalize the g's to obtain the value for the normal vectors. We get the surface normals using&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SqhWZYYeIMI/AAAAAAAAAck/dIlTBOScND4/s1600-h/Activity_17_N.jpg"&gt;&lt;img style="cursor: pointer; width: 238px; height: 73px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SqhWZYYeIMI/AAAAAAAAAck/dIlTBOScND4/s320/Activity_17_N.jpg" alt="" id="BLOGGER_PHOTO_ID_5379644748935864514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;and finally, we obtain the surface elevation at a point (u,v) using&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SqhWYzMjgmI/AAAAAAAAAcc/sIzo03zuWH8/s1600-h/Activity_17_F.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SqhWYzMjgmI/AAAAAAAAAcc/sIzo03zuWH8/s320/Activity_17_F.jpg" alt="" id="BLOGGER_PHOTO_ID_5379644738953773666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Following the steps I listed above, here's the Scilab output for the images contained in Photos.mat&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SqhStRmQ7aI/AAAAAAAAAcU/nxMBDxtbJ8Q/s1600-h/Activity_17.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 242px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SqhStRmQ7aI/AAAAAAAAAcU/nxMBDxtbJ8Q/s320/Activity_17.jpg" alt="" id="BLOGGER_PHOTO_ID_5379640692665544098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I'd like to give myself a &lt;span style="font-weight: bold;"&gt;10 &lt;/span&gt;for this activity, since this is one of the RARE activities that anyone can finish in one meeting. xD&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-7307855374352741276?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/7307855374352741276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/ai-spce-no-baito-wa-dou-shimasu-ka.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/7307855374352741276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/7307855374352741276'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/ai-spce-no-baito-wa-dou-shimasu-ka.html' title='「ai sp@ce」 のバイトは、どうしますか? (Activity # 17)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_n3LhpZXYr_g/SqhbVlBMhEI/AAAAAAAAAc8/TonduJBjIag/s72-c/higurashi_01.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-6524598388545103502</id><published>2009-09-08T22:30:00.006+09:00</published><updated>2009-10-11T18:04:46.451+09:00</updated><title type='text'>一番大切なものは? (Activity # 16)</title><content type='html'>&lt;div style="text-align: justify;"&gt;Neural networks is the third classification method for pattern recognition explored in this course, and is the title of activity 16. Unlike the LDA, neural networks don't need heuristics and recognition rules for classification and instead makes use of learning, a function it tries to imitate from the neurons in our brain.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Sqhr4DGyjrI/AAAAAAAAAdc/HYdQj3vzDE8/s1600-h/04c951155ce22903c9fbf5ec47719d4a1248521981_large.jpg"&gt;&lt;img style="cursor: pointer; width: 192px; height: 320px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Sqhr4DGyjrI/AAAAAAAAAdc/HYdQj3vzDE8/s320/04c951155ce22903c9fbf5ec47719d4a1248521981_large.jpg" alt="" id="BLOGGER_PHOTO_ID_5379668365544689330" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;In any case, the activity makes use of the ANN toolbox (ANN_toolbox_0.4.2 found on &lt;a href="http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&amp;amp;fileID=166"&gt;Scilab's Toolboxes Center&lt;/a&gt;) which makes the activity more of a plug-and-play kind of activity.&lt;br /&gt;&lt;br /&gt;So how do neural networks work? Each input connection to the artificial neuron has its own weight (synaptic strength) and is multiplied to the inputs, xi. A neuron receives weighted inputs from other neurons and lets the sum act on an activation function g. The result z is then fired as an output to other neurons.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sqhp9ykeJqI/AAAAAAAAAdU/kou4kCwdZQk/s1600-h/neuron.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 175px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sqhp9ykeJqI/AAAAAAAAAdU/kou4kCwdZQk/s320/neuron.JPG" alt="" id="BLOGGER_PHOTO_ID_5379666265161737890" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A neural network is formed through the connection of neurons. A typical network consists of an input layer, a hidden layer and an output layer. Just like the previous activities, two modes were considered -- a training mode and a test mode. The parameters one can play around with for the functions in ANN would be the Neural Network architecture (how many neurons for each layer), the Learning Rate and the Number of Iterations.&lt;br /&gt;&lt;br /&gt;Using the same data I used in Activity # 15&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Sqhp9qkUjPI/AAAAAAAAAdM/3mt-OPwcSk8/s1600-h/x.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 275px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Sqhp9qkUjPI/AAAAAAAAAdM/3mt-OPwcSk8/s320/x.jpg" alt="" id="BLOGGER_PHOTO_ID_5379666263013625074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;I had to do a few modifications. First, the inputs must be in a [2xN] matrix (done by transposing the bin after an fscanfMat() call), afterwhich the values must be normalized (ranging from 0 to 1). For the training set, I also had to change the classification values (1 and 2) to 1 and 0 (this is crucial to avoid having erroneous outputs). Finally, here's the output of my neural net classification after round():&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/Sqhp9H2DnYI/AAAAAAAAAdE/_HX5hyLzKuA/s1600-h/win.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 100px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/Sqhp9H2DnYI/AAAAAAAAAdE/_HX5hyLzKuA/s320/win.jpg" alt="" id="BLOGGER_PHOTO_ID_5379666253692771714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For the win, I give myself a pat at the back and a well-deserved &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;. xD I'd like to thank Gilbert for his help in helping me understand the ANN toolbox.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-6524598388545103502?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/6524598388545103502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/ichiban-taisetsu-na-mono-wa-activity-16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/6524598388545103502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/6524598388545103502'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/ichiban-taisetsu-na-mono-wa-activity-16.html' title='一番大切なものは? (Activity # 16)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_n3LhpZXYr_g/Sqhr4DGyjrI/AAAAAAAAAdc/HYdQj3vzDE8/s72-c/04c951155ce22903c9fbf5ec47719d4a1248521981_large.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-3511370558056828515</id><published>2009-09-07T01:16:00.005+09:00</published><updated>2009-10-11T18:04:01.075+09:00</updated><title type='text'>好き?　(Activity # 15)</title><content type='html'>&lt;div style="text-align: justify;"&gt;Activity # 15 is pretty much like the previous activity except for a little improvement--this time, it uses probabilisitic classification to minimize the risk or loss in classification.&lt;br /&gt;&lt;br /&gt;Since my classes can be linearly separated (i.e. one can separate one from the other by drawing a line in the plot in the previous activity), the method I used was Linear Discriminant Analysis, the details of which can be found &lt;a href="http://people.revoledu.com/kardi/tutorial/LDA/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This time, we were asked to sort out an image with patterns that are close to being similar, i.e. they should have little to no difference. I generated another image of blobs using Photoshop--the blobs are one brush size apart in terms of size and a difference of 50 ticks when it comes to G-channel color value.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SqPg8LB0xEI/AAAAAAAAAcM/B_LAI0wxxwE/s1600-h/test2.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SqPg8LB0xEI/AAAAAAAAAcM/B_LAI0wxxwE/s320/test2.jpg" alt="" id="BLOGGER_PHOTO_ID_5378389704367719490" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SqPg7o_IzKI/AAAAAAAAAcE/_SR15sk85UU/s1600-h/LDA.bmp"&gt; &lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SqPg7o_IzKI/AAAAAAAAAcE/_SR15sk85UU/s320/LDA.bmp" alt="" id="BLOGGER_PHOTO_ID_5378389695229643938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Of course, the script is pretty much plug and play.. all that was needed was to obtain data using the script from the previous activity, dump them into an outfile, get the LDA script (found in the tutorial but implemented in scilab) to organize and process the files, and poof! we have an LDA plot as shown above.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGfcGunDrI/AAAAAAAAAmU/w1uDKBgVtfg/s1600-h/As.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 252px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/StGfcGunDrI/AAAAAAAAAmU/w1uDKBgVtfg/s320/As.jpg" alt="" id="BLOGGER_PHOTO_ID_5391265534130458290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Note that unlike the previous activity, it organized all the data points in a line, and that the discriminant functions were successful in classifying close patterns by increasing the difference between them (note the order of magnitude - xE+06). As expected from the image, the LDA results to a perfect classification (100% correct). I'm not sure about real life images though. I'll probably give it a shot when I find some time.&lt;br /&gt;&lt;br /&gt;That's why, it's probably just a &lt;span style="font-weight: bold;"&gt;9&lt;/span&gt; for now.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-3511370558056828515?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/3511370558056828515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/activity-15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/3511370558056828515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/3511370558056828515'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/activity-15.html' title='好き?　(Activity # 15)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_n3LhpZXYr_g/SqPg8LB0xEI/AAAAAAAAAcM/B_LAI0wxxwE/s72-c/test2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-1822366658143257042</id><published>2009-09-03T11:52:00.008+09:00</published><updated>2009-10-11T18:02:22.272+09:00</updated><title type='text'>もう。。わかんない。 (Activity # 14)</title><content type='html'>&lt;div style="text-align: justify;"&gt;Pattern recognition is the subject of Activity 14 and will probably be the subject for the next few activities.&lt;br /&gt;&lt;br /&gt;In the context of image processing, it can be used to decide whether a feature vector (ordered set of attributes) of a pattern (a set of features)  belongs to one of several classes (set of patterns sharing common properties).&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SqPNeM4dK3I/AAAAAAAAAb8/8nZegQX3eGY/s1600-h/shana_01.jpg"&gt;&lt;img style="cursor: pointer; width: 227px; height: 320px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SqPNeM4dK3I/AAAAAAAAAb8/8nZegQX3eGY/s320/shana_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5378368298748291954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Activity 14 makes use of the Minimum Distance Classification routine, where a pattern is assigned to the class whose mean or representative to it is nearest to. This can simply be done by either taking the minimum distances of the means for each sample, or by simply plotting out the means.&lt;br /&gt;&lt;br /&gt;My original design for this activity was actually to implement the Scilab routine on an image of coins (30 coins, three classes - 25 centavo, 1 peso and 5 peso coins, and up to four features - size, R, G and B-channel color values). However, it seems absurd to do it straightforwardly, so I decided to test my algorithm on a Photoshop-generated image (based from the original coin image) of circles with three different brush sizes and three different color values in the Red. The fifteen patterns (five for each class) used for the training set were also obtained from the image of 30. All it took was a little playing around with the bwlabel() and find() functions.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sp8wpCm6HnI/AAAAAAAAAbk/Hcmvz-LoLwY/s1600-h/test2.jpg"&gt;&lt;img style="cursor: pointer; width: 180px; height: 135px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sp8wpCm6HnI/AAAAAAAAAbk/Hcmvz-LoLwY/s320/test2.jpg" alt="" id="BLOGGER_PHOTO_ID_5377069961736494706" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sp8woqIo6rI/AAAAAAAAAbc/jOog9HRmKtc/s1600-h/testModePlot.bmp"&gt;&lt;img style="cursor: pointer; width: 180px; height: 135px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sp8woqIo6rI/AAAAAAAAAbc/jOog9HRmKtc/s320/testModePlot.bmp" alt="" id="BLOGGER_PHOTO_ID_5377069955167087282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;As expected, the algorithm managed to sort the patterns out. Judging from the plot, there was a clear distinction between each pattern in the image, and that the deviation of the individual patterns from the training set was small.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sp8wD5tHO0I/AAAAAAAAAbE/vZYSPxURBjY/s1600-h/test.JPG"&gt;&lt;img style="cursor: pointer; width: 180px; height: 136px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sp8wD5tHO0I/AAAAAAAAAbE/vZYSPxURBjY/s320/test.JPG" alt="" id="BLOGGER_PHOTO_ID_5377069323691440962" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sp8wDY_pRGI/AAAAAAAAAa8/acPsh-14qrY/s1600-h/testModePlot2.bmp"&gt;&lt;img style="cursor: pointer; width: 180px; height: 138px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Sp8wDY_pRGI/AAAAAAAAAa8/acPsh-14qrY/s320/testModePlot2.bmp" alt="" id="BLOGGER_PHOTO_ID_5377069314910798946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;When applied to coins however, although there is a clear distinction when it comes to size, the color values (not only in the red) were scattered all over the place. This is probably due to the uneven lighting in the image--there were shiny coins and there were dull coins. A better result can be obtained by capturing a better photo, especially with the use of reflectors and diffusers.&lt;br /&gt;&lt;br /&gt;For my choice of a difficult image, and succeeding in sorting them out even if it's against it's will. xD I'm getting a &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-1822366658143257042?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/1822366658143257042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/pattern-recognition-is-subject-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/1822366658143257042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/1822366658143257042'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/09/pattern-recognition-is-subject-of.html' title='もう。。わかんない。 (Activity # 14)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_n3LhpZXYr_g/SqPNeM4dK3I/AAAAAAAAAb8/8nZegQX3eGY/s72-c/shana_01.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-5833045534731054459</id><published>2009-08-06T12:23:00.007+09:00</published><updated>2009-08-06T21:28:35.872+09:00</updated><title type='text'>あのぉさ。。　大丈夫か? (Activity # 12)</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnpNJBJtipI/AAAAAAAAAN8/TIurFV4XnKI/s1600-h/izumi001.jpg"&gt;&lt;img style="cursor: pointer; width: 180px; height: 240px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnpNJBJtipI/AAAAAAAAAN8/TIurFV4XnKI/s320/izumi001.jpg" alt="" id="BLOGGER_PHOTO_ID_5366686723288697490" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Again, we were fortunate enough to have an activity which has something to do with taking pictures using a camera (and not generating our own images using scilab and/or paint.) The activity was entitled Color Image Segmentation, yet another concept in image processing.&lt;br /&gt;&lt;br /&gt;In an image segmentation process, a Region of Interest (ROI) is picked out from the rest of the image in order to do further processing. It can be done by grayscaling, however that is not always the case. Sometimes, we don't want to lose some of the color information, nor do we want to lose the shading variations in 3D images.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrMRi9ylJI/AAAAAAAAAQM/1zzd7OeNI6A/s1600-h/full-metal-panic.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrMRi9ylJI/AAAAAAAAAQM/1zzd7OeNI6A/s320/full-metal-panic.jpg" alt="" id="BLOGGER_PHOTO_ID_5366826507781182610" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;The best way to do it is to convert the RGB values for each pixel into its normalized chromaticity coordinates. Once can easily do this by letting the sum&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;R + G + B = I&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;and dividing each channel by I. After this procedure, we can then use either the Parametric Probability Distribution Estimation by assuming a Gaussian Distribution independently along r and g (i.e. the probability that a pixel r belongs to the ROI is seen in the equation below, repeat for g),&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrBoDEiBhI/AAAAAAAAAPE/hJOAIreaR1E/s1600-h/pixel_probability.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 66px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrBoDEiBhI/AAAAAAAAAPE/hJOAIreaR1E/s320/pixel_probability.jpg" alt="" id="BLOGGER_PHOTO_ID_5366814799728608786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;or the Non-Parametric Probability Distribution by using the histogram itself to tag the membership of the pixels.&lt;br /&gt;&lt;br /&gt;I used three different patches from my original picture (above).&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnpOV0h9EnI/AAAAAAAAAOU/HDBOAj5OAns/s1600-h/izumi001w.jpg"&gt;&lt;img style="cursor: pointer; width: 100px; height: 100px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnpOV0h9EnI/AAAAAAAAAOU/HDBOAj5OAns/s320/izumi001w.jpg" alt="" id="BLOGGER_PHOTO_ID_5366688042750644850" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnpOVk1h4AI/AAAAAAAAAOM/y7tfHrlmZ2g/s1600-h/izumi001br.jpg"&gt;&lt;img style="cursor: pointer; width: 100px; height: 100px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnpOVk1h4AI/AAAAAAAAAOM/y7tfHrlmZ2g/s320/izumi001br.jpg" alt="" id="BLOGGER_PHOTO_ID_5366688038537781250" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnpOVf4Fd2I/AAAAAAAAAOE/tm9UxnXbaYc/s1600-h/izumi001bl.jpg"&gt;&lt;img style="cursor: pointer; width: 100px; height: 100px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnpOVf4Fd2I/AAAAAAAAAOE/tm9UxnXbaYc/s320/izumi001bl.jpg" alt="" id="BLOGGER_PHOTO_ID_5366688037206325090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I will leave it to the reader to guess where these patches were taken from my image.&lt;br /&gt;&lt;br /&gt;I don't really like putting code snippets in my blog site, but I guess I'll have to put this one in since it's not mine:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;I = double(I); //I is the image of the region of interest&lt;br /&gt;R = I(:,:,1); G = I(:,:,2); B = I(:,:,3);&lt;br /&gt;Int= R + G + B;&lt;br /&gt;Int(find(Int==0))=100000;&lt;br /&gt;r = R./ Int; g = G./Int;&lt;br /&gt;&lt;br /&gt;BINS = 32;&lt;br /&gt;rint = round( r*(BINS-1) + 1);&lt;br /&gt;gint = round (g*(BINS-1) + 1);&lt;br /&gt;colors = gint(:) + (rint(:)-1)*BINS;&lt;br /&gt;hist = zeros(BINS,BINS);&lt;br /&gt;&lt;br /&gt;for row = 1:BINS&lt;br /&gt;for col = 1:(BINS-row+1)&lt;br /&gt;hist(row,col) = length( find(colors==( ((col + (row-1)*BINS)))));&lt;br /&gt;end;&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;scf(2);&lt;br /&gt;imshow(hist,[]);&lt;/blockquote&gt;&lt;br /&gt;The snippet was provided in our activity manual by our professor. The following images are my results for this activity (I didn't bother to post all of them). I also included an image of the chromaticity space for verification.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrACYFzk4I/AAAAAAAAAO8/jSTeTyULraY/s1600-h/chromaticity_xy.jpg"&gt;&lt;img style="cursor: pointer; width: 206px; height: 225px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrACYFzk4I/AAAAAAAAAO8/jSTeTyULraY/s320/chromaticity_xy.jpg" alt="" id="BLOGGER_PHOTO_ID_5366813053024441218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For the wood-patch [non-parametric (L), parametric (R)]:&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrAB0y4yNI/AAAAAAAAAO0/xIC9iKcGB2o/s1600-h/non-parametric_w.bmp"&gt;&lt;img style="cursor: pointer; width: 199px; height: 150px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrAB0y4yNI/AAAAAAAAAO0/xIC9iKcGB2o/s320/non-parametric_w.bmp" alt="" id="BLOGGER_PHOTO_ID_5366813043549849810" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrABkwMtOI/AAAAAAAAAOs/f25S2Nt7NDc/s1600-h/parametric_w.bmp"&gt;&lt;img style="cursor: pointer; width: 199px; height: 150px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrABkwMtOI/AAAAAAAAAOs/f25S2Nt7NDc/s320/parametric_w.bmp" alt="" id="BLOGGER_PHOTO_ID_5366813039243605218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For the blue-patch [non-parametric (L), parametric (R)]:&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrABaeGJII/AAAAAAAAAOk/yy94YwXtP38/s1600-h/non-parametric_bl.bmp"&gt;&lt;img style="cursor: pointer; width: 199px; height: 150px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrABaeGJII/AAAAAAAAAOk/yy94YwXtP38/s320/non-parametric_bl.bmp" alt="" id="BLOGGER_PHOTO_ID_5366813036483323010" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrAAxm35BI/AAAAAAAAAOc/cPVq8jMcKjw/s1600-h/parametric_bl.bmp"&gt;&lt;img style="cursor: pointer; width: 199px; height: 150px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrAAxm35BI/AAAAAAAAAOc/cPVq8jMcKjw/s320/parametric_bl.bmp" alt="" id="BLOGGER_PHOTO_ID_5366813025514284050" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Since this is one of those activities I get to complete in a single meeting.. and I believe I completely understood what I'm doing this time.. I get a &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I thank Gilbert for verifying some of the answers for Me and Neil.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-5833045534731054459?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/5833045534731054459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/08/anoo-sa-daijoubu-ka-activity-12.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/5833045534731054459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/5833045534731054459'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/08/anoo-sa-daijoubu-ka-activity-12.html' title='あのぉさ。。　大丈夫か? (Activity # 12)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_n3LhpZXYr_g/SnpNJBJtipI/AAAAAAAAAN8/TIurFV4XnKI/s72-c/izumi001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-1821858570544927412</id><published>2009-07-30T12:40:00.003+09:00</published><updated>2009-08-06T21:34:32.356+09:00</updated><title type='text'>この学校は、好きですか?　(Activity # 11)</title><content type='html'>&lt;div style="text-align: justify;"&gt;Yey.. we finally had an activity which makes me feel that this is an image processing class.. why of course.. the best images are taken with a camera..&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrNB0y3k9I/AAAAAAAAAQU/vuEl-xwaakw/s1600-h/9368l.jpg"&gt;&lt;img style="cursor: pointer; width: 187px; height: 320px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrNB0y3k9I/AAAAAAAAAQU/vuEl-xwaakw/s320/9368l.jpg" alt="" id="BLOGGER_PHOTO_ID_5366827337200931794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;This activity is entitled Color Image Processing. We learned that the color captured by a digital color camera is an integral of the product of the spectral power distribution of the incident light source, the surface reflectance and the spectral sensitivity of the camera. We note that from these quantities, a White Balancing constant for the camera can be obtained and this constant explains why sometimes the colors taken by the camera just don't seem right.&lt;br /&gt;&lt;br /&gt;There were two White Balancing Algorithms discussed in this activity: the White Patch algorithm which requires a patch or ROI in the image that looks white in the real world to calibrate the colors of the image, and the Gray World algorithm which basically takes the mean value of the pixels in the image for its definition for white.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrFlmFoKCI/AAAAAAAAAPM/f_uu2X9bxe4/s1600-h/izumi000.jpg"&gt;&lt;img style="cursor: pointer; width: 150px; height: 204px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrFlmFoKCI/AAAAAAAAAPM/f_uu2X9bxe4/s320/izumi000.jpg" alt="" id="BLOGGER_PHOTO_ID_5366819155635349538" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrFl-mdPkI/AAAAAAAAAPU/cVGzz0TlZPg/s1600-h/izumi002.jpg"&gt; &lt;img style="cursor: pointer; width: 150px; height: 204px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrFl-mdPkI/AAAAAAAAAPU/cVGzz0TlZPg/s320/izumi002.jpg" alt="" id="BLOGGER_PHOTO_ID_5366819162215497282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The images displayed above shows a white-balanced photo (L) using AWB or Auto White Balancing and a poorly white-balanced photo (R) using the Tungsten Bulb setting in my phone's camera. We note that for tungsten, the camera tries to compensate for the orange tone produced by the tungsten bulb by adding more blue. However, Tungsten will make a daylight photo blue, resulting to a loss of color information in the red.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrFmOVOxmI/AAAAAAAAAPc/g-9BlF2egfA/s1600-h/whitePatch.bmp"&gt;&lt;img style="cursor: pointer; width: 150px; height: 201px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrFmOVOxmI/AAAAAAAAAPc/g-9BlF2egfA/s320/whitePatch.bmp" alt="" id="BLOGGER_PHOTO_ID_5366819166438213218" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrFmo-sb7I/AAAAAAAAAPk/WIoZq9J_7dY/s1600-h/grayWorld.bmp"&gt; &lt;img style="cursor: pointer; width: 150px; height: 200px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrFmo-sb7I/AAAAAAAAAPk/WIoZq9J_7dY/s320/grayWorld.bmp" alt="" id="BLOGGER_PHOTO_ID_5366819173591445426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Using the White Patch algorithm, I was able to restore some of the red colors seen in the AWB image. For the Gray World algorithm however, since most of the pixels are cyan in nature--guess what their mean value is? My intuition however tells me that there just doesn't seem to be any point trying to make a bad image look good, so today's valuable lesson would be--Make sure to get your camera settings right!!&lt;br /&gt;&lt;br /&gt;Now here's another set of images. To make it challenging, we added items of the same color but different shades in the images:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnrIATrcoKI/AAAAAAAAAPs/12ZxlCEXBig/s1600-h/Image0036.jpg"&gt;&lt;img style="cursor: pointer; width: 150px; height: 200px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnrIATrcoKI/AAAAAAAAAPs/12ZxlCEXBig/s320/Image0036.jpg" alt="" id="BLOGGER_PHOTO_ID_5366821813573427362" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnrIAo7TmvI/AAAAAAAAAP0/dtWpn3ywkmM/s1600-h/Image0037.jpg"&gt; &lt;img style="cursor: pointer; width: 150px; height: 200px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnrIAo7TmvI/AAAAAAAAAP0/dtWpn3ywkmM/s320/Image0037.jpg" alt="" id="BLOGGER_PHOTO_ID_5366821819277089522" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrIAxV_6NI/AAAAAAAAAP8/3lcA8LpmBD4/s1600-h/wp_wrong.bmp"&gt;&lt;img style="cursor: pointer; width: 150px; height: 200px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrIAxV_6NI/AAAAAAAAAP8/3lcA8LpmBD4/s320/wp_wrong.bmp" alt="" id="BLOGGER_PHOTO_ID_5366821821536528594" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrIBfKyYWI/AAAAAAAAAQE/i6iTm6euphE/s1600-h/gw_wrong.bmp"&gt; &lt;img style="cursor: pointer; width: 150px; height: 199px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrIBfKyYWI/AAAAAAAAAQE/i6iTm6euphE/s320/gw_wrong.bmp" alt="" id="BLOGGER_PHOTO_ID_5366821833837535586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Guide to the pictures above: Auto-White Balanced (TL), Daylight setting (TR), White Patch (BL) and Gray World (BR). In terms of quality, the ones at the bottom lose unless we consider the fact that Scilab isn't actually equipped with good rendering backends.&lt;br /&gt;&lt;br /&gt;The daylight setting is wrong in this case since the light source is mainly flourescent. The white patch algorithm did its best in restoring the original lighting, but I got a lot of noise from its attempt. Same goes for gray world but as expected, the lighting is still to the poorly-white balanced image. The white patch algorithm is definitely better than the gray world algorithm--but a good image taken by a good camera is tens of thousands of times better. ^_^&lt;br /&gt;&lt;br /&gt;There goes another &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; for finishing the activity on time.. it's too bad the blog posts never make it in time. xD&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-1821858570544927412?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/1821858570544927412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/activity-11.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/1821858570544927412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/1821858570544927412'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/activity-11.html' title='この学校は、好きですか?　(Activity # 11)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrNB0y3k9I/AAAAAAAAAQU/vuEl-xwaakw/s72-c/9368l.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-2036987412926121230</id><published>2009-07-29T20:20:00.002+09:00</published><updated>2009-08-07T22:11:57.461+09:00</updated><title type='text'>がんばってね。(Activity # 10)</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;The title for this activity is Preprocessing Text. The lessons we learn in the activity is very useful in handwriting recognition where individual letters must be extracted.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Snwn-Y45ILI/AAAAAAAAAas/OksL6foLnrU/s1600-h/1181438973082.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Snwn-Y45ILI/AAAAAAAAAas/OksL6foLnrU/s320/1181438973082.jpg" alt="" id="BLOGGER_PHOTO_ID_5367208808705237170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;We were given the task of extracting a group of text from a scanned image. We rotated the image by using mogrify(), a function in Scilab that can do almost anything that the Free Transform tool in Photoshop can do (although I favor the latter). We removed the lines using the techniques used in the moon photo and the canvas weave in the previous filtering activity, binarized and threshold the image, and then labeled using bwlabel().&lt;br /&gt;&lt;br /&gt;This activity pretty much summarizes everything we learned so far, thus it's vital to show the resulting image for each step. Apparently, mogrify() returns a stack problem in my pc, causing SIP to go FUBAR.. I had no other choice but to make use of the Free Transform tool in photoshop.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snwk7VqIXcI/AAAAAAAAAac/HvsKXLQGAqw/s1600-h/Untitled_0001r.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snwk7VqIXcI/AAAAAAAAAac/HvsKXLQGAqw/s320/Untitled_0001r.jpg" alt="" id="BLOGGER_PHOTO_ID_5367205457763524034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;By looking at the Fourier Domain of our image, we can get an idea on the type of filter we'll need. For this case, it's pretty much like the moon photo except this time, the lines are horizontal. From the Fourier Domain of the image as shown below, the best filter is a vertical line masking the white vertical line, but taking care not to touch the point at the center. Touching that point will result in a great loss of information.&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snwk66q-P3I/AAAAAAAAAaU/CxcfrcM5cZs/s1600-h/fft.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snwk66q-P3I/AAAAAAAAAaU/CxcfrcM5cZs/s320/fft.bmp" alt="" id="BLOGGER_PHOTO_ID_5367205450519297906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The following sets of images are the images taken before (L) and after (R) the closing operator was used. We can note that the noisy signals inside the letters were significantly reduced.&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/Snwk6vopp3I/AAAAAAAAAaM/cL3f67Nbmbw/s1600-h/before_close.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/Snwk6vopp3I/AAAAAAAAAaM/cL3f67Nbmbw/s320/before_close.bmp" alt="" id="BLOGGER_PHOTO_ID_5367205447556769650" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Snwk6eeNvXI/AAAAAAAAAaE/4XyVxhx3Hr8/s1600-h/after_close.bmp"&gt; &lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Snwk6eeNvXI/AAAAAAAAAaE/4XyVxhx3Hr8/s320/after_close.bmp" alt="" id="BLOGGER_PHOTO_ID_5367205442949594482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Finally, here's the image with indexed values for each blob. Imaged in hotcolormap. xD&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnwllBVN95I/AAAAAAAAAak/CuMc6KqrJ8A/s1600-h/labeled.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnwllBVN95I/AAAAAAAAAak/CuMc6KqrJ8A/s320/labeled.bmp" alt="" id="BLOGGER_PHOTO_ID_5367206173861607314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I'd like to acknowledge Neil for helping me out with this activity, especially since I needed to do it again.. all thanks to the recent USB disk loss. I'd also like to thank Hime for her support, and for keeping me awake last night through all the blog posts I needed to write. The post date might lie, but this is actually the last blog post I made in time for the deadline.&lt;br /&gt;&lt;br /&gt;I get a &lt;span style="font-weight: bold;"&gt;9&lt;/span&gt; for this activity. Probably for the effort in trying to recover the lost files.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-2036987412926121230?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/2036987412926121230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/activity-10.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/2036987412926121230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/2036987412926121230'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/activity-10.html' title='がんばってね。(Activity # 10)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_n3LhpZXYr_g/Snwn-Y45ILI/AAAAAAAAAas/OksL6foLnrU/s72-c/1181438973082.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-6628209077561980938</id><published>2009-07-27T11:23:00.003+09:00</published><updated>2009-08-07T20:19:11.628+09:00</updated><title type='text'>違う。違うよ。(Activity # 9)</title><content type='html'>Activity # 9 is entitled Binary Operations. It is very important in image-based measurements where a Region of Interest (ROI) is segmented from the background by means of edge detection or blob labelling. Some common problems in image processing where these operations are used include cell counting, tracking of fingerprint ridges and pattern recognition.&lt;br /&gt;&lt;br /&gt;In this activity, we've been given the task of estimating the area (in pixels) of a typical puncher hole, using a reference image that looks like this:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snvv5UqxgxI/AAAAAAAAAZc/OGe3c79ldx8/s1600-h/Circles001.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 264px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snvv5UqxgxI/AAAAAAAAAZc/OGe3c79ldx8/s320/Circles001.jpg" alt="" id="BLOGGER_PHOTO_ID_5367147149021774610" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In order to make life easier for both scilab and me, I divided the image into nine parts..&lt;br /&gt;&lt;br /&gt;For the first subimage, the next step is thresholding. Using Photoshop (I'm working at home since I had to do this activity again.. why? Coz i lost my flash disk!!), I obtained the suitable threshold value of &lt;span style="font-weight: bold;"&gt;230/255&lt;/span&gt;.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/Snv1AhsybSI/AAAAAAAAAZk/Kl0gWpL-uMU/s1600-h/lucky_star_02.jpg"&gt;&lt;img style="cursor: pointer; width: 222px; height: 320px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/Snv1AhsybSI/AAAAAAAAAZk/Kl0gWpL-uMU/s320/lucky_star_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5367152770337107234" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Once the threshold was found, I made use of the erosion and dilation operations from the previous activity, to perform the closing and opening operations. I used the closing operation (&lt;span style="font-weight: bold;"&gt;dilate then erode&lt;/span&gt;) to clean up my image, after which I used &lt;span style="font-style: italic;"&gt;bwlabel()&lt;/span&gt; to label the blobs.&lt;br /&gt;&lt;br /&gt;Finally, I used my routine for counting the pixels of the same label, tallied them into an array, and repeated the procedure for the rest of the subimages.&lt;br /&gt;&lt;br /&gt;I tallied the areas for all the holes in the large image by appending the tallies for each of the sub-images, and I got this histogram:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnwIp7koEYI/AAAAAAAAAZs/WECBtWPBlqQ/s1600-h/histogram.bmp"&gt;&lt;img style="cursor: pointer; width: 320px; height: 179px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnwIp7koEYI/AAAAAAAAAZs/WECBtWPBlqQ/s320/histogram.bmp" alt="" id="BLOGGER_PHOTO_ID_5367174372377760130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I realize that as it is, there's still a lot of noise in the image. However, we are only after the area for each punch hole, thus we can also just trim our histogram by setting a tolerance level. I decided to set my tolerance between 300 and 700, the location at which the second peak is centered.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnwIqHXM94I/AAAAAAAAAZ0/TjsRv9EkO6U/s1600-h/histogram2.bmp"&gt;&lt;img style="cursor: pointer; width: 320px; height: 179px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnwIqHXM94I/AAAAAAAAAZ0/TjsRv9EkO6U/s320/histogram2.bmp" alt="" id="BLOGGER_PHOTO_ID_5367174375542683522" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;We can see that the peak is located between &lt;span style="font-weight: bold;"&gt;512.5&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;525&lt;/span&gt;--but the mean value however tells us that it's &lt;span style="font-weight: bold;"&gt;507.5&lt;/span&gt;. The histogram tells us that the size of the hole should be about &lt;span style="font-weight: bold;"&gt;517&lt;/span&gt; pixels, giving the mean an error estimate of around &lt;span style="font-weight: bold;"&gt;3%&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I managed to finish the activity in a few minutes (when I had to do it again), so I definitely get a &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;. hahaha.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-6628209077561980938?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/6628209077561980938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/activity-9.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/6628209077561980938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/6628209077561980938'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/activity-9.html' title='違う。違うよ。(Activity # 9)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_n3LhpZXYr_g/Snvv5UqxgxI/AAAAAAAAAZc/OGe3c79ldx8/s72-c/Circles001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-6431315909891736437</id><published>2009-07-20T11:13:00.005+09:00</published><updated>2009-08-07T01:57:03.018+09:00</updated><title type='text'>ほら朝よ。おきておきて。 (Activity # 8)</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrOEUIm9VI/AAAAAAAAAQc/7TKC1ONf6Uk/s1600-h/49186.jpg"&gt;&lt;img style="cursor: pointer; width: 206px; height: 320px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrOEUIm9VI/AAAAAAAAAQc/7TKC1ONf6Uk/s320/49186.jpg" alt="" id="BLOGGER_PHOTO_ID_5366828479484982610" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Morphology refers to shape or structure. Just as the title implies, morphological operations for image processing shall be the focus of this activity. So what is it used for? Shapes can be expanded or thinned, holes can be closed, and disconnected blobs can be joined.&lt;br /&gt;&lt;br /&gt;It makes use of the Set Theory. It makes use of the shape, as well as a structuring element for the direction of its growth or reduction. However, for our purposes, we only need to focus on the concepts of Dilation and Erosion.&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrvJ5l0X0I/AAAAAAAAASE/ZZd3G0__Dwo/s1600-h/dilation.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 126px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrvJ5l0X0I/AAAAAAAAASE/ZZd3G0__Dwo/s320/dilation.jpg" alt="" id="BLOGGER_PHOTO_ID_5366864859322670914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Dilation results in an expansion of the shape following the morphology of the structuring element.&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrvUSTviOI/AAAAAAAAASU/t49tjoYqFmQ/s1600-h/erosion.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 121px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrvUSTviOI/AAAAAAAAASU/t49tjoYqFmQ/s320/erosion.jpg" alt="" id="BLOGGER_PHOTO_ID_5366865037756434658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Erosion results in a reduction of the shape following the morphology of the structuring element.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In this activity, there was predicting involved. However, for the most part, you won't really see explanations. It's pictures galore once again. xD&lt;br /&gt;&lt;br /&gt;Original Images:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snr0GLD3KfI/AAAAAAAAATE/xTWk4ElTcPM/s1600-h/square.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snr0GLD3KfI/AAAAAAAAATE/xTWk4ElTcPM/s320/square.bmp" alt="" id="BLOGGER_PHOTO_ID_5366870292850747890" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrygUwOUVI/AAAAAAAAASk/991pn0gfRy8/s1600-h/triangle.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrygUwOUVI/AAAAAAAAASk/991pn0gfRy8/s320/triangle.bmp" alt="" id="BLOGGER_PHOTO_ID_5366868543106077010" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnryglPvxMI/AAAAAAAAASs/-S9xbDPOExU/s1600-h/circle.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnryglPvxMI/AAAAAAAAASs/-S9xbDPOExU/s320/circle.bmp" alt="" id="BLOGGER_PHOTO_ID_5366868547533259970" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrygUwOUVI/AAAAAAAAASk/991pn0gfRy8/s1600-h/triangle.bmp"&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snryg4XQgUI/AAAAAAAAAS0/NsLdNM-_SDk/s1600-h/hsquare.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snryg4XQgUI/AAAAAAAAAS0/NsLdNM-_SDk/s320/hsquare.bmp" alt="" id="BLOGGER_PHOTO_ID_5366868552665039170" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnryhGHkWxI/AAAAAAAAAS8/CUxIROt4AKk/s1600-h/plus.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnryhGHkWxI/AAAAAAAAAS8/CUxIROt4AKk/s320/plus.bmp" alt="" id="BLOGGER_PHOTO_ID_5366868556357327634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Structuring Element (4x4 ones):&lt;br /&gt;Dilation&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsFq19UwsI/AAAAAAAAAU8/DpFM-XHh1TI/s1600-h/d11.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsFq19UwsI/AAAAAAAAAU8/DpFM-XHh1TI/s320/d11.bmp" alt="" id="BLOGGER_PHOTO_ID_5366889614539014850" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsFqq8R1PI/AAAAAAAAAU0/fA5rNkBYlRA/s1600-h/d21.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsFqq8R1PI/AAAAAAAAAU0/fA5rNkBYlRA/s320/d21.bmp" alt="" id="BLOGGER_PHOTO_ID_5366889611581838578" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsFqY69-aI/AAAAAAAAAUs/nF-Wk8EcWYw/s1600-h/d31.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsFqY69-aI/AAAAAAAAAUs/nF-Wk8EcWYw/s320/d31.bmp" alt="" id="BLOGGER_PHOTO_ID_5366889606744504738" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsFqEA4KWI/AAAAAAAAAUk/IDTWEWY0t00/s1600-h/d41.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsFqEA4KWI/AAAAAAAAAUk/IDTWEWY0t00/s320/d41.bmp" alt="" id="BLOGGER_PHOTO_ID_5366889601132144994" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsFp1fsWgI/AAAAAAAAAUc/shusLtHt-Ok/s1600-h/d51.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsFp1fsWgI/AAAAAAAAAUc/shusLtHt-Ok/s320/d51.bmp" alt="" id="BLOGGER_PHOTO_ID_5366889597234862594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Erosion&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsGecGH42I/AAAAAAAAAVk/q7Khf5kJmt0/s1600-h/e11.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsGecGH42I/AAAAAAAAAVk/q7Khf5kJmt0/s320/e11.bmp" alt="" id="BLOGGER_PHOTO_ID_5366890500949795682" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsGePE3-TI/AAAAAAAAAVc/1IW2VB2moHw/s1600-h/e21.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsGePE3-TI/AAAAAAAAAVc/1IW2VB2moHw/s320/e21.bmp" alt="" id="BLOGGER_PHOTO_ID_5366890497454897458" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsGd_vIkpI/AAAAAAAAAVU/nahydM3azhQ/s1600-h/e31.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsGd_vIkpI/AAAAAAAAAVU/nahydM3azhQ/s320/e31.bmp" alt="" id="BLOGGER_PHOTO_ID_5366890493337178770" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsGdgJvusI/AAAAAAAAAVM/D9A98DX0vt0/s1600-h/e41.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsGdgJvusI/AAAAAAAAAVM/D9A98DX0vt0/s320/e41.bmp" alt="" id="BLOGGER_PHOTO_ID_5366890484858862274" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsGdXJF-JI/AAAAAAAAAVE/mNMglUhQ4us/s1600-h/e51.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsGdXJF-JI/AAAAAAAAAVE/mNMglUhQ4us/s320/e51.bmp" alt="" id="BLOGGER_PHOTO_ID_5366890482440206482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Structuring Element (2x4 ones):&lt;br /&gt;Dilation&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsHN1ntB7I/AAAAAAAAAWM/K2FVejH4I2I/s1600-h/d12.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsHN1ntB7I/AAAAAAAAAWM/K2FVejH4I2I/s320/d12.bmp" alt="" id="BLOGGER_PHOTO_ID_5366891315255379890" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsHNoMGdiI/AAAAAAAAAWE/lVodXEkgJUo/s1600-h/d22.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsHNoMGdiI/AAAAAAAAAWE/lVodXEkgJUo/s320/d22.bmp" alt="" id="BLOGGER_PHOTO_ID_5366891311649945122" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsHNb4SBKI/AAAAAAAAAV8/nzKXrHiW8nU/s1600-h/d32.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsHNb4SBKI/AAAAAAAAAV8/nzKXrHiW8nU/s320/d32.bmp" alt="" id="BLOGGER_PHOTO_ID_5366891308345590946" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsHNH9X1aI/AAAAAAAAAV0/PCNT25to9vw/s1600-h/d42.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsHNH9X1aI/AAAAAAAAAV0/PCNT25to9vw/s320/d42.bmp" alt="" id="BLOGGER_PHOTO_ID_5366891302998234530" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsHM3FObRI/AAAAAAAAAVs/gJXI3V6pNIU/s1600-h/d52.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsHM3FObRI/AAAAAAAAAVs/gJXI3V6pNIU/s320/d52.bmp" alt="" id="BLOGGER_PHOTO_ID_5366891298467769618" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Erosion&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsIH8HSI8I/AAAAAAAAAW0/zGfjPW0aXkc/s1600-h/e12.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsIH8HSI8I/AAAAAAAAAW0/zGfjPW0aXkc/s320/e12.bmp" alt="" id="BLOGGER_PHOTO_ID_5366892313430860738" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsIHq8BxgI/AAAAAAAAAWs/tkdjNei52uk/s1600-h/e22.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsIHq8BxgI/AAAAAAAAAWs/tkdjNei52uk/s320/e22.bmp" alt="" id="BLOGGER_PHOTO_ID_5366892308820248066" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsIHVGr1tI/AAAAAAAAAWk/xjAdPCSOElc/s1600-h/e32.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsIHVGr1tI/AAAAAAAAAWk/xjAdPCSOElc/s320/e32.bmp" alt="" id="BLOGGER_PHOTO_ID_5366892302959367890" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsIHHD-m0I/AAAAAAAAAWc/AnChe0xevX0/s1600-h/e42.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsIHHD-m0I/AAAAAAAAAWc/AnChe0xevX0/s320/e42.bmp" alt="" id="BLOGGER_PHOTO_ID_5366892299189918530" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsIGxiZQ0I/AAAAAAAAAWU/JjsJ7x8j4_8/s1600-h/e52.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsIGxiZQ0I/AAAAAAAAAWU/JjsJ7x8j4_8/s320/e52.bmp" alt="" id="BLOGGER_PHOTO_ID_5366892293411914562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Structuring Element (4x2 ones):&lt;br /&gt;Dilation&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsI_nrPLLI/AAAAAAAAAXc/36QoZWXBTe4/s1600-h/d13.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsI_nrPLLI/AAAAAAAAAXc/36QoZWXBTe4/s320/d13.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893270017191090" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsI_WmmkwI/AAAAAAAAAXU/jobcwkZA_vs/s1600-h/d23.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsI_WmmkwI/AAAAAAAAAXU/jobcwkZA_vs/s320/d23.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893265434350338" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsI-2zN2fI/AAAAAAAAAXM/gVhPaMtZsTQ/s1600-h/d33.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsI-2zN2fI/AAAAAAAAAXM/gVhPaMtZsTQ/s320/d33.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893256897321458" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsI-s04IuI/AAAAAAAAAXE/pXV3u2G60jA/s1600-h/d43.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsI-s04IuI/AAAAAAAAAXE/pXV3u2G60jA/s320/d43.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893254219932386" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsI-T64NbI/AAAAAAAAAW8/LEah_PHj4mw/s1600-h/d53.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsI-T64NbI/AAAAAAAAAW8/LEah_PHj4mw/s320/d53.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893247534216626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Erosion&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsJjzjTBOI/AAAAAAAAAYE/enGvop8GgP8/s1600-h/e13.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsJjzjTBOI/AAAAAAAAAYE/enGvop8GgP8/s320/e13.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893891680404706" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsJjpj0WcI/AAAAAAAAAX8/mxcAh_UScLQ/s1600-h/e23.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsJjpj0WcI/AAAAAAAAAX8/mxcAh_UScLQ/s320/e23.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893888998234562" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsJjdhexAI/AAAAAAAAAX0/4WaSPJ-6ygk/s1600-h/e33.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsJjdhexAI/AAAAAAAAAX0/4WaSPJ-6ygk/s320/e33.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893885767205890" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsJjDLlNuI/AAAAAAAAAXs/DurfPn7CF9o/s1600-h/e43.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsJjDLlNuI/AAAAAAAAAXs/DurfPn7CF9o/s320/e43.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893878696031970" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsJi8z0_yI/AAAAAAAAAXk/p-lE_7Vw-h0/s1600-h/e53.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsJi8z0_yI/AAAAAAAAAXk/p-lE_7Vw-h0/s320/e53.bmp" alt="" id="BLOGGER_PHOTO_ID_5366893876985790242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Structuring Element (cross):&lt;br /&gt;Dilation&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsKED6Pw8I/AAAAAAAAAYs/qj00HMwpo54/s1600-h/d14.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsKED6Pw8I/AAAAAAAAAYs/qj00HMwpo54/s320/d14.bmp" alt="" id="BLOGGER_PHOTO_ID_5366894445827441602" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsKD2lOcxI/AAAAAAAAAYk/lol9nEZBjxI/s1600-h/d24.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsKD2lOcxI/AAAAAAAAAYk/lol9nEZBjxI/s320/d24.bmp" alt="" id="BLOGGER_PHOTO_ID_5366894442249614098" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsKDn7rk9I/AAAAAAAAAYc/-6cYRU6EPNU/s1600-h/d34.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsKDn7rk9I/AAAAAAAAAYc/-6cYRU6EPNU/s320/d34.bmp" alt="" id="BLOGGER_PHOTO_ID_5366894438317265874" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsKDnd9KsI/AAAAAAAAAYU/sRUZIkkmuJs/s1600-h/d44.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsKDnd9KsI/AAAAAAAAAYU/sRUZIkkmuJs/s320/d44.bmp" alt="" id="BLOGGER_PHOTO_ID_5366894438192589506" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsKDRWHiRI/AAAAAAAAAYM/FV_ekfevVZ0/s1600-h/d54.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsKDRWHiRI/AAAAAAAAAYM/FV_ekfevVZ0/s320/d54.bmp" alt="" id="BLOGGER_PHOTO_ID_5366894432254134546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Erosion&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsKr8WUXnI/AAAAAAAAAZU/_0s1kDFcIyI/s1600-h/e14.bmp"&gt;&lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnsKr8WUXnI/AAAAAAAAAZU/_0s1kDFcIyI/s320/e14.bmp" alt="" id="BLOGGER_PHOTO_ID_5366895130992467570" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsKrs56EjI/AAAAAAAAAZM/xNcSc5SRuV4/s1600-h/e24.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsKrs56EjI/AAAAAAAAAZM/xNcSc5SRuV4/s320/e24.bmp" alt="" id="BLOGGER_PHOTO_ID_5366895126846771762" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsKrVMs1SI/AAAAAAAAAZE/utf9p9NMCTE/s1600-h/e34.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnsKrVMs1SI/AAAAAAAAAZE/utf9p9NMCTE/s320/e34.bmp" alt="" id="BLOGGER_PHOTO_ID_5366895120483144994" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsKrHqa2QI/AAAAAAAAAY8/bQ-epQHHOeg/s1600-h/e44.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnsKrHqa2QI/AAAAAAAAAY8/bQ-epQHHOeg/s320/e44.bmp" alt="" id="BLOGGER_PHOTO_ID_5366895116849699074" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsKqiHiBZI/AAAAAAAAAY0/gN_IMfkM_Jc/s1600-h/e54.bmp"&gt; &lt;img style="cursor: pointer; width: 60px; height: 60px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnsKqiHiBZI/AAAAAAAAAY0/gN_IMfkM_Jc/s320/e54.bmp" alt="" id="BLOGGER_PHOTO_ID_5366895106771256722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This is probably the most tedious activity ever. So without further ado, I get a &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-6431315909891736437?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/6431315909891736437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/hora-asa-wa-yo-okite-okite-activity-8.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/6431315909891736437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/6431315909891736437'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/hora-asa-wa-yo-okite-okite-activity-8.html' title='ほら朝よ。おきておきて。 (Activity # 8)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrOEUIm9VI/AAAAAAAAAQc/7TKC1ONf6Uk/s72-c/49186.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-4151224346719536976</id><published>2009-07-14T11:55:00.003+09:00</published><updated>2009-08-07T17:30:25.922+09:00</updated><title type='text'>面白い?もちろんです（ない)。 (Activity # 7 )</title><content type='html'>&lt;div style="text-align: justify;"&gt;Activity 7 is all about filtering in the Fourier Domain. Of course, this type of filtering can only be done on unwanted repetitive patterns on images. These patterns can be removed by masking out their frequencies in the fourier space. However, filtering can also be used to enhance images in the Fourier domain.&lt;br /&gt;&lt;br /&gt;We started the activity with a little practice on Fourier space. We explored the Fourier transform plots for dots, squares and gaussians. We played around with the spacing to find out that it does affect the transform.. same goes for the orientation. However, the images are too plain to post here, so I think it's better to jump to the good part.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnrZQ7O6-yI/AAAAAAAAAQk/hxd6jZfbG0c/s1600-h/thumbprint.jpg"&gt;&lt;img style="cursor: pointer; width: 150px; height: 150px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnrZQ7O6-yI/AAAAAAAAAQk/hxd6jZfbG0c/s320/thumbprint.jpg" alt="" id="BLOGGER_PHOTO_ID_5366840790766779170" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrZQwyv4NI/AAAAAAAAAQs/sm_JzrxSqJM/s1600-h/thumprint-fft.bmp"&gt; &lt;img style="cursor: pointer; width: 150px; height: 150px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SnrZQwyv4NI/AAAAAAAAAQs/sm_JzrxSqJM/s320/thumprint-fft.bmp" alt="" id="BLOGGER_PHOTO_ID_5366840787964256466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Truth be told.. I tried my best with the fingerprint enhancement.. demo.. it's really hard to filter out the low frequencies!! I end up losing more information and my image did not get enhanced--at all. That's why I ended up with the conclusion that the image I picked is better off not being tampered with.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Snrcy5CNUKI/AAAAAAAAAQ0/IdL-a3zn2MA/s1600-h/hi_res_vertical_lg.gif"&gt; &lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Snrcy5CNUKI/AAAAAAAAAQ0/IdL-a3zn2MA/s320/hi_res_vertical_lg.gif" alt="" id="BLOGGER_PHOTO_ID_5366844672827019426" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrczO702ZI/AAAAAAAAAQ8/r3mWIK1czXU/s1600-h/moon-fft.bmp"&gt; &lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrczO702ZI/AAAAAAAAAQ8/r3mWIK1czXU/s320/moon-fft.bmp" alt="" id="BLOGGER_PHOTO_ID_5366844678705830290" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Snrcy5CNUKI/AAAAAAAAAQ0/IdL-a3zn2MA/s1600-h/hi_res_vertical_lg.gif"&gt; &lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrczR6fbcI/AAAAAAAAARE/vEnSxDOZG2k/s1600-h/moon-filter.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SnrczR6fbcI/AAAAAAAAARE/vEnSxDOZG2k/s320/moon-filter.bmp" alt="" id="BLOGGER_PHOTO_ID_5366844679505538498" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnrczhUzYpI/AAAAAAAAARM/MP6vpRrnbzU/s1600-h/moon.gif"&gt; &lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SnrczhUzYpI/AAAAAAAAARM/MP6vpRrnbzU/s320/moon.gif" alt="" id="BLOGGER_PHOTO_ID_5366844683642430098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Next up is an image from the moon landing. The images are: original image (TL), the image in Fourier domain(TR), the fft filter used (BL), and the enhanced image (BR). There was a signifcant reduction in the vertical lines, however, some residual lines still appear to be present. Probably need to filter out more of the low-frequency signals but I believe this image has already passed my standard.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Snrj5IQKKeI/AAAAAAAAARU/jE_rOVcQSSY/s1600-h/canvasweave.JPG"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Snrj5IQKKeI/AAAAAAAAARU/jE_rOVcQSSY/s320/canvasweave.JPG" alt="" id="BLOGGER_PHOTO_ID_5366852476572674530" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/Snrj5ejQlXI/AAAAAAAAARc/fetvQrJMOqA/s1600-h/weave-fft.bmp"&gt; &lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/Snrj5ejQlXI/AAAAAAAAARc/fetvQrJMOqA/s320/weave-fft.bmp" alt="" id="BLOGGER_PHOTO_ID_5366852482558367090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrlggwRsQI/AAAAAAAAAR8/EomqNyB06YQ/s1600-h/weave-noise.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SnrlggwRsQI/AAAAAAAAAR8/EomqNyB06YQ/s320/weave-noise.bmp" alt="" id="BLOGGER_PHOTO_ID_5366854252676362498" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snrlga_KLEI/AAAAAAAAAR0/fF_9NXzvzrk/s1600-h/weave-out.bmp"&gt; &lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/Snrlga_KLEI/AAAAAAAAAR0/fF_9NXzvzrk/s320/weave-out.bmp" alt="" id="BLOGGER_PHOTO_ID_5366854251128171586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Last but not the least would be the filtering for a painting. The weave texture on the canvas can be pretty tricky.. and depending on the situation we might want it, or not. The images displayed above are: original image (TL), the image in Fourier space (TR), the pattern we've been trying to filter out or the weave (BL), and the reconstructed image in grayscale (BR).&lt;br /&gt;&lt;br /&gt;The brush strokes were enhanced after the weave pattern was removed, so it's probably a sign that the code and the filter works. Another way to verify the routine would be to check the noise profile--and it does look like the weave pattern.&lt;br /&gt;&lt;br /&gt;For this activity, I'll probably give myself an &lt;span style="font-weight: bold;"&gt;8&lt;/span&gt; since I did get through the tedious drills in Fourier Transform, I succeeded in doing the two image enhancements and I wasted an entire period working ONLY on the fingerprint enhancement. It's probably a science in itself, and it being a sub-activity just doesn't fit.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-4151224346719536976?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/4151224346719536976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/omoshiroi-mochiron-desu-nai-activity-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/4151224346719536976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/4151224346719536976'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/omoshiroi-mochiron-desu-nai-activity-7.html' title='面白い?もちろんです（ない)。 (Activity # 7 )'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_n3LhpZXYr_g/SnrZQ7O6-yI/AAAAAAAAAQk/hxd6jZfbG0c/s72-c/thumbprint.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-2258141221122250227</id><published>2009-07-09T11:27:00.008+09:00</published><updated>2009-09-07T01:12:14.210+09:00</updated><title type='text'>もうあたし,　止まらんあい!! (Activity # 6)</title><content type='html'>Moar pix!! Moar!! Naow na!!&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlVV0JijMPI/AAAAAAAAALs/PI_6Y5UxvIk/s1600-h/square.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlVV0JijMPI/AAAAAAAAALs/PI_6Y5UxvIk/s320/square.bmp" alt="" id="BLOGGER_PHOTO_ID_5356281686229463282" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVV0ekrbKI/AAAAAAAAAL0/CwDLm7Xku-0/s1600-h/squarefftshift.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVV0ekrbKI/AAAAAAAAAL0/CwDLm7Xku-0/s320/squarefftshift.bmp" alt="" id="BLOGGER_PHOTO_ID_5356281691875536034" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVVzvDiyYI/AAAAAAAAALc/PXYMobHNjJo/s1600-h/donut.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVVzvDiyYI/AAAAAAAAALc/PXYMobHNjJo/s320/donut.bmp" alt="" id="BLOGGER_PHOTO_ID_5356281679120091522" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVVz9fhubI/AAAAAAAAALk/BwvaRnpbuKQ/s1600-h/donutfftshift.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVVz9fhubI/AAAAAAAAALk/BwvaRnpbuKQ/s320/donutfftshift.bmp" alt="" id="BLOGGER_PHOTO_ID_5356281682995558834" border="0" /&gt;&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVWh011KwI/AAAAAAAAAL8/BMCEQTY60uY/s1600-h/squarea.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVWh011KwI/AAAAAAAAAL8/BMCEQTY60uY/s320/squarea.bmp" alt="" id="BLOGGER_PHOTO_ID_5356282470947171074" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlVWiHRbBvI/AAAAAAAAAME/t-R-3aJ0yE0/s1600-h/squareafftshift.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlVWiHRbBvI/AAAAAAAAAME/t-R-3aJ0yE0/s320/squareafftshift.bmp" alt="" id="BLOGGER_PHOTO_ID_5356282475894736626" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVWh011KwI/AAAAAAAAAL8/BMCEQTY60uY/s1600-h/squarea.bmp"&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlVWilHZGhI/AAAAAAAAAMM/Ek1qjY0Zhm8/s1600-h/slita.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlVWilHZGhI/AAAAAAAAAMM/Ek1qjY0Zhm8/s320/slita.bmp" alt="" id="BLOGGER_PHOTO_ID_5356282483905731090" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVWi_1VXYI/AAAAAAAAAMU/GozRm_zKbwk/s1600-h/slitafftshift.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVWi_1VXYI/AAAAAAAAAMU/GozRm_zKbwk/s320/slitafftshift.bmp" alt="" id="BLOGGER_PHOTO_ID_5356282491077746050" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SlVXlgc8YEI/AAAAAAAAAMc/a2bT_RZbjWg/s1600-h/slitb.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SlVXlgc8YEI/AAAAAAAAAMc/a2bT_RZbjWg/s320/slitb.bmp" alt="" id="BLOGGER_PHOTO_ID_5356283633705181250" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVXlo9CZ_I/AAAAAAAAAMk/qUIS7fNVueM/s1600-h/slitbfftshift.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVXlo9CZ_I/AAAAAAAAAMk/qUIS7fNVueM/s320/slitbfftshift.bmp" alt="" id="BLOGGER_PHOTO_ID_5356283635987277810" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlVZCNK5V8I/AAAAAAAAAMs/CSHqbnLiztE/s1600-h/10010004fftshiftsup05.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlVZCNK5V8I/AAAAAAAAAMs/CSHqbnLiztE/s320/10010004fftshiftsup05.bmp" alt="" id="BLOGGER_PHOTO_ID_5356285226257045442" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlVZCFhF8qI/AAAAAAAAAM0/aHy_D8AAC1k/s1600-h/10010004fftshiftsup05mesh.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlVZCFhF8qI/AAAAAAAAAM0/aHy_D8AAC1k/s320/10010004fftshiftsup05mesh.bmp" alt="" id="BLOGGER_PHOTO_ID_5356285224202662562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Continuing from Activity # 5 , this time we made use of different shapes for the apertures -- square, annulus, square annulus, a double-slit, and two dots. The corresponding images can be found right next to its aperture.&lt;br /&gt;&lt;br /&gt;The next part of the activity investigated the anamorphic property of Fourier Transform. It was a step-by-step routine, and the end product would be the last two images. Different variations were tested which included the superposition and rotation of sinusoidal waves.&lt;br /&gt;&lt;br /&gt;As of the moment, my interest goes to the attempt to generate my checkered images (will post them as soon as they're done.)&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVfv3VN3pI/AAAAAAAAAM8/m5LpkdOfMdY/s1600-h/7777.jpg"&gt;&lt;img style="cursor: pointer; width: 225px; height: 197px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlVfv3VN3pI/AAAAAAAAAM8/m5LpkdOfMdY/s320/7777.jpg" alt="" id="BLOGGER_PHOTO_ID_5356292607738502802" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Raffy taught me a valuable trick today--just change&lt;span style="font-style: italic;"&gt; imshow()&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;mesh()&lt;/span&gt; to get a rather interesting 3-D image. xD&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlVZCNK5V8I/AAAAAAAAAMs/CSHqbnLiztE/s1600-h/10010004fftshiftsup05.bmp"&gt; &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-2258141221122250227?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/2258141221122250227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/moar-pix-moar-naow-na.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/2258141221122250227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/2258141221122250227'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/moar-pix-moar-naow-na.html' title='もうあたし,　止まらんあい!! (Activity # 6)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_n3LhpZXYr_g/SlVV0JijMPI/AAAAAAAAALs/PI_6Y5UxvIk/s72-c/square.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-218395008980497217</id><published>2009-07-07T11:43:00.012+09:00</published><updated>2009-07-07T21:12:32.400+09:00</updated><title type='text'>七夕祭りへようこそ!! (Activity # 5)</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK_iJj-lcI/AAAAAAAAAKU/nY9uhprY9MU/s1600-h/1240274790165.gif"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK_iJj-lcI/AAAAAAAAAKU/nY9uhprY9MU/s320/1240274790165.gif" alt="" id="BLOGGER_PHOTO_ID_5355553500300219842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Applied Physics 186 class isn't an image processing class for nothing. Of course, its students are EXPECTED to have lots of images in their activity blogs.. xD&lt;br /&gt;&lt;br /&gt;5 - A:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK3IE0yN-I/AAAAAAAAAIM/2iUgg4L2ggs/s1600-h/circle.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK3IE0yN-I/AAAAAAAAAIM/2iUgg4L2ggs/s320/circle.bmp" alt="" id="BLOGGER_PHOTO_ID_5355544256258914274" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK3H_epcrI/AAAAAAAAAIE/yOppcIyCqDE/s1600-h/6a-01.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK3H_epcrI/AAAAAAAAAIE/yOppcIyCqDE/s320/6a-01.bmp" alt="" id="BLOGGER_PHOTO_ID_5355544254823887538" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK3H9_fB_I/AAAAAAAAAH8/WW9eAH19PlM/s1600-h/6a-02.bmp"&gt;&lt;img style="cursor: pointer; width: 76px; height: 76px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK3H9_fB_I/AAAAAAAAAH8/WW9eAH19PlM/s320/6a-02.bmp" alt="" id="BLOGGER_PHOTO_ID_5355544254424745970" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlK3HWqWTBI/AAAAAAAAAH0/4ambEuwH58o/s1600-h/6a-03.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlK3HWqWTBI/AAAAAAAAAH0/4ambEuwH58o/s320/6a-03.bmp" alt="" id="BLOGGER_PHOTO_ID_5355544243867110418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlK3mB4_bnI/AAAAAAAAAIs/t6cjRiqSG6g/s1600-h/A.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlK3mB4_bnI/AAAAAAAAAIs/t6cjRiqSG6g/s320/A.bmp" alt="" id="BLOGGER_PHOTO_ID_5355544770867326578" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK3lgN-BNI/AAAAAAAAAIk/psS1aPUi27U/s1600-h/6a-04.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK3lgN-BNI/AAAAAAAAAIk/psS1aPUi27U/s320/6a-04.bmp" alt="" id="BLOGGER_PHOTO_ID_5355544761828508882" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK3lsaelvI/AAAAAAAAAIc/SDV8GbG0_DQ/s1600-h/6a-05.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK3lsaelvI/AAAAAAAAAIc/SDV8GbG0_DQ/s320/6a-05.bmp" alt="" id="BLOGGER_PHOTO_ID_5355544765102200562" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlK3ldma7aI/AAAAAAAAAIU/fWvBxkWPhfw/s1600-h/6a-06.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlK3ldma7aI/AAAAAAAAAIU/fWvBxkWPhfw/s320/6a-06.bmp" alt="" id="BLOGGER_PHOTO_ID_5355544761125760418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Part A of Activity 5 focuses on the familiarization with the discrete FFT. We have two sample images, a circle and a letter 'A'. All we needed to do is apply a discrete &lt;span style="font-style: italic;"&gt;FFT2()&lt;/span&gt; on the image, give it an &lt;span style="font-style: italic;"&gt;FFTSHIFT()&lt;/span&gt;, and apply an &lt;span style="font-style: italic;"&gt;FFT2()&lt;/span&gt; again to get an inverted image of the original. The images above are chronologically-ordered to give the viewer an idea of the process.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;5-B:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK4JCLkJkI/AAAAAAAAAJM/-QFr-YoJ1gk/s1600-h/vip.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK4JCLkJkI/AAAAAAAAAJM/-QFr-YoJ1gk/s320/vip.bmp" alt="" id="BLOGGER_PHOTO_ID_5355545372240651842" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK4ISO12yI/AAAAAAAAAI0/WXvYH-8Jcpk/s1600-h/6b-100.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK4ISO12yI/AAAAAAAAAI0/WXvYH-8Jcpk/s320/6b-100.bmp" alt="" id="BLOGGER_PHOTO_ID_5355545359369493282" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK4Iq5aI3I/AAAAAAAAAI8/aYIwyWh-Ug4/s1600-h/6b-50.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK4Iq5aI3I/AAAAAAAAAI8/aYIwyWh-Ug4/s320/6b-50.bmp" alt="" id="BLOGGER_PHOTO_ID_5355545365990482802" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK4I3zRO7I/AAAAAAAAAJE/SGV0noHEGFk/s1600-h/6b-10.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK4I3zRO7I/AAAAAAAAAJE/SGV0noHEGFk/s320/6b-10.bmp" alt="" id="BLOGGER_PHOTO_ID_5355545369454394290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;Part B is all about the simulation of an imaging device. This part makes use of a concept known as &lt;span style="font-weight: bold;"&gt;Convolution&lt;/span&gt;, which is a linear operation for linear transformations as long as they follow the Convolution theorem. The basic gist is that we are imaging an image (VIP), through various apertures (circle, circle2, circle3).  The image above displays the original 'VIP', along with the images projected from 100%, 50% and 10% of the circular aperture respectively.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;5-C:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SlK40rHbaBI/AAAAAAAAAJU/xqfxRpIl0xg/s1600-h/rain.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SlK40rHbaBI/AAAAAAAAAJU/xqfxRpIl0xg/s320/rain.bmp" alt="" id="BLOGGER_PHOTO_ID_5355546121963530258" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK-VgKIBpI/AAAAAAAAAKM/DJzRTTc057g/s1600-h/A2.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK-VgKIBpI/AAAAAAAAAKM/DJzRTTc057g/s320/A2.bmp" alt="" id="BLOGGER_PHOTO_ID_5355552183515874962" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK40_1dRyI/AAAAAAAAAJc/CyydEj_b70o/s1600-h/6c.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK40_1dRyI/AAAAAAAAAJc/CyydEj_b70o/s320/6c.bmp" alt="" id="BLOGGER_PHOTO_ID_5355546127525300002" border="0" /&gt; &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Part C worked with Correlation through Template Matching. For the image, we used 'THE RAIN IN SPAIN STAYS MAINLY IN THE PLAIN' which is quite known (although unknown to me. xD). We used another image for the letter A, the trick being it had to be of the same size and font as the one in the previous image, and ta daa.. We obtained an image wherein all the 'A's are highlighted. Pretty nifty for looking for patterns in a large image.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;5-D:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK5UawVA3I/AAAAAAAAAJk/AYYjFKkUk2k/s1600-h/6d-horizontal.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK5UawVA3I/AAAAAAAAAJk/AYYjFKkUk2k/s320/6d-horizontal.bmp" alt="" id="BLOGGER_PHOTO_ID_5355546667327488882" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK5Ui-kGoI/AAAAAAAAAJs/99y2gBIwKmM/s1600-h/6d-vertical.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK5Ui-kGoI/AAAAAAAAAJs/99y2gBIwKmM/s320/6d-vertical.bmp" alt="" id="BLOGGER_PHOTO_ID_5355546669534681730" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK5U5OhGVI/AAAAAAAAAJ0/S4zPOcujBRw/s1600-h/6d-diagonal.bmp"&gt; &lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlK5U5OhGVI/AAAAAAAAAJ0/S4zPOcujBRw/s320/6d-diagonal.bmp" alt="" id="BLOGGER_PHOTO_ID_5355546675507173714" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK5U2o_pEI/AAAAAAAAAJ8/reT5_swf_iU/s1600-h/6d-spot.bmp"&gt;&lt;img style="cursor: pointer; width: 75px; height: 75px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK5U2o_pEI/AAAAAAAAAJ8/reT5_swf_iU/s320/6d-spot.bmp" alt="" id="BLOGGER_PHOTO_ID_5355546674812920898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finally, Part D was about detecting edges with the use of the convolution integral. All that was needed was a 3x3 matrix pattern such that the total sum is zero. I used a horizontal, vertical, diagonal and a spot pattern to obtain the images above.&lt;br /&gt;&lt;br /&gt;I think I deserve a &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; for the activity for finishing it earlier than expected along with Neil. It's easy because it's a demonstration activity, aside from the fact that the stuff needed is readily available.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-218395008980497217?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/218395008980497217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/tanabata-matsuri-he-youkoso-activity-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/218395008980497217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/218395008980497217'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/tanabata-matsuri-he-youkoso-activity-5.html' title='七夕祭りへようこそ!! (Activity # 5)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_n3LhpZXYr_g/SlK_iJj-lcI/AAAAAAAAAKU/nY9uhprY9MU/s72-c/1240274790165.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-8353032901369810400</id><published>2009-07-06T21:35:00.010+09:00</published><updated>2009-09-07T01:14:31.876+09:00</updated><title type='text'>あのぉさあ。。晩御飯は、おいしいですか?　(Activity # 4)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlH8ekwi2VI/AAAAAAAAAHM/aqBV0oPXaOI/s1600-h/nendoroid-zange-chan-1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 187px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlH8ekwi2VI/AAAAAAAAAHM/aqBV0oPXaOI/s320/nendoroid-zange-chan-1.jpg" alt="" id="BLOGGER_PHOTO_ID_5355339034113792338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I actually missed this activity that day.  I spent the day in a hospital bed with a liter of 0.9% sodium chloride solution connected to my hand through plastic transparent tubing. Not to mention, I got a shot of gamma-immuno to strengthen my immune system and get my platelets up. It was the flu. However, the symptoms were more dengue-like than H1N1.. better luck next time.&lt;br /&gt;&lt;br /&gt;Anyway, the activity was on Histogram Manipulation. Just like the others, I had to make use of the &lt;a href="http://a-little-learning.blogspot.com/2008/06/image-histograms-in-scilab.html"&gt;useful piece of code that can be found on a little learning&lt;/a&gt;. Getting it to work on my pc in CSRC was a bit tricky, good thing I had &lt;span style="font-weight: bold;"&gt;Neil&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;Rommel&lt;/span&gt; with me. For manipulating the histogram, &lt;span style="font-weight: bold;"&gt;Gilbert &lt;/span&gt;shared this little bit of info with me:&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;good = [];&lt;br /&gt;for i = 1:size(poor,1)&lt;br /&gt;for j = 1:size(poor,2)&lt;br /&gt;good(i,j) = cdf(poor(i,j));&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;good: new image&lt;br /&gt;poor: old image&lt;/blockquote&gt;With everything all set, all I needed was a picture to work on. The one i got from &lt;a href="http://www.nuffy.net/articles/top-10-bizarre-x-ray-images.html"&gt;this site&lt;/a&gt; seems pretty nifty:&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlH2DOpkvII/AAAAAAAAAF8/0UmVRkBzL4k/s1600-h/homer_xray.jpg"&gt;&lt;img style="cursor: pointer; width: 100px; height: 100px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlH2DOpkvII/AAAAAAAAAF8/0UmVRkBzL4k/s320/homer_xray.jpg" alt="" id="BLOGGER_PHOTO_ID_5355331967252741250" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlH5ZaB0BFI/AAAAAAAAAGE/hvgkgZnKhyo/s1600-h/unalt_histo.bmp"&gt; &lt;img style="cursor: pointer; width: 133px; height: 100px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlH5ZaB0BFI/AAAAAAAAAGE/hvgkgZnKhyo/s320/unalt_histo.bmp" alt="" id="BLOGGER_PHOTO_ID_5355335646799201362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Right next to the image is its histogram. Using the chunk of code Gilbert suggested to apply the transformation, I gave it a shot for a linear function:&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SlH5ZkIwhKI/AAAAAAAAAGM/bZk_D21qgh0/s1600-h/linear_trans.bmp"&gt;&lt;img style="cursor: pointer; width: 133px; height: 100px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SlH5ZkIwhKI/AAAAAAAAAGM/bZk_D21qgh0/s320/linear_trans.bmp" alt="" id="BLOGGER_PHOTO_ID_5355335649512686754" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SlH7mU3tOdI/AAAAAAAAAG8/WmNHsHCa1HI/s1600-h/linear.bmp"&gt; &lt;img style="cursor: pointer; width: 100px; height: 100px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SlH7mU3tOdI/AAAAAAAAAG8/WmNHsHCa1HI/s320/linear.bmp" alt="" id="BLOGGER_PHOTO_ID_5355338067776190930" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlH5aFpR4gI/AAAAAAAAAGc/vEducdqs77Q/s1600-h/linear_histo.bmp"&gt;  &lt;img style="cursor: pointer; width: 132px; height: 100px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlH5aFpR4gI/AAAAAAAAAGc/vEducdqs77Q/s320/linear_histo.bmp" alt="" id="BLOGGER_PHOTO_ID_5355335658507461122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The linear function did not turn out as good as expected. In any case, the eye has non-linear response and therefore a non-linear transformation (square function) should be better:&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlH5aHTUkHI/AAAAAAAAAGk/yk5T5MJRVds/s1600-h/non-linear_trans.bmp"&gt;&lt;img style="cursor: pointer; width: 133px; height: 100px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlH5aHTUkHI/AAAAAAAAAGk/yk5T5MJRVds/s320/non-linear_trans.bmp" alt="" id="BLOGGER_PHOTO_ID_5355335658952233074" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlH65kDfp7I/AAAAAAAAAG0/DPywwh7gMR0/s1600-h/non-linear_histo.bmp"&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlH7mtkt9VI/AAAAAAAAAHE/Ed5Tcxz_yZs/s1600-h/non-linear.bmp"&gt;&lt;img style="cursor: pointer; width: 100px; height: 100px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlH7mtkt9VI/AAAAAAAAAHE/Ed5Tcxz_yZs/s320/non-linear.bmp" alt="" id="BLOGGER_PHOTO_ID_5355338074407433554" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlH65kDfp7I/AAAAAAAAAG0/DPywwh7gMR0/s1600-h/non-linear_histo.bmp"&gt; &lt;img style="cursor: pointer; width: 133px; height: 100px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SlH65kDfp7I/AAAAAAAAAG0/DPywwh7gMR0/s320/non-linear_histo.bmp" alt="" id="BLOGGER_PHOTO_ID_5355337298758051762" border="0" /&gt; &lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;And that concludes the histogram activity. I think I'll get a &lt;span style="font-weight: bold;"&gt;nine&lt;/span&gt; this time for missing the meeting, still high enough considering I finished the activity in a meeting instead of two meetings. xD&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-8353032901369810400?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/8353032901369810400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/activity-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/8353032901369810400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/8353032901369810400'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/07/activity-4.html' title='あのぉさあ。。晩御飯は、おいしいですか?　(Activity # 4)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_n3LhpZXYr_g/SlH8ekwi2VI/AAAAAAAAAHM/aqBV0oPXaOI/s72-c/nendoroid-zange-chan-1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-2398067031799264998</id><published>2009-06-23T11:08:00.019+09:00</published><updated>2009-07-08T21:50:39.033+09:00</updated><title type='text'>それでいいですか? (Activity # 3)</title><content type='html'>We were oriented with the different kinds of images today:&lt;br /&gt;1. Binary - simply black and white images&lt;br /&gt;2. Grayscale - shades of gray; where a pixel is given a value between 0 (black) and 255 (white)&lt;br /&gt;3. True-color - has three color channels (usually in RGB)&lt;br /&gt;4. Indexed - similar to true-color except it contains both the image and indexed RGB info.. it is safe to assume that most grayscale images are indexed.&lt;br /&gt;&lt;br /&gt;We were asked to collect different types of images.. I selected four pictures, one for each basic type.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Binary&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SkA-mPGBAsI/AAAAAAAAAEU/0gHnP_8ozvo/s1600-h/activity_2.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SkA-mPGBAsI/AAAAAAAAAEU/0gHnP_8ozvo/s320/activity_2.bmp" alt="" id="BLOGGER_PHOTO_ID_5350345183923864258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;(My own generated image--same as Activity # 2)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-style: italic;"&gt;FileName: activity_3.bmp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FileSize: 12864&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Format: BMP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Width: 320&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Height: 320&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Depth: 8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;StorageType: indexed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;NumberOfColors: 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ResolutionUnit: centimeter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;XResolution: 28.340000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;YResolution: 28.340000&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Grayscale&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SkA-mQcX7CI/AAAAAAAAAEc/NgthkbhrlLc/s1600-h/100720.jpg"&gt;&lt;img style="cursor: pointer; width: 109px; height: 320px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SkA-mQcX7CI/AAAAAAAAAEc/NgthkbhrlLc/s320/100720.jpg" alt="" id="BLOGGER_PHOTO_ID_5350345184286075938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;(This is a picture from the &lt;a href="http://myanimelist.net/clubs.php?action=view&amp;amp;t=pic&amp;amp;id=11323&amp;amp;pid=100720"&gt;Azusa Nakano Fanclub&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-style: italic;"&gt;FileName: 100720.jpg&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FileSize: 70426&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Format: JPEG&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Width: 204&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Height: 600&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Depth: 8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;StorageType: indexed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;NumberOfColors: 256&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;ResolutionUnit: inch&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;XResolution: 72.000000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;YResolution: 72.000000&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-weight: bold;"&gt;True-color&lt;/span&gt; (the one here is in JPEG.. BMP is not web-friendly)&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SkIZkSFvY1I/AAAAAAAAAFE/Yyl8MPIte_g/s1600-h/%E9%AD%94%E6%B3%95%E5%B0%91%E5%A5%B3%E3%83%AA%E3%83%AA%E3%82%AB%E3%83%AB%E3%81%AA%E3%81%AE%E3%81%AF.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 200px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SkIZkSFvY1I/AAAAAAAAAFE/Yyl8MPIte_g/s320/%E9%AD%94%E6%B3%95%E5%B0%91%E5%A5%B3%E3%83%AA%E3%83%AA%E3%82%AB%E3%83%AB%E3%81%AA%E3%81%AE%E3%81%AF.jpg" alt="" id="BLOGGER_PHOTO_ID_5350867418391470930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;(Adding the Mahou Shoujo Lyrical Nanoha emblem makes me the final author of this image. If it interests anyone, I got the original background from &lt;a href="http://moe.imouto.org/post/show/74001"&gt;moe.imouto.org&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-style: italic;"&gt;FileName: nanoha_wallpaper.bmp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FileSize: 768056&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Format: BMP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Width: 640&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Height: 400&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Depth: 8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;StorageType: truecolor&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;NumberOfColors: 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ResolutionUnit: centimeter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;XResolution: 78.720000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;YResolution: 78.72000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-weight: bold;"&gt;Indexed&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SkIaZVHT2KI/AAAAAAAAAFM/L2CZ3ewzY38/s1600-h/isisuke_uljp01368.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SkIaZVHT2KI/AAAAAAAAAFM/L2CZ3ewzY38/s320/isisuke_uljp01368.jpg" alt="" id="BLOGGER_PHOTO_ID_5350868329736427682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;(Just so you wouldn't think that I prefer 2-D girls over 3-D.. xD I got this fine picture of my favorite seiyuu and J-Pop artist, Mizuki Nana, from &lt;a href="http://www.sankakucomplex.com/2008/09/09/seiyuu-idol-gallery/"&gt;Sankaku Complex's Seiyuu Idol Gallery&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-style: italic;"&gt;FileName: isisuke_uljp01368.png&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FileSize: 46755&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Format: PNG&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Width: 300&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Height: 240&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Depth: 8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;StorageType: truecolor&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;NumberOfColors: 256&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ResolutionUnit: centimeter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;XResolution: 117.720000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;YResolution: 117.720000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[Edit: Included part b of the activity.]&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Unfortunately, Activity # 3 does not end here. What's left to do is to use the area calculation routine in Activity # 2 for a scanned image in Activity # 3. A scanned image is used so that we can have a sense of its physical area, and compare this area with the one obtained using the Green's Theorem.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlSPmmE6rII/AAAAAAAAALE/N-jo0RvkbLs/s1600-h/scan0001.jpg"&gt;&lt;img style="cursor: pointer; width: 187px; height: 250px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlSPmmE6rII/AAAAAAAAALE/N-jo0RvkbLs/s320/scan0001.jpg" alt="" id="BLOGGER_PHOTO_ID_5356063750069333122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlSPmV8zeTI/AAAAAAAAAK8/_M3T560r6MM/s1600-h/hokkaido.jpg"&gt;&lt;img style="cursor: pointer; width: 150px; height: 150px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SlSPmV8zeTI/AAAAAAAAAK8/_M3T560r6MM/s320/hokkaido.jpg" alt="" id="BLOGGER_PHOTO_ID_5356063745740339506" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlSPmE81bBI/AAAAAAAAAK0/2s5SpRFIQtY/s1600-h/hokkaido_contour.bmp"&gt;&lt;img style="cursor: pointer; width: 150px; height: 150px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlSPmE81bBI/AAAAAAAAAK0/2s5SpRFIQtY/s320/hokkaido_contour.bmp" alt="" id="BLOGGER_PHOTO_ID_5356063741177064466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I got the image of Japan from my old volumes of Grolier's Encyclopedia of Knowledge (1999, Vol. 10, p. 316, JAPAN article.) What I did next was to lasso the Hokkaido part of the map, and paint black on a another layer. I removed the layer with the original map, and it left me with a black object on a white background. Then, I inverted the colors to get the second image, and had my contour follower perform the routine to get the last image to the right.&lt;br /&gt;&lt;br /&gt;Now here comes the part where I give the details, enough to give the reader an information overload. Wiki tells me that Hokkaido has a land area of 77,981.87 km². The map was drawn to a scale of 1:10,615,000--proper conversion tells me that 1mm in the map is 10,615,000km in physical units (this was confirmed with the use of a ruler xD). The image was scanned to a resolution of 200 dots per inch. Now all that's left to do is the math:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlSSlgqvgdI/AAAAAAAAALU/zbBvC1-3CdA/s1600-h/formula.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 23px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SlSSlgqvgdI/AAAAAAAAALU/zbBvC1-3CdA/s320/formula.jpg" alt="" id="BLOGGER_PHOTO_ID_5356067029972386258" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Hehe.. getting that formula to fit the length of this blog site was rather tricky. In any case, the area calculation routine gave me &lt;span style="font-weight: bold;"&gt;18691.5 pixels. &lt;/span&gt;Now, if were to compare this to our theoretical value, we realize that we have an error of &lt;span style="font-weight: bold;"&gt;56%&lt;/span&gt;. Why that large of an error? Simply because the routine's weakness is concave curvatures, something that can be quite prominent to an outline of an island.&lt;br /&gt;&lt;br /&gt;Oh well, at least the contour follower gave me one hell of an outline. It almost looks like the original pattern. If there's one thing we can learn from this, it's the fact that this area estimation routine has its limits and that more can be done to actually fine-tune its estimation.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;P.S. I think I'll have to settle for a ROMANIZED title for my blog post. Will change it the moment I get home. CSRC computers don't have IME. T_T [Edit: Done!] [Edit: Added the imfinfo descriptions.. xD]&lt;br /&gt;&lt;br /&gt;The only trick here is to make sure that the filename points to the file and to make sure the file extensions are there. Yey! I get another &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;. xD&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-2398067031799264998?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/2398067031799264998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/some-random-japanese-phrase-here.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/2398067031799264998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/2398067031799264998'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/some-random-japanese-phrase-here.html' title='それでいいですか? (Activity # 3)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_n3LhpZXYr_g/SkA-mPGBAsI/AAAAAAAAAEU/0gHnP_8ozvo/s72-c/activity_2.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-7203326079399422229</id><published>2009-06-23T10:58:00.008+09:00</published><updated>2009-06-28T12:00:59.322+09:00</updated><title type='text'>答えは、どこですか？ (Activity # 2)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/Sj-YGrs1fmI/AAAAAAAAAEE/L4WwjdH5_ak/s1600-h/12895l.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 225px; height: 244px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/Sj-YGrs1fmI/AAAAAAAAAEE/L4WwjdH5_ak/s320/12895l.jpg" alt="" id="BLOGGER_PHOTO_ID_5350162122916855394" border="0" /&gt;&lt;/a&gt;[Edit: Prepared this for tomorrow.. that way the title for the post is in Japanese. xD]&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;We've been having difficulties with siptoolbox here at the CSRC--meaning this activity is post-poned until prior notice.&lt;br /&gt;&lt;br /&gt;For now, we've been instructed to generate an image for &lt;span style="font-weight: bold;"&gt;Activity 2&lt;/span&gt;. I came up with this one:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SkAzUBgBetI/AAAAAAAAAEM/6FT9eZ8NYow/s1600-h/activity_2.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SkAzUBgBetI/AAAAAAAAAEM/6FT9eZ8NYow/s320/activity_2.bmp" alt="" id="BLOGGER_PHOTO_ID_5350332776409299666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The geometric shape in the binary image needs to be of known area, thus I generated a 320px x 320px image. I cut it diagonally in half, and flipped the inner triangle to obtain the image. Since the image can be reduced to a triangle of half the area of a 320px x 320px square, the area is simply:&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;320*320 = 102400*0.5 = &lt;span style="font-weight: bold;"&gt;51200 square pixels&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Apparently, we needed two more images, and here they are:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SkLVHuo2faI/AAAAAAAAAFc/VoeG8cXhAfg/s1600-h/activity_2b.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SkLVHuo2faI/AAAAAAAAAFc/VoeG8cXhAfg/s320/activity_2b.bmp" alt="" id="BLOGGER_PHOTO_ID_5351073636024745378" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SkBBU_ZQpvI/AAAAAAAAAE8/8OxnScTCnJU/s1600-h/activity_2c.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SkBBU_ZQpvI/AAAAAAAAAE8/8OxnScTCnJU/s320/activity_2c.bmp" alt="" id="BLOGGER_PHOTO_ID_5350348186186721010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I set my convention to obtaining the area of the black-shaded regions. The are of the image at the left is simply the area of a triangle of length and base equal to 160px:&lt;br /&gt;&lt;div style="text-align: center;"&gt;0.5*160 px*160 px = &lt;span style="font-weight: bold;"&gt;12800 square pixels&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Thus, the area of the image at the right is simply equal to half the area of the image subtracted by the area of the inner triangle:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;div style="text-align: center;"&gt;51200 square pixels - 12800 square pixels&lt;br /&gt;= &lt;span style="font-weight: bold;"&gt;38400 square pixels&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;In order to compute for the experimental values, I used the function follow() found on the SIP toolbox. The important chunk of code to use would be:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-style: italic;"&gt;image = gray_imread('activity_2c.bmp');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;for i=1:320, j=1:320;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;  image(i,j)=(image(i,j)*-1)+1;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;  end;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[x,y]=follow(image);&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;and in order to compute the area, we use Green's Theorem:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;n=length(x);&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;A=0;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;for i=1:n-1;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;Ai=0.5*(x(i)*y(i+1)-x(i+1)*y(i));&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;A=A+Ai;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;end;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have Neil to thank for checking my codes. In any case, here are the results:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_n3LhpZXYr_g/SkbZwIWNNiI/AAAAAAAAAFk/_HaDiazqPHw/s1600-h/activity_2_contour.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_n3LhpZXYr_g/SkbZwIWNNiI/AAAAAAAAAFk/_HaDiazqPHw/s320/activity_2_contour.bmp" alt="" id="BLOGGER_PHOTO_ID_5352204628073985570" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/SkbZwIVSMfI/AAAAAAAAAFs/WzKl8lIn8eM/s1600-h/activity_2b_contour.bmp"&gt; &lt;img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/SkbZwIVSMfI/AAAAAAAAAFs/WzKl8lIn8eM/s320/activity_2b_contour.bmp" alt="" id="BLOGGER_PHOTO_ID_5352204628070117874" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SkbZwQhb1RI/AAAAAAAAAF0/BE7Mix7Lg2A/s1600-h/activity_2c_contour.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SkbZwQhb1RI/AAAAAAAAAF0/BE7Mix7Lg2A/s320/activity_2c_contour.bmp" alt="" id="BLOGGER_PHOTO_ID_5352204630268564754" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I used this routine for plotting the follow contours:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;xset('window',1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;xbasc()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;plot2d(x,y,rect=[0,0,320,320]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is important to note that contour assumes the object to be white and its background black. Also, the routine cannot detect any shapes inside a contour, thus making it effective only for contours with defined edges. The area calculated via Green's Theorem yielded the following results:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Image A (unaltered) = &lt;span style="font-weight: bold;"&gt;63521&lt;/span&gt; [theoretical: 51200, error: 24.1%]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Image A (sum of B and C) = &lt;span style="font-weight: bold;"&gt;50602&lt;/span&gt; [theoretical: 51200, error: 1.17%]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Image A (difference of B and C) = &lt;span style="font-weight: bold;"&gt;50840.5&lt;/span&gt; [theoretical: 51200, error: 0.702%]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Image B = 12680.5 [theoretical: &lt;span style="font-weight: bold;"&gt;12800&lt;/span&gt;, error: 0.934%]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Image C = 37921.5 [theoretical: &lt;span style="font-weight: bold;"&gt;38400&lt;/span&gt;, error: 1.25%]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I get a &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; for making sure that follow() follows the contour I wanted. xD&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-7203326079399422229?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/7203326079399422229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/blog-post_22.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/7203326079399422229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/7203326079399422229'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/blog-post_22.html' title='答えは、どこですか？ (Activity # 2)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_n3LhpZXYr_g/Sj-YGrs1fmI/AAAAAAAAAEE/L4WwjdH5_ak/s72-c/12895l.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-2727447811204603366</id><published>2009-06-18T11:37:00.015+09:00</published><updated>2009-06-23T10:50:53.819+09:00</updated><title type='text'>AP１８６,　始まります。 (Activity # 1)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_n3LhpZXYr_g/Sjmqvk1dvsI/AAAAAAAAACs/hAHbNXn3Pl4/s1600-h/earl-c.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 175px; height: 228px;" src="http://3.bp.blogspot.com/_n3LhpZXYr_g/Sjmqvk1dvsI/AAAAAAAAACs/hAHbNXn3Pl4/s320/earl-c.jpg" alt="" id="BLOGGER_PHOTO_ID_5348493766797672130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The &lt;span style="font-weight: bold;"&gt;first activity&lt;/span&gt; for Physics 186 is Digital Scanning. Nope, the title might seem too simple but it doesn't end there--it's all about reconstructing images.&lt;br /&gt;&lt;br /&gt;We started the activity by looking for some old, rugged hand-drawn plots in some old journals in the library last Tuesday. I picked Figure 11 from H. FESHBACH and E.L. LOMON's Boundary Condition Model of Strong Interactions (MIT, Cambridge), ANNALS of PHYSICS: 29, 19-17 (1964).&lt;br /&gt;&lt;br /&gt;We had our plot scanned, and received it through e-mail about a night ago. Today, I started with some cropping and rotating tasks, letting loose my obsessive-compulsive. I figured that I'd have a harder time with it, if I don't crop it in the best way I can now.&lt;br /&gt;&lt;br /&gt;After cropping, I loaded the image in paint and took note of the XY locations for the ticks (in pixels) on each of the axes. After which, I noted the XY locations for the points (also in pixels). I used OpenOffice.org Calc for storing my data.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SjmyuFxY6iI/AAAAAAAAAC8/vFfgp9-VbZs/s1600-h/106692.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SjmyuFxY6iI/AAAAAAAAAC8/vFfgp9-VbZs/s320/106692.jpg" alt="" id="BLOGGER_PHOTO_ID_5348502537372232226" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;I solved for the difference in the actual physical values and divided it by the difference in the X locations of two ticks. I repeated the procedure for the y-ticks and got the scaling factor needed for the points. I obtained a scaling factor of 0.38 for X and -0.04 for Y.&lt;br /&gt;&lt;br /&gt;My actual physical position for the points was computed using : 400+[0.38*(x-value for points)] for X and for Y, 40+[-0.04*(y-value for points)]. Note that an initial value of 400 for X and 40 for Y were applied in order to meet the intercepts of the original plot.&lt;br /&gt;&lt;br /&gt;What comes next would be the standard way of plotting XY scatter plots c/o Calc. Nothing special really. I believe that getting the area filled by the original plot would take my reader's attention. In itself, it's not special as well. After all, it's in the Help File (to quote, xD) :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;Bitmap&lt;/span&gt;&lt;br /&gt;Fills the selected object with the bitmap pattern that you click in the list. To add a bitmap to the list, open this dialog in OpenOffice.org Draw, click the &lt;span style="font-weight: bold;"&gt;Bitmaps&lt;/span&gt; tab, and then click &lt;span style="font-weight: bold;"&gt;Import&lt;/span&gt;.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I autoscaled my plot to make sure that the original image remains unaltered while I tinkered with my plot dimensions. I looked for the best values for my XY dimensions for the plot, added the Axes Titles, and poof! I got a plot that looks just like the image at the right.&lt;br /&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SjmwmggH_uI/AAAAAAAAAC0/Prf8aG7LMak/s1600-h/earl-p.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 205px; height: 240px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SjmwmggH_uI/AAAAAAAAAC0/Prf8aG7LMak/s320/earl-p.JPG" alt="" id="BLOGGER_PHOTO_ID_5348500208085368546" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;Not bad for a first activity. It's actually really challenging to get those points to meet once the AUTOFIT feature is used. Not only can't you use the offset options (the ones you get when TILED is enabled), you also get stubborn sizing options for the Chart Area. But yeah, considering you already know how to do it, it'll probably be done in a matter of minutes. ^_^&lt;br /&gt;&lt;br /&gt;I'm definitely getting a &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; for this one. xD&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-2727447811204603366?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/2727447811204603366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/2727447811204603366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/2727447811204603366'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/blog-post.html' title='AP１８６,　始まります。 (Activity # 1)'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_n3LhpZXYr_g/Sjmqvk1dvsI/AAAAAAAAACs/hAHbNXn3Pl4/s72-c/earl-c.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-7482722949253381548</id><published>2009-06-16T21:59:00.009+09:00</published><updated>2009-06-17T00:11:27.453+09:00</updated><title type='text'>新しいサイト?!　無図化して。。　0_0</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_n3LhpZXYr_g/SjeZHNbirnI/AAAAAAAAAAM/9W_hsq1ABMg/s1600-h/izumi_wallpaper.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 240px; height: 320px;" src="http://4.bp.blogspot.com/_n3LhpZXYr_g/SjeZHNbirnI/AAAAAAAAAAM/9W_hsq1ABMg/s320/izumi_wallpaper.jpg" alt="" id="BLOGGER_PHOTO_ID_5347911431669067378" border="0" /&gt;&lt;/a&gt;Is this my new blog site? Nah.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This blog site was specifically made in partial fulfillment to the requirements for my Applied Physics 186 class.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;It says here in the syllabus that &lt;span style="font-style: italic;"&gt;'Your blog report will contain all the outputs you produce from this course which include, but are not limited to, graphs, images and results, write-ups from short activities, etc.'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To those who knew of my real blog site, keep it to yourselves. xD&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-7482722949253381548?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/7482722949253381548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/00.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/7482722949253381548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/7482722949253381548'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/00.html' title='新しいサイト?!　無図化して。。　0_0'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_n3LhpZXYr_g/SjeZHNbirnI/AAAAAAAAAAM/9W_hsq1ABMg/s72-c/izumi_wallpaper.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8991473534494862708.post-8355581153965156875</id><published>2009-06-16T12:21:00.007+09:00</published><updated>2009-06-16T22:19:42.952+09:00</updated><title type='text'>こんにちわ世界?!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_n3LhpZXYr_g/SjebRHUbNEI/AAAAAAAAAAU/cTYVK__Pzzo/s1600-h/00001d0w.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_n3LhpZXYr_g/SjebRHUbNEI/AAAAAAAAAAU/cTYVK__Pzzo/s320/00001d0w.jpg" alt="" id="BLOGGER_PHOTO_ID_5347913800850551874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Who'd have thought this in itself would get a &lt;a href="http://en.wikipedia.org/wiki/Hello_world_program"&gt;Wikipedia Article&lt;/a&gt;? Hmm.. As far as I can remember, I know of a few ways to do this..&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Easiest would be in Python or BASIC:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    print "Hello World."&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;In C it would be something like:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;   main() {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                  printf("Hello World.");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;   }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In FORTRAN, it can either be:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;write (*,*) 'Hello World.'&lt;br /&gt;&lt;/span&gt;or&lt;span style="font-style: italic;"&gt;&lt;br /&gt;print ('a') 'Hello World.' &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Oh well.. so much for a sanity test to make sure everything's working.. But when it comes right down to it, it's not such a bad chunk of code to learn. xD&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8991473534494862708-8355581153965156875?l=aru-sempai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aru-sempai.blogspot.com/feeds/8355581153965156875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/first-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/8355581153965156875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8991473534494862708/posts/default/8355581153965156875'/><link rel='alternate' type='text/html' href='http://aru-sempai.blogspot.com/2009/06/first-post.html' title='こんにちわ世界?!'/><author><name>アール先輩</name><uri>http://www.blogger.com/profile/06269151077923455998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_n3LhpZXYr_g/SjepPWQvwmI/AAAAAAAAAAg/x-XHgaCYegA/S220/tama_avi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_n3LhpZXYr_g/SjebRHUbNEI/AAAAAAAAAAU/cTYVK__Pzzo/s72-c/00001d0w.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
