<?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-4488123033070210861</id><updated>2026-05-10T02:22:51.168-07:00</updated><category term="matlab"/><category term="video"/><category term="Basic Structure"/><category term="image processing"/><category term="basics"/><category term="background subtraction"/><category term="track object"/><category term="Scale-invariant feature transform"/><category term="motion detection"/><category term="object tracking"/><category term="sift"/><category term="computer vision"/><category term="corner detection"/><category term="2d Homography"/><category term="track object in live video"/><category term="Image Resize"/><category term="Lucas Kanade"/><category term="Optical Flow"/><category term="Spatial Transformation"/><category term="Video Resize"/><category term="harris corner detection"/><category term="morphological operation"/><category term="subtraction"/><category term="Adaptive thresholding"/><category term="Canny"/><category term="Cropping"/><category term="Disparity Map"/><category term="Meanshift"/><category term="PCA"/><category term="approximate median"/><category term="closing"/><category term="david lowe"/><category term="david lowe comparison"/><category term="dilation"/><category term="disparity"/><category term="feature detectors"/><category term="live video"/><category term="mathematics"/><category term="principal component analysis"/><category term="stabilization"/><category term="stereo pair"/><category term="2 camera"/><category term="A. Vadaldi comparison"/><category term="Aresh Notes"/><category term="Edge Detection"/><category term="Fast hessian matrix"/><category term="Hessian Matrix"/><category term="Horns algorithm"/><category term="PCA-SIFT"/><category term="Ransac"/><category term="Rotation"/><category term="SIFT comparison"/><category term="SURF"/><category term="Shaking video"/><category term="Sift detection"/><category term="Speed Up Robust Features"/><category term="angle camera"/><category term="atsSIFT"/><category term="avi matlab"/><category term="buy beer"/><category term="camshift algorithm"/><category term="camshift tracking"/><category term="classification"/><category term="cornermetric"/><category term="dataset"/><category term="detail"/><category term="donate"/><category term="erosion"/><category term="ffmpeg"/><category term="filters"/><category term="ground truth"/><category term="groundtruth table"/><category term="histogram"/><category term="image filtering"/><category term="imageJ"/><category term="integral images"/><category term="interpolation"/><category term="keypoints"/><category term="live video stream"/><category term="log-polar transform"/><category term="lowe"/><category term="macro"/><category term="matlab compression"/><category term="matlab ffmpeg"/><category term="meanshift tracking algorithm"/><category term="mixture of gaussian"/><category term="moravec"/><category term="mosaicing"/><category term="motion vector"/><category term="opening"/><category term="pyrmids"/><category term="raw video"/><category term="raw video matlab"/><category term="segmentation"/><category term="stereo vision"/><category term="streo vision"/><category term="summed area table"/><category term="tracking"/><category term="viola-jones"/><category term="vision"/><title type='text'>Matlab - Working with Videos</title><subtitle type='html'>Aresh T. Saharkhiz - Matlab Video Analysis</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>70</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-7480812265484323744</id><published>2020-06-12T06:52:00.005-07:00</published><updated>2020-06-12T06:52:37.743-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="buy beer"/><category scheme="http://www.blogger.com/atom/ns#" term="donate"/><title type='text'>If you found these codes useful buy me a beer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;form action=&quot;https://www.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot; target=&quot;_top&quot;&gt;
&lt;input name=&quot;cmd&quot; type=&quot;hidden&quot; value=&quot;_s-xclick&quot; /&gt;
&lt;input name=&quot;hosted_button_id&quot; type=&quot;hidden&quot; value=&quot;Y8KAE87HNCC88&quot; /&gt;
&lt;input alt=&quot;Donate with PayPal button&quot; border=&quot;0&quot; name=&quot;submit&quot; src=&quot;https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif&quot; title=&quot;PayPal - The safer, easier way to pay online!&quot; type=&quot;image&quot; /&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;https://www.paypal.com/en_PH/i/scr/pixel.gif&quot; width=&quot;1&quot; /&gt;
&lt;/form&gt;
If you found these codes useful buy me a beer&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/7480812265484323744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2020/06/if-you-found-these-codes-useful-buy-me.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/7480812265484323744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/7480812265484323744'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2020/06/if-you-found-these-codes-useful-buy-me.html' title='If you found these codes useful buy me a beer'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-9163978388593920432</id><published>2011-06-23T02:45:00.000-07:00</published><updated>2020-07-27T17:52:16.761-07:00</updated><title type='text'>The Euclidean Distance/Vector Angle Edge Detector (DRAFT)</title><content type='html'>This Edge detector makes use of color information to detect edges.   Where most edge detectors use only intensity, this edge detector also  considers hue and saturation.&lt;br /&gt;
Algorithm for Euclidean Distance/Vector Angle Edge Detector:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt; For each pixel in the image, take the 3×3 window of pixels around it.&lt;/li&gt;
&lt;li&gt; Calculate the saturation-based combination of the Euclidean  distance and Vector Angle between the center pixel and each pixel on the  ring of the 3×3 window.&lt;/li&gt;
&lt;li&gt; Assign the largest value obtained to the center pixel.&lt;/li&gt;
&lt;li&gt; Apply a threshold to the image to eliminate false edges&lt;/li&gt;
&lt;/ul&gt;So here is the result of the edges found by Euclidean distance&lt;br /&gt;
We use a vector Gradient edge detector which is a 3×3 mask. Find E_vg the euclidean distance operator&lt;br /&gt;
&lt;br /&gt;
&lt;address&gt;R = double(I1(:,:,1));&lt;br /&gt;
G = double(I1(:,:,2));&lt;br /&gt;
B = double(I1(:,:,3));&lt;br /&gt;
I_size = size(I1(:,:,1));&lt;/address&gt;&lt;address&gt;&amp;nbsp;&lt;/address&gt;&lt;address&gt;&amp;nbsp;&lt;/address&gt;&lt;address&gt;E_vg = zeros(I_size(1),I_size(2));&lt;br /&gt;
for y=2:(I_size(1)-1),&lt;br /&gt;
for x=2:(I_size(2)-1),&lt;br /&gt;
for i=-1:1,&lt;br /&gt;
for j=-1:1,&lt;br /&gt;
ED = sqrt((R(y+i,x+j)-R(y,x))^2 + (G(y+i,x+j)-G(y,x))^2 + (B(y+i,x+j)-B(y,x))^2);&lt;br /&gt;
if ED &amp;gt; E_vg(y,x)&lt;br /&gt;
E_vg(y,x) = ED;&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
end&lt;/address&gt;&lt;address&gt;&amp;nbsp;&lt;/address&gt;Run the resulting E_vg through a threshold&lt;br /&gt;
&lt;br /&gt;
&lt;address&gt;ED_thresh = 45.0; //Change for Testing upto 255&lt;br /&gt;
ED_edges = zeros(I_size(1),I_size(2));&lt;br /&gt;
for y=1:I_size(1),&lt;br /&gt;
for x=1:I_size(2),&lt;br /&gt;
if E_vg(y,x) &amp;gt; ED_thresh&lt;br /&gt;
ED_edges(y,x) = 255;&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
end&lt;/address&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; id=&quot;attachment_72&quot; style=&quot;width: 310px;&quot;&gt;&lt;a href=&quot;http://trackingaresh.pedlab.org/files/2011/06/result_ColorEdge_E_vg.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-medium wp-image-72&quot; height=&quot;258&quot; src=&quot;http://trackingaresh.pedlab.org/files/2011/06/result_ColorEdge_E_vg-300x258.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot;&gt;Threshold of 45&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;wp-caption aligncenter&quot; id=&quot;attachment_73&quot; style=&quot;width: 310px;&quot;&gt;&lt;a href=&quot;http://trackingaresh.pedlab.org/files/2011/06/result_ColorEdge_E_vg_theshold80.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-medium wp-image-73&quot; height=&quot;258&quot; src=&quot;http://trackingaresh.pedlab.org/files/2011/06/result_ColorEdge_E_vg_theshold80-300x258.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot;&gt;Threshold of 80&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; id=&quot;attachment_74&quot; style=&quot;width: 310px;&quot;&gt;&lt;a href=&quot;http://trackingaresh.pedlab.org/files/2011/06/result_ColorEdge_E_vg_theshold200.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-medium wp-image-74&quot; height=&quot;258&quot; src=&quot;http://trackingaresh.pedlab.org/files/2011/06/result_ColorEdge_E_vg_theshold200-300x258.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot;&gt;Threshold 200&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/9163978388593920432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2011/06/euclidean-distancevector-angle-edge.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/9163978388593920432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/9163978388593920432'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2011/06/euclidean-distancevector-angle-edge.html' title='The Euclidean Distance/Vector Angle Edge Detector (DRAFT)'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-5912714953327952138</id><published>2010-12-22T20:39:00.000-08:00</published><updated>2010-12-22T20:44:24.545-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lucas Kanade"/><category scheme="http://www.blogger.com/atom/ns#" term="Optical Flow"/><category scheme="http://www.blogger.com/atom/ns#" term="Shaking video"/><title type='text'>Region Of Interest using Optical Flow</title><content type='html'>&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=AD6v5dyBvjuQFnmezMueXvbzhwQO8BLyfOFZM_VchWAnv8eEFBe2YVwmRCiOeP8SfIJwywvv3wAyjgOwipNgRH5Dfg&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&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=AD6v5dzB_KmwzSnjtqd-G3AW34mI4jCB6l75O3MTgegoN6vwtmE_Y5nLjLjIiYyw3RztcX90LxfYbyt0V5NNtTaspw&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;br /&gt;Shaking VS Stable&lt;br /&gt;Tracking using Lucas Kanade Optical Flow&lt;br /&gt;the ROI (region of interest) is selected manually by the user</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/5912714953327952138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/12/region-of-interest-using-optical-flow.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/5912714953327952138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/5912714953327952138'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/12/region-of-interest-using-optical-flow.html' title='Region Of Interest using Optical Flow'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-5013197981341674045</id><published>2010-12-22T00:20:00.000-08:00</published><updated>2010-12-22T02:49:32.607-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ground truth"/><category scheme="http://www.blogger.com/atom/ns#" term="groundtruth table"/><category scheme="http://www.blogger.com/atom/ns#" term="tracking"/><title type='text'>GroundTruth Tracking</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgyHyuQjgp-kn_06cAqQMi1iixYbedaoVKZfH8KXVH5da0UYoQGFDWoLv2vVceqcCVrL3nP4RSONmqjahtF8e99xNzXIJV9nSjrJpYO5l5fZYbkyuVYthZoIfdQgrhUH1VK8flN_PU4hpg/s1600/tracking_Automated.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 331px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgyHyuQjgp-kn_06cAqQMi1iixYbedaoVKZfH8KXVH5da0UYoQGFDWoLv2vVceqcCVrL3nP4RSONmqjahtF8e99xNzXIJV9nSjrJpYO5l5fZYbkyuVYthZoIfdQgrhUH1VK8flN_PU4hpg/s400/tracking_Automated.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5553453078795320370&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4ySNdpNto1vZwKGvTHzKHyWuzyYVeKVw_BNiMX7aXYjU69LEybSQlOk-f1wb8Nf_bgfZTuNi_jGXR21EkMQDg3p3Mhod6drOqqxYabP85E4YkaG9YADtw8bNIsuiK_Gzv9FnyZkKaa8vV/s1600/GroundTruthTable+%2528ntxy%2529.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 47px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4ySNdpNto1vZwKGvTHzKHyWuzyYVeKVw_BNiMX7aXYjU69LEybSQlOk-f1wb8Nf_bgfZTuNi_jGXR21EkMQDg3p3Mhod6drOqqxYabP85E4YkaG9YADtw8bNIsuiK_Gzv9FnyZkKaa8vV/s400/GroundTruthTable+%2528ntxy%2529.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5553420793090259890&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;ntxy Ground truth&lt;br /&gt;&lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUktwOPNj2nd14xY5d-EdIBJyU6vBwWWaAljA9Px6ZNRqfAbsIC3725XffhgVJAvvlyrHsEf7JwohnjXc_0IYeHz5lsVA5qCioMeS07DiVMYpEBDiUBtdJ_E6xuELKbKfsVSLWwASzmiay/s1600/groundTruth_tracking.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 203px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUktwOPNj2nd14xY5d-EdIBJyU6vBwWWaAljA9Px6ZNRqfAbsIC3725XffhgVJAvvlyrHsEf7JwohnjXc_0IYeHz5lsVA5qCioMeS07DiVMYpEBDiUBtdJ_E6xuELKbKfsVSLWwASzmiay/s400/groundTruth_tracking.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5553418927883063106&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4AQ_AoEea-HSKtGXxvN1ABsD83VRh96uw_YOLIoDvvPGgw6iQ8QjBmEzAarESwZYDWyld1wu3GZkGSLz6AHErRyGKnKOJhVS4XVnsUU64w9wXkrJYWvrOr23h14M1DEP7T1f9sumQ9qk/s1600/groundTruth.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 272px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik4AQ_AoEea-HSKtGXxvN1ABsD83VRh96uw_YOLIoDvvPGgw6iQ8QjBmEzAarESwZYDWyld1wu3GZkGSLz6AHErRyGKnKOJhVS4XVnsUU64w9wXkrJYWvrOr23h14M1DEP7T1f9sumQ9qk/s400/groundTruth.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5553418918008863746&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;ive used the following code to create a manual tracking using mouse clicks&lt;br /&gt;the following is the code used:&lt;br /&gt;&lt;br /&gt;%Ground truth tracking&lt;br /&gt;picnum = 60;&lt;br /&gt;fig = figure;&lt;br /&gt;hold on;&lt;br /&gt;points = cell(1,1);&lt;br /&gt;buttons =1;&lt;br /&gt;while (buttons &lt; 4) %track 3 objects only&lt;br /&gt;tframe=1;&lt;br /&gt; for tframe = 1:picnum&lt;br /&gt;  filename1 = sprintf(&#39;./video/%d.pgm&#39;, tframe);&lt;br /&gt;  title(&#39;Click the top left corner of an object to track...&#39;);&lt;br /&gt;    [x1 y1 button] = ginput(1);&lt;br /&gt;    points{buttons,tframe} = [x1 y1];&lt;br /&gt;    if (button~= 2)&lt;br /&gt;            plot(x1, y1, &#39;rx&#39;);&lt;br /&gt;       &lt;br /&gt;            figure(fig)&lt;br /&gt;            cla;&lt;br /&gt;          imshow(filename1);hold on;&lt;br /&gt;          %comment out to remove the need for unwanted empty points in&lt;br /&gt;          %the cell&lt;br /&gt;            %         else&lt;br /&gt;            %             break;&lt;br /&gt;    end&lt;br /&gt; end&lt;br /&gt; buttons=buttons+1;&lt;br /&gt;end&lt;br /&gt;hold off&lt;br /&gt;&lt;br /&gt;imshow(sprintf(&#39;./video/%d.pgm&#39;, 1));hold on;&lt;br /&gt;x=[0 0];y=[0 0];&lt;br /&gt;for i=1:picnum-1&lt;br /&gt; x = [points{1,i}(1) points{1,i+1}(1) x];&lt;br /&gt; y = [points{1,i}(2) points{1,i+1}(2) y];&lt;br /&gt;end&lt;br /&gt;plot(x,y,&#39;y&#39;,&#39;LineWidth&#39;,2);&lt;br /&gt;&lt;br /&gt;clear x y;&lt;br /&gt;x=[0 0];y=[0 0];&lt;br /&gt;for i=1:picnum-1&lt;br /&gt; x = [points{2,i}(1) points{2,i+1}(1) x];&lt;br /&gt; y = [points{2,i}(2) points{2,i+1}(2) y];&lt;br /&gt;end&lt;br /&gt;plot(x,y,&#39;r&#39;,&#39;LineWidth&#39;,2);&lt;br /&gt;&lt;br /&gt;clear x y;&lt;br /&gt;x=[0 0];y=[0 0];&lt;br /&gt;for i=1:picnum-1&lt;br /&gt; x = [points{3,i}(1) points{3,i+1}(1) x];&lt;br /&gt; y = [points{3,i}(2) points{3,i+1}(2) y];&lt;br /&gt;end&lt;br /&gt;plot(x,y,&#39;b&#39;,&#39;LineWidth&#39;,2);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;hold off&lt;br /&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=AD6v5dyHd8lqQAYS9hb6liTnkJjgYxnA5qKNvwKSd7-Mm6a68WDgrvWogp2Umfdnc5UzdwUu996r0I3FPgME3Lvqeg&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/5013197981341674045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/12/groundtruth-tracking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/5013197981341674045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/5013197981341674045'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/12/groundtruth-tracking.html' title='GroundTruth Tracking'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgyHyuQjgp-kn_06cAqQMi1iixYbedaoVKZfH8KXVH5da0UYoQGFDWoLv2vVceqcCVrL3nP4RSONmqjahtF8e99xNzXIJV9nSjrJpYO5l5fZYbkyuVYthZoIfdQgrhUH1VK8flN_PU4hpg/s72-c/tracking_Automated.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-6332160792494441118</id><published>2010-11-03T23:19:00.000-07:00</published><updated>2010-11-03T23:45:14.077-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="object tracking"/><category scheme="http://www.blogger.com/atom/ns#" term="Sift detection"/><title type='text'>Face Detection trials</title><content type='html'>&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;416&#39; height=&#39;345&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dwA3zFbtnwmYijNIf-UXjywsCYnUCfgZ3Gz3iGAZ3sd99ZFZL2ZAFkWGGPsItQbtwRI2RSxvUuyUEGo2HI0&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;br /&gt;Detecting head: while sift shows its robustness in scale and rotation, there is somewhat of an illumination problem&lt;br /&gt;&lt;br /&gt;Clearer YOUTUBE videos&lt;br /&gt;&lt;br /&gt;http://www.youtube.com/watch?v=mgr96oeXqH0&lt;br /&gt;&lt;br /&gt;http://www.youtube.com/watch?v=lapux3e91_Y&lt;br /&gt;&lt;br /&gt;http://www.youtube.com/watch?v=bMBNLPcLOVk</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/6332160792494441118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/11/face-detection-trials.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/6332160792494441118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/6332160792494441118'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/11/face-detection-trials.html' title='Face Detection trials'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-9062221721897985067</id><published>2010-11-03T19:41:00.001-07:00</published><updated>2010-11-03T19:45:58.960-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="avi matlab"/><category scheme="http://www.blogger.com/atom/ns#" term="ffmpeg"/><category scheme="http://www.blogger.com/atom/ns#" term="matlab compression"/><category scheme="http://www.blogger.com/atom/ns#" term="matlab ffmpeg"/><category scheme="http://www.blogger.com/atom/ns#" term="raw video"/><category scheme="http://www.blogger.com/atom/ns#" term="raw video matlab"/><title type='text'>Matlab AVI video use</title><content type='html'>Matlab requires a RAW VIDEO file to be imported and used. however most cameras and recording devices use a compression to reduce file size and so on.&lt;br /&gt;&lt;br /&gt;my trouble was an AVI file with a different codec. when i used AVIREAD in matlab, it gave me an error that it wasnt able to find the codedc or the frames are not known.&lt;br /&gt;&lt;br /&gt;one option that is FREE:&lt;br /&gt;use FFMPEG im downloading the executable for windows from this &lt;a href=&quot;http://sourceforge.net/projects/mplayer-win32/files/FFmpeg/&quot;&gt;URL&lt;/a&gt;&lt;br /&gt;ffmpeg is a command line tool, so in order to convert to a raw video to use in maatlab you use this command:&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;c:/&gt; &lt;/span&gt; ffmpeg -i &lt;span style=&quot;color: rgb(255, 0, 0); font-weight: bold;&quot;&gt;foo.avi&lt;/span&gt; -vcodec rawvideo &lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;bar.avi&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;foo.avi is your compressed video file&lt;br /&gt;bar.avi is your new raw video file name that you will use in MATLAB</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/9062221721897985067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/11/matlab-avi-video-use.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/9062221721897985067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/9062221721897985067'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/11/matlab-avi-video-use.html' title='Matlab AVI video use'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-4616136553355178117</id><published>2010-10-27T02:34:00.000-07:00</published><updated>2010-11-01T19:04:05.528-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="david lowe"/><category scheme="http://www.blogger.com/atom/ns#" term="david lowe comparison"/><category scheme="http://www.blogger.com/atom/ns#" term="Scale-invariant feature transform"/><category scheme="http://www.blogger.com/atom/ns#" term="sift"/><title type='text'>SIFT keypoint matching Trials of my Implementation</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvipryazp0lmZr_kA4n8dhj1934Qskf3A6bNefNfhAP2u5aY_Bbj6TjNxOsBXzdDpiXyc6DysEpWt0i6zuE33bTqTTTQqF_f6HTPHud4yOCePVujOznp1328XycvSh1qi1hYE7irhcOgQP/s1600/bluramount.jpg&quot;&gt;&lt;/a&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMueadW26I_Xcbfbw2_F5ILeWeARx-g5wwtrHjByOG2AinE_QMSHtxdNS9kuBTgJTlaDGngQ3Jmi4MQGU2Uk2VqNaKLb3mUYKHo6-yu0xfqtvcv7OoNxlag-NbwQx_ByS8VOLYqxT9vtvV/s1600/722Matches.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 208px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMueadW26I_Xcbfbw2_F5ILeWeARx-g5wwtrHjByOG2AinE_QMSHtxdNS9kuBTgJTlaDGngQ3Jmi4MQGU2Uk2VqNaKLb3mUYKHo6-yu0xfqtvcv7OoNxlag-NbwQx_ByS8VOLYqxT9vtvV/s400/722Matches.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532658243378361282&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;2 of the same images, using my own SIFT implementation gives me 722 matches&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiecp3JLEbuBKFdMPGAfrAVHgg4-Cj23yLeMX9zhHXmex-6yCvBe30H0Tjfw9oU_g2EGil3X9-MEUMUI07TGv7fMyD1ftWdR6CdGcEkYSzx3j0yun5Jyn8dbzCEl1mxKy0O8wmauY3PzKf8/s1600/243Matches.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 190px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiecp3JLEbuBKFdMPGAfrAVHgg4-Cj23yLeMX9zhHXmex-6yCvBe30H0Tjfw9oU_g2EGil3X9-MEUMUI07TGv7fMyD1ftWdR6CdGcEkYSzx3j0yun5Jyn8dbzCEl1mxKy0O8wmauY3PzKf8/s400/243Matches.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532658237340940114&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;for my second experiment i tried translation invariance, 2 images taken from different angles. i got 243 matches&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKsNZ57f49DN_xdBHTQ7EbmXLE2pP_FSkgF7rJnQ9EqidcPX6UYCn1n4EtcKqnevOlrQvPsHCNcKfpIxxWK6ulSvgRC94VD9R69eIKNes1lrY2cGaSyLxp-yJf26nQvyX0pLOmRrrlOavG/s1600/me22.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 160px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKsNZ57f49DN_xdBHTQ7EbmXLE2pP_FSkgF7rJnQ9EqidcPX6UYCn1n4EtcKqnevOlrQvPsHCNcKfpIxxWK6ulSvgRC94VD9R69eIKNes1lrY2cGaSyLxp-yJf26nQvyX0pLOmRrrlOavG/s400/me22.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532658231228665618&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;In my next experiment i tried a complete affine transformation of a graffiti wall, i got 22 matches but not so accurate. this shows the keypoints have a problem in its rotation and scaling invariants. my magnitude and teta maybe the cause of this.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirdedn7TO-AIf1P9t95Ckl0v8rxPAAwAXRmjvoi-u4DDce-6eil5bvHYhNBhx442AsFYVlHuzdKamOp0mUeJEI-MPZr5sFf-HixyYwS0jkTpBuyeFJLM6fIJ5dT9h9LYIJb2yfxZjJ-QFr/s1600/lowe98points.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 181px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirdedn7TO-AIf1P9t95Ckl0v8rxPAAwAXRmjvoi-u4DDce-6eil5bvHYhNBhx442AsFYVlHuzdKamOp0mUeJEI-MPZr5sFf-HixyYwS0jkTpBuyeFJLM6fIJ5dT9h9LYIJb2yfxZjJ-QFr/s400/lowe98points.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532658230410830930&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;This is a matching from David Lowes algorithm showing a clear affine invariance.&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, 0, 238);&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhBuCjX9W-IIHkwz6QnaxvC0S5KG_rRjaZF2iYYTG3gcVH2u6oCO99GWyqh6aPygiM7tfOSMcJYDhGBhVQnpaoWzLKn0WROH3wcSPLpk7dF04QDZPQ5sEelT4jwD-GcgJgzQm_kDEeVAEw/s400/mine.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532659790082953858&quot; style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 181px;&quot; border=&quot;0&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;my implementation gives me a very bad matching. alot more work to do.&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, 0, 238);&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTNTLLKaAYfrti9XoFDyTiBo5uBd_troE_MulGWSt6HyQKiiaZDwRuYghMRTDqwrlLlnjNgjxDbk565QURmk2U0_Pbrm5dT5dT6WxCON6PNVQSa_s0FY9q1t67_ZtrfA6u-G6FzKXElmxk/s400/landscape-b.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532662748193003170&quot; style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 133px;&quot; border=&quot;0&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 238);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;and more bad results, if the orientation of the keypoint is wrong, the matching will also suffer so i tired different tangents in matlab&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinYptoygsTX7FK-aCB6b-dj4RjCZqnVgBwjBdqwXd7XNIcNo5l3FBZd5nTOSLzA0EuBxgADpXZqhmM84o-h2m_v0WW7D7LOD2bUOwPFZrguL8gDAwvhx0p4NX0ztGiK4yTWc12cpz-CT0k/s400/atan.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532666145354419602&quot; style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 276px;&quot; border=&quot;0&quot; /&gt;&lt;/div&gt;&lt;div&gt;atan(dy/dx);&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJf6kXMQ0hvX-ZWfVC4RcSjanYl01Fqdn9HsQSB8erU_pkGiOWz_arUX0mj-FR6gV47MQWZl8W063QDOCvqs5x82HS1pmXJIHKtAFJiQfX76FRZGrxzD4f5FutOKUR-BN8Hn4JEW-MjZuZ/s1600/atan2.jpg&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJf6kXMQ0hvX-ZWfVC4RcSjanYl01Fqdn9HsQSB8erU_pkGiOWz_arUX0mj-FR6gV47MQWZl8W063QDOCvqs5x82HS1pmXJIHKtAFJiQfX76FRZGrxzD4f5FutOKUR-BN8Hn4JEW-MjZuZ/s400/atan2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532666150049912402&quot; style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 276px;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;atan2(dy,dx);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;BOTH IMAGES: show clearly that rotation invariance is not achieved, this is the reason why the matching gives alot of false negative results &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;furthermore; the amount of BLUR is also very important&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 238);&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvipryazp0lmZr_kA4n8dhj1934Qskf3A6bNefNfhAP2u5aY_Bbj6TjNxOsBXzdDpiXyc6DysEpWt0i6zuE33bTqTTTQqF_f6HTPHud4yOCePVujOznp1328XycvSh1qi1hYE7irhcOgQP/s400/bluramount.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532668363306344978&quot; style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 276px;&quot; border=&quot;0&quot; /&gt;&lt;/span&gt;images and details from (based on my understanding):&lt;br /&gt;Lowe, David G.  “Distinctive Image Features from Scale­ Invariant Keypoints”.  International Journal of Computer Vision, 60, 2 (2004)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/4616136553355178117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/10/sift-keypoint-matching-trials-of-my.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4616136553355178117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4616136553355178117'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/10/sift-keypoint-matching-trials-of-my.html' title='SIFT keypoint matching Trials of my Implementation'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMueadW26I_Xcbfbw2_F5ILeWeARx-g5wwtrHjByOG2AinE_QMSHtxdNS9kuBTgJTlaDGngQ3Jmi4MQGU2Uk2VqNaKLb3mUYKHo6-yu0xfqtvcv7OoNxlag-NbwQx_ByS8VOLYqxT9vtvV/s72-c/722Matches.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-3277499124336115414</id><published>2010-10-25T18:11:00.000-07:00</published><updated>2010-10-25T23:57:23.452-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="A. Vadaldi comparison"/><category scheme="http://www.blogger.com/atom/ns#" term="atsSIFT"/><category scheme="http://www.blogger.com/atom/ns#" term="david lowe comparison"/><category scheme="http://www.blogger.com/atom/ns#" term="SIFT comparison"/><title type='text'>My SIFT implementation and comparisons</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy_raFxVMu4PVsLk8x_nLlsrB6DiuoEApVtOIEOdDwVbEOrOEq-2UU-gmQaiRD2twaeSun_0x0ppW84bSTrHDDsNqZ3Jgajm_9YG4uL-6vkLeG_fEkabg72CKVTHUErn66OwGZAd0H-mV9/s1600/coins.JPG&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXs60aIECirwfECFOBrV1uSbzjHr47qeF_J0gmBmRTObmlhrzUp2F6uu1NRoECqCmgvLzHFhDuSw2KL48gXyfRhgh45TRPZ0AwyJP0abPAERuCfH80YrB4dfyd5jvpTetnpAwQlct6iYdO/s1600/AreshSIFT_195SolidPoints.jpg&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Im trying to implement SIFT in matlab and compare it with other implementations&lt;br /&gt;the comparisons are against the following:&lt;br /&gt;original SIFT code by LOWE found at &lt;a href=&quot;http://www.cs.ubc.ca/%7Elowe/keypoints/siftDemoV4.zip&quot;&gt;this URL&lt;/a&gt;&lt;br /&gt;the other is the popular A. Vedaldi Code found at &lt;a href=&quot;http://www.vlfeat.org/%7Evedaldi/code/sift.html&quot;&gt;this URL&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZA2kfbPgyKGhP4vTYnv4xiXCJfSCb9fCpnt6mgHX5k4-Y1gRBJ7LvuS3wiAPX_KgLMW9czVBaxy-RNM4S_QwqYLX9-5PGiwZUlaoklIwL2zqDEmH4nTe4nucnF4hZ4rM0gca9-S8Xt_tk/s1600/vedaldiSIFT_262points.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZA2kfbPgyKGhP4vTYnv4xiXCJfSCb9fCpnt6mgHX5k4-Y1gRBJ7LvuS3wiAPX_KgLMW9czVBaxy-RNM4S_QwqYLX9-5PGiwZUlaoklIwL2zqDEmH4nTe4nucnF4hZ4rM0gca9-S8Xt_tk/s320/vedaldiSIFT_262points.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532157047745424514&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This is the result of the vadaldi code that finds 262 key points&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg93271qY89RVPFl3NZv46oU-WarOrBZ1vLmPM3D6vc7gWGaS3PqqPIzzKW6vIDeXqJ_Xn5kpls2S9dOPcbXKwcSX8aGvkD-5ZGsrWv8VJjr-rdf_zDm-9OiEFjOuhrmMUXbxiEAr3-jqCb/s1600/OriginalSIFT_249Points.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 300px; height: 246px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg93271qY89RVPFl3NZv46oU-WarOrBZ1vLmPM3D6vc7gWGaS3PqqPIzzKW6vIDeXqJ_Xn5kpls2S9dOPcbXKwcSX8aGvkD-5ZGsrWv8VJjr-rdf_zDm-9OiEFjOuhrmMUXbxiEAr3-jqCb/s320/OriginalSIFT_249Points.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532157046142525634&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This is the original SIFT code by David Lowe showing 249 keypoints&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUz-qXfIRcwjdJuycqSk0zKerudU-S_oTdGHhS3S81n25545nquBgKTgdcERKTY21y3HVIGni0I0gKIhqyUhKd9IV3FlBOgQrCxSMq47cP0xigTcjKoODBQH40qz-auyQIImAat9Y2iVag/s1600/AreshSIFT_315Points.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 263px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUz-qXfIRcwjdJuycqSk0zKerudU-S_oTdGHhS3S81n25545nquBgKTgdcERKTY21y3HVIGni0I0gKIhqyUhKd9IV3FlBOgQrCxSMq47cP0xigTcjKoODBQH40qz-auyQIImAat9Y2iVag/s320/AreshSIFT_315Points.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532157872812112402&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd_CD5_nqSbBlhfOFRu3WBnjhR-eQisy6RuhGvZgchjYw5mDyV1VqQWadda8GqA37geGnG00uSv0ju-gMafToK9C9IGNkvikL_hsqqBnHpxQtIG6qaImgTApYptg-VHRjfld7JiHC_wivA/s1600/AreshSIFT_315Points.jpg&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;This is from my code showing 315 keypoints.&lt;br /&gt;&lt;br /&gt;from all 3 images you can see that there are points that are outside of the image and a surprising 70 extra keypoints on my implementation. obviously my implementation is wrong, so i tried to go through the code and adjusted a few things&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXs60aIECirwfECFOBrV1uSbzjHr47qeF_J0gmBmRTObmlhrzUp2F6uu1NRoECqCmgvLzHFhDuSw2KL48gXyfRhgh45TRPZ0AwyJP0abPAERuCfH80YrB4dfyd5jvpTetnpAwQlct6iYdO/s1600/AreshSIFT_195SolidPoints.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 301px; height: 246px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXs60aIECirwfECFOBrV1uSbzjHr47qeF_J0gmBmRTObmlhrzUp2F6uu1NRoECqCmgvLzHFhDuSw2KL48gXyfRhgh45TRPZ0AwyJP0abPAERuCfH80YrB4dfyd5jvpTetnpAwQlct6iYdO/s320/AreshSIFT_195SolidPoints.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532158513975482674&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Now i get 195 keypoints and as you can see from the image, all the keypoints are located inside of the image. my next problem is the magnitude.&lt;br /&gt;&lt;br /&gt;from the previous images, the code from LOWE and VEDALDI have a very good magnitude however my implementation has very small.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy_raFxVMu4PVsLk8x_nLlsrB6DiuoEApVtOIEOdDwVbEOrOEq-2UU-gmQaiRD2twaeSun_0x0ppW84bSTrHDDsNqZ3Jgajm_9YG4uL-6vkLeG_fEkabg72CKVTHUErn66OwGZAd0H-mV9/s1600/coins.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 82px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy_raFxVMu4PVsLk8x_nLlsrB6DiuoEApVtOIEOdDwVbEOrOEq-2UU-gmQaiRD2twaeSun_0x0ppW84bSTrHDDsNqZ3Jgajm_9YG4uL-6vkLeG_fEkabg72CKVTHUErn66OwGZAd0H-mV9/s320/coins.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532245094811631762&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp8AVVYlIPXxJOouTnGcEpggUfXfP-WzHh2E-sK5e8JqomrYSY-nPZzedTgsBsmwROsE_-LSmuHypmzgpCDTqqn12QxrdqkUsz9PLrTaY9Rp9xkcMqhgXo3z3ETDwHdKYwx5eBNr0h6XfX/s1600/landscape.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 194px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp8AVVYlIPXxJOouTnGcEpggUfXfP-WzHh2E-sK5e8JqomrYSY-nPZzedTgsBsmwROsE_-LSmuHypmzgpCDTqqn12QxrdqkUsz9PLrTaY9Rp9xkcMqhgXo3z3ETDwHdKYwx5eBNr0h6XfX/s320/landscape.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532245093585804114&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif4jA87_YXaUdtJs0YSsm4i_xcnxxZREKAsL9LPyPescSXZN80WdrSFtoWXFwQevcIs7hlJXGHRbP42mh8rFLmDtytBrNoQtcjSXgc-jIwaIBpWUCC0_lYuMNR0aKiL31l0zDiUXnmvN-D/s1600/grafitti.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 448px; height: 126px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif4jA87_YXaUdtJs0YSsm4i_xcnxxZREKAsL9LPyPescSXZN80WdrSFtoWXFwQevcIs7hlJXGHRbP42mh8rFLmDtytBrNoQtcjSXgc-jIwaIBpWUCC0_lYuMNR0aKiL31l0zDiUXnmvN-D/s320/grafitti.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532245093413216642&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;All yellow markers are from my implementation</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/3277499124336115414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/10/my-sift-implementation-and-comparisons.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/3277499124336115414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/3277499124336115414'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/10/my-sift-implementation-and-comparisons.html' title='My SIFT implementation and comparisons'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZA2kfbPgyKGhP4vTYnv4xiXCJfSCb9fCpnt6mgHX5k4-Y1gRBJ7LvuS3wiAPX_KgLMW9czVBaxy-RNM4S_QwqYLX9-5PGiwZUlaoklIwL2zqDEmH4nTe4nucnF4hZ4rM0gca9-S8Xt_tk/s72-c/vedaldiSIFT_262points.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-1488395669465272580</id><published>2010-10-21T03:06:00.000-07:00</published><updated>2010-10-21T03:14:24.817-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="computer vision"/><category scheme="http://www.blogger.com/atom/ns#" term="dataset"/><title type='text'>Computer vision Datasets to use</title><content type='html'>a very nice&lt;a href=&quot;http://lear.inrialpes.fr/people/mikolajczyk/Database/index.html&quot;&gt; dataset&lt;/a&gt; collected by Krystian Mikolajczyk for testing scaled and affine interest point detectors with various types of local image descriptors.&lt;br /&gt;These are some of the other dataset that i use:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;a href=&quot;http://cbcl.mit.edu/software-datasets/FaceData2.html&quot;&gt;MIT Face Dataset&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://cbcl.mit.edu/software-datasets/CarData.html&quot;&gt;MIT Car Datasets&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://cbcl.mit.edu/software-datasets/streetscenes/&quot;&gt;MIT Street Scenes&lt;/a&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;a href=&quot;http://cbcl.mit.edu/software-datasets/PedestrianData.html&quot;&gt;Pedestrian dataset from MIT&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most of the files are in *.ppm format, i personally use adobe photoshop to open these</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/1488395669465272580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/10/computer-vision-datasets-to-use.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/1488395669465272580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/1488395669465272580'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/10/computer-vision-datasets-to-use.html' title='Computer vision Datasets to use'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-3136906060669820654</id><published>2010-09-30T21:44:00.000-07:00</published><updated>2010-09-30T21:48:33.527-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="background subtraction"/><title type='text'>background subtraction (problems)</title><content type='html'>there are several problems that must&lt;br /&gt;be addressed by a good background removal algorithm to&lt;br /&gt;correctly detect moving objects. A good background removal&lt;br /&gt;algorithm should handle the relocation of background objects,&lt;br /&gt;non-stationary background objects e.g. waving trees,&lt;br /&gt;and image changes due to camera motion which is common&lt;br /&gt;in outdoor applications e.g. wind load. A background removal&lt;br /&gt;system should adapt to illumination changes whether&lt;br /&gt;gradual changes (time of day) or sudden changes (lightswitch),&lt;br /&gt;whether global or local changes such as shadows and interreflections.&lt;br /&gt;A foreground object might have similar characteristics&lt;br /&gt;as the background, it become difficult to distinguish&lt;br /&gt;between them (camouflage). A foreground object that becomes&lt;br /&gt;motionless can not be distinguished from a background&lt;br /&gt;object that moves and then becomes motionless&lt;br /&gt;(sleeping person). A common problem faced in the background&lt;br /&gt;initialization phase is the existence of foreground&lt;br /&gt;objects in the training period, which occlude the actual background,&lt;br /&gt;and on the other hand often it is impossible to clear&lt;br /&gt;an area to get a clear view of the background, this puts serious&lt;br /&gt;limitations on system to be used in high traffic areas.&lt;br /&gt;Some of these problems can be handled by very computationally&lt;br /&gt;expensive methods, but in many applications, a short&lt;br /&gt;processing time is required.&lt;br /&gt;&lt;br /&gt;for a few see the following: &lt;a href=&quot;http://areshmatlab.blogspot.com/2010/05/high-complexity-background-subtraction.html&quot;&gt;POST1&lt;/a&gt; - &lt;a href=&quot;http://areshmatlab.blogspot.com/2010/05/medium-complexity-background.html&quot;&gt;POST2&lt;/a&gt; - &lt;a href=&quot;http://areshmatlab.blogspot.com/2010/05/low-complexity-background-subtraction.html&quot;&gt;POST3&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/3136906060669820654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/background-subtraction-problems.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/3136906060669820654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/3136906060669820654'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/background-subtraction-problems.html' title='background subtraction (problems)'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-6549432326215199592</id><published>2010-09-30T01:14:00.000-07:00</published><updated>2010-10-26T20:29:43.554-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="filters"/><category scheme="http://www.blogger.com/atom/ns#" term="image filtering"/><title type='text'>Image Filtering (Gaussian)</title><content type='html'>A filter is any kind of processing that has one characteristic: it takes a signal as the input and produces a relevant output signal after processing it in some way. A filter can &lt;i&gt;always&lt;/i&gt; be mathematically described.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;An example of a 1D filter:&lt;/p&gt;&lt;p&gt;1 2 3 4 3 2 1&lt;br /&gt;&lt;/p&gt;&lt;p&gt;An example of a 2D filter:&lt;/p&gt;&lt;p&gt;1 1 1 1  1&lt;br /&gt;1 2 2 2 1&lt;br /&gt;1 2 3 2 1&lt;br /&gt;1 2 2 2 1&lt;br /&gt;1 1 1 1  1&lt;br /&gt;&lt;/p&gt;A 2D filter as well as the 1D filter, has to have&lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt; an odd number&lt;/span&gt; of samples in both the vertical as well as the horizontal orientation.&lt;br /&gt;&lt;br /&gt;In Matlab:&lt;br /&gt;n represents the number of cells so for a 2D 3x3 filter n=9 for a 1D filter the number of cells in my example above is 7&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% 2D Gaussian Filter&lt;br /&gt; x = -1/2:1/(n-1):1/2;&lt;br /&gt; [Y,X] = meshgrid(x,x);&lt;br /&gt; f = exp( -(X.ˆ2+Y.ˆ2)/(2*sˆ2) );&lt;br /&gt; f = f / sum(f(:));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;%1D Gaussian Filter&lt;br /&gt; x = -1/2:1/(n-1):1/2;&lt;br /&gt; f = exp( -(x.^2)/(2*sigma^2) );&lt;br /&gt; g = f / sum(sum(f));</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/6549432326215199592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/image-filtering.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/6549432326215199592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/6549432326215199592'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/image-filtering.html' title='Image Filtering (Gaussian)'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-4753465225848641376</id><published>2010-09-27T23:33:00.000-07:00</published><updated>2010-09-27T23:59:19.321-07:00</updated><title type='text'>Object detection Problem</title><content type='html'>one of the main problems of object tracking is identifying the object to be tracked. from my previous &lt;a href=&quot;http://areshmatlab.blogspot.com/2010/09/objective-is-to-find-object-in.html&quot;&gt;POST&lt;/a&gt;, i selected the object manually&lt;br /&gt;&lt;br /&gt;Object detection is a necessary step for any tracking algorithm because the algorithm needs to identify the moving object. The objective of object detection is to find out the position of the object and the region it occupies in the first frame.&lt;br /&gt;&lt;br /&gt;This task is extremely difficult due to the complex shapes of the moving targets. In order to simplify the problem, a variety of constrains are imposed to help in finding the object in image plane, such as the number of objects to be tracked, types of objects, etc. Currently, there are three popular techniques used in object tracking: &lt;span style=&quot;font-weight: bold;&quot;&gt;image segmentation, background subtraction and supervised learning algorithms.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;PROBLEMS&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;background subtraction is used for fixed cameras for moving camera we can use SIFT to stabilize the camera and perform background subtraction. However we do not get 100% stability with this method.&lt;/span&gt;&lt;br /&gt;The image segmentation methods are able to partition the image into perceptually similar regions, but the criteria for a good partition and the efficiency are two problems that the image segmentation algorithms need to address.&lt;br /&gt;&lt;br /&gt;The main drawback for supervised learning methods is that they usually require a large collection of samples from each object class and the samples must be manually labeled.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SOURCE : Tracking of Multiple Objects under Partial Occlusion - Bing Han, Christopher Paulson, Taoran Lu, Dapeng Wu, Jian Li - 2010</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/4753465225848641376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/object-detection-problem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4753465225848641376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4753465225848641376'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/object-detection-problem.html' title='Object detection Problem'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-4341132054232867358</id><published>2010-09-25T09:14:00.000-07:00</published><updated>2010-11-01T19:04:46.708-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="object tracking"/><category scheme="http://www.blogger.com/atom/ns#" term="Scale-invariant feature transform"/><category scheme="http://www.blogger.com/atom/ns#" term="track object"/><title type='text'>SIFT tracking set1</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYUdJKMNDsgb9L3O2S9vevjj23T4VDsprOdkePCrEJBNI2b8NyuHCiD7Ijl_E_sM5qD1rVuwAoTYzpFzS-TvWk15lYlmW5Smssapxna4SuRIQlE6137CV1wQpuBL9zYmjzlh834zdp_yuS/s1600/SIFT+Track.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 288px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYUdJKMNDsgb9L3O2S9vevjj23T4VDsprOdkePCrEJBNI2b8NyuHCiD7Ijl_E_sM5qD1rVuwAoTYzpFzS-TvWk15lYlmW5Smssapxna4SuRIQlE6137CV1wQpuBL9zYmjzlh834zdp_yuS/s400/SIFT+Track.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5522357706187648482&quot; border=&quot;0&quot; /&gt;&lt;/a&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=AD6v5dz-WNfGrJzU3SLKMsSw5A3kKiM-yPgouEDK0P5pSgAnrXVwBndHwDv42eGXKC6cxkvinBYJA6bYqI9bv7twjw&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;br /&gt;Video: Result of identification for tracking&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;the objective is to find an object in the foreground place a rectangle around the object and find SIFT keypoints in that rectangle, for the next frames only match those keypoints from the rectangle to the image&lt;br /&gt;&lt;br /&gt;images and details from (based on my understanding):&lt;br /&gt;Lowe, David G.  “Distinctive Image Features from Scale­ Invariant Keypoints”.  International Journal of Computer Vision, 60, 2 (2004)&lt;br /&gt;&lt;br /&gt;The STEPS:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;go through all the video and find SIFT keypoints in each frame&lt;/li&gt;&lt;li&gt; from an initial frame, select a moving object or foreground and place a rectangle around it&lt;/li&gt;&lt;li&gt;get all the SIFT keypoints in that rectangle&lt;/li&gt;&lt;li&gt;match the points from that rectangle to all the other points found in step 1&lt;/li&gt;&lt;li&gt;if match is found place a rectangle in succeeding frames &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;problem: in some frames keypoints dont match,thats the reason why i loose track of the vehicle&lt;/span&gt;&lt;br /&gt;its either there arent enough matches or those keypoints are different from the first frame&lt;br /&gt;again i consider the keypoints found only in the first frame and compare to new frames&lt;br /&gt;&lt;br /&gt;TO DO: compare points from first frame to the next.if object found get the new SIFT points of that object from the new frame and then compare to succeeding frame.&lt;br /&gt;&lt;br /&gt;objective: track using SIFT points without needed to preselect the cars&lt;br /&gt;&lt;br /&gt;code:&lt;br /&gt;&lt;br /&gt;img = imread([imgDir &#39;\&#39; fileNames(3).name]);&lt;br /&gt;[r c bands] = size(img);&lt;br /&gt;h=figure;&lt;br /&gt;imshow(img);&lt;br /&gt;hold on;&lt;br /&gt;&lt;br /&gt;....&lt;br /&gt;&lt;br /&gt;title(&#39;Click the top left corner of an object to track...&#39;);&lt;br /&gt;[x1 y1] = ginput(1);&lt;br /&gt;plot(x1, y1, &#39;rx&#39;);&lt;br /&gt;title(sprintf(&#39;Click the bottom right corner (Right click indicates last object)&#39;));&lt;br /&gt;[x2 y2 button] = ginput(1);&lt;br /&gt;objectCount = objectCount+1;&lt;br /&gt;rectangle(&#39;Position&#39;, [x1 y1 x2-x1 y2-y1], &#39;LineWidth&#39;, 4, &#39;EdgeColor&#39;, colors(mod(objectCount, size(colors,1))+1, :));&lt;br /&gt;&lt;br /&gt;.....&lt;br /&gt;&lt;br /&gt;% Find the sift features for the object&lt;br /&gt;imwrite(trackingObjects{objectCount}.img, &#39;tmp.pgm&#39;, &#39;pgm&#39;);&lt;br /&gt;[jnk des locs] = sift(&#39;tmp.pgm&#39;);&lt;br /&gt;trackingObjects{objectCount}.des = des;&lt;br /&gt;&lt;br /&gt;....&lt;br /&gt;&lt;br /&gt;% Read in the next image&lt;br /&gt;img = imread([imgDir &#39;\&#39; fileNames(ii).name]);&lt;br /&gt;&lt;br /&gt;% Show the image&lt;br /&gt;figure(h)&lt;br /&gt;cla;&lt;br /&gt;imshow(img); hold on;&lt;br /&gt;&lt;br /&gt;% Look for features in the image for each object we are tracking&lt;br /&gt;&lt;br /&gt;.....&lt;br /&gt;&lt;br /&gt;% Match the features for this object&lt;br /&gt;   clear match;&lt;br /&gt;   match = matchFeatures(trackingObjects{jj}.des, des);&lt;br /&gt;   clear newLocs&lt;br /&gt;   newLocs = locs(match(match&gt;0), :);&lt;br /&gt;&lt;br /&gt;   % Only proceed if we found at least one match&lt;br /&gt;   if ~isempty(newLocs)&lt;br /&gt;       print(&#39;match ound&#39;);&lt;br /&gt;....</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/4341132054232867358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/objective-is-to-find-object-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4341132054232867358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4341132054232867358'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/objective-is-to-find-object-in.html' title='SIFT tracking set1'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYUdJKMNDsgb9L3O2S9vevjj23T4VDsprOdkePCrEJBNI2b8NyuHCiD7Ijl_E_sM5qD1rVuwAoTYzpFzS-TvWk15lYlmW5Smssapxna4SuRIQlE6137CV1wQpuBL9zYmjzlh834zdp_yuS/s72-c/SIFT+Track.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-8988208640081651888</id><published>2010-09-21T21:20:00.000-07:00</published><updated>2010-10-04T03:07:44.696-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="computer vision"/><category scheme="http://www.blogger.com/atom/ns#" term="corner detection"/><category scheme="http://www.blogger.com/atom/ns#" term="david lowe"/><category scheme="http://www.blogger.com/atom/ns#" term="imageJ"/><category scheme="http://www.blogger.com/atom/ns#" term="keypoints"/><category scheme="http://www.blogger.com/atom/ns#" term="lowe"/><category scheme="http://www.blogger.com/atom/ns#" term="macro"/><category scheme="http://www.blogger.com/atom/ns#" term="Scale-invariant feature transform"/><title type='text'>SIFT by lowe using ImageJ (PARTIAL)</title><content type='html'>create a a plain text file and place the code in it.&lt;br /&gt;from within ImageJ, open any image&lt;br /&gt;From the ImageJ menu select PLUGINS -&gt; MACRO&#39;s -&gt; RUN&lt;br /&gt;&lt;br /&gt;results show the first 2 steps of SIFT, however the 3 step takes alot of time to process because we are going through each pixel and thats done for all 4 octaves.&lt;br /&gt;&lt;br /&gt;for short overview of &lt;a href=&quot;http://areshmatlab.blogspot.com/2010/07/details-behind-sift-feature-detection.html&quot;&gt;SIFT please see my post HERE&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p  style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;//*************************************************&lt;br /&gt;&lt;br /&gt;//                SIFT Step 1: Constructing a scale space&lt;br /&gt;&lt;br /&gt;//*************************************************&lt;br /&gt;//Lowe claims blur the image with a sigma of 0.5 and double it&#39;s dimensions&lt;br /&gt;&lt;br /&gt;width=getWidth(); height=getHeight();&lt;br /&gt;&lt;br /&gt;//------------------------------------------------------------------------&lt;br /&gt;// convert to 8-bit gray scale and create scale space for the first octave&lt;br /&gt;//------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Copy of original]&quot;);&lt;br /&gt;Oid = getImageID;&lt;br /&gt;run(&quot;8-bit&quot;);&lt;br /&gt;&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 1 blur1]&quot;);&lt;br /&gt;P1id1 = getImageID;&lt;br /&gt;run(&quot;Gaussian Blur...&quot;, &quot;slice radius=2&quot;); //blur 1&lt;br /&gt;&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 1 blur 2]&quot;);&lt;br /&gt;P1id2 = getImageID;&lt;br /&gt;run(&quot;Gaussian Blur...&quot;, &quot;slice radius=4&quot;); //blur 2&lt;br /&gt;&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 1 blur 3]&quot;);&lt;br /&gt;P1id3 = getImageID;&lt;br /&gt;run(&quot;Gaussian Blur...&quot;, &quot;slice radius=8&quot;); //blur 3&lt;br /&gt;&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 1 blur 4]&quot;);&lt;br /&gt;P1id4 = getImageID;&lt;br /&gt;run(&quot;Gaussian Blur...&quot;, &quot;slice radius=16&quot;); //blur 4&lt;br /&gt;&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 1 blur 5]&quot;);&lt;br /&gt;P1id5 = getImageID;&lt;br /&gt;run(&quot;Gaussian Blur...&quot;, &quot;slice radius=16&quot;); //blur 5&lt;br /&gt;showMessage(&quot;DONE&quot;, &quot;First OCTAVE&quot;);&lt;br /&gt;//----------------------------------------------------------------------------&lt;br /&gt;// Perform image resize on original and create second octave&lt;br /&gt;//----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;selectImage(Oid);&lt;br /&gt;run(&quot;Size...&quot;, &quot;width=&quot;+width/2+&quot; height=&quot;+ height/2);&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 2 blur1]&quot;); P2id1 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=2&quot;); //blur 1&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 2 blur 2]&quot;); P2id2 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=4&quot;); //blur 2&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 2 blur 3]&quot;); P2id3 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=8&quot;); //blur 3&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 2 blur 4]&quot;); P2id4 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=16&quot;); //blur 4&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 2 blur 5]&quot;); P2id5 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=16&quot;); //blur 5&lt;br /&gt;&lt;br /&gt;showMessage(&quot;DONE&quot;, &quot;Second OCTAVE&quot;);&lt;br /&gt;&lt;br /&gt;//----------------------------------------------------------------------------&lt;br /&gt;// Perform image resize on original and create Third octave&lt;br /&gt;//----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;selectImage(Oid);&lt;br /&gt;run(&quot;Size...&quot;, &quot;width=&quot;+width/4+&quot; height=&quot;+ height/4);&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 3 blur1]&quot;); P3id1 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=2&quot;); //blur 1&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 3 blur 2]&quot;); P3id2 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=4&quot;); //blur 2&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 3 blur 3]&quot;); P3id3 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=8&quot;); //blur 3&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 3 blur 4]&quot;); P3id4 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=16&quot;); //blur 4&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 3 blur 5]&quot;); P3id5 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=16&quot;); //blur 5&lt;br /&gt;showMessage(&quot;DONE&quot;, &quot;Third OCTAVE&quot;);&lt;br /&gt;&lt;br /&gt;//------------------------------------------------------------------------------&lt;br /&gt;// Perform image resize on original and create Forth octave&lt;br /&gt;//------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;selectImage(Oid);&lt;br /&gt;run(&quot;Size...&quot;, &quot;width=&quot;+width/8+&quot; height=&quot;+ height/8);&lt;br /&gt;&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 4 blur1]&quot;); P4id1 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=2&quot;); //blur 1&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 4 blur 2]&quot;); P4id2 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=4&quot;); //blur 2&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 4 blur 3]&quot;); P4id3 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=8&quot;); //blur 3&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 4 blur 4]&quot;); P4id4 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=16&quot;); //blur 4&lt;br /&gt;run(&quot;Duplicate...&quot;, &quot;title=[Octave 4 blur 5]&quot;); P4id5 = getImageID; run(&quot;Gaussian Blur...&quot;, &quot;slice radius=16&quot;); //blur 5&lt;br /&gt;&lt;br /&gt;showMessage(&quot;DONE&quot;, &quot;Forth OCTAVE&quot;);&lt;br /&gt;&lt;br /&gt;//**********************************************************&lt;br /&gt;//            SIFT Step 2: Laplacian of Gaussian Approximation&lt;br /&gt;//**********************************************************&lt;br /&gt;&lt;br /&gt;// input is 5 blurred images per octave&lt;br /&gt;// output is 4 images per octave&lt;br /&gt;&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P1id1, P1id2); Q1I1 = getImageID; rename(&quot;Result Subtract Octave 1&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P1id2, P1id3); Q1I2 = getImageID; rename(&quot;Result Subtract Octave 1&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P1id3, P1id4); Q1I3 = getImageID; rename(&quot;Result Subtract Octave 1&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P1id4, P1id5); Q1I4 = getImageID; rename(&quot;Result Subtract Octave 1&quot;);&lt;br /&gt;&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P2id1, P2id2); Q2I1 = getImageID; rename(&quot;Result Subtract Octave 2&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P2id2, P2id3); Q2I2 = getImageID; rename(&quot;Result Subtract Octave 2&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P2id3, P2id4); Q2I3 = getImageID; rename(&quot;Result Subtract Octave 2&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P2id4, P2id5); Q2I4 = getImageID; rename(&quot;Result Subtract Octave 2&quot;);&lt;br /&gt;&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P3id1, P3id2); Q3I1 = getImageID; rename(&quot;Result Subtract Octave 3&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P3id2, P3id3); Q3I2 = getImageID; rename(&quot;Result Subtract Octave 3&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P3id3, P3id4); Q3I3 = getImageID; rename(&quot;Result Subtract Octave 3&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P3id4, P3id5); Q3I4 = getImageID; rename(&quot;Result Subtract Octave 3&quot;);&lt;br /&gt;&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P3id1, P3id2); Q4I1 = getImageID; rename(&quot;Result Subtract Octave 4&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P3id2, P3id3); Q4I2 = getImageID; rename(&quot;Result Subtract Octave 4&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P3id3, P3id4); Q4I3 = getImageID; rename(&quot;Result Subtract Octave 4&quot;);&lt;br /&gt;imageCalculator(&#39;subtract&#39;, P3id4, P3id5); Q4I4 = getImageID; rename(&quot;Result Subtract Octave 4&quot;);&lt;br /&gt;&lt;br /&gt;//************************************************************&lt;br /&gt;//            SIFT Step 3: Finding key points&lt;br /&gt;//************************************************************&lt;br /&gt;&lt;br /&gt;//need to generate 2 extrema images&lt;br /&gt;// maxima and minima almost never lies exactly on a pixel. since its between pixels we need to locate it mathematically using Tylor expansion&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//--------------------------------------------------------------------------------&lt;br /&gt;// first octave&lt;br /&gt;//--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;selectImage(Q1I2);&lt;br /&gt;width=getWidth(); height=getHeight();&lt;br /&gt;&lt;br /&gt;num = 0; //number of points&lt;br /&gt;numRemoved = 0; //failed tested points&lt;br /&gt;&lt;br /&gt;for (xi=1; xi&amp;lt;width; xi++)&lt;br /&gt;{&lt;br /&gt;for(yi=1; yi&amp;lt;height; yi++)&lt;br /&gt;{&lt;br /&gt;justSet = 1;&lt;br /&gt;currentPixel = getPixel(xi, yi);&lt;br /&gt;&lt;br /&gt;       if (    (currentPixel &amp;gt; getPixel(yi+1, xi))     &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi+1))    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi-1))               )&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;               selectImage(Q1I1);&lt;br /&gt;if (    (currentPixel &amp;gt; getPixel(yi+1, xi))     &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi+1))    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi-1))               )&lt;br /&gt;&lt;br /&gt;                       {&lt;br /&gt;selectImage(Q1I3);&lt;br /&gt;if (    (currentPixel &amp;gt; getPixel(yi+1, xi))     &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi+1))    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi-1))               )&lt;br /&gt;&lt;br /&gt;                                   {&lt;br /&gt;num++;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;           }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;print(&quot;first part= &quot; + num);&lt;br /&gt;&lt;br /&gt;selectImage(Q1I3);&lt;br /&gt;width=getWidth(); height=getHeight();&lt;br /&gt;for (xi=1; xi&amp;lt;width; xi++)&lt;br /&gt;{&lt;br /&gt;for(yi=1; yi&amp;lt;height; yi++)&lt;br /&gt;{&lt;br /&gt;justSet = 1;&lt;br /&gt;currentPixel = getPixel(xi, yi);&lt;br /&gt;&lt;br /&gt;if (    (currentPixel &amp;gt; getPixel(yi+1, xi))     &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi+1))    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi-1))               )&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;               selectImage(Q1I2);&lt;br /&gt;if (    (currentPixel &amp;gt; getPixel(yi+1, xi))     &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi+1))    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi-1))               )&lt;br /&gt;&lt;br /&gt;                       {&lt;br /&gt;&lt;br /&gt;                           selectImage(Q1I4);&lt;br /&gt;if (    (currentPixel &amp;gt; getPixel(yi+1, xi))     &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi, xi+1))    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi-1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi-1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi+1) )    &amp;amp;&lt;br /&gt;(currentPixel &amp;gt; getPixel(yi+1, xi-1))               )&lt;br /&gt;&lt;br /&gt;                                   {&lt;br /&gt;&lt;br /&gt;                                       num++;&lt;br /&gt;&lt;br /&gt;                                   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;           }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;print(&quot;second part= &quot;+num);&lt;br /&gt;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//+++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;// process takes too long... alternative MY IDEA&lt;br /&gt;&lt;br /&gt;//+++++++++++++++++++++++++++++++++++++++++++&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: arial; color: rgb(0, 102, 0); font-weight: bold;&quot;&gt;Randomly select points and compare it to a threshold if its maximum or minimum to the 26 neighbors then consider that point to be on a blob based on:&lt;/p&gt;&lt;p style=&quot;font-family: arial;&quot;&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;T. Lindeberg. Scale-Space Theory in Computer Vision.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;Kluwer Academic Publishers, Norwell, MA, USA, 1994.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; color: rgb(0, 102, 0); font-weight: bold;&quot;&gt;Quote: &quot;local extrema points are located in a blob region&quot;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p  style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;So instead of going through each pixel of the image in multiple scales: select a specific number of random points and compare with the 26 neighbors. if you get a specific number of points that are maximum of minimum then continue to the next step if not get another set of random points until your specific number of maximum and minimum points are found.&lt;/span&gt;&lt;/p&gt;&lt;p  style=&quot;font-family:courier new;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p face=&quot;courier new&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;CODE TO FOLLOW&lt;br /&gt;&lt;/span&gt;                                        &lt;/p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/8988208640081651888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/sift-by-lowe-using-imagej-partial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/8988208640081651888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/8988208640081651888'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/sift-by-lowe-using-imagej-partial.html' title='SIFT by lowe using ImageJ (PARTIAL)'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-3185742627520161131</id><published>2010-09-03T05:28:00.000-07:00</published><updated>2010-09-26T20:25:13.045-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2 camera"/><category scheme="http://www.blogger.com/atom/ns#" term="angle camera"/><category scheme="http://www.blogger.com/atom/ns#" term="disparity"/><category scheme="http://www.blogger.com/atom/ns#" term="Disparity Map"/><category scheme="http://www.blogger.com/atom/ns#" term="stereo vision"/><title type='text'>Angled stereo vision</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3uf2K0KgCB4f9GUpCXphtmBM7eG2caChwsDF0JyqttwOr9cg4QPelnnwbrbcALZugVmy5pTwrNrgFCeGXRqFqdmR0g-M7z5UFWxVBsU3a24mYzVgU16dVSD40HXYgpsZd0lJhzKu3s7EI/s1600/newData.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 258px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3uf2K0KgCB4f9GUpCXphtmBM7eG2caChwsDF0JyqttwOr9cg4QPelnnwbrbcALZugVmy5pTwrNrgFCeGXRqFqdmR0g-M7z5UFWxVBsU3a24mYzVgU16dVSD40HXYgpsZd0lJhzKu3s7EI/s400/newData.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5512676163222603650&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP51CY_TUR8fOs1pp3QoW5J56sXIT3U2RE94pQ_KcK92VSmuQkptfDg7_iIbtTumh_rCyyUjZFcEfC1ACH5gQCREXm2ZZS5gnFhU1JkRhgsc0R3U0-I4NK0iO6M2_ajDC1NncoQj4guF-H/s1600/resut.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP51CY_TUR8fOs1pp3QoW5J56sXIT3U2RE94pQ_KcK92VSmuQkptfDg7_iIbtTumh_rCyyUjZFcEfC1ACH5gQCREXm2ZZS5gnFhU1JkRhgsc0R3U0-I4NK0iO6M2_ajDC1NncoQj4guF-H/s400/resut.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5512676160926914306&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFPg-Fl5CoM7fPD5-BOGwkAWGs3LiVkvuzYAPbih9vDqUyU3KJ5Mfsg5FQGE2AGauDBtbosnb1uQUIVgiPXtwUNd9iH7ZdH_GRDx5mTPXpx2W11IlIQL0tDL6zV2yep5GB7QrAosd99SLH/s1600/aresh.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 460px; height: 354px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFPg-Fl5CoM7fPD5-BOGwkAWGs3LiVkvuzYAPbih9vDqUyU3KJ5Mfsg5FQGE2AGauDBtbosnb1uQUIVgiPXtwUNd9iH7ZdH_GRDx5mTPXpx2W11IlIQL0tDL6zV2yep5GB7QrAosd99SLH/s400/aresh.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5514138117104057842&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: right;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJHmhmyxljAi4NNfyT3kOKGSmxvkz9_Z6v535J2RP892MxC8AQnOCADYx6QY_Robtgwh4_TJiYkUecDx93_qkzL9F45Wv22lVmBHmKyH_elEDACpzBI4DiMZbS_JD1KColFYqgn0d2AOD7/s1600/DSC02447.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 266px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJHmhmyxljAi4NNfyT3kOKGSmxvkz9_Z6v535J2RP892MxC8AQnOCADYx6QY_Robtgwh4_TJiYkUecDx93_qkzL9F45Wv22lVmBHmKyH_elEDACpzBI4DiMZbS_JD1KColFYqgn0d2AOD7/s400/DSC02447.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5512675800928747778&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBxaHDaQRX69N68wdHQcNKxxmMoqcm2OwIB6zhAErb35pyetIjY035fnXGa1rTCgyU_1Mtv_Y9DeovWO1evhGqfR5u_dsyWdipWIroTB834TOb7nfMg6YFTIlDdq-8ee5x4EbHySwTT8kf/s1600/DSC02446.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 266px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBxaHDaQRX69N68wdHQcNKxxmMoqcm2OwIB6zhAErb35pyetIjY035fnXGa1rTCgyU_1Mtv_Y9DeovWO1evhGqfR5u_dsyWdipWIroTB834TOb7nfMg6YFTIlDdq-8ee5x4EbHySwTT8kf/s400/DSC02446.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5512675788679086786&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8y0PpZK_m1bm0GzZ5h2DVLv12jOOkYcCeT-KDdLNqviTd6ENihujwjaJbpYbvhMdrOyjKo-Ez4DMXyMWFQoqPtPLuVYib_y_ioAWH4mTEGnJj5YXFWA5MckAx_icZVsbWOQeolFgXVdxW/s1600/DSC02445.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 266px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8y0PpZK_m1bm0GzZ5h2DVLv12jOOkYcCeT-KDdLNqviTd6ENihujwjaJbpYbvhMdrOyjKo-Ez4DMXyMWFQoqPtPLuVYib_y_ioAWH4mTEGnJj5YXFWA5MckAx_icZVsbWOQeolFgXVdxW/s400/DSC02445.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5512675785326539954&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbeKUkZ3ysF0OsVNh2JlThT8-S7jNEnTxZUvb_gY4d-pRVAt-Fo-o2ok8FnoXsym4ZdqSsE7mGDaWOuboapKCI9J230va7Q_jWoa5iatdsV6R1D5t6kltrEhyphenhyphenHI2v3G35qK69wK2ERYREe/s1600/DSC02444.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 266px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbeKUkZ3ysF0OsVNh2JlThT8-S7jNEnTxZUvb_gY4d-pRVAt-Fo-o2ok8FnoXsym4ZdqSsE7mGDaWOuboapKCI9J230va7Q_jWoa5iatdsV6R1D5t6kltrEhyphenhyphenHI2v3G35qK69wK2ERYREe/s400/DSC02444.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5512675779308861218&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZkRmtv9FJdJwhK2rYhvoUv46Lj6bUZxi0mI_d4rW7kfNRquVXXkUVGQZYns9PsQQJ7EewBYB9VzPWW5FeX79ioi5CvHFUvzXs38kgwK6KDiyZLMFTZDsoJcMUYLYdOynIxM0g3YFPiDae/s1600/DSC02443.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 266px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZkRmtv9FJdJwhK2rYhvoUv46Lj6bUZxi0mI_d4rW7kfNRquVXXkUVGQZYns9PsQQJ7EewBYB9VzPWW5FeX79ioi5CvHFUvzXs38kgwK6KDiyZLMFTZDsoJcMUYLYdOynIxM0g3YFPiDae/s400/DSC02443.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5512675769488792162&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The distance between the lenses in a typical stereo camera (the  intra-axial distance) is about the distance between one&#39;s eyes (known as  the intra-ocular distance) and is about 6.35cm, though a longer base  line (greater inter-camera distance) produces more extreme  3-dimensionality.&lt;br /&gt;&lt;br /&gt;However we have 2 cameras which are &lt;span style=&quot;color: rgb(255, 0, 0); font-weight: bold;&quot;&gt;angled &lt;/span&gt;in contrast to the stereo vision camera where both cameras are parallel on a line&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/3185742627520161131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/angled-stereo-vision.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/3185742627520161131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/3185742627520161131'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/09/angled-stereo-vision.html' title='Angled stereo vision'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3uf2K0KgCB4f9GUpCXphtmBM7eG2caChwsDF0JyqttwOr9cg4QPelnnwbrbcALZugVmy5pTwrNrgFCeGXRqFqdmR0g-M7z5UFWxVBsU3a24mYzVgU16dVSD40HXYgpsZd0lJhzKu3s7EI/s72-c/newData.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-4471561532411897118</id><published>2010-08-29T21:01:00.000-07:00</published><updated>2010-08-29T22:14:07.756-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fast hessian matrix"/><category scheme="http://www.blogger.com/atom/ns#" term="Hessian Matrix"/><title type='text'>Hessian Matrix</title><content type='html'>&lt;span style=&quot;font-style: italic;&quot;&gt;In mathematics, the Hessian matrix (or simply the Hessian) is the square matrix of second-order partial derivatives of a function; that is, it describes the local curvature of a function of many variables.&lt;/span&gt;  &lt;span style=&quot;font-style: italic;&quot;&gt;The second derivative can be applied at a non-degenerate critical point x. If the Hessian is positive definite at x, then f attains a local minimum at x. If the Hessian is negative definite at x, then f attains a local maximum at x. If the Hessian has both positive and negative eigenvalues then x is a saddle point for f (this is true even if x is degenerate). Otherwise the test is inconclusive.&lt;/span&gt;  &lt;span style=&quot;font-style: italic;&quot;&gt;In view of what has just been said, the second derivative test for functions of one and two variables is simple. In one variable, the Hessian contains just one second derivative; if it is positive then x is a local minimum, if it is negative then x is a local maximum; if it is zero then the test is inconclusive. In two variables, the discriminant can be used, because the determinant is the product of the eigenvalues. If it is positive then the eigenvalues are both positive, or both negative. If it is negative then the two eigenvalues have different signs. If it is zero, then the second derivative test is inconclusive(wikipdia).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;consider a continuous function of two variables such that the value of the function at (x,y) is given by f(x,y). The Hessian matrix, H, is the matrix of partial derivates of the function f.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7x_si5Y0fOPNdfdqu8M6_YGSaEPP1nSaXAMxpglouZDxo8OWnsCaWnOBLHpperuu_IlHi8-c7ILrmttjUhKQAWr8uSxAa8m9ugOSQoRRAmzMN_KW_XEBnLI2PTnjtsGLzuo7ZWqh7e6KM/s1600/hessianMatrix.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 196px; height: 57px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7x_si5Y0fOPNdfdqu8M6_YGSaEPP1nSaXAMxpglouZDxo8OWnsCaWnOBLHpperuu_IlHi8-c7ILrmttjUhKQAWr8uSxAa8m9ugOSQoRRAmzMN_KW_XEBnLI2PTnjtsGLzuo7ZWqh7e6KM/s400/hessianMatrix.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5511050379395264914&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The determinant of this matrix, known as the discriminant, is calculated by:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKvUxbyZBGcGdhbtcGocFvbNe3Ae75fj8IzJ9MCjASughSThhXZ4rPVpNpsoly-Xl8WNohvArCCTxjzSr0NfUrkAgJAixtQinldLlOORx5UqQjdox6EYFVtYWN8f5TTDqDj1ZwKZXuOzB4/s1600/derivative.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 190px; height: 51px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKvUxbyZBGcGdhbtcGocFvbNe3Ae75fj8IzJ9MCjASughSThhXZ4rPVpNpsoly-Xl8WNohvArCCTxjzSr0NfUrkAgJAixtQinldLlOORx5UqQjdox6EYFVtYWN8f5TTDqDj1ZwKZXuOzB4/s400/derivative.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5511050375291230754&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;The &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;value of the discriminant is used to classify the maxima and minima of the function &lt;/span&gt;by the second order derivative test. Since the determinant is the product of eigenvalues of the Hessian we can classify the points based on the sign of the result. If the determinant is negative then the eigenvalues have different signs and hence the point is not a local extremum; if it is positive then either both eigenvalues are positive or both are negative and in either case the point is classified as an extremum.&lt;br /&gt;&lt;br /&gt;NOTE:&lt;br /&gt;&lt;br /&gt;We can calculate the derivatives by convolution with an appropriate kernel. In the case of SURF the &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;second order scale normalised Gaussian&lt;/span&gt; is the chosen filter as it allows for analysis over scales as well as space. We can construct kernels for the Gaussian derivatives in x, y and combined xy direction such that we calculate the four entries of the Hessian matrix. Use of the Gaussian allows us to vary the amount of smoothing during the convolution stage so that the determinant is calculated at different scales. Furthermore, since the Gaussian is an isotropic (i.e. circularly symmetric) function, convolution with the kernel allows for rotation invariance.&lt;br /&gt;&lt;br /&gt;Lowe found performance increase in approximating the Laplacian of Gaussians by a difference of Gaussians. In a similiar manner, Bay proposed an approximation to the Laplacian of Gaussians by using box filter representations of the respective kernels.</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/4471561532411897118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/hessian-matrix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4471561532411897118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4471561532411897118'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/hessian-matrix.html' title='Hessian Matrix'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7x_si5Y0fOPNdfdqu8M6_YGSaEPP1nSaXAMxpglouZDxo8OWnsCaWnOBLHpperuu_IlHi8-c7ILrmttjUhKQAWr8uSxAa8m9ugOSQoRRAmzMN_KW_XEBnLI2PTnjtsGLzuo7ZWqh7e6KM/s72-c/hessianMatrix.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-2392623819704787213</id><published>2010-08-29T19:56:00.000-07:00</published><updated>2010-08-29T20:19:58.721-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="histogram"/><title type='text'>Histogram</title><content type='html'>A histogram is one of the basic quality tools. It is used to graphically summarize and display the distribution and variation of a process data set. A frequency distribution shows how often each different value in a set of data occurs. The main purpose of a histogram is to clarify the presentation of data.&lt;br /&gt;&lt;br /&gt;• • •&lt;br /&gt;What is the most common system response?&lt;br /&gt;What distribution (center, variation and shape) does the data have?&lt;br /&gt;Does the data look symmetric or is it skewed to the left or right?&lt;br /&gt;&lt;br /&gt;Typical applications of histograms in root cause analysis include:&lt;br /&gt;•    Presenting data to determine which causes dominate&lt;br /&gt;•    Understanding the distribution of occurrences of different problems, causes,consequences, etc.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-size:130%;&quot; &gt;Weaknesses&lt;/span&gt;&lt;br /&gt;There are two weaknesses of histograms that you should bear in mind. The first is that histograms can be manipulated to show different pictures. If too few or too many bars are used, the histogram can be misleading. This is an area which requires some judgment, and perhaps some experimentation, based on the analyst&#39;s experience.&lt;br /&gt;Histograms can also obscure the time differences among data sets.&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;furthermore there is a loss of individual measurements due to grouping.  Misrepresentation of data from groups that are too wide or too narrow.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Distributions to encounter:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMZUfERVmujaq5DZ_jvuw9To7i9BjbAivrxiCJT3zNyCm4edp0oUoS-mnGmVqt3WC23S_JbOmdM1qo4Ev6MTJQ9bme94jTzEbm5wGue1ZJjA750iaVYNTA4N9oJzbbmTkxMSE5aMYdX5E0/s1600/bimodal.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 322px; height: 133px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMZUfERVmujaq5DZ_jvuw9To7i9BjbAivrxiCJT3zNyCm4edp0oUoS-mnGmVqt3WC23S_JbOmdM1qo4Ev6MTJQ9bme94jTzEbm5wGue1ZJjA750iaVYNTA4N9oJzbbmTkxMSE5aMYdX5E0/s400/bimodal.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5511036929235459026&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Bi-Modal (double-peaked)&lt;/span&gt;&lt;br /&gt;Distribution appears to have two peaks&lt;br /&gt; •    May indicate that data from more than one process are mixed together&lt;br /&gt;       o    Materials may have come from two separate vendors&lt;br /&gt;       o    Samples may have come from two separate machines&lt;br /&gt;•    A bi-modal curve often means that the data actually reflects two distinct processes with different centers. You will need to distinguish between the two processes to get a clear view of what is really happening in either individual process.</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/2392623819704787213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/histogram.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/2392623819704787213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/2392623819704787213'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/histogram.html' title='Histogram'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMZUfERVmujaq5DZ_jvuw9To7i9BjbAivrxiCJT3zNyCm4edp0oUoS-mnGmVqt3WC23S_JbOmdM1qo4Ev6MTJQ9bme94jTzEbm5wGue1ZJjA750iaVYNTA4N9oJzbbmTkxMSE5aMYdX5E0/s72-c/bimodal.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-3658647064210465635</id><published>2010-08-29T05:18:00.002-07:00</published><updated>2010-09-26T20:17:42.582-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Speed Up Robust Features"/><category scheme="http://www.blogger.com/atom/ns#" term="SURF"/><title type='text'>SURF Details (Speed Up Robust Features)</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;SURF (Speeded Up Robust Features) &lt;/span&gt;is a robust image detector &amp;amp; descriptor, first presented by Herbert Bay et al. in 2006, that can be used in computer vision tasks like object recognition or 3D reconstruction. It is partly inspired by the SIFT descriptor. The standard version of SURF is several times faster than SIFT and claimed by its authors to be more robust against different image transformations than SIFT. SURF is based on sums of approximated 2D Haar wavelet responses and makes an efficient use of integral images.&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; As basic image features it uses a Haar wavelet approximation of the determinant of Hessian blob detector&lt;/span&gt; (WIKIPEDIA).&lt;br /&gt;&lt;br /&gt;The performance gain in the SURF Implementation is due to use of integral images (See my post on &lt;a href=&quot;http://areshmatlab.blogspot.com/2010/08/computing-integral-images-summed-area.html&quot;&gt;Integral Images&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;In constructing the scale space, Lowe proposed a difference of Gaussian to approximate the Laplacian of Gaussian.The images were blurred and subsampled to produce a scale space. After which the difference of gaussian was used to estimate the laplacian gaussian.&lt;br /&gt;&lt;br /&gt;in SURF this was done using a box filter representation of a kernel. This kernel was used to produce the pyramid and kept the original image unchanged while changing the filter size.&lt;br /&gt;&lt;br /&gt;TO DO: Add more of the details</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/3658647064210465635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/surf-details-speed-up-robust-features.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/3658647064210465635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/3658647064210465635'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/surf-details-speed-up-robust-features.html' title='SURF Details (Speed Up Robust Features)'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-4942406163826431369</id><published>2010-08-29T05:18:00.001-07:00</published><updated>2010-09-26T20:18:09.802-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PCA"/><category scheme="http://www.blogger.com/atom/ns#" term="PCA-SIFT"/><category scheme="http://www.blogger.com/atom/ns#" term="principal component analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="sift"/><title type='text'>PCA-SIFT Details</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;PCA-SIFT&lt;/span&gt; was introduced as an improvement for SIFT. The implementation only differs in the 4th step (keypoint descriptor). PCA-SIFT uses Principal Component Analysis (PCA) instead of a histogram to normalize the gradient patch.  Hence, the feature vector is significantly smaller than the standard SIFT feature vector.&lt;br /&gt;&lt;br /&gt;It differs from the original SIFT implementation in &lt;span style=&quot;font-weight: bold;&quot;&gt;its forth stage&lt;/span&gt;. By reducing the 128 element of the original SIFT using PCA, results in a significant space benefit.&lt;br /&gt;&lt;br /&gt;Another difference is the input vector is created by concatenating the horizontal and vertical gradient maps for 41x41 patch centered at the keypoint. Producing 2x39x39 = 3042 vector elements. The fewer components of PCA-SIFT requires less storage therefore, resulting in faster matching. The dimensionality of this feature space  is arbitrary chosen as n=20, which results in a significant space benefit.&lt;br /&gt;&lt;br /&gt;TO DO: add more detail</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/4942406163826431369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/pca-sift-details.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4942406163826431369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4942406163826431369'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/pca-sift-details.html' title='PCA-SIFT Details'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-7632620544958647189</id><published>2010-08-29T04:13:00.000-07:00</published><updated>2010-08-29T04:53:04.535-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="log-polar transform"/><title type='text'>The Log-Polar Transform</title><content type='html'>The log-polar transform is a simple operation that changes the coordinate system of an image from Cartesian to log-polar.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk51yI1qO1XCvz5Nic41axIijJgQmf4YbCEb4rDmU5ZZymxMpL8PPz2dKtQ0tnHcMmMpAA62wE5sDyfKVrZ2q5HzHo6uyh_dWi_0D0B0MxoHGfFrTClJJ6PbyJzA_CFN-dLMrIRgJCTR4A/s1600/log-polarTransform.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 309px; height: 146px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk51yI1qO1XCvz5Nic41axIijJgQmf4YbCEb4rDmU5ZZymxMpL8PPz2dKtQ0tnHcMmMpAA62wE5sDyfKVrZ2q5HzHo6uyh_dWi_0D0B0MxoHGfFrTClJJ6PbyJzA_CFN-dLMrIRgJCTR4A/s400/log-polarTransform.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5510789193385793250&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Before and after conversion to logpolar coordinate system&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Log-polar coordinates have several interesting properties::..&lt;br /&gt;First, when optical flow is computed as the camera moves along the optical axis (as is common in robotics), the optical flow vectors are radial from the image center. However, in log-polar coordinates, the flow vectors are vertical. This can make the detection of moving objects more efficient computationally.&lt;br /&gt;&lt;br /&gt;Second, the log polar transform &lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;converts an image to a form that is rotation and scale invarian&lt;/span&gt;t. This can be very helpful for object detection. Finally, the log-polar transform emulates how images appear on the back of the human retina. (The brain then transforms the image to the Cartesian-like way we perceive it.)&lt;br /&gt;&lt;br /&gt;In Matlab (http://www.mathworks.com/matlabcentral/newsreader/view_thread/108599):&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;function [pim,zoff] =  PolarTransform(img,zcenter,rs,thetas)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; % function [pim,zoff] =  PolarTransform(img,zcenter,rs,thetas)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; % extract the polar transform of a section of img&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; % polar transform origin at zcenter(x+iy)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; % rs(pixels),thetas(radians) are sets of radii and angles to sample&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; %  if they are scalars, then the radii are 1:r&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; %  and thetas is taken to be dtheta in&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; %  thetas = linspace(0, 2*pi , round(2*pi/dtheta) ); thetas =&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; thetas(1:end-1)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; % zoff are the coordinates of the sample points in the original image&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; (x+iy)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; % REA 4/15-6/1/05&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; if isscalar(rs)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;   rs = 1:round(rs);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; end&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; if isscalar(thetas)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;   thetas = linspace(0, 2*pi , round(2*pi/thetas) );&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;   thetas = thetas(1: (end-1) );&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; end&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; [thetas_img,rs_img] = meshgrid(thetas,rs);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; [xs,ys] = pol2cart(thetas_img,rs_img);&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; % offset the x,y coords to the appropriate location&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; zoff = complex(xs,ys) + zcenter;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; % and extract the image data&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; pim = interp2(img,real(zoff),imag(zoff),&#39;nearest&#39;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Furthermore:&lt;br /&gt;&lt;br /&gt;&lt;h3 class=&quot;subcategorytitle&quot; id=&quot;f16-6410&quot;&gt;Cartesian Coordinate System Conversion&lt;/h3&gt;&lt;a name=&quot;coordinate_system_conversion&quot;&gt;&lt;/a&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tbody&gt;&lt;tr valign=&quot;top&quot;&gt;&lt;td width=&quot;150&quot;&gt;&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/cart2pol.html&quot;&gt;cart2pol&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Transform Cartesian coordinates to polar or cylindrical&lt;/td&gt;&lt;/tr&gt;&lt;tr valign=&quot;top&quot;&gt;&lt;td width=&quot;150&quot;&gt;&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/cart2sph.html&quot;&gt;cart2sph&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Transform Cartesian coordinates to spherical&lt;/td&gt;&lt;/tr&gt;&lt;tr valign=&quot;top&quot;&gt;&lt;td width=&quot;150&quot;&gt;&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/pol2cart.html&quot;&gt;pol2cart&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Transform polar or cylindrical coordinates to Cartesian&lt;/td&gt;&lt;/tr&gt;&lt;tr valign=&quot;top&quot;&gt;&lt;td width=&quot;150&quot;&gt;&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/sph2cart.html&quot;&gt;sph2cart&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Transform spherical coordinates to Cartesian&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/7632620544958647189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/log-polar-transform.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/7632620544958647189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/7632620544958647189'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/log-polar-transform.html' title='The Log-Polar Transform'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk51yI1qO1XCvz5Nic41axIijJgQmf4YbCEb4rDmU5ZZymxMpL8PPz2dKtQ0tnHcMmMpAA62wE5sDyfKVrZ2q5HzHo6uyh_dWi_0D0B0MxoHGfFrTClJJ6PbyJzA_CFN-dLMrIRgJCTR4A/s72-c/log-polarTransform.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-5060445784740394352</id><published>2010-08-29T03:54:00.001-07:00</published><updated>2010-09-26T20:22:23.101-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aresh Notes"/><title type='text'>Notes: SURF Haar like feature (Copy paste from source)</title><content type='html'>In matching keypoints, using euclidean distance:&lt;br /&gt;A &lt;span style=&quot;font-weight: bold;&quot;&gt;correct-positive&lt;/span&gt; is a match where the two keypoints correspond to the same physical location (as determined either by ground truth for labeled images, or using known image transformations for synthetic image de-formation tests). A &lt;span style=&quot;font-weight: bold;&quot;&gt;false-positive&lt;/span&gt; is a match where the two keypoints come from different physical locations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Haar wavelet is also the simplest possible wavelet. The technical disadvantage of the Haar wavelet is that it is not continuous, and therefore not differentiable. This property can, however, be an advantage for the analysis of signals with sudden transitions, such as monitoring of tool failure in machines&lt;br /&gt;&lt;br /&gt;A Haar-like feature considers adjacent rectangular regions at a specific location in a detection window, sums up the pixel intensities in these regions and calculates the difference between them. This difference is then used to &lt;a href=&quot;http://en.wikipedia.org/wiki/Categorization&quot; title=&quot;Categorization&quot;&gt;categorize&lt;/a&gt; subsections of an image. For example, let us say we have an image database with human &lt;a href=&quot;http://en.wikipedia.org/wiki/Face&quot; title=&quot;Face&quot;&gt;faces&lt;/a&gt;. It is a common observation that among all faces the region of the eyes is darker than the region of the cheeks. Therefore a common haar feature for face detection is a set of two adjacent rectangles that lie above the eye and the cheek region. The position of these rectangles is defined relative to a detection window that acts like a bounding box to the target object (the face in this case).&lt;br /&gt;&lt;br /&gt;a window of the target size is moved over the input image, and for each subsection of the image the Haar-like feature is calculated. This difference is then compared to a learned threshold that separates non-objects from objects. Because such a Haar-like feature is only a weak learner or classifier (its detection quality is slightly better than random guessing) a large number of Haar-like features is necessary to describe an object with sufficient accuracy. In the Viola-Jones object detection framework, the Haar-like features are therefore organized in something called a &lt;i&gt;classifier cascade&lt;/i&gt; to form a strong learner or classifier.&lt;br /&gt;&lt;br /&gt;The key advantage of a Haar-like feature over most other features is its calculation speed. Due to the use of &lt;i&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Integral_image&quot; title=&quot;Integral image&quot; class=&quot;mw-redirect&quot;&gt;integral images&lt;/a&gt;&lt;/i&gt;, a Haar-like feature of any size can be calculated in constant time (approximately 60 microprocessor instructions for a 2-rectangle feature).</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/5060445784740394352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/notes-surf-haar-like-feature-copy-paste.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/5060445784740394352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/5060445784740394352'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/notes-surf-haar-like-feature-copy-paste.html' title='Notes: SURF Haar like feature (Copy paste from source)'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-4493013622202938769</id><published>2010-08-29T03:53:00.001-07:00</published><updated>2010-08-29T21:26:57.494-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="image processing"/><category scheme="http://www.blogger.com/atom/ns#" term="pyrmids"/><category scheme="http://www.blogger.com/atom/ns#" term="sift"/><title type='text'>Pyramids</title><content type='html'>It is a type of multi-scale signal representation developed by the computer vision, image processing and signal processing communities, in which a signal or an image is subject to repeated smoothing and subsampling. Historically, pyramid representation is a predecessor to scale space representation and multiresolution analysis (WIKIPEDIA).&lt;br /&gt;&lt;br /&gt;There are 2 types of pyramids: the lowpass and bandpass.&lt;br /&gt;SIFT uses LOWPASS pyramids: A &lt;i&gt;lowpass pyramid&lt;/i&gt; is generated by first smoothing the image with an appropriate smoothing filter and then subsampling the smoothed image, &lt;span style=&quot;font-style: italic; color: rgb(255, 0, 0);&quot;&gt;usually by a factor of two&lt;/span&gt; along each coordinate direction.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNNiAm8_YKj4M8J77FV5jb7_fPsrbfYY_kZ5JspN4necTqr4RlB4KEOJbFEEo_lk5eIZFyZi2uspb9uUVBsKvCscfRYRrBBx-N4yd-2_gOpohLAIyI8ImZtviBkhYjj6QzI0qfpCTBW2sj/s1600/lowpass.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 349px; height: 165px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNNiAm8_YKj4M8J77FV5jb7_fPsrbfYY_kZ5JspN4necTqr4RlB4KEOJbFEEo_lk5eIZFyZi2uspb9uUVBsKvCscfRYRrBBx-N4yd-2_gOpohLAIyI8ImZtviBkhYjj6QzI0qfpCTBW2sj/s400/lowpass.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5510786254920989026&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A &lt;i&gt;bandpass pyramid&lt;/i&gt; is obtained by forming the difference between adjacent levels in a pyramid, where in addition some kind of interpolation is performed between representations at adjacent levels of resolution, to enable the computation of pixelwise differences.&lt;br /&gt;&lt;br /&gt;Disadvantage:&lt;br /&gt;Pyramid representation leads to rapidly decreasing image size. This reduces computational work in computation of the representation and subsequent processing. The main disadvantage of with pyramids is that they are defined from a logarithmic process, making theoritical analysis complicated. Furthermore, they correspond to quite a coarse quantization along the scale direction, which makes logarithmically hard to relate images structures across multiple scales. ...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A&lt;span style=&quot;color: rgb(255, 204, 51); font-weight: bold; font-style: italic;&quot;&gt; scale-space&lt;/span&gt; is a continuous function which can be used to find extrema across all possible scales [A. Witkin. Scale-space filtering, int. joint conf. Artif. Intell, 2:1019–1021, 1983.].&lt;br /&gt;&lt;br /&gt;In computer vision the scale-space is typically implemented as an&lt;span style=&quot;font-weight: bold;&quot;&gt; image pyramid&lt;/span&gt; where the input image is iteratively convolved with Gaussian kernel and repeatedly sub-sampled (reduced in size). This method is used to great effect in SIFT (See my post of &lt;a href=&quot;http://areshmatlab.blogspot.com/2010/07/details-behind-sift-feature-detection.html&quot;&gt;SIFT Details&lt;/a&gt;)  but since each layer relies on the previous, and images need to be resized it is not computationally efficient.&lt;br /&gt;&lt;br /&gt;Another way to construct the scale-space is by applying kernels of increasing size to the original image. This allows for multiple layers of the scale-space pyramid to be processed simultaneously and negates the need to subsample the image hence providing performance increase.&lt;br /&gt;&lt;br /&gt;The SURF approach  leaves the original image unchanged and varies only the filter size.&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;br /&gt;H. Bay, T. Tuytelaars, and L. Van Gool. Surf: Speeded up robust features. European Conference on Computer Vision, 1:404–417, 2006.&lt;br /&gt;&lt;br /&gt;D.G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91–110, 2004.</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/4493013622202938769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/pyramids.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4493013622202938769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4493013622202938769'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/pyramids.html' title='Pyramids'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNNiAm8_YKj4M8J77FV5jb7_fPsrbfYY_kZ5JspN4necTqr4RlB4KEOJbFEEo_lk5eIZFyZi2uspb9uUVBsKvCscfRYRrBBx-N4yd-2_gOpohLAIyI8ImZtviBkhYjj6QzI0qfpCTBW2sj/s72-c/lowpass.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-4003554293798401328</id><published>2010-08-28T23:32:00.000-07:00</published><updated>2010-09-30T01:11:00.868-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="integral images"/><category scheme="http://www.blogger.com/atom/ns#" term="summed area table"/><category scheme="http://www.blogger.com/atom/ns#" term="viola-jones"/><title type='text'>computing integral images (summed area table)</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-CojEECgSiXrLXPH9ZPtXP1x9wuq1ygug4mIep79rz5VM_FoyVDa_ult-kPQGR88h6z3ws54HDJxyAN98juDs-ttHvNupewz1W-2HKbxs4i4Ekp6PaThwkB5xq-K8swCvb3goX-F1wDnl/s1600/boxfilter.jpg&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;A &lt;b&gt;summed area table&lt;/b&gt; (also known as an &lt;b&gt;integral image&lt;/b&gt;) is an algorithm for quickly and efficiently generating the sum of values in a rectangular subset of a grid.&lt;br /&gt;&lt;br /&gt;The idea behind summed area tables is that you build a two dimensional running sum of the image.&lt;br /&gt;its widely used in the computer vision community when it was used by &lt;a href=&quot;http://en.wikipedia.org/wiki/Viola-Jones_object_detection_framework&quot; title=&quot;Viola-Jones object detection framework&quot;&gt;Viola-Jones object detection framework&lt;/a&gt; twenty years after its introduction.     &lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Viola, Paul; Jones, Michael (2002). &quot;Robust Real-time Object Detection&quot;. International Journal of Computer Vision. http://research.microsoft.com/~viola/Pubs/Detect/violaJones_IJCV.pdf.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Integral Images is done for GRAY SCALE Image.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;In MATLAB, integral images is computed via the following function:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;This function computes an integral image&lt;br /&gt;such that the value of intim(r,c)&lt;br /&gt;equals sum(sum(im(1:r, 1:c))&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: courier new;&quot;&gt;intim = cumsum(cumsum(im,1),2);&lt;/pre&gt;A summed area table, or integral&lt;br /&gt;image, can be generated by computing the cumulative sums along the rows of an image and then computing the cumulative sums down the columns. Thus the value at any point (x, y) in the integral image is the sum of all the image pixels above and to the left of (x, y), inclusive.&lt;br /&gt;&lt;br /&gt;The integral image is computed rapidly from an input image and is used to speed up the calculation of any upright rectangular area. Used in the &lt;a href=&quot;http://areshmatlab.blogspot.com/2010/08/surf-details-speed-up-robust-features.html&quot;&gt;SURF&lt;/a&gt; implementation&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style=&quot;color: rgb(0, 102, 0);font-size:85%;&quot; &gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    [rows, cols] = size(intim);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    fim = zeros(rows, cols);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    [nfilters, fcols] = size(f);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    if fcols ~= 5&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        error(&#39;Filters must be specified via an nx5 matrix&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    f(:,1:2) = f(:,1:2)-1;       % Adjust the values of r1 and c1 to save addition&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;                                 % operations inside the loops below&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    rmin =  1-min(f(:,1));       % Set loop bounds so that we do not try to&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    rmax =  rows - max(f(:,3));  % access values outside the image. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    cmin =  1-min(f(:,2));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    cmax =  cols - max(f(:,4));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    for r = rmin:rmax&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        for c = cmin:cmax&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;            for n = 1:nfilters&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;                fim(r,c) = fim(r,c) + f(n,5)*...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;                       (intim(r+f(n,3),c+f(n,4)) - intim(r+f(n,1),c+f(n,4)) ...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;                      - intim(r+f(n,3),c+f(n,2)) + intim(r+f(n,1),c+f(n,2)));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;            end&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;        end&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);font-size:85%;&quot; &gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;examples images to follow:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEgD2f4g6b38c6R6CIJqpe5UOJtseC0zKwCDD9KFevE_cJx094coGPMpDrB4r1J9LGe-dvM7UIgakyQZsnY1iBEtVniibrhmnFzaBugPe1MclMFJ9QQymquOuPWB3hHknl_32j3wXW5oVA/s1600/9.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 160px; height: 128px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEgD2f4g6b38c6R6CIJqpe5UOJtseC0zKwCDD9KFevE_cJx094coGPMpDrB4r1J9LGe-dvM7UIgakyQZsnY1iBEtVniibrhmnFzaBugPe1MclMFJ9QQymquOuPWB3hHknl_32j3wXW5oVA/s320/9.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5522615653339299410&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Original Image&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-CojEECgSiXrLXPH9ZPtXP1x9wuq1ygug4mIep79rz5VM_FoyVDa_ult-kPQGR88h6z3ws54HDJxyAN98juDs-ttHvNupewz1W-2HKbxs4i4Ekp6PaThwkB5xq-K8swCvb3goX-F1wDnl/s1600/boxfilter.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 203px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-CojEECgSiXrLXPH9ZPtXP1x9wuq1ygug4mIep79rz5VM_FoyVDa_ult-kPQGR88h6z3ws54HDJxyAN98juDs-ttHvNupewz1W-2HKbxs4i4Ekp6PaThwkB5xq-K8swCvb3goX-F1wDnl/s320/boxfilter.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5522615664230970290&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Filtered image with box filter and integral image&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiocC8u_2dqfrhFY1iiEt6JcM81Pk_gZ3_MZ5zQ_xcdmHwci3IrJdEDq6uaiz3joWwnnXCWXbNHC1V08PscGQT73glo5Pu-xLWE4VOc77hvJzUlQXh5n1rsgLRuxW9igfaYssUskQU0aXN7/s1600/iNIT+iMAGE.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 230px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiocC8u_2dqfrhFY1iiEt6JcM81Pk_gZ3_MZ5zQ_xcdmHwci3IrJdEDq6uaiz3joWwnnXCWXbNHC1V08PscGQT73glo5Pu-xLWE4VOc77hvJzUlQXh5n1rsgLRuxW9igfaYssUskQU0aXN7/s320/iNIT+iMAGE.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5522615659632452098&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;an nxm image produces an nxm integral image</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/4003554293798401328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/computing-integral-images-summed-area.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4003554293798401328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4003554293798401328'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/computing-integral-images-summed-area.html' title='computing integral images (summed area table)'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEgD2f4g6b38c6R6CIJqpe5UOJtseC0zKwCDD9KFevE_cJx094coGPMpDrB4r1J9LGe-dvM7UIgakyQZsnY1iBEtVniibrhmnFzaBugPe1MclMFJ9QQymquOuPWB3hHknl_32j3wXW5oVA/s72-c/9.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-8564021229806013575</id><published>2010-08-26T22:52:00.000-07:00</published><updated>2010-08-29T03:52:46.294-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="computer vision"/><category scheme="http://www.blogger.com/atom/ns#" term="PCA"/><category scheme="http://www.blogger.com/atom/ns#" term="principal component analysis"/><title type='text'>Principal Component Analysis</title><content type='html'>Principal component analysis has several disadvantages including&lt;ul style=&quot;margin-top: 0in;&quot; type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Translation variant&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Scale variant&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Background variant&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;span lang=&quot;EN-GB&quot;&gt;Lighting variant&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The first principal component accounts for as much of the variability in the data as possible, and each succeeding component accounts for as much of the remaining variability as possible. Although PCA is used as a tool in exploratory data analysis and making predictive models, its strength is also considered its weakness. This is because of its non-parametric analysis. Since there are no parameters to tweak, the answer of PCA is unique and independent of the users experience. Thus, the answer may not be optimal in all cases.&lt;br /&gt;&lt;br /&gt;The basic idea of PCA is given a set of variables, find a set of variables with less redundancy, this gives a good representation for regression analysis.  Since redundancy is computed via correlation, it is required for reducing the scale space between vector elements&lt;br /&gt;&lt;br /&gt;In Matlab PCA is done via the following function:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;[COEFF, SCORE] = princomp(X);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;EXAMPLES TO FOLLOW:&lt;br /&gt;TO DO</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/8564021229806013575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/principal-component-analysis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/8564021229806013575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/8564021229806013575'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/08/principal-component-analysis.html' title='Principal Component Analysis'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4488123033070210861.post-4485308977554581887</id><published>2010-07-18T02:17:00.000-07:00</published><updated>2010-11-04T03:10:01.275-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="computer vision"/><category scheme="http://www.blogger.com/atom/ns#" term="detail"/><category scheme="http://www.blogger.com/atom/ns#" term="matlab"/><category scheme="http://www.blogger.com/atom/ns#" term="sift"/><title type='text'>Details behind SIFT Feature detection</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvJz9SiHwAyJUC29z0uikd3QPvdmiVYa6DKKIPHZseFlqQ-l9H8Kszb_TIV4BBaOLZokeFVDlUy9u8vMyYmNFUobaNCSzNxA-VE8Mw4nuIJCNFFNdC4trzHbDGu3osVnjpVOeL8arRipy-/s1600/Step1_Octave1.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvJz9SiHwAyJUC29z0uikd3QPvdmiVYa6DKKIPHZseFlqQ-l9H8Kszb_TIV4BBaOLZokeFVDlUy9u8vMyYmNFUobaNCSzNxA-VE8Mw4nuIJCNFFNdC4trzHbDGu3osVnjpVOeL8arRipy-/s400/Step1_Octave1.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5517075840579783362&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;First octave blur progressively &lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL6PK8oFti9fJQ1C7NdHE2ttV4lqYbHjhLk8SBfF07PZj8BQ5KUFG59_co-q5wQvQbj1dMR5PTmVIhVceS-ked7Og2_OKpUKVfSy4FuZ6_rLiOdljU2AWyOXCzDOaCFy355oEyhf3l1kCM/s1600/Step1_Octave2.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL6PK8oFti9fJQ1C7NdHE2ttV4lqYbHjhLk8SBfF07PZj8BQ5KUFG59_co-q5wQvQbj1dMR5PTmVIhVceS-ked7Og2_OKpUKVfSy4FuZ6_rLiOdljU2AWyOXCzDOaCFy355oEyhf3l1kCM/s400/Step1_Octave2.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5517075852216725218&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;second octave: resize to half the image and blur progressively&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPgP0lgdY-GEnna0ac5tzIfsWwROQTB91a-TOnp66Vg6mZNh2V2xCg9IMmku42Vl_cRQcpXwzkQybt0j6oRvXvqcbZkucYYCl-dyAOjeBZTxtHWN1HApYcK2TmP3yxXxdka3skfTIiHURd/s1600/Step1_Octave3.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPgP0lgdY-GEnna0ac5tzIfsWwROQTB91a-TOnp66Vg6mZNh2V2xCg9IMmku42Vl_cRQcpXwzkQybt0j6oRvXvqcbZkucYYCl-dyAOjeBZTxtHWN1HApYcK2TmP3yxXxdka3skfTIiHURd/s400/Step1_Octave3.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5517075857256978258&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8nsVpeykzuvW_w-05nxM2lK-r3cocguJTLxbQpAeTW0g9XQ5avKLYs0T5aKGMB7FfwmzDBCOb4wCkJxobUiIgapKc0Mfc1jby5h22u6gjd5Cm-rQ67VmVZc8snccQQs61Vb6O-OYXUKIM/s1600/Step2_LoG.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8nsVpeykzuvW_w-05nxM2lK-r3cocguJTLxbQpAeTW0g9XQ5avKLYs0T5aKGMB7FfwmzDBCOb4wCkJxobUiIgapKc0Mfc1jby5h22u6gjd5Cm-rQ67VmVZc8snccQQs61Vb6O-OYXUKIM/s400/Step2_LoG.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5517075865240940066&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Getting LoG. Subtract image 1 from image 2. Then subtract image 2 from image 3. then subtract image 3 from image 4&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_eqay_ELHoHcuQeXOqBGmGa0AhjmDgPF8P1GAHnKDB6N0gL3r0EB5NWuXxjDtcUshdpqqbXbWp_LLzyl1YlRXTkJOlsuSrhWaRSlA1YGTYOL3aFmd0KI4gpo3tvgOnms0cn8ZfEtbZ3bH/s1600/Step3_maxima.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 331px; height: 400px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_eqay_ELHoHcuQeXOqBGmGa0AhjmDgPF8P1GAHnKDB6N0gL3r0EB5NWuXxjDtcUshdpqqbXbWp_LLzyl1YlRXTkJOlsuSrhWaRSlA1YGTYOL3aFmd0KI4gpo3tvgOnms0cn8ZfEtbZ3bH/s400/Step3_maxima.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5517078156661655682&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Find the maxima/minima of images from one scale higher and lower.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0); font-weight: bold;&quot;&gt;NOW FOR THE DETAILS:(based on my understanding)&lt;/span&gt;&lt;br /&gt;images and details from :&lt;br /&gt;Lowe, David G. “Distinctive Image Features from Scale­ Invariant Keypoints”. International Journal of Computer Vision, 60, 2 (2004)&lt;br /&gt;&lt;br /&gt;Scale invariant feature transform is used for detection and extracting local features of an image.&lt;br /&gt;the steps are as follows:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Generate a Difference of Gaussian(DoG) or a laplacian pyramid&lt;/li&gt;&lt;li&gt;Extrema detection from the DoG pyramid which is the local maxima and minima, the point found is an extrema&lt;/li&gt;&lt;li&gt;Eliminate low contrast or poorly localized points, what remains are the keypoints&lt;/li&gt;&lt;li&gt;Assign an orientation to the points based on the image properties&lt;/li&gt;&lt;li&gt;Compute and generate keypoint descriptors&lt;/li&gt;&lt;/ol&gt;The details:&lt;br /&gt;&lt;br /&gt;The main SIFT implementation consists of 4 major stages described by Lowe . The first step is finding a scale space extrema. This is done via image pyramids. The process involves repeatedly smoothing an image by convolving it with a gaussian operator and subsequently sub-sampling in order to achieve higher levels of the pyramid. For this stage, Lowe suggests 4 octaves and 5 levels of blur. An octave corresponds to doubling the value of σ.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFdDP55V-kN_b2-fQRE0RieORqPKWl0MFkjpSl4yCzBUtpD5Cie5ui3FFduCzyRmri_3OUn16IK53uxIDbxTIx55mmCEkD_0RT9dnMh6JX3ixPY3VcV7mu4obS3ptrqg59ZBlYJFyKk5Bq/s1600/sift-gaussian-operator.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 226px; height: 45px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFdDP55V-kN_b2-fQRE0RieORqPKWl0MFkjpSl4yCzBUtpD5Cie5ui3FFduCzyRmri_3OUn16IK53uxIDbxTIx55mmCEkD_0RT9dnMh6JX3ixPY3VcV7mu4obS3ptrqg59ZBlYJFyKk5Bq/s400/sift-gaussian-operator.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5510714905448430722&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvZ0-qDR6_hbFaCn2Ide7mHC98li2XsAOMy9_DqMDCFe8-qmG0ed39wPOASLVA4RKJXP2P8mc4ujUIuggkgmfyuDIDYWFqHevfTX0bNT4Eu51YxxtrPGVtytwv0KFaTy6BMf92aT1VPLp8/s1600/sift-convolution.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 222px; height: 24px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvZ0-qDR6_hbFaCn2Ide7mHC98li2XsAOMy9_DqMDCFe8-qmG0ed39wPOASLVA4RKJXP2P8mc4ujUIuggkgmfyuDIDYWFqHevfTX0bNT4Eu51YxxtrPGVtytwv0KFaTy6BMf92aT1VPLp8/s400/sift-convolution.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5510714874966057842&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;After obtaining a full pyramid, the difference of each octave results in an approximate solution to the Laplacian of Gaussian.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmzdJlZ_xYq8gccyWViyqWYgXy5F1f-ci4SRhWopsocrbHEamJlI45hphXJJYsP4QqE3Mb6j3omc0u0bNSVgwW6OonZk3B4ybbEB3b5DBNP0X4m0g8gdxLg5vk_hnO1c1ttkNz1GC3x7Mz/s1600/sift-dog-idea.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 286px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmzdJlZ_xYq8gccyWViyqWYgXy5F1f-ci4SRhWopsocrbHEamJlI45hphXJJYsP4QqE3Mb6j3omc0u0bNSVgwW6OonZk3B4ybbEB3b5DBNP0X4m0g8gdxLg5vk_hnO1c1ttkNz1GC3x7Mz/s400/sift-dog-idea.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5510714884992246674&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The amount of blur per interval and octave is very important in obtaining keypoints (matlab source screenshot)&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw8MqO1Bi_JcMtC80R8XdR6dJSV9ls2plNh2zIkeO5-8yIMQbmzVH1ENJWBQmFu7cFVOb76mfgPM4dQ2SYcdD5EshE78MP3ZczMEAq35rN9-19trLQ5LBkxjUohyQUTSLCnueFqVgcvWt3/s1600/blurAmount.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 114px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw8MqO1Bi_JcMtC80R8XdR6dJSV9ls2plNh2zIkeO5-8yIMQbmzVH1ENJWBQmFu7cFVOb76mfgPM4dQ2SYcdD5EshE78MP3ZczMEAq35rN9-19trLQ5LBkxjUohyQUTSLCnueFqVgcvWt3/s400/blurAmount.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5535208028632204258&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;this is a manual computation i did in excel&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ3-VagwIvG_UOckxnAIVOUmSRFhZJzNjIpaFj9lWGrRbBlkpaThaxFifh7InIJQRtfW_pZkszAKWs-mKIU_J_d_G0WgL2litVqXGuk1DIAU8W6WKhoTufUrLPzHZns39_1J2OKjabEgQj/s1600/scaleSpace.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 468px; height: 360px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ3-VagwIvG_UOckxnAIVOUmSRFhZJzNjIpaFj9lWGrRbBlkpaThaxFifh7InIJQRtfW_pZkszAKWs-mKIU_J_d_G0WgL2litVqXGuk1DIAU8W6WKhoTufUrLPzHZns39_1J2OKjabEgQj/s400/scaleSpace.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5535634308508131970&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;The next step is to iterate through each pixel and compare it with its 8 surounding neighbors and 9 neighbors at one scale higher and lower. If the pixel value is higher or lower amongst its neighbors then it is considered as a keypoint.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After determining the keypoint, tylor expansion is used to generate subpixel values from the pixel data.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAK3H_MAUF5kpSpQ8qNHN3vjSb9MWI9WKOpJIZomh7Po2Uv8UiqpOo9FyUKfxVWzpVHB1-i78NwEgPXW0WhTWsRQ6CPckJVNENVzCiBpaikxe6ZL5-nCwIXXRWHCQAm657A1a5We_NSOIs/s1600/sift-dog-taylor1.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 199px; height: 57px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAK3H_MAUF5kpSpQ8qNHN3vjSb9MWI9WKOpJIZomh7Po2Uv8UiqpOo9FyUKfxVWzpVHB1-i78NwEgPXW0WhTWsRQ6CPckJVNENVzCiBpaikxe6ZL5-nCwIXXRWHCQAm657A1a5We_NSOIs/s400/sift-dog-taylor1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5510714894301963074&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Doing so, will generate a lot of keypoints. These keypoints  are low contrast points or points along an edge. To eliminate these points, tylor expansion is used to get an intensity value for each subpixel. It is then compared against a threshold. If the value is higher or lower than the threshold, the point is accepted or rejected. Following this step a series of stable keypoints will be left that are scale invariant. To make the keypoints rotation invariant, a weighted histogram of local gradient direction and magnitudes around each keypoint is computed at a selected scale and the most prominent orientation in that region is selected and assigned to the keypoint.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzWJBILcy-hsOXRHViJwVGQNMhyphenhyphenzLqjsBXqGTsGDTo48A2jiWuaEqe_jEk4NM3ormZjUXDnhM64wFXSpO4dU5XtobrR7jvsU4DHRYERmu9oy6qN9taHq9JAgeFnB03Ze-KZNfmnx_Wswwx/s1600/sift-orientation-eqns.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 62px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzWJBILcy-hsOXRHViJwVGQNMhyphenhyphenzLqjsBXqGTsGDTo48A2jiWuaEqe_jEk4NM3ormZjUXDnhM64wFXSpO4dU5XtobrR7jvsU4DHRYERmu9oy6qN9taHq9JAgeFnB03Ze-KZNfmnx_Wswwx/s400/sift-orientation-eqns.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5510714913005099442&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;The orientation of these keypoints are broken into 36 bins, each representing 10 degrees from the 360 degree. After creating the histogram any peaks above 80 are converted to another keypoint with a different orientation.&lt;br /&gt;To do this, check the highest peek in the histogram and get the left and right neighbors. you will get 3 points, fit a downward parabola and solve the 3 equations to get a new keypoint. do this for all octaves and all iterations.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzSCHxLT6KXvp6uRqbEfd52lHhFA333mADkfMYL5TcKqtXOds4tB62vtQXIfJdQUBxDpgzlfEmzaMALQZrkX159wRenzxmCt3ZmjoXS-Z40IftdCZVUxNSyJoopXLk3TbhBMUD5W83Ss7O/s1600/sift-orientation-histogram.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 267px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzSCHxLT6KXvp6uRqbEfd52lHhFA333mADkfMYL5TcKqtXOds4tB62vtQXIfJdQUBxDpgzlfEmzaMALQZrkX159wRenzxmCt3ZmjoXS-Z40IftdCZVUxNSyJoopXLk3TbhBMUD5W83Ss7O/s400/sift-orientation-histogram.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5510715436938780194&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The next step is to produce unique ID’s for each keypoint that will differentiate them from each other. To accomplish this, a 16x16 window is created between pixels around the keypoint. It is then split into sixteen 4x4 windows and an 8 bin histogram is generated. The histogram and gradient values are interpolated to produce a 128 dimensional feature vector which is invariant to affine illumination. To obtain illumination invariance, the descriptor is normalized by the square root of the sum of squared components&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhysArKS7qZ3EWwF-ndkJNCGTwz0pl29LIXob0k5raRsw_5aWYX40esiVlMmcsjd2zHiZOsg9gm6vLG2JeZBUWgGRRA2WILuEHNkAcnemw-aLh2lYUvAgP2wmqdlnzfH7-F1sX-QIhOaAVg/s1600/sift-fingerprint.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 200px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhysArKS7qZ3EWwF-ndkJNCGTwz0pl29LIXob0k5raRsw_5aWYX40esiVlMmcsjd2zHiZOsg9gm6vLG2JeZBUWgGRRA2WILuEHNkAcnemw-aLh2lYUvAgP2wmqdlnzfH7-F1sX-QIhOaAVg/s400/sift-fingerprint.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5510715451932700114&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;The keypoints are now invariant to affine transformation and partial illumination changes.&lt;br /&gt;Although SIFT has been used in the computer vision community for quite some time there are several studies that try to improve on it.</content><link rel='replies' type='application/atom+xml' href='http://areshmatlab.blogspot.com/feeds/4485308977554581887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://areshmatlab.blogspot.com/2010/07/details-behind-sift-feature-detection.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4485308977554581887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4488123033070210861/posts/default/4485308977554581887'/><link rel='alternate' type='text/html' href='http://areshmatlab.blogspot.com/2010/07/details-behind-sift-feature-detection.html' title='Details behind SIFT Feature detection'/><author><name>Aresh.Saharkhiz</name><uri>http://www.blogger.com/profile/07959081897702084177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvJz9SiHwAyJUC29z0uikd3QPvdmiVYa6DKKIPHZseFlqQ-l9H8Kszb_TIV4BBaOLZokeFVDlUy9u8vMyYmNFUobaNCSzNxA-VE8Mw4nuIJCNFFNdC4trzHbDGu3osVnjpVOeL8arRipy-/s72-c/Step1_Octave1.JPG" height="72" width="72"/><thr:total>7</thr:total></entry></feed>