{"id":457,"date":"2017-01-16T08:13:31","date_gmt":"2017-01-16T08:13:31","guid":{"rendered":"http:\/\/www.rangakrish.com\/?p=457"},"modified":"2017-01-16T08:18:21","modified_gmt":"2017-01-16T08:18:21","slug":"checking-image-overlap-with-mathematica-part-3","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2017\/01\/16\/checking-image-overlap-with-mathematica-part-3\/","title":{"rendered":"Checking Image Overlap with Mathematica \u2013 Part 3"},"content":{"rendered":"<p>This is the\u00a0 third and the last in the series of articles on checking image overlap using <a href=\"http:\/\/www.wolfram.com\" target=\"_blank\">Mathematica<\/a>.<\/p>\n<p>Let us take a quick look at the images that we are using as samples (<strong>image1<\/strong> and <strong>image3<\/strong> in the first row, <strong>image3<\/strong> and <strong>image4<\/strong> in the second row):<\/p>\n<figure id=\"attachment_458\" aria-describedby=\"caption-attachment-458\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Sampleimages.png\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"458\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/01\/16\/checking-image-overlap-with-mathematica-part-3\/sampleimages-2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Sampleimages.png\" data-orig-size=\"727,564\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Sample Images\" data-image-description=\"&lt;p&gt;Sample Images&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Sample Images&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Sampleimages.png\" class=\"wp-image-458\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Sampleimages.png?resize=650%2C504\" alt=\"Sample Images\" width=\"650\" height=\"504\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Sampleimages.png?w=727&amp;ssl=1 727w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Sampleimages.png?resize=300%2C233&amp;ssl=1 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-458\" class=\"wp-caption-text\"><strong>Sample Images<\/strong><\/figcaption><\/figure>\n<p>The first technique we will consider today is the use of color histograms. The following image shows the histogram of <strong>image1<\/strong>.<\/p>\n<figure id=\"attachment_459\" aria-describedby=\"caption-attachment-459\" style=\"width: 596px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histogram-1.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"459\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/01\/16\/checking-image-overlap-with-mathematica-part-3\/histogram-1\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histogram-1.png\" data-orig-size=\"596,223\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Image Histogram\" data-image-description=\"&lt;p&gt;Image Histogram&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image Histogram&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histogram-1.png\" class=\"size-full wp-image-459\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histogram-1.png?resize=596%2C223\" alt=\"Image Histogram\" width=\"596\" height=\"223\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histogram-1.png?w=596&amp;ssl=1 596w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histogram-1.png?resize=300%2C112&amp;ssl=1 300w\" sizes=\"(max-width: 596px) 100vw, 596px\" \/><\/a><figcaption id=\"caption-attachment-459\" class=\"wp-caption-text\"><strong>Image Histogram<\/strong><\/figcaption><\/figure>\n<p>We intuitively expect that if two images are similar (this happens when there is significant overlap), their histograms will also be similar. For convenience, here are the histograms of all 4 images we are evaluating:<\/p>\n<figure id=\"attachment_460\" aria-describedby=\"caption-attachment-460\" style=\"width: 668px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histograms.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"460\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/01\/16\/checking-image-overlap-with-mathematica-part-3\/histograms\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histograms.png\" data-orig-size=\"668,259\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Histograms\" data-image-description=\"&lt;p&gt;Histograms&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Histograms&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histograms.png\" class=\"size-full wp-image-460\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histograms.png?resize=668%2C259\" alt=\"Histograms\" width=\"668\" height=\"259\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histograms.png?w=668&amp;ssl=1 668w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/histograms.png?resize=300%2C116&amp;ssl=1 300w\" sizes=\"(max-width: 668px) 100vw, 668px\" \/><\/a><figcaption id=\"caption-attachment-460\" class=\"wp-caption-text\"><strong>Histograms<\/strong><\/figcaption><\/figure>\n<p>As you can see, there is a lot of similarity between the histograms of images 1 to 3, whereas <strong>image4<\/strong> is noticeably different.<\/p>\n<p>Instead of visual analysis, is there any other way to compute this similarity? The <a href=\"http:\/\/reference.wolfram.com\/language\/ref\/ImageLevels.html\" target=\"_blank\">ImageLevels<\/a> function allows us to get the histogram data to any level of granularity. Here is what we get for <strong>image1<\/strong> using 10 levels:<\/p>\n<figure id=\"attachment_461\" aria-describedby=\"caption-attachment-461\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagelevels.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"461\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/01\/16\/checking-image-overlap-with-mathematica-part-3\/imagelevels\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagelevels.png\" data-orig-size=\"757,198\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Image Levels\" data-image-description=\"&lt;p&gt;Image Levels&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image Levels&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagelevels.png\" class=\"wp-image-461\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagelevels.png?resize=650%2C170\" alt=\"Image Levels\" width=\"650\" height=\"170\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagelevels.png?w=757&amp;ssl=1 757w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagelevels.png?resize=300%2C78&amp;ssl=1 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-461\" class=\"wp-caption-text\"><strong>Image Levels<\/strong><\/figcaption><\/figure>\n<p>OK, how do we use this? We first convert this into a matrix without the level designator. Here is a simple function to do that and the corresponding output for <strong>image1<\/strong>:<\/p>\n<figure id=\"attachment_462\" aria-describedby=\"caption-attachment-462\" style=\"width: 649px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/levelstomatrix.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"462\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/01\/16\/checking-image-overlap-with-mathematica-part-3\/levelstomatrix\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/levelstomatrix.png\" data-orig-size=\"721,170\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Matrix of Image Levels\" data-image-description=\"&lt;p&gt;Matrix of Image Levels&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Matrix of Image Levels&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/levelstomatrix.png\" class=\"wp-image-462\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/levelstomatrix.png?resize=649%2C153\" alt=\"Matrix of Image Levels\" width=\"649\" height=\"153\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/levelstomatrix.png?w=721&amp;ssl=1 721w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/levelstomatrix.png?resize=300%2C71&amp;ssl=1 300w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/a><figcaption id=\"caption-attachment-462\" class=\"wp-caption-text\"><strong>Matrix of Image Levels<\/strong><\/figcaption><\/figure>\n<p>Similarity between two images now reduces to the similarity between two matrices. I wrote the following function to compute the similarity between two images. what I do here is to compute the <a href=\"http:\/\/reference.wolfram.com\/language\/ref\/ContraharmonicMean.html\" target=\"_blank\">ContraharmonicMean<\/a>\u00a0of the two histogram matrices, take the <a href=\"http:\/\/reference.wolfram.com\/language\/ref\/EuclideanDistance.html\" target=\"_blank\">EuclideanDistance<\/a>\u00a0between the two and take its reciprocal. Finally I scale the value up so that the fraction is not too small.<\/p>\n<figure id=\"attachment_463\" aria-describedby=\"caption-attachment-463\" style=\"width: 648px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagesimilarity.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"463\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/01\/16\/checking-image-overlap-with-mathematica-part-3\/imagesimilarity\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagesimilarity.png\" data-orig-size=\"808,91\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Image Similarity\" data-image-description=\"&lt;p&gt;Image Similarity&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image Similarity&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagesimilarity.png\" class=\"wp-image-463\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagesimilarity.png?resize=648%2C73\" alt=\"Image Similarity\" width=\"648\" height=\"73\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagesimilarity.png?w=808&amp;ssl=1 808w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagesimilarity.png?resize=300%2C34&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagesimilarity.png?resize=768%2C86&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/imagesimilarity.png?resize=800%2C91&amp;ssl=1 800w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/a><figcaption id=\"caption-attachment-463\" class=\"wp-caption-text\"><strong>Image Similarity<\/strong><\/figcaption><\/figure>\n<p>When we apply this function to the different image pairs, we get the following values:<\/p>\n<figure id=\"attachment_464\" aria-describedby=\"caption-attachment-464\" style=\"width: 384px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/similarityvalues.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"464\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/01\/16\/checking-image-overlap-with-mathematica-part-3\/similarityvalues\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/similarityvalues.png\" data-orig-size=\"384,283\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Similarity Values\" data-image-description=\"&lt;p&gt;Similarity Values&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Similarity Values&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/similarityvalues.png\" class=\"size-full wp-image-464\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/similarityvalues.png?resize=384%2C283\" alt=\"Similarity Values\" width=\"384\" height=\"283\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/similarityvalues.png?w=384&amp;ssl=1 384w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/similarityvalues.png?resize=300%2C221&amp;ssl=1 300w\" sizes=\"(max-width: 384px) 100vw, 384px\" \/><\/a><figcaption id=\"caption-attachment-464\" class=\"wp-caption-text\"><strong>Similarity Values<\/strong><\/figcaption><\/figure>\n<p>You can see that the value is 2-3 times higher when there is significant overlap, compared to when there is little or no overlap. Of course, we have to be careful when we use this approach because it is more like an an <em>educated guess<\/em>.<\/p>\n<p>The last function we will consider is <a href=\"http:\/\/reference.wolfram.com\/language\/ref\/ImageDistance.html\" target=\"_blank\">ImageDistance<\/a>. This function computes the Euclidean distance (by default) between two images.<\/p>\n<figure id=\"attachment_465\" aria-describedby=\"caption-attachment-465\" style=\"width: 391px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Imagedistance.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"465\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/01\/16\/checking-image-overlap-with-mathematica-part-3\/imagedistance\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Imagedistance.png\" data-orig-size=\"391,298\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Image Distance\" data-image-description=\"&lt;p&gt;Image Distance&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image Distance&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Imagedistance.png\" class=\"size-full wp-image-465\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Imagedistance.png?resize=391%2C298\" alt=\"Image Distance\" width=\"391\" height=\"298\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Imagedistance.png?w=391&amp;ssl=1 391w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/01\/Imagedistance.png?resize=300%2C229&amp;ssl=1 300w\" sizes=\"(max-width: 391px) 100vw, 391px\" \/><\/a><figcaption id=\"caption-attachment-465\" class=\"wp-caption-text\"><strong>Image Distance<\/strong><\/figcaption><\/figure>\n<p>When applied to our image pairs, we see that the distance between dissimilar images <strong>image1<\/strong> and <strong>image4<\/strong> is much higher than that between <strong>image1<\/strong> and <strong>image2<\/strong> or <strong>image1<\/strong> and <strong>image3<\/strong>. This roughly points to the degree of overlap between the image pairs.<\/p>\n<p>This concludes my study of different techniques to determine the degree of overlap between two images. Hope you found the discussion useful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the\u00a0 third and the last in the series of articles on checking image overlap using Mathematica. Let us take a quick look at the images that we are using as samples (image1 and image3 in the first row, image3 and image4 in the second row): The first technique we will consider today is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[85,72,17],"tags":[89,88,43],"class_list":["post-457","post","type-post","status-publish","format-standard","hentry","category-image-processing","category-mathematica","category-programming","tag-histogram","tag-image-overlap","tag-mathematica"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-7n","jetpack-related-posts":[{"id":425,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/12\/05\/checking-image-overlap-with-mathematica\/","url_meta":{"origin":457,"position":0},"title":"Checking Image Overlap with Mathematica","author":"admin","date":"December 5, 2016","format":false,"excerpt":"Recently I had to solve a seemingly simple problem: Given two images, can we find out if there is any overlap between the two? Where does such a requirement arise? One use case is in photogrammetry, where in order to build an orthomosaic from multiple\u00a0images, there must be at least\u2026","rel":"","context":"In &quot;Image Processing&quot;","block_context":{"text":"Image Processing","link":"https:\/\/www.rangakrish.com\/index.php\/category\/image-processing\/"},"img":{"alt_text":"Sample Images","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/12\/Sampleimages.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/12\/Sampleimages.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/12\/Sampleimages.png?resize=525%2C300 1.5x"},"classes":[]},{"id":443,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/12\/25\/checking-image-overlap-with-mathematica-part-2\/","url_meta":{"origin":457,"position":1},"title":"Checking Image Overlap with Mathematica &#8211; Part 2","author":"admin","date":"December 25, 2016","format":false,"excerpt":"In the previous post, we discussed one technique to check the overlap between two given images of equal dimensions. In today\u2019s post, let us look at another idea that uses Mathematica\u2019s ImageCorrespondingPoints\u00a0function. As per the documentation, the ImageCorrespondingPoints function finds a set of matching interest points between two given images\u2026","rel":"","context":"In &quot;Image Processing&quot;","block_context":{"text":"Image Processing","link":"https:\/\/www.rangakrish.com\/index.php\/category\/image-processing\/"},"img":{"alt_text":"Corresponding Points","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/12\/CorrespondingPoints.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/12\/CorrespondingPoints.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/12\/CorrespondingPoints.png?resize=525%2C300 1.5x"},"classes":[]},{"id":364,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/10\/11\/cloud-computing-with-mathematica\/","url_meta":{"origin":457,"position":2},"title":"Cloud Computing with Mathematica","author":"admin","date":"October 11, 2016","format":false,"excerpt":"Mathematica provides excellent support for cloud computation, and most of the time, it is a very simple and intuitive process. Today, let us look at some examples of cloud deployment. For using Mathematica\u2019s cloud capabilities, you need an appropriate subscription. I use Mathematica Desktop, which comes with some free cloud\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"FormFunction","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/10\/FormFunction1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/10\/FormFunction1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/10\/FormFunction1.png?resize=525%2C300 1.5x"},"classes":[]},{"id":348,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/","url_meta":{"origin":457,"position":3},"title":"Computer Vision with Mathematica","author":"admin","date":"September 26, 2016","format":false,"excerpt":"Over the past several weeks, I have been discussing many interesting features of Mathematica. As a continuation, today, I would like to show some cool functionality in the domain of computer vision and machine learning. The function ImageIdentify[] tries to identify the object in the given image. According to the\u2026","rel":"","context":"In &quot;Machine Learning&quot;","block_context":{"text":"Machine Learning","link":"https:\/\/www.rangakrish.com\/index.php\/category\/machine-learning\/"},"img":{"alt_text":"A Truck","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/truck-fig.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":304,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/08\/20\/cuda-and-mathematica\/","url_meta":{"origin":457,"position":4},"title":"CUDA and Mathematica","author":"admin","date":"August 20, 2016","format":false,"excerpt":"Recently I purchased a high-end desktop computer for my image processing project. Since many computations tend to take several hours to execute, I wanted to accelerate the calculations to the extent possible by adding a GPU. I chose NIVIDA's GeForce GTX 1080\u00a0processor-based card. Although I will be using C++ for\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Basic CUDA Check","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/08\/Mathematica-1-1024x771.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/08\/Mathematica-1-1024x771.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/08\/Mathematica-1-1024x771.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/08\/Mathematica-1-1024x771.png?resize=700%2C400 2x"},"classes":[]},{"id":285,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/07\/22\/using-julia-to-interact-with-mathematica\/","url_meta":{"origin":457,"position":5},"title":"Using Julia to Interact with Mathematica","author":"admin","date":"July 22, 2016","format":false,"excerpt":"Mathematica is a powerful environment for symbolic and numerical computation. I have been using it for many years now. In this post\u00a0I had explained how we can use Mathematica bundled with Raspberry distribution to control littleBits devices. When I saw that there is support in Julia for interacting with Mathematica,\u2026","rel":"","context":"In &quot;Julia&quot;","block_context":{"text":"Julia","link":"https:\/\/www.rangakrish.com\/index.php\/category\/julia\/"},"img":{"alt_text":"Julia Session","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/07\/Julia-1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/07\/Julia-1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/07\/Julia-1.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=457"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/457\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}