<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1662845349023960931</id><updated>2024-09-12T04:34:05.712+08:00</updated><category term="parallel port interfacing"/><category term="ADC"/><category term="Area calculation"/><category term="Bartlett or Triangle window"/><category term="Data replication"/><category term="Diffraction"/><category term="Digital aperture"/><category term="Digital scanning"/><category term="Green&#39;s theorem"/><category term="Hamming window"/><category term="Hann window"/><category term="Python"/><category term="Scilab"/><category term="adc converter"/><category term="adc interface"/><category term="adware"/><category term="analog-to-digital converter"/><category term="ants"/><category term="autorun.inf"/><category term="bees"/><category term="c++"/><category term="encouragement"/><category term="failed"/><category term="flash drive"/><category term="gradient"/><category term="image formats"/><category term="image type"/><category term="malware"/><category term="python interface"/><category term="spiders"/><category term="vector"/><category term="virus"/><category term="window functions"/><category term="windowing"/><title type='text'>All Stuffed Here!</title><subtitle type='html'>Since everything is a consequence of purpose, the purpose of this blog is to contain as much information that is available to be shared.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-6060033405739745000</id><published>2010-10-04T22:13:00.002+08:00</published><updated>2010-10-05T00:56:03.784+08:00</updated><title type='text'>My Special Project (Recognition of Hand Written Digits Through PCA)</title><content type='html'>The Principal Components Analysis (PCA) algorithm has been very useful in many applications such as image compression and decreasing the dimensionality of high-dimensional datasets.&amp;nbsp; The PCA is a statistical implementation of finding the eigenvectors which represent the dataset.&amp;nbsp; These eigenvectors are arranged according to the variance of the data in a specific dataset.</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/6060033405739745000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/10/my-special-project-recognition-of-hand.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/6060033405739745000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/6060033405739745000'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/10/my-special-project-recognition-of-hand.html' title='My Special Project (Recognition of Hand Written Digits Through PCA)'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-903224003245299491</id><published>2010-09-23T13:10:00.008+08:00</published><updated>2010-09-24T03:10:06.641+08:00</updated><title type='text'>Entry 20:  Image Compression</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;In previous times, every bit of storage seems so significant , but because of recent technological developments, storage capacity has been developed to quite large sizes that even a megabyte seems so useless already.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Even though the &quot;phenomenon&quot; of less storage size appreciation and the prices of storage media are decreasing, compression techniques to minimize the storage size of files are still being used and developed.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;In this activity, we come to realize a basic method of compressing an image file through the discrimination of some of the image&#39;s details without so much information loss brought to the compressed image.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The method used in this activity is called PCA or the Principal Components Analysis.&amp;nbsp; It is based on the concept of identifying the eigenvectors of the image with the highest information contribution based on the eigenvalue of the diagonalized covariance matrix of the&amp;nbsp; n-dimensional &quot;observations&quot;.&amp;nbsp; This results to a minimized number of information stored in the resulting compressed image, thus, the image size is smaller than the original.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;For this activity, I chose the image in Fig. 1 to be my test image to be compressed. &lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJFQFXTpJfsNRvQ7HTE4mcj71xObRZ9xuD8xpfm81shDHlUh9XVpFcahe6sLydt9ORUcAcLJh4TBzl88izEN6yUCaM_S8-XeCtr3PtL9bdDBgFQTaCz3LTVKxG43b2Gu20nNHeECqfRFA/s1600/creative_orig.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;497&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJFQFXTpJfsNRvQ7HTE4mcj71xObRZ9xuD8xpfm81shDHlUh9XVpFcahe6sLydt9ORUcAcLJh4TBzl88izEN6yUCaM_S8-XeCtr3PtL9bdDBgFQTaCz3LTVKxG43b2Gu20nNHeECqfRFA/s640/creative_orig.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1:&amp;nbsp; Original image to be compressed.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We first sampled the image such that size of each subimage is 10x10.&amp;nbsp; From the ensemble of these subimages, we computed the PCA using the &lt;i&gt;pca()&lt;/i&gt; function in scilab.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;One of the results after computing the PCA is the eigenvectors of the image.&amp;nbsp; The eigenvector of the image used here is shown in Fig. 2,&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS2VLmYNEXc1Bma3YEdi15CcKOHcEZ55N_l472S5GXhvqpyl7psT7LOKPxADbv00vIOJNOr15_2vtQ-tc9QP1-yySMMVuEPxtHtSjs-6097U8i6jUFVck77TrsAWpF5cg2lJz-aR_0to0/s400/eigenvalue.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2:&amp;nbsp; Eigenvectors for the image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;After the eigenvectors were computed, we identified the eigenvectors with high explained variance to be used on the compression.&amp;nbsp; In the plot below (Fig. 3), we can see the variance explained by each eigenvectors.&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;483&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhencrPYjLOH63dRdIC7c2e534JuMGcGI0jH8wT_UHTViEWQqnWrZjRN2CvZzpgM7pZ7qfGwLtSgLPL0vqPpg6G2pgW62ftxy2ot9gdfFfkOjKLKcjghZttw0vOtqTnhT1xWNinX5yuQ-o/s640/scree_plot.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 3:&amp;nbsp; Scree plot.&amp;nbsp; Blue) Percent of variance explained by each eigenvector; Red) Cumulative sum of the variance explained of the eigenvectors.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;We utilized different number of eigenvectors to achieve certain compression levels.&amp;nbsp; Some compressed images at different compression levels are shown in Fig. 4,&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi74o6HrJuZzzixXJa9FwULgnh7n5moxFBDTagv-fscC7fRzalKejOb34ifvodnfWHTtCkUzdDRdQP5MP5tRtSE72KSFdDDc6wYxAnzNw82uXd5Zt10DSIcSnX9LVMyi6cVWWtZxbv5o58/s1600/concatenated_reconstruction.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 4:&amp;nbsp; Samples of compressed images using PCA. (from top to bottom) 92%, 95%, 97%, 99% and 100% compressed images.&amp;nbsp; The number of eigenimages required to compress the image to these compression levels are (from top to bottom) 1, 2, 4, 13 and 100 eigenimages, respectively.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;For the compression, the number of stored information is decreased depending on the number of eigenimages utilized.&amp;nbsp; It is nice to know that the highest eigenvector explains almost 92% of the entire image.&amp;nbsp; This implies that even if small number of eigenimages were used in the reconstruction, the quality of the result will not deteriorate much.&lt;/div&gt;&lt;br /&gt;
In this activity I would rate myself 10/10.&lt;br /&gt;
&lt;br /&gt;
Source:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity Sheet for Activity 14 - Dr. Maricor Soriano</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/903224003245299491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-20-image-compression.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/903224003245299491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/903224003245299491'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-20-image-compression.html' title='Entry 20:  Image Compression'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJFQFXTpJfsNRvQ7HTE4mcj71xObRZ9xuD8xpfm81shDHlUh9XVpFcahe6sLydt9ORUcAcLJh4TBzl88izEN6yUCaM_S8-XeCtr3PtL9bdDBgFQTaCz3LTVKxG43b2Gu20nNHeECqfRFA/s72-c/creative_orig.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-8239146698015410165</id><published>2010-09-23T11:06:00.001+08:00</published><updated>2010-09-25T15:10:06.835+08:00</updated><title type='text'>Entry 19:  Color Image Segmentation</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Images contain many information that can be retrieved through image processing.&amp;nbsp; Some of the information can be used to discriminate certain regions (regions of interest - ROI) as the important regions and put other regions not containing the specified region to a null value forcing other points to be a part of the background.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;In this activity, we perform the method of color image segmentation to identify in the entire image the regions with the same information with the reference patch.&amp;nbsp; For this to be done, normalization of the color channels was performed given by the equation below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1tfHZS_FpttZ1AMV2gKTz42EpQKQHXAVK7F2jIcD3Mna_4urLeup3ej4em3RjWo5MW0frkr8GkDD0ixIcPHDgJhyphenhyphen8cB5yr9jlqqFMPgIuapcYOlH50KitPAc3HdvZpbeMuNcLIKl8aic/s1600/RGB_eq.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1tfHZS_FpttZ1AMV2gKTz42EpQKQHXAVK7F2jIcD3Mna_4urLeup3ej4em3RjWo5MW0frkr8GkDD0ixIcPHDgJhyphenhyphen8cB5yr9jlqqFMPgIuapcYOlH50KitPAc3HdvZpbeMuNcLIKl8aic/s320/RGB_eq.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;We studied the two types of color image segmentation techniques, the parametric and the non-parametric color segmentation.&amp;nbsp; The parametric segmentation method utilizes the Gaussian distribution wherein the probability of the image value depends on the reference patch.&amp;nbsp; The mean of each color channel was used to be the abscissa with the highest probability.&amp;nbsp; The Gaussian distribution used in the parametric technique is stated below,&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzhyphenhyphenAZ9_jfo50yMVjGUMfG-RZ5v2pRUrSar0RKPmgYmZLmRTnBTwzjq859SuJ5IWCspx3kw6CeGNySEo-A9Sao_51o_cep2ztvJkrI4Aw5MNH8fbDJvy1_w-p8bpYIq7JEd0Fc_ml5ryo/s1600/gaussian.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzhyphenhyphenAZ9_jfo50yMVjGUMfG-RZ5v2pRUrSar0RKPmgYmZLmRTnBTwzjq859SuJ5IWCspx3kw6CeGNySEo-A9Sao_51o_cep2ztvJkrI4Aw5MNH8fbDJvy1_w-p8bpYIq7JEd0Fc_ml5ryo/s320/gaussian.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;the spread and mean parameters of the distribution comes from the standard deviation and the mean value of the reference patch, respectively.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;We used the technique of color image segmentation to the image below (My Toy Car :D) shown in Fig. 1,&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrLqhyphenhyphenuU4hSQZvih4aRFZh6P2TMhjlFxtWXEgjNK1C3N7AgHJvEIUHDZUkAd2dFAtTgZSKSC9U53hZNbRxF_vyVjyFn_1J8I0NM72Ay1yClblant7yHCI2uJwhWKd2AL7ApdTqm2cPc4o/s400/image1.JPG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1:&amp;nbsp; Image to be segmented&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;It is important to realize that we utilizes the Normalized Chromaticity Space in representing the location of the values to be calculated from the patch.&amp;nbsp; Also, this chromaticity space will help us visualize quantitatively what colors are present in the image.&amp;nbsp; A sample normalized chromaticity graph is shown below in Fig. 2,&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;347&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR5P2adCn1qcBlYcyfADutwcqGtWFKRmdv3vwiPnish3JArK-uNvTSO1yCl3WOj_0koUUSSaw47bXjZ36BKCGl1xYqVkP0pRXXKpxYu0cV_Y2F1qEQ6WKqVgtXwfQ5xAUVvZXhU18ORjk/s400/chroma.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2:&amp;nbsp; Sample Normalized Chromaticity Space&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;To continue with the parametric image segmentation, we chose a patch in the ROI to represent the entire region.&amp;nbsp; The patch chosen appear to have a large color component of yellow Fig. 3. &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi-dbDmR8h_rZ2mxzSJzR6BD412-aQi2aou1eCANUaAkCojKl5R0RwBrd7BBktAHIoXv40oWgiWOR86htJVc_nXibK8sWRjRPmkWpxvO0-EkkQHI2u8ZsDCfhVUXvwHpoRGnNXdpj0TSw/s400/cropped_yellow.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;309&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 3:&amp;nbsp; Reference color patch for color image segmentation.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;After doing the algorithm of taking the Gaussian probabilities and multiplying the results with each other, we get a parametrically segmented version of Fig. 1 as shown in Fig. 4.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg20As21ZR9VdhZdLBROVX57prMqOe6_W1doWRaTqAv-x-oywTITbB9vGGj3HI_SZCA_vc3bi7N-GDRAjYs-MN99HiLhi2UGSINV-ZrmPrKgbH84yGscVQKX-YiikXHrUp_OEH8BMzllD8/s320/parametric_algorithm_car.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 4:&amp;nbsp; Segmented image through parametric color image segmentation.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Our next task is to segment the original image using the non-parametric approach.&amp;nbsp; In this technique, it requires the knowledge of the histogram of the normalized chromaticity space for the entire image and the patch representing the ROI.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;For the image to be segmented, we calculated the 2D normalized chromaticity space histogram representing the entire image.&amp;nbsp; The computed histogram is shown in Fig. 4 along with the normalized chromaticity space representing the entire color spectrum.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;197&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyxQF8f9NZFx81tF-gIs4M7DcDJxg-7eQbX_gnrtd5NpF2NGL4BRkUwBDG5Ci15g4ZO2revZDUKIfQZDRlSK3clz8z6agytdgjLpLQ-_bNVvQNQUDTDOcq9c5qVbIcu27bBmxv46X_p_U/s400/concatenated_2d_image_hist.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 4:&amp;nbsp; Left) The normalized chromaticity histogram representing the image, Right) the normalized chromaticty space fot the entire color spectrum.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;We also computed the normalized chromaticity histogram for the patch chosen to represent the ROI.&amp;nbsp; In Fig. 5, we superimposed the computed normalized chromaticity histogram of the ROI to the normalized chromaticity space representing the entire color spectrum to properly visualize the color component representing the ROI.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikkgDPrEpMzVIpMbOmqcEPZsEdAu9YRr8bbB48BdFa7CeX0u4ld94TrAgLjyyB6p7E5Cf8Ig9h4paB6tQF6t-pHbuEzM6zWBigBmckjsVdEDd-euYN_akUFgO2UYTrEkAvkPy6LtolJNk/s320/superimposed.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 5:&amp;nbsp; Superimposed normalized chromaticity histogram of the chosen representative region for the ROI with the normalized chromaticity space of the entire color spectrum.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;It can be observed in Fig. 5 that the representative color of the ROI is near the yellow-orange region of the normalized chromaticity space of the entire spectrum.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;We performed histogram backprojection which will yield the non-paramtrically segmented image.&amp;nbsp; The resulting non-parametrically segmented image is shown in Fig. 6.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEnJ1oNYO1_EtLj6Fhf7SalDFalS8udaScmyd6m6xb4WFvMUwtk0rnb8xjUf6p8uOcD45LliNjwOugDYxyNRric9GK34JJKWj7jwFUp-xCZtKvVN4B8g-FoT6AdoG4_zwEIJ-iAA_5qr8/s320/non-parametric_segmentation.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 6:&amp;nbsp; Resulting non-parametrically segmented image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;It is so handy to the techniques performed above to identify regions of interest.&amp;nbsp; Many applications of these methods can be made such as tracing the trajectory of certain material.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;In this activity I want to give myself a 10/10 because of my efforts and enthusiasm in doing the activity.&amp;nbsp; I learned much in this activity which is&amp;nbsp; the most important thing for me.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Source:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity Sheet for Activity 13 - Dr. Maricor Soriano&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/8239146698015410165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-19-color-image-segmentation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/8239146698015410165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/8239146698015410165'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-19-color-image-segmentation.html' title='Entry 19:  Color Image Segmentation'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1tfHZS_FpttZ1AMV2gKTz42EpQKQHXAVK7F2jIcD3Mna_4urLeup3ej4em3RjWo5MW0frkr8GkDD0ixIcPHDgJhyphenhyphen8cB5yr9jlqqFMPgIuapcYOlH50KitPAc3HdvZpbeMuNcLIKl8aic/s72-c/RGB_eq.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-5510485622048975659</id><published>2010-09-23T10:49:00.001+08:00</published><updated>2010-09-26T11:24:57.691+08:00</updated><title type='text'>Entry 18:  Color Camera Processing</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Before this I took this course I was so naive about some things and included in those things is the concept of white balance.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I hear the term before but I never even bother to take some time to Google any information about it.&amp;nbsp; But after performing this activity, I truly appreciated the white balancing algorithms as they transform images taken with different light sources to maintain their color signatures.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;In this activity, we explored two common method being utilized in white balancing namely, White Patch Algorithm and the Gray World Algorithm.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;We first take images of a single scene with a white material in it using different white balancing modes in a digital camera.&amp;nbsp; &lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Given these images, we sampled an image with the least appropriate white balance setting for the lighting condition during the image was taken. From this data, we can start implementing the two algorithms mentioned above.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;First, we implemented the White Patch Algorithm.&amp;nbsp; A requirement of the White Patch Algorithm is that a white patch must be present in the image to be a reference or the normalizing value.&amp;nbsp; Thus, we chose from the image a pixel with white value and inputted it to the algorithm.&amp;nbsp; Shown in Fig. 1 is the image captured under a sunlight lighting with a white balance mode of &quot;Incandescent&quot; set in the digital camera.&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxDHP0REJQcHD_MYsFlcacPW7ComqDn11BCHEhnNxo9gMWgKumihwKougRy28pSSRx3hMMVWBsn3CMb-uV4X8U8huGWWgEhdlkhO5c9cq_ctJqAESyz60HND6CM2g5kBOLp6Gf6XKDOdQ/s400/incandescent.JPG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1:&amp;nbsp; Image with inappropriate white balance setting (Incandescent) used in the lighting condition (Sunlight).&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The White Patch Algorithm simply normalizes the entire image with the chosen white patch from the image itself.&amp;nbsp; After the normalization, we formed the image array and reconstructed the image.&amp;nbsp; The result is shown in Fig. 2 - White Patch Algorithm applied to the original image (Fig. 1).&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPiiu2ywXZpj4QOjUnqQJ8m-rYHCmWlBR9IWvYJMut42WN1cXcPZBPQaesesC2Q7P9XTraEUs3gZBzOY3SYzcum7BG2UbmMK3GqVIsvX0dNoza-4-MTcFqzGb_utNJOp9pEXpuR9bPYxg/s1600/white_patch_incandescent.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPiiu2ywXZpj4QOjUnqQJ8m-rYHCmWlBR9IWvYJMut42WN1cXcPZBPQaesesC2Q7P9XTraEUs3gZBzOY3SYzcum7BG2UbmMK3GqVIsvX0dNoza-4-MTcFqzGb_utNJOp9pEXpuR9bPYxg/s400/white_patch_incandescent.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2:&amp;nbsp; Resulting image after the White Patch Algorithm has been applied to the original image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;It is quite noticeable that a significant change in the image can be observed.&amp;nbsp; The white bond paper lost the &quot;bluish stain&quot; after the algorithm was applied and it appears to be very pure white.&amp;nbsp; The other colors can be seen to have improved and look more like in the real world.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The next algorithm that will be performed is the Gray World Algorithm.&amp;nbsp; In this method, the mean of each color channel is the variable used to normalize each of the values in the respective channels.&amp;nbsp; We performed this technique to the original image and the result is shown in Fig. 3,&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5IF-LIqmY28wYetYnko7JsG0NRcd-w8gDhOnMrNQoA0yMDjnpr7-TQgVGmhhej02fCiFLh6u_XK_czLD3G0oOZTastdRXVjRLI6GHxlFA7u9bYNADJ68DyRtkY9-wOtZwRZ5Mlx2D-aI/s400/gray_world_incandescent.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 3:&amp;nbsp; Resulting image after the Gray World algorithm was applied to the original image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;In Fig. 3, the resulting image appear to be have a higher intensity but the white bond paper looks so pure white.&amp;nbsp; On the other hand, the other colored objects seem to be flooded by the white contrast.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The next aspect we looked at is the accuracy and efficiency of the two algorithms.&amp;nbsp; To do this, we took an image of collection of object sharing the same shade of hue with no white in the background.&amp;nbsp; The image used is shown in Fig. 4,&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTiEjhIuug6lRSuyTll3xGCcUsoNedTwa-hcHnFcairxOw6gC7JddHnMVa3mk593Pi2-KuVRZsxa7YfG9cRlq3MxSThgA93utPCIcwp2AGhg-ueTnHhUirPFqkJTARKrsn2mdptpq2Yqo/s400/source=flour.JPG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 4:&amp;nbsp; Image with inappropriate white balance (Incandescent) with objects sharing the same shade of hue under a fluorescent lighting.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;We performed both algorithms in this image and the results are shown in Fig. 5,&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiifa8tTL7CJz2hbMa8IdSfhbYf7FfFAf1W0g83xF1JhSTHieHIyHEWgD8VPP7zQVCwChHFcyRQ1Wq__lic0lUhJSoe_cbh0ccHoo5_grQ7jqOT0_AbxgzJqhuQJ0nHDvAHkEkbZskQ7To/s640/blues_concatenated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 5:&amp;nbsp; Left) White Patch Algorithm, Right) Gray World Algorithm applied to the original image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiifa8tTL7CJz2hbMa8IdSfhbYf7FfFAf1W0g83xF1JhSTHieHIyHEWgD8VPP7zQVCwChHFcyRQ1Wq__lic0lUhJSoe_cbh0ccHoo5_grQ7jqOT0_AbxgzJqhuQJ0nHDvAHkEkbZskQ7To/s1600/blues_concatenated.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We have observed that the White Patch Algorithm is better used when the colors in the spectrum is not well represented in the image.&amp;nbsp; Even though the image appeared grainy after the application of the White Patch Algorithm it still appeared more crisp relative to the result after the gray World Algorithm has been applied to the images.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The possible reason why the White Patch Algorithm is suited in the case when only a small portion of the color spectrum is represented in the image is that for the Gray World Algorithm, the mean of the entire color channel is being used in the normalization, thus, since other colors are not represented the result of the normalization will probably not give the true white balance for the image.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;In the succeeding figure, the results of&amp;nbsp; the implementation of both algorithms are shown for various white balance setting used in capturing the scene.&amp;nbsp; In the first column of the figures below show the images after the White Patch Algorithm has been implemented to the original images which are those in the middle column, while the last column corresponds to the result after the Gray World Algorithm has been applied.&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8Ax79XkKgfY4UKCAjnmS_a6uhVqOg8-B0PIXcQH1qcDqEGIEALbBeqViiRPUYpIFc4tHhsRx0ro1_dD8dZP46Cccc_iu71sHuNnHHAs52wv24av4QVTKt3tHVVoSbc6gTZXyTQ1OEhYE/s1600/Cloudy.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8Ax79XkKgfY4UKCAjnmS_a6uhVqOg8-B0PIXcQH1qcDqEGIEALbBeqViiRPUYpIFc4tHhsRx0ro1_dD8dZP46Cccc_iu71sHuNnHHAs52wv24av4QVTKt3tHVVoSbc6gTZXyTQ1OEhYE/s640/Cloudy.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 6:&amp;nbsp; Left) White Patch Algorithm applied to the original image; Middle) Original image under &quot;Cloudy&quot; white balance mode; Right) Gray World Algorithm applied to the original image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_g2UkmqQeAoi3BOqtEqlcFBTXHWVIaB02skLc32pCRI-SdIg1fXOB1_aMtCZlRO1iz_FjwWVXfl0GOlx9uc5jRV8d9I2Ub1rGkrzhh8cJv6gbatMU-J2NHPwPEQmQRQiJoPDQgp4R9oc/s640/Flour1.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 7:&amp;nbsp; Left) White Patch Algorithm applied to the original image; Middle) Original image under &quot;Fluorescent 1&amp;nbsp; &quot; white balance mode; Right) Gray World Algorithm applied to the original image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhyqufhTBbkgSRkxdov8Ts5uedOGDkmysVQ9kkWgFfimyvUh0_RSupviNffeotjjdNSLHSgEDlx-so7KpEj3EtC-mJ2aeLc8EWEDexYYk1RRng-Sn2oUZUsxCGmOspByOUqI8RzEb_Cgo/s640/Flour2.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 8:&amp;nbsp; Left) White Patch Algorithm applied to the original image; Middle) Original image under &quot;Fluorescent 2&quot; white balance mode; Right) Gray World Algorithm applied to the original image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii-geVz38ox2o87BvBlU-y2juzOpRnknmzcNIYy6R5LM0AAoBz0SSoENb7YVDj239Ky2Efvri7ZeYHjH1Us7rt_o9EvzkOAwFIT0NoueAvbxrXoPL5nzTXv3Gc_vvBGWvsQ6DkllX_jQg/s640/Flour3.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 9:&amp;nbsp; Left) White Patch Algorithm applied to the original image; Middle) Original image under &quot;Fluorescent 3&quot; white balance mode; Right) Gray World Algorithm applied to the original image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh52ODqZVBX1Cjj-g7dD0Sc_xl0AKt8i2ajFEO6Wh8CpQNRwZwOV4I2v8GDBl_pQtCBCg8UCN7rEmGdmdGD-H2vt7D9TgJ1U7_Mxl4CWTud0xADnankqPxJWjgPQFRQch3p20VC7TRhBM/s1600/Incandescent.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh52ODqZVBX1Cjj-g7dD0Sc_xl0AKt8i2ajFEO6Wh8CpQNRwZwOV4I2v8GDBl_pQtCBCg8UCN7rEmGdmdGD-H2vt7D9TgJ1U7_Mxl4CWTud0xADnankqPxJWjgPQFRQch3p20VC7TRhBM/s640/Incandescent.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 10:&amp;nbsp; Left) White Patch Algorithm applied to the original image; Middle) Original image under &quot;Incandescent&quot; white balance mode; Right) Gray World Algorithm applied to the original image.&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;In this activity I would give myself a 10/10 for the completeness of the result despite of late posting.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Source:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity Sheet for Activity 12&amp;nbsp; - Dr. Maricor Soriano&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/5510485622048975659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-18-color-camera-processing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/5510485622048975659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/5510485622048975659'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-18-color-camera-processing.html' title='Entry 18:  Color Camera Processing'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxDHP0REJQcHD_MYsFlcacPW7ComqDn11BCHEhnNxo9gMWgKumihwKougRy28pSSRx3hMMVWBsn3CMb-uV4X8U8huGWWgEhdlkhO5c9cq_ctJqAESyz60HND6CM2g5kBOLp6Gf6XKDOdQ/s72-c/incandescent.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-7019808915371731490</id><published>2010-09-22T23:38:00.002+08:00</published><updated>2010-09-25T16:49:45.475+08:00</updated><title type='text'>Entry 17:  Playing Notes by Image Processing</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;When I was in elementary, I started to learn the basics of Music Theory.&amp;nbsp; I learned to read notes and other musical symbols.&amp;nbsp; I practiced how to play the piano.&amp;nbsp; I was really happy when I was able to hear the music coming from the piano.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Another happy music moment was when I started to study playing the violin.&amp;nbsp; I learned to play the violin in tutorials available in the Internet.&amp;nbsp; By then, I started saving money to buy my own violin.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;This time around, again I felt a happy music moment when I knew that this activity will be about playing musical pieces through image processing.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The goal of this activity was to &quot;read&quot; notes and &quot;play&quot; them using all of the methods learned in the previous activities.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;To perform this, we first chose a simple musical piece - Twinkle Twinkle Little Star.&amp;nbsp; Next, to further simplify the process, we cropped the staffs from the musical piece (Fig. 1).&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;47&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHB8tgU9X0HlJAQB2ukmVkGfMhxxTfh2Rd10rILl3xkD7cA6Id4fJP3uZ_pZhWWIv5Kh0uHWUNnii9J8O855VztB9fyKRpFRmtELmGNM4cX51TWjtI248eIMTjAyQFGpkxauWaPs8jjwc/s400/staff1.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1:&amp;nbsp; Sample cropped staff from the music sheet.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHB8tgU9X0HlJAQB2ukmVkGfMhxxTfh2Rd10rILl3xkD7cA6Id4fJP3uZ_pZhWWIv5Kh0uHWUNnii9J8O855VztB9fyKRpFRmtELmGNM4cX51TWjtI248eIMTjAyQFGpkxauWaPs8jjwc/s1600/staff1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;With the staff in hand, we performed custom methods to classify the notes in the staff.&amp;nbsp; The critical information in this piece of image are the pitch of each note and the length of each note playing time.&amp;nbsp; Rests are not present in this piece so our task was a lot easier.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;We cleaned the staff image and introduced morphological operations (successive erosion and closing).&amp;nbsp; The goal of this task is to characterize the notes on the piece and get their individual pitch and playing time information.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;47&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvTZoJwrUnZNwYJrC3poHx-lSRp-mik6tV8Elc3kQVfpr7Z8rflGtJ6F0ZCwU1rE-q-IVFGbtVxDUovHtk5pLmZcvPMgVjjhehCz6_Bh_Zw_x1fBehyphenhyphenftQcrJUP3tjDuzsIOL55RJaX2U/s400/staff1modified.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2:&amp;nbsp; Sample cleaned staff using erosion and closing.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvTZoJwrUnZNwYJrC3poHx-lSRp-mik6tV8Elc3kQVfpr7Z8rflGtJ6F0ZCwU1rE-q-IVFGbtVxDUovHtk5pLmZcvPMgVjjhehCz6_Bh_Zw_x1fBehyphenhyphenftQcrJUP3tjDuzsIOL55RJaX2U/s1600/staff1modified.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We took the coordinates of the center of mass of each blob and compared it against the &quot;known&quot; coordinates of the staff&#39;s ledger lines.&amp;nbsp; This information will give us the pitch of the note.&amp;nbsp; Also, the area of the blobs representing the notes were taken to determine the type of note (i.e. quarter or half note).&amp;nbsp; Notice that half notes have a smaller area than the quarter note, thus, we can differentiate one from the other.&lt;br /&gt;
&lt;br /&gt;
After the gathering of all the informations in the sheet, we inputed them in the function &lt;i&gt;wavwrite()&lt;/i&gt; which converts an array of sinusoids with frequencies corresponding to each musical notes to a .wav music file.&lt;br /&gt;
&lt;br /&gt;
After all of the procedures, finally the piece was already converted into a musical format and we were able to play it in our computer!&amp;nbsp; I used PiTiVi Video Editor in Ubuntu to render the video.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dyklBSu5Dc8DR0DPgogWWb3_ZmseaZKvZidD7VOO9Gdt-EgxKckd24GHSsnmxv378GxUx_KLpGtmzdt4uI7zg&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In this activity I would give myself a grade of 10/10 because of my efforts in finishing this activity.&amp;nbsp; Also, I have found an easy way of reading the piece without using &lt;i&gt;imcorrcoef()&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Source:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity Sheet for Activity 11 - Dr. Maricor Soriano&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/7019808915371731490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-17-playing-notes-by-image.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/7019808915371731490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/7019808915371731490'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-17-playing-notes-by-image.html' title='Entry 17:  Playing Notes by Image Processing'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHB8tgU9X0HlJAQB2ukmVkGfMhxxTfh2Rd10rILl3xkD7cA6Id4fJP3uZ_pZhWWIv5Kh0uHWUNnii9J8O855VztB9fyKRpFRmtELmGNM4cX51TWjtI248eIMTjAyQFGpkxauWaPs8jjwc/s72-c/staff1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-6037877129771014818</id><published>2010-09-22T00:06:00.001+08:00</published><updated>2010-09-26T11:27:27.757+08:00</updated><title type='text'>Entry 16:  Binary Operations</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Ola!&amp;nbsp; In this activity, we performed binary operations to identify simulated normal cells and discriminate cancer cells from normal cells.&amp;nbsp; We implemented our knowledge of morphological operations to achieve our goal.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We performed the method of classifying the normal cell area by first taking patches of 256x256 pixels from the original image.&amp;nbsp; This process was implemented by randomly taking a point from the original image and acquire the patch starting at that point, this way, the bias was reduced.&amp;nbsp; Samples from the randomly chosen patches are shown in Fig. 1 along with the binarized version with the threshold equal 0.84.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;266&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTGNWotF1EHaz5RvFR6jSaUDO9oVNSNmpmOE8wpTCTZIH1eIXPh6jAzs6p9D8nYjaJiT9WyPb-v7iG-iwPS_QSsBCvheHED-r9cDOmvwnJx4fbeJg_FA7dYdkUCeopAR566HiUgO00m6I/s400/concatenated_sampled.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1: Sample of the 256x256 patches from the original image and their corresponding binarized versions.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3BhdPga9Uq2E_64_n8642_hiXwKupjApsZOPodkOPHEQ4uKUGn7zs87uS3321ILimbVS3fK0PmJuMYMsW1EvWWacvMd69vNXDTzmV_T3_Wds-Ikz4M9qRD-xanvS-RLXfCc7Xizc5aDQ/s1600/concatenated_sampled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTGNWotF1EHaz5RvFR6jSaUDO9oVNSNmpmOE8wpTCTZIH1eIXPh6jAzs6p9D8nYjaJiT9WyPb-v7iG-iwPS_QSsBCvheHED-r9cDOmvwnJx4fbeJg_FA7dYdkUCeopAR566HiUgO00m6I/s1600/concatenated_sampled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The binarized version was done by choosing a threshold based from the pixel value histogram as shown in Fig. 2,&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyman_5JYVhDANPOGwHxNV-JlEv_yr2jJhqA_8FjSmSJs6GAMNt-tETB0RsabDf_ixhx4vAAMIMNgwtD8O9iF3hEJbKQTaPqxB9UJTievjDcpTENGAFdi8_MQKUQfXQxu_2izK41AXp4U/s400/threshold_histogram.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2:&amp;nbsp; Pixel value histogram of a sample patch indicating that the threshold is near the value of 0.85.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyman_5JYVhDANPOGwHxNV-JlEv_yr2jJhqA_8FjSmSJs6GAMNt-tETB0RsabDf_ixhx4vAAMIMNgwtD8O9iF3hEJbKQTaPqxB9UJTievjDcpTENGAFdi8_MQKUQfXQxu_2izK41AXp4U/s1600/threshold_histogram.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After generating the binarized patches, we identified the distribution of area of contiguous regions using the function &lt;i&gt;bwlabel()&lt;/i&gt;.&amp;nbsp; The histogram of the contiguous regions from the entire subimages are shown in Fig. 3.&amp;nbsp; It must be noted that we limited the reasonable area to be counted in the histogram in the range 50px to 1000px only.&amp;nbsp; Values outside the specified range are assigned to be outliers.&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2ZII1L2Nuuq7xv3gozRMu1ZyGLe6xOyu5ZyuOEiU6SvgQfUAaCAELDY0kTrTP9F6tuNXqPVcl29N9VdLyTH7YymX21_zK-4cUciiDhpo4zzLrH_v9zjFdE94g2JZ4l3_yoBt3XRKx2j8/s400/normal_cell_area_hist.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 3:&amp;nbsp; Histogram of the area of contiguous regions in the patches.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2ZII1L2Nuuq7xv3gozRMu1ZyGLe6xOyu5ZyuOEiU6SvgQfUAaCAELDY0kTrTP9F6tuNXqPVcl29N9VdLyTH7YymX21_zK-4cUciiDhpo4zzLrH_v9zjFdE94g2JZ4l3_yoBt3XRKx2j8/s1600/normal_cell_area_hist.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In Fig. 3, we observed that the most probable area is about 500px.&amp;nbsp; Thus we conclude that a normal cell has a mean area of 500px.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Now, we find a method to identify a cancer cell in a region with normal cells.&amp;nbsp; We utilized the computed area of a normal cell and used it in the discrimination method.&amp;nbsp; We know that when a region of smaller area is applied with the &lt;b&gt;open morphological operation&lt;/b&gt; with a structuring element with a larger area, the region will vanish.&amp;nbsp; Since the the cancer cells are relatively larger, it is possible to remove the normal cells by opening the image with the structuring element with area equal to the normal cell.&lt;/div&gt;&lt;br /&gt;
After applying the method, we have successfully determined the cancer cells from the rest of the normal cells as shown in Fig. 4.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzrbziruRGbJkuTdc79OkSAMtoKZrZFNF3LmzMCz3NUs1hIDMOQAzIdCe6TdNT6BC3TshQBgSlwmST72RS0567oUPhK5qMD_J2E2TywhmxLreULXyCUmbfzc3VZg5GZeD4F1a4qRNhWD8/s640/concatenated_cancer_cells.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;385&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 5:&amp;nbsp; Image of normal cells with randomly located cancer cells.&amp;nbsp; Also shown are the detected cancer cells.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzrbziruRGbJkuTdc79OkSAMtoKZrZFNF3LmzMCz3NUs1hIDMOQAzIdCe6TdNT6BC3TshQBgSlwmST72RS0567oUPhK5qMD_J2E2TywhmxLreULXyCUmbfzc3VZg5GZeD4F1a4qRNhWD8/s1600/concatenated_cancer_cells.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;Based from the results, we have verified the application of binary operations in identifying cancer cells in an ensemble of normal cells.&lt;br /&gt;
&lt;br /&gt;
In this activity I developed a better grasp of the concept of morphological operations and I learned that extensive applications may be adapted using the basic morphological operations in binarized images.&amp;nbsp; I&#39;ll be rating myself 10/10 because I completed all the requirements for this activity and also because of the knowledge I gained.&lt;br /&gt;
&lt;br /&gt;
Source:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity Sheet for Activity 10 - Dr. Maricor Soriano&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks to BA Racoma for giving me a tip regarding the open operation. :D</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/6037877129771014818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-16-binary-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/6037877129771014818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/6037877129771014818'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-16-binary-operations.html' title='Entry 16:  Binary Operations'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTGNWotF1EHaz5RvFR6jSaUDO9oVNSNmpmOE8wpTCTZIH1eIXPh6jAzs6p9D8nYjaJiT9WyPb-v7iG-iwPS_QSsBCvheHED-r9cDOmvwnJx4fbeJg_FA7dYdkUCeopAR566HiUgO00m6I/s72-c/concatenated_sampled.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-8009102425532264791</id><published>2010-09-21T22:59:00.001+08:00</published><updated>2010-09-26T11:28:04.025+08:00</updated><title type='text'>Entry 15: Morphological Operations</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Morphological operations are methods in transforming an image by using a specific structuring element to yield desired formation in the image.&amp;nbsp; This technique is widely used in image processing to produce a more easy-to-handle image.&lt;br /&gt;
&lt;br /&gt;
Two main morphological operations are used in this activity which are the dilate and the erode operations.&lt;br /&gt;
&lt;br /&gt;
The erode operation is defined mathematically as,&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWlbUrLNFM0ngmhHKfhtmd47jvQ6bWokqkeYCgGoqZfAcPrqOH-CicjRZAJue8kyR39w6EGW2vDp1ugLdrRIDEx2yCCmsAKUTo-nTSlT1W14F9SPwR314rn556PJRZKEdCOYzkraG4iug/s1600/erosion_eq.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWlbUrLNFM0ngmhHKfhtmd47jvQ6bWokqkeYCgGoqZfAcPrqOH-CicjRZAJue8kyR39w6EGW2vDp1ugLdrRIDEx2yCCmsAKUTo-nTSlT1W14F9SPwR314rn556PJRZKEdCOYzkraG4iug/s320/erosion_eq.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
this means that every points in B must be contained in A so that the value in A where the origin of B is located will attain a value, else, a zero value will be assigned to that B location.&lt;br /&gt;
&lt;br /&gt;
Graphically it can be illustrated by the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb75SZP639tHUyLEOOtg8t7XKaTOQa5UhMqU7wLeEjT-_5SxDHYKS-YOnruBrwqDf25cMBlclTo8GiHsxlFuGfTjGYZqkDB5BItcjLbRKvy_Jg4TbMbnLwfOeeEMsTh2si4iP_kNBtG6M/s1600/erosion_concept.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb75SZP639tHUyLEOOtg8t7XKaTOQa5UhMqU7wLeEjT-_5SxDHYKS-YOnruBrwqDf25cMBlclTo8GiHsxlFuGfTjGYZqkDB5BItcjLbRKvy_Jg4TbMbnLwfOeeEMsTh2si4iP_kNBtG6M/s320/erosion_concept.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The dilate operation on the other hand is defined mathematically as,&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7AYv_ILVmlyLMz6V9Vx5V_RzS1XJz4lyyCuY4pPbngMP4VcFdtNwWlnWRXiq5wjJo40c5eRttvrTJM9WVrf-hlnjrgWJBeTIPhXqKK3a_E9pb_zBQ3VU4PWumRqctlvNFHskMHU-kGiQ/s1600/dilation_eq.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7AYv_ILVmlyLMz6V9Vx5V_RzS1XJz4lyyCuY4pPbngMP4VcFdtNwWlnWRXiq5wjJo40c5eRttvrTJM9WVrf-hlnjrgWJBeTIPhXqKK3a_E9pb_zBQ3VU4PWumRqctlvNFHskMHU-kGiQ/s320/dilation_eq.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
the implication of this equation is that when B covers a location in the background, provided that the origin of B is contained in A, then the background region covered by B will take the value of the foreground.&lt;br /&gt;
&lt;br /&gt;
An illustration is shown by the image below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrQtTX1VB5k-53Nl4IKou3PKyoZ8-R9ytfZfk7AEqTZo3qex10plxv12YSZG-bF4LShEFkeFfTyDPh8ZMJzIt_hBeG6MIUjB0hQR4cfd8Umh2QD06hJkBisBSj9XCMsKWjSjZNSRV9Ow/s1600/dilation_concept.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrQtTX1VB5k-53Nl4IKou3PKyoZ8-R9ytfZfk7AEqTZo3qex10plxv12YSZG-bF4LShEFkeFfTyDPh8ZMJzIt_hBeG6MIUjB0hQR4cfd8Umh2QD06hJkBisBSj9XCMsKWjSjZNSRV9Ow/s320/dilation_concept.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Below (Fig. 1) are the images to be structured and (Fig. 2) are the structuring elements used. &lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDZsLlzZNg5w5iWjaAwmqHNBIe6haeZ3ozCX44A5fnHnvv74R01hEF5jluY5QhSlfEjpuBMUIcpofBH2Xt4GuwhVzuk5uMajtyQRTvpw6TQTn-MNFo7j622dtzlV4fSoU1oKneQ9YvdFk/s400/objects.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1:&amp;nbsp; Images to be structured.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDZsLlzZNg5w5iWjaAwmqHNBIe6haeZ3ozCX44A5fnHnvv74R01hEF5jluY5QhSlfEjpuBMUIcpofBH2Xt4GuwhVzuk5uMajtyQRTvpw6TQTn-MNFo7j622dtzlV4fSoU1oKneQ9YvdFk/s1600/objects.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;80&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTwr-DMzCGxiK65LN_yWN1nye48Fyxj3b61MMcPy9qDULEA8qDMD-R6M6cin-cVtfqMr-o8Vj7moJG6tHsogxbVsflGZWSUtoNXK-HEVZppjYkZc3NrLV3sXa5hzFGxVWcM5z_6XjBVF4/s400/concatenated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2:&amp;nbsp; Structuring elements used in the process.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTwr-DMzCGxiK65LN_yWN1nye48Fyxj3b61MMcPy9qDULEA8qDMD-R6M6cin-cVtfqMr-o8Vj7moJG6tHsogxbVsflGZWSUtoNXK-HEVZppjYkZc3NrLV3sXa5hzFGxVWcM5z_6XjBVF4/s1600/concatenated.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;In the succeeding images, we show the results of dilating the original images (Fig. 1) with the strels (Fig. 2).&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg80lfaBjWTZz9Kr0ia7iH3S7jwDERU5GqPM5J1qliBEo4KsIsML6Cy0BmjiwHVT0HbS9vYhqjsA_r0Z-ZZlbZuhGVVMFEm-XPM5YCvwPvjd0TlXsK5HW8Gtm8Wq1Nzm44hn7g8YsRZRcQ/s400/obt_dilate.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 3:&amp;nbsp; Dilated images using a 1x2 strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipTzxhgMIL2F26GtjBgTdJQjQuW2OxC3sr0fC8lqUxsEc5WhfQa4zWXfhRF00i0SPj4L8rEsdnq9kqTQagu-Zb52sJPzhmYTG7hBbECetGMaqs7JS0aSx_1fhNNrcpNqwEZs2vTnOql-8/s400/di1_dilate.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 4:&amp;nbsp; Dilated images using a decreasing diagonal strel.&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguMt7FBP490mBHnSwbzuJx5wrz6jKgsXzDNjeko2VMOmAhrjohld2uDbdHdUWDHISqvBChk1-IJjD62ku5VxpFSNXvgunOVHs7vSiTALldahme1haNvsC_eA0aZMqnQWMLzf3ehZRovCE/s400/tbo_dilate.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 5:&amp;nbsp; Dilated images using a 2x1 strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkiKsfAtisOboKrfnKPmwWbuhpeXyAmnkxiRFdfZ0j84j8ZIaekv9m4KRY48hek6Vzwdxc71T3I2oCmnHoVuzIUZC2qjME6LeJlfPGc-xsxWXWOTDxHEsg5iMC5rhJ9iif0B0C59kDiDY/s400/di2_dilate.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 6:&amp;nbsp; Dilated images using an increasing diagonal strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjft4suBusOcrXIztPM3Y3Qbsuj7EG4CmEBMjTmQ_R8QoCGQwYHXTpYWQhcRU2YjUVnRbFTgg-UNBzetOqMyaVW0GIvwjDDvBMABP5hTPV60EHgTWf7e9i9yv4qJfTdDeMGLNyDuhZElho/s400/tbt_dilate.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 7:&amp;nbsp; Dilated images using a 2x2 strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmsGHagASidrG7QgrpTUNdQaHZzAhErROZpvr6KJ8mBi7fGBJ6_BeV8SYVLwSxdHx_y8ydrnztU9OPQfJOuvHiB85AvkG2I35xOivubRyxJH_JDn0TYec9UQu5uWWOl4HyT-WkirmUGDE/s400/crto_dilate.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 8:&amp;nbsp; Dilated images using a cross strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After determining the dilated images, we tried another morphological operation which is erosion.&amp;nbsp; The images below are the eroded original (Fig. 1) images using the strels in Fig. 2.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgumHIe6X9Ar7n3Ket-m5VTGHQqaFxAen4_GI5d63CQjvNrVP38zpQbhaPNd4QmB7X7wpdXCfv44arC7wpKlrZNcm2TJGgTYMIWZn2Hfs49vRyt94GE9k9ilWYvx-2GsMiXk-sy88e_e8A/s400/obt_erode.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 9:&amp;nbsp; Eroded images using a 1x2 strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgumHIe6X9Ar7n3Ket-m5VTGHQqaFxAen4_GI5d63CQjvNrVP38zpQbhaPNd4QmB7X7wpdXCfv44arC7wpKlrZNcm2TJGgTYMIWZn2Hfs49vRyt94GE9k9ilWYvx-2GsMiXk-sy88e_e8A/s1600/obt_erode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOXlbdieZSU4r36ja6aiKFyJuyyQ_sw9uSm1YWkhCpijTgcBHs1NyGnPqevMde3f0YHs9KmA29Ywy26wxufbOB61oxRNg_DQMAHaXVDohSdaIWk9FPeecxoR05xND7GEajd-_319druJs/s400/di1_erode.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 10:&amp;nbsp; Eroded images using a decreasing diagonal strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOXlbdieZSU4r36ja6aiKFyJuyyQ_sw9uSm1YWkhCpijTgcBHs1NyGnPqevMde3f0YHs9KmA29Ywy26wxufbOB61oxRNg_DQMAHaXVDohSdaIWk9FPeecxoR05xND7GEajd-_319druJs/s1600/di1_erode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5_J3hEahdV4Na4z4shVWnepLeBBaerLCm-GCO6msVSpVpZ6S_ss3b3LcENj5rY_VOKEKg5gSq_HnTCHQyrqyesl1K18kFl7a-EMRQHDF_czSnEAhhSP33V8GuSxnAximdHSTnu84tVc0/s400/tbo_erode.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 11:&amp;nbsp; Eroded images using a 2x1 strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5_J3hEahdV4Na4z4shVWnepLeBBaerLCm-GCO6msVSpVpZ6S_ss3b3LcENj5rY_VOKEKg5gSq_HnTCHQyrqyesl1K18kFl7a-EMRQHDF_czSnEAhhSP33V8GuSxnAximdHSTnu84tVc0/s1600/tbo_erode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhViFgEEt_G9tsHqVFW3j3DcivLpjJfc9afrB76OtTc2mH_TItfH1taR2zQ-e2e8B5vLMzEJtX3NwVEkLVdaWscX54PfvQuwOiSPoJK-z9E-tkqfjEqBx8J71y5yzxK-f2mjgThvc2nm7Q/s400/di2_erode.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 12:&amp;nbsp; Eroded images using an increasing diagonal strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhViFgEEt_G9tsHqVFW3j3DcivLpjJfc9afrB76OtTc2mH_TItfH1taR2zQ-e2e8B5vLMzEJtX3NwVEkLVdaWscX54PfvQuwOiSPoJK-z9E-tkqfjEqBx8J71y5yzxK-f2mjgThvc2nm7Q/s1600/di2_erode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYqaD7xxS2fR2kJZhSTR2wQF0_nKKZuLZAnt25SvZp70nXCBAQCbRTbxx-g60-DPrrGKcz6klKA8Obtd2md5Qp8yiaWWmAPslYovblJNUcl9koa0ch0Tq4NzVGa23-lJG1tMpHNwRUcpg/s400/crto_erode.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 13:&amp;nbsp; Eroded images using a 2x2 strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYqaD7xxS2fR2kJZhSTR2wQF0_nKKZuLZAnt25SvZp70nXCBAQCbRTbxx-g60-DPrrGKcz6klKA8Obtd2md5Qp8yiaWWmAPslYovblJNUcl9koa0ch0Tq4NzVGa23-lJG1tMpHNwRUcpg/s1600/crto_erode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGMYrE0rexSBkvlxF55tIzWjLelj0CWimf6KykGal4bDHtnC9uRXo8RU9UxUP8omcH7ALFEsyV1wh3e0KO8ju8AbdkJ-B_VUZcDhXbbB8mXhIGLZ0VoPPxrOCgAFeX3Gv6XClyBNlZ9GQ/s400/tbt_erode.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 14:&amp;nbsp; Eroded images using a cross strel.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGMYrE0rexSBkvlxF55tIzWjLelj0CWimf6KykGal4bDHtnC9uRXo8RU9UxUP8omcH7ALFEsyV1wh3e0KO8ju8AbdkJ-B_VUZcDhXbbB8mXhIGLZ0VoPPxrOCgAFeX3Gv6XClyBNlZ9GQ/s1600/tbt_erode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;Morphological operations can be applied to different image processing problems to simplify them.&amp;nbsp; The usefulness of these operations depend on the user.&lt;br /&gt;
&lt;br /&gt;
In this activity I would rate myself a grade of 10/10.&lt;br /&gt;
&lt;br /&gt;
Source:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity Sheet for Activity 9 - Dr. Maricor Soriano&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/8009102425532264791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-15-morphological-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/8009102425532264791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/8009102425532264791'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-15-morphological-operations.html' title='Entry 15: Morphological Operations'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWlbUrLNFM0ngmhHKfhtmd47jvQ6bWokqkeYCgGoqZfAcPrqOH-CicjRZAJue8kyR39w6EGW2vDp1ugLdrRIDEx2yCCmsAKUTo-nTSlT1W14F9SPwR314rn556PJRZKEdCOYzkraG4iug/s72-c/erosion_eq.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-5556218908680036092</id><published>2010-09-21T22:00:00.005+08:00</published><updated>2010-09-25T15:20:15.357+08:00</updated><title type='text'>Entry 14: Enhancement in the Frequency Domain</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Speaker: Fourier transform enables us to travel across dimensions!&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Audience: How?!!!&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Speaker: It&#39;s because Fourier transform empowers us to see the world of the inverse dimensions!&lt;br /&gt;
&lt;br /&gt;
Audience: Ok...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This activity emphasizes the power of Fourier Transform (FT) in various applications.&amp;nbsp; To be discussed here are the simple exercises made to get a better idea on how FT changes some properties of our object.&amp;nbsp; Also, a major application of FT will be included here which is about using FT in cleaning digital finger print images.&amp;nbsp; The application of FT in filtering repetitive patterns of &quot;noise&quot; in painting due to its canvas weave and removal of vertical lines in a photograph was used to correct these issues and to produce a better image.&lt;br /&gt;
&lt;br /&gt;
So we first simulated the action of FT on basic patterns as shown in the FT pairs below (Fig. 1).&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDyQrQ1CN945JlpU_CCUBZ575FvnZJKxt9OY7-A4QjnfwBbC_1DnknlEusby22UIOAqQxaD-MquMOTcMd6ehHf6QlNSvS2C1HYM0pHEGDNQ1LLGkN4SnM8I4kkbQ1SpQB8S-eLsg-qc98/s640/concatenated_ft_pairs.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;249&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;FIgure 1:&amp;nbsp; Fourier Transform pair of different basic patterns (symmetric dots, symmetric circles and symmetric squares).&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
Also the FT pair of the Gaussian pattern was simulated.&lt;br /&gt;
&lt;br /&gt;
In the next section, we performed enhancement of a &lt;a href=&quot;http://blog.shirleywalsh.com/fingerprints-486.html&quot;&gt;fingerprint image &lt;/a&gt;using filtering techniques in the Fourier space of the image.&amp;nbsp; The image of the fingerprint is shown in Fig. 2,&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_S8a5ERWmILAsjKJdzuR-Fj_pyIh0Pce3cSEYi71e4NPW1p1sqFbCVHhkIN6SOK_fx3mFaKY4pv8CfGO3-AhaI3g5rKBT-rb_Gyl8IwEOCiGNGQot1b05fIzaPzI5yzbO_TqO0VNSOgA/s400/fingerprint.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;332&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2:&amp;nbsp; Original image of the fingerprint to be &quot;cleaned&quot;.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
To start filtering, we first identify how the frequency world of the fingerprint image look like so that we can identify the proper filtering mask to use to discriminate unwanted information in the image.&lt;br /&gt;
&lt;br /&gt;
In Fig. 3, the FT of the fingerprint image is shown which reveals the nature of the frequency of the information in the image.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIcz2PUaVaNHhZxDm7lSwxLrNm3FdQeE8phctUIkGBYPc4Jg-5E3l7X1SeyX3gApH-2FluyuYYCVmJDYJLoNmxnaqTepjb-OnhbTDR6bpKnmCJnqHTZwcTDD6BOIXd9HstxvYDh4piDEo/s320/fftfp.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;266&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 3:&amp;nbsp; Fourier Transform of the fingerprint image which shows the frequency component of the image.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span id=&quot;goog_522433755&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_522433756&quot;&gt;&lt;/span&gt;&lt;br /&gt;
We realize based from the information from Fig. 3 that the frequency of the information relevant to the fingerprint is not well distinguishable from the noise so we chose a smoothing mask to use to smoothen the noise in the image and from that smoothened image, we can do thresholding to determine the actual fingerprint image discriminating the noise.&lt;br /&gt;
&lt;br /&gt;
We show in Fig. 4 the mask used to filter the fingerprint image.&amp;nbsp; The mask is composed of two Gaussian functions, one with a very small variance to facilitate the filtering of the DC component and the other Gaussian filter is responsible to discriminating the noise of high frequencies.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmhQhupjyJVj8ubZ2quqjO90d47XbCEKM9PgAy0Nwk3ksDU0jrcVcucatG_aVsvmaq-XIfczVzFPiSgvFfshmjVHdkmmgojAHvsRGLLsAriD5XdXzZDBpSGSThes_9ALea4lCOYcnam74/s400/fft_gaussian_filter.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;332&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 4:&amp;nbsp; Double Gaussian filter to clean the fingerprint image.&amp;nbsp; Sigma used are 0.0001 and 18 to filter the DC and high frequency components of the noise.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
After applying the filter to the original fingerprint image, we now have the smoothened/filtered version.&amp;nbsp; The result is shown in Fig. 5.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;379&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6G3aXfH0aXOO-flB_lCKSmNltC-OHFGG8p43KNIcjI38AH1PaFbRkIh5WMF38cRjd_ZTruoHWFKarKpkbbDGpeU405VY0V3_MKue2NBu4UXNozfyXut1crVbaOdtv4A9nK3-oS6aOt0Q/s640/concatenated_filtered.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 5:&amp;nbsp; Left) Filtered image using the double Gaussian filter, Right) Thresholded filtered image showing the significant details of the fingerprint showing that the noise were wiped out.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Also shown in Fig. 5 is the final filtered image of the fingerprint.&amp;nbsp; After taking the smoothened image, we applied thresholding to it to wipe away any traces of noise in the background to only leave the significant components constituting the fingerprint.&lt;br /&gt;
&lt;br /&gt;
The next task is to remove vertical artifacts from one of the &lt;a href=&quot;http://www.google.com.ph/imgres?imgurl=http://www.lpi.usra.edu/lunar/missions/apollo/apollo_11/images/hi_res_vertical_lg.gif&amp;amp;imgrefurl=http://www.lpi.usra.edu/lunar/missions/apollo/apollo_11/landing_site/&amp;amp;usg=__Jt84ibfD0H0Zs3-FDt9ubXhH4uc=&amp;amp;h=480&amp;amp;w=640&amp;amp;sz=329&amp;amp;hl=tl&amp;amp;start=78&amp;amp;zoom=1&amp;amp;tbnid=Z8_EZ9Hh2YaqzM:&amp;amp;tbnh=136&amp;amp;tbnw=172&amp;amp;prev=/images%3Fq%3DNASA%2BLunar%2Borbiter%2Bphotograph%26um%3D1%26hl%3Dtl%26client%3Dfirefox-a%26hs%3D1kP%26sa%3DX%26rls%3Dcom.mandriva:en-US:unofficial%26biw%3D1280%26bih%3D600%26tbs%3Disch:10%2C1862&amp;amp;um=1&amp;amp;itbs=1&amp;amp;iact=hc&amp;amp;vpx=982&amp;amp;vpy=188&amp;amp;dur=7864&amp;amp;hovh=194&amp;amp;hovw=259&amp;amp;tx=69&amp;amp;ty=217&amp;amp;ei=aKKdTN3TKtqPcMHJ0c0J&amp;amp;oei=Q6KdTMj4FYOecfTYlMQJ&amp;amp;esq=5&amp;amp;page=5&amp;amp;ndsp=21&amp;amp;ved=1t:429,r:6,s:78&amp;amp;biw=1280&amp;amp;bih=600&quot;&gt;images of the moon&#39;s surface&lt;/a&gt; (Fig. 6).&amp;nbsp; It was said in the image details that the artifact was due to the concatenation of individual framelets to make the entire image [1].&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJPoK9fCkqoVPezZBWPLtqImlTEGXA6gu1PMz30ger9GaZeDl9UF7QrVJaAa1YepsY6K2jmnNq-aHGZwKbMBxHY0cbke84oRBIIXDhfWOYJLaK3_gkeLeCfwTN0HLrf1aeifZzMakK2Fk/s400/hi_res_vertical_lg.gif&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 6:&amp;nbsp; Original image of the moon&#39;s surface with evident vertical lines.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
To start the process of filtering the vertical lines in the image, we first converted the image into a grayscale version and took the FT of it to reveal the frequency values in the image (Fig. 7 - Left).&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5f0ov0UZ_OtXMixBCF4927x4cjuS1G4kRETDSXr4ohy97cj46c_aCU8M4ZrMgusLAW9LyWKCVagEkZbVOVapKhGe_K7_jL1fAOv4qCgJ9vkJZGiP59YHeHoTltLukvH2eps99cE6Jq2s/s640/moon_mask_concatenated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 7:&amp;nbsp; Left) Fourier Transform of the grayscaled moon image showing repetitive dots along the x-axis, Right) Filtering mask used to remove the vertical lines.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
From our Activity 7, we learned that the FT of vertical lines correspond to a series of dots in the x-axis of the frequency space.&amp;nbsp; Thus we made a filtering object that masks the points where the information relating to the vertical lines were located (Fig. 7 - Right).&lt;br /&gt;
&lt;br /&gt;
After applying the mask to the image&#39;s FT and going back to the linear domain, we produce the filtered form of the image.&amp;nbsp; In Fig. 8, shown are the original image along with the filtered image of the moon.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivlniMT-3XsUD4WwOr6vsCqT5SNbmLtOoxSVDAMg16d4k6rybggJPrqAS0f-k1D64SuDJsFZWuhN7CrAzXIjZDADRyAcTejvIAV4_Vm0ntkeJS1pW7VYHFLj7vgGrhOxjeEZH9hrpaXME/s640/moon_concatenated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 8:&amp;nbsp; Left) Original grayscale image of the moon with evident vertical lines, Right) Filtered image wherein the vertical lines were removed.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Lastly, we performed the same method to a painting.&amp;nbsp; The task is to remove the effect of the canvas weave on the image.&amp;nbsp; The original image is shown in Fig. 9.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-fdialgtzprsO0M8kXBsv_0srCYI-FGBS7SyMNRGqiP7Bi5us3uPABz82Qo3M3A4Ns8-UjUaXLhij-I5rgNRbCQ_wdOH29COJnfSxKxDVa_pxyARjfZYO8BQIENLTyatPLXEc9bckfBk/s1600/canvasweave.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;287&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-fdialgtzprsO0M8kXBsv_0srCYI-FGBS7SyMNRGqiP7Bi5us3uPABz82Qo3M3A4Ns8-UjUaXLhij-I5rgNRbCQ_wdOH29COJnfSxKxDVa_pxyARjfZYO8BQIENLTyatPLXEc9bckfBk/s400/canvasweave.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 9:&amp;nbsp; Original image of the painting with very obvious canvas weave pattern.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
We get the grascale of the image of the painting and took the FT of it to reveal the localized high valued frequencies.&amp;nbsp; Localized high valued frequencies can be thought to carry the information of the frequently occurring canvass weave pattern and there we based the mask to be used for filtering.&amp;nbsp; The FT of the image and the mask is shown in Fig. 10.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia7WqYaO7nXeFkEBY_eVYs4tEHh3LkQLNc_wP9Bbiiht_a9wyyZPQAe9YyceBTAlB-jip_OpqOXqmAYNpUxQDlqRXE5mQYCDUBaOzGhS1q5B8z5faYHeNURJPE9hXi6majOOQyhQ-_68I/s640/weave_mask_concatenated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 10:&amp;nbsp; Left) FT of the painting image showing localized high valued frequency, Right) Mask developed to filter the canvass weave pattern.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
After applying the mask to the FT of the image and returning back to the linear domain, we get the filtered image wherein the canvass weave pattern can no longer be seen.&amp;nbsp; In Fig. 11, shown side by side are the original grayscaled image of the painting along with the filtered image.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;226&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_MkTFiEmuo1S4ZkgdUvcUfxLWSVyKC09IuMKLoAaDKfN0z0UttWGCclD4t9BaLAf70wOD-TeoZMZT5EDXahPyNEhrZnM3sV9u73e7XzzrtfJorKZKXJB3tFrP5JfMv9uJMSpjmLiESQA/s640/weave_concatenated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 11:&amp;nbsp; Left) Original grayscaled image of the painting, Right) Filtered painting showing no signs of the canvass weave pattern.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
The last thing we did in this activity is to show the image of the mask used in linear domain.&amp;nbsp; We can see in Fig. 12 the similarity of the linear domain version of the mask used to the canvass weave pattern.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8sKRrZ4jPpBVKJyJGH46uLuhNtRxq8eGgtjwoXKov7nv7nOeTetNkqD-qu2Z_Bktg2inPB7cysFWfUhIzRHwWddXOd6nw3Ckd9D20UM1IDWdKBOMmHXq71qNny1UVgMHMxHuYY09JakQ/s320/weave_pattern.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;320&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 12:&amp;nbsp; Linear domain version of the mask used in the filtering of the painting.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
In this activity I would give myself a 10/10 for the dedication and the learning I had during this activity.&lt;br /&gt;
&lt;br /&gt;
Source:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp; &amp;nbsp; [1]&amp;nbsp; Activity Sheet for Activity 8 - Dr. Maricor Soriano &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/5556218908680036092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-14-enhancement-in-frequency.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/5556218908680036092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/5556218908680036092'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-14-enhancement-in-frequency.html' title='Entry 14: Enhancement in the Frequency Domain'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDyQrQ1CN945JlpU_CCUBZ575FvnZJKxt9OY7-A4QjnfwBbC_1DnknlEusby22UIOAqQxaD-MquMOTcMd6ehHf6QlNSvS2C1HYM0pHEGDNQ1LLGkN4SnM8I4kkbQ1SpQB8S-eLsg-qc98/s72-c/concatenated_ft_pairs.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-9078217303828371018</id><published>2010-09-21T01:26:00.004+08:00</published><updated>2010-09-26T11:28:57.213+08:00</updated><title type='text'>Entry 13: Properties of the 2D Fourier Transform</title><content type='html'>In this activity, we explored the properties of the 2D Fourier Transform (FT).&amp;nbsp; The main goal of this activity is to have a nice grasp of the ideas and the actions of FT to a subject image.&lt;br /&gt;
&lt;br /&gt;
Two sections were dedicated in this activity.&amp;nbsp; The first about familiarization of FT of different&amp;nbsp; 2D patterns while the second section was about anamorphic property of the FT.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKQ927mMGUTdUc5fRMLY8Miq9zXMIsRw5E7_FpoCYgR_kogXLMWaTdMF4rKBIn5iMEQEL-PhBrXGGzrkrlNn4S7Qh0kOVLYNRFaU5a0nTWbhbfBpBxMGM-j2Isf9wuHjRqIUqut1GcWWI/s640/concatenated1.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1: Fourier Transform pairs of basic patterns.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKQ927mMGUTdUc5fRMLY8Miq9zXMIsRw5E7_FpoCYgR_kogXLMWaTdMF4rKBIn5iMEQEL-PhBrXGGzrkrlNn4S7Qh0kOVLYNRFaU5a0nTWbhbfBpBxMGM-j2Isf9wuHjRqIUqut1GcWWI/s1600/concatenated1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In Fig. 1, the FT of the basic figures in the top most layer are shown in the bottom.&lt;br /&gt;
&lt;br /&gt;
The corresponding images are called FT pairs.&amp;nbsp; It is also useful to know that the FT of the image&#39;s FT will yield the original image.&lt;br /&gt;
&lt;br /&gt;
The second section about the anamorphic property of FT when applied on 2D images was then studied.&amp;nbsp; When we say anamorphic property, it refers to producing different optical imaging effects along mutually perpendicular radii.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;318&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIDoOOHuTPdQ8xSdkTywor-WhT5JYTzcTXxXh5fsjY48Z5wlgtnd9njq6daYcDFfk-UXyCwgMP9Emmn2IRisE0T80tNEeZNCayrELZtVM5kvDLeDW0WnoP6mx5v48daJWQiSbUwds-Bow/s640/concatenated2.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2: Anamorphic property of Fourier Transform.&amp;nbsp; Shown here are the resulting Fourier Transforms of each sinusoidal images of varying parameters and conditions.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIDoOOHuTPdQ8xSdkTywor-WhT5JYTzcTXxXh5fsjY48Z5wlgtnd9njq6daYcDFfk-UXyCwgMP9Emmn2IRisE0T80tNEeZNCayrELZtVM5kvDLeDW0WnoP6mx5v48daJWQiSbUwds-Bow/s1600/concatenated2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;In Fig. 2, we see the FT&#39;s of different sinusoidal patterns.&amp;nbsp; On the first column, the FT pair of a sinusoid along the x-axis with frequency equal to 1 Hz is shown.&amp;nbsp; The second column displays the FT pair of sinusoid along the x-axis with frequency equal to 4 Hz. Observe that the FT of the sinusoid with frequency equals 1 are symmetric dots about the origin of the fx-axis located 1 unit away while the FT of the sinusoid with frequency equals 4 is depicted by symmetric dots about the origin along the fx-axis located 4 units away.&amp;nbsp; From this observation, we can infer that the signal&#39;s frequency are projected in the frequency space after the application of FT.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVmYkLlp88lK8RtI21qCvUzK-9t1dlf4-x_6ojPNkRXLU0WYEoUtII7bOkwtyye7p0isHuT1ZXT2s2XyAuctQE9-wIJtdwQH7xj6Xh0uPZOLb21i2NUf0NRCMtS0OtDXstKgH9wcnU8Zk/s400/concatenated3.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 3:&amp;nbsp; Effects of DC bias and bias with frequency on a sinusoidal signal and their corresponding Fourier Transforms.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In Fig. 3, we show the effects of DC bias and bias with frequency to the Fourier Transform of each original sinusoidal image.&amp;nbsp; The FT of the DC-biased sinusoidal signal is characterized by a pair of symmetric dots indicating the principal frequency of the signal and a dot in the center.&amp;nbsp; The dot in the center is the constant carrier signal &quot;DC&quot;.&amp;nbsp; This behavior depicts the mathematical form of the FT of a constant value which is equal to a Dirac delta at 0.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;In this activity I would give myself a 10/10 for a completeness.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Source:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity Sheet for Activity 7 - Dr. Maricor Soriano&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/9078217303828371018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-13-properties-of-2d-fourier.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/9078217303828371018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/9078217303828371018'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/09/entry-13-properties-of-2d-fourier.html' title='Entry 13: Properties of the 2D Fourier Transform'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKQ927mMGUTdUc5fRMLY8Miq9zXMIsRw5E7_FpoCYgR_kogXLMWaTdMF4rKBIn5iMEQEL-PhBrXGGzrkrlNn4S7Qh0kOVLYNRFaU5a0nTWbhbfBpBxMGM-j2Isf9wuHjRqIUqut1GcWWI/s72-c/concatenated1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-7294672324059592700</id><published>2010-07-15T11:42:00.007+08:00</published><updated>2010-09-26T11:29:40.168+08:00</updated><title type='text'>Entry 12:  Fourier Transform Model of Image Formation</title><content type='html'>In this activity, we performed exercises to understand the properties of Fourier Transform.&amp;nbsp; Also, we applied the Fourier Transform technique to model image formation of a system of optical devices.&amp;nbsp; The rationale of this implementation lies on the fact that the projection of an image&amp;nbsp; through a lens at a large distance is equivalent to the Fourier Transform of the object.&lt;br /&gt;
&lt;br /&gt;
The activity has four parts and each part introduces a different application of Fourier Transform on image processing.&lt;br /&gt;
&lt;br /&gt;
The objective of the first part of the activity is to familiarize us with the nature of Fourier Transform.&amp;nbsp; It is inclined towards visualizing the effects of certain programming commands, related to Fourier Transform, on the original image.&amp;nbsp; We simulated some methods to emphasize some important concepts needed in applying Fourier Transform to an image.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKyePYj6KJ4I85S5q4NmsnucO94WJFyMVa3gx0PJb8eoRYaMl36BdaXVUDnRStz9S2XKJrVe4Fcb0T87GlrESyUJdGYv3mWZzko3dFKZHxbs9EGz7BlD-He0VaoeHxFt0hNAHzsLC2fQ0/s640/collated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;313&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1: First row - original images, second row - fft of images, third row - fftshifted second row, last row - fft of fft of original images.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKyePYj6KJ4I85S5q4NmsnucO94WJFyMVa3gx0PJb8eoRYaMl36BdaXVUDnRStz9S2XKJrVe4Fcb0T87GlrESyUJdGYv3mWZzko3dFKZHxbs9EGz7BlD-He0VaoeHxFt0hNAHzsLC2fQ0/s1600/collated.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In Fig. 1, the subject images - the circle and the letter A in the top most layer were subjected to a 2D Fourier Transform which results to the set of images shown on the second layer.&amp;nbsp; The set of images on the third layer is the result of using &lt;i&gt;fftshift()&lt;/i&gt; to the images on the second layer.&amp;nbsp; The lowest layer represents the subject images after undergoing two successive 2D Fourier transformations.&lt;br /&gt;
&lt;br /&gt;
It is observed in the images after applying Fourier Transform that most of the values are located at the corners of the image.&amp;nbsp; When &lt;i&gt;fftshift()&lt;/i&gt; was applied to it, the diagonal quadrants of the images in the second layer were interchanged resulting to the images in the third layer.&amp;nbsp; Hence, the &lt;i&gt;fftshift()&lt;/i&gt; function corrects the redistribution of the quadrants after applying the 2D Fourier Transform to the original image.&lt;br /&gt;
&lt;br /&gt;
Observing the lowest layer in Fig. 1, it can be concluded that two successive application of 2D Fourier Transform to an image results to an inverted version of the image.&lt;br /&gt;
&lt;br /&gt;
Now, in the second part of the activity, the method of Convolution is introduced. &lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsEQIpaK-8DuE7_FyYQHsbRhN9RNWdakHWRZQOMeVeFEkBghVEPvUr681XuA_aKGwGtfL3NyW8DDsZmbTOFxQkL20W5jnKkWpYSCEzlepJi981O6tHQSTNkW-3Ts_Oax488FVpkmvXcs0/s400/concatenated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2: Convolution of circles with varying radius and the letters VIP.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsEQIpaK-8DuE7_FyYQHsbRhN9RNWdakHWRZQOMeVeFEkBghVEPvUr681XuA_aKGwGtfL3NyW8DDsZmbTOFxQkL20W5jnKkWpYSCEzlepJi981O6tHQSTNkW-3Ts_Oax488FVpkmvXcs0/s1600/concatenated.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Convolution, basically, is the combination of two objects (in our case - images) to obtain a resulting object having the characteristic of the two original objects smeared together.&lt;br /&gt;
&lt;br /&gt;
In Fig. 2, the top layer are circles with varying radius, the middle layer is the image to be convolved with the circles and the bottom layer shows the images of the convolution of the top and middle layers.&lt;br /&gt;
&lt;br /&gt;
It can be inferred here that the smaller the radius of the circle convolved with the other image, the bigger the distortion of the resulting image.&lt;br /&gt;
&lt;br /&gt;
In the third part of the activity we studied correlation.&amp;nbsp; Correlation is the process of of finding similarities between two signals.&amp;nbsp; In image processing, the method of correlation is a very powerful tool especially in matching algorithms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;208&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfNzHePe2eG-aOGfdXc2ei5NY8Fw2ExP-j4iIqGWqB9_QLHnH5bN-ZPIWyED8zMIW1ccpR120TlfyQvbDPPzFXs43nZRdOEUn-bOWACp5wBEuyWl7chmyBFeaCSqt0ZFI9Bs5nN3xjEL0/s640/concatenated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 3: Last column is the correlation of the characters in a phrase in the left column with the letter A in the middle column.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfNzHePe2eG-aOGfdXc2ei5NY8Fw2ExP-j4iIqGWqB9_QLHnH5bN-ZPIWyED8zMIW1ccpR120TlfyQvbDPPzFXs43nZRdOEUn-bOWACp5wBEuyWl7chmyBFeaCSqt0ZFI9Bs5nN3xjEL0/s1600/concatenated.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In Fig. 3, we can see the correlation between the image containing a phrase and the letter A.&amp;nbsp; It can be observed in the resulting image that at the locations of letter A&#39;s in the phrase, the correlation value is high.&amp;nbsp; This implies that the method can be utilized in rough searching of similarities between a template and an image.&lt;br /&gt;
&lt;br /&gt;
In the last part, we performed the method of &lt;b&gt;edge detection using the convolution integral&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8Tob0GY6-02hfmxMi5Af2zye8MvMh5hbD8Yz1XquAnRsTUmw8jG8aj9368FgMWMtjMw_UEsLrRADWcQD5QOdQ8wIzTCtOX7TCCuhWi8JXdlyuZzNd-b1fZQyeal9IjaNUxtUIuRpoDfo/s320/concatenated.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 4: Edge detection of patterns in the middle column with the letters VIP.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;We can observe here that in Fig. 4, the detection pattern when applied to the original image, the resulting image highlights the edges of the original image.&amp;nbsp; Also, the detection level vary depending on the detection pattern used.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;In this activity I would rate myself 10/10 for the complete results.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Source:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity Sheet for Activity 6 - Dr. Maricor Soriano&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/7294672324059592700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/07/entry-12-fourier-transform-model-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/7294672324059592700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/7294672324059592700'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/07/entry-12-fourier-transform-model-of.html' title='Entry 12:  Fourier Transform Model of Image Formation'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKyePYj6KJ4I85S5q4NmsnucO94WJFyMVa3gx0PJb8eoRYaMl36BdaXVUDnRStz9S2XKJrVe4Fcb0T87GlrESyUJdGYv3mWZzko3dFKZHxbs9EGz7BlD-He0VaoeHxFt0hNAHzsLC2fQ0/s72-c/collated.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-1638847209268293467</id><published>2010-07-06T10:38:00.032+08:00</published><updated>2010-09-26T11:31:45.803+08:00</updated><title type='text'>Entry 11:  Enhancement by Histogram Manipulation</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW5iSRUpYX8BQnrSX3rwiaetfGZN6Dd7a0uci6YF2zYpnliHPhINCPJgdgyNazqykVSf6O4W_mYBCjjPFd2G2ehhqJKTXlm2Yk2Ih7k2I41FDhFnCyUIgv85ftlFgXv8bu2XCpRaQnJTo/s1600/buddha.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW5iSRUpYX8BQnrSX3rwiaetfGZN6Dd7a0uci6YF2zYpnliHPhINCPJgdgyNazqykVSf6O4W_mYBCjjPFd2G2ehhqJKTXlm2Yk2Ih7k2I41FDhFnCyUIgv85ftlFgXv8bu2XCpRaQnJTo/s320/buddha.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 1: RGB image to be used for analysis&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Manipulation of pixel value distribution is a method of enhancing image&#39;s quality by adjusting the number of pixels having a certain pixel value to a desired distribution defined by the user.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
We performed manipulation on the distribution of pixel values of a sample image shown in Fig. 1.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The colored image was first converted into grayscale to assess the value associated for each of the pixels.&amp;nbsp; The original image shown in Fig. 1 is depicted in grayscale - Fig. 2.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
The grayscale version of the original image has its own characteristic pixel value distribution.&amp;nbsp; We computed the distribution of the pixel value and plotted the histogram of the values.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzFeWJtFpGI1qGgi0mH68Szo65QeQulin7U1P4G73y084JEb6h67th7m3b97QPzLczHghHHkj9WpDPyEgQT1doyKDNoe0JpKBBRBBvxYH3NV0t2c9S4IBhnsU9t1bAXEZ-hQcVwQBrmSQ/s1600/Buddha_gray.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzFeWJtFpGI1qGgi0mH68Szo65QeQulin7U1P4G73y084JEb6h67th7m3b97QPzLczHghHHkj9WpDPyEgQT1doyKDNoe0JpKBBRBBvxYH3NV0t2c9S4IBhnsU9t1bAXEZ-hQcVwQBrmSQ/s320/Buddha_gray.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 2: Grayscale image to be manipulated&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In Fig. 3, the histogram of the pixel values in the grayscale image is shown.&amp;nbsp; The histogram shows that there is a&lt;br /&gt;
&lt;br /&gt;
To start the enhancement of the image, we utilized the method of &lt;a href=&quot;http://en.wikipedia.org/wiki/Histogram_equalization&quot;&gt;histogram back projection&lt;/a&gt; to reassign the pixels of the image with new values in accordance with the user&#39;s specified pixel value distribution.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;As shown in Fig. 4, we used a uniform distribution as our target enhancement distribution for the image.&amp;nbsp; It is displayed in cumulative distribution.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp; &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg267nH17kY5bX1-XcSARjSfbtrYOcITu4F1twvMvun3hxqgt3iFt-TomFgMslzwPMiJ8zxLjbWASGNW6Q_EwVQ3SPGXNFuq5_xEagcHef9tXzE0wZqgBwDagAGdqSvShvJNXTF224f8v4/s320/set_random_cdf.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 4: Cumulative distribution of the uniform distribution&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;After applying the method of histogram back projection to the original grayscale image in Fig. 2, the resulting image is shown in Fig. 5.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXQA2cYUmPI33MAVO-X7TcFll2vOqX5z1e2S2v3vgrWL-OWHVbddSWfGtkQtQWfHMuBGLXQW-DceH4IDQo8n_ejDHI37TCoRN0xw8jiWkdFbUowUMAd_74TiPCjyQSWIfL8qZlN97sGaM/s320/Buddha_gray_random.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 5: Enhanced image using pixel values with uniform distribution&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Notice that after applying the method to the original grayscale image, the resulting image seems to look brighter and equalized. &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;The next thing that we did is to investigate the changes in the original grayscale image when it is to be subjected in histogram enhancement using a pseudo-Gaussian distribution of pixel values.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;We simulated a pseudo-Gaussian distribution histogram centered at 0.5 and has a spread of 0.2 as its parameters (Fig. 6).&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ht9QJer5J_oiXS9eHUkI9vFB81pJyo2O7aSPASLophNm05enih2uU3dv9_tiUNwvceLZdroKBjjTUqg4bXTajrwk-ZVyWhGSC0rX1zfzuvRTxEFFoJHDp5aLZnr9I_NELrXl6fSOhQk/s1600/random_image_cdf.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU-nkexZlJqOxAYMZD3mtiOzTj2t7z2h9tVCwXDRK2gnzKXzvISoxryFBnPjOL5FpZC5Uiq3Uk6qwYHVS5XN_kNH7jyBwBWz5yQ2QQolq7BYTGE-Tb4JO6VU38UyeVJ7wGfTWfRP3XzfE/s320/gaussian_pdf_0.5m_0.5s.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 6: pseudo-Gaussian distribution histogram for image enhancement&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;The CDF of the histogram in Fig. 6 is shown in Fig.7 which will be essential to perform the necessary image manipulation technique.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiywkms4HVy34gKeBIfp6FrG3EtKIyXvYOm_SGUsZwfRcy47cso_ljC35qDotdB8jubHtFJ8fqTORbROtxj29cNdSVYC3ZmpqT2uoAu0MTdFU0TvRZaLHpL9mDrsrnzUq1LhfzhHjkwUPo/s320/gaussian_image_cdf_0.5m_0.5s.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 7: Cumulative distribution of a pseudo-Gaussian distribution (0.5, 0.2)&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;The resulting image after using the pseudo-Gaussian distribution in the image histogram manipulation is shown in Fig. 8.&amp;nbsp; &lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp; &lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzihAoySv4g7eFPq_iv7qPDYmQDMhcK-0NNZN5nhr4P6ZhTKceHZAwqYs8RuRbLRW2V-Jkdti7i2lv5zlsmmUXV1FZjaKHPTH4vNwLDYFh2L4fZ48T3IB-EzMSkYwROKSiV5gPoVJNlVE/s320/Buddha_gray_gauss.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 8: Enhanced image using pseudo-Gaussian distribution.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;It is quite obvious in the result that the resulting image is depicted by pixel values that are distributed about a central pixel value.&amp;nbsp; The variation of the intensity across the entire image is less as a result of the histogram used in the back projection method.&amp;nbsp; The resulting CDF of the enhanced histogram simply follows the histogram of the desired distribution used in the back projection method (Fig. 9).&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp; &lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsNYGLgjB0S5UFrTEURTCdkyyrSDBHNHpyg7Bo9TplhUxvgbAbVojoQ5vWJzGQqhXG3gW59q99pqlJ6_fSuMq_sJBIpAxoat1efGFejjvk7xtE_je60I4_kIlMkjqVqu2ta-iuyT-Ics0/s320/gaussian_cdf_0.5m_0.5s.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 9: CDF of the enhanced image using the pseudo-Gaussian distribution.&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;This time around, we used GIMP which is an image editor to manipulate the original grayscale image.&amp;nbsp; GIMP has a functionality with the same concept as in histogram back projection which is the &lt;i&gt;&quot;adjust color curve&quot;&lt;/i&gt;.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;As seen in Fig. 10, by adjusting the &quot;before-after-intensity curve&quot;, the GIMP is capable of changing the pixel value distribution of the input image.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyqQHoYNmzMKWh2RrlwYpGJuqx1ERCsyQXooht0NZo_LgYysKIbPp-VNI6jattDZNTFwEWLZoTyowh6AeBRcjPeBuVWNgV33CBPHyVz816Y2nwKjWGLJtgRob1fj0v6S2uVa0zkarigPE/s640/Buddha_gray_GIMP_edit.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;640&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Figure 10: Image manipulation in GIMP using the &quot;adjust color curve&quot;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyqQHoYNmzMKWh2RrlwYpGJuqx1ERCsyQXooht0NZo_LgYysKIbPp-VNI6jattDZNTFwEWLZoTyowh6AeBRcjPeBuVWNgV33CBPHyVz816Y2nwKjWGLJtgRob1fj0v6S2uVa0zkarigPE/s1600/Buddha_gray_GIMP_edit.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Now, it must be realized that histogram back projection is a very powerful tool in image processing.&amp;nbsp; One of the possible applications of the method is when the raw image has a poor lighting, through histogram manipulation it is possible to remedy the problem.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyqQHoYNmzMKWh2RrlwYpGJuqx1ERCsyQXooht0NZo_LgYysKIbPp-VNI6jattDZNTFwEWLZoTyowh6AeBRcjPeBuVWNgV33CBPHyVz816Y2nwKjWGLJtgRob1fj0v6S2uVa0zkarigPE/s1600/Buddha_gray_GIMP_edit.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;In this activity I would give myself a 10/10 because even I posted this blog late&amp;nbsp; I was able to make all the necessary results.&amp;nbsp; Also, the important thing is that I learned a new GIMP functionality. :D&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/1638847209268293467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/07/entry-11-enhancement-by-histogram.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/1638847209268293467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/1638847209268293467'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/07/entry-11-enhancement-by-histogram.html' title='Entry 11:  Enhancement by Histogram Manipulation'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW5iSRUpYX8BQnrSX3rwiaetfGZN6Dd7a0uci6YF2zYpnliHPhINCPJgdgyNazqykVSf6O4W_mYBCjjPFd2G2ehhqJKTXlm2Yk2Ih7k2I41FDhFnCyUIgv85ftlFgXv8bu2XCpRaQnJTo/s72-c/buddha.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-7070411969101493263</id><published>2010-06-29T12:08:00.018+08:00</published><updated>2010-09-26T11:33:27.307+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Area calculation"/><category scheme="http://www.blogger.com/atom/ns#" term="Green&#39;s theorem"/><title type='text'>Entry 10:  Area Estimation of Images with Defined Edges</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Hello guys! I&#39;m back again.&amp;nbsp; This time, we are tasked to play around with a method for computing the area of closed curves with defined edges in images.&amp;nbsp; This exercise will make way for us to understand the capability and flexibility of image processing in useful applications like measuring the area of a lot defined in Google map.&amp;nbsp; Applying the computational method used in this activity, for example, in evaluating the extent of a catastrophic event such as forest fire using its aerial images; we can save a lot of resources as compared to actual evaluation of the place.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;FAQ&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What method can be used in evaluating the area of a figure with defined edge?&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;The Green&#39;s Theorem is the most utilized method in finding the area in this activity.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;What is Green&#39;s Theorem?&lt;/b&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Green&#39;s Theorem is a mathematical construct which relates the line integral of the contour of a figure to the area of the figure enclosed by that specific contour.&amp;nbsp; The Green&#39;s Theorem is mathematically represented by&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: right;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3dnLEO3wqRhr98LaKHkeUSyvhsjDgUWKQtT5dhwz8QHj57aAfQRJYS8BpfEx76yjj2Jz9O4uAaOaTrcAMOwnAet3Rtw1bQZvVwwgLgkHtYFBtoxEHyEGQs24MiayHjx5QMRafqyT-cDQ/s320/eq1.png&quot; /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; (1)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: right;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;b&gt;How can we use Green&#39;s Theorem to derive the area of a closed figure with defined edge?&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;From the Green&#39;s Theorem, the area of a continuous curve can be evaluated by the following equation&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: right;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGIHGvJuRYvB86OCjNjCNPr2838p5GY2Gcmg_HU_6YqYTcCKkTdqHNDn6TqlJxvF5qHJFD7rzRQlLf6nOH1rYhigvIQVXuk8sDNHPcdP4_5nLsmpGJsyAA8WkB6OXKP72oewamIWhqx7E/s1600/eq2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGIHGvJuRYvB86OCjNjCNPr2838p5GY2Gcmg_HU_6YqYTcCKkTdqHNDn6TqlJxvF5qHJFD7rzRQlLf6nOH1rYhigvIQVXuk8sDNHPcdP4_5nLsmpGJsyAA8WkB6OXKP72oewamIWhqx7E/s320/eq2.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (2)&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;In computational approach, this formula will be helpful after applying discretization method.&amp;nbsp; The discretized form of (2) is given by &lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: right;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitCj9ncBWDIIdiE34nuTq9ZLBNyBXcmQNpUOy5NI2KqdakwlNaa4lKuII_MPbQFeHXzEm3zhCFTaQQLIU9sCHSykSryj2DIIncwgRpm3x35D_jc5ssxtztxGRf18lZZ9wJL4pM0kClH8o/s1600/eq3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitCj9ncBWDIIdiE34nuTq9ZLBNyBXcmQNpUOy5NI2KqdakwlNaa4lKuII_MPbQFeHXzEm3zhCFTaQQLIU9sCHSykSryj2DIIncwgRpm3x35D_jc5ssxtztxGRf18lZZ9wJL4pM0kClH8o/s320/eq3.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (3)&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;This equation can now be used to create a programming algorithm to derive the area of a closed figure with defined edge. &lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Are the numerical calculations of the area accurate using the Green&#39;s Theorem method?&lt;/b&gt; &lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Applying the method to a circle wherein we know the actual analytic area, we can estimate the error produced by the method.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;First Test:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh39BqbVeRIKoBWuGRPxtMWg2j8789owO5q_hxrGWxpoxpbH3m_YH1UILTBATanajgwR9qmliA9yM5Q-TuGyyy7Tyr6VoRoUSBdkZcJ7gadZe3omyMG4slFstVaeR2mFFdBzi5P7BE17zg/s1600/circle200.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh39BqbVeRIKoBWuGRPxtMWg2j8789owO5q_hxrGWxpoxpbH3m_YH1UILTBATanajgwR9qmliA9yM5Q-TuGyyy7Tyr6VoRoUSBdkZcJ7gadZe3omyMG4slFstVaeR2mFFdBzi5P7BE17zg/s200/circle200.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Circle: r = 70 px&lt;/li&gt;
&lt;li&gt;Numerically computed area = 15, 071 px^2&lt;/li&gt;
&lt;li&gt;Analytically computed area = 15, 394 px^2&lt;/li&gt;
&lt;li&gt;Error = 2.10%&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Second Test:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDlbWizBibEMU-kR-SpAm_yQFHIfOIjQ-cbD-O2eRhDKPCSUkclHS0Ha4GOKi_PTEMrbDQ5jyQqNxleQx4c4YnjPrHWh8f60X-FELx2Mh804sA6mnwwWQcODFblQRm6WXgbl-XDqt8P6M/s1600/circle400.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDlbWizBibEMU-kR-SpAm_yQFHIfOIjQ-cbD-O2eRhDKPCSUkclHS0Ha4GOKi_PTEMrbDQ5jyQqNxleQx4c4YnjPrHWh8f60X-FELx2Mh804sA6mnwwWQcODFblQRm6WXgbl-XDqt8P6M/s320/circle400.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Circle: r = 140 px&lt;/li&gt;
&lt;li&gt;Numerically computed area = 60, 865 px^2&lt;/li&gt;
&lt;li&gt;Analytically  computed area = 61, 575 px^2&lt;/li&gt;
&lt;li&gt;Error = 1.15%&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Third Test:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEietMs-8qCd2BBcYnI5CHHU93e_eKjPXbJ0l14BQgDczuNhlGdj_ZnRvCPvm_muE2nrQ8-VkxayPdPBQ2OB0EK2pRA9loZF22aEHo9MakHo7G_34t6u96bQjwMWBHOO2T-82IB8Y9sJREg/s1600/circle800.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEietMs-8qCd2BBcYnI5CHHU93e_eKjPXbJ0l14BQgDczuNhlGdj_ZnRvCPvm_muE2nrQ8-VkxayPdPBQ2OB0EK2pRA9loZF22aEHo9MakHo7G_34t6u96bQjwMWBHOO2T-82IB8Y9sJREg/s400/circle800.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Circle: r = 280 px&lt;/li&gt;
&lt;li&gt;Numerically computed area = 244, 905 px^2&lt;/li&gt;
&lt;li&gt;Analytically  computed area = 246, 301 px^2&lt;/li&gt;
&lt;li&gt;Error = 0.57%&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;From the three tests, we can observe that as the pixel dimension of the object whose area is to be calculated is larger, then the error of the computed area using Green&#39;s Theorem decreases relative to its analytic area.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How can you apply the computation of area using Green&#39;s Theorem in daily life?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;One of its vast applications include the determination of area of a certain region in a map.&amp;nbsp; As an example, I chose to measure the area of the College of Science Administration Building using this method.&lt;/div&gt;&lt;br /&gt;
Map Calculation (College of Science Area):&lt;br /&gt;
Computed Area in pixels = 20852 px^2&lt;br /&gt;
&lt;br /&gt;
Scale:&lt;br /&gt;
0.934579439 ft/px&lt;br /&gt;
0.285714285 m/px&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Using the scaling factor taken from the scale accompanying the image of the map, we can approximate the area of the CS by simply multiplying the scaling factor with the calculated value returned by the Green&#39;s method.&lt;/div&gt;&lt;br /&gt;
Approximated Land Area of CS = 5, 957.71 m^2&lt;br /&gt;
Actual Land Area&amp;nbsp; = ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjx-j01VGqr0Rs_ujwfE6qLh_5zmaBk60Lrxj4KHa7rICb_6S0k5ZBJ4RBd2hqKRLA3_Ryio61ar04gGt4dmZJMqqTWdEnXTEPiISmVSbEmorJr3N2tkyNThPujgkQDXAW1LliueG2ebs/s1600/cs_google_map.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;491&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjx-j01VGqr0Rs_ujwfE6qLh_5zmaBk60Lrxj4KHa7rICb_6S0k5ZBJ4RBd2hqKRLA3_Ryio61ar04gGt4dmZJMqqTWdEnXTEPiISmVSbEmorJr3N2tkyNThPujgkQDXAW1LliueG2ebs/s640/cs_google_map.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Image of the CS admin bulding taken from Google Maps!..&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Summing up everything discussed in this How-To++, we can say that the Green&#39;s method offers a convenient way of calculating the area of a region shown in a map.&amp;nbsp; This is quite a resourceful and less rigorous approach to measuring area of regions with defined edges.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;It must also be noted that the larger the size of the region in pixels the more accurate the result of the area measurement.&amp;nbsp; Thus, the converse of the event must be taken with high caution.&amp;nbsp; Take into consideration that if you dealt with a region with a small pixel area, the resulting measurement has a high margin of error which may lead to wrong conclusions.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;In finality, I want to consider treating myself a 12/10 for this activity for the effort I expended in putting things together and tried to be creative (A simple FAQ outline) in presenting this blog... :)&lt;/div&gt;&lt;br /&gt;
Source:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Activity Sheet for Activity 4 - Dr. Maricor Soriano&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Google Maps</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/7070411969101493263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/06/entry-10-area-estimation-of-images-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/7070411969101493263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/7070411969101493263'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/06/entry-10-area-estimation-of-images-with.html' title='Entry 10:  Area Estimation of Images with Defined Edges'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3dnLEO3wqRhr98LaKHkeUSyvhsjDgUWKQtT5dhwz8QHj57aAfQRJYS8BpfEx76yjj2Jz9O4uAaOaTrcAMOwnAet3Rtw1bQZvVwwgLgkHtYFBtoxEHyEGQs24MiayHjx5QMRafqyT-cDQ/s72-c/eq1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-3300872710158797687</id><published>2010-06-25T19:29:00.027+08:00</published><updated>2010-06-28T02:32:17.421+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="image formats"/><category scheme="http://www.blogger.com/atom/ns#" term="image type"/><title type='text'>Entry 9: Image Types and Formats</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Images are all around us!  When we open our beloved desktops, laptops, phones and other graphical devices, they are the first things that we can see.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
Because of the ubiquitousness of images, we often neglect many of the  attributes and the complexity of producing one.  In this activity  (Activity 3), we were tasked to devote some time on researching about  the details of different image formats and types.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Amazingly, I was so surprised that many available image formats are available in the open yet I didn&#39;t know they exist at all (thanks a lot to this activity because I learned some new things again).&amp;nbsp; Indeed, there are lots of things that I would like to discuss regarding images after researching about its different file formats, types, and other technical yet useful and informative issues.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Images come in different (basic) types namely;&amp;nbsp; binary, grayscale, truecolor and indexed images.&amp;nbsp; These types of images are distinct in a way of how image pixels are represented.&amp;nbsp; Some types are discussed belong including a brief summary of their properties (this was derived using the command &lt;i&gt;imfinfo()&lt;/i&gt; in scilab with SIP toolbox loaded.)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Image types (Basic):&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Binary Image - characterized by a bit-sized pixel value (i.e. each pixel is allowed to take only a value of 0 or 1).&amp;nbsp; These pixel values only represent black and white and are commonly used in document images.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL1AG1kNIftKJ_aX8f0jcCxVsD9Q0KHlX-1kf3DgMwPDeONQZdU_ewxjhCJmGp2ep9Td19pMqbnrf1rGJ2ZNfy6SmB8zHv-slA9attw6-tfTwMLR0FNR51zfy5GovhoDIz9TR9WHne-zc/s1600/black_and_white_cats-1541.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL1AG1kNIftKJ_aX8f0jcCxVsD9Q0KHlX-1kf3DgMwPDeONQZdU_ewxjhCJmGp2ep9Td19pMqbnrf1rGJ2ZNfy6SmB8zHv-slA9attw6-tfTwMLR0FNR51zfy5GovhoDIz9TR9WHne-zc/s320/black_and_white_cats-1541.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://images.free-extras.com/pics/b/black_and_white_cats-1541.jpg&quot;&gt;Binary image&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
FileSize: 14756&lt;br /&gt;
Format: JPEG&lt;br /&gt;
Width: 400&lt;br /&gt;
Height: 333&lt;br /&gt;
Depth: 8&lt;br /&gt;
StorageType: truecolor&lt;br /&gt;
NumberOfColors: 0&lt;br /&gt;
ResolutionUnit: inch&lt;br /&gt;
XResolution: 96.000000&lt;br /&gt;
YResolution: 96.000000&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Grayscale Image - represented by pixel value ranging from 0-255 (8-bit in binary or x00-xFF in hexadecimal.)&amp;nbsp; This type of image can represent variations in intensity because of its available intermediate values which differs in the binary image which is restricted only to 2 values.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-u-zHQx_-kDnQd8t6LBOm3p6Aw28E-zHdDySNoBFCrS3TcOI1k7cjJTlUFLpLtofBB9A8lit9MDnXjGM7NIfeYY1JIIHYT-mEYhKilk-ruKsTXbX0IeyFiqJ616EA1Jlq7KkvgpMIc38/s1600/albert+einstein.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-u-zHQx_-kDnQd8t6LBOm3p6Aw28E-zHdDySNoBFCrS3TcOI1k7cjJTlUFLpLtofBB9A8lit9MDnXjGM7NIfeYY1JIIHYT-mEYhKilk-ruKsTXbX0IeyFiqJ616EA1Jlq7KkvgpMIc38/s320/albert+einstein.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh29A5xfwnGCAVCRnz1jxQHFDVI8SwjJhK6OMYYRVVweQfuuq9KBZYPSZeVGFCOH-Xt2HCsIaVc5Xys_3y4bbaZk5i_JZ92X25rwMesQ2JNXE21M7mVxftIHo0PAJWxxMUEA2BuAEidEt7u/s400/albert+einstein.bmp&quot;&gt;Grayscale Image&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
FileSize: 41126&lt;br /&gt;
Format: JPEG&lt;br /&gt;
Width: 400&lt;br /&gt;
Height: 391&lt;br /&gt;
Depth: 8&lt;br /&gt;
StorageType: truecolor&lt;br /&gt;
NumberOfColors: 0&lt;br /&gt;
ResolutionUnit: centimeter&lt;br /&gt;
XResolution: 72.000000&lt;br /&gt;
YResolution: 72.000000&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Truecolor Images - they are images composed of 24-bit valued pixels.&amp;nbsp; Method on how this image is formed is by overlaying three 8-bit/pixel matrices representing the intensity distribution for the Red, Green and Blue (RGB) components of the image.&amp;nbsp; This results to a rich image having a range of up to 16,777,216 million colors.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVhnznv-1RYJSNZiL_lu7y8ChLTdRAAXYGNJsZdxBC97YqpDl0dbWSavE94BhflQehFFHrqSx8pJx8PW3kO1Vc9hDrv64ae7_u1DPPA08NvvDF44Iirm0Xi-zGSturB4zzs2CcywtF4jk/s1600/truecolor.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVhnznv-1RYJSNZiL_lu7y8ChLTdRAAXYGNJsZdxBC97YqpDl0dbWSavE94BhflQehFFHrqSx8pJx8PW3kO1Vc9hDrv64ae7_u1DPPA08NvvDF44Iirm0Xi-zGSturB4zzs2CcywtF4jk/s320/truecolor.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://incisors.files.wordpress.com/2008/06/truecolor.jpg&quot;&gt;&amp;nbsp;Truecolor Image&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
FileSize: 189687&lt;br /&gt;
Format: JPEG&lt;br /&gt;
Width: 500&lt;br /&gt;
Height: 493&lt;br /&gt;
Depth: 8&lt;br /&gt;
StorageType: truecolor&lt;br /&gt;
NumberOfColors: 0&lt;br /&gt;
ResolutionUnit: inch&lt;br /&gt;
XResolution: 72.000000&lt;br /&gt;
YResolution: 72.000000&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Indexed Images - this type of image is characterized by the mapping of index values representing the image&#39;s colors to a colormap all contained in the image file.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9FdGzVAYcP_4jOn4FdVgW9d8mjENuStVPH3mOdbUd200SBXCxPa_GdZOr25mwCYY8y_Pb9NgIS4xEtiuKRMMlBAe-Z6xZBnSQcvjbh9gLztQsmRd2mHwiYrwPY9KHrOrXoLRxOzlk17E/s1600/SonicBigAni.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9FdGzVAYcP_4jOn4FdVgW9d8mjENuStVPH3mOdbUd200SBXCxPa_GdZOr25mwCYY8y_Pb9NgIS4xEtiuKRMMlBAe-Z6xZBnSQcvjbh9gLztQsmRd2mHwiYrwPY9KHrOrXoLRxOzlk17E/s320/SonicBigAni.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://www.dan-dare.org/dan%20sonic/SonicBigAni.gif&quot;&gt;&amp;nbsp;Indexed Image&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;FileSize: 33273&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Format: GIF&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Width: 290&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Height: 360&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Depth: 8&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;StorageType: indexed&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;NumberOfColors: 256&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;ResolutionUnit: centimeter&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;XResolution: 72.000000&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;YResolution: 72.000000 &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Image Types (Complex):&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt; High-Dynamic Range (HDR) Images - extended version of grayscale having a higher range of allowed pixel value ranging from 10-bit to 16-bit.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjspcnhFj0g1h-qk4M6vXkVrvNafD2fDQS9iety59yRGcZsiGk92KXtbkMrIABEkpFtDsFT8Auydnve5EPK38GlgkgTbG8Ha41Ux0z7mESkW-D40oL46_Ne3R8_MpOpK_NpSYmaq_X-OrI/s1600/explanation-_high-dynamic-range_-photography-800X800.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjspcnhFj0g1h-qk4M6vXkVrvNafD2fDQS9iety59yRGcZsiGk92KXtbkMrIABEkpFtDsFT8Auydnve5EPK38GlgkgTbG8Ha41Ux0z7mESkW-D40oL46_Ne3R8_MpOpK_NpSYmaq_X-OrI/s320/explanation-_high-dynamic-range_-photography-800X800.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://i.ehow.com/images/a02/8d/kf/explanation-_high-dynamic-range_-photography-800X800.jpg&quot;&gt;High-Dynamic Range Image&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Multi or Hyperspectral Image -&amp;nbsp; this image type is more sophisticated than a truecolor because it is a result of overlaying not only 3 matrices of color values but at least 10 bands of colors and that gives it its eerie look (just joking).&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGlOC8qr-390QbBw12v3o-RuebToczsJ3TboSMhj4ay8PH3mITzjjOEJVG_BphkPITY3V1vDjGSeFLVz1KppNTWSyqgy2pujed1gnNG91E40KHrAYMeNDtvLm21k5_Upu7WB4c-ptwLwQ/s1600/hyperspectral.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGlOC8qr-390QbBw12v3o-RuebToczsJ3TboSMhj4ay8PH3mITzjjOEJVG_BphkPITY3V1vDjGSeFLVz1KppNTWSyqgy2pujed1gnNG91E40KHrAYMeNDtvLm21k5_Upu7WB4c-ptwLwQ/s320/hyperspectral.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.itc.nl/isprsc7/symposium/images/hyperspectral.jpg&quot;&gt;&lt;span id=&quot;goog_1495540643&quot;&gt;&lt;/span&gt;Multi or Hyperspectral Images&lt;span id=&quot;goog_1495540644&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;3D Images - this image type is practically complex starting from how its created until how 3D images are to be viewed.&amp;nbsp; The most common way of recording a 3D image is by &lt;a href=&quot;http://en.wikipedia.org/wiki/Stereoscopy&quot;&gt;stereoscopy&lt;/a&gt; and these images can be viewed using special 3D glasses.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRDEVuODKFppA9jLKyoVPIXOiXVJGwfdih4QZm-ot06zJj9c2PT0qtRoxmegn8f-zGU_0NjnbHYDWnhkJDENQtZjkETw9_8Q5IYpmhyyl4sEYSrzcjAqloKmEZAjLY0Nb4slcaGOrPvmE/s1600/DINOS+diy.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRDEVuODKFppA9jLKyoVPIXOiXVJGwfdih4QZm-ot06zJj9c2PT0qtRoxmegn8f-zGU_0NjnbHYDWnhkJDENQtZjkETw9_8Q5IYpmhyyl4sEYSrzcjAqloKmEZAjLY0Nb4slcaGOrPvmE/s320/DINOS+diy.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.3dimages.co.uk/gallery/v/3d_animals/DINOS+diy.jpg.html&quot;&gt;&amp;nbsp;3D Images&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This time, let&#39;s try to have some image processing using Scilab.&amp;nbsp; Honestly, I am amazed how easy Scilab deals with stuff regarding images.&amp;nbsp; You can do things in just a single command.&amp;nbsp; But Python is still the Number 1!&amp;nbsp; Going on, we processed a truecolor image by converting it into a binary image and grayscale image and checked whether how conversion affects the resulting image.&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Original Image&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFwfshqf-7J6Gk6zh1NagYbA0shjFctd2L0AB2LfNesY7B23Q3jtm7m3ssTkiA5Bub2ZsM5mSnFcL7MB9VM_jG0Oz63uUEcC_gBWOyiSzbxq3ZxIbKWiIohdzY3nfPRyQfAt9a0MGrNBo/s1600/nature.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFwfshqf-7J6Gk6zh1NagYbA0shjFctd2L0AB2LfNesY7B23Q3jtm7m3ssTkiA5Bub2ZsM5mSnFcL7MB9VM_jG0Oz63uUEcC_gBWOyiSzbxq3ZxIbKWiIohdzY3nfPRyQfAt9a0MGrNBo/s320/nature.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;i&gt;//code snippet&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;i&gt;I = imread(&#39;nature.jpeg&#39;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;size(I) &lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;ans =&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 300.&amp;nbsp;&amp;nbsp;&amp;nbsp; 400.&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Binary Image Version&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh36lJqf5GYeb_Pdh6gZcdzoIZmv66FAtz7SUOZoFRMnBnZOD1qVQ9mOnyCWyYfRx7upIL18Gi1ho5WUPX3n-iW2X55JnbEBkZaVrc8bwy9ygs_ODd7-HyBYc_r3GfwKTO4Pzr4XrVql9E/s1600/bw_nature_th_0.48.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh36lJqf5GYeb_Pdh6gZcdzoIZmv66FAtz7SUOZoFRMnBnZOD1qVQ9mOnyCWyYfRx7upIL18Gi1ho5WUPX3n-iW2X55JnbEBkZaVrc8bwy9ygs_ODd7-HyBYc_r3GfwKTO4Pzr4XrVql9E/s320/bw_nature_th_0.48.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;i&gt;BW = im2bw(I, 0.48); //converts truecolor to binary image&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;i&gt;size(BW)&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;i&gt;ans =&amp;nbsp;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 300.&amp;nbsp;&amp;nbsp;&amp;nbsp; 400. &lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Grayscale Image Version&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDxS3ZUUk43-v-VQGyNWfkUpiLKEI7uhO7hpw2LZInfa0zytcakLFW8FpEmDQcRSgkvqaL_-FmMzWEJ8m3E7rAfNbkUIuRr2LRevUQa9XI3a1dtPxWMDTNiZyS0RDKgQyGscw6XmxJYyw/s1600/gray_nature.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDxS3ZUUk43-v-VQGyNWfkUpiLKEI7uhO7hpw2LZInfa0zytcakLFW8FpEmDQcRSgkvqaL_-FmMzWEJ8m3E7rAfNbkUIuRr2LRevUQa9XI3a1dtPxWMDTNiZyS0RDKgQyGscw6XmxJYyw/s320/gray_nature.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GR = im2gray(I); //converts truecolor to grayscale&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;size(GR)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;ans =&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 300.&amp;nbsp;&amp;nbsp;&amp;nbsp; 400.&amp;nbsp;&lt;/i&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;We can infer from the output of the command &lt;i&gt;size()&lt;/i&gt; that the conversion from truecolor to either binary or grayscale flattens the image matrix.&amp;nbsp; Note that the returned value in truecolor is 3-dimensional array while after conversion, it only consisted of a 2-dimensional array.&amp;nbsp; The dimension which was lost during conversion represented the channels in the truecolor image.&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Our next task was to manipulate the image used in Activity 1.&amp;nbsp; I visited my archive for Activity 1 to search for my digitized hand-made graph and tried to separate the data from the background plus other noise using image processing.&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;First I imported the image to Scilab.&lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I = imread(&#39;old_graph.png&#39;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imshow(I, [])&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black; text-align: center;&quot;&gt;&lt;i&gt; &lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZH9j3dsYTb6dxwzYVLbkstX4aN3mVXzHK3dwrQanM1aE7FME-kx_L1F8qJDD-a5NmDtqM7wEN2-ee-kqKwafJbwzKFfwHmICWXtQc74UYw2tpKV-b9nazPoJXlMPcPzxbERHTpGEMzOk/s1600/old_graph.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZH9j3dsYTb6dxwzYVLbkstX4aN3mVXzHK3dwrQanM1aE7FME-kx_L1F8qJDD-a5NmDtqM7wEN2-ee-kqKwafJbwzKFfwHmICWXtQc74UYw2tpKV-b9nazPoJXlMPcPzxbERHTpGEMzOk/s320/old_graph.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: black; text-align: center;&quot;&gt;&lt;i&gt; &lt;/i&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;I converted the image into grayscale.&lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GR = im2gray(I);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imshow(GR, [])&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhWJwu2sht7RXkKWeNQP_luqlfcEfXldYBCKCaPJ5WRMFLACIo4aiSmrovMaUgbuZCSP3N8K1909GvAm2h6HQXJjMXL6pWbhrGFQgK1k2vitGh2eMRpiSv4Rlq2ufyj0HWT25o7iKYwM0/s1600/gray.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhWJwu2sht7RXkKWeNQP_luqlfcEfXldYBCKCaPJ5WRMFLACIo4aiSmrovMaUgbuZCSP3N8K1909GvAm2h6HQXJjMXL6pWbhrGFQgK1k2vitGh2eMRpiSv4Rlq2ufyj0HWT25o7iKYwM0/s320/gray.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;The histogram of pixel values was taken.&lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; histplot(linspace(0, 1, 256), GR)&lt;/i&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi3b_UfUWa5EeLwGOFLfSWuPqeV67V90tGx84HaDLCtfVYr8b1ot14ZE_SMaJ087AULdQ0-eqK58YaAc9xVMX1iR7blwW4wQhAfuPT6lQOp8jJeiuGDSbmE5G2_HUlwWZ2mUIBPfwHzWQ/s1600/histogram.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi3b_UfUWa5EeLwGOFLfSWuPqeV67V90tGx84HaDLCtfVYr8b1ot14ZE_SMaJ087AULdQ0-eqK58YaAc9xVMX1iR7blwW4wQhAfuPT6lQOp8jJeiuGDSbmE5G2_HUlwWZ2mUIBPfwHzWQ/s320/histogram.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;I used the detail from the histogram to find a suitable threshold value in converting to binary image.&lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BW = im2bw(I, 0.58);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imshow(BW, [])&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFvxsHjMlDnaxr4YjShLdQCAVUsP1tL1dCBjSJQIwecNybIyPY4hXRq-hbse5kBMmCEIvxXJ2_f83dwkgCnfVCS8C7_VgHQJjVFGer4U-kEiyev7p8uWJPA5vAdbPcHp90B81IN4NHb2A/s1600/threshold_0.58.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFvxsHjMlDnaxr4YjShLdQCAVUsP1tL1dCBjSJQIwecNybIyPY4hXRq-hbse5kBMmCEIvxXJ2_f83dwkgCnfVCS8C7_VgHQJjVFGer4U-kEiyev7p8uWJPA5vAdbPcHp90B81IN4NHb2A/s320/threshold_0.58.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Now, I was able to separate and remove noise from the actual data curve.&amp;nbsp; The next thing to do is to search for image formats and discuss things about them.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Image formats:&lt;/div&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;JPEG or JPG (Joint Photographic Experts  Group) - the most widely used of the available image formats.&amp;nbsp; Most digital cameras are set to have this image compression format.&amp;nbsp; This is highly flexible since the user can choose the compression level which determines the proper trade off between quality and size. &lt;/li&gt;
&lt;/ul&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;GIF (Graphics Interchange Format)  - an 8-bit color image compression format widely used in the internet because of its portability and has a relatively acceptable quality but not so large file size.&amp;nbsp; This image format utilizes a lossless image compression.&lt;/li&gt;
&lt;/ul&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;PNG (Portable Network Graphics) - an improved version of the GIF format  which supports 24-bit colors as opposed to GIF which only has 8-bits.&amp;nbsp;  PNG utilizes a lossless compression method which preserves the image  quality.&amp;nbsp; The PNG is celebrated for it is an open source image format. &lt;/li&gt;
&lt;/ul&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;BMP (Bitmap) - widely used in Microsoft Windows OS.&amp;nbsp; They are easy to handle but it&#39;s not compressed and as a consequence, it has a large file size. &lt;/li&gt;
&lt;/ul&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;TIFF (Tagged Image File Format) - this file format is highly accepted in photography.&amp;nbsp; It is commonly compressed in lossless type but can sometimes be lossy.&amp;nbsp; It is usually comprised of 24-bit or 48-bit color values.&amp;nbsp; This format is usually intended for images having important details (scientific and document imaging).&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;To sum things up, I would rate myself a 10 because I have properly perform all the required stuff.&amp;nbsp; I learned a lot also from this activity, indeed I really do appreciate images now!&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;References:&lt;/div&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;Dr. Maricor Soriano - Image Types and Formats (Handout)&lt;/li&gt;
&lt;li&gt;Wikipedia&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;http://en.wikipedia.org/wiki/Image_format&lt;/li&gt;
&lt;li&gt;http://en.wikipedia.org/wiki/JPEG&lt;/li&gt;
&lt;li&gt;http://en.wikipedia.org/wiki/Tagged_Image_File_Format&lt;/li&gt;
&lt;li&gt;http://en.wikipedia.org/wiki/Portable_Network_Graphics&lt;/li&gt;
&lt;li&gt;http://en.wikipedia.org/wiki/Graphics_Interchange_Format&lt;/li&gt;
&lt;li&gt;http://en.wikipedia.org/wiki/BMP_file_format&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/3300872710158797687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/06/entry-9-image-types-and-formats.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/3300872710158797687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/3300872710158797687'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/06/entry-9-image-types-and-formats.html' title='Entry 9: Image Types and Formats'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL1AG1kNIftKJ_aX8f0jcCxVsD9Q0KHlX-1kf3DgMwPDeONQZdU_ewxjhCJmGp2ep9Td19pMqbnrf1rGJ2ZNfy6SmB8zHv-slA9attw6-tfTwMLR0FNR51zfy5GovhoDIz9TR9WHne-zc/s72-c/black_and_white_cats-1541.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-1946041892024819040</id><published>2010-06-22T10:24:00.018+08:00</published><updated>2010-06-28T02:36:51.340+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Diffraction"/><category scheme="http://www.blogger.com/atom/ns#" term="Digital aperture"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Scilab"/><title type='text'>Entry 8:  Digital Aperture, Scilab, Python and Diffraction</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;The activity&#39;s objectives are generating digital versions of physical apertures and familiarize with the capabilities of Scilab for image generation and manipulation.&lt;br /&gt;
&lt;br /&gt;
When I was doing this activity, an idea came to me.  I remembered that the Fraunhofer diffraction of an aperture is the fourier transform of the transmittance function.  In context, the transmittance function in real world experiments is simply the same as the things we&#39;re making (only digital versions).&lt;br /&gt;
&lt;br /&gt;
But before going too much about fourier transform, the task was to make 5 patterns, namely; square, sinusoid along the x-axis, a grating in the x-axis, an annulus and an aperture with gaussian transmittance.&lt;br /&gt;
&lt;br /&gt;
Dr. Soriano gave us a gist of how things should be done.  She wrote for us a code to generate a circular pattern.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;Fig 1:  Circular aperture &lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilLKfSBoVGdNV_qxGA35ig2LdNI-KjGyjFB0SCKCiBV54Et4am_tmbiLDyrbCc8R9Y2Z2TaV9Z9fJg0xj5f02Gz8SzKW4XvHEYnqMGlmyuyUURT6RYy4URae2QITe3kuOh4o8MaqSnRFY/s1600/circle.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5485629368471908978&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilLKfSBoVGdNV_qxGA35ig2LdNI-KjGyjFB0SCKCiBV54Et4am_tmbiLDyrbCc8R9Y2Z2TaV9Z9fJg0xj5f02Gz8SzKW4XvHEYnqMGlmyuyUURT6RYy4URae2QITe3kuOh4o8MaqSnRFY/s320/circle.png&quot; style=&quot;cursor: pointer; float: right; height: 200px; margin: 0pt 0pt 10px 10px; width: 200px;&quot; /&gt;&lt;/a&gt;//circle&lt;/div&gt;nx = 500; ny = 500;&lt;br /&gt;
x = linspace(-1,1,nx);&lt;br /&gt;
y = linspace(-1,1,ny);[X,Y] = ndgrid(x,y);&lt;br /&gt;
r = sqrt(X.^2 + Y.^2);&lt;br /&gt;
A = zeros(nx,ny);&lt;br /&gt;
A(find(r&amp;lt;0.5))=1;&lt;br /&gt;
imshow(A,[]);&lt;br /&gt;
imwrite(A, &#39;circle.png&#39;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;So the other apertures I created are the following (Fig 2.):  &lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;Square Aperture (Upper Left)&lt;br /&gt;
Sinusoidal Filter (Upper Right)&lt;br /&gt;
Grating (Center)&lt;br /&gt;
Annulus (Lower Left)&lt;br /&gt;
Gaussian Filter (Lower Right)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;Fig 2:  Digital apertures and filters&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMSYjXDx70p0pTVMvW_ujmeOjC9tlcLxkt79ec4oCaxCD2i-_8UNMlboIs0AJYqigxw3-7ZFgW8C52pDQmqxH3bMIloJSX8IcUjDyd_JRlg9HJIeKLmqrppTylX28VWSBpvuEJIVoGQSA/s1600/picsp.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5485641164925612962&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMSYjXDx70p0pTVMvW_ujmeOjC9tlcLxkt79ec4oCaxCD2i-_8UNMlboIs0AJYqigxw3-7ZFgW8C52pDQmqxH3bMIloJSX8IcUjDyd_JRlg9HJIeKLmqrppTylX28VWSBpvuEJIVoGQSA/s400/picsp.png&quot; style=&quot;cursor: pointer; display: block; height: 400px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqigXBBsLFIDyfkCxWcorkTvGpfaXwtXSesP0eWKIsDyD04IJfoD47jWRZBvXZdNWdoDWQI2nkusOEYuD9lujruMbjUDOlkP1urP_Bvx9TpoIR8AOzCzyUu_VZCL9z2QuRPewmRgeI2vk/s1600/pics.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2FV46WBhCSfu6sKqC11zs4YhcNbqnKqJqvv1_h8lddOfU65xUnteI_hTzj4U5QDghpuC13Hl37WQVp_RaCZG-Epc36JJKmfVXBvvSmD502NxiMRsKo9vBvxDG-jWDJSizoliNryFFuKk/s1600/pics.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;After generating the images above, I tried to find their resulting fourier transforms.  The resulting image after taking the fourier transform of the original image would have a physical equivalent of the aperture&#39;s diffraction pattern at large distances (Fraunhofer Diffraction).&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The resulting patterns are the following (Fig. 3):&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Diffraction Pattern of a Square Aperture (Upper Left)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Diffraction Pattern of a Sinusoidal Filter (Upper Right)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Diffraction Pattern of a Grating  (Center)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Diffraction Pattern of a Annulus (Lower Left)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Diffraction Pattern of a Gaussian Filter (Lower Right)&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;Fig. 3:  Fraunhofer Diffraction Patterns for each aperture/filter&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia8Bv2gAArH2dnegsaZMt5P6oZA6jJiAdWyv49kLhv7tfZMutfQvpd95w27U5Bj2rTWBU8nz9UM5oPzPDCOnA203zx8H5RJGwuuZSpD2zEOL0dCQPTTZwFSGU2SWdPSAGsKXIhwQ3MUaM/s1600/picsfft.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5485641099158745282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia8Bv2gAArH2dnegsaZMt5P6oZA6jJiAdWyv49kLhv7tfZMutfQvpd95w27U5Bj2rTWBU8nz9UM5oPzPDCOnA203zx8H5RJGwuuZSpD2zEOL0dCQPTTZwFSGU2SWdPSAGsKXIhwQ3MUaM/s400/picsfft.png&quot; style=&quot;cursor: pointer; display: block; height: 400px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;For this activity, I would rate myself a 12.  I think, I have attained the objectives of this activity satisfactorily.  I have finished all the required outputs and I extended the study to cover its applications (simulation of Fraunhofer Diffraction for each aperture/filter).  I also wrote the corresponding Python codes for the generation of the same images (Appendix 2).&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Appendix 1 (Scilab Codes):&lt;br /&gt;
&lt;br /&gt;
//square&lt;br /&gt;
nx = 500; ny = 500;&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;
del = 0.05;&lt;br /&gt;
xr = (X&amp;gt;-del). * (X&lt;del); yr=&quot;(Y&quot;&gt;-del). * (Y&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;&amp;lt;0.1))=0;&amp;gt;0.2))=0;&lt;br /&gt;
imshow(A,[]);&lt;br /&gt;
imwrite(A, &#39;annulus.png&#39;)&lt;br /&gt;
&lt;br /&gt;
//gaussian&lt;br /&gt;
nx = 500; ny = 500;&lt;br /&gt;
x = linspace(-10,10,nx);&lt;br /&gt;
y = linspace(-10,10,ny);&lt;br /&gt;
[X,Y] = ndgrid(x,y);&lt;br /&gt;
r = sqrt(X.^2 + Y.^2);&lt;br /&gt;
r(find(r&amp;gt;=10))= 0;&lt;br /&gt;
A = exp(-(r.^2)/2);&lt;br /&gt;
A(find(A==1))= 0;&lt;br /&gt;
imshow(A,[]);&lt;br /&gt;
imwrite(A, &#39;gaussian.png&#39;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Appendix 2 (Python Codes):&lt;br /&gt;
&lt;br /&gt;
#circle&lt;br /&gt;
nx = 500; ny = 500; r = 0.5&lt;br /&gt;
X, Y = meshgrid(linspace(-1,1,nx),linspace(-1,1,ny))&lt;br /&gt;
A = zeros([nx, ny])&lt;br /&gt;
circ = sqrt(X**2+Y**2)&lt;br /&gt;
A[where(circ &amp;lt; r)] = 1&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;imshow(A)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;savefig(&#39;circle.png&#39;)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;#square nx = 500; ny = 500; cx = nx/2; cy = ny/2; r = 10&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;square = zeros([nx,ny])&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;square[cx-r:cx+r, cy-r:cy+r] = 1&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;imshow(square)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;savefig(&#39;square.png&#39;)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;#sinusoid nx = 500; ny = 500&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;sx = sin(linspace(-6*pi, 6*pi, nx))&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;X,Y = meshgrid(sx,linspace(-1,1,ny))&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;imshow(X)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;savefig(&#39;sinusoid.png&#39;)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;#grating nx = 500; ny = 500 inc = 20&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;A = zeros([nx, ny])&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;A[:,arange(0,nx,inc)] = 1&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;imshow(A)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;savefig(&#39;grating.png&#39;)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;  #annulus nx = 500; ny = 500; r1 = 0.1; r2 = 0.2&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;X, Y = meshgrid(linspace(-1,1,nx),linspace(-1,1,ny))&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;A = zeros([nx, ny])&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;circ = sqrt(X**2+Y**2)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;A[where(circ &amp;lt; r2)] = 1&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;A[where(circ &amp;lt; r1)] = 0&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;imshow(A)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;savefig(&#39;annulus.png&#39;)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;#gaussian nx = 500; ny = 500; r = 5&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;X, Y = meshgrid(linspace(-10,10,nx),linspace(-10,10,ny))&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;A = zeros([nx, ny])&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;circ = sqrt(X**2+Y**2)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;A[where(circ &amp;lt; r)] = 1&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;Z = exp(-circ**2/2)*A&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;imshow(Z)&amp;nbsp;&lt;/del);&gt;&lt;/del);&gt;&lt;br /&gt;
&lt;del); yr=&quot;(Y&quot;&gt;&lt;del); 2=&quot;&quot; a=&quot;zeros(nx,ny);&quot; annulus=&quot;&quot; end=&quot;&quot; for=&quot;&quot; grating=&quot;&quot; i=&quot;1:20:nx&quot; nx=&quot;500;&quot; ny=&quot;500;&quot; png=&quot;&quot; r=&quot;(xr.&quot; sinusoid=&quot;&quot; x=&quot;sin(linspace(-6*%pi,6*%pi,nx));&quot; y=&quot;linspace(-1,1,ny);&quot;&gt;savefig(&#39;gaussian.png&#39;)  &lt;/del);&gt;&lt;/del);&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/1946041892024819040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/06/entry-8-digital-aperture-and-scilab.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/1946041892024819040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/1946041892024819040'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/06/entry-8-digital-aperture-and-scilab.html' title='Entry 8:  Digital Aperture, Scilab, Python and Diffraction'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilLKfSBoVGdNV_qxGA35ig2LdNI-KjGyjFB0SCKCiBV54Et4am_tmbiLDyrbCc8R9Y2Z2TaV9Z9fJg0xj5f02Gz8SzKW4XvHEYnqMGlmyuyUURT6RYy4URae2QITe3kuOh4o8MaqSnRFY/s72-c/circle.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-1586286369022729645</id><published>2010-06-17T19:55:00.004+08:00</published><updated>2010-10-18T22:18:25.912+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data replication"/><category scheme="http://www.blogger.com/atom/ns#" term="Digital scanning"/><title type='text'>Entry 7: Applied Physics 186 - Activity 1 (Digital Scanning and Evaluation)</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;The rationale of this activity is to identify the actual physical values from digital graphs in scientific journals.  The advantage of performing this method is that it gives you a very close approximation to what the real/physical values shown in the graphs.  Also, with proper computational tools, one can derive the functional form of the curve itself; this further helps you in the analysis of the physical quantity you are concerned with.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The procedure starts by choosing a graph from a printed journal and followed by the digital conversion of the raw image (Fig. 1).&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAl5ihSDPkDUogWNq4mgClHg7aC3m0hve5BQ5A7jlDpxewsuRzBLFnsx4wkC3LyzlYmW-prVXmzJRFbUNvDx1ewosiiGiYp0ac4fl_w5WAyoUnZ_QoYg62yT71o1YC8mX2SmLipM4vfZE/s1600/fig1.png&quot; onblur=&quot;try  {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5483715746322101586&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAl5ihSDPkDUogWNq4mgClHg7aC3m0hve5BQ5A7jlDpxewsuRzBLFnsx4wkC3LyzlYmW-prVXmzJRFbUNvDx1ewosiiGiYp0ac4fl_w5WAyoUnZ_QoYg62yT71o1YC8mX2SmLipM4vfZE/s400/fig1.png&quot; style=&quot;cursor: pointer; display: block; height: 287px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;Fig. 1:  Digitized copy of the raw image from a printed journal&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
To know the corresponding physical value of any point on the curve, it is essential to determine the scaling factor of the pixel dimensions in x- and y-axis.  The scaling factor is equal to the span of two successive tick marks in pixel dimension relative to the absolute value of the difference between the physical values represented by the two tick marks.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;$\color{white}SF_i\ =\ \frac{\Delta (pv)_i}{\Delta (pd)_i}$&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;where $\color{white}SF_i$ is the scaling factor, $\color{white}\Delta (pv)_i$ is the absolute value of the difference of the physical value at the tick marks and $\color{white}\Delta (pd )_i}$ is the absolute value of the difference of the pixel locations of the tick marks.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;In the x-axis:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;Two successive tick marks are located at 2740 and 2273 and the &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;physical value associated to the two are 550 and 500, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;respectively.  Therefore, the scaling factor $\color{white}SF_x$ = 0.107nm/px&lt;br /&gt;
&lt;br /&gt;
Now to compute for the physical values in the graph, it must be considered that the location of the origin of the graph is not located at the origin of the image array.  Thus, find a strategic pixel location which will be your reference for further computation of the values and note this as X and Y.  In my case, I choose the location X = 876.946 px, and Y = 2851.77 px which represents the location for (350nm, -2).&lt;br /&gt;
&lt;br /&gt;
Arbitrarily get sufficient number of points from the curve by noting their pixel locations (x, y).  Use the equation below to generate the physical quantity of the point.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;$\color{white}P_x\ =\ R_x\ + SF_x (x\ -\ X)$&lt;br /&gt;
$\color{white}P_y\ =\ R_y\ + SF_y (Y\ -\ y)$&lt;/div&gt;&lt;br /&gt;
where $\color{white}P_x$ and $\color{white}P_y$ are the computed physical value, $\color{white}R_x$ and $\color{white}R_y$ are the physical value of the reference point (X , Y).  The x and y are the values of the pixel locations as noted beforehand.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Using Microsoft Excel, I plotted the results of the conversion of the point values and generated Fig. 2.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi96Rd3LOwdtGJNYP9hXpJ0OdobA-zlFgQBcWgWEPO6UkTVVfBtXazZy3lNpQOCy7-hcNRUtVPHHZsFM-bNDuKANOBZ8g_2krf42xLiABWjPlkKiUP6N-70zrzWMeKKbs4f3Qz0ITa6uI4/s1600/Fig3.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5483731823656720210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi96Rd3LOwdtGJNYP9hXpJ0OdobA-zlFgQBcWgWEPO6UkTVVfBtXazZy3lNpQOCy7-hcNRUtVPHHZsFM-bNDuKANOBZ8g_2krf42xLiABWjPlkKiUP6N-70zrzWMeKKbs4f3Qz0ITa6uI4/s400/Fig3.png&quot; style=&quot;cursor: pointer; display: block; height: 246px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;Fig. 2:  Reconstruction of the derived physical quantities from pixel values&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;To verify the &quot;validity&quot; of the conversion used, I superimposed the derived curve with the actual digitized image.  Ideally, when the two curves are nicely fitted; qualitatively, we can infer that the conversion of values is correct.  The superimposed image is shown in Fig. 3.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Vhgs3trx6MQYaqnXkXSVqV__cRqa9ar3_ygLYvuVJq3aXITODVuFzc8us4U0bVrRwDdy2xqfvyNseowx5akTdt2OA3azyrEx_f0QVPgLI4KA9gMsa4nSc2KqLdmKIJ2XzxFzpPJo9O0/s1600/Fig2.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5483733356816232786&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Vhgs3trx6MQYaqnXkXSVqV__cRqa9ar3_ygLYvuVJq3aXITODVuFzc8us4U0bVrRwDdy2xqfvyNseowx5akTdt2OA3azyrEx_f0QVPgLI4KA9gMsa4nSc2KqLdmKIJ2XzxFzpPJo9O0/s400/Fig2.png&quot; style=&quot;cursor: pointer; display: block; height: 244px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;Fig. 3:  Nicely fitted curves of the raw image and the graph of the converted data&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Basing from Fig. 3, the reconstruction made was good if not better, since it can be observed that the two curves almost overlap each other.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Things to do:&lt;/span&gt;  Use interpolation methods to find the polynomial form of the curve.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Self Evaluation&lt;/span&gt;:&lt;br /&gt;
&lt;br /&gt;
The activity was very refreshing and it made me realize that I have missed a lot of useful capabilities Microsoft Excel and OpenOffice Spreadsheet have to offer.  Now I have learned that you can embed an image in a graph as a background and use it as a reference.&lt;br /&gt;
Again, I was reminded that reading the instructions first will help you a lot; especially in saving time.&lt;br /&gt;
After everything, I would bravely rate myself a 12 because of the new things that I have learned and that I was able to accomplish essential things to finish this activity.&lt;br /&gt;
If I would have enough time, I will try to derive the polynomial relationship of the curve.  It could be done by using polynomial interpolation.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/1586286369022729645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/entry-7-applied-physics-186-activity-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/1586286369022729645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/1586286369022729645'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/entry-7-applied-physics-186-activity-1.html' title='Entry 7: Applied Physics 186 - Activity 1 (Digital Scanning and Evaluation)'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAl5ihSDPkDUogWNq4mgClHg7aC3m0hve5BQ5A7jlDpxewsuRzBLFnsx4wkC3LyzlYmW-prVXmzJRFbUNvDx1ewosiiGiYp0ac4fl_w5WAyoUnZ_QoYg62yT71o1YC8mX2SmLipM4vfZE/s72-c/fig1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-697336949515000137</id><published>2010-04-06T23:49:00.003+08:00</published><updated>2010-04-06T23:55:21.995+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bartlett or Triangle window"/><category scheme="http://www.blogger.com/atom/ns#" term="Hamming window"/><category scheme="http://www.blogger.com/atom/ns#" term="Hann window"/><category scheme="http://www.blogger.com/atom/ns#" term="window functions"/><category scheme="http://www.blogger.com/atom/ns#" term="windowing"/><title type='text'>Entry 6: Windowing of Signals</title><content type='html'>Hi!  I just want to share some stuff about applying window functions into a signal.  With the codes in this link, you can investigate the different effects introduced by each type of window functions (Hann, Hamming, and Bartlett/Triangle windows) to the spectrum of the signal.&lt;br /&gt;&lt;br /&gt;The codes and some figures can be downloaded here: (&lt;a href=&quot;http://rapidshare.com/files/372711449/windowing.zip&quot;&gt;http://rapidshare.com/files/372711449/windowing.zip&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Hope this helps!</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/697336949515000137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/entry-6-windowing-of-signals.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/697336949515000137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/697336949515000137'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/entry-6-windowing-of-signals.html' title='Entry 6: Windowing of Signals'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-2346824842755171967</id><published>2010-04-01T22:03:00.009+08:00</published><updated>2010-04-01T22:31:12.961+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adc converter"/><category scheme="http://www.blogger.com/atom/ns#" term="adc interface"/><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="parallel port interfacing"/><title type='text'>Entry 5: Compiled File and Source code for Interfacing an ADC0804 using a Parallel Port</title><content type='html'>Today was a busy day, yet productive one for me.  I, together with my groupmate Tino, was able to finalize our project which is an ADC converter interfaced using a Parallel Port.&lt;br /&gt;&lt;br /&gt;In lieu to this, I decided to share the enhanced C++ source code along with the compiled program for the benefit of everyone (Remember that the rationale for this blog is sharing!).&lt;br /&gt;&lt;br /&gt;Link: &lt;a href=&quot;http://rapidshare.com/files/370753131/ADC_interface.zip&quot;&gt;http://rapidshare.com/files/370753131/ADC_interface.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy!...</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/2346824842755171967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/entry-5-compiled-file-and-source-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/2346824842755171967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/2346824842755171967'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/entry-5-compiled-file-and-source-code.html' title='Entry 5: Compiled File and Source code for Interfacing an ADC0804 using a Parallel Port'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-5807789055372163344</id><published>2010-04-01T03:53:00.003+08:00</published><updated>2010-04-01T03:58:01.001+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ants"/><category scheme="http://www.blogger.com/atom/ns#" term="bees"/><category scheme="http://www.blogger.com/atom/ns#" term="encouragement"/><category scheme="http://www.blogger.com/atom/ns#" term="spiders"/><title type='text'>Entry 4: Story of the Ants and the Bees</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;I have read this passage from Yahoos!&#39;s featured stories after I logged out from my Yahoo! Mail, be encouraged!&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&quot;It was one of those days I did not wish to live again. I had been working for weeks to secure a deal that would give me a nice commission. Everything seemed to go perfectly and I had already been joking with co-workers what I would do with the extra income.&lt;/i&gt;&lt;/p&gt;&lt;div&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;I picked up the phone and called to the customer to get the deal finalized, only to hear that the recession had hit the company. My customer told me that half of the staff had been let go and that all purchases were put on hold.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;I had so concentrated on this deal that I had not worked much on my other customers and knew that instead of getting a big fat check I’d be having one of the smallest ones I had ever received.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;I just couldn’t stay at my desk. I got up and went to get some coffee. The cleaning lady was just washing the vending machine. I slumped to a chair and felt awful.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;“Bad day?” she asked.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;Startled, I looked up. The cleaning lady was looking at me.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;“You could say that again,” I sighed.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;“What is the matter?” she asked.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;She was a motherly type of a woman with kind eyes. I had seen her around for years but I never said a word to her really. And yet I suddenly found myself telling the whole pitiful story to her. She listened intently, finished cleaning the vending machine and nodded.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;“Your situation reminds me of my own father,” she said. “He was also a salesman, but not lucky enough to be able to sit in one office. He was a travelling salesman. You know: big suitcases and all. Vanished for weeks sometimes and came back with an empty bag, pay check and a big hug for us kids and mother.”&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;I looked at her, not knowing where she was going with this.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;“There was a time when he also lost a big sale. It was just before Christmas and he had to tell us children that there would be very few presents. We were disappointed, but he gathered us around him and told a story. I shall always remember those inspirational words. First, he asked us which animals we liked best. My answer was cats. My older brother liked dogs and my younger brother loved ponies. Then, he asked if we wanted to know which animals he admired the most and, of course, we did. The bees, the ants and the spiders, he told us.”&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;I lifted my eyebrows. The cleaning lady smiled.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;“Now, of course, we did not agree with him but asked why ever would he like such nuisances. Didn’t they bite or sting or just look plain ugly? He explained to us and his inspirational words have been my guideline ever since.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;“He said he liked the bees because if a bear breaks their nest and steals their honey, they keep on building their honeycombs, making more honey. And he liked the ants because if the same bear destroys their nest, they also immediately start building their nest anew, working together for a common goal. And he liked the spiders because if their webs are destroyed, they start repairing the damage right away — or building a whole new, better one.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;“He said that the lesson that he had learned from these little insects was that the world may surprise us sometimes by destroying even our most carefully-built plans but if we choose to be ready to start all over again no matter what, eventually we shall achieve great results. We shall just have to start again, one step at a time.”&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;At that, the cleaning lady nodded to me and pushed her cart out of the room.&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;  &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;I sat there for a while, thinking of what she had said. Then, I got up, walked back to my desk and started to build my next pay check, one customer at a time.&quot;&lt;/i&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;-http://ph.news.yahoo.com/star/20100331/tel-a-lesson-from-ants-and-bees-dd408b0.html&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/5807789055372163344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/i-have-read-this-passage-from-yahooss.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/5807789055372163344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/5807789055372163344'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/i-have-read-this-passage-from-yahooss.html' title='Entry 4: Story of the Ants and the Bees'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-2028591875850584892</id><published>2010-04-01T01:24:00.010+08:00</published><updated>2010-04-01T22:03:19.708+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="failed"/><category scheme="http://www.blogger.com/atom/ns#" term="gradient"/><category scheme="http://www.blogger.com/atom/ns#" term="vector"/><title type='text'>Entry 3: Did they FAIL?</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Two days ago, I passed by the Institute of Mathematics when I overheard two students discussing a topic for their exam.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Student 1&lt;/span&gt;:  Alam mo ba kung paano kunin ang (...referring to &lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;a solution to a problem)?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Student 2&lt;/span&gt;: Syempre, inaral ko &#39;yan kagabi.  Kunin mo lang &lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;ang &lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;gradient ng VECTOR&lt;/span&gt; para makuha mo yun &lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;(...referring to the solution).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In my mind, I felt uneasy thinking whether they passed the exam or not.&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/2028591875850584892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/entry-3-did-they-fail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/2028591875850584892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/2028591875850584892'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/04/entry-3-did-they-fail.html' title='Entry 3: Did they FAIL?'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-9191592098226247045</id><published>2010-03-28T15:27:00.006+08:00</published><updated>2010-03-29T01:19:25.593+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adware"/><category scheme="http://www.blogger.com/atom/ns#" term="autorun.inf"/><category scheme="http://www.blogger.com/atom/ns#" term="flash drive"/><category scheme="http://www.blogger.com/atom/ns#" term="malware"/><category scheme="http://www.blogger.com/atom/ns#" term="virus"/><title type='text'>Entry 2: How to save time scanning your removable Flash Drive from Virus</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Hey guys! I just want to share a very helpful precautionary measure that we can do for our beloved and susceptible computers running in Windows.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;As we all know, computer viruses have been quite a headache (sad to say, I&#39;m a victim of it now) and its fast propagation is commonly due to transfers from flash drives.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The basic mode of virus infection in flash drives is the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(255, 0, 0);&quot;&gt;autorun.inf&lt;/span&gt; file. This file, when altered by any type of harmful programs, automatically activates a command causing your system to be infested by naughty viruses, malwares, and adwares upon opening the flash drive.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;But the catch is, we may &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(51, 51, 255);&quot;&gt;&lt;b&gt;use the autorun.inf file for our own convenience&lt;/b&gt;&lt;/span&gt; of knowing whether our flash drives contain viruses.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Logically speaking, the autorun.inf may be manually created such that it would contain a &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&quot;Finger Print&quot;&lt;/span&gt; of the owner (i.e. an icon). Whenever this &quot;Finger Print&quot; is lost, its a sign that the drive is infected.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;How to do this:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 1:&lt;/b&gt; Choose an image you want to be your &quot;Finger Print&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuadwvN61mMAZS1KH0OeRsNa98Q5fBHYVWbrOf0LiwBMYOJponofQPaxlXmCPByRBV0oONaXerEugZOvwY1HH_jGAYNKg8NnIK0cmVE_xcCKRtYGb7cz0L3nVKanHJFKnThkC7KtSnbxI/s1600/images.jpg&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuadwvN61mMAZS1KH0OeRsNa98Q5fBHYVWbrOf0LiwBMYOJponofQPaxlXmCPByRBV0oONaXerEugZOvwY1HH_jGAYNKg8NnIK0cmVE_xcCKRtYGb7cz0L3nVKanHJFKnThkC7KtSnbxI/s320/images.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5453588887265386274&quot; style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 120px; height: 108px;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: center;&quot;&gt;Example: Warning.jpeg&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Step 2:&lt;/b&gt; Convert the image into a *.ico file. (&lt;a href=&quot;http://www.coolutils.com/Online/Image-Converter/&quot;&gt;http://www.coolutils.com/Online/Image-Converter/&lt;/a&gt;)&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 3:&lt;/b&gt; Open notepad (or any editor that may serve the purpose).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 4:&lt;/b&gt; Create an autorun.inf file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifuASQ-qV4gYaMqjNLrtW3t8QwDB1j4B_-qukRxRWO_jzAcCKyfPFZUDNTSARhcT-vpuSxv0X3dS-oS9D0LQSUmBsJ-sV1uvY6TXXXh8gQlBMbxpl6nR5qhKW41q-j-gFD48OOx5t4irs/s1600/autorun.jpg&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifuASQ-qV4gYaMqjNLrtW3t8QwDB1j4B_-qukRxRWO_jzAcCKyfPFZUDNTSARhcT-vpuSxv0X3dS-oS9D0LQSUmBsJ-sV1uvY6TXXXh8gQlBMbxpl6nR5qhKW41q-j-gFD48OOx5t4irs/s320/autorun.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5453591364584237522&quot; style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 308px; height: 157px;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;What does this mean?&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;[autorun]&lt;/span&gt; ------&gt; declares that the file is an autorun.inf file&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;icon = .\warning.ico&lt;/span&gt; ------&gt; specify the icon which you &lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;                                                         &lt;/span&gt;will use as &quot;Finger Print&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;                                                         &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(255, 0, 0);&quot;&gt;note: replace warning.ico with the &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;                                                                 &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(255, 0, 0);&quot;&gt;        name of your converted image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;label=Virus&lt;/span&gt; ------&gt; this will be your drive name.&lt;/div&gt;&lt;div&gt;&lt;replace&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 5:&lt;/b&gt; Save this as autorun.inf file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 6:&lt;/b&gt; Copy both the autorun.inf file you made along with the converted .ico image into your flash drive.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 7:&lt;/b&gt; Your Done!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;How it works:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Whenever you insert your healthy flash drive in your computer, it should show your &quot;Finger Print&quot; and thus, you are assured that your system is safe when you access your flash drive and you don&#39;t need to run any virus scans anymore (That saves time!). &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;On the other hand, when your flash drive gets infected by a virus, your personalized autorun.inf file gets overwritten by the virus-triggering autorun.inf file and so your &quot;Finger Print&quot; will not show indicating that your drive needs some cleanup before opening it.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Result:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;/replace&gt;&lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ1-P250qyYa3mYRlSzVYqw8FkLSYpn1YONjR-DdWKX1InwiKIRrl6mmJLU6jvXy9eX11hUSkNc59QeT1WDEG9aKPcgepHuNdAc2iucZ1oJanFaOSKSNHGetn6Q30qw_e2YYRa3UL-xGc/s1600/result.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 253px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ1-P250qyYa3mYRlSzVYqw8FkLSYpn1YONjR-DdWKX1InwiKIRrl6mmJLU6jvXy9eX11hUSkNc59QeT1WDEG9aKPcgepHuNdAc2iucZ1oJanFaOSKSNHGetn6Q30qw_e2YYRa3UL-xGc/s400/result.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5453602586639018066&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Hope this helps!&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/9191592098226247045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/03/entry-2-how-to-know-save-time-scanning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/9191592098226247045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/9191592098226247045'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/03/entry-2-how-to-know-save-time-scanning.html' title='Entry 2: How to save time scanning your removable Flash Drive from Virus'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuadwvN61mMAZS1KH0OeRsNa98Q5fBHYVWbrOf0LiwBMYOJponofQPaxlXmCPByRBV0oONaXerEugZOvwY1HH_jGAYNKg8NnIK0cmVE_xcCKRtYGb7cz0L3nVKanHJFKnThkC7KtSnbxI/s72-c/images.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1662845349023960931.post-2654070954748034634</id><published>2010-03-28T00:00:00.001+08:00</published><updated>2010-03-29T01:20:45.570+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADC"/><category scheme="http://www.blogger.com/atom/ns#" term="analog-to-digital converter"/><category scheme="http://www.blogger.com/atom/ns#" term="parallel port interfacing"/><category scheme="http://www.blogger.com/atom/ns#" term="python interface"/><title type='text'>Entry 1: Interfacing ADC using Parallel port with Python</title><content type='html'>This Python code will suffice the need of interfacing an ADC (analog-to-digital converter) using a Parallel Port.  Tested with ADC0804 (8-bit ADC ).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39;&#39;&#39;This module facilitates ADC interfacing in Python using a Parallel port&#39;&#39;&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;__author__ = &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39;Aivin V. Solatorio&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import parallel&lt;/div&gt;&lt;div&gt;import ctypes&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;_ppt = ctypes.windll.simpleio&lt;/div&gt;&lt;div&gt;_ppt.init()&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;class ParallelADC(object):&lt;/div&gt;&lt;div&gt;    &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&#39;&#39;&#39;Definition of ADC interfacing class&#39;&#39;&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;def __init__(self):&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;self.dataAdr = 0x0378&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;self.statAdr = self.dataAdr + 1&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;self.ctrlAdr = self.dataAdr + 2&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;def getData(self):&lt;/div&gt;&lt;div&gt;        &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&#39;&#39;&#39;Acquires signal from data register&#39;&#39;&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;return _ppt.inp(self.dataAdr)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;def setCtrl(self, val):&lt;/div&gt;&lt;div&gt;        &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&#39;&#39;&#39;Dictates the value of control register&#39;&#39;&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;_ppt.outp(self.ctrlAdr, val)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;def getStat(self):&lt;/div&gt;&lt;div&gt;        &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&#39;&#39;&#39;Acquires value of status register&#39;&#39;&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;return _ppt.inp(statAdr)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39;&#39;&#39;Start of data gathering&#39;&#39;&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;gather_time = 100        &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(255, 0, 0);&quot;&gt;#100 number of sample points&lt;/span&gt;&lt;/div&gt;&lt;div&gt;ADC = ParallelADC()&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;for i in xrange(gather_time):&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;lc = 0&lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;ADC.setCtrl(0x32)        &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(255, 0, 0);&quot;&gt;#initializes ADC to start&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;ADC.setCtrl(0x36)        &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(255, 0, 0);&quot;&gt;#converting signal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;while ((ADC.getStat() &amp;amp; 8) == 0) and (lc != 256):&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;lc += 1        &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(255, 0, 0);&quot;&gt;#wait for ADC to finish converting&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;if (lc == 256):&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;print &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&quot;Timed Out, check device or connection!&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;else:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;ADC.setCtrl(0x37)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;value = ADC.getData() &amp;amp; 0xFF&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;ADC.setCtrl(0x36)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;print &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 153, 0);&quot;&gt;&quot;The ADC reading is: &quot;&lt;/span&gt;, value        &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(255, 0, 0);&quot;&gt;#prints out ADC value&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://allstuffedhere.blogspot.com/feeds/2654070954748034634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allstuffedhere.blogspot.com/2010/03/entry-1-interfacing-adc-using-parallel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/2654070954748034634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1662845349023960931/posts/default/2654070954748034634'/><link rel='alternate' type='text/html' href='http://allstuffedhere.blogspot.com/2010/03/entry-1-interfacing-adc-using-parallel.html' title='Entry 1: Interfacing ADC using Parallel port with Python'/><author><name>the_helper</name><uri>http://www.blogger.com/profile/14617994142427370929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5axrjKm8r7WvEn5JWeVZzPIkkPUTu9LNrOIOORUux8-sStcmnM_d55s8T7R1hR-VuLHzLbVgLTiPzmfhwF9U8_e57mjJV7BlfBv5Lgs2vsbOnKet4HofcpO1q8Fh0x9A/s220/thesis1.jpg'/></author><thr:total>0</thr:total></entry></feed>