{"id":394,"date":"2011-10-21T16:34:21","date_gmt":"2011-10-21T20:34:21","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/2011\/10\/21\/five-years-ago-may-june-and-july-2006\/"},"modified":"2019-10-29T16:58:03","modified_gmt":"2019-10-29T20:58:03","slug":"five-years-ago-may-june-and-july-2006","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2011\/10\/21\/five-years-ago-may-june-and-july-2006\/","title":{"rendered":"Five years ago: May, June, and July 2006"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p>Much of the information I posted in this blog years ago is still useful today. Image processing theory hasn't been completely\r\n      overturned since then, and I'm still talking about MATLAB after all. For the benefit of readers who have joined the party\r\n      more recently, I will occasionally recap the useful bits that I posted about five years ago.\r\n   <\/p>\r\n   <p>In <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/05\">May<\/a>, <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/06\">June<\/a>, and <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/07\">July<\/a> of 2006 I was still writing posts in my <a href=\"https:\/\/blogs.mathworks.com\/steve\/category\/spatial-transforms\/\">spatial transforms series<\/a> (<a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/05\/05\/spatial-transformations-inverse-mapping\/\">inverse mapping<\/a>; <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/05\/12\/spatial-transformations-where-is-the-output-image\/\">where is the output image<\/a>; <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/06\/13\/spatial-transformations-findbounds\/\">findbounds<\/a>; <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/07\/07\/spatial-transformations-translation-confusion\/\">translation confusion<\/a>; and <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/07\/27\/spatial-transformations-handling-noninvertible-cases\/\">handling noninvertible cases<\/a>).\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/55\/inverse_mapping.png\"> <\/p>\r\n   <p>I wrote about the L*a*b* color space a couple of times (<a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/05\/09\/a-lab-based-uniform-color-scale\/\">a Lab-based uniform color scale<\/a>; <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/06\/19\/hue-shifts-near-the-l0-axis\/\">hue shifts near the L*=0 axis<\/a>).\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/65\/green_pink_02.png\"> <\/p>\r\n   <p>I described an algorithm trick for computing <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/05\/02\/fast-local-sums\/\">fast local sums<\/a>.\r\n   <\/p>\r\n   <p>I showed how to use regionprops to <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/06\/10\/determining-point-position-in-mri-phantom\/\">compute the centroids of the pegs in this MRI phantom<\/a>:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/62\/phantom_point_positions_01.png\"> <\/p>\r\n   <p>And I answer a popular question (one that <a href=\"https:\/\/blogs.mathworks.com\/loren\">Loren<\/a> has also addressed in her blog): how to do <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/06\/06\/batch-processing\/\">batch processing on a bunch of files<\/a>, like this:\r\n   <\/p><pre> files = dir('*.JPG');\r\n for k = 1:numel(files)\r\n    rgb = imread(files(k).name);\r\n    rgb = rgb(1:1800, 520:2000, :);\r\n    rgb = imresize(rgb, 0.2, 'bicubic');\r\n    imwrite(rgb, ['cropped\\' files(k).name]);\r\n end<\/pre><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_263444f1ffab4cc68d27e15c9b13583b() {\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='263444f1ffab4cc68d27e15c9b13583b ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 263444f1ffab4cc68d27e15c9b13583b';\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_263444f1ffab4cc68d27e15c9b13583b()\"><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\n263444f1ffab4cc68d27e15c9b13583b ##### SOURCE BEGIN #####\r\n%%\r\n% Much of the information I posted in this blog years ago is still useful\r\n% today. Image processing theory hasn't been completely overturned since\r\n% then, and I'm still talking about MATLAB after all. For the benefit of\r\n% readers who have joined the party more recently, I will occasionally\r\n% recap the useful bits that I posted about five years ago.\r\n%\r\n% In <https:\/\/blogs.mathworks.com\/steve\/2006\/05 May>,\r\n% <https:\/\/blogs.mathworks.com\/steve\/2006\/06 June>, and\r\n% <https:\/\/blogs.mathworks.com\/steve\/2006\/07 July> of 2006 I was still\r\n% writing posts in my\r\n% <https:\/\/blogs.mathworks.com\/steve\/category\/spatial-transforms\/ spatial\r\n% transforms series>\r\n% (<https:\/\/blogs.mathworks.com\/steve\/2006\/05\/05\/spatial-transformations-inverse-mapping\/\r\n% inverse mapping>;\r\n% <https:\/\/blogs.mathworks.com\/steve\/2006\/05\/12\/spatial-transformations-where-is-the-output-image\/\r\n% where is the output image>;\r\n% <https:\/\/blogs.mathworks.com\/steve\/2006\/06\/13\/spatial-transformations-findbounds\/\r\n% findbounds>;\r\n% <https:\/\/blogs.mathworks.com\/steve\/2006\/07\/07\/spatial-transformations-translation-confusion\/\r\n% translation confusion>; and\r\n% <https:\/\/blogs.mathworks.com\/steve\/2006\/07\/27\/spatial-transformations-handling-noninvertible-cases\/\r\n% handling noninvertible cases>).\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/55\/inverse_mapping.png>>\r\n%\r\n% I wrote about the L*a*b* color space a couple of times (<https:\/\/blogs.mathworks.com\/steve\/2006\/05\/09\/a-lab-based-uniform-color-scale\/ \r\n% a Lab-based\r\n% uniform color scale>; <https:\/\/blogs.mathworks.com\/steve\/2006\/06\/19\/hue-shifts-near-the-l0-axis\/ \r\n% hue shifts near the L*=0 axis>).\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/65\/green_pink_02.png>>\r\n%\r\n% I described an algorithm trick for computing <https:\/\/blogs.mathworks.com\/steve\/2006\/05\/02\/fast-local-sums\/ \r\n% fast local sums>.\r\n%\r\n% I showed how to use regionprops to <https:\/\/blogs.mathworks.com\/steve\/2006\/06\/10\/determining-point-position-in-mri-phantom\/ \r\n% compute the centroids of the pegs in\r\n% this MRI phantom>:\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/62\/phantom_point_positions_01.png>>\r\n%\r\n% And I answer a popular question (one that\r\n% <https:\/\/blogs.mathworks.com\/loren Loren> has also addressed in her blog):\r\n% how to do <https:\/\/blogs.mathworks.com\/steve\/2006\/06\/06\/batch-processing\/\r\n% batch processing on a bunch of files>, like this:\r\n%\r\n%   files = dir('*.JPG');\r\n%   for k = 1:numel(files)\r\n%      rgb = imread(files(k).name);\r\n%      rgb = rgb(1:1800, 520:2000, :);\r\n%      rgb = imresize(rgb, 0.2, 'bicubic');\r\n%      imwrite(rgb, ['cropped\\' files(k).name]);\r\n%   end\r\n##### SOURCE END ##### 263444f1ffab4cc68d27e15c9b13583b\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   Much of the information I posted in this blog years ago is still useful today. Image processing theory hasn't been completely\r\n      overturned since then, and I'm still talking about MATLAB... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2011\/10\/21\/five-years-ago-may-june-and-july-2006\/\">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":[154,42,76,156,164,162,168],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/394"}],"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=394"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/394\/revisions"}],"predecessor-version":[{"id":3763,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/394\/revisions\/3763"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}