{"id":6263,"date":"2015-11-13T09:00:00","date_gmt":"2015-11-13T14:00:00","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=6263"},"modified":"2015-11-13T08:50:16","modified_gmt":"2015-11-13T13:50:16","slug":"snake-algorithm","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2015\/11\/13\/snake-algorithm\/","title":{"rendered":"Snake Algorithm"},"content":{"rendered":"<a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/76890\">Will<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51220-snake-algorithm\">Snake Algorithm<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/2666136-iman\">Iman<\/a>.\r\n<br><br>\r\nHow often do you find a File Exchange contribution with a YouTube video? A video can be a wonderfully effective way to explain a concept. In less than 3 minutes, it enabled Iman to teach me everything I needed to know about his toolbox. It's a UI that implements an <a href=\"https:\/\/en.wikipedia.org\/wiki\/Active_contour_model\">active contour model<\/a>. The user supplies an image file and a series of initial points. The algorithm then moves the points in an attempt to outline the perimeter of an object. I examined the results on an icon of an iron.\r\n<br><br>\r\n<center><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/will_campbell\/potw_snake\/snake1.gif\" alt=\"Snake Algorithm 1\" \/><\/center>\r\n<br>\r\nAs much as I'd love to explain to you how the algorithm works, there's really no need to. Included in the download is a 3 page overview document that does a far better job than I could. The algorithm is not without its limitations, which you begin to get a sense of as you try different images, initial points, and UI settings. \r\n<br><br>\r\n<center><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/will_campbell\/potw_snake\/snake2.gif\" alt=\"Snake Algorithm 2\" \/><br>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/will_campbell\/potw_snake\/snake3.gif\" alt=\"Snake Algorithm 3\" \/><br>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/will_campbell\/potw_snake\/snake4.gif\" alt=\"Snake Algorithm 1\" \/><\/center>\r\n<br>\r\nAs you can see, the solutions aren't always the best. So once you're done trying to solve such challenges interactively with Iman's UI, be sure to check out the <a href=\"https:\/\/www.mathworks.com\/help\/images\/ref\/activecontour.html\">activecontour<\/a> function in the Image Processing Toolbox. It provides a more robust, albeit less exciting, segmentation solution.\r\n<br><br><strong>Comments<\/strong><br>\r\nLet us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=6263#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51220-snake-algorithm#comments\">comment<\/a> for Iman.\r\n<br><br>","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/will_campbell\/potw_snake\/snake1.gif\" onError=\"this.style.display ='none';\" \/><\/div><p>Will's pick this week is Snake Algorithm by Iman.\r\n\r\nHow often do you find a File Exchange contribution with a YouTube video? A video can be a wonderfully effective way to explain a concept. In less... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2015\/11\/13\/snake-algorithm\/\">read more >><\/a><\/p>","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/6263"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=6263"}],"version-history":[{"count":13,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/6263\/revisions"}],"predecessor-version":[{"id":6278,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/6263\/revisions\/6278"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=6263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=6263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=6263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}