{"id":419,"date":"2011-12-21T08:20:18","date_gmt":"2011-12-21T13:20:18","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/?p=419"},"modified":"2011-12-21T08:20:18","modified_gmt":"2011-12-21T13:20:18","slug":"exploring-shortest-paths-wrapping-up","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2011\/12\/21\/exploring-shortest-paths-wrapping-up\/","title":{"rendered":"Exploring shortest paths &#8211; wrapping up"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p>For the past several weeks I've been writing about shortest-path problems in image processing: finding the shortest path between\r\n      two points in an image, with and without constraints.\r\n   <\/p>\r\n   <p>Applications included the practical (path finding in a skeleton image) and fun (maze solving).<\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2011\/shortest_path_e_10.png\"> <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2011\/shortest_path_e_06.png\"> <\/p>\r\n   <p>Along the way, I've described:<\/p>\r\n   <div>\r\n      <ul>\r\n         <li>the basic idea of finding shortest paths by adding two distance transforms together (<a href=\"https:\/\/blogs.mathworks.com\/steve\/2011\/11\/01\/exploring-shortest-paths-part-1\/\">part 1<\/a>)\r\n         <\/li>\r\n         <li>the nonuniqueness of the shortest paths (<a href=\"https:\/\/blogs.mathworks.com\/steve\/2011\/11\/26\/exploring-shortest-paths-part-2\/\">part 2<\/a>)\r\n         <\/li>\r\n         <li>handling floating-point round-off effects (<a href=\"https:\/\/blogs.mathworks.com\/steve\/2011\/12\/02\/exploring-shortest-paths-part-3\/\">part 3<\/a>)\r\n         <\/li>\r\n         <li>using thinning to pick out a single path (<a href=\"https:\/\/blogs.mathworks.com\/steve\/2011\/12\/06\/exploring-shortest-paths-part-4\/\">part 4<\/a>)\r\n         <\/li>\r\n         <li>using <tt>bwdistgeodesic<\/tt> to find shortest paths subject to constraint (<a href=\"https:\/\/blogs.mathworks.com\/steve\/2011\/12\/13\/exploring-shortest-paths-part-5\/\">part 5<\/a>)\r\n         <\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <p>I hope you found the series interesting and useful. If you have particular applications for these techniques in your own work,\r\n      I invite you to share them with us by posting a comment.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_c4fd7b6597054f7c8fcd25002b48b782() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='c4fd7b6597054f7c8fcd25002b48b782 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' c4fd7b6597054f7c8fcd25002b48b782';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Steve Eddins';\r\n        copyright = 'Copyright 2011 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_c4fd7b6597054f7c8fcd25002b48b782()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.13<br><\/p>\r\n<\/div>\r\n<!--\r\nc4fd7b6597054f7c8fcd25002b48b782 ##### SOURCE BEGIN #####\r\n%%\r\n% For the past several weeks I've been writing about shortest-path problems\r\n% in image processing: finding the shortest path between two points in an\r\n% image, with and without constraints.\r\n%\r\n% Applications included the practical (path finding in a skeleton image)\r\n% and fun (maze solving).\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2011\/shortest_path_e_10.png>>\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2011\/shortest_path_e_06.png>>\r\n%\r\n% Along the way, I've described:\r\n%\r\n% * the basic idea of finding shortest paths by adding two distance\r\n% transforms together\r\n% (<https:\/\/blogs.mathworks.com\/steve\/2011\/11\/01\/exploring-shortest-paths-part-1\/\r\n% part 1>)\r\n% * the nonuniqueness of the shortest paths\r\n% (<https:\/\/blogs.mathworks.com\/steve\/2011\/11\/26\/exploring-shortest-paths-part-2\/\r\n% part 2>)\r\n% * handling floating-point round-off effects\r\n% (<https:\/\/blogs.mathworks.com\/steve\/2011\/12\/02\/exploring-shortest-paths-part-3\/\r\n% part 3>)\r\n% * using thinning to pick out a single path\r\n% (<https:\/\/blogs.mathworks.com\/steve\/2011\/12\/06\/exploring-shortest-paths-part-4\/\r\n% part 4>)\r\n% * using |bwdistgeodesic| to find shortest paths subject to constraint\r\n% (<https:\/\/blogs.mathworks.com\/steve\/2011\/12\/13\/exploring-shortest-paths-part-5\/\r\n% part 5>)\r\n%\r\n% I hope you found the series interesting and useful. If you have\r\n% particular applications for these techniques in your own work, I\r\n% invite you to share them with us by posting a comment.\r\n##### SOURCE END ##### c4fd7b6597054f7c8fcd25002b48b782\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   For the past several weeks I've been writing about shortest-path problems in image processing: finding the shortest path between\r\n      two points in an image, with and without constraints.\r\n  ... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2011\/12\/21\/exploring-shortest-paths-wrapping-up\/\">read more >><\/a><\/p>","protected":false},"author":42,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/419"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/comments?post=419"}],"version-history":[{"count":3,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/419\/revisions"}],"predecessor-version":[{"id":422,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/419\/revisions\/422"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}