{"id":388,"date":"2011-09-02T17:49:43","date_gmt":"2011-09-02T21:49:43","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/2011\/09\/02\/area-opening-terminology-question\/"},"modified":"2019-10-29T16:52:53","modified_gmt":"2019-10-29T20:52:53","slug":"area-opening-terminology-question","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2011\/09\/02\/area-opening-terminology-question\/","title":{"rendered":"&#8220;Area opening&#8221; terminology question"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p>An experienced user of our products recently told us we got it wrong when we named <tt>bwareaopen<\/tt>. This function removes foreground objects from a binary image that are smaller in area than a given threshold. The user said\r\n      (paraphrased) that \"bwareaopen isn't doing an opening at all, it's just doing connected-component labeling. And I would look\r\n      for some variation of 'size filter' in the name or description, and that doesn't appear at all.\"\r\n   <\/p>\r\n   <p>This is a good example of a terminology question that arises in toolbox design fairly often. When do we use a term that is\r\n      familiar to specialists in the area but might not be familiar to other users? In this case, the term <i>area opening<\/i> is familiar to those who know a lot about mathematical morphology as applied to image processing.\r\n   <\/p>\r\n   <p>In morphology, this operation is indeed called an area opening, and that's why I named the function this way about ten years\r\n      ago. The morphology folks have a fairly general notion of openings. Area opening is a type of opening they call an \"algebraic\r\n      opening.\"  Such openings are characterized by the following properties:\r\n   <\/p>\r\n   <div>\r\n      <ul>\r\n         <li>Increasing. Operator \\( T\\{\\cdot\\} \\) is <i>increasing<\/i> if, for all images \\( f \\) and \\( g \\), \\( f &lt;= g \\) implies \\( T\\{f\\} &lt;= T\\{g\\} \\).\r\n         <\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <div>\r\n      <ul>\r\n         <li>Anti-extensive. Operator \\( T\\{\\cdot\\} \\) is <i>anti-extensive<\/i> if, for all images \\( f \\), \\( T\\{f\\} &lt;= f \\).\r\n         <\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <div>\r\n      <ul>\r\n         <li>Idempotent. Operator \\( T\\{\\cdot\\} \\) is <i>idempotent<\/i> if, for all images \\( f \\), \\( T\\{T\\{f\\}\\} = T\\{f\\} \\).\r\n         <\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <p>Morphological opening (erosion followed by dilation), which is the most familiar kind of opening, satisfies these properties,\r\n      and so does the area opening.\r\n   <\/p>\r\n   <p>That said, I appreciate the merit in considering a different term that is less \"jargony.\" We might kick around the idea of\r\n      renaming this function.\r\n   <\/p>\r\n   <p>Readers, do you have any suggestions? I have an idea that I kind of like, but I'd like to hear what you have to say first.<\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_28fb47b52fc540c68ebe62da8a0c34f9() {\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='28fb47b52fc540c68ebe62da8a0c34f9 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 28fb47b52fc540c68ebe62da8a0c34f9';\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_28fb47b52fc540c68ebe62da8a0c34f9()\"><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\n28fb47b52fc540c68ebe62da8a0c34f9 ##### SOURCE BEGIN #####\r\n%%\r\n% An experienced user of our products recently told us we got it wrong when\r\n% we named |bwareaopen|. This function removes foreground objects from a\r\n% binary image that are smaller in area than a given threshold. The user\r\n% said (paraphrased) that \"bwareaopen isn't doing an opening at all, it's\r\n% just doing connected-component labeling. And I would look for some\r\n% variation of 'size filter' in the name or description, and that doesn't\r\n% appear at all.\"\r\n%\r\n% This is a good example of a terminology question that arises in toolbox\r\n% design fairly often. When do we use a term that is familiar to\r\n% specialists in the area but might not be familiar to other users? In this\r\n% case, the term _area opening_ is familiar to those who know a lot about\r\n% mathematical morphology as applied to image processing.\r\n%\r\n% In morphology, this operation is indeed called an area opening, and\r\n% that's why I named the function this way about ten years ago. The\r\n% morphology folks have a fairly general notion of openings. Area opening\r\n% is a type of opening they call an \"algebraic opening.\"  Such openings\r\n% are characterized by the following properties:\r\n%\r\n% * Increasing. Operator \\( T\\{\\cdot\\} \\) is _increasing_ if, for all images \\( f \\) and \\( g \\), \r\n% \\( f <= g \\) implies \\( T\\{f\\} <= T\\{g\\} \\).\r\n%\r\n% * Anti-extensive. Operator \\( T\\{\\cdot\\} \\) is _anti-extensive_ if, for all images \\( f \\), \\( T\\{f\\}\r\n% <= f \\).\r\n%\r\n% * Idempotent. Operator \\( T\\{\\cdot\\} \\) is _idempotent_ if, for all images \\( f \\), \\( T\\{T\\{f\\}\\} =\r\n% T\\{f\\} \\).\r\n% \r\n% Morphological opening (erosion followed by dilation), which is the most\r\n% familiar kind of opening, satisfies these problems, and so does the area\r\n% opening.\r\n%\r\n% That said, I appreciate the merit in considering a different term that is\r\n% less \"jargony.\" We might kick around the idea of renaming this function.\r\n%\r\n% Readers, do you have any suggestions? I have an idea that I kind of like, but I'd\r\n% like to hear what you have to say first.\r\n\r\n##### SOURCE END ##### 28fb47b52fc540c68ebe62da8a0c34f9\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   An experienced user of our products recently told us we got it wrong when we named bwareaopen. This function removes foreground objects from a binary image that are smaller in area than a given... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2011\/09\/02\/area-opening-terminology-question\/\">read more >><\/a><\/p>","protected":false},"author":42,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[138],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/388"}],"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=388"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/388\/revisions"}],"predecessor-version":[{"id":3753,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/388\/revisions\/3753"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}