<?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-5676253085193712352</id><updated>2011-07-08T01:16:13.776-07:00</updated><title type='text'>this-site-is-available</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-5787484005631205099</id><published>2009-10-12T18:57:00.000-07:00</published><updated>2009-10-12T19:45:39.015-07:00</updated><title type='text'>Activity 19 - Restoration of Blurred Image</title><content type='html'>&lt;div style="text-align: justify;"&gt;Blurring of images can be result of the "spreading effect" caused by the transfer function of the imaging device, such as camera, as it images the object. This transfer function may be internal to the camera, due to its limited resolution. However, an additional factor is upon the capturing of the image. In most cases, motion blur affects the imaging perhaps due to the relative movement of the camera and the scene or object being captured with respect to each other.&lt;br /&gt;The uniform linear motion causing this blurring can help model and provide a basis of removing motion blur in images. From the equation:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPgFssvoOI/AAAAAAAAA0k/1grmizalObo/s1600-h/eq1.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 353px; height: 46px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPgFssvoOI/AAAAAAAAA0k/1grmizalObo/s400/eq1.bmp" alt="" id="BLOGGER_PHOTO_ID_5391899567395414242" border="0" /&gt;&lt;/a&gt;where &lt;span style="font-style: italic;"&gt;f &lt;/span&gt;is the object image, and &lt;span style="font-style: italic;"&gt;g &lt;/span&gt;is the blurred image, the blurring is attributed to a uniform linear motion along x and y, namely x&lt;span style="font-size:78%;"&gt;o&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:100%;"&gt;(t) and&lt;/span&gt;&lt;/span&gt; y&lt;span style="font-size:78%;"&gt;o&lt;span style="font-size:100%;"&gt;(t)&lt;/span&gt;&lt;/span&gt;, respectively, for a given total time T. The total time T corresponds to the total time the camera captures the motion (exposure time). The effective transfer function of the motion blur can be obtained from the previous equation by taking its Fourier transform, and isolating the known form of the Fourier transform of the object image. All the other factors can be considered as the transfer function of the motion blur:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StPhRl0KglI/AAAAAAAAA0s/PS0qVeAE5jY/s1600-h/eq2.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 231px; height: 38px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StPhRl0KglI/AAAAAAAAA0s/PS0qVeAE5jY/s400/eq2.bmp" alt="" id="BLOGGER_PHOTO_ID_5391900871217545810" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPhSBil2dI/AAAAAAAAA00/dtIcx8rVC2Y/s1600-h/eq3.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 70px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPhSBil2dI/AAAAAAAAA00/dtIcx8rVC2Y/s400/eq3.bmp" alt="" id="BLOGGER_PHOTO_ID_5391900878660032978" border="0" /&gt;&lt;/a&gt;where G and F represents the Fourier transform of the blurred and original image. H is the motion blur transfer function, with x&lt;span style="font-size:78%;"&gt;o&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:100%;"&gt;(t) and&lt;/span&gt;&lt;/span&gt; y&lt;span style="font-size:78%;"&gt;o&lt;span style="font-size:100%;"&gt;(t) &lt;/span&gt;&lt;/span&gt;expressed as at/T and bt/T, respectively. This suggests that the amplitude or extent of the motion blur along x and y is dictated by a and b, respectively.&lt;br /&gt;Motion blur can then be easily removed from an image upon knowing the proper parameters for the transfer function. However, when noise is present, the restoration is not straightforward division of this transfer function from the blurred image. Filtering methods are applied for restoring noisy and motion-blurred iamges. One filter, the Wiener filter, was basically derived such that the mean square error between the original and reconstructed image was minimized. This filter is also called minimum square error filter. The reconstruction is summed up in the equation:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPi_Vu4nNI/AAAAAAAAA08/ZeXOflphGTw/s1600-h/eq4.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 76px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPi_Vu4nNI/AAAAAAAAA08/ZeXOflphGTw/s400/eq4.bmp" alt="" id="BLOGGER_PHOTO_ID_5391902756686044370" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StPjNdqlu7I/AAAAAAAAA1E/Szzo8HTzuLM/s1600-h/eq5.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 138px; height: 48px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StPjNdqlu7I/AAAAAAAAA1E/Szzo8HTzuLM/s400/eq5.bmp" alt="" id="BLOGGER_PHOTO_ID_5391902999333682098" border="0" /&gt;&lt;/a&gt;where N is the Fourier transform of the noise. In reality, the noise and the original image cannot be obtained directly, which is why this factor in the equation above is replaced by K:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPj4Epdb9I/AAAAAAAAA1M/bAfFh5r4ZA0/s1600-h/eq6.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 378px; height: 97px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPj4Epdb9I/AAAAAAAAA1M/bAfFh5r4ZA0/s400/eq6.bmp" alt="" id="BLOGGER_PHOTO_ID_5391903731352432594" border="0" /&gt;&lt;/a&gt;Optimizing the reconstruction rests on choosing the right value for K.&lt;br /&gt;Using the description of the motion blur model, blurring and addition of Gaussian noise was simulated in this activity. This image was restored using the Wiener filter to determine the effect of certain parameters.&lt;br /&gt;The images below show the original and the blurred image with noise mean and standard deviation at 0.01. The parameters for the blurring is set as a,b=0.01, and T = 1. The degradation is clearly seen in the blurred image.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPkl5Nae8I/AAAAAAAAA1U/U3LcwVM_NE4/s1600-h/Fig1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 171px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPkl5Nae8I/AAAAAAAAA1U/U3LcwVM_NE4/s400/Fig1.gif" alt="" id="BLOGGER_PHOTO_ID_5391904518555990978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In restoring the blurred image, K was varied to determine its effect in the reconstruction. The results are shown below&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StPkqpo9_hI/AAAAAAAAA1c/-oLo0AL3siE/s1600-h/Fig2Keffect.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 343px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StPkqpo9_hI/AAAAAAAAA1c/-oLo0AL3siE/s400/Fig2Keffect.gif" alt="" id="BLOGGER_PHOTO_ID_5391904600275942930" border="0" /&gt;&lt;/a&gt;Notice that the decrease in K results into removing the blur of the image, however, it becomes noisy upon further decrease. This is the tradeoff in the adjustment for K, especially if the power of the noise added is very large.&lt;br /&gt;If the added noise is decreased, and the reconstruction used was the Wiener filter with the factors of the noise and the original image (ratio of power spectrum of noise and original image), the reconstruction improves as the noise is lessened. This means that the reconstruction is very sensitive to noise. Notice that the reconstruction of the images below show a better quality since the reconstruction is directly based on the information of the noise and the original image.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPlx8IqZKI/AAAAAAAAA1k/FfKXEUUYUEM/s1600-h/Fig3noisestrengthatpowerspect.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 201px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPlx8IqZKI/AAAAAAAAA1k/FfKXEUUYUEM/s400/Fig3noisestrengthatpowerspect.gif" alt="" id="BLOGGER_PHOTO_ID_5391905825011426466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is also verified for varying K, as presented in the set of images below with the noise mean and standard deviation at 0.001. A good reconstruction is already attained K=0.001 unlike the previous results for a stronger noise.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StPmnAMfwRI/AAAAAAAAA1s/zlxy9w-1NWY/s1600-h/Fig4noisestrengthK.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 157px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StPmnAMfwRI/AAAAAAAAA1s/zlxy9w-1NWY/s400/Fig4noisestrengthK.gif" alt="" id="BLOGGER_PHOTO_ID_5391906736634315026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In increasing the amplitude of the blur (a,b = 0.1), the restoration would provide more problems for adjusting the parameters. As seen below, using the noise mean and standard deviation at 0.001, the reconstruction was still undesirable at K=0.0001, in contrast with the results obtained in the previous set of images.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPm_q-rWlI/AAAAAAAAA10/vnFBqXPZmlc/s1600-h/Fig5increaseBlur.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 170px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StPm_q-rWlI/AAAAAAAAA10/vnFBqXPZmlc/s400/Fig5increaseBlur.gif" alt="" id="BLOGGER_PHOTO_ID_5391907160435939922" border="0" /&gt;&lt;/a&gt;To improve the reconstruction for the larger amplitude of the motion blur, the effect of T was determined. Notice from the set of images below, that a better reconstruction was obtained using a larger value for T, using the same value of K. This would help in the tradeoff between removing noise and removing motion blur upon adjusting K. If the removal of blur is insufficient for a value of K, T may be adjusted.&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StPoE0KvVPI/AAAAAAAAA2E/oRO4-XzQjnY/s1600-h/Fig5increaseBlurTeffect.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 391px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StPoE0KvVPI/AAAAAAAAA2E/oRO4-XzQjnY/s400/Fig5increaseBlurTeffect.gif" alt="" id="BLOGGER_PHOTO_ID_5391908348313425138" border="0" /&gt;&lt;/a&gt;From the analysis of the effect of different parameters in the restoration, the ideal parameters can be easily determined for restoring a blurred image with noise. This provides an effective way of obtaining quality images, instead of wasting film, memory space or even time from capturing those undesirable blurry images.&lt;br /&gt;For this activity, I would like to give myself a grade of 10 for successfully implementing the motion blur model and the Wiener filter restoration. I think I have also provided a sufficient analysis of the effects of the different parameters.&lt;br /&gt;I would like to thank Dr. Gay Jane Perez for her guidance in this activity.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;R. Gonzalez, R. Woods, Digital Image Processing, Chapter 5, Prentice Hall, Inc., New Jersey, 2002.&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/5676253085193712352-5787484005631205099?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/5787484005631205099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/10/activity-19-restoration-of-blurred.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/5787484005631205099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/5787484005631205099'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/10/activity-19-restoration-of-blurred.html' title='Activity 19 - Restoration of Blurred Image'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_hvTI8mj6_Do/StPgFssvoOI/AAAAAAAAA0k/1grmizalObo/s72-c/eq1.bmp' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-857132545570855590</id><published>2009-10-12T11:19:00.000-07:00</published><updated>2009-10-12T19:58:01.622-07:00</updated><title type='text'>Activity 18 - Noise Models and Basic Image Restoration</title><content type='html'>&lt;div style="text-align: justify;"&gt;Unwanted signals are hard to eliminate upon detection due to its random nature. In imaging, for every captured image, these unwanted signals in the form of noise do not take the same  form in all the images, i.e., the noise detected at a pixel may no longer occur or may not have the same value for another image captured at the same pixel. It is important in image restoration to filter out these noise.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;Modeling the noise added to an image is one way of analyzing the effect of noise, and in turn, for studying the use of different approaches to eliminate this noise. The randomness of noise is basis for the creating noise by generating images with probability distribution functions (PDFs) of the graylevels following the commonly random distributions: Erlang (Gamma), Exponential, Gaussian (Normal), Rayleigh, Salt and Pepper (Impulse), and Uniform.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Removing noise from images requires some filtering methods, whether in real or inverse space. In this activity, filtering is done in the real space using different methods. The filters tackled here mainly uses a window over which several (statistical) operations are carried out on the image with the effect of changing the grayvalue of a pixel in which the center of the window is located. The operations describe the filters used, namely, the arithmetic mean filter, geometric mean filter, harmonic mean filter, and contraharmonic mean filter. The main objective is to observe the effectivity of noise filtering using different filters and parameters used, such as the size of the window.&lt;br /&gt;&lt;/div&gt;First, the noise models were added to the sample image shown below. The original PDF of the image contains three spikes at the grayvalues of the 3 regions, the black background, the gray square, and the near white circle. Adding the noise effectively broadens these spikes such that they overlap. The contrast of the images are degraded as seen visually upon the addition of noise. Using the different filters, the image is restored. In comparing the different filters, the original noisy image is compared with the restored images using arithmetic mean, geometric mean and harmonic mean filters, and then with the contraharmonic mean filter using different values of the parameter Q. The corresponding histogram of the images are shown after each set of images.&lt;br /&gt;&lt;div style="text-align: center;"&gt;Original image&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StPq91bHMoI/AAAAAAAAA2M/wVZg4UCzCH0/s1600-h/circle.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 257px; height: 257px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StPq91bHMoI/AAAAAAAAA2M/wVZg4UCzCH0/s400/circle.bmp" alt="" id="BLOGGER_PHOTO_ID_5391911526926332546" border="0" /&gt;&lt;/a&gt;Window size: 5x5&lt;br /&gt;&lt;br /&gt;Erlang (Gamma)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN1_La81YI/AAAAAAAAAuc/T2QqPXzrggM/s1600-h/Erlang.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 349px; height: 400px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN1_La81YI/AAAAAAAAAuc/T2QqPXzrggM/s400/Erlang.gif" alt="" id="BLOGGER_PHOTO_ID_5391782907150652802" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN1_tnSLmI/AAAAAAAAAuk/PmXPKsiuKD0/s1600-h/ErlangPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN1_tnSLmI/AAAAAAAAAuk/PmXPKsiuKD0/s400/ErlangPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391782916329188962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN2Tm3jxiI/AAAAAAAAAus/FyfhfB0UA3M/s1600-h/Erlangcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN2Tm3jxiI/AAAAAAAAAus/FyfhfB0UA3M/s400/Erlangcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391783258115786274" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN2UFtE9rI/AAAAAAAAAu0/cYbG9QDk9pc/s1600-h/ErlangcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 315px; height: 400px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN2UFtE9rI/AAAAAAAAAu0/cYbG9QDk9pc/s400/ErlangcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391783266393323186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Exponential&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN24vgOIUI/AAAAAAAAAu8/jgjPBFaANfc/s1600-h/Exponential.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 349px; height: 400px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN24vgOIUI/AAAAAAAAAu8/jgjPBFaANfc/s400/Exponential.gif" alt="" id="BLOGGER_PHOTO_ID_5391783896088977730" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN25PuJdJI/AAAAAAAAAvE/wDEbNKf2S_Q/s1600-h/ExponentialPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN25PuJdJI/AAAAAAAAAvE/wDEbNKf2S_Q/s400/ExponentialPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391783904737326226" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN3VN-P9BI/AAAAAAAAAvM/8Zdww1LG564/s1600-h/Exponentialcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 237px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN3VN-P9BI/AAAAAAAAAvM/8Zdww1LG564/s400/Exponentialcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391784385304327186" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN3Vq3ZSyI/AAAAAAAAAvU/Fcj2rmplGto/s1600-h/ExponentialcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 315px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN3Vq3ZSyI/AAAAAAAAAvU/Fcj2rmplGto/s400/ExponentialcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391784393060207394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Gaussian (Normal)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN3qoPoftI/AAAAAAAAAvc/h4IG0r-lX2I/s1600-h/Gaussian.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 349px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN3qoPoftI/AAAAAAAAAvc/h4IG0r-lX2I/s400/Gaussian.gif" alt="" id="BLOGGER_PHOTO_ID_5391784753133813458" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN3rEaTraI/AAAAAAAAAvk/BuR0Mh466xA/s1600-h/GaussianPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN3rEaTraI/AAAAAAAAAvk/BuR0Mh466xA/s400/GaussianPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391784760694779298" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN3_IJAbII/AAAAAAAAAvs/UIRXe7wyq0E/s1600-h/Gaussiancont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN3_IJAbII/AAAAAAAAAvs/UIRXe7wyq0E/s400/Gaussiancont.gif" alt="" id="BLOGGER_PHOTO_ID_5391785105293339778" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN3_hheMQI/AAAAAAAAAv0/PurkfRKJqFU/s1600-h/GaussiancontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 315px; height: 400px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN3_hheMQI/AAAAAAAAAv0/PurkfRKJqFU/s400/GaussiancontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391785112106840322" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Rayleigh&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN4RKqHTMI/AAAAAAAAAv8/eLAd4TvyypY/s1600-h/Rayleigh.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 349px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN4RKqHTMI/AAAAAAAAAv8/eLAd4TvyypY/s400/Rayleigh.gif" alt="" id="BLOGGER_PHOTO_ID_5391785415206718658" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN4Rt0JA-I/AAAAAAAAAwE/kKQ9j9Iuyn8/s1600-h/RayleighPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN4Rt0JA-I/AAAAAAAAAwE/kKQ9j9Iuyn8/s400/RayleighPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391785424644015074" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN5gdRcbPI/AAAAAAAAAwc/wZzSnbXerA4/s1600-h/Rayleighcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN5gdRcbPI/AAAAAAAAAwc/wZzSnbXerA4/s400/Rayleighcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391786777413184754" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN5g72qxdI/AAAAAAAAAwk/F8DIFjLGBLI/s1600-h/RayleighcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 315px; height: 400px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN5g72qxdI/AAAAAAAAAwk/F8DIFjLGBLI/s400/RayleighcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391786785622377938" border="0" /&gt;&lt;/a&gt;Salt and Pepper (Impulse)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN4rbQuHUI/AAAAAAAAAwM/7xxhrzHOo0g/s1600-h/SAP.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 349px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN4rbQuHUI/AAAAAAAAAwM/7xxhrzHOo0g/s400/SAP.gif" alt="" id="BLOGGER_PHOTO_ID_5391785866340212034" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN4rruuyuI/AAAAAAAAAwU/Gd24Ru_YzmU/s1600-h/SAPPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN4rruuyuI/AAAAAAAAAwU/Gd24Ru_YzmU/s400/SAPPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391785870761052898" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN51WwMeeI/AAAAAAAAAws/D6RJAeXgyf0/s1600-h/SAPcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN51WwMeeI/AAAAAAAAAws/D6RJAeXgyf0/s400/SAPcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391787136440367586" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN5192rl4I/AAAAAAAAAw0/IeGeVAK2Jug/s1600-h/SAPcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 315px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN5192rl4I/AAAAAAAAAw0/IeGeVAK2Jug/s400/SAPcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391787146936555394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Uniform&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN6OJ3FEfI/AAAAAAAAAw8/dUDz191oc80/s1600-h/Uniform.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 349px; height: 400px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN6OJ3FEfI/AAAAAAAAAw8/dUDz191oc80/s400/Uniform.gif" alt="" id="BLOGGER_PHOTO_ID_5391787562476311026" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN6Ogl7BhI/AAAAAAAAAxE/pYVo0p6HUYQ/s1600-h/UniformPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN6Ogl7BhI/AAAAAAAAAxE/pYVo0p6HUYQ/s400/UniformPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391787568578364946" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN6jxc-LuI/AAAAAAAAAxM/DPpOilCTw7I/s1600-h/Uniformcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN6jxc-LuI/AAAAAAAAAxM/DPpOilCTw7I/s400/Uniformcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391787933881478882" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN6kJ_7zBI/AAAAAAAAAxU/dCWEeXTLeEA/s1600-h/UniformcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 315px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN6kJ_7zBI/AAAAAAAAAxU/dCWEeXTLeEA/s400/UniformcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391787940470574098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The different image restoration results that were observed showed that indeed, the image is improved especially in the contrast, as compared to the noisy image. In the histogram, the broadening of the three peaks brought about by the added noise was minimized such that histogram of the three regions no longer overlap to some extent. Interestingly, the histogram for each region upon restoration appears in a Gaussian distribution (except for impulse noise).&lt;br /&gt;The results for impulse noise using the contraharmonic filter verify the effect of the parameter Q. Indeed, the positive Q values remove pepper noise but results to enhancing the salt noise. On the other hand, negative Q values remove salt but not pepper noise. For the occurrence of both, it is ideal to used Q=0.&lt;br /&gt;Using other filters depend on the noise (type, strength, etc.) added on the image. Depending on the use of the image or whether a person is satisfied with the result, the right filter (with proper parameters) can be determined, whether visually, or in the histogram.&lt;br /&gt;The window size chosen here is 5x5, which translates to operations over a 5x5 pixel array. As seen in the results, the separation between the regions is no longer defined. It appears smeared due to the operation over a large pixel array. This would also translate to details becoming blurred or may even be totally removed due to the smearing. In such cases, it is better to use smaller window sizes to retain the information. However, there is a tradeoff because larger window sizes would provide better noise filtering, since statistics is based on more values. Again, this translates to adjusting the parameters depending on the purpose of use of the restored images. This may also be helpful whether details of the image are directional, for example, if outlines in the image are along the horizontal, then a 5x3 window size can be used, to filter noise well without affecting the details of the image.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Original image&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StPq-bjJe7I/AAAAAAAAA2U/c6GDjlLCHPQ/s1600-h/Lotus.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 257px; height: 257px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StPq-bjJe7I/AAAAAAAAA2U/c6GDjlLCHPQ/s400/Lotus.bmp" alt="" id="BLOGGER_PHOTO_ID_5391911537160584114" border="0" /&gt;&lt;/a&gt;For the next set of images, a grayscale image of Lotus (shown above) was added with noise. Since this has more details compared to the previous image used, a smaller window size (3x3) is used. The PDFs of the noise image do not have a significant region of separation so it is interesting to see how much improvement can be obtained.&lt;br /&gt;&lt;br /&gt;Erlang (Gamma)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN69neMBXI/AAAAAAAAAxc/HsJrw58yNiI/s1600-h/Erlang.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 354px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN69neMBXI/AAAAAAAAAxc/HsJrw58yNiI/s400/Erlang.gif" alt="" id="BLOGGER_PHOTO_ID_5391788377878824306" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN6-GuSxXI/AAAAAAAAAxk/zVMcCZlnTxo/s1600-h/ErlangPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 339px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN6-GuSxXI/AAAAAAAAAxk/zVMcCZlnTxo/s400/ErlangPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391788386267874674" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN7V6isO2I/AAAAAAAAAxs/UD5RY5ZxBr0/s1600-h/Erlangcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 237px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN7V6isO2I/AAAAAAAAAxs/UD5RY5ZxBr0/s400/Erlangcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391788795314846562" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN7WQGAI7I/AAAAAAAAAx0/BPMbja2S7yw/s1600-h/ErlangcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 317px; height: 400px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN7WQGAI7I/AAAAAAAAAx0/BPMbja2S7yw/s400/ErlangcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391788801100096434" border="0" /&gt;&lt;/a&gt;Exponential&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN7tv9Ac9I/AAAAAAAAAx8/AsIe80DC56g/s1600-h/Exponential.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 353px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN7tv9Ac9I/AAAAAAAAAx8/AsIe80DC56g/s400/Exponential.gif" alt="" id="BLOGGER_PHOTO_ID_5391789204789294034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN7t9f3viI/AAAAAAAAAyE/r3Ak2aRnr7k/s1600-h/ExponentialPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 367px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN7t9f3viI/AAAAAAAAAyE/r3Ak2aRnr7k/s400/ExponentialPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391789208425184802" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN8NaHAagI/AAAAAAAAAyM/fuxTtvGZbz4/s1600-h/Exponentialcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/StN8NaHAagI/AAAAAAAAAyM/fuxTtvGZbz4/s400/Exponentialcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391789748681468418" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN8NwSvSNI/AAAAAAAAAyU/lT47e8fpUiM/s1600-h/ExponentialcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 318px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN8NwSvSNI/AAAAAAAAAyU/lT47e8fpUiM/s400/ExponentialcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391789754636257490" border="0" /&gt;&lt;/a&gt;Gaussian (Normal)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN8uht9wXI/AAAAAAAAAyc/K8SXDuEmUj4/s1600-h/Gaussian.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 353px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN8uht9wXI/AAAAAAAAAyc/K8SXDuEmUj4/s400/Gaussian.gif" alt="" id="BLOGGER_PHOTO_ID_5391790317659603314" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN8uyBQjoI/AAAAAAAAAyk/l4q3Icgtxd4/s1600-h/GaussianPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 336px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN8uyBQjoI/AAAAAAAAAyk/l4q3Icgtxd4/s400/GaussianPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391790322035494530" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN9DU-GYMI/AAAAAAAAAys/wbQ8r0UJcro/s1600-h/Gaussiancont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN9DU-GYMI/AAAAAAAAAys/wbQ8r0UJcro/s400/Gaussiancont.gif" alt="" id="BLOGGER_PHOTO_ID_5391790675014869186" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN9DpB5f2I/AAAAAAAAAy0/vM2ciEfyoOw/s1600-h/GaussiancontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 317px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN9DpB5f2I/AAAAAAAAAy0/vM2ciEfyoOw/s400/GaussiancontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391790680399511394" border="0" /&gt;&lt;/a&gt;Rayleigh&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN9Uy-3_wI/AAAAAAAAAy8/wIg-K7aSfKs/s1600-h/Rayleigh.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 353px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN9Uy-3_wI/AAAAAAAAAy8/wIg-K7aSfKs/s400/Rayleigh.gif" alt="" id="BLOGGER_PHOTO_ID_5391790975128960770" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN9Vc6L8cI/AAAAAAAAAzE/JHUuHNNQLgI/s1600-h/RayleighPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 337px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN9Vc6L8cI/AAAAAAAAAzE/JHUuHNNQLgI/s400/RayleighPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391790986383585730" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN9pYDPvJI/AAAAAAAAAzM/RzjzGkmkffo/s1600-h/Rayleighcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN9pYDPvJI/AAAAAAAAAzM/RzjzGkmkffo/s400/Rayleighcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391791328676789394" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN9p46YXrI/AAAAAAAAAzU/G1T5ifBlD9Q/s1600-h/RayleighcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 318px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN9p46YXrI/AAAAAAAAAzU/G1T5ifBlD9Q/s400/RayleighcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391791337497976498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Salt and Pepper (Impulse)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN-An8gTyI/AAAAAAAAAzc/cSfPHksTJ24/s1600-h/SAP.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 353px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN-An8gTyI/AAAAAAAAAzc/cSfPHksTJ24/s400/SAP.gif" alt="" id="BLOGGER_PHOTO_ID_5391791728080473890" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN-uGz6RJI/AAAAAAAAAz8/2FOJT-kSNV8/s1600-h/SAPPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 337px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN-uGz6RJI/AAAAAAAAAz8/2FOJT-kSNV8/s400/SAPPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391792509460038802" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN-Xl_YzsI/AAAAAAAAAzs/k-XxR2Ma1x0/s1600-h/SAPcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN-Xl_YzsI/AAAAAAAAAzs/k-XxR2Ma1x0/s400/SAPcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391792122692685506" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN-YLir1kI/AAAAAAAAAz0/P01cpK4hqsQ/s1600-h/SAPcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 317px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN-YLir1kI/AAAAAAAAAz0/P01cpK4hqsQ/s400/SAPcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391792132772845122" border="0" /&gt;&lt;/a&gt;Uniform&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN_BwtP3QI/AAAAAAAAA0E/12UcVrkhX2Q/s1600-h/Uniform.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 353px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN_BwtP3QI/AAAAAAAAA0E/12UcVrkhX2Q/s400/Uniform.gif" alt="" id="BLOGGER_PHOTO_ID_5391792847123897602" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN_CfGx8yI/AAAAAAAAA0M/B2Aa8H6za8k/s1600-h/UniformPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 337px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/StN_CfGx8yI/AAAAAAAAA0M/B2Aa8H6za8k/s400/UniformPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391792859579020066" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN_gp4yLFI/AAAAAAAAA0U/ommaH9f51v0/s1600-h/Uniformcont.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 236px; height: 400px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/StN_gp4yLFI/AAAAAAAAA0U/ommaH9f51v0/s400/Uniformcont.gif" alt="" id="BLOGGER_PHOTO_ID_5391793377869179986" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN_hX3i3cI/AAAAAAAAA0c/xosukKUvV7E/s1600-h/UniformcontPDF.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 317px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/StN_hX3i3cI/AAAAAAAAA0c/xosukKUvV7E/s400/UniformcontPDF.gif" alt="" id="BLOGGER_PHOTO_ID_5391793390212013506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Image restoration for this set of images was clearly obtained. The histogram of the images were "stretched" such that the contrast as seen visually are improved. This demonstrates that the method for noise filtering is effective. The same effect of positive and negative Q values for the contraharmonic filter were also observed in the impulse noise. It can also be observed that the harmonic mean filter is a very flexible technique (applicable for all noise distributions) and is very reliable in restoring the image.&lt;br /&gt;For this activity, I would like to give myself a grade of 10 for successfully creating and adding the noise models and implementing the different noise filters.&lt;br /&gt;I would like to thank Jay Samuel Combinido, Mark Jayson Villangca, and Miguel Sison for their help in this activity, and also for the guidance of our professor, Dr. Gay Jane Perez.&lt;br /&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;/div&gt;&lt;div style="text-align: justify;" id="refHTML"&gt;&lt;/div&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-857132545570855590?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/857132545570855590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/10/activity-18-noise-models-and-basic.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/857132545570855590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/857132545570855590'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/10/activity-18-noise-models-and-basic.html' title='Activity 18 - Noise Models and Basic Image Restoration'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_hvTI8mj6_Do/StPq91bHMoI/AAAAAAAAA2M/wVZg4UCzCH0/s72-c/circle.bmp' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-6923292501230067626</id><published>2009-09-22T00:25:00.000-07:00</published><updated>2009-09-23T23:18:50.303-07:00</updated><title type='text'>Activity 17 - Photometric Stereo</title><content type='html'>&lt;div style="text-align: justify;"&gt;Light striking an object at a certain direction would get reflected a specific orientation. Detecting this reflected light would only mean capturing one component of the intensity. This means that illuminating an object in different positions results to different shadings in the images of the object. Photometric stereo is a technique of using these different shading information for 3D reconstruction.&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/_hvTI8mj6_Do/SrsCp8RL8PI/AAAAAAAAAs0/KMKIHcEIqEk/s1600-h/fig1.bmp"&gt;&lt;img style="cursor: pointer; width: 306px; height: 135px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SrsCp8RL8PI/AAAAAAAAAs0/KMKIHcEIqEk/s400/fig1.bmp" alt="" id="BLOGGER_PHOTO_ID_5384900699027665138" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In this activity, it is assumed that the light striking the object are uniform plane waves. From the figure above, the direction S(P) is now a constant for all points P on the object. This allows a simple calculation of this direction, which is just proportional to the location of the light source with respect to the object:&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/_hvTI8mj6_Do/SrsB1XRF1KI/AAAAAAAAAss/dLZUTUww7PE/s1600-h/eq1.bmp"&gt;&lt;img style="cursor: pointer; width: 167px; height: 109px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SrsB1XRF1KI/AAAAAAAAAss/dLZUTUww7PE/s400/eq1.bmp" alt="" id="BLOGGER_PHOTO_ID_5384899795741955234" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;(each row represents the 3D coordinates of one light source with the object as origin)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrsD2gz5VTI/AAAAAAAAAtE/ZAXQOPnwd5E/s1600-h/eq3.bmp"&gt;&lt;img style="cursor: pointer; width: 84px; height: 33px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrsD2gz5VTI/AAAAAAAAAtE/ZAXQOPnwd5E/s400/eq3.bmp" alt="" id="BLOGGER_PHOTO_ID_5384902014506980658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;(&lt;span style="font-style: italic;"&gt;k&lt;/span&gt; is the proportionality constant)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Intuitively, the brightness of a point P on the object would be given by the equation&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/_hvTI8mj6_Do/SrsDK9s-MII/AAAAAAAAAs8/55cgeMdJvws/s1600-h/eq2.bmp"&gt;&lt;img style="cursor: pointer; width: 180px; height: 42px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SrsDK9s-MII/AAAAAAAAAs8/55cgeMdJvws/s400/eq2.bmp" alt="" id="BLOGGER_PHOTO_ID_5384901266348322946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;where ρ(P) represents the reflectivity of that point, ň(P) is the normal vector at point P and S&lt;span style="font-size:78%;"&gt;0&lt;/span&gt; is the vector from the point to the source, which is now considered a constant for all points on the object due to the plane wave illumination. The intensity detected is proportional to this brightness by the same proportionality constant &lt;span style="font-style: italic;"&gt;k &lt;/span&gt;in the equation for &lt;span style="font-weight: bold;"&gt;V&lt;/span&gt;:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;img src="file:///C:/DOCUME%7E1/3rdy/LOCALS%7E1/Temp/moz-screenshot.jpg" alt="" /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrsHW02M-XI/AAAAAAAAAtM/2X4P5W1ZAos/s1600-h/eq4.bmp"&gt;&lt;img style="cursor: pointer; width: 248px; height: 31px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrsHW02M-XI/AAAAAAAAAtM/2X4P5W1ZAos/s400/eq4.bmp" alt="" id="BLOGGER_PHOTO_ID_5384905868176062834" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;We can set:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrsHvZo_OLI/AAAAAAAAAtU/aRDUw5w2Qjc/s1600-h/eq5.bmp"&gt;&lt;img style="cursor: pointer; width: 205px; height: 33px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrsHvZo_OLI/AAAAAAAAAtU/aRDUw5w2Qjc/s400/eq5.bmp" alt="" id="BLOGGER_PHOTO_ID_5384906290369607858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;so that from a set of images of the object using &lt;span style="font-style: italic;"&gt;N&lt;/span&gt; different light source locations:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;img src="file:///C:/DOCUME%7E1/3rdy/LOCALS%7E1/Temp/moz-screenshot-1.jpg" alt="" /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrsIPg9B6YI/AAAAAAAAAtc/Yl-_sogUNwE/s1600-h/eq6.bmp"&gt;&lt;img style="cursor: pointer; width: 281px; height: 91px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrsIPg9B6YI/AAAAAAAAAtc/Yl-_sogUNwE/s400/eq6.bmp" alt="" id="BLOGGER_PHOTO_ID_5384906842088532354" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;div style="text-align: justify;"&gt;we can calculate by matrix operations:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrsI4Zjv1EI/AAAAAAAAAtk/z5i7-6PZpLg/s1600-h/eq7.bmp"&gt;&lt;img style="cursor: pointer; width: 64px; height: 32px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrsI4Zjv1EI/AAAAAAAAAtk/z5i7-6PZpLg/s400/eq7.bmp" alt="" id="BLOGGER_PHOTO_ID_5384907544478078018" 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://1.bp.blogspot.com/_hvTI8mj6_Do/SrsI43mE8eI/AAAAAAAAAts/V9eSZXIfX58/s1600-h/eq8.bmp"&gt;&lt;img style="cursor: pointer; width: 150px; height: 38px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrsI43mE8eI/AAAAAAAAAts/V9eSZXIfX58/s400/eq8.bmp" alt="" id="BLOGGER_PHOTO_ID_5384907552540914146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;Upon knowing &lt;span style="font-weight: bold;"&gt;g&lt;/span&gt;, the surface normal vectors of the object can be calculated:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SrsJdijskhI/AAAAAAAAAt0/k8ja2HCz8ZY/s1600-h/eq9.bmp"&gt;&lt;img style="cursor: pointer; width: 62px; height: 52px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SrsJdijskhI/AAAAAAAAAt0/k8ja2HCz8ZY/s400/eq9.bmp" alt="" id="BLOGGER_PHOTO_ID_5384908182548943378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;From the surface normals, the 3D object can be reconstructed since the gradient of the object surface is equal to the surface normal vectors. It can easily be shown that from 3D coordinates of the object&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/_hvTI8mj6_Do/SrsLEAUpYRI/AAAAAAAAAt8/NH8VuSbFlzY/s1600-h/eq10.bmp"&gt;&lt;img style="cursor: pointer; width: 86px; height: 31px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SrsLEAUpYRI/AAAAAAAAAt8/NH8VuSbFlzY/s400/eq10.bmp" alt="" id="BLOGGER_PHOTO_ID_5384909942885540114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;the gradient can be calculated to obtain the relations:&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://2.bp.blogspot.com/_hvTI8mj6_Do/SrsLEWRP8bI/AAAAAAAAAuE/FJqfDmHmkp4/s1600-h/eq11.bmp"&gt;&lt;img style="cursor: pointer; width: 95px; height: 54px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrsLEWRP8bI/AAAAAAAAAuE/FJqfDmHmkp4/s400/eq11.bmp" alt="" id="BLOGGER_PHOTO_ID_5384909948776870322" 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://1.bp.blogspot.com/_hvTI8mj6_Do/SrsLE6GM_WI/AAAAAAAAAuM/Bqkhhli9cTQ/s1600-h/eq12.bmp"&gt;&lt;img style="cursor: pointer; width: 92px; height: 55px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrsLE6GM_WI/AAAAAAAAAuM/Bqkhhli9cTQ/s400/eq12.bmp" alt="" id="BLOGGER_PHOTO_ID_5384909958394215778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;The reconstruction can be completed from the surface normals by calculating the &lt;span style="font-weight: bold;"&gt;z&lt;/span&gt; using&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrsLFa-XwiI/AAAAAAAAAuU/HRdajxqy7q8/s1600-h/eq13.bmp"&gt;&lt;img style="cursor: pointer; width: 284px; height: 63px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrsLFa-XwiI/AAAAAAAAAuU/HRdajxqy7q8/s400/eq13.bmp" alt="" id="BLOGGER_PHOTO_ID_5384909967219737122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In this activity, four images are obtained using four different light sources, as shown below, with the corresponding light source locations. (Note: The images shown below are normalized individually).&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Image 1 (V&lt;span style="font-size:78%;"&gt;1&lt;/span&gt;                             = {0.085832, 0.17365, 0.98106})&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/_hvTI8mj6_Do/Srh9lIoDKII/AAAAAAAAAsE/kstxVZW7aTM/s1600-h/I1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Srh9lIoDKII/AAAAAAAAAsE/kstxVZW7aTM/s400/I1.bmp" alt="" id="BLOGGER_PHOTO_ID_5384191431445522562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Image 2 (V&lt;span style="font-size:78%;"&gt;2&lt;/span&gt; = {0.085832, -0.17365, 0.98106})&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/_hvTI8mj6_Do/Srh9t42z8zI/AAAAAAAAAsM/F-juMoCkOtM/s1600-h/I2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Srh9t42z8zI/AAAAAAAAAsM/F-juMoCkOtM/s400/I2.bmp" alt="" id="BLOGGER_PHOTO_ID_5384191581831295794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Image 3 (V&lt;span style="font-size:78%;"&gt;3&lt;/span&gt; = {0.17365, 0, 0.98481})&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/_hvTI8mj6_Do/Srh_TJUobAI/AAAAAAAAAsU/krDUqAtLM1E/s1600-h/I3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Srh_TJUobAI/AAAAAAAAAsU/krDUqAtLM1E/s400/I3.bmp" alt="" id="BLOGGER_PHOTO_ID_5384193321418124290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Image 4 (V&lt;span style="font-size:78%;"&gt;4&lt;/span&gt; = {0.16318, -0.34202, 0.92542})&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/_hvTI8mj6_Do/Srh_bs8g-bI/AAAAAAAAAsc/kFOFdxudxVA/s1600-h/I4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Srh_bs8g-bI/AAAAAAAAAsc/kFOFdxudxVA/s400/I4.bmp" alt="" id="BLOGGER_PHOTO_ID_5384193468419602866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Applying photometric stereo described above, the shape of the object was reconstructed and the result is shown below. The surface of the reconstruction is not very smooth. However, the shape is still defined.&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/_hvTI8mj6_Do/SriCY44Wj8I/AAAAAAAAAsk/o0yczMjDUCY/s1600-h/3Dplot.bmp"&gt;&lt;img style="cursor: pointer; width: 433px; height: 326px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SriCY44Wj8I/AAAAAAAAAsk/o0yczMjDUCY/s400/3Dplot.bmp" alt="" id="BLOGGER_PHOTO_ID_5384196718618644418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;3D reconstruction of the object&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I would like to give myself a grade of 10 for successfully implementing photometric stereo for the given images.&lt;br /&gt;I acknowledge the help of Mr. Orly Tarun and Mr. Mark Jayson Villangca and the guidance of Dr. Gay Jane Perez in doing this activity.&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/5676253085193712352-6923292501230067626?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/6923292501230067626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-17-photometric-stereo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/6923292501230067626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/6923292501230067626'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-17-photometric-stereo.html' title='Activity 17 - Photometric Stereo'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_hvTI8mj6_Do/SrsCp8RL8PI/AAAAAAAAAs0/KMKIHcEIqEk/s72-c/fig1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-8766847883321272045</id><published>2009-09-21T19:18:00.000-07:00</published><updated>2009-09-22T00:22:30.298-07:00</updated><title type='text'>Activity 13 - Correcting Geometric Distortions</title><content type='html'>&lt;div style="text-align: justify;"&gt;In imaging, light rays from a point on an object is captured by camera lenses, refracted and focused onto the recording plane of the camera, whether on a film or a CCD. However, due to the shape of the lenses, light rays from a single object point does not focus on a single point on the recording plane. This is due to the fact that light rays refracting at the edge of spherical lenses (marginal rays) behave differently than those close to the center or the optic axis of the lens (paraxial rays). For the same reason, parts of the object directly 'passing' through the edge of the lenses upon imaging would result to some geometric distortions. The two most common are the pincushion and barrel distortion, which produce images shaped like a pincushion and a barrel, respectively.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In metrology, it is critical to obtain highly accurate data from images. In this regard, distortions are undesirable, causing errors in the measurements. In this activity, a method for correcting geometric distortions is presented.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The main idea behind the reconstruction is to image a regularly occurring pattern, such as a grid or a checkerboard. From the imaged pattern, coordinates upon distortion for each point on the ideal pattern are known and can provide the necessary information for obtaining the distorting function (see image below).&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/_hvTI8mj6_Do/SrhZAYDEzwI/AAAAAAAAAqU/KKvIqIc14GA/s1600-h/fig1.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 168px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SrhZAYDEzwI/AAAAAAAAAqU/KKvIqIc14GA/s400/fig1.bmp" alt="" id="BLOGGER_PHOTO_ID_5384151217511649026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Ideal grid (right) and distorted grid (left) with&lt;br /&gt;corresponding vertex points specified by the arrow&lt;br /&gt;(image taken from [1]).&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;Other points on the ideal image can then be mapped on the distorted image using the same transformation as the vertices. Using the four vertices of a square in the pattern, a relation can be obtained regarding the transformation in the coordinates of the distorted grid:&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/_hvTI8mj6_Do/SrhnzyZng4I/AAAAAAAAAqc/X791fXwm6_g/s1600-h/eq1.bmp"&gt;&lt;img style="cursor: pointer; width: 188px; height: 218px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrhnzyZng4I/AAAAAAAAAqc/X791fXwm6_g/s400/eq1.bmp" alt="" id="BLOGGER_PHOTO_ID_5384167493921637250" 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;The same transformation relation can be used for the points inside the square. To obtain this relation, matrix operations are used to calculate for the coefficients, &lt;span style="font-style: italic;"&gt;C&lt;/span&gt;:&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/_hvTI8mj6_Do/Srhn0hPt_YI/AAAAAAAAAqk/nluDKiDuHj0/s1600-h/eq2.bmp"&gt;&lt;img style="cursor: pointer; width: 197px; height: 30px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Srhn0hPt_YI/AAAAAAAAAqk/nluDKiDuHj0/s400/eq2.bmp" alt="" id="BLOGGER_PHOTO_ID_5384167506496585090" border="0" /&gt;&lt;/a&gt;&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/_hvTI8mj6_Do/Srhn1E58vGI/AAAAAAAAAqs/La5eh2N3CjQ/s1600-h/eq3.bmp"&gt;&lt;img style="cursor: pointer; width: 243px; height: 30px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Srhn1E58vGI/AAAAAAAAAqs/La5eh2N3CjQ/s400/eq3.bmp" alt="" id="BLOGGER_PHOTO_ID_5384167516068953186" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;These coefficients is used to calculate for all the points inside the square:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/Srhn1reEgyI/AAAAAAAAAq0/IWuohjxvZJs/s1600-h/eq4.bmp"&gt;&lt;img style="cursor: pointer; width: 186px; height: 66px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Srhn1reEgyI/AAAAAAAAAq0/IWuohjxvZJs/s400/eq4.bmp" alt="" id="BLOGGER_PHOTO_ID_5384167526421005090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Grayscale or RGB values of the ideal image can then be obtained from the corresponding values on the distorted image upon knowing points of the distorted image corresponding to the ideal image. Since images are indexed in pixel coordinates, only integer values are accessed for the distorted image. Different algorithms can be used to determine the grayscale or RGB value for cases when non-integer valued coordinates on the distorted image is calculated. One is the nearest neighbor algorithm, which basically takes the value of the distorted image at the nearest integer coordinate of the calculated distorted coordinates. Another algorithm, bilinear interpolation, interpolates the value using the four nearest neighbor pixels of the calculated distorted coordinates. Using the equation:&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/_hvTI8mj6_Do/SrhrCBiEjbI/AAAAAAAAAq8/bVW2qPymPew/s1600-h/eq5.bmp"&gt;&lt;img style="cursor: pointer; width: 259px; height: 37px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SrhrCBiEjbI/AAAAAAAAAq8/bVW2qPymPew/s400/eq5.bmp" alt="" id="BLOGGER_PHOTO_ID_5384171037036678578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;the grayscale or RGB value &lt;span style="font-style: italic;"&gt;v(x,y)&lt;/span&gt; is obtained following similar matrix operations for obtaining the distorted coordinates. The four nearest neighbor pixel values are used in the same way as the four vertices of the square, for calculating the coefficients &lt;span style="font-style: italic;"&gt;a, b, c, &lt;/span&gt;and&lt;span style="font-style: italic;"&gt; d.&lt;/span&gt; The pixel value for distorted coordinate is then obtained and set as value on the ideal image to complete the reconstruction.&lt;br /&gt;The method described above can also be used to correct other types of distortion since the distorted image is mapped to an ideal grid with a specific transformation. This transformation can be of different type to correct for different distortions.&lt;br /&gt;&lt;/div&gt;Two trials were made for correcting of the image below. For analysis, reconstruction using vertices of the squares of the grid overlaying the image (Trial 1) was compared one using vertices of the square composed of the four basic squares in the image (Trial 2).&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/_hvTI8mj6_Do/SrhtqmlXDOI/AAAAAAAAArE/0z1VgwYPYX4/s1600-h/807.jpg"&gt;&lt;img style="cursor: pointer; width: 296px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SrhtqmlXDOI/AAAAAAAAArE/0z1VgwYPYX4/s400/807.jpg" alt="" id="BLOGGER_PHOTO_ID_5384173933200608482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Distorted image&lt;br /&gt;&lt;span style="font-size:78%;"&gt;(original image taken from &lt;a href="http://www.karbosguide.com/books/photobook/chapter34.htm"&gt;http://www.karbosguide.com/books/photobook/chapter34.htm&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Coordinates of the vertices were obtained using &lt;span style="font-style: italic;"&gt;locate() &lt;/span&gt;in Scilab. Then the ideal grid was constructed by selecting the coordinates of the square with (approximately) no distortions, and building up all the other squares in the ideal image. The undistorted square used for Trial 2 is the square composed of the four central squares in the image specified by the four red dots. For Trial 1, only the upper left square in the four central squares was used.&lt;br /&gt;Using the vertices of the squares in the distorted and ideal grid, the coefficients were obtained to determine distorted coordinates for all the points inside the square. Nearest neighbor and bilinear interpolation algorithms were then applied to obtain the RGB values of the ideal image. The results of the reconstructions are shown below (the whole image was not reconstructed).&lt;br /&gt;&lt;br /&gt;***Click on the image below for a larger image&lt;br /&gt;&lt;br /&gt;Trial 1&lt;br /&gt;&lt;div style="text-align: center;"&gt;Nearest-neighbor                                               and Bilinear interpolation&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/_hvTI8mj6_Do/SrhyqfDyJXI/AAAAAAAAArU/LxgeGq1gHl0/s1600-h/idealimage_nn_small_sq.bmp"&gt;&lt;img style="cursor: pointer; width: 180px; height: 172px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrhyqfDyJXI/AAAAAAAAArU/LxgeGq1gHl0/s400/idealimage_nn_small_sq.bmp" alt="" id="BLOGGER_PHOTO_ID_5384179428738868594" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/Srhy_-imCNI/AAAAAAAAArc/o4e-ZV929pg/s1600-h/idealimage_bl_small_sq.bmp"&gt;&lt;img style="cursor: pointer; width: 180px; height: 170px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/Srhy_-imCNI/AAAAAAAAArc/o4e-ZV929pg/s400/idealimage_bl_small_sq.bmp" alt="" id="BLOGGER_PHOTO_ID_5384179797966850258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Trial 2&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrhzOT8JjDI/AAAAAAAAArk/8XCWfo_RmVI/s1600-h/idealimage_nn_large_sq.bmp"&gt;&lt;img style="cursor: pointer; width: 180px; height: 180px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SrhzOT8JjDI/AAAAAAAAArk/8XCWfo_RmVI/s400/idealimage_nn_large_sq.bmp" alt="" id="BLOGGER_PHOTO_ID_5384180044229348402" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SrhzVQojYqI/AAAAAAAAArs/Gtms1A6AhqY/s1600-h/idealimage_bl_large_sq.bmp"&gt;&lt;img style="cursor: pointer; width: 180px; height: 180px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SrhzVQojYqI/AAAAAAAAArs/Gtms1A6AhqY/s400/idealimage_bl_large_sq.bmp" alt="" id="BLOGGER_PHOTO_ID_5384180163600933538" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;As demonstrated in the results, the bilinear interpolation algorithm provides a better reconstruction compared to the nearest-neighbor for both trials. The bilinear interpolation gives a more accurate RGB value. This is better shown in the lines of the grid. The nearest-neighbor algorithm has lines that are more jagged.&lt;br /&gt;In comparing the two trials, it seems logical that using the small squares should result to a better reconstruction. Zooming in on one part of the image, this is shown more evidently (shown below, for the bilinear interpolation images). The reconstruction for Trial 1 is much smoother compared to Trial 2, which contains more artifacts. The reason for this is because the small squares would provide a more specific set of coefficients for calculation of distorted grid coordinates  in an area. However, as noticed in the images above, the reconstructions for Trial 1 are actually rectangular, while for Trial 2, the images are square. The obtained undistorted central square for Trial 1 is not a square, not like the square obtained for Trial 2. As noticed, the square used in Trial 1 is not directly at the center, while for Trial 2, it is exactly at the center. The approximation that the square chosen is undistorted may not be valid for Trial 1. For Trial 2, since the square is directly at the center, there would be no offset on whether the square is perfectly undistorted.&lt;br /&gt;&lt;div style="text-align: center;"&gt;Trial&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;1 2&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/_hvTI8mj6_Do/Srh3IRmqz_I/AAAAAAAAAr0/3QLxCbYcVCU/s1600-h/smallpatch.bmp"&gt;&lt;img style="cursor: pointer; width: 57px; height: 50px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Srh3IRmqz_I/AAAAAAAAAr0/3QLxCbYcVCU/s400/smallpatch.bmp" alt="" id="BLOGGER_PHOTO_ID_5384184338569678834" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/Srh3O_dcz-I/AAAAAAAAAr8/bF2jegA0W1I/s1600-h/largepatch.bmp"&gt;&lt;img style="cursor: pointer; width: 55px; height: 50px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Srh3O_dcz-I/AAAAAAAAAr8/bF2jegA0W1I/s400/largepatch.bmp" alt="" id="BLOGGER_PHOTO_ID_5384184453958258658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;In this activity, I would like to give myself a grade of 10 for producing a very good correction of an image with relatively large distortion. Moreover, I also examined the use of smaller squares compared to larger squares in the reconstruction (Trial 1 and 2).&lt;br /&gt;I would like to thanks Ms. Winsome Chloe Rara and Mr. Mark Jayson Villangca for their help in doing this activity. I also acknowledge Dr. Maricor Soriano for her discussions regarding this activity.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;Reference&lt;/span&gt;&lt;br /&gt;[1] M. Soriano, Applied Physics 186 Activity 13 Correcting Geometric Distortions Manual, 2009.&lt;br /&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/5676253085193712352-8766847883321272045?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/8766847883321272045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-13-correcting-geometric.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/8766847883321272045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/8766847883321272045'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-13-correcting-geometric.html' title='Activity 13 - Correcting Geometric Distortions'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_hvTI8mj6_Do/SrhZAYDEzwI/AAAAAAAAAqU/KKvIqIc14GA/s72-c/fig1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-6859661881668769956</id><published>2009-09-15T02:15:00.000-07:00</published><updated>2009-09-21T19:18:37.982-07:00</updated><title type='text'>Activity 16 - Neural Networks</title><content type='html'>&lt;div style="text-align: justify;"&gt;As mentioned in Activity 14, object classification is one human capability that is commonly investigated and modeled for implementation in computer vision. It is actually a process of the human brain analyzing the information detected by the senses to classify objects. Inside the human brain are networks of neurons working together to process the information.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Neural networks are standard algorithms that have been used to model this process inside the brain. Similar to how the mind works, the basic concept of the algorithm is it first 'learns' what a class is from the features of objects that is known to belong in that class. Once the feature pattern for a class is known, classifying objects is straightforward by recognizing the class pattern in  the object features observed.&lt;br /&gt;The critical part in neural networks is the learning process, which is also crucial for human beings. Learning in neural networks is by basically determining the weights given to observed features.  The network can be modeled by a connection of layers of nodes - input, hidden  and output. Features from visual information are fed to input nodes which then pass a new weighted information to the hidden layer or layers. The hidden layer directs the information to the output node to combine the information into an outcome which determines the classification of the object. If object features from known classes are set as input, the network can calculate the error of its output. An iterative process then proceeds to readjust the weights applied to the input information in the connections of the nodes to minimize the error of the output. Certain parameters can be used in the iteration such as the learning rate of the network and the time set for the network to learn (which can be described as how much iteration is needed). Once the target output (or close to the target) is obtained, the final weights can be used in the network to classify unknown objects.&lt;br /&gt;The ANN (Artificial Neural Network) toolbox for Scilab was applied in this activity for classifying normal or crenated RBCs. Training set and test set features from the previous two activities were used. A neural network was initialized with 2 input nodes (for the 2 basic features of an object) , 2 hidden layer nodes, and an output node with output values specifying whether crenated (1) or normal (0). The training set features were used for the learning process, and the weights obtained was then applied to classify the test set.&lt;br /&gt;First, the effect of learning rate and training cycles to the output of the learning process was examined. The mean output value for the 5 input crenated RBC training set was plotted with respect to both the learning rate and training cycles. The 3D plot shown below signifies that increasing the learning rate would result to a faster approach of the training result to the target output even though there is a limited number of training cycles. On the other hand, for a low learning rate, increasing the training cycles will produce results approaching the target output. On both cases, further increase on learning rate and training cycle result to minimal improvement. The results seem logical because a higher learning rate would result to faster convergence to the desired weights, while more cycles would mean training the network at a longer time, making it more accurate. This also means that the high learning rates and low training cycles would results to faster training for the network, which was observed in the simulations. However, for a high learning rate, the weights would change more inaccurately producing a final output of weights that are less reliable compared to lower learning rates. This was verified because trained networks with high learning rates result to a lower percentage of correctly classified RBCs as compared to low learning rates. As a consequence, the training parameters used was 0.1 learning rate and 10000 training cycles. The resulting network was used to classify the test set of RBCs.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;3D Plot of neural network training output for crenated RBC vs&lt;br /&gt;learning rate and training cycle&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/_hvTI8mj6_Do/SrgnIz_VBbI/AAAAAAAAAp0/sjGZnJ9-pxc/s1600-h/trial1.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 290px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SrgnIz_VBbI/AAAAAAAAAp0/sjGZnJ9-pxc/s400/trial1.bmp" alt="" id="BLOGGER_PHOTO_ID_5384096386869691826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Trial 1&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrgnSzgE0DI/AAAAAAAAAp8/k_OdetGFp64/s1600-h/trial2.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 289px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrgnSzgE0DI/AAAAAAAAAp8/k_OdetGFp64/s400/trial2.bmp" alt="" id="BLOGGER_PHOTO_ID_5384096558537297970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Trial 2&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Table of classification results using a network trained&lt;br /&gt;at learning rate = 0.1 and training cycles = 10000&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/_hvTI8mj6_Do/SrgvUVQ2FUI/AAAAAAAAAqM/-edhnqXIBgE/s1600-h/table.bmp"&gt;&lt;img style="cursor: pointer; width: 345px; height: 85px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SrgvUVQ2FUI/AAAAAAAAAqM/-edhnqXIBgE/s400/table.bmp" alt="" id="BLOGGER_PHOTO_ID_5384105380873114946" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The artificial neural network classification provided the same accuracy as the linear discriminant analysis presented in the previous activity. This shows a successful implementation of neural networks for pattern recognition and classification. By improving the data to be processed as mentioned in the Activity 14, a more accurate or maybe even perfect classification can be attained. This shows that neural networks can be a good descriptive model of how the human brain works, which would can be a powerful tool in computer vision and robotics. This would  also have significant impact for the usage of technology in institutions such as hospitals and schools for academic and research purposes.&lt;br /&gt;I would like to give myself a grade of 10 (and possible bonus for additional analysis) for successfully implementing neural networks for the classification of normal and crenated RBCs.&lt;br /&gt;I would like to thank Dr. Gay Jane Perez for the discussions regarding this activity and to Mr. Cole Fabros for his blog regarding the use of ANN toolbox in Scilab.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-6859661881668769956?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/6859661881668769956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-16-neural-networks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/6859661881668769956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/6859661881668769956'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-16-neural-networks.html' title='Activity 16 - Neural Networks'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_hvTI8mj6_Do/SrgnIz_VBbI/AAAAAAAAAp0/sjGZnJ9-pxc/s72-c/trial1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-7089539958213517907</id><published>2009-09-09T19:11:00.000-07:00</published><updated>2009-09-14T02:08:37.372-07:00</updated><title type='text'>Activity 15 - Probabilistic Classification</title><content type='html'>&lt;div style="text-align: justify;"&gt;From the previous activity, red blood cells (RBCs) are classified as normal or crenated by using visual information obtained by image processing as basic features that are the basis for discriminating the normal from the crenated RBCs. More specifically, minimum distance classification was used in classification by basically determining to which mean set of features (either for normal or for crenated) the object feature set to be classified is closest to.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In this activity, a different technique called linear discriminant analysis (LDA) is applied for classifying object features by minimizing the error in the classification of the objects. Linear discriminant analysis is based on conditional probability such that from the occurence of a given set of measurements, there is a probability for one object, for example, to be normal or crenated. Determining this probability is not direct. But it has already been shown [1] that this can be related to the conditional probability that an object or set of objects is known to be one class or the other (in this case normal or crenated), a set of measurements are taken for that class. More specifically, the classification is done based on the formula below:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/Sqhqu64LJkI/AAAAAAAAApk/QuqmgruFq90/s1600-h/equation.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 66px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Sqhqu64LJkI/AAAAAAAAApk/QuqmgruFq90/s400/equation.bmp" alt="" id="BLOGGER_PHOTO_ID_5379667109205452354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;where &lt;span style="font-weight: bold; font-style: italic;"&gt;μ&lt;/span&gt;&lt;span style="font-style: italic;font-size:78%;" &gt;i&lt;/span&gt; is the mean feature set for the class &lt;span style="font-style: italic;"&gt;i&lt;/span&gt;,&lt;span style="font-style: italic;"&gt; &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;C&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;is the&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;/span&gt;pooled covariance matrix*, both obtained from the training set, &lt;span style="font-weight: bold; font-style: italic;"&gt;x&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-style: italic;"&gt;k&lt;/span&gt;&lt;/span&gt; is the test object feature set to be classified, and &lt;span style="font-style: italic;"&gt;p&lt;/span&gt;&lt;span style="font-style: italic;font-size:78%;" &gt;i&lt;/span&gt; is the prior probability of that class**. The quantity &lt;span style="font-style: italic;"&gt;f&lt;/span&gt;&lt;span style="font-style: italic;font-size:78%;" &gt;i&lt;/span&gt; represents the probability that the given set of features of a test object belongs to class &lt;span style="font-style: italic;"&gt;i. &lt;/span&gt;This suggests that the larger &lt;span style="font-style: italic;"&gt;f&lt;span style="font-size:78%;"&gt;i&lt;/span&gt;&lt;/span&gt; means it belongs to that class. For example, if the calculated &lt;span style="font-style: italic;"&gt;f&lt;/span&gt; for normal is larger than that calculated for the crenated, then, the object is classified as normal. Otherwise, it is crenated.&lt;br /&gt;&lt;br /&gt;*pooled covariance matrix - weighted sum of the covariance matrix of the set of features of the object in class for all classes with weights depending on the number of objects in that class over the total number of objects in the test training set&lt;br /&gt;**prior probability - assumed as the number of objects in that class in the training set over the total number of objects in the training set&lt;br /&gt;&lt;br /&gt;Using the training set features and the test set features obtained from the previous activity, linear discriminant analysis is applied.&lt;br /&gt;&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/_hvTI8mj6_Do/Sqhwniaz6-I/AAAAAAAAAps/4NVJNh6mn0g/s1600-h/table.bmp"&gt;&lt;img style="cursor: pointer; width: 357px; height: 86px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/Sqhwniaz6-I/AAAAAAAAAps/4NVJNh6mn0g/s400/table.bmp" alt="" id="BLOGGER_PHOTO_ID_5379673579450526690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;From the results presented in the table above, the improvement in the classification was only observed for trial 2. More specifically, the improvement was in the classification of the crenated RBCs. From the scatter plot of the object features, the crenated RBCs in trial 2 are very close to the region of the normal RBCs. LDA was able to discriminate more crenated RBCs in this region, however, only improving the classification by approximately 2%. Actually, the 2% increase represents only one additional correctly classified crenated RBC. There are no more improvements obtained for trial 1 and the classification of normal RBCs in trial 2 because minimum distance classification was already sufficient. The features correctly classified have probabilities that are already reflected in their distances from the mean for normal and crenated RBCs. Still, LDA can be used as a more stringent classifier as compared to the minimum distance classification.&lt;br /&gt;In this activity, I would like to give myself a grade of 10 for successfully implementing LDA to the data obtained from the previous activity. I was also able to somehow discuss the process and show the advantage of LDA.&lt;br /&gt;I would like to thank Dr. Gay Jane Perez for guiding is in this activity, and to Ms. Jica Monsanto for some discussions.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;Reference&lt;/span&gt;&lt;br /&gt;[1] &lt;a href="http://people.revoledu.com/kardi/tutorial/LDA/LDA.html#LDA"&gt;http://people.revoledu.com/kardi/tutorial/LDA/LDA.html#LDA&lt;/a&gt;&lt;br /&gt;[2] &lt;a href="http://en.wikipedia.org/wiki/Conditional_probability"&gt;http://en.wikipedia.org/wiki/Conditional_probability&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-7089539958213517907?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/7089539958213517907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-15-probabilistic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/7089539958213517907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/7089539958213517907'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-15-probabilistic.html' title='Activity 15 - Probabilistic Classification'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_hvTI8mj6_Do/Sqhqu64LJkI/AAAAAAAAApk/QuqmgruFq90/s72-c/equation.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-2832515569072553786</id><published>2009-09-07T18:06:00.000-07:00</published><updated>2009-09-09T19:29:26.502-07:00</updated><title type='text'>Activity 14 - Pattern Recognition</title><content type='html'>&lt;div style="text-align: justify;"&gt;Classifying objects accurately based on visual information is one of the most basic yet interesting and amazing representation of how the human brain and the human senses work together. Characterization of objects usually starts with identifying the kinds or classes of objects. This can be done by first defining the basic features of the objects in a class, usually by shape, size or color, that can be used to easily discriminate objects among different classes. The human brain stores this knowledge of features of objects in a class and also determining the main differences in the basic features among classes. Using this information, new objects can be classified based on the basic features compared with that defined for the classes, finding out to which class its set of features most closely resembles.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This is the model used by &lt;span style="font-style: italic;"&gt;computer vision &lt;/span&gt;for automatically classifying objects based on visual information. The process revolves around pattern recognition by creating the set of basic features for an object to serve as pattern. Image processing techniques can be applied to provide the automated gathering of basic feature sets. Classes are defined by the patterns of objects belonging to that class. Then, new objects, having features to be classified are determined on which class they fall into.&lt;br /&gt;Minimum distance classification is one way of quantifying the resemblance of a pattern of an unclassified object to the patterns of different classes of objects. The principle basically follows the fact that the object can be classified to a class to which its set of features has the least distance from the mean of the features of the objects from that class. By having the set of features contained in a feature vector (each element represents a feature and each vector represents an object), the distance can be calculated using the Euclidean distance formula.&lt;br /&gt;In this activity, red blood cells (RBCs) are classified whether normal (Erythrocyte) or crenated (Echinocyte). Crenation happens when a cell is exposed to a hypertonic solution, causing it to lose water by osmosis and shrink producing an abnormally shaped cell (&lt;a href="http://en.wikipedia.org/wiki/Crenation"&gt;http://en.wikipedia.org/wiki/Crenation&lt;/a&gt;). An image of a normal and crenated RBC is shown below (indicated by the arrow).&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SqW4fgtWLqI/AAAAAAAAAoE/xiBAkjDGGOI/s1600-h/Erythrocyte-100x-website-arrow.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SqW4fgtWLqI/AAAAAAAAAoE/xiBAkjDGGOI/s400/Erythrocyte-100x-website-arrow.jpg" alt="" id="BLOGGER_PHOTO_ID_5378908181459512994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Normal&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SqW4fcx14FI/AAAAAAAAAn8/Lmwk34zR1X0/s1600-h/Echinocyte-I-100x-website-arrow.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SqW4fcx14FI/AAAAAAAAAn8/Lmwk34zR1X0/s400/Echinocyte-I-100x-website-arrow.jpg" alt="" id="BLOGGER_PHOTO_ID_5378908180404625490" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Crenated&lt;br /&gt;&lt;span style="font-size:78%;"&gt;(image taken from &lt;a href="http://www.healthsystem.virginia.edu/internet/hematology/hessidb/alphabeticalglossary.cfm"&gt;http://www.healthsystem.virginia.edu/internet/hematology/hessidb/alphabeticalglossary.cfm&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;It is important to study the effects of the environment to a cell or to an individual whether it can survive in it or not. Analysis of RBCs in different solutions with different concentrations is one way of providing this study. Classifying normal and crenated RBCs and providing a statistics for the classified objects is therefore critical. However, sufficient number of samples may be required to make conclusions about the cell-environment interaction. Classifying a large number of RBCs for a sufficient sample size is a very tedious and time consuming task, which is why automation by computer vision has been a rapidly-developing technology. Automatic recognition of crenated and normal RBCs is demonstrated here.&lt;br /&gt;Based on the change in shape of the crenated from normal RBC, a set of basic features can be created. Thresholding (&lt;span style="font-style: italic;"&gt;im2bw()&lt;/span&gt;) was applied first to separate the cells in the image from the background. Labeling (&lt;span style="font-style: italic;"&gt;bwlabel()&lt;/span&gt;) was then applied to clean the image from small fragments and incomplete cells (at the edges) and also to remove overlapping cells. Morphological operations should not be applied to remove these since this may alter the shape of the cells, which is critical in defining the features. Two trials were done using images with both normal and crenated RBCs as shown below.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Trial 1&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/_hvTI8mj6_Do/SqW4fcx14FI/AAAAAAAAAn8/Lmwk34zR1X0/s1600-h/Echinocyte-I-100x-website-arrow.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 302px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SqW4fcx14FI/AAAAAAAAAn8/Lmwk34zR1X0/s400/Echinocyte-I-100x-website-arrow.jpg" alt="" id="BLOGGER_PHOTO_ID_5378908180404625490" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Original&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:78%;"&gt;(image taken from &lt;a href="http://www.healthsystem.virginia.edu/internet/hematology/hessidb/alphabeticalglossary.cfm"&gt;http://www.healthsystem.virginia.edu/internet/hematology/hessidb/alphabeticalglossary.cfm&lt;/a&gt;)&lt;/span&gt;&lt;br /&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/_hvTI8mj6_Do/SqXCHuJqYRI/AAAAAAAAAoM/1gR1vtuERyA/s1600-h/threshold.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 301px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SqXCHuJqYRI/AAAAAAAAAoM/1gR1vtuERyA/s400/threshold.bmp" alt="" id="BLOGGER_PHOTO_ID_5378918767867355410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Thresholding&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SqXCH--JYcI/AAAAAAAAAoU/5XJmOJ4j2Tg/s1600-h/labeled.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SqXCH--JYcI/AAAAAAAAAoU/5XJmOJ4j2Tg/s400/labeled.bmp" alt="" id="BLOGGER_PHOTO_ID_5378918772382458306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Labeling&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Trial 2&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SqXDTJKInVI/AAAAAAAAAoc/nVzIBhEt21w/s1600-h/63_1-2.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 325px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SqXDTJKInVI/AAAAAAAAAoc/nVzIBhEt21w/s400/63_1-2.jpg" alt="" id="BLOGGER_PHOTO_ID_5378920063607283026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Original&lt;br /&gt;&lt;span style="font-size:78%;"&gt;(image taken from &lt;a href="http://www.isrvma.org/article/63_1_1.htm"&gt;http://www.isrvma.org/article/63_1_1.htm&lt;/a&gt;)&lt;/span&gt;&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://1.bp.blogspot.com/_hvTI8mj6_Do/SqXDT58OFmI/AAAAAAAAAos/XuxJar71-8g/s1600-h/threshold.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 324px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SqXDT58OFmI/AAAAAAAAAos/XuxJar71-8g/s400/threshold.bmp" alt="" id="BLOGGER_PHOTO_ID_5378920076702258786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Thresholding&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SqXDTS6jX4I/AAAAAAAAAok/IHBmQu65AI4/s1600-h/labeled.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 322px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SqXDTS6jX4I/AAAAAAAAAok/IHBmQu65AI4/s400/labeled.bmp" alt="" id="BLOGGER_PHOTO_ID_5378920066226282370" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Labeling&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;From the results of image processing, five normal and five crenated RBCs were  visually classified and taken to serve as the training set and to define the set of basic features for the corresponding class. The basic features chosen were (i)  the ratio of the square of the perimeter versus the area, and (ii)  the ratio of the standard deviation of the radius of cell versus the mean. These features were used so as to highlight the main difference in the shape of the normal and crenated RBCs. Also, dimensionless units should be used for the method to be invariant in terms of size.&lt;br /&gt;The features were easily obtained by using the command &lt;span style="font-style: italic;"&gt;follow() &lt;/span&gt;in Scilab to determine the coordinates of the contour of the cells. The perimeter is just the number of the coordinates of the contour, while the area is obtained using Green's theorem (Activity 2).  The standard deviation of the cell is obtained from the coordinates of the contour by first subtracting the mean (x, y)  to the (x, y) values of the contour. The set of radius was then obtained by Pythagorean formula using the resulting (x, y), and then calculating for the standard deviation. The mean of the set of features for the five objects would define the features for corresponding class.&lt;br /&gt;Now, for each cell, the set of features was extracted to serve as the test set as described previously, and this was compared to the mean for the normal and the mean for the crenated RBCs. By minimum distance classification, if the set of features for that cell is closer to the mean for the normal RBCs, then it is classified as normal. Otherwise, it is crenated. The resulting classification was verified by comparison with visual classification.&lt;br /&gt;Analysis was also done by looking at the scatter plot of the object features, shown below. This would determine if the features for a class are well separated from the other class. The training set features indeed are isolated from each other. However, the test set still has some of the cells 'creeping' into the region of the other class. There is a large deviation of the features for the crenated RBCs, as seen in the plots, more obviously in trial 2. However, it can still be noticed that there is a definite region to where most of the objects in a class fall into.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Trial 1&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/_hvTI8mj6_Do/SqXN5apBuDI/AAAAAAAAApc/B57ueyE6cts/s1600-h/Scatter+plot.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 316px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SqXN5apBuDI/AAAAAAAAApc/B57ueyE6cts/s400/Scatter+plot.bmp" alt="" id="BLOGGER_PHOTO_ID_5378931716251564082" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Trial 2&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/_hvTI8mj6_Do/SqXNtphv6OI/AAAAAAAAApU/To1Vi3IhtFI/s1600-h/Scatter+plot.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 330px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SqXNtphv6OI/AAAAAAAAApU/To1Vi3IhtFI/s400/Scatter+plot.bmp" alt="" id="BLOGGER_PHOTO_ID_5378931514089138402" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="down" style="display: block;" id="formatbar_JustifyCenter" title="Align Center" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 11);ButtonMouseDown(this);"&gt;&lt;img src="http://www.blogger.com/img/blank.gif" alt="Align Center" class="gl_align_center" border="0" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;From the minimum distance classification, the summary of the classification is presented in the table below. Based on the scatter plot, the results seem logical because for trial 1, the normal and crenated features have a more definite separation compared to trial 2. Moreover, the  features for the crenated RBCs have a higher deviation from the mean compared to the normal and many crenated RBCs are very close to the normal RBC features. This produced a very low correctly classified percentage of the crenated RBCs. Since the normal RBCs are very close to the mean, it has a very high classification percentage. One major reason why there are better results for trial 1 is because the image has a higher resolution compared to that used for trial 2. The cells occupy more pixels, which helps in increasing the effect of the difference in shape from the normal and crenated RBCs. Low resolution images are difficult to handle for the classification process. The 'spikes' at the edge of the crenated RBCs would no longer be evident if it is represented by fewer pixels.&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/_hvTI8mj6_Do/SqXMWL6yFoI/AAAAAAAAApM/3k-RsFtBQZU/s1600-h/Results+table.bmp"&gt;&lt;img style="cursor: pointer; width: 400px; height: 82px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SqXMWL6yFoI/AAAAAAAAApM/3k-RsFtBQZU/s400/Results+table.bmp" alt="" id="BLOGGER_PHOTO_ID_5378930011492456066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;From the results obtained, this technique demonstrates a feasible method for computer vision in classifying RBCs. After initializing the process by taking known crenated and normal RBCs for the mean set of features, automatic classification can be applied to classify RBCs, for example, in a whole slide, or for different slides, using the same setup (magnificatio, camera saturation, etc.). Some of the limitations are (i) the mean set of features can only be used in the same setup,  (ii) overlapping cells are not classified, and (iii) high resolution setups are needed for accurate cell classification.&lt;br /&gt;For this activity, I would like to give myself a grade of 10 for doing a very good job. I used a very interesting sample and I think my classification is very satisfactory for this kind of sample. The discussions I provided are, somehow, also extensive.&lt;br /&gt;I would like to thank our professor, Dr. Gay Jane Perez, for the guidance in doing this activity, and Ms. Jica Monsanto and Mr. Jay Samuel Combinido for their help in the process of determining features for classification.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reference&lt;/span&gt;&lt;br /&gt;M. Soriano, Applied Physics 186 Activity 14 - Pattern Recognition Manual, 2008.&lt;br /&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/5676253085193712352-2832515569072553786?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/2832515569072553786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-14-pattern-recognition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/2832515569072553786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/2832515569072553786'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/09/activity-14-pattern-recognition.html' title='Activity 14 - Pattern Recognition'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_hvTI8mj6_Do/SqW4fgtWLqI/AAAAAAAAAoE/xiBAkjDGGOI/s72-c/Erythrocyte-100x-website-arrow.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-4529525633702569787</id><published>2009-08-07T08:50:00.000-07:00</published><updated>2009-08-07T09:32:24.124-07:00</updated><title type='text'>Activity 10 - Processing Text</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;div style="text-align: justify;"&gt;Processing of text is important, especially, texts containing handwritings. These can have significant applications for the analysis of documents, such as forged signatures and anonymous letters. In this activity, image processing techniques tackled previously in the activities are used to extract different letters of a handwritten text. These are labeled to identify each letter from the others.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Using a cropped portion of the document with handwritten texts, filtering with some weight was done to remove lines in the text. It also enhances enhances the details of the letters.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnxOOhmWFUI/AAAAAAAAAlU/tg1Gf7dEn7Y/s1600-h/test.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 98px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnxOOhmWFUI/AAAAAAAAAlU/tg1Gf7dEn7Y/s200/test.bmp" alt="" id="BLOGGER_PHOTO_ID_5367250867363124546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Original&lt;br /&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/_hvTI8mj6_Do/SnxOOhS6xwI/AAAAAAAAAlc/4W-8_6H-Beo/s1600-h/deblur.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 98px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnxOOhS6xwI/AAAAAAAAAlc/4W-8_6H-Beo/s200/deblur.bmp" alt="" id="BLOGGER_PHOTO_ID_5367250867281643266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Removal of lines and other weighted filtering&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;For segmenting the image, thresholding is applied to obtain the signals from the letters. This is to process each blob of the image as a letter.&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/_hvTI8mj6_Do/SnxOPBBYWNI/AAAAAAAAAlk/PmRTHTTrVNU/s1600-h/binary2.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 98px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnxOPBBYWNI/AAAAAAAAAlk/PmRTHTTrVNU/s200/binary2.bmp" alt="" id="BLOGGER_PHOTO_ID_5367250875798018258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Resulting binarized image&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Since there are still unwanted artifacts (such as lines and dots), morphological operations were applied to clean the image. In this case, the opening, or the application of erosion and dilation morphological operations in sequence, was used.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnxOPDWvoWI/AAAAAAAAAls/Tos-t1EMths/s1600-h/open3.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 98px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnxOPDWvoWI/AAAAAAAAAls/Tos-t1EMths/s200/open3.bmp" alt="" id="BLOGGER_PHOTO_ID_5367250876424495458" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Cleaning of image by opening operation (dilation after erosion)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Initial labeling of the letters was done to determine whether each letter was detected. This also tests whether each letter is well segmented from the background and from other letters.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnxOPX8RhGI/AAAAAAAAAl0/VixsiKLDKaI/s1600-h/labeled.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 98px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnxOPX8RhGI/AAAAAAAAAl0/VixsiKLDKaI/s200/labeled.bmp" alt="" id="BLOGGER_PHOTO_ID_5367250881950614626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Labeled image of each letter&lt;br /&gt;Each letter ideally has a unique color from the other letters&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;To provide the basis form of the letters, thinning morphological operation was applied. The result of this shows the shape and structure of the letters, for example, of a handwritten text. The curvatures and length are some characterizations that can be made for each letter upon analysis of the results.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnxPE7eK5uI/AAAAAAAAAl8/G0t92CECjHY/s1600-h/thin_open1.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 98px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnxPE7eK5uI/AAAAAAAAAl8/G0t92CECjHY/s200/thin_open1.bmp" alt="" id="BLOGGER_PHOTO_ID_5367251802021095138" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnxPFKvu-mI/AAAAAAAAAmE/AXdKjMyHl6s/s1600-h/labeled_thin.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 98px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnxPFKvu-mI/AAAAAAAAAmE/AXdKjMyHl6s/s200/labeled_thin.bmp" alt="" id="BLOGGER_PHOTO_ID_5367251806121294434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Thinning and labeling of the letters&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The results obtained were not very satisfactory. One major problem is that the filtering of lines initially performed also removed some of the details of the letters. Some letters were even cut and no longer has the same form.&lt;br /&gt;There are some morphological operations that might alleviate some of this problems. However, the basic operations applied here were insufficient, or probably, there are structuring elements that are more appropriate.&lt;br /&gt;Furthermore, it is important from the start that the document image to be processed have relatively defined edges of the letters. Some blurring upon capturing the image of the document can really affect the segmentation because letters would be hard to isolate from adjacent letters. There is also a better way of providing this by using, for example, a deblurring filter (or deconvolution), that would help increase the details, producing a better resolution of the image.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnxP46yAEQI/AAAAAAAAAmM/FwZ6t1pr5Zs/s1600-h/a_rot.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 106px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnxP46yAEQI/AAAAAAAAAmM/FwZ6t1pr5Zs/s200/a_rot.bmp" alt="" id="BLOGGER_PHOTO_ID_5367252695189033218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Cropped image document page.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnxP5Kph-RI/AAAAAAAAAmU/zc6vUUZIKUI/s1600-h/correlation2.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 106px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnxP5Kph-RI/AAAAAAAAAmU/zc6vUUZIKUI/s200/correlation2.bmp" alt="" id="BLOGGER_PHOTO_ID_5367252699448473874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Instances of the word description highlighted by the peak points of this image&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Using a sample image of the word &lt;span style="font-style: italic;"&gt;DESCRIPTION &lt;/span&gt;from the filtering and binarized results previously obtained, the instances of the word is highlighted in the cropped image document shown above. Correlation was applied to detect the instance of the word with the sample &lt;span style="font-style: italic;"&gt;DESCRIPTION &lt;/span&gt;image as the basis template.&lt;br /&gt;&lt;br /&gt;For this activity, I would like to give myself a grade of 9 because, even though there are significant applications of the image processing techniques previously studied, the results obtained were somewhat unacceptable. It is important, however, that the techniques studied were implemented in this activity in the proper manner (and right instance), to some extent.&lt;br /&gt;&lt;br /&gt;I would like to acknowledge Winsome Chloe Rara, Jay Samuel Combinido, Mark Jayson Villangca and Miguel Sison for some discussions regarding this activity. I would also like to thank Dr. Maricor Soriano for the guidance, as our professor.&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/5676253085193712352-4529525633702569787?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/4529525633702569787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-10-processing-text.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/4529525633702569787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/4529525633702569787'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-10-processing-text.html' title='Activity 10 - Processing Text'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_hvTI8mj6_Do/SnxOOhmWFUI/AAAAAAAAAlU/tg1Gf7dEn7Y/s72-c/test.bmp' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-822350268632107488</id><published>2009-08-07T05:25:00.001-07:00</published><updated>2009-08-07T06:58:57.326-07:00</updated><title type='text'>Activity 12 - Color Image Segmentation</title><content type='html'>&lt;div style="text-align: justify;"&gt;From the early activities, thresholding an image is one way of segmenting the region of interest from the background. However, this cannot be easily applied for colored images with an obtained grayscale that is almost uniform. That is, the region of interest or the object of study has the same brightness as the background.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;One way to solve this problem is to exploit the color information contained in the image. Many objects of important study can have distinct colors that can separate itself from its surroundings. However, since three-dimensional objects can have shading variations of its color, images are usually rendered in their normalized chromaticity coordinates, which describe its pure color information. Normalized chromaticity coordinates are obtained for each channel (RGB) by dividing the value for that channel with the sum of the values in three channels. As a consequence, the image can be represented by just two coordinates, usually &lt;span style="font-style: italic;"&gt;r&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;g&lt;/span&gt;. An example of a normalized chromaticity coordinate space is shown below, with &lt;span style="font-style: italic;"&gt;r&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;g&lt;/span&gt; as the &lt;span style="font-style: italic;"&gt;x&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;y&lt;/span&gt; coordinates, respectively.&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/_hvTI8mj6_Do/SnwhGnE7oVI/AAAAAAAAAjs/BfSFivzFXOk/s1600-h/NCC.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 182px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnwhGnE7oVI/AAAAAAAAAjs/BfSFivzFXOk/s200/NCC.jpg" alt="" id="BLOGGER_PHOTO_ID_5367201253371388242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Normalized chromaticity coordinate space&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;From the normalized chromaticity coordinates, color image segmentation is applied by obtaining the probability in which a pixel or a point in the image belongs to the color distribution of the region or object of interest. With this in mind, there are two methods, which basically generates the histogram (distribution) of color of the region of interest: Parametric and Non-parametric probability estimation.&lt;br /&gt;&lt;br /&gt;Parametric probability estimation assumes a Gaussian distribution of the color of the region of interest. By obtaining the statistics from the region of interest (mean and standard deviation), the probability of a pixel falling into this distribution is easily calculated. Of course, the total probability is based on the probability of both falling into the distribution of &lt;span style="font-style: italic;"&gt;r &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;g. &lt;/span&gt;The joint probability is taken which is the product of the probability for &lt;span style="font-style: italic;"&gt;r &lt;/span&gt;and the probability for &lt;span style="font-style: italic;"&gt;g&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;On the other hand, non-parametric probability estimation uses a more accurate description of the distribution of the color of the region of interest. The actual (2D) histogram of the &lt;span style="font-style: italic;"&gt;r &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;g &lt;/span&gt;values of the region of interest is obtained. Given the values of the &lt;span style="font-style: italic;"&gt;r &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;g &lt;/span&gt;values of a pixel, the pixel is replaced with the value &lt;span style="font-style: italic;"&gt;&lt;/span&gt;in the histogram corresponding to the &lt;span style="font-style: italic;"&gt;r &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;g &lt;/span&gt;values. This histogram backprojection method basically uses the histogram of the region of interest as a "look-up table."&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Segmentation can have significant applications for studies regarding colored objects. One major study is about corals. As a demonstration, sample images are obtained and segmented with the region of interest as the corals. This can help in studying coral growth and, possibly, in connections with specific marine species studies.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnwlI1W3SUI/AAAAAAAAAj0/J1EBfYFKe9A/s1600-h/p-33008-42070-fake-coral.jpg"&gt;&lt;img style="cursor: pointer; width: 197px; height: 200px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnwlI1W3SUI/AAAAAAAAAj0/J1EBfYFKe9A/s200/p-33008-42070-fake-coral.jpg" alt="" id="BLOGGER_PHOTO_ID_5367205689610946882" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnwlJEpN3iI/AAAAAAAAAj8/BYJ8QEZifpU/s1600-h/binary_orig.bmp"&gt;&lt;img style="cursor: pointer; width: 197px; height: 200px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnwlJEpN3iI/AAAAAAAAAj8/BYJ8QEZifpU/s200/binary_orig.bmp" alt="" id="BLOGGER_PHOTO_ID_5367205693714456098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Original and its binary image&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwlJSKWTCI/AAAAAAAAAkM/runXBVjbh24/s1600-h/segmented_param.bmp"&gt;&lt;img style="cursor: pointer; width: 197px; height: 200px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwlJSKWTCI/AAAAAAAAAkM/runXBVjbh24/s200/segmented_param.bmp" alt="" id="BLOGGER_PHOTO_ID_5367205697343081506" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnwlJBBgL5I/AAAAAAAAAkE/jph9RiCiBkI/s1600-h/bwsegmented_param.bmp"&gt;&lt;img style="cursor: pointer; width: 197px; height: 200px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnwlJBBgL5I/AAAAAAAAAkE/jph9RiCiBkI/s200/bwsegmented_param.bmp" alt="" id="BLOGGER_PHOTO_ID_5367205692742578066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Parametric probability estimation results and its binary image&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnwuWqJbVoI/AAAAAAAAAlM/rOZZjtjoNAE/s1600-h/segmented_nonparam.bmp"&gt;&lt;img style="cursor: pointer; width: 197px; height: 200px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnwuWqJbVoI/AAAAAAAAAlM/rOZZjtjoNAE/s200/segmented_nonparam.bmp" alt="" id="BLOGGER_PHOTO_ID_5367215822724617858" border="0" /&gt;&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt; &lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwuWSWSR4I/AAAAAAAAAlE/ZQc65V4Gr3E/s1600-h/bwsegmented_nonparam.bmp"&gt;&lt;img style="cursor: pointer; width: 197px; height: 200px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwuWSWSR4I/AAAAAAAAAlE/ZQc65V4Gr3E/s200/bwsegmented_nonparam.bmp" alt="" id="BLOGGER_PHOTO_ID_5367215816336099202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Non-parametric probability estimation results and its binary image&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This image shows a set of corals displayed. The coral that chosen to be segmented here is the red one. A patch from the image of the red coral was taken as the basis for which the normalized chromaticity coordinates distribution for both parametric and non-parametric probability estimation would be obtained. Notice from the binary image of the original that thresholding is not sufficient to highlight and segment only the red coral. Applying color image segmentation, both methods showed high detection of the red coral. This  demonstrates a good segmentation result. However, there are still portions of the orange coral that is unintentionally segmented. The non-parametric method result suggests that it has a more robust method. It provides lower segmentation for the orange coral. &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwpKJA3tLI/AAAAAAAAAkU/rYLspssOR9c/s1600-h/coralreefs.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 140px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwpKJA3tLI/AAAAAAAAAkU/rYLspssOR9c/s200/coralreefs.jpg" alt="" id="BLOGGER_PHOTO_ID_5367210110113789106" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwpK1Co-7I/AAAAAAAAAks/ltQimZOgA1o/s1600-h/binary_orig.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 140px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwpK1Co-7I/AAAAAAAAAks/ltQimZOgA1o/s200/binary_orig.bmp" alt="" id="BLOGGER_PHOTO_ID_5367210121932372914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Original and its binary image&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwpKn4ZT4I/AAAAAAAAAkk/MFWmplo-TnU/s1600-h/segmented_param.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 140px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwpKn4ZT4I/AAAAAAAAAkk/MFWmplo-TnU/s200/segmented_param.bmp" alt="" id="BLOGGER_PHOTO_ID_5367210118399741826" border="0" /&gt;&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt; &lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnwpKSCsv1I/AAAAAAAAAkc/yLSkTG8Squg/s1600-h/bwsegmented_param.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 140px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnwpKSCsv1I/AAAAAAAAAkc/yLSkTG8Squg/s200/bwsegmented_param.bmp" alt="" id="BLOGGER_PHOTO_ID_5367210112537378642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Parametric probability estimation results and its binary image&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwuWDqj1EI/AAAAAAAAAk8/qGZrWWReXrc/s1600-h/segmented_nonparam.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 140px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnwuWDqj1EI/AAAAAAAAAk8/qGZrWWReXrc/s200/segmented_nonparam.bmp" alt="" id="BLOGGER_PHOTO_ID_5367215812394603586" border="0" /&gt;&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt; &lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnwuV-NBlLI/AAAAAAAAAk0/U5be-f6vGi4/s1600-h/bwsegmented_nonparam.bmp"&gt;&lt;img style="cursor: pointer; width: 200px; height: 140px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnwuV-NBlLI/AAAAAAAAAk0/U5be-f6vGi4/s200/bwsegmented_nonparam.bmp" alt="" id="BLOGGER_PHOTO_ID_5367215810928546994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Non-parametric probability estimation results and its binary image&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Color image segmentation is now demonstrated here for an image of a site of corals in the sea. In wanting to study the areas where the orange coral grows, a patch was chosen from this coral. Segmentation was done and from the results shown above, it is very effective in isolating the coral from the background. The non-parametric probability estimation result is also verified to be better than the parametric results, because it is much more specific in segmenting the orange coral.&lt;br /&gt;&lt;br /&gt;For this activity, I would like to give myself a grade of 10 I obtained very desirable results. I also thought of, somehow, a significant object of study to be processed (corals).&lt;br /&gt;I acknowledge our professor, Dr. Maricor Soriano, and my classmates, Winsome Chloe Rara and Mark Jayson Villangca for discussions regarding this activity.&lt;br /&gt;&lt;/div&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;/div&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-822350268632107488?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/822350268632107488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-12-color-image-segmentation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/822350268632107488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/822350268632107488'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-12-color-image-segmentation.html' title='Activity 12 - Color Image Segmentation'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_hvTI8mj6_Do/SnwhGnE7oVI/AAAAAAAAAjs/BfSFivzFXOk/s72-c/NCC.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-2707215368968116584</id><published>2009-08-06T21:12:00.000-07:00</published><updated>2009-08-07T00:55:59.371-07:00</updated><title type='text'>Activity 11 - Color Camera Processing</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;div style="text-align: justify;"&gt;Color signals detected by colored cameras depend on the light source illuminating the scene or the objects. Images captured by camera are usually applied with corrections for objects to appear in their natural color. This is usually done by white balancing. Various white balancing algorithms have already been established. Colored cameras apply white balancing, sometimes automatically. Cameras also provide manual settings for white balancing, which is usually described by common light sources or settings such as sunlight, fluorescent lamps, etc.&lt;br /&gt;&lt;br /&gt;In this activity, two automatic white balancing algorithms are implemented: white patch and gray world algorithms. The white patch algorithm basically takes the RGB values of a known white object in the image and subtract these values to each corresponding channel of the image. In effect, the white patched object would be rendered white and the whole image would be white balanced. On the other hand, the gray world algorithm takes the average RGB values of the whole image, and divide the whole image channels using these values. These algorithms make sense because the spectrum or color of light illuminating the scene is basically cancelled out upon division.&lt;br /&gt;&lt;br /&gt;The two algorithms were used to white balance a set of images captured using a Motorola V3 camera set to different lighting conditions (white balancing setting; assumed incorrect), namely, cloudy, home, night, office and sunny. Two set of images were taken: (1) for a set of objects with bright colors representing the major hues (red, orange, yellow, green, blue and violet) and  (2) for a set objects with the same hue, but different values and saturation (red). A white object was placed with the two sets, which would serve as the white patch. It is important the images are captured with a fixed light source illuminating the objects. Furthermore, images obtained should not be saturated. It can even be taken with very low exposures and it would still contain most , if not all, of the color information. (M. Soriano, AP 186 Activity 11 Manual, 2009)&lt;br /&gt;&lt;br /&gt;Resulting white balanced images were obtained and shown below. The original images show that the white object no longer appears white because of the incorrectly set lighting condition of the camera used for capturing. It actually appears with the same color as the assumed setting from the lighting condition. This represents the reflection of the white object of the spectrum of the light source. The white balanced images resulting from the two algorithms correctly rendered the white object white. This should also ensure that the colors of the other objects are accurately obtained and displayed.&lt;br /&gt;&lt;br /&gt;***The results are presented with the original unbalanced image at the top and the white patch algorithm result (left) and gray world algorithm result (right) at the bottom.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Major Hues Representation&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;Cloudy&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/_hvTI8mj6_Do/SnusNkqcjhI/AAAAAAAAAfM/rTif_mde6cE/s1600-h/Cloudy.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnusNkqcjhI/AAAAAAAAAfM/rTif_mde6cE/s200/Cloudy.jpg" alt="" id="BLOGGER_PHOTO_ID_5367072730122063378" border="0" /&gt;&lt;/a&gt;&lt;br /&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/_hvTI8mj6_Do/SnusOBwfVJI/AAAAAAAAAfU/o1tig3kuzW0/s1600-h/Cloudy_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnusOBwfVJI/AAAAAAAAAfU/o1tig3kuzW0/s200/Cloudy_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367072737932039314" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snusz65Ln3I/AAAAAAAAAfk/aXzS1L6EylY/s1600-h/Cloudy_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snusz65Ln3I/AAAAAAAAAfk/aXzS1L6EylY/s200/Cloudy_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367073388924477298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Home&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snus6KX7ZiI/AAAAAAAAAfs/ehezdk7c9QU/s1600-h/Home.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snus6KX7ZiI/AAAAAAAAAfs/ehezdk7c9QU/s200/Home.jpg" alt="" id="BLOGGER_PHOTO_ID_5367073496159184418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snus6sNrFdI/AAAAAAAAAf0/TLwJQ4J9a-0/s1600-h/Home_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snus6sNrFdI/AAAAAAAAAf0/TLwJQ4J9a-0/s200/Home_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367073505242977746" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnutAyXEo5I/AAAAAAAAAf8/HUuHBN3UJkk/s1600-h/Home_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnutAyXEo5I/AAAAAAAAAf8/HUuHBN3UJkk/s200/Home_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367073609972229010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Night&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnutJdpbrfI/AAAAAAAAAgE/_7Z4kzVQ2zo/s1600-h/Night.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnutJdpbrfI/AAAAAAAAAgE/_7Z4kzVQ2zo/s200/Night.jpg" alt="" id="BLOGGER_PHOTO_ID_5367073759030914546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnutJnHEbEI/AAAAAAAAAgM/PQnT-__mJUc/s1600-h/Night_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnutJnHEbEI/AAAAAAAAAgM/PQnT-__mJUc/s200/Night_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367073761571138626" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnutSlKDQ0I/AAAAAAAAAgU/CdYPUjAASFw/s1600-h/Night_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnutSlKDQ0I/AAAAAAAAAgU/CdYPUjAASFw/s200/Night_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367073915665597250" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Office&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnutZzL_8-I/AAAAAAAAAgc/aLVTF2AEGnA/s1600-h/Office.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnutZzL_8-I/AAAAAAAAAgc/aLVTF2AEGnA/s200/Office.jpg" alt="" id="BLOGGER_PHOTO_ID_5367074039690949602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnutgGoI9II/AAAAAAAAAgk/UeuO6KvPYnw/s1600-h/Office_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnutgGoI9II/AAAAAAAAAgk/UeuO6KvPYnw/s200/Office_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367074147988468866" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snutt0YIPRI/AAAAAAAAAgs/RpPwVt_WVfQ/s1600-h/Office_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 145px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snutt0YIPRI/AAAAAAAAAgs/RpPwVt_WVfQ/s200/Office_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367074383607643410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sunny&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snut2V6pzHI/AAAAAAAAAg0/Ae1vumvLASE/s1600-h/Sunny.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snut2V6pzHI/AAAAAAAAAg0/Ae1vumvLASE/s200/Sunny.jpg" alt="" id="BLOGGER_PHOTO_ID_5367074530049772658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snut9WmR6sI/AAAAAAAAAg8/4uKsEr7Rljo/s1600-h/Sunny_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snut9WmR6sI/AAAAAAAAAg8/4uKsEr7Rljo/s200/Sunny_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367074650491841218" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnuuD9AxYRI/AAAAAAAAAhE/CZMNboLNEcI/s1600-h/Sunny_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnuuD9AxYRI/AAAAAAAAAhE/CZMNboLNEcI/s200/Sunny_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367074763882717458" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify; font-weight: bold;"&gt;Single Hue Representation&lt;/div&gt;Cloudy&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnuvSD5xLBI/AAAAAAAAAhM/5j1LZfOYunE/s1600-h/Cloudy.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnuvSD5xLBI/AAAAAAAAAhM/5j1LZfOYunE/s200/Cloudy.jpg" alt="" id="BLOGGER_PHOTO_ID_5367076105762188306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnuvST6CZAI/AAAAAAAAAhU/PGcZNM9Ny2Q/s1600-h/Cloudy_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnuvST6CZAI/AAAAAAAAAhU/PGcZNM9Ny2Q/s200/Cloudy_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367076110058284034" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnuvbEdhAXI/AAAAAAAAAhc/fZnBZIDqF0s/s1600-h/Cloudy_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnuvbEdhAXI/AAAAAAAAAhc/fZnBZIDqF0s/s200/Cloudy_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367076260530946418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Home&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snuvjzq0_XI/AAAAAAAAAhk/JDChw8wRQkk/s1600-h/Home.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snuvjzq0_XI/AAAAAAAAAhk/JDChw8wRQkk/s200/Home.jpg" alt="" id="BLOGGER_PHOTO_ID_5367076410642201970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snuvke0_WgI/AAAAAAAAAhs/fikRg9hRkbM/s1600-h/Home_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snuvke0_WgI/AAAAAAAAAhs/fikRg9hRkbM/s200/Home_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367076422227548674" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnuvvA8UiwI/AAAAAAAAAh0/CvWEL3GQryM/s1600-h/Home_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnuvvA8UiwI/AAAAAAAAAh0/CvWEL3GQryM/s200/Home_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367076603183794946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Night&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snuv5mfv6HI/AAAAAAAAAh8/mf44SHoM2Rc/s1600-h/Night.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snuv5mfv6HI/AAAAAAAAAh8/mf44SHoM2Rc/s200/Night.jpg" alt="" id="BLOGGER_PHOTO_ID_5367076785063192690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snuv6OFhnAI/AAAAAAAAAiE/hN0A1oUHTSc/s1600-h/Night_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snuv6OFhnAI/AAAAAAAAAiE/hN0A1oUHTSc/s200/Night_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367076795690621954" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnuwJZgxc0I/AAAAAAAAAiM/Y8a562dzK3U/s1600-h/Night_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnuwJZgxc0I/AAAAAAAAAiM/Y8a562dzK3U/s200/Night_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367077056455734082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Office&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnuwVD8yLlI/AAAAAAAAAiU/ROlDBuwj7nE/s1600-h/Office.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnuwVD8yLlI/AAAAAAAAAiU/ROlDBuwj7nE/s200/Office.jpg" alt="" id="BLOGGER_PHOTO_ID_5367077256826072658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnuwVo4ecxI/AAAAAAAAAic/te7Q68u9l1o/s1600-h/Office_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnuwVo4ecxI/AAAAAAAAAic/te7Q68u9l1o/s200/Office_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367077266740114194" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnuwjTxz_NI/AAAAAAAAAik/CyDWUZUWT9I/s1600-h/Office_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnuwjTxz_NI/AAAAAAAAAik/CyDWUZUWT9I/s200/Office_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367077501593189586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sunny&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnuwsqvASTI/AAAAAAAAAis/6hsIYJKmSro/s1600-h/Sunny.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnuwsqvASTI/AAAAAAAAAis/6hsIYJKmSro/s200/Sunny.jpg" alt="" id="BLOGGER_PHOTO_ID_5367077662374250802" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snuwsj396RI/AAAAAAAAAi0/2b1wmBEAFRc/s1600-h/Sunny_WB.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snuwsj396RI/AAAAAAAAAi0/2b1wmBEAFRc/s200/Sunny_WB.jpg" alt="" id="BLOGGER_PHOTO_ID_5367077660532795666" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snuw0ClyQrI/AAAAAAAAAi8/VZvGOirAGBM/s1600-h/Sunny_GW.jpg"&gt;&lt;img style="cursor: pointer; width: 190px; height: 142px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snuw0ClyQrI/AAAAAAAAAi8/VZvGOirAGBM/s200/Sunny_GW.jpg" alt="" id="BLOGGER_PHOTO_ID_5367077789037118130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Intuitively, the white patch algorithm provides a better white balancing compared to the gray world algorithm. This is because the white patch algorithm is much more specific such that the white object is to be made white. The difference is much more evident in the results for the single hue set of objects. Gray world algorithm takes the average of the whole image, which makes it suffer if there is a dominant color in the image. The spectrum of the light source would not have a significant effect on the average because the majority of detected signal belongs to the dominant color. This would not be a problem for the white patch algorithm because there is a reference white patch or object that is much more specific. It would not be affected by any dominant color in the image because it still is based on the white patch.&lt;br /&gt;&lt;br /&gt;However, as can be seen in the results for the set of images of the major hues, the gray world algorithm is sufficient enough for white balancing without any dominant color. Without the dominant color, the light source color would be the dominant signal that would account for the average RGB values of the image.&lt;br /&gt;&lt;br /&gt;The significance of the gray world algorithm is that it doesn't need any reference white patch. It can be applied to any image directly. The white patch algorithm needs the reference white object making it more inflexible.&lt;br /&gt;&lt;br /&gt;For this activity, I would like to give myself a grade of 10 for having relatively pleasing results. Moreover, I think I have provided an extensive analysis of this results.&lt;br /&gt;&lt;br /&gt;I would like to thank our professor, Dr. Maricor Soriano for the discussions regarding this activity, and some of my classmates for preliminary images taken (camera and laptop use).&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/5676253085193712352-2707215368968116584?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/2707215368968116584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-11-color-camera-processing.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/2707215368968116584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/2707215368968116584'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-11-color-camera-processing.html' title='Activity 11 - Color Camera Processing'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_hvTI8mj6_Do/SnusNkqcjhI/AAAAAAAAAfM/rTif_mde6cE/s72-c/Cloudy.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-4413309740923191790</id><published>2009-08-06T05:02:00.000-07:00</published><updated>2009-08-07T10:43:39.893-07:00</updated><title type='text'>Activity 9 - Binary Operations</title><content type='html'>&lt;div style="text-align: justify;"&gt;Analyzing images for data statistics is usually done after applying binary operations for segmenting the image. Regions of interests are the objects of study and these are segmented from the image background to make some measurements of the objects. Doing these for an image contaning a large number of objects under study is quite a tedious task. In this regard, it is important to provide image processing techniques for segmenting the objects not just from the background, but also in isolating them from other objects in the image. Thresholding and morphological operations can be applied. Using this technique results to better measurement estimates because of the number of samples that can be processed. Statistics can be generated to describe the measurements in processing more objects in a single image, and even for multiple images.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;One important application of this technique is the cell count and measurement of the area of a cell. Abnormally sized cells can be detected, which can provide some diagnosis for a certain disease.&lt;br /&gt;In this activity, cells are simulated as circular papers (papers from punched holes). The area of the circles are estimated. As an analog, a large image of the circular papers represent a whole blood sample. Looking through the microscope, this whole blood sample is actually subdivided into smaller views, so the large image of the circular papers were subdivided into smaller images (which may be overlapping). Sampling a single circle twice would provide a better statistics of the data because more acceptable data are measured. This would also help in easily detecting outliers in the area count because, obviously, there should be more circles in the images.&lt;br /&gt;&lt;br /&gt;First, thresholding and morphological operations are applied to enhance the images (using Scilab functions). After obtaining a binarized image (threholding), the subimages are cleaned by removing small white patches and incomplete circles. This was done by applying the opening operation. Opening operations is basically an application of dilation after the erosion morphological operation (from the previous activity). Using a circular structuring element with a radius slightly smaller than the circles, small objects and the overlapping regions circles can be removed. Initial erosion using the structuring element makes the circles (where the structuring element can fit) smaller, removing the overlap against another circle and also removing in the image all objects in which the structuring element cannot fit. Afterwards, dilation using the same structuring element would regenerate the form of the circles, which would produce an image ideal for data processing. The circular shape of the structuring element was chosen to provide this same form of circle. Afterwards, labeling was made so as to count the areas for each (ideally) isolated circle. The statistics for the area count were obtained.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;Original image&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/_hvTI8mj6_Do/SnrNLrsHVQI/AAAAAAAAAXs/0L8YzJWE90M/s1600-h/Circles001.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 330px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrNLrsHVQI/AAAAAAAAAXs/0L8YzJWE90M/s400/Circles001.jpg" alt="" id="BLOGGER_PHOTO_ID_5366827506555376898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Subimages and labeled (with different grayscale values) circles in the images&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnrUEUJm9jI/AAAAAAAAAbU/lqEjLWZJq7o/s1600-h/Circles001_001.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnrUEUJm9jI/AAAAAAAAAbU/lqEjLWZJq7o/s320/Circles001_001.jpg" alt="" id="BLOGGER_PHOTO_ID_5366835076558943794" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnrUEjgIWpI/AAAAAAAAAbk/xGzcOiVfS94/s1600-h/Circles_001_bwlabel1.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnrUEjgIWpI/AAAAAAAAAbk/xGzcOiVfS94/s320/Circles_001_bwlabel1.jpg" alt="" id="BLOGGER_PHOTO_ID_5366835080679938706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnrUEsihM0I/AAAAAAAAAbc/Et5ZArtu_B0/s1600-h/Circles001_002.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnrUEsihM0I/AAAAAAAAAbc/Et5ZArtu_B0/s320/Circles001_002.jpg" alt="" id="BLOGGER_PHOTO_ID_5366835083105874754" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrUExteEVI/AAAAAAAAAbs/vLQdSUY4xhQ/s1600-h/Circles_001_bwlabel2.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrUExteEVI/AAAAAAAAAbs/vLQdSUY4xhQ/s320/Circles_001_bwlabel2.jpg" alt="" id="BLOGGER_PHOTO_ID_5366835084493984082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnrYj4j_mpI/AAAAAAAAAb0/oAmqvN2EMpk/s1600-h/Circles001_003.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnrYj4j_mpI/AAAAAAAAAb0/oAmqvN2EMpk/s320/Circles001_003.jpg" alt="" id="BLOGGER_PHOTO_ID_5366840016955742866" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrYkhyrg2I/AAAAAAAAAcE/hyseB8yB_SY/s1600-h/Circles_001_bwlabel3.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrYkhyrg2I/AAAAAAAAAcE/hyseB8yB_SY/s320/Circles_001_bwlabel3.jpg" alt="" id="BLOGGER_PHOTO_ID_5366840028023194466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnrYkPXq4bI/AAAAAAAAAb8/pNVYYuIyCSQ/s1600-h/Circles001_004.JPG"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnrYkPXq4bI/AAAAAAAAAb8/pNVYYuIyCSQ/s320/Circles001_004.JPG" alt="" id="BLOGGER_PHOTO_ID_5366840023078068658" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrYk6ku3SI/AAAAAAAAAcM/SEbaRyIeN4I/s1600-h/Circles_001_bwlabel4.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrYk6ku3SI/AAAAAAAAAcM/SEbaRyIeN4I/s320/Circles_001_bwlabel4.jpg" alt="" id="BLOGGER_PHOTO_ID_5366840034675580194" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnrZMjAZH_I/AAAAAAAAAcU/fOVj8ueeL_c/s1600-h/Circles001_005.JPG"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnrZMjAZH_I/AAAAAAAAAcU/fOVj8ueeL_c/s320/Circles001_005.JPG" alt="" id="BLOGGER_PHOTO_ID_5366840715543912434" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrZNBVVsRI/AAAAAAAAAck/eOe9LGIb8iI/s1600-h/Circles_001_bwlabel5.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrZNBVVsRI/AAAAAAAAAck/eOe9LGIb8iI/s320/Circles_001_bwlabel5.jpg" alt="" id="BLOGGER_PHOTO_ID_5366840723684831506" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnrUEUJm9jI/AAAAAAAAAbU/lqEjLWZJq7o/s1600-h/Circles001_001.jpg"&gt; &lt;/a&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/_hvTI8mj6_Do/SnrZMyuMKWI/AAAAAAAAAcc/Qp3KSBpY4iM/s1600-h/Circles001_006.JPG"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnrZMyuMKWI/AAAAAAAAAcc/Qp3KSBpY4iM/s320/Circles001_006.JPG" alt="" id="BLOGGER_PHOTO_ID_5366840719762532706" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZNXOn5MI/AAAAAAAAAcs/XUKUZ3ozuxM/s1600-h/Circles_001_bwlabel6.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZNXOn5MI/AAAAAAAAAcs/XUKUZ3ozuxM/s320/Circles_001_bwlabel6.jpg" alt="" id="BLOGGER_PHOTO_ID_5366840729562244290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZpm7yEEI/AAAAAAAAAc0/k4nyBNLIEmY/s1600-h/Circles001_007.JPG"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZpm7yEEI/AAAAAAAAAc0/k4nyBNLIEmY/s320/Circles001_007.JPG" alt="" id="BLOGGER_PHOTO_ID_5366841214814523458" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZqWZzxnI/AAAAAAAAAdE/xD7cZ9vrDiM/s1600-h/Circles_001_bwlabel7.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZqWZzxnI/AAAAAAAAAdE/xD7cZ9vrDiM/s320/Circles_001_bwlabel7.jpg" alt="" id="BLOGGER_PHOTO_ID_5366841227556931186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZp6KtloI/AAAAAAAAAc8/lMjky5eoxSQ/s1600-h/Circles001_008.JPG"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZp6KtloI/AAAAAAAAAc8/lMjky5eoxSQ/s320/Circles001_008.JPG" alt="" id="BLOGGER_PHOTO_ID_5366841219977418370" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZqvM2HOI/AAAAAAAAAdM/iGzIrR58_VE/s1600-h/Circles_001_bwlabel8.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZqvM2HOI/AAAAAAAAAdM/iGzIrR58_VE/s320/Circles_001_bwlabel8.jpg" alt="" id="BLOGGER_PHOTO_ID_5366841234213444834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrZ7HcFNsI/AAAAAAAAAdU/jtLO1Yd6GOM/s1600-h/Circles001_009.JPG"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrZ7HcFNsI/AAAAAAAAAdU/jtLO1Yd6GOM/s320/Circles001_009.JPG" alt="" id="BLOGGER_PHOTO_ID_5366841515597706946" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZ7WTfhJI/AAAAAAAAAdc/MPkhGZEISaU/s1600-h/Circles_001_bwlabel9.jpg"&gt;&lt;img style="cursor: pointer; width: 154px; height: 154px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnrZ7WTfhJI/AAAAAAAAAdc/MPkhGZEISaU/s320/Circles_001_bwlabel9.jpg" alt="" id="BLOGGER_PHOTO_ID_5366841519588213906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnraK7WZrkI/AAAAAAAAAdk/B2eOgvRjvcs/s1600-h/Circle1_hist.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 295px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnraK7WZrkI/AAAAAAAAAdk/B2eOgvRjvcs/s400/Circle1_hist.bmp" alt="" id="BLOGGER_PHOTO_ID_5366841787230563906" border="0" /&gt; &lt;/a&gt;Mean: 559 (558.71233 )&lt;br /&gt;Standard Deviation: 219 (218.94237)&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;The large standard deviation arises from the outliers. These are caused by the blobs from the joined circles which produced very high area estimates. Analyzing the histogram above, these outliers can be omitted from the data set such that the area estimate can be obtained from the proper statistical distribution.&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/_hvTI8mj6_Do/Snxl8IOfJ6I/AAAAAAAAAms/Xi22GoHmjMM/s1600-h/Circle1_hist2.bmp"&gt;&lt;img style="cursor: pointer; width: 353px; height: 253px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snxl8IOfJ6I/AAAAAAAAAms/Xi22GoHmjMM/s400/Circle1_hist2.bmp" alt="" id="BLOGGER_PHOTO_ID_5367276939593590690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Histogram without the outliers&lt;br /&gt;Mean: 491 (491.04615)&lt;br /&gt;Standard Deviation: 54 (54.256172)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Removing the outliers provides a better estimate of the area. This is also evident for the standard deviation. It is significantly smaller without the outliers indicating that the all the measured data are very consistent. It also suggests that the area estimate is accurate because it is the consistently measured at the approximately the same value.&lt;br /&gt;&lt;br /&gt;For this activity, I would like to give myself a grade of 10 since all of the requirements are presented and the results are very satisfactory.&lt;br /&gt;I would like to thank Dr. Maricor Soriano for discussions regarding this activity.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-4413309740923191790?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/4413309740923191790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-9-binary-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/4413309740923191790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/4413309740923191790'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-9-binary-operations.html' title='Activity 9 - Binary Operations'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_hvTI8mj6_Do/SnrNLrsHVQI/AAAAAAAAAXs/0L8YzJWE90M/s72-c/Circles001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-7049329133981992947</id><published>2009-08-06T02:05:00.000-07:00</published><updated>2009-08-07T11:13:49.174-07:00</updated><title type='text'>Activity 8 - Morphological Operations</title><content type='html'>&lt;div style="text-align: justify;"&gt;In image processing, morphological operations are applied for altering the shape or structure of the objects in an image. These are usually done for binarized images. In this activity, dilation and erosion morphological operations were analyzed. These operations require structuring elements, which acts as basis for which the objects in the image would be dilated or eroded. Dilation basically results to an expansion of the object while erosion, to contraction of the object, based on the structuring elements used. Thinning and skeletonization operations (functions in Scilab, &lt;span style="font-style: italic;"&gt;thin() &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;skel()&lt;/span&gt;) were also examined.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;The objects used in this activity were a square (50x50 pixels), a triangle (base = 50 pixels, height = 30 pixels), a circle (radius = 25 pixels), a hollow square (60x60 pixels, 4-pixels thick edges) and a plus sign (line lengths = 50 pixels, 8 pixels thick). Dilation and erosion operations were applied to these shapes using the following structuring elements: 4x4, 2x4, 4x2 and a cross (5 pixels long, 1 pixel thick).&lt;br /&gt;&lt;br /&gt;First, the results of dilation and erosion were predicted to check understanding of how these morphological operations work. The predictions were verified by using the Scilab functions &lt;span style="font-style: italic;"&gt;erode()&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;dilate()&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;***The results presented below are in the following order: square, triangle, circle, hollow square and plus sign. For each shape result, the original image is shown at the top row, the dilation result at the second row, and the erosion at the third row. The dilation and erosion results for structuring elements 4x4, 2x4, 4x2, and cross are the top left, top right, bottom left, and bottom right, respectively.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Square&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/_hvTI8mj6_Do/SnqoYejGoUI/AAAAAAAAARs/sh97UBHUeVE/s1600-h/d_sq2.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqoYejGoUI/AAAAAAAAARs/sh97UBHUeVE/s400/d_sq2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366787044435992898" border="0" /&gt;&lt;/a&gt;Original&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snqols2gQUI/AAAAAAAAAR8/--XjGg0mWs8/s1600-h/d_sq1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snqols2gQUI/AAAAAAAAAR8/--XjGg0mWs8/s400/d_sq1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366787271613759810" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqotyTD0cI/AAAAAAAAASE/O5gxbA18k7E/s1600-h/d_sq2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqotyTD0cI/AAAAAAAAASE/O5gxbA18k7E/s400/d_sq2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366787410514661826" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqoyzmfF4I/AAAAAAAAASM/5jlvwS7a-8E/s1600-h/d_sq3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqoyzmfF4I/AAAAAAAAASM/5jlvwS7a-8E/s400/d_sq3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366787496763922306" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqotyTD0cI/AAAAAAAAASE/O5gxbA18k7E/s1600-h/d_sq2.bmp"&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqpH8oPKkI/AAAAAAAAASU/PGPfZ5EYdBA/s1600-h/d_sq4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqpH8oPKkI/AAAAAAAAASU/PGPfZ5EYdBA/s400/d_sq4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366787859964439106" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Dilation&lt;br /&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/_hvTI8mj6_Do/SnqpSynx09I/AAAAAAAAASc/qXaPj6_P4tQ/s1600-h/e_sq1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqpSynx09I/AAAAAAAAASc/qXaPj6_P4tQ/s400/e_sq1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366788046256722898" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqpZAzUaJI/AAAAAAAAASk/-MrGRm5aZdU/s1600-h/e_sq2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqpZAzUaJI/AAAAAAAAASk/-MrGRm5aZdU/s400/e_sq2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366788153142438034" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqpeJbGdNI/AAAAAAAAASs/A5Wsp7AVaX4/s1600-h/e_sq3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqpeJbGdNI/AAAAAAAAASs/A5Wsp7AVaX4/s400/e_sq3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366788241356125394" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqpkcyRe6I/AAAAAAAAAS0/c02HExq33ZM/s1600-h/e_sq4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqpkcyRe6I/AAAAAAAAAS0/c02HExq33ZM/s400/e_sq4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366788349632805794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Erosion&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Predicting the results of the morphological operations for square is easy because it has the same form as the structuring elements. The predictions were fairly accurate.&lt;br /&gt;&lt;br /&gt;Dilation expanded the dimensions of the square by the same amount of pixels along that dimension (vertical or horizontal) as the structuring element. The 4x4, of course, expanded the square equally resulting into square shape of sides increased by 4 pixels. The 2x4 and 4x2 structuring elements resulted into a rectangular shape with the longer axis of the rectangle the same as the longer axis of the structuring element used. The cross structuring element resulted into a more complex shape. The sides expanded more than the corners. This is caused by the extensions from the arms of the cross.&lt;br /&gt;&lt;br /&gt;On the other hand, erosion decreased the dimensions of the square by the same amount of pixels as the structuring element along the same dimension. The 2x4 and 4x2 structuring elements also showed the longer axis of the resulting rectangle perpendicular to the longer axis of the structuring element used. There were no longer extensions of the sides from the cross. This contrasting results from dilation and erosion is due to the fact that the two provides opposite restructuring. Dilation gets the points at which the center of the structuring element is still inside the object while erosion only at points where the whole structuring element is inside the object.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;Triangle&lt;/span&gt;&lt;br /&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/_hvTI8mj6_Do/SnqpvIcUG-I/AAAAAAAAAS8/k1dK0tx7co0/s1600-h/triangle.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqpvIcUG-I/AAAAAAAAAS8/k1dK0tx7co0/s400/triangle.bmp" alt="" id="BLOGGER_PHOTO_ID_5366788533150555106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Original&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/_hvTI8mj6_Do/Snqp26hs2fI/AAAAAAAAATE/cvpRXe8yiuk/s1600-h/d_tr1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snqp26hs2fI/AAAAAAAAATE/cvpRXe8yiuk/s400/d_tr1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366788666854005234" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snqp-pnLX2I/AAAAAAAAATM/8s1EXefi8UI/s1600-h/d_tr2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snqp-pnLX2I/AAAAAAAAATM/8s1EXefi8UI/s400/d_tr2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366788799752527714" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqqEti9FjI/AAAAAAAAATU/T9tumFhdDBY/s1600-h/d_tr3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqqEti9FjI/AAAAAAAAATU/T9tumFhdDBY/s400/d_tr3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366788903887771186" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqqJ94TaSI/AAAAAAAAATc/v-HrF-dLJ3k/s1600-h/d_tr4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqqJ94TaSI/AAAAAAAAATc/v-HrF-dLJ3k/s400/d_tr4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366788994171627810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Dilation&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqqawdUy4I/AAAAAAAAATk/_ogNKIM-3ik/s1600-h/e_tr1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqqawdUy4I/AAAAAAAAATk/_ogNKIM-3ik/s400/e_tr1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366789282626587522" border="0" /&gt;&lt;/a&gt;    &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snqqj_luu-I/AAAAAAAAATs/IrGAsqWKERM/s1600-h/e_tr2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snqqj_luu-I/AAAAAAAAATs/IrGAsqWKERM/s400/e_tr2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366789441307196386" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqqqBmdWrI/AAAAAAAAAT0/-UZ2kYjxq_0/s1600-h/e_tr3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqqqBmdWrI/AAAAAAAAAT0/-UZ2kYjxq_0/s400/e_tr3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366789544926337714" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqqwyBbN0I/AAAAAAAAAT8/_JYuF_ZXEsg/s1600-h/e_tr4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqqwyBbN0I/AAAAAAAAAT8/_JYuF_ZXEsg/s400/e_tr4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366789661003560770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Erosion&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For the triangle, the predicted results using the cross structuring element were not correct. In general, the expansion of the base of the triangle were the same as that observed for a side of the square upon dilation. Erosion along the base was also the same. The resulting changes in the dimension was also similar to how much the length of the sides of the square changed. The base changed (decrease or increased) by the amount of pixels of the structuring element (erosion or dilation, respectively) along the horizontal, while for the height, along the vertical. The cross produced a more pointed tip of the triangle upon erosion, as expected.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;Circle&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/_hvTI8mj6_Do/Snqq7__iVcI/AAAAAAAAAUE/enEjp48-kes/s1600-h/circle50.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snqq7__iVcI/AAAAAAAAAUE/enEjp48-kes/s400/circle50.bmp" alt="" id="BLOGGER_PHOTO_ID_5366789853732296130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Original&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqrDwHn_fI/AAAAAAAAAUM/Y01Lxx7ZM44/s1600-h/d_c1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqrDwHn_fI/AAAAAAAAAUM/Y01Lxx7ZM44/s400/d_c1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366789986910207474" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqrJZDJLdI/AAAAAAAAAUU/1_gJ32VRiXY/s1600-h/d_c2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqrJZDJLdI/AAAAAAAAAUU/1_gJ32VRiXY/s400/d_c2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366790083796610514" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqrRsPc9sI/AAAAAAAAAUc/HGxYwf8qk0A/s1600-h/d_c3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqrRsPc9sI/AAAAAAAAAUc/HGxYwf8qk0A/s400/d_c3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366790226387465922" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqrXQkCSEI/AAAAAAAAAUk/gPgRvskgd1o/s1600-h/d_c4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqrXQkCSEI/AAAAAAAAAUk/gPgRvskgd1o/s400/d_c4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366790322036820034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Dilation&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snqrc6cXp7I/AAAAAAAAAUs/xQhdMQc9kk8/s1600-h/e_c1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snqrc6cXp7I/AAAAAAAAAUs/xQhdMQc9kk8/s400/e_c1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366790419178301362" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snqrq7ClHHI/AAAAAAAAAU8/3Jg_LyNbONc/s1600-h/e_c2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snqrq7ClHHI/AAAAAAAAAU8/3Jg_LyNbONc/s400/e_c2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366790659856735346" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqrxDJ7YjI/AAAAAAAAAVE/uvArenZNOBY/s1600-h/e_c3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqrxDJ7YjI/AAAAAAAAAVE/uvArenZNOBY/s400/e_c3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366790765114253874" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snqr2mOz-kI/AAAAAAAAAVM/AstwTGhCQ8o/s1600-h/e_c4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/Snqr2mOz-kI/AAAAAAAAAVM/AstwTGhCQ8o/s400/e_c4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366790860429326914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Erosion&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The results for the circle verified the correctness of the predictions. The shape change were basically the same as that for the square, however, the elongations resulted into ellipse. The  orientation of the major axes of the ellipses have the same relationship as the longer axis of the square. The curved part of the ellipses were also deformed because the structuring elements are not curved.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;Hollow square&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/_hvTI8mj6_Do/SnqsBN39zaI/AAAAAAAAAVU/RnD_Jvf42CU/s1600-h/hollow_square.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqsBN39zaI/AAAAAAAAAVU/RnD_Jvf42CU/s400/hollow_square.bmp" alt="" id="BLOGGER_PHOTO_ID_5366791042869611938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Original&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqsLQmFO9I/AAAAAAAAAVc/lGv72yAF0yQ/s1600-h/d_h_sq1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqsLQmFO9I/AAAAAAAAAVc/lGv72yAF0yQ/s400/d_h_sq1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366791215398599634" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqsRG-McjI/AAAAAAAAAVk/Pu3X3iOy1fY/s1600-h/d_h_sq2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqsRG-McjI/AAAAAAAAAVk/Pu3X3iOy1fY/s400/d_h_sq2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366791315894596146" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqsWB8bSjI/AAAAAAAAAVs/hbqtpz12Z0s/s1600-h/d_h_sq3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqsWB8bSjI/AAAAAAAAAVs/hbqtpz12Z0s/s400/d_h_sq3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366791400444348978" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqseBdj22I/AAAAAAAAAV0/j5al2r5Jlbc/s1600-h/d_h_sq4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqseBdj22I/AAAAAAAAAV0/j5al2r5Jlbc/s400/d_h_sq4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366791537753840482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Dilation&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://1.bp.blogspot.com/_hvTI8mj6_Do/Snqsl_ultVI/AAAAAAAAAV8/vbuR68lCxeg/s1600-h/e_h_sq1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snqsl_ultVI/AAAAAAAAAV8/vbuR68lCxeg/s400/e_h_sq1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366791674727347538" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqswAwnvcI/AAAAAAAAAWE/l35BdEK61Mw/s1600-h/e_h_sq2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqswAwnvcI/AAAAAAAAAWE/l35BdEK61Mw/s400/e_h_sq2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366791846802996674" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snqs2rfN5FI/AAAAAAAAAWM/iB-pksXydyY/s1600-h/e_h_sq3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/Snqs2rfN5FI/AAAAAAAAAWM/iB-pksXydyY/s400/e_h_sq3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366791961351939154" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snqs84E3epI/AAAAAAAAAWU/MbrQFxSr0HY/s1600-h/e_h_sq4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snqs84E3epI/AAAAAAAAAWU/MbrQFxSr0HY/s400/e_h_sq4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366792067810294418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Erosion&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The morphological changes of the outer part of the hollow square are the same as results for the square. For the inner part, the morphological change is actually occurring for the black inner square. The change of the inner square is the same as that of the square with the opposite operation. For example, the dilation produces the same changes in the inner black square as that of the previous results for square upon erosion.&lt;br /&gt;The results for the cross structuring element was again inconsistent with the prediction. The dots at the corners was not expected because it was hard to visualize the cross fitting inside that region.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;Plus sign&lt;/span&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/_hvTI8mj6_Do/SnqtJdfrMeI/AAAAAAAAAWc/WcIB7iSGSjE/s1600-h/plus.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqtJdfrMeI/AAAAAAAAAWc/WcIB7iSGSjE/s400/plus.bmp" alt="" id="BLOGGER_PHOTO_ID_5366792284013277666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Original&lt;br /&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/_hvTI8mj6_Do/SnqtTkZ6NVI/AAAAAAAAAWk/AmJyos2u1Qw/s1600-h/d_plus1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqtTkZ6NVI/AAAAAAAAAWk/AmJyos2u1Qw/s400/d_plus1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366792457666835794" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqtZ48-SEI/AAAAAAAAAWs/mFPnFM8KjtE/s1600-h/d_plus2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqtZ48-SEI/AAAAAAAAAWs/mFPnFM8KjtE/s400/d_plus2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366792566261827650" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqtoV-UKnI/AAAAAAAAAW8/2j4dAe7UVXo/s1600-h/d_plus3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqtoV-UKnI/AAAAAAAAAW8/2j4dAe7UVXo/s400/d_plus3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366792814570252914" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqtuTA1JGI/AAAAAAAAAXE/XO9lx6DfNXk/s1600-h/d_plus4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqtuTA1JGI/AAAAAAAAAXE/XO9lx6DfNXk/s400/d_plus4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366792916854711394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Dilation&lt;br /&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/_hvTI8mj6_Do/Snqt0-ofqFI/AAAAAAAAAXM/Qm5XckaxlXE/s1600-h/e_plus1.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snqt0-ofqFI/AAAAAAAAAXM/Qm5XckaxlXE/s400/e_plus1.bmp" alt="" id="BLOGGER_PHOTO_ID_5366793031643015250" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snqt6i9ky0I/AAAAAAAAAXU/mzBtOWgHAuY/s1600-h/e_plus2.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snqt6i9ky0I/AAAAAAAAAXU/mzBtOWgHAuY/s400/e_plus2.bmp" alt="" id="BLOGGER_PHOTO_ID_5366793127294454594" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnquCaVItzI/AAAAAAAAAXc/0Rq-WYXg7Mw/s1600-h/e_plus3.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnquCaVItzI/AAAAAAAAAXc/0Rq-WYXg7Mw/s400/e_plus3.bmp" alt="" id="BLOGGER_PHOTO_ID_5366793262416312114" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnquJTTprhI/AAAAAAAAAXk/au7-jHc4FIs/s1600-h/e_plus4.bmp"&gt;&lt;img style="cursor: pointer; width: 128px; height: 128px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnquJTTprhI/AAAAAAAAAXk/au7-jHc4FIs/s400/e_plus4.bmp" alt="" id="BLOGGER_PHOTO_ID_5366793380790119954" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Erosion&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For the plus sign results, dimension changes were all, basically, the same as the changes for the square, either along the horizontal or the vertical. Again, this depends on the pixel size of the structuring elements along the specific dimension. Extensions at the tips of the plus sign were also observed, similar to the extensions of the sides of the square, using the dilation operation. However, the erosion of the plus sign with the cross produced a square at the center of the plus sign. This was not predicted. Intuitively, it makes sense because the cross would still fit inside the plus sign at the corners of the intersection of the vertical and horizontal lines. However, if the cross was moved further along the arms of the plus sign, it no longer fits making the arms thinner upon erosion.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnxsCaSFTOI/AAAAAAAAAnE/dUbki8225WQ/s1600-h/images.jpeg"&gt;&lt;img style="cursor: pointer; width: 124px; height: 124px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnxsCaSFTOI/AAAAAAAAAnE/dUbki8225WQ/s400/images.jpeg" alt="" id="BLOGGER_PHOTO_ID_5367283644589493474" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnxsxXpHe-I/AAAAAAAAAnU/r3ggPA5o3cs/s1600-h/binary.bmp"&gt;&lt;img style="cursor: pointer; width: 124px; height: 124px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnxsxXpHe-I/AAAAAAAAAnU/r3ggPA5o3cs/s400/binary.bmp" alt="" id="BLOGGER_PHOTO_ID_5367284451334650850" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;(original image from &lt;a href="http://www.nba.com/"&gt;http://www.nba.com&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span&gt;Thinning and skeletonization operations were performed for the binarized sample image shown above.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Thinning&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snxsxw0XjYI/AAAAAAAAAnc/ZsspTbgU3Zg/s1600-h/thin.bmp"&gt;&lt;img style="cursor: pointer; width: 124px; height: 124px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/Snxsxw0XjYI/AAAAAAAAAnc/ZsspTbgU3Zg/s400/thin.bmp" alt="" id="BLOGGER_PHOTO_ID_5367284458092727682" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="text-decoration: underline;"&gt; &lt;/span&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;Thinning obviously results into thinning of the body and branches of objects in the image. The body branches of a blob in an image is reduced to a single pixel.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Skeletonization &lt;/span&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/_hvTI8mj6_Do/SnxtrmTyd5I/AAAAAAAAAnk/Ya8YXi29V6w/s1600-h/skel.bmp"&gt;&lt;img style="cursor: pointer; width: 124px; height: 124px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnxtrmTyd5I/AAAAAAAAAnk/Ya8YXi29V6w/s400/skel.bmp" alt="" id="BLOGGER_PHOTO_ID_5367285451704137618" border="0" /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnxtsfY8gyI/AAAAAAAAAn0/kwvqeSERPOk/s1600-h/skele.bmp"&gt;&lt;img style="cursor: pointer; width: 124px; height: 124px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnxtsfY8gyI/AAAAAAAAAn0/kwvqeSERPOk/s400/skele.bmp" alt="" id="BLOGGER_PHOTO_ID_5367285467026588450" border="0" /&gt; &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snxtr7lZpNI/AAAAAAAAAns/Zupz7Ulhfco/s1600-h/skelb.bmp"&gt;&lt;img style="cursor: pointer; width: 124px; height: 124px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/Snxtr7lZpNI/AAAAAAAAAns/Zupz7Ulhfco/s400/skelb.bmp" alt="" id="BLOGGER_PHOTO_ID_5367285457415152850" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Skeletonization of the interior, exterior and both&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The &lt;span style="font-style: italic;"&gt;skel()&lt;/span&gt; operation in Scilab provides the skeletonization for the interior, exterior and for both, for all the objects in the binary image. It outputs the basic structures that support the "bodies" in the image. As the name suggests, the skeleton or the foundation that would build the objects in the image (supporting it from the interior and the exterior) is the result obtained in this morphological operation.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;For this activity, I would like to give myself a grade of 9 because I believe I rushed the predictions for the morphological operation results, making them more inaccurate. Actually, I intended to rush the predictions so that, somehow, some of the results will surprise me. Although, I think I should not have done that because I did not analyzed first how the operations work.&lt;br /&gt;&lt;br /&gt;I would like to thank our professor, Dr. Maricor Soriano for the discussions and guidance in this activity.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-7049329133981992947?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/7049329133981992947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-8-morphological-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/7049329133981992947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/7049329133981992947'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-8-morphological-operations.html' title='Activity 8 - Morphological Operations'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqoYejGoUI/AAAAAAAAARs/sh97UBHUeVE/s72-c/d_sq2.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-7996417628810403117</id><published>2009-08-06T00:36:00.000-07:00</published><updated>2009-08-06T02:15:06.152-07:00</updated><title type='text'>Activity 7 - Enhancement in the Frequency Domain</title><content type='html'>In the previous activity, the properties of the 2D Fourier transform were studied and analyzed. These properties can have significant implications in image enhancement by filtering. In the frequency domain (Fourier space), desired signals can be isolated from the noise (or unwanted patterns) embedded in the data or an image.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Two dot images and their corresponding Fourier transforms (modulus)&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://1.bp.blogspot.com/_hvTI8mj6_Do/SnqIfYuv7QI/AAAAAAAAAOU/DIC5f8utI6k/s1600-h/fig1_a+pt5+radius.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqIfYuv7QI/AAAAAAAAAOU/DIC5f8utI6k/s400/fig1_a+pt5+radius.png" alt="" id="BLOGGER_PHOTO_ID_5366751978761219330" border="0" /&gt;&lt;/a&gt;Single pixel (0.5 pixel radius)&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/_hvTI8mj6_Do/SnqIf6KyINI/AAAAAAAAAOc/R9_qCx9TjhM/s1600-h/fig1_b+2+radius.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqIf6KyINI/AAAAAAAAAOc/R9_qCx9TjhM/s400/fig1_b+2+radius.png" alt="" id="BLOGGER_PHOTO_ID_5366751987737174226" border="0" /&gt;&lt;/a&gt;2 pixel radius&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/_hvTI8mj6_Do/SnqIgcUQ-wI/AAAAAAAAAOk/XiDiXrxo-EY/s1600-h/fig1_c+6+radius.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqIgcUQ-wI/AAAAAAAAAOk/XiDiXrxo-EY/s400/fig1_c+6+radius.png" alt="" id="BLOGGER_PHOTO_ID_5366751996903750402" border="0" /&gt;&lt;/a&gt;6 pixel radius&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;One property of the Fourier transform is that the transform of the convolution of two functions is equal to the product of the transforms of the functions (AP 186 Activity 7 Manual, Soriano, 2009). In a one-dimensional situation, the transform of two Dirac delta functions at opposite sides (equal distance) from the origin is a cosinusoidal function (Hecht, Optics). The single-pixel two-dot image shown above (top left) is a 2D analog, so, the corresponding Fourier transform (modulus) is the 2D sinusoid image shown (right).&lt;br /&gt;&lt;br /&gt;On the other hand, the Fourier transform of the circle is actually a Bessel beam (Hecht, Optics). Increasing the pixel radius of the dot image is actually similar to convolving a circle with a certain radius to the dot image. The resulting Fourier transform will have the form of the product of the 2D sinusoid image and the Bessel beam, as a consequence of the property earlier stated. As evidence, the visible fringes in the Fourier transforms have the same frequency seemingly embedded on a Bessel beam.&lt;br /&gt;&lt;br /&gt;Since the FT is in inverse space, increasing the radius of the circle will result into a decrease in size of the Bessel beam. This decrease also translates to its product with the sinusoid transform.&lt;br /&gt;&lt;br /&gt;Now, replacing the circle dots with square dots, the Bessel beam would be replaced with a Bessel function along the x and y direction. This was seen in the previous activity of the Fourier transform of a square. This transform would also be multiplied with the sinusoid transform because, as mentioned, the image is convolution of a square and two Dirac delta functions. Again, increasing the widths of the squares will result into a decreasing size of the dimensions of the transform (see images below).&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Two square dot images and their Fourier transform&lt;br /&gt;&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/_hvTI8mj6_Do/SnqKoGXVEXI/AAAAAAAAAO8/pSXd7rjWEdM/s1600-h/fig_2+a+width+3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqKoGXVEXI/AAAAAAAAAO8/pSXd7rjWEdM/s400/fig_2+a+width+3.png" alt="" id="BLOGGER_PHOTO_ID_5366754327473230194" border="0" /&gt;&lt;/a&gt;3 pixel width squares&lt;br /&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/_hvTI8mj6_Do/SnqKnQCCdhI/AAAAAAAAAO0/nuVUdO-pyac/s1600-h/fig_2+a+width+5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqKnQCCdhI/AAAAAAAAAO0/nuVUdO-pyac/s400/fig_2+a+width+5.png" alt="" id="BLOGGER_PHOTO_ID_5366754312888415762" border="0" /&gt;&lt;/a&gt;5 pixel width squares&lt;br /&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/_hvTI8mj6_Do/SnqKnQg3CpI/AAAAAAAAAOs/-Tapvrn44MU/s1600-h/fig_2+a+width+7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqKnQg3CpI/AAAAAAAAAOs/-Tapvrn44MU/s400/fig_2+a+width+7.png" alt="" id="BLOGGER_PHOTO_ID_5366754313017690770" border="0" /&gt;&lt;/a&gt;7 pixel width squares&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Using another shape, this time Gaussian dots, the same phenomenon is observed. Because the Fourier transform of a Gaussian is also a Gaussian (Hecht, Optics), the fringe pattern would now be embedded on a Gaussian in the transform of the image. And with increasing standard deviaton (σ) of the Gaussian dot, the spread of the transform decreases.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Two Gaussian dot images and their Fourier transform&lt;br /&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/_hvTI8mj6_Do/SnqLniMBAtI/AAAAAAAAAPU/2srWdA1Pm5g/s1600-h/fig_2+a+sigma+1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqLniMBAtI/AAAAAAAAAPU/2srWdA1Pm5g/s400/fig_2+a+sigma+1.png" alt="" id="BLOGGER_PHOTO_ID_5366755417273729746" border="0" /&gt;&lt;/a&gt;σ=1&lt;br /&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/_hvTI8mj6_Do/SnqLndtOAfI/AAAAAAAAAPM/prHwOLaCbkI/s1600-h/fig_2+a+sigma+3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqLndtOAfI/AAAAAAAAAPM/prHwOLaCbkI/s400/fig_2+a+sigma+3.png" alt="" id="BLOGGER_PHOTO_ID_5366755416070816242" border="0" /&gt;&lt;/a&gt;σ=3&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/_hvTI8mj6_Do/SnqLnPwy_uI/AAAAAAAAAPE/N060lq6vPw0/s1600-h/fig_2+a+sigma+5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqLnPwy_uI/AAAAAAAAAPE/N060lq6vPw0/s400/fig_2+a+sigma+5.png" alt="" id="BLOGGER_PHOTO_ID_5366755412327726818" border="0" /&gt;&lt;/a&gt;σ=5&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For further analysis, the Fourier transform of the inverse image of the Gaussian dot was obtained and compared with the original. It appears that the transform of the inverse image is only a single point at the center. This makes sense because the Gaussian dots in the image are no longer the signal but the background. And because the dots are very small, it would appear that they no longer exist in the image. The image Fourier transform would then be more of a transform of a DC signal (white), which is of zero frequency, corresponding to the central dot on the Fourier transform observed.&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/_hvTI8mj6_Do/SnqMe3q03iI/AAAAAAAAAP0/WF2SKy-gIVM/s1600-h/Gauss-Inv.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqMe3q03iI/AAAAAAAAAP0/WF2SKy-gIVM/s400/Gauss-Inv.png" alt="" id="BLOGGER_PHOTO_ID_5366756367932907042" border="0" /&gt;&lt;/a&gt;Two Gaussian dot image (σ=1) and the inverted image&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/_hvTI8mj6_Do/SnqMep6omsI/AAAAAAAAAPs/e4DJDOIpxu0/s1600-h/FT_Gauss-Inv.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqMep6omsI/AAAAAAAAAPs/e4DJDOIpxu0/s400/FT_Gauss-Inv.png" alt="" id="BLOGGER_PHOTO_ID_5366756364241115842" border="0" /&gt;&lt;/a&gt;Corresponding Fourier transforms (modulus)&lt;br /&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/_hvTI8mj6_Do/SnqMeA26aaI/AAAAAAAAAPk/oBWHVuy5_48/s1600-h/Re_FT_Gauss-Inv.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqMeA26aaI/AAAAAAAAAPk/oBWHVuy5_48/s400/Re_FT_Gauss-Inv.png" alt="" id="BLOGGER_PHOTO_ID_5366756353219652002" border="0" /&gt;&lt;/a&gt;Real part of the Fourier transforms&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqMdxfmhnI/AAAAAAAAAPc/2CZV-tkq0O4/s1600-h/Imag_FT_Gauss-Inv.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqMdxfmhnI/AAAAAAAAAPc/2CZV-tkq0O4/s400/Imag_FT_Gauss-Inv.png" alt="" id="BLOGGER_PHOTO_ID_5366756349095347826" border="0" /&gt;&lt;/a&gt;Imaginary part of the Fourier transforms&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;However, since the frequency of the DC bias of a signal is real, the imaginary parts of the Fourier transform for the original and inverse Gaussian dot images are still the same. The Fourier transform is linear. As a consequence, frequency (in Fourier space) of the added signal is simply added to the transform. In this case, inverting the original image has the same effect as adding a DC signal resulting in the addition of a zero frequency, where most of the magnitude of the real part of the transform would be concentrated. On the other hand, the imaginary part will not be affected.&lt;br /&gt;&lt;br /&gt;The properties analyzed in the previous discussions can be applied to the filtering in frequency space for image enhancement. First, this is demonstrated in enhancing the ridges for a fingerprint image.&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/_hvTI8mj6_Do/SnqOyuO8BVI/AAAAAAAAAP8/wbYeRjaN2P8/s1600-h/orig_thumb%2BFT.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqOyuO8BVI/AAAAAAAAAP8/wbYeRjaN2P8/s400/orig_thumb%2BFT.png" alt="" id="BLOGGER_PHOTO_ID_5366758908020655442" border="0" /&gt;&lt;/a&gt;Original fingerprint image and its Fourier transform&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The frequencies characterizing the ridges were determined from the Fourier transform. Obviously, these frequencies (most of) are the ones specified by the region between the two ellipses (red). Removing other frequencies will help remove the blotches in the fingerprint image. Theoretically, edges and details have high frequencies, which is why the region chosen to be removed is the low frequencies. The region within the zero frequency was not removed because this would only result to darkening of the image.&lt;br /&gt;The enhancement done was applying the filtering twice and after each filtering, there was a linear enhancement of the histogram (equalization), which was demonstrated in Activity 4, for better contrast results (S. Greenberg, et al., Fingerprint Image Enhancement using Filtering Techniques, 2000). It can already be seen from the unbinarized image that the ridges are significantly enhanced.&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/_hvTI8mj6_Do/SnqPymnQ7uI/AAAAAAAAAQM/PmYMtEvOnGE/s1600-h/thumb_initial_filter+and+equalization.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqPymnQ7uI/AAAAAAAAAQM/PmYMtEvOnGE/s400/thumb_initial_filter+and+equalization.png" alt="" id="BLOGGER_PHOTO_ID_5366760005486833378" border="0" /&gt;&lt;/a&gt;1st filtering and contrast enhancement (linear). Left image is the filter mask used.&lt;br /&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/_hvTI8mj6_Do/SnqPydLNqXI/AAAAAAAAAQE/zPe1V8e-xEc/s1600-h/thumb_secondary_filter+and+equalization.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqPydLNqXI/AAAAAAAAAQE/zPe1V8e-xEc/s400/thumb_secondary_filter+and+equalization.png" alt="" id="BLOGGER_PHOTO_ID_5366760002953259378" border="0" /&gt;&lt;/a&gt;2nd filtering and contrast enhancement (linear). Left image is the filter mask used.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;The final enhanced image was binarized (threshold level = 0.5) and compared with the binarized image of the original fingerprint (threshold level = 0.5, 0.6). Notice that the ridges are more defined even at the edges of the image and the blotches are removed.&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/_hvTI8mj6_Do/SnqQqCT7i5I/AAAAAAAAAQc/syg-i2ipE0s/s1600-h/initial+binarized.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqQqCT7i5I/AAAAAAAAAQc/syg-i2ipE0s/s400/initial+binarized.png" alt="" id="BLOGGER_PHOTO_ID_5366760957814737810" border="0" /&gt;&lt;/a&gt;Binarized original fingerprint image (threshold  = 0.5 (left) and 0.6 (right))&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/_hvTI8mj6_Do/SnqQp5874ZI/AAAAAAAAAQU/mu8lU8oyCgI/s1600-h/final_enhanced.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 223px; height: 223px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqQp5874ZI/AAAAAAAAAQU/mu8lU8oyCgI/s400/final_enhanced.bmp" alt="" id="BLOGGER_PHOTO_ID_5366760955570807186" border="0" /&gt;&lt;/a&gt;Binarized final enhanced image (threshold level = 0.5)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Frequency filtering can also be applied when there are regular unwanted patterns embedded in the image. For example, the vertical lines in the image below can be removed to produce a better image of the lunar landing by the Apollo missions.&lt;br /&gt;&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://2.bp.blogspot.com/_hvTI8mj6_Do/SnqUGxZiyYI/AAAAAAAAAQk/o6HlED5yHQ8/s1600-h/hi_res_vertical_lg.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SnqUGxZiyYI/AAAAAAAAAQk/o6HlED5yHQ8/s400/hi_res_vertical_lg.gif" alt="" id="BLOGGER_PHOTO_ID_5366764750025968002" border="0" /&gt;&lt;/a&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: center;"&gt;Original image with vertical lines&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;a href="http://www.lpi.usra.edu/lunar/missions/apollo/apollo_11/images"&gt;(http://www.lpi.usra.edu/lunar/missions/apollo/apollo_11/images&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;These vertical lines look like the vertical fringe pattern previously analyzed. Filtering can then be applied so as to remove the frequencies corresponding to the vertical lines. As observed, these frequencies lie along the middle horizontal axis. Designing a mask similar to the one shown below, and apply this as the filter, the vertical lines in the original image are clearly removed. (see the resulting image below)&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/_hvTI8mj6_Do/SnqVNurk6zI/AAAAAAAAAQs/S6tH6Abscoo/s1600-h/lunar_mask.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 202px; height: 152px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqVNurk6zI/AAAAAAAAAQs/S6tH6Abscoo/s400/lunar_mask.png" alt="" id="BLOGGER_PHOTO_ID_5366765969067010866" border="0" /&gt;&lt;/a&gt;Filter mask (should be same size as image)&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/_hvTI8mj6_Do/SnqVOFRS5MI/AAAAAAAAAQ0/1uuqBtG6nmA/s1600-h/enhanced.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqVOFRS5MI/AAAAAAAAAQ0/1uuqBtG6nmA/s400/enhanced.bmp" alt="" id="BLOGGER_PHOTO_ID_5366765975130793154" border="0" /&gt;&lt;/a&gt;Grayscale image with the vertical lines removed&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Weaving patterns in a canvas painting are also unwanted repetitive patterns. The sample image shown below can be enhanced by removing these weaving patterns of the canvas. By analyzing the Fourier transform (left), the frequencies of these patterns can be detected and removed. The filter mask shown (right) can be used to remove the frequencies that should correspond to the weave.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqXszq3dNI/AAAAAAAAAQ8/okGDeJS0mpE/s1600-h/canvasweave.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 288px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqXszq3dNI/AAAAAAAAAQ8/okGDeJS0mpE/s400/canvasweave.JPG" alt="" id="BLOGGER_PHOTO_ID_5366768702005408978" border="0" /&gt;&lt;/a&gt;Painting on a canvas with weaving patterns&lt;br /&gt;&lt;span style="font-size:78%;"&gt;(Oil painting from the UP Vargas Museum Collection)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqYz4bdO7I/AAAAAAAAARE/vB3sEeRAyF8/s1600-h/fft+and+mask.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 145px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqYz4bdO7I/AAAAAAAAARE/vB3sEeRAyF8/s400/fft+and+mask.png" alt="" id="BLOGGER_PHOTO_ID_5366769923053665202" border="0" /&gt;&lt;/a&gt;Fourier transform of the image (left) and the designed filter mask (right)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqZOOmz4bI/AAAAAAAAARM/wZOxZM1O5xs/s1600-h/enhanced.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 288px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SnqZOOmz4bI/AAAAAAAAARM/wZOxZM1O5xs/s400/enhanced.bmp" alt="" id="BLOGGER_PHOTO_ID_5366770375683465650" border="0" /&gt;&lt;/a&gt;Grayscale of the enhanced image (removed weaving patterns)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The enhanced image shown above removed the embedded canvas weave (although not perfect). This also helped enhance the brushstrokes of the painting, showing the true texture of the painting. In checking this result, the filter mask was inverted such that filtering would be getting only the frequencies corresponding to the weaving pattern. The inverse Fourier transform was taken to see whether this would match the appearance of the canvas weave. Indeed, the frequencies correspond to the canvas weave pattern based on the resulting image shown below.&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/_hvTI8mj6_Do/SnqaIdzdWvI/AAAAAAAAARU/uXi3xStZoWc/s1600-h/weave.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 288px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SnqaIdzdWvI/AAAAAAAAARU/uXi3xStZoWc/s400/weave.bmp" alt="" id="BLOGGER_PHOTO_ID_5366771376195459826" border="0" /&gt;&lt;/a&gt;Canvas weave appearance&lt;br /&gt;Inverse Fourier transform of the filtered&lt;br /&gt;frequencies removed from the original image&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For this activity, I would like to give myself a grade of 10 because I think I did a good job. The results I obtained are very satisfactory and I have even applied what we have learned in some of our previous activities.&lt;br /&gt;I would like to thank Winsome Chloe Rara, Mark Jayson Villangca and Orly Tarun for some discussions regarding this activity. I also acknowledge the guidance and knowledge provided by our professor Dr. Maricor Soriano.&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&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/5676253085193712352-7996417628810403117?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/7996417628810403117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-7-enhancement-in-frequency.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/7996417628810403117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/7996417628810403117'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/08/activity-7-enhancement-in-frequency.html' title='Activity 7 - Enhancement in the Frequency Domain'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_hvTI8mj6_Do/SnqIfYuv7QI/AAAAAAAAAOU/DIC5f8utI6k/s72-c/fig1_a+pt5+radius.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-6982577364460343988</id><published>2009-07-08T19:23:00.000-07:00</published><updated>2009-08-04T23:35:44.892-07:00</updated><title type='text'>Activity 6 - Properties of the 2D Fourier Transform</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlWAytLCEFI/AAAAAAAAALs/tbOtARLRMog/s1600-h/fig1_annulus.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlWAytLCEFI/AAAAAAAAALs/tbOtARLRMog/s400/fig1_annulus.bmp" alt="" id="BLOGGER_PHOTO_ID_5356328940434755666" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;annulus&lt;/span&gt;&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/_hvTI8mj6_Do/SlVc522QojI/AAAAAAAAAK8/VYzUGVeeZnA/s1600-h/fig1_square.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlVc522QojI/AAAAAAAAAK8/VYzUGVeeZnA/s400/fig1_square.bmp" alt="" id="BLOGGER_PHOTO_ID_5356289480872469042" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;square&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlVc5130s_I/AAAAAAAAALE/gJ5y-voZhL8/s1600-h/fig1_sqannulus.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlVc5130s_I/AAAAAAAAALE/gJ5y-voZhL8/s400/fig1_sqannulus.bmp" alt="" id="BLOGGER_PHOTO_ID_5356289480610591730" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;square annulus&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlVc6L38JJI/AAAAAAAAALM/hCOIbqlx2y8/s1600-h/fig1_slit.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlVc6L38JJI/AAAAAAAAALM/hCOIbqlx2y8/s400/fig1_slit.bmp" alt="" id="BLOGGER_PHOTO_ID_5356289486516659346" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;double slit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlVc6tD01sI/AAAAAAAAALU/zFI5qbBpY4s/s1600-h/fig1_dot.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlVc6tD01sI/AAAAAAAAALU/zFI5qbBpY4s/s400/fig1_dot.bmp" alt="" id="BLOGGER_PHOTO_ID_5356289495424882370" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;two dots&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:85%;"&gt;Pattern (left) and corresponding 2D Fourier transform (right)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Some patterns were generated using Scilab and the corresponding (2D) Fourier transforms are shown above. (Patterns are symmetric).&lt;br /&gt;Code for generating patterns:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Annulus:&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;x = [-64:1:64];&lt;br /&gt;[X,Y] = meshgrid(x);&lt;br /&gt;r = sqrt(X.^2 + Y.^2);&lt;br /&gt;annulus = zeros(size(X,1), size(X,2));&lt;br /&gt;annulus(find (r &lt;=32)) = 1.0; annulus(find(r&lt;=16)) = 0.0;  Square: sq = zeros(129, 129); temp = ones(33, 33); sq(49:81, 49:81) = temp;  Square Annulus: sqannulus = sq; temp2 = zeros(17, 17); sqannulus(57:73, 57:73) = temp2;  Double Slit: slit = zeros(129, 129); slit(:, 55) = 1.0; slit(:, 75) = 1.0;  Two Dots: dot = zeros(129, 129); dot( 65, 55) = 1.0; dot( 65, 75) = 1.0; &lt;/span&gt;&lt;br /&gt;In this activity, the anamorphic property of the Fourier transform is analyzed. First, a 2D sinusoid (similar to a corrugated roof) is created. To examine the spatial frequencies of this image, the Fourier transform was obtained. Furthermore, the frequency of the sinusoid was varied (f = 4, 8 and 16). The results are shown below.&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/_hvTI8mj6_Do/SlWGvD4C5vI/AAAAAAAAAMM/1fUKD-3vEq0/s1600-h/fig2_freq4.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlWGvD4C5vI/AAAAAAAAAMM/1fUKD-3vEq0/s400/fig2_freq4.bmp" alt="" id="BLOGGER_PHOTO_ID_5356335474879424242" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;f = 4&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlWG9orEW7I/AAAAAAAAAMU/OciD_527WBU/s1600-h/fig2_freq8.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlWG9orEW7I/AAAAAAAAAMU/OciD_527WBU/s400/fig2_freq8.bmp" alt="" id="BLOGGER_PHOTO_ID_5356335725275274162" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;f = 8&lt;br /&gt;&lt;/span&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/_hvTI8mj6_Do/SlWHJ58HdLI/AAAAAAAAAMc/wZvqPWZZwdU/s1600-h/fig2_freq16.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlWHJ58HdLI/AAAAAAAAAMc/wZvqPWZZwdU/s400/fig2_freq16.bmp" alt="" id="BLOGGER_PHOTO_ID_5356335936068613298" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;f=16&lt;br /&gt;&lt;span style="font-size:100%;"&gt;2D sinusoids (left) with the specified frequencies&lt;br /&gt;and their corresponding Fourier transforms (right)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;As noticed in the Fourier transform of the images, the peak values on the 2D-fft is moves farther along the axis perpendicular to the sinusoid lines as the frequency of the sinusoids are increased. This demonstrates that the Fourier transformation shows the spatial frequencies of an image. The sinusoids have frequencies along the vertical and it is presented in the same axis in the Fourier transforms.&lt;br /&gt;Scilab code for generating 2D sinusoids and displaying the Fourier transforms (modulus):&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;nx = 100; ny = 100;&lt;br /&gt;x = linspace(-1,1,nx);&lt;br /&gt;y = linspace(-1,1,ny);&lt;br /&gt;[X,Y] = ndgrid(x,y);&lt;br /&gt;f = 4 ; //for varying frequency&lt;br /&gt;sinusoid = sin(2*%pi*f*X); //the 2D sinusoid&lt;br /&gt;fft_sinusoid = fft2(z); //obtain Fourier transform&lt;br /&gt;imshow(abs(fftshift(fft_sinusoid)),[]); //display modulus of the transform&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;Notice, however, from the code above that the sinusoids generated have negative values (based on the &lt;span style="font-style: italic;"&gt;sin()&lt;/span&gt; function of Scilab). Of course, this is not realistic because standard images taken are non-negative. One way to simulate this is by adding  a constant bias to the sinusoids such that there are no negative values. This would shift the sinusoids and, as if, they are riding on a DC signal. Again, taking the Fourier transform, the obtained result is shown below.&lt;br /&gt;(As a comparison, the unbiased (left) and its Fourier transform (bottom) is placed side by side with the biased (right) and its corresponding transform. Notice that the unbiased and biased 2D sinusoids are identical. This is the limitation of the &lt;span style="font-style: italic;"&gt;imshow &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;imwrite &lt;/span&gt;functions because it requires normalized images, and therefore, also altering the information contained in the images because no negative values can be shown or written as an image.)&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/_hvTI8mj6_Do/SlWHeXuy6II/AAAAAAAAAMk/gxADCeJRXFA/s1600-h/fig3_withandwithoutbias.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlWHeXuy6II/AAAAAAAAAMk/gxADCeJRXFA/s400/fig3_withandwithoutbias.bmp" alt="" id="BLOGGER_PHOTO_ID_5356336287663188098" border="0" /&gt;&lt;/a&gt;2D sinusoids without (left) and with (right) bias&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlWILZ4gCaI/AAAAAAAAAMs/lITa35FUMeE/s1600-h/fig3_FT_withandwithoutbias.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlWILZ4gCaI/AAAAAAAAAMs/lITa35FUMeE/s400/fig3_FT_withandwithoutbias.bmp" alt="" id="BLOGGER_PHOTO_ID_5356337061334878626" border="0" /&gt;&lt;/a&gt;Fourier transforms of the unbiased (left) and biased (right).&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;The resulting Fourier transform of the sinusoid with a constant bias shows a central maximum. The reason for this is because the aside from the sinusoid signal, there is also a DC signal which is the constant bias as an additive term. The frequency of a DC signal is actually zero which accounts for the central maximum.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;As a consequence of non-negative values in the images, capturing interferograms (such as the result of a Young's Double Slit Experiment) would result also to a sinusoid but from positive minimum (can be zero) and maximum values. This is similar to a sinusoid with a constant bias. To determine the actual frequencies of the results, data can ,initially, be subtracted by the average of the minimum and maximum values. This would make the sinusoid oscillate symmetrically about zero and, in turn, a pure sinusoid signal is observed. Then, Fourier transform can be applied to obtain the actual frequencies of the interferogram.&lt;br /&gt;If a non-constant bias is added it would be hard to determine the adjustment needed. However, for example, if low-frequency sinusoids are added to the interferogram, it can simply be subtracted from the Fourier transform. The center of the transform of the 2D image represents the low frequencies, and this can simply be removed. If the frequency of the unwanted signals added are known, it is much easier because it can easily just be subtracted. But for example, for noise, which is of unknown frequency, it is difficult. Usually, these are of low frequencies so the previous suggestion might work.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlWM_P280EI/AAAAAAAAAM0/2IZGsI6dF6o/s1600-h/fig4_rotated_theta30_freq4_withFT.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlWM_P280EI/AAAAAAAAAM0/2IZGsI6dF6o/s400/fig4_rotated_theta30_freq4_withFT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356342350043729986" border="0" /&gt;&lt;/a&gt;2D rotated sinusoid (left) and the corresponding Fourier transform (right)&lt;br /&gt;&lt;div style="text-align: left;"&gt;Scilab code to generate rotated sinusoid:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;nx = 100; ny = 100;&lt;br /&gt;x = linspace(-1,1,nx);&lt;br /&gt;y = linspace(-1,1,ny);&lt;br /&gt;[X,Y] = ndgrid(x,y);&lt;br /&gt;f = 4; //frequency of sinusoid&lt;br /&gt;theta = 30; //angle of rotation in radians (+ for counterclockwise)&lt;br /&gt;z = sin(2*%pi*f*(Y*sin(theta) + X*cos(theta)));  //generate rotated sinusoid&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Further analysis was done in the Fourier transform of a sinusoid. This time, first rotating the sinusoid and then, taking the transform. As can be seen from the figure above, the axis of the sinusoid was rotated. As a consequence, the axis of the Fourier transform (in frequency space) is also rotated. The result demonstrates the property of the Fourier transform for obtaining the spatial frequencies in an image. Because the sinusoid is along a rotated axis, the spatial frequencies (which is actually the frequency of a component sinusoid of an image) would be along the same rotated axis.&lt;br /&gt;&lt;br /&gt;It is also interesting to look at a combination (multiplication) of different sinusoids in X and Y. An easier way to visualize this is by providing a combination of different sinusoids in succession as presented below.&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/_hvTI8mj6_Do/SlWGvD4C5vI/AAAAAAAAAMM/1fUKD-3vEq0/s1600-h/fig2_freq4.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlWGvD4C5vI/AAAAAAAAAMM/1fUKD-3vEq0/s400/fig2_freq4.bmp" alt="" id="BLOGGER_PHOTO_ID_5356335474879424242" border="0" /&gt;&lt;/a&gt;Sinusoid in X (left) with f = 4, and the corresponding Fourier transform (right)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlWY1EZLncI/AAAAAAAAANU/5ANUf_GJ5o0/s1600-h/fig4_Ysinusoidfreq4withFT.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlWY1EZLncI/AAAAAAAAANU/5ANUf_GJ5o0/s400/fig4_Ysinusoidfreq4withFT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356355369306922434" border="0" /&gt;&lt;/a&gt;Sinusoid in Y (left) with f = 4, and the corresponding Fourier transform (right)&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/_hvTI8mj6_Do/SlWY0qs5RCI/AAAAAAAAANM/M7KDYjmQHIU/s1600-h/fig4_XYsinusoidfreq4withFT.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlWY0qs5RCI/AAAAAAAAANM/M7KDYjmQHIU/s400/fig4_XYsinusoidfreq4withFT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356355362410284066" border="0" /&gt;&lt;/a&gt;Combination of the two previous sinusoid (left), and the corresponding Fourier transform (right)&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://1.bp.blogspot.com/_hvTI8mj6_Do/SlWY0gS7xFI/AAAAAAAAANE/kOiyyOgLEhs/s1600-h/fig4_XYsinusoidfreq4andXfreq8withFT.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlWY0gS7xFI/AAAAAAAAANE/kOiyyOgLEhs/s400/fig4_XYsinusoidfreq4andXfreq8withFT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356355359617041490" border="0" /&gt;&lt;/a&gt;Combination of the previous sinusoid with a sinusoid in X with f = 8 (left)&lt;br /&gt;and the corresponding Fourier transform (right)&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/_hvTI8mj6_Do/SlWY0J5frtI/AAAAAAAAAM8/z6WewdWwsVE/s1600-h/fig4_XYsinusoidfreq4andXYfreq8withFT.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlWY0J5frtI/AAAAAAAAAM8/z6WewdWwsVE/s400/fig4_XYsinusoidfreq4andXYfreq8withFT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356355353604763346" border="0" /&gt;&lt;/a&gt;Combination of the previous sinusoid with a sinusoid in Y with f = 8 (left)&lt;br /&gt;and the corresponding Fourier transform (right)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Notice that upon combining the sinusoids, the Fourier transform of the result looks like a spread of one of the Fourier transform to the Fourier transform of the other sinusoid in the combination. This is what basically happens in convolution. Now, it is known (also from previous activities) that the Fourier transform of the convolution of two functions can be obtained by multiplying the Fourier transforms of the two functions. The reverse is seen here. Initially, there is a multiplication of two images or sinusoid functions (combination of two sinusoids). The Fourier transform of the combination can be obtained by convolving the Fourier transforms of the two images or functions.&lt;br /&gt;&lt;br /&gt;Scilab code for generating the combination of sinusoids in X and Y:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;nx = 100; ny = 100;&lt;br /&gt;x = linspace(-1,1,nx);&lt;br /&gt;y = linspace(-1,1,ny);&lt;br /&gt;[X,Y] = ndgrid(x,y);&lt;br /&gt;&lt;br /&gt;z = sin(2*%pi*4*X); //sinusoid in X with f = 4&lt;br /&gt;z1  = sin(2*%pi*4*Y);&lt;/span&gt;&lt;span style="font-size:85%;"&gt; //sinusoid in Y with f = 4&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;z2  =&lt;/span&gt;&lt;span style="font-size:85%;"&gt;sin(2*%pi*4*X).*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; sin(2*%pi*4*Y);&lt;/span&gt;&lt;span style="font-size:85%;"&gt; //combination of sinusoid in X and Y with f = 4&lt;/span&gt;&lt;span style="font-size:85%;"&gt;.&lt;br /&gt;//z and z1 are simply multiply element by element&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;z3 = z2.*sin(2*%pi*8*X); //combination of sinusoid in X and Y with f =4 and sinusoid in X with f =8.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;z4 = z3.*sin(2*%pi*8*Y); //combination of sinusoid in X and Y with f =4 and sinusoid in X and Y with f =8.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;/span&gt;&lt;br /&gt;One important property of Fourier transform is linearity. This can be demonstrated by having an image that is a sum of different sinusoid signals. Intuitively, a linear transformation acting on a sum can be distributed into a sum of the transforms of each added terms. So for example, if the combination of X and Y sinusoids is added with a rotated sinusoid (X sinusoid rotated by 30 radians), the transform of the sum is basically the sum of the transform of the X and Y sinusoids and the transform of the rotated sinusoid. Indeed, this is verified by the results below.&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/_hvTI8mj6_Do/SlWi368rj7I/AAAAAAAAANk/wtIJhucmOp0/s1600-h/fig4_XYsinusoidfreq4withFT.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlWi368rj7I/AAAAAAAAANk/wtIJhucmOp0/s400/fig4_XYsinusoidfreq4withFT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356366413427347378" border="0" /&gt;&lt;/a&gt;Combination of sinusoids in X and Y with f = 4 (left)&lt;br /&gt;and the corresponding Fourier transform (right)&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlWi4K4AaSI/AAAAAAAAANs/90PzzFeij5o/s1600-h/fig4_rotated_theta30_freq4_withFT.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlWi4K4AaSI/AAAAAAAAANs/90PzzFeij5o/s400/fig4_rotated_theta30_freq4_withFT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356366417702709538" border="0" /&gt;&lt;/a&gt;Rotated sinusoid in X (angle of rotation = 30 radians) with f = 4 (left)&lt;br /&gt;and the corresponding Fourier transform (right)&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://1.bp.blogspot.com/_hvTI8mj6_Do/SlWi3k2b9MI/AAAAAAAAANc/egoqcZU-Q0I/s1600-h/fig5_XYsinusoidfreq4_androtatedXtheta30_withFT.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlWi3k2b9MI/AAAAAAAAANc/egoqcZU-Q0I/s400/fig5_XYsinusoidfreq4_androtatedXtheta30_withFT.bmp" alt="" id="BLOGGER_PHOTO_ID_5356366407495578818" border="0" /&gt;&lt;/a&gt;Sum of the two previous sinusoid function images (left)&lt;br /&gt;and the corresponding Fourier transform (right).&lt;br /&gt;The transform, indeed, looks like the addition of the Fourier transform of the two previous sinusoid function images.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;For this activity, I would like to give myself a grade of 10 for a job well done (and ahead of time).&lt;br /&gt;I would also like to acknowledge Winsome Chloe Rara for her help in doing this activity and the guidance of our professor Dr. Maricor Soriano.&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/5676253085193712352-6982577364460343988?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/6982577364460343988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/07/annulus-square-square-annulus-double.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/6982577364460343988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/6982577364460343988'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/07/annulus-square-square-annulus-double.html' title='Activity 6 - Properties of the 2D Fourier Transform'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_hvTI8mj6_Do/SlWAytLCEFI/AAAAAAAAALs/tbOtARLRMog/s72-c/fig1_annulus.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-7612011791154471914</id><published>2009-07-06T18:33:00.000-07:00</published><updated>2009-08-04T23:35:07.439-07:00</updated><title type='text'>Activity 5 - Fourier Transform Model of Image Formation</title><content type='html'>Fourier transform is a linear transformation that results into a representation of a data or object in the inverse of its dimensions. In the case of an image, it generates the spatial frequencies of the figures in the image. The lens actually acts a Fourier transformer of the object or light that it collects and focuses. Using the functions in Scilab (fft2, fftshift and imcorrcoef (convolution)), it is easy to demonstrate the Fourier transform process.&lt;br /&gt;***Please click on the images to enlarge and have a better visual.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlRDczvDcTI/AAAAAAAAAIU/stSqkZDCcW0/s1600-h/fft_circle.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 391px; height: 400px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlRDczvDcTI/AAAAAAAAAIU/stSqkZDCcW0/s400/fft_circle.bmp" alt="" id="BLOGGER_PHOTO_ID_5355980019053326642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Similar to this circular light going through a lens, the image on the focus of the lens is similar to the Fourier transform shown. This resembles the analytical Fourier transform of a circle. Basically, the Fourier transform of the circle can be reconstructed back to the image of a circle. From the inverse space of the Fourier transform, taking the Fourier transform of the inverse space results in the inverse of the inverse space, which is actually the dimension of the original image.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlRDdMHvQPI/AAAAAAAAAIc/wydCsYUI7Mw/s1600-h/fftA.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 395px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlRDdMHvQPI/AAAAAAAAAIc/wydCsYUI7Mw/s400/fftA.bmp" alt="" id="BLOGGER_PHOTO_ID_5355980025599312114" border="0" /&gt;&lt;/a&gt;However, using the A-shape, notice that there is an inversion upon applying the the fft2 twice. This was not observed for the circle because it is symmetric. The reason for this can be traced to the analytical form of the Fourier transform. The operation of two forward Fourier transforms is not the same as the operation of a forward and then an inverse Fourier transform, which would result in the same orientation of the original function. What results in the analytical form for a function f(x) upon applying the two forward Fourier transforms is in the form f(-x) (with some factor). It translates to the image being inverted.&lt;br /&gt;&lt;br /&gt;Since the Fourier transform is linear, it can also be applied into other operations that have important applications. One is the convolution of two functions. It determines the spreading effect of a certain function on another function. Similar to imaging systems, the optical system used for imaging has a certain function that spreads the function defined by the object resulting in an image that is not exactly the same as the object. Although convolution is a complicated operation, a direct multiplication of the Fourier transforms of the functions in the convolution can actually be done to obtain the transform of the convolution.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlRDdatdENI/AAAAAAAAAIk/SZbEwPVnprY/s1600-h/Convolution.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 286px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlRDdatdENI/AAAAAAAAAIk/SZbEwPVnprY/s400/Convolution.bmp" alt="" id="BLOGGER_PHOTO_ID_5355980029515600082" border="0" /&gt;&lt;/a&gt;Using the Fourier transform as the lens, the circle image can act as the aperture of this simulated imaging system. The multiplication of the Fourier transform of the object and the circle image results to the transform of the convolution. Taking the inverse Fourier, the convolution of the image with the transfer function of the optical system is obtained. Again, there is inversion of the image due to the application of two forward Fourier transforms, instead of one being an inverse. Notice that for larger apertures, a more accurate image of the original object is formed. This demonstrates that finite lens apertures cannot capture all light coming from the object, and therefore, making the reconstruction of the image imperfect.&lt;br /&gt;&lt;br /&gt;Another process related to convolution and the Fourier transform is correlation. In comparison with convolution, it is also a linear process which can involve simplification (by multiplication) upon using Fourier transforms (and conjugate of one transform) of the correlated functions. The correlation basically takes the “degree of similarity” between two functions. As a consequence, it has been of great value for use in “template matching, pattern recognition and edge detection.”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlRDdlZH1NI/AAAAAAAAAIs/wNplO2WUi7M/s1600-h/Correlation.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 84px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlRDdlZH1NI/AAAAAAAAAIs/wNplO2WUi7M/s400/Correlation.bmp" alt="" id="BLOGGER_PHOTO_ID_5355980032383112402" border="0" /&gt;&lt;/a&gt;As seen in the figure above, the pattern or template ‘A’ is correlated with the statement image. As a result, high correlation values occur at the corresponding location of the statement image with the letters A. This demonstrates correlation for template matching or pattern recognition.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlRDdySKOWI/AAAAAAAAAI0/1QW--7aaA0E/s1600-h/Edge+detection.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 138px; height: 400px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlRDdySKOWI/AAAAAAAAAI0/1QW--7aaA0E/s400/Edge+detection.bmp" alt="" id="BLOGGER_PHOTO_ID_5355980035843570018" border="0" /&gt;&lt;/a&gt;For demonstration of edge detection, the patterns shown above are convolved with the ‘VIP’ image presented previously. The resulting correlation (using imcorrcoef) illustrates a highlight on the parts of the image with the same orientation as that of the pattern – edge detection - which is, basically template matching. It seems as if it takes the projection of the edges of the image onto the axis of the pattern. That is why for the horizontal and vertical patterns, the diagonal and curved edges have lower values, but not entirely zero. For the dot pattern obviously, there is a high correlation value for all the edges.&lt;br /&gt;&lt;br /&gt;Reference: Soriano, Activity 5 and 6 Applied Physics 186 Manual, 2009.&lt;br /&gt;&lt;br /&gt;For this activity, I would like to give myself a grade of 10. It is fairly easy to do since we were provided with the code. Still, I had done the job right, which is the main objective. Moreover, I also discovered some techniques in the process. I noticed, in Scilab, that you can just create a title first for a plot (or subplot) before you show your image so that no new axes are created (meaning, call the title() command first before the imshow()).&lt;br /&gt;&lt;br /&gt;I would like to thank Winsome Chloe Rara, Jica Monsanto and our professor Dr. Maricor Soriano for some assistance in doing this activity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-7612011791154471914?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/7612011791154471914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/07/activity-5-and-6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/7612011791154471914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/7612011791154471914'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/07/activity-5-and-6.html' title='Activity 5 - Fourier Transform Model of Image Formation'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_hvTI8mj6_Do/SlRDczvDcTI/AAAAAAAAAIU/stSqkZDCcW0/s72-c/fft_circle.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-3247575836740800859</id><published>2009-07-05T22:36:00.001-07:00</published><updated>2009-08-04T23:32:10.345-07:00</updated><title type='text'>Activity 4 - Enhancement by Histogram Manipulation</title><content type='html'>Image enhancement provides very powerful tools that translate to very important information. One simple technique is by basically analyzing and manipulating the histogram of an image. Certain features in an image can be recovered by backprojecting the distribution of graylevels of an image to a desired distribution. In this case, the cumulative distribution function (cdf), taken from the probability distribution function (pdf), is redistributed in a more favorable form to enhance an image.   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;Basically, in this activity, the histogram and, consequently, the cdf of a sample, low-contrast image is taken. Linear and nonlinear cdfs are created as reference to which the original cdf of the image is backprojected. The algorithm works by re-assigning a grayscale value in the pixel with a corresponding cdf value in the desired distribution equal to the cdf value of the original grayscale value in that pixel. Stepwise, after obtaining the original pdf and cdf of the image, the corresponding cdf value of a grayscale image is determined. The equivalent of this value with the desired reference cdf is then obtained. The pixel is now re-assigned with a new grayscale value from the desired distribution that corresponds to the cdf value obtained. This is the backprojection process.&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;In this regard, the resulting enhanced image would follow the same distribution as the reference cdfs. This image enhancement not only helps in retrieving more information from an image, from determining features to discriminating noise from the signal. It also helps in achieving the proper detection of images from detectors through models of image detection from the human eye and other detectors, whether in the macroscopic or microscopic scale. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;In this activity, the nonlinear cdf used is close to the model of the human eye, a logarithmic function. The linear reference cdf used is to attain a uniform probability distribution, which is regarded as the ideal high contrast image.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;***The figures shown below shows the original, and the linear and nonlinear image-enhanced reconstructions with the corresponding pdf and cdf of the image sets. For better view, click on the images to enlarge.&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlGuY3gSlSI/AAAAAAAAAF0/9hC3PimbS10/s1600-h/fig3.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 133px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlGuY3gSlSI/AAAAAAAAAF0/9hC3PimbS10/s400/fig3.gif" alt="" id="BLOGGER_PHOTO_ID_5355253174159709474" border="0" /&gt;&lt;/a&gt;Original,                      Linear and                   Nonlinear&lt;br /&gt;Set 1 &lt;span style="font-size:78%;"&gt;(original taken from &lt;a href="http://kttech.com/edge.html"&gt;http://kttech.com/edge.html&lt;/a&gt;)&lt;/span&gt;&lt;br /&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/_hvTI8mj6_Do/SlGuQF6bOSI/AAAAAAAAAFs/IGhVpPrYBmM/s1600-h/fig3_pdf.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 108px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlGuQF6bOSI/AAAAAAAAAFs/IGhVpPrYBmM/s400/fig3_pdf.gif" alt="" id="BLOGGER_PHOTO_ID_5355253023408601378" border="0" /&gt;&lt;/a&gt;Original,                   Linear              and   Nonlinear&lt;br /&gt;Corresponding PDF of the images in Set 1&lt;br /&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/_hvTI8mj6_Do/SlGuJ_gNHyI/AAAAAAAAAFk/SE6VaWRaVEo/s1600-h/fig3_cdf.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 155px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlGuJ_gNHyI/AAAAAAAAAFk/SE6VaWRaVEo/s400/fig3_cdf.gif" alt="" id="BLOGGER_PHOTO_ID_5355252918608797474" border="0" /&gt;&lt;/a&gt;Linear                                   and Nonlinear&lt;br /&gt;Comparison of the CDFs (with original reference) of the images in Set 1&lt;br /&gt;&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/_hvTI8mj6_Do/SlGtkTyhehI/AAAAAAAAAFc/8mUS1a5qvU8/s1600-h/fig2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 133px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlGtkTyhehI/AAAAAAAAAFc/8mUS1a5qvU8/s400/fig2.gif" alt="" id="BLOGGER_PHOTO_ID_5355252271219309074" border="0" /&gt;&lt;/a&gt;Original,                      Linear and                  Nonlinear&lt;br /&gt;Set 2 &lt;span style="font-size:78%;"&gt;(original taken from &lt;a href="http://www.andrew.cmu.edu/user/timothyz/hw3/"&gt;http://www.andrew.cmu.edu/user/timothyz/hw3/&lt;/a&gt;)&lt;/span&gt;&lt;br /&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/_hvTI8mj6_Do/SlGtMVyCQ3I/AAAAAAAAAFU/hzTyzz2cJC4/s1600-h/fig2_pdf.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 109px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlGtMVyCQ3I/AAAAAAAAAFU/hzTyzz2cJC4/s400/fig2_pdf.gif" alt="" id="BLOGGER_PHOTO_ID_5355251859437273970" border="0" /&gt;&lt;/a&gt;Original,                   Linear      and           Nonlinear&lt;br /&gt;Corresponding PDF of the images in Set 2&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlGs9vYVhCI/AAAAAAAAAFM/0n_6EGPIqb4/s1600-h/fig2_cdf.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 151px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlGs9vYVhCI/AAAAAAAAAFM/0n_6EGPIqb4/s400/fig2_cdf.gif" alt="" id="BLOGGER_PHOTO_ID_5355251608610767906" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center; line-height: normal;"&gt;Linear                                                   and   Nonlinear&lt;br /&gt;Comparison of the CDFs (with original reference) of the images in Set 2&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlGr61AARCI/AAAAAAAAAEs/1InkDIyj79I/s1600-h/fig1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 100px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlGr61AARCI/AAAAAAAAAEs/1InkDIyj79I/s400/fig1.gif" alt="" id="BLOGGER_PHOTO_ID_5355250459068089378" border="0" /&gt;&lt;/a&gt;Original, Linear and Nonlinear&lt;br /&gt;Set 3 &lt;span style="font-size:78%;"&gt;(original taken from &lt;a href="http://www.fmepedia.com/index.php/RasterExpressionEvaluator_Examples"&gt;http://www.fmepedia.com/index.php/RasterExpressionEvaluator_Examples&lt;/a&gt;)&lt;/span&gt;&lt;/div&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlGsQ8YeEaI/AAAAAAAAAE0/SqRd6QGyfOk/s1600-h/fig1_pdf.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 108px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlGsQ8YeEaI/AAAAAAAAAE0/SqRd6QGyfOk/s400/fig1_pdf.gif" alt="" id="BLOGGER_PHOTO_ID_5355250839006876066" border="0" /&gt;&lt;/a&gt;Original,                   Linear             and    Nonlinear&lt;br /&gt;Corresponding PDF of the images in Set 3&lt;br /&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlGs9vYVhCI/AAAAAAAAAFM/0n_6EGPIqb4/s1600-h/fig2_cdf.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 151px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlGs9vYVhCI/AAAAAAAAAFM/0n_6EGPIqb4/s400/fig2_cdf.gif" alt="" id="BLOGGER_PHOTO_ID_5355251608610767906" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center; line-height: normal;"&gt;Linear                                      and           Nonlinear&lt;br /&gt;Comparison of the CDFs (with original reference) of the images in Set 3&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;br /&gt;&lt;style&gt; Font Definitions */  @font-face  {font-family:"Cambria Math";  panose-1:2 4 5 3 5 4 6 3 2 4;  mso-font-charset:0;  mso-generic-font-family:roman;  mso-font-pitch:variable;  mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face  {font-family:Calibri;  panose-1:2 15 5 2 2 2 4 3 2 4;  mso-font-charset:0;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-unhide:no;  mso-style-qformat:yes;  mso-style-parent:"";  margin-top:0in;  margin-right:0in;  margin-bottom:10.0pt;  margin-left:0in;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} .MsoChpDefault  {mso-style-type:export-only;  mso-default-props:yes;  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} .MsoPapDefault  {mso-style-type:export-only;  margin-bottom:10.0pt;  line-height:115%;} @page Section1  {size:8.5in 11.0in;  margin:1.0in 1.0in 1.0in 1.0in;  mso-header-margin:.5in;  mso-footer-margin:.5in;  mso-paper-source:0;} div.Section1  {page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-priority:99;  mso-style-qformat:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin-top:0in;  mso-para-margin-right:0in;  mso-para-margin-bottom:10.0pt;  mso-para-margin-left:0in;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:"Times New Roman";  mso-fareast-theme-font:minor-fareast;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;} &lt;/style&gt; &lt;![endif]--&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;As seen from the figures, the low contrast original images have a limited range of grayscale values. By histogram manipulation, the resulting distribution provides a higher range of grayscale values. Moreover, the linear cdf enhancement, the histogram equalized image, has a more visually-appealing reconstruction compared to the nonlinear cdf. More features are seen and the uniform distribution allows more information to be contained in the image since grayscale values have equal probability. There are no biases in the grayscale value that would be seen. In contrast, the logarithmic (nonlinear) cdf produced (and showed) more low grayscale values. That is why the corresponding images appear darker and features with low grayscale values are hard to distinguish from other low grayscale value objects. This provide less information especially if more details or objects must be detected, especially in scientific research purposes.&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;For this activity, I would like to give myself a grade of 10. Unfortunately, I think it would be unfair since I have fallen behind (due to sickness) and, even though I think I had done a good job in getting very good enhanced images, I felt that I had a lot of help in doing so. I think it would only be fair for me to get a grade of 9.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify; line-height: normal;"&gt;I would like to acknowledge my classmates Winsome Chloe Rara, Mark Jayson Villangca, Miguel Sison, Orly Tarun, and Jay Samuel Combinido, for the discussions that helped me in doing this activity, especially after falling behind due to sickness. I would also like to thank our professors Dr. Maricor Soriano and Dr. Gay Jane Perez for the guidance and understanding.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-3247575836740800859?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/3247575836740800859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/07/image-enhancement-provides-very.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/3247575836740800859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/3247575836740800859'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/07/image-enhancement-provides-very.html' title='Activity 4 - Enhancement by Histogram Manipulation'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_hvTI8mj6_Do/SlGuY3gSlSI/AAAAAAAAAF0/9hC3PimbS10/s72-c/fig3.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-8820377034872516092</id><published>2009-06-29T17:52:00.000-07:00</published><updated>2009-08-04T23:34:35.149-07:00</updated><title type='text'>Activity 2 - Area Estimation of Images with Defined Edges</title><content type='html'>In this activity, area estimation is the main theme. This is a very common and useful task encountered in image processing, especially due to the very tedious work required in measuring irregular areas. Moreover, it has very important applications in a lot of fields, even in cancer research (Soriano, AP 186 Activity 2 Manual, 2008).&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The principle applied here for area estimation  is the Green's theorem. From the equation, the area (double integral) can be related to the its contour (line integral):&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SklqKRMfJJI/AAAAAAAAACM/Onos3YUn0Bw/s1600-h/Picture1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 176px; height: 50px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SklqKRMfJJI/AAAAAAAAACM/Onos3YUn0Bw/s400/Picture1.jpg" alt="" id="BLOGGER_PHOTO_ID_5352926356753556626" border="0" /&gt;&lt;/a&gt;or in discrete form:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SklqRuQLzbI/AAAAAAAAACU/RtN0OMUGp1E/s1600-h/Picture2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 210px; height: 71px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SklqRuQLzbI/AAAAAAAAACU/RtN0OMUGp1E/s400/Picture2.jpg" alt="" id="BLOGGER_PHOTO_ID_5352926484812778930" border="0" /&gt;&lt;/a&gt;where N&lt;span style="font-size:78%;"&gt;b&lt;/span&gt; is the number of pixels in the contour of the area, and x and y are the coordinates on the contour.&lt;br /&gt;&lt;br /&gt;For this activity, white shapes were created on a black background in Paint as sample images for area estimation. These images were loaded in Scilab (with SIP toolbox) using the &lt;span style="font-style: italic;"&gt;imread &lt;/span&gt;function. The images were all generated in a truecolor image type. But for analysis, conversion to a binary (or black and white, 1 bit depth) image is necessary. The function &lt;span style="font-style: italic;"&gt;im2bw &lt;/span&gt;was used for conversion using a threshold level of 0.5. This would produce an array of ones and zeros, where the ones would occupy the area of the shape.&lt;br /&gt;From the binary image, the coordinates of the contour of the area must be determined. This can be done using &lt;span style="font-style: italic;"&gt;follow. &lt;/span&gt;This function from the SIP toolbox outputs the x-y coordinates of the contour of the shape on the image. By obtaining this, the discrete formula for the area, shown above, can now be solved.&lt;br /&gt;Now, the function &lt;span style="font-style: italic;"&gt;follow &lt;/span&gt;obtains the coordinates &lt;span style="font-weight: bold;"&gt;on &lt;/span&gt;the shape, not the &lt;span style="font-weight: bold;"&gt;boundary &lt;/span&gt;of the shape, which is the one needed for area calculation in the formula. This can easily be corrected by adding 1/2 the number of the coordinates of the contour. The correction term can be justified because by considering the area of the coordinates of the contour itself, the formula above is simply adjusted by one, each for x and y. The adjustment translates to the pixels occupying the contour, which is actually the number of coordinates listed that the contour occupies.&lt;br /&gt;&lt;br /&gt;The areas of the figures shown below were obtained and summarized in the following table. For comparison, the area of the shapes were obtained analytically, by taking the sum (&lt;span style="font-style: italic;"&gt;sum &lt;/span&gt;function) of the binary image array of the shapes, since the area occupied by the shape in the array have values of 1, and others are 0. Moreover, the formula for the area of the regular shapes were also calculated based on the number of pixels defining the dimensions of the shapes.&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/_hvTI8mj6_Do/SkmkAEZP2KI/AAAAAAAAACc/9e-BcAfzN7s/s1600-h/Upload+shapes.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 267px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SkmkAEZP2KI/AAAAAAAAACc/9e-BcAfzN7s/s400/Upload+shapes.jpg" alt="" id="BLOGGER_PHOTO_ID_5352989953193138338" border="0" /&gt;&lt;/a&gt;Regular shapes drawn in Paint as samples for area estimation: Square, Circle, Rectangle, Triangle and Oblong.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SkmkqJASkNI/AAAAAAAAACk/XI6_2_RzPvI/s1600-h/3rdy.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 271px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SkmkqJASkNI/AAAAAAAAACk/XI6_2_RzPvI/s400/3rdy.JPG" alt="" id="BLOGGER_PHOTO_ID_5352990675985141970" border="0" /&gt;&lt;/a&gt;Irregular shape with the form "3rdy" as a trial for area estimation.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/Skm8K9yx6FI/AAAAAAAAAC0/HXeiMX7wqJU/s1600-h/table.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 591px; height: 152px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/Skm8K9yx6FI/AAAAAAAAAC0/HXeiMX7wqJU/s400/table.jpg" alt="" id="BLOGGER_PHOTO_ID_5353016528678807634" border="0" /&gt;&lt;/a&gt;Table of the summary of the area estimation calculations. Units are in pixels.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Notice the precision of the area estimation using Green's Theorem with that of the pixel count and shape area formula. For the regular shapes, the pixel count is exactly the same as the area from Green's theorem. The shape area formula have slight differences for some shapes perhaps due to the discrete image. The pixels have a rectangular (square) shape which is why for the square and rectangle shapes, the values are all the same. For the other shapes, the edges cannot be well defined so there are estimations resulting in the differences. Still, the results are very satisfactory. Even for the very irregular shape, a very accurate area estimate was exhibited.&lt;br /&gt;The limitation for this technique mainly arises from the output of the function &lt;span style="font-style: italic;"&gt;follow.&lt;/span&gt; The function assumes that there is only one object in the image that must be mapped, as stated in the Scilab SIP toolbox documentation. This is the reason why the irregular shape image presented does not enclose any object (such as inside the 'd') and all characters were connected. If this is not satisfied, only one object on the image would be mapped and a wrong area estimate would be obtained. Moreover, a digitized image also produces some error due to poor estimation of the edges of an object.&lt;br /&gt;For this activity, I think I can give myself a grade of 10 since I think I did a good job in doing the activity and, together with some of my classmates, we determined some of the limitations and needed adjustments needed.&lt;br /&gt;I would like to thanks Miguel Sison and Winsome Chloe M. Rara for significant discussions regarding this activity, especially with the limitations and adjustments for the technique. Also, this activity cannot be done without the guidance of our professors, Dr. Maricor Soriano and Dr. Gay Jane Perez.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-8820377034872516092?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/8820377034872516092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/06/activity-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/8820377034872516092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/8820377034872516092'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/06/activity-2.html' title='Activity 2 - Area Estimation of Images with Defined Edges'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_hvTI8mj6_Do/SklqKRMfJJI/AAAAAAAAACM/Onos3YUn0Bw/s72-c/Picture1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-5911903666272151374</id><published>2009-06-22T19:31:00.000-07:00</published><updated>2009-08-04T23:34:11.307-07:00</updated><title type='text'>Activity 3 - Image Types and Basic Image Enhancement</title><content type='html'>Here are some sample images of different image types. The image file information were obtained using the function imfinfo in Scilab. Some images were converted into GIF for upload purposes. Click on the link for the original.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlRkrZsbvQI/AAAAAAAAAJE/Ot5lJV1vHkM/s1600-h/fop-logo-mono-1bit.GIF"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 203px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlRkrZsbvQI/AAAAAAAAAJE/Ot5lJV1vHkM/s400/fop-logo-mono-1bit.GIF" alt="" id="BLOGGER_PHOTO_ID_5356016553644768514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Binary Image&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:78%;"&gt;&lt;a href="http://www.grc.nia.nih.gov/branches/blsa/reagan.htm"&gt;(http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/test/resources/images/fop-logo-mono-1bit.png&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;FileName :       fop-logo-mono-1bit.gif&lt;br /&gt;FileSize    :14185&lt;br /&gt;Format:         GIF&lt;br /&gt;Width: 771&lt;br /&gt;Height:        392&lt;br /&gt;Depth:        8&lt;br /&gt;StorageType:    indexed&lt;br /&gt;NumberOfColors:     256&lt;br /&gt;ResolutionUnit:    centimeter&lt;br /&gt;XResolution:    0&lt;br /&gt;YResolution:    0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlRlqXhhmPI/AAAAAAAAAJM/YhelWoxYLK8/s1600-h/mrbrain-8bit060.GIF"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 256px; height: 256px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlRlqXhhmPI/AAAAAAAAAJM/YhelWoxYLK8/s400/mrbrain-8bit060.GIF" alt="" id="BLOGGER_PHOTO_ID_5356017635393902834" border="0" /&gt;&lt;/a&gt;Grayscale Image&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;a href="http://graphics.stanford.edu/data/voldata/"&gt;(http://graphics.stanford.edu/data/voldata/&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;FileName:     mrbrain-8bit060.GIF&lt;br /&gt;FileSize:    42107&lt;br /&gt;Format:     GIF&lt;br /&gt;Width:    256&lt;br /&gt;Height:    256&lt;br /&gt;Depth:    8&lt;br /&gt;StorageType:     indexed&lt;br /&gt;NumberOfColors:    256&lt;br /&gt;ResolutionUnit:     centimeter&lt;br /&gt;Xresolution:    0&lt;br /&gt;Yresolution:    0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hvTI8mj6_Do/SkBF17Zsp5I/AAAAAAAAABU/zU3S2cVp7VQ/s1600-h/Lotus.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 398px; height: 400px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SkBF17Zsp5I/AAAAAAAAABU/zU3S2cVp7VQ/s400/Lotus.jpg" alt="" id="BLOGGER_PHOTO_ID_5350353150097008530" border="0" /&gt;&lt;/a&gt;Truecolor Image&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;a href="http://www.flickr.com/photos/sarabetset/2788219273/in/datetaken/"&gt;(http://www.flickr.com/photos/sarabetset/2788219273/in/datetaken/&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;FileName:    Lotus.jpg&lt;br /&gt;FileSize:    32291&lt;br /&gt;Format:     JPEG&lt;br /&gt;Width:    398&lt;br /&gt;Height:    400&lt;br /&gt;Depth:    8&lt;br /&gt;StorageType:     truecolor&lt;br /&gt;NumberOfColors:    0&lt;br /&gt;ResolutionUnit:     centimeter&lt;br /&gt;Xresolution:    0&lt;br /&gt;Yresolution:    0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SkBLedml4MI/AAAAAAAAACE/4isZwHkV0rk/s1600-h/8_bit.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 225px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SkBLedml4MI/AAAAAAAAACE/4isZwHkV0rk/s400/8_bit.png" alt="" id="BLOGGER_PHOTO_ID_5350359344030802114" border="0" /&gt;&lt;/a&gt;Indexed Image&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Indexed_color"&gt;(http://wpcontent.answers.com/wikipedia/commons/f/ff/8_bit.png&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;FileName:     8_bit.png&lt;br /&gt;FileSize:    38455&lt;br /&gt;Format:     PNG&lt;br /&gt;Width:    300&lt;br /&gt;Height:    225&lt;br /&gt;Depth:    8&lt;br /&gt;StorageType:     indexed&lt;br /&gt;NumberOfColors:    255&lt;br /&gt;ResolutionUnit:     centimeter&lt;br /&gt;Xresolution:    0&lt;br /&gt;Yresolution:    0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;These ones are similar images converted into the different image types using GIMP (2.4.6). The original image was taken from &lt;a href="http://www.flickr.com/photos/sarabetset/2788239981/"&gt;http://www.flickr.com/photos/sarabetset/2788239981/&lt;/a&gt;.&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/_hvTI8mj6_Do/SlRmebdaZQI/AAAAAAAAAJU/c8serfnyves/s1600-h/My+Umbrella-binary.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlRmebdaZQI/AAAAAAAAAJU/c8serfnyves/s400/My+Umbrella-binary.gif" alt="" id="BLOGGER_PHOTO_ID_5356018529803592962" border="0" /&gt;&lt;/a&gt;Binary Image&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;FileName:     My Umbrella-binary.GIF&lt;br /&gt;FileSize:    3194&lt;br /&gt;Format:     GIF&lt;br /&gt;Width:    500&lt;br /&gt;Height:    425&lt;br /&gt;Depth:    8&lt;br /&gt;StorageType:     indexed&lt;br /&gt;NumberOfColors:    2&lt;br /&gt;ResolutionUnit:     centimeter&lt;br /&gt;Xresolution:    0&lt;br /&gt;Yresolution:    0&lt;/span&gt;&lt;br /&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/_hvTI8mj6_Do/SlRm0WxDBrI/AAAAAAAAAJc/ugVNpjKizGs/s1600-h/My+Umbrella-grayscale.GIF"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlRm0WxDBrI/AAAAAAAAAJc/ugVNpjKizGs/s400/My+Umbrella-grayscale.GIF" alt="" id="BLOGGER_PHOTO_ID_5356018906500892338" border="0" /&gt;&lt;/a&gt;Grayscale Image&lt;br /&gt;&lt;span style="font-size:78%;"&gt;FileName:     My Umbrella-grayscale.GIF&lt;br /&gt;FileSize:    95985&lt;br /&gt;Format:     GIF&lt;br /&gt;Width:    500&lt;br /&gt;Height:    425&lt;br /&gt;Depth:    8&lt;br /&gt;StorageType:     indexed&lt;br /&gt;NumberOfColors:    256&lt;br /&gt;ResolutionUnit:     centimeter&lt;br /&gt;Xresolution:    0&lt;br /&gt;Yresolution:    0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SkBJ3WscrOI/AAAAAAAAAB0/Ckv6Dn_aQVg/s1600-h/My+Umbrella.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SkBJ3WscrOI/AAAAAAAAAB0/Ckv6Dn_aQVg/s400/My+Umbrella.jpg" alt="" id="BLOGGER_PHOTO_ID_5350357572649790690" border="0" /&gt;&lt;/a&gt;Truecolor Image&lt;br /&gt;&lt;span style="font-size:78%;"&gt;FileName:    My Umbrella.jpg&lt;br /&gt;FileSize:    15084&lt;br /&gt;Format:     JPEG&lt;br /&gt;Width:    400&lt;br /&gt;Height:    340&lt;br /&gt;Depth:    8&lt;br /&gt;StorageType:     truecolor&lt;br /&gt;NumberOfColors:    0&lt;br /&gt;ResolutionUnit:     centimeter&lt;br /&gt;Xresolution:    0&lt;br /&gt;Yresolution:    0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlRnPOWE08I/AAAAAAAAAJk/Rypvf5uYm8E/s1600-h/My+Umbrella-indexed.GIF"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 340px;" src="http://3.bp.blogspot.com/_hvTI8mj6_Do/SlRnPOWE08I/AAAAAAAAAJk/Rypvf5uYm8E/s400/My+Umbrella-indexed.GIF" alt="" id="BLOGGER_PHOTO_ID_5356019368096748482" border="0" /&gt;&lt;/a&gt;Indexed Image&lt;br /&gt;&lt;span style="font-size:78%;"&gt;FileName:     My Umbrella-indexed.GIF&lt;br /&gt;FileSize:    64127&lt;br /&gt;Format:     GIF&lt;br /&gt;Width:    500&lt;br /&gt;Height:    425&lt;br /&gt;Depth:    8&lt;br /&gt;StorageType:     indexed&lt;br /&gt;NumberOfColors:    256&lt;br /&gt;ResolutionUnit:     centimeter&lt;br /&gt;Xresolution:    0&lt;br /&gt;Yresolution:    0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;For the other part of this activity, thresholding was done to obtain the region of interest from an image for which area estimation (from the previous activity) would be applied.&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/_hvTI8mj6_Do/SlR6P_kIkVI/AAAAAAAAAJs/HvrlmBCBjLI/s1600-h/finger.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SlR6P_kIkVI/AAAAAAAAAJs/HvrlmBCBjLI/s400/finger.JPG" alt="" id="BLOGGER_PHOTO_ID_5356040272029978962" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;imfinfo()&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:78%;"&gt;FileName:    finger.JPG&lt;br /&gt;FileSize:    70206&lt;br /&gt;Format:     JPEG&lt;br /&gt;Width:    640&lt;br /&gt;Height:    480&lt;br /&gt;Depth:    8&lt;br /&gt;StorageType:     truecolor&lt;br /&gt;NumberOfColors:    0&lt;br /&gt;ResolutionUnit:     centimeter&lt;br /&gt;Xresolution:    0&lt;br /&gt;Yresolution:    0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;First, the original image was converted into grayscale:&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/_hvTI8mj6_Do/SlR6yNqxPGI/AAAAAAAAAJ0/B-BZxvHvi3c/s1600-h/grayfinger.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlR6yNqxPGI/AAAAAAAAAJ0/B-BZxvHvi3c/s400/grayfinger.jpg" alt="" id="BLOGGER_PHOTO_ID_5356040859931458658" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:85%;"&gt;image = imread('finger.JPG');&lt;br /&gt;grayimage = im2gray(image);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;From here, only grayscale values are contained in the single image array. These grayscale values can easily be counted to obtain the histogram of the grayscale image.&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlR7mcRpIbI/AAAAAAAAAJ8/PsjMEVEkPeg/s1600-h/Histogram.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 302px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SlR7mcRpIbI/AAAAAAAAAJ8/PsjMEVEkPeg/s400/Histogram.bmp" alt="" id="BLOGGER_PHOTO_ID_5356041757205799346" border="0" /&gt;&lt;/a&gt;Code from Scilab for computing and displaying the histogram:&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:85%;"&gt;grayimage = 255*grayimage;&lt;br /&gt;graylevels = min(grayimage):max(grayimage);&lt;br /&gt;histogram = zeros(length(graylevels));&lt;br /&gt;for i = min(grayimage):max(grayimage);&lt;br /&gt;histogram((i-min(graylevels))+1)=sum(1*(uint8(grayimage)==uint8(i)));&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;scf(1);&lt;br /&gt;plot(graylevels/255, histogram);&lt;br /&gt;xlabel('Normalized Grayscale');&lt;br /&gt;ylabel('Frequency');&lt;br /&gt;title('Histogram of Scanned Image in Grayscale');&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Notice from the figure that the x-axis was from a scale of 0 to 1. This would help identify the threshold or &lt;span style="font-style: italic;"&gt;level &lt;/span&gt;at which to isolate the region of interest (the fingers) from the background and set this as white, and the background black. It can easily be seen that the threshold value can be around 0.6 because most of the image is from the background with low grayscale values and the signal from the fingers occurs above this range.&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/_hvTI8mj6_Do/SlR9kUR495I/AAAAAAAAAKE/9QE4EdupOM8/s1600-h/bwfinger.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlR9kUR495I/AAAAAAAAAKE/9QE4EdupOM8/s400/bwfinger.jpg" alt="" id="BLOGGER_PHOTO_ID_5356043919722870674" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:85%;"&gt;bwimage = im2bw(grayimage/255, 0.6);&lt;br /&gt;imwrite(bwimage, 'bwfinger.jpg');&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;As seen in the image above, a black and white image is obtained, with the white signal coming from the region of interest: the fingers. The area estimation technique from the previous activity can now be applied for this image.&lt;br /&gt;&lt;br /&gt;Area estimation:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;[x, y] = follow(bwimage); //Obtain coordinates of the contour&lt;br /&gt;m = size(x)+1;&lt;br /&gt;n = size(y)+1;&lt;br /&gt;x(m(1)) = x(1);&lt;br /&gt;y(n(1)) = y(1);&lt;br /&gt;&lt;br /&gt;a = x(1:m(1)-1).*y(2:n(1))-y(1:n(1)-1).*x(2:m(1));&lt;br /&gt;Area = round(0.5*(sum(a)+m(1)))&lt;br /&gt;//Formula from Green's theorem&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;If the coordinates of the contour is plotted, the result is:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlR-wMzBGYI/AAAAAAAAAKM/K11cGrrcs2A/s1600-h/Contour.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 302px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SlR-wMzBGYI/AAAAAAAAAKM/K11cGrrcs2A/s400/Contour.bmp" alt="" id="BLOGGER_PHOTO_ID_5356045223384390018" border="0" /&gt;&lt;/a&gt;The outline correspond well with the shape of the fingers in the image. The area taken up by the &lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;fingers from the area estimation algorithm above is  54732 (pixels). As a comparison, since the black and white image array have values of 1 for the region of the fingers (otherwise, 0), the sum of the array would also be equal to the area taken up by the fingers. The result is equal to the previous, which is 54732.&lt;br /&gt;This gives a very accurate result and a powerful tool that can be used for measuring (or giving an estimate of) an area. It has very important applications that can be used in various fields (as stated in the previous activity).&lt;br /&gt;For this activity, I think I can get a high grade (hopefully, 10) for doing a good job and also for creating my own code for computing and plotting the histogram.&lt;br /&gt;I would like to acknowledge Winsome Chloe Rara, Miguel Sison,  and Dr. Maricor Soriano for the assistance they have given me in doing this activity.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&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/5676253085193712352-5911903666272151374?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/5911903666272151374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/06/activity-3-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/5911903666272151374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/5911903666272151374'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/06/activity-3-part-1.html' title='Activity 3 - Image Types and Basic Image Enhancement'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_hvTI8mj6_Do/SlRkrZsbvQI/AAAAAAAAAJE/Ot5lJV1vHkM/s72-c/fop-logo-mono-1bit.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-2850710948264925025</id><published>2009-06-17T19:52:00.000-07:00</published><updated>2009-08-04T23:33:10.400-07:00</updated><title type='text'>Activity 1</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/_hvTI8mj6_Do/SjoM3x2ut1I/AAAAAAAAAA8/msAoNcsKyx8/s1600-h/thirdy-rotated2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 215px;" src="http://2.bp.blogspot.com/_hvTI8mj6_Do/SjoM3x2ut1I/AAAAAAAAAA8/msAoNcsKyx8/s400/thirdy-rotated2.jpg" alt="" id="BLOGGER_PHOTO_ID_5348601659871115090" border="0" /&gt;&lt;/a&gt;Original&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_hvTI8mj6_Do/SjoMmJdDQ5I/AAAAAAAAAA0/zZxqPt_mP9k/s1600-h/reconstruction.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 239px;" src="http://4.bp.blogspot.com/_hvTI8mj6_Do/SjoMmJdDQ5I/AAAAAAAAAA0/zZxqPt_mP9k/s400/reconstruction.PNG" alt="" id="BLOGGER_PHOTO_ID_5348601356968215442" border="0" /&gt;&lt;/a&gt;Reconstruction&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://1.bp.blogspot.com/_hvTI8mj6_Do/SjoLb-mhHGI/AAAAAAAAAAs/NluYrNSuFbo/s1600-h/Act1_final_ap186_thirdy.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 239px;" src="http://1.bp.blogspot.com/_hvTI8mj6_Do/SjoLb-mhHGI/AAAAAAAAAAs/NluYrNSuFbo/s400/Act1_final_ap186_thirdy.PNG" alt="" id="BLOGGER_PHOTO_ID_5348600082744810594" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Overlay&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This is the final product of the reconstruction of an old plot scanned from the paper: "Contributions to the Chemistry of Thallium I" by L. F. Hawley, compiled in The Journal of the American Chemical Society Volume XXIX, accepted in Jan. 11, 1907.&lt;br /&gt;&lt;br /&gt;The reconstruction was done by first obtaining a ratio of the number pixels to the physical variables in the plot - cc KMnO4 for the x-axis and grams Tl per one cc KMnO4 (Thallium factor) for the y-axis. The pixel coordinate corresponding to the grid lines were taken. The increments of the grid lines for x-axis is 5 cc, while 0.00001 Thallium factor for the y-axis. The ratio was obtained by taking the average of the difference between pixel coordinates of successive grid lines for the corresponding axis. The obtained value for the x and y axes will be used as a factor for obtaining a relation of the pixel coordinates to the physical variables on the plot.&lt;br /&gt;This method assumes that the x and y axes aligns with the horizontal and vertical, i.e., the y(x) value of the pixel coordinates along the x-axis (y-axis) does not change. If this was not attained upon scanning of the plot, the image can be rotated so that the mentioned criterion is satisfied. This can be done using image rotating softwares, such as one function in MATLAB (imrotate('image file', 'angle in degrees')).&lt;br /&gt;After obtaining the ratios, points were sampled from the plot and the corresponding pixel coordinates were noted. An increment of 10 pixels along the x was done for sampling points on the curve to ensure that the shape obtained would be accurate. The pixel coordinate of the origin of the plot was also recorded.&lt;br /&gt;An adjustment should be made by having an offset based on the pixel coordinate of the origin. The x-coordinate should be added to the x pixel coordinates while the y-coordinate should be subtracted since the y-pixel coordinates increases downward along an image.  From the obtained parameters, the physical values on the plot were obtained by multiplying the increment of the grid lines of the axis to the corresponding pixel coordinate and then dividing this by the ratio for the axis. Another adjustment was also made since the origin of plot did not start at (0, 0). The initial values were simply added to the values obtained after applying the ratio.&lt;br /&gt;The obtained physical values were plotted in Excel, adding major grid lines and adjusting the parameters of the plot (min and max values of the axis). The original plot was filled in as a background of the plot to have a better visual evaluation of the resulting reconstruction. The plot was simply adjusted to fit the features of the plot on the image.&lt;br /&gt;From the image posted, the reconstruction fits the original plot accurately, and for that, I feel that I can evaluate my grade for this activity as 10. There still are limitations in the reconstruction, mainly due to inconsistent judgment upon sampling points concerning the exact pixel coordinates that would be taken because of the thick lines (or points), and also the imprecise pixel differences that correspond to the physical variable increments. Averaging can limit, but not eliminate, this error.&lt;br /&gt;I would like to acknowledge Winsome Chloe M. Rara, for her help in doing this activity, Mark Jayson Villangca and Jica Monsanto for their insights in the blog layout, and also for the guidance of our professors, Dr. Maricor Soriano and Dr. Gay Jane Perez.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-2850710948264925025?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/2850710948264925025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/06/finished.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/2850710948264925025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/2850710948264925025'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/06/finished.html' title='Activity 1'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_hvTI8mj6_Do/SjoM3x2ut1I/AAAAAAAAAA8/msAoNcsKyx8/s72-c/thirdy-rotated2.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5676253085193712352.post-1154196167436590454</id><published>2009-06-15T19:56:00.000-07:00</published><updated>2009-06-15T20:02:28.858-07:00</updated><title type='text'>Unang Crcle</title><content type='html'>Ito ang aking unang blog...&lt;br /&gt;Ito ay para sa klase namin sa Applied Physics 186...&lt;br /&gt;Kumuha kami ng mga lumang hand-drawn plots at nagpaphotocopy...&lt;br /&gt;Kaya lang, kelangan namin ng digital copies nito kaya kelangan pang ipa-scan ng aming lecturer na si Ma'am Gay...&lt;br /&gt;Ito ay aming irereconstruct gamit ang paint at excel (pwede din ang spreadsheet)...&lt;br /&gt;Makikita namin ang kaibahan sa nito sa orihinal...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5676253085193712352-1154196167436590454?l=thirdybuno.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thirdybuno.blogspot.com/feeds/1154196167436590454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thirdybuno.blogspot.com/2009/06/unang-crcle.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/1154196167436590454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5676253085193712352/posts/default/1154196167436590454'/><link rel='alternate' type='text/html' href='http://thirdybuno.blogspot.com/2009/06/unang-crcle.html' title='Unang Crcle'/><author><name>Thirdy Buno</name><uri>http://www.blogger.com/profile/03009942138279559981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
