{"id":2924,"date":"2011-08-19T13:02:32","date_gmt":"2011-08-19T13:02:32","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2011\/08\/19\/morphologically-altering-images-interactively\/"},"modified":"2017-01-06T21:32:38","modified_gmt":"2017-01-07T02:32:38","slug":"morphologically-altering-images-interactively","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2011\/08\/19\/morphologically-altering-images-interactively\/","title":{"rendered":"Morphologically Altering Images, Interactively"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction><\/introduction>\r\n   <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911\">Brett<\/a>'s Pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/23697-image-morphology\">\"MorphTool,\"<\/a> by ... <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911\">Brett<\/a>.\r\n   <\/p>\r\n   <p>Okay, first time ever...I'm picking one of my own.<\/p>\r\n   <p>I have a passion for processing images in MATLAB (using the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/images\/images_product_page.html\">Image Processing Toolbox<\/a>, of course). And the capabilities of the Toolbox are truly remarkable. But even after fifteen years working with MathWorks'\r\n      tools, I'm still not good enough to know at a glance what combination of steps will yield the best results. Often, <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/images\/f18-9530.html\">morphologically altering<\/a> an image will allow me to analyze the image and extract the information I'm after. What operator should I use? Or combination\r\n      of operators? With what <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/images\/f18-12508.html#f18-22581\">structuring element(s)<\/a>?\r\n   <\/p>\r\n\r\n   <p>MorphTool gives me an interactive environment for trying different approaches, and for rapidly iterating to a solution that\r\n      works. It's a work in progress, and it has holes in functionality. And even some known issues. But it saves me a great deal\r\n      of time. So now I'm asking for feedback. Try it.... Let me know what you like about it, and what you don't. Are tools like\r\n      this useful? Have you created something similar of your own to explore approaches to processing images? <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2924#respond\">I'd love to hear about them!<\/a><\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_a4b4e288577147e9ab090b5e22c57f3a() {\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='a4b4e288577147e9ab090b5e22c57f3a ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' a4b4e288577147e9ab090b5e22c57f3a';\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 = 'Brett Shoelson';\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_a4b4e288577147e9ab090b5e22c57f3a()\"><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.12<br><\/p>\r\n<\/div>\r\n<!--\r\na4b4e288577147e9ab090b5e22c57f3a ##### SOURCE BEGIN #####\r\n%% Morphologically Altering Images, Interactively\r\n%% \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911 Brett>'s Pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/23697-image-morphology\r\n% \"MorphTool,\"> by ...\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911 Brett>.\r\n\r\n%%\r\n% Okay, first time ever...I'm picking one of my own. \r\n\r\n%% \r\n% I have a passion for processing images in MATLAB (using the \r\n% <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/images\/images_product_page.html Image Processing Toolbox>, of course). And the capabilities of the Toolbox are\r\n% truly remarkable. But even after fifteen years working with MathWorks'\r\n% tools, I'm still not good enough to know at a glance what combination of\r\n% steps will yield the best results. Often, <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/images\/f18-9530.html morphologically altering> an\r\n% image will allow me to analyze the image and extract the information I'm\r\n% after. What operator should I use? Or combination of operators? With what <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/images\/f18-12508.html#f18-22581 structuring element(s)>?\r\n\r\n%%\r\n% \r\n% <<https:\/\/www.mathworks.com\/matlabcentral\/fx_files\/23697\/13\/MorphToolImg2.png>>\r\n% \r\n\r\n%%\r\n% MorphTool gives me an interactive environment for trying different\r\n% approaches, and for rapidly iterating to a solution that works. It's a\r\n% work in progress, and it has holes in functionality. And even some known\r\n% issues. But it saves me a great deal of time. So now I'm asking for\r\n% feedback. Try it.... Let me know what you like about it, and what you\r\n% don't. Are tools like this useful? Have you created something similar of your own to explore\r\n% approaches to processing images?\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2924#respond I'd love to hear about them!>\r\n##### SOURCE END ##### a4b4e288577147e9ab090b5e22c57f3a\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   \r\n   Brett's Pick this week is \"MorphTool,\" by ... Brett.\r\n   \r\n   Okay, first time ever...I'm picking one of my own.\r\n   I have a passion for processing images in MATLAB (using the Image... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2011\/08\/19\/morphologically-altering-images-interactively\/\">read more >><\/a><\/p>","protected":false},"author":34,"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\/2924"}],"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\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2924"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2924\/revisions"}],"predecessor-version":[{"id":8341,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2924\/revisions\/8341"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}