{"id":348,"date":"2016-09-26T09:24:37","date_gmt":"2016-09-26T09:24:37","guid":{"rendered":"http:\/\/www.rangakrish.com\/?p=348"},"modified":"2016-10-18T10:52:52","modified_gmt":"2016-10-18T10:52:52","slug":"computer-vision-with-mathematica","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/","title":{"rendered":"Computer Vision with Mathematica"},"content":{"rendered":"<p>Over the past several weeks, I have been discussing many interesting features of <a href=\"https:\/\/www.wolfram.com\/mathematica\/\" target=\"_blank\">Mathematica<\/a>. As a continuation, today, I would like to show some cool functionality in the domain of computer vision and machine learning.<\/p>\n<p>The function <em><strong>ImageIdentify[]<\/strong><\/em> tries to identify the object in the given image. According to the documentation, Mathematica knows about more than 10,000 objects. To test this feature, I downloaded a few images from the internet. You can see the interaction below.<\/p>\n<p>The first example involves a truck. Mathematica was able to correctly identify the truck.<\/p>\n<figure id=\"attachment_349\" aria-describedby=\"caption-attachment-349\" style=\"width: 469px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/truck-fig.png\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"349\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/truck-fig\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/truck-fig.png\" data-orig-size=\"469,284\" 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=\"A Truck\" data-image-description=\"&lt;p&gt;A Truck&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;A Truck&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/truck-fig.png\" class=\"size-full wp-image-349\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/truck-fig.png?resize=469%2C284\" alt=\"A Truck\" width=\"469\" height=\"284\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/truck-fig.png?w=469&amp;ssl=1 469w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/truck-fig.png?resize=300%2C182&amp;ssl=1 300w\" sizes=\"(max-width: 469px) 100vw, 469px\" \/><\/a><figcaption id=\"caption-attachment-349\" class=\"wp-caption-text\">A Truck<\/figcaption><\/figure>\n<p>For the second example, I downloaded the image of a fountain pen. Although we humans can correctly identify this object as a pen, I thought Mathematica might have some trouble because, the cover has been removed and kept by the side of the pen, making it seem like two different objects. But Mathematica had no problem!<\/p>\n<figure id=\"attachment_350\" aria-describedby=\"caption-attachment-350\" style=\"width: 492px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pen-fig.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"350\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/pen-fig\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pen-fig.png\" data-orig-size=\"492,306\" 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=\"A Fountain Pen\" data-image-description=\"&lt;p&gt;A Fountain Pen&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;A Fountain Pen&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pen-fig.png\" class=\"size-full wp-image-350\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pen-fig.png?resize=492%2C306\" alt=\"A Fountain Pen\" width=\"492\" height=\"306\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pen-fig.png?w=492&amp;ssl=1 492w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pen-fig.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"(max-width: 492px) 100vw, 492px\" \/><\/a><figcaption id=\"caption-attachment-350\" class=\"wp-caption-text\">A Fountain Pen<\/figcaption><\/figure>\n<p>The third example is a stapler. Mathematica got it correct this time too.<\/p>\n<figure id=\"attachment_351\" aria-describedby=\"caption-attachment-351\" style=\"width: 498px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/stapler-fig.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"351\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/stapler-fig\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/stapler-fig.png\" data-orig-size=\"498,301\" 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=\"A Stapler\" data-image-description=\"&lt;p&gt;A Stapler&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;A Stapler&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/stapler-fig.png\" class=\"size-full wp-image-351\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/stapler-fig.png?resize=498%2C301\" alt=\"A Stapler\" width=\"498\" height=\"301\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/stapler-fig.png?w=498&amp;ssl=1 498w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/stapler-fig.png?resize=300%2C181&amp;ssl=1 300w\" sizes=\"(max-width: 498px) 100vw, 498px\" \/><\/a><figcaption id=\"caption-attachment-351\" class=\"wp-caption-text\">A Stapler<\/figcaption><\/figure>\n<p>Mathematica could not identify the object in the next three examples. I thought it was odd\u00a0because USB Pendrives are so common these days.<\/p>\n<figure id=\"attachment_352\" aria-describedby=\"caption-attachment-352\" style=\"width: 486px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive1-fig.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"352\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/pendrive1-fig\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive1-fig.png\" data-orig-size=\"486,688\" 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=\"USB Drive\" data-image-description=\"&lt;p&gt;USB Drive&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;USB Drive&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive1-fig.png\" class=\"size-full wp-image-352\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive1-fig.png?resize=486%2C688\" alt=\"USB Drive\" width=\"486\" height=\"688\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive1-fig.png?w=486&amp;ssl=1 486w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive1-fig.png?resize=212%2C300&amp;ssl=1 212w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/a><figcaption id=\"caption-attachment-352\" class=\"wp-caption-text\">USB Drive<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_353\" aria-describedby=\"caption-attachment-353\" style=\"width: 514px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive2-fig.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"353\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/pendrive2-fig\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive2-fig.png\" data-orig-size=\"514,330\" 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=\"Another USB Drive\" data-image-description=\"&lt;p&gt;Another USB Drive&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Another USB Drive&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive2-fig.png\" class=\"size-full wp-image-353\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive2-fig.png?resize=514%2C330\" alt=\"Another USB Drive\" width=\"514\" height=\"330\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive2-fig.png?w=514&amp;ssl=1 514w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive2-fig.png?resize=300%2C193&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/pendrive2-fig.png?resize=140%2C90&amp;ssl=1 140w\" sizes=\"(max-width: 514px) 100vw, 514px\" \/><\/a><figcaption id=\"caption-attachment-353\" class=\"wp-caption-text\">Another USB Drive<\/figcaption><\/figure>\n<p>That is when I thought maybe I should <em>teach<\/em> Mathematica to correctly classify pendrives. The <em><strong>Classify[]<\/strong><\/em> function allows us\u00a0to give classification examples to Mathematica, from which it will generate a suitable <em><strong>Classifier<\/strong><\/em>. This latter function can then be used to classify a new object based on what it has been taught.<\/p>\n<p>The <em><strong>Classify[]<\/strong> <\/em>function takes an array of <em><strong>&lt;example, class&gt;<\/strong><\/em> pairs, and returns a classifier. You can later apply the classifier on a new example to get the appropriate classification. The figure below shows my examples, and how it eventually correctly classified the new pen drive (not seen before).<\/p>\n<figure id=\"attachment_354\" aria-describedby=\"caption-attachment-354\" style=\"width: 790px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/classification.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"354\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/classification\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/classification.png\" data-orig-size=\"790,442\" 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=\"Teaching the Classifier\" data-image-description=\"&lt;p&gt;Teaching the Classifier&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Teaching the Classifier&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/classification.png\" class=\"size-full wp-image-354\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/classification.png?resize=780%2C436\" alt=\"Teaching the Classifier\" width=\"780\" height=\"436\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/classification.png?w=790&amp;ssl=1 790w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/classification.png?resize=300%2C168&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/classification.png?resize=768%2C430&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/classification.png?resize=352%2C198&amp;ssl=1 352w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/a><figcaption id=\"caption-attachment-354\" class=\"wp-caption-text\">Teaching the Classifier<\/figcaption><\/figure>\n<p>That is good! Of course, things are not that easy in the real world. Many, many more examples have to be supplied.<\/p>\n<p>For the last experiment, instead of working with images that contain single objects, I wanted to experiment with an image having multiple objects. I used my iPhone and photographed three objects, namely, scissors, fountain pen, and a paper cutting knife arranged side by side on my desk. I then asked Mathematica to identify all the objects in it. See what happened:<\/p>\n<figure id=\"attachment_355\" aria-describedby=\"caption-attachment-355\" style=\"width: 482px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/Items2.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"355\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/items2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/Items2.png\" data-orig-size=\"482,404\" 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=\"Multiple Objects in Image\" data-image-description=\"&lt;p&gt;Multiple Objects in Image&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Multiple Objects in Image&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/Items2.png\" class=\"size-full wp-image-355\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/Items2.png?resize=482%2C404\" alt=\"Multiple Objects in Image\" width=\"482\" height=\"404\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/Items2.png?w=482&amp;ssl=1 482w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/Items2.png?resize=300%2C251&amp;ssl=1 300w\" sizes=\"(max-width: 482px) 100vw, 482px\" \/><\/a><figcaption id=\"caption-attachment-355\" class=\"wp-caption-text\">Multiple Objects in Image<\/figcaption><\/figure>\n<p>It appears that the fountain pen has been classfied as a sort of knife. I guess the similarity is there, but given that in our earlier example, it was able to correctly identify a fountain pen, I was a bit surprised. It could be due to the orientation of the pen, or lack of sufficient detail, I assume. Perhaps Mathematica \u00a0folks should\u00a0consider doing more training on the fountain pen data set.<\/p>\n<p>Next, I decided to take a look at the image processing side of Mathematica. The cool thing is that Mathematica has hundreds of functions in each of the domains it supports, and so if you have the patience and the inclination, you could go as far as you want (of course, I have my own wish-list for Mathematica, but that is a different topic).<\/p>\n<p>Given the last image with multiple objects, let us ask Mathematica to detect the edges. We can use the <em><strong>EdgeDetect[]<\/strong><\/em> function. This function finds edges in an image, returning a binary image as result.<\/p>\n<figure id=\"attachment_359\" aria-describedby=\"caption-attachment-359\" style=\"width: 544px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/edge-detection.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"359\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/edge-detection\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/edge-detection.png\" data-orig-size=\"544,520\" 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=\"Edge Detection\" data-image-description=\"&lt;p&gt;Edge Detection&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Edge Detection&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/edge-detection.png\" class=\"size-full wp-image-359\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/edge-detection.png?resize=544%2C520\" alt=\"Edge Detection\" width=\"544\" height=\"520\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/edge-detection.png?w=544&amp;ssl=1 544w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/edge-detection.png?resize=300%2C287&amp;ssl=1 300w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/><\/a><figcaption id=\"caption-attachment-359\" class=\"wp-caption-text\">Edge Detection<\/figcaption><\/figure>\n<p>I then used the <em><strong>ImageKeyPoints[]<\/strong><\/em> function to detect the key features in the binary image and highlight their coordinates.<\/p>\n<figure id=\"attachment_360\" aria-describedby=\"caption-attachment-360\" style=\"width: 561px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/keypoints.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"360\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/26\/computer-vision-with-mathematica\/keypoints\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/keypoints.png\" data-orig-size=\"561,531\" 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 Key Points\" data-image-description=\"&lt;p&gt;Image Key Points&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image Key Points&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/keypoints.png\" class=\"size-full wp-image-360\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/keypoints.png?resize=561%2C531\" alt=\"Image Key Points\" width=\"561\" height=\"531\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/keypoints.png?w=561&amp;ssl=1 561w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/keypoints.png?resize=300%2C284&amp;ssl=1 300w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/a><figcaption id=\"caption-attachment-360\" class=\"wp-caption-text\">Image Key Points<\/figcaption><\/figure>\n<p>Interesting. So, we could go on like this, but let me stop here for now.<\/p>\n<p>More interesting stuff in the next post!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 documentation, Mathematica knows about more [&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":[78,72,17],"tags":[75,76,43],"class_list":["post-348","post","type-post","status-publish","format-standard","hentry","category-machine-learning","category-mathematica","category-programming","tag-computer-vision","tag-image-processing","tag-mathematica"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-5C","jetpack-related-posts":[{"id":364,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/10\/11\/cloud-computing-with-mathematica\/","url_meta":{"origin":348,"position":0},"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":3626,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/02\/21\/using-openai-from-mathematica-part-3\/","url_meta":{"origin":348,"position":1},"title":"Using OpenAI from Mathematica: Part-3","author":"admin","date":"February 21, 2025","format":false,"excerpt":"Let us continue our discussion on using Mathematica to interact with OpenAI (you may want to go through the earlier article as well). The simplest function to interact with the LLM is LLMSynthesize[]. As you might have guessed, this is a \u201csync\u201d (non-streaming) call. What if you expect a long\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Basic LLMSynthesize","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/02\/fig1-300x21.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/02\/fig1-300x21.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/02\/fig1-300x21.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":285,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/07\/22\/using-julia-to-interact-with-mathematica\/","url_meta":{"origin":348,"position":2},"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":[]},{"id":304,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/08\/20\/cuda-and-mathematica\/","url_meta":{"origin":348,"position":3},"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":3774,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/08\/04\/stock-analysis-using-wolfram-mathematica\/","url_meta":{"origin":348,"position":4},"title":"Stock Analysis Using Wolfram Mathematica","author":"admin","date":"August 4, 2025","format":false,"excerpt":"I have my own toolkit for analyzing stocks, but occasionally I use Mathematica as well. Given Mathematica\u2019s extensive support for numerical computation including Machine Learning, it can be a valuable resource for deep analysis of the stock market. In today\u2019s article, let me give an overview of some of the\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Supported Exchanges","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/exchanges-300x28.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/exchanges-300x28.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/08\/exchanges-300x28.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":328,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/09\/11\/natural-language-processing-in-mathematica\/","url_meta":{"origin":348,"position":5},"title":"Natural Language Processing in Mathematica","author":"admin","date":"September 11, 2016","format":false,"excerpt":"Welcome back. Today I am going to share with you some of the nice capabilities of Mathematica in the area of Natural Language Processing (NLP). Let us start with words. What if we wish to know\u00a0the various definitions of the word image?\u00a0Here is the answer. Mathematica gives the various senses\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Word Definition","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/word-data1-1024x238.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/word-data1-1024x238.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/word-data1-1024x238.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/09\/word-data1-1024x238.png?resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/348","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=348"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/348\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}