{"id":1459,"date":"2015-10-13T17:59:09","date_gmt":"2015-10-13T21:59:09","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/?p=1459"},"modified":"2019-11-01T12:11:57","modified_gmt":"2019-11-01T16:11:57","slug":"recent-file-exchange-submissions","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2015\/10\/13\/recent-file-exchange-submissions\/","title":{"rendered":"Recent File Exchange submissions"},"content":{"rendered":"<div class=\"content\"><p>In the last 30 days, The MATLAB Central File Exchange has had <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/?duration=30&amp;sort=date_asc_updated&amp;term=tag%3A%22image+processing%22\">52 submissions that are tagged <i>image processing<\/i><\/a>.<\/p><p>Here are some highlights.<\/p><p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3529521-matt-eicholtz\">Matt Eicholtz<\/a> submitted <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/53-shift\">neighbor2ind<\/a>, a function that computes pairs of linear indices that define neighbor relationships in an image. It can be used to construct a graph.<\/p><p>For example, consider a 2-by-3 image matrix A, with the pixels numbered columnwise:<\/p><pre>1  3  5\r\n2  4  6<\/pre><p>Then <tt>neighbor2ind([2 3],4)<\/tt> computes the pairwise neighbor indices for 4-connected pixels.<\/p><pre class=\"codeinput\">ind = neighbor2ind([2 3],4)\r\n<\/pre><pre class=\"codeoutput\">\r\nind =\r\n\r\n     1     3\r\n     1     2\r\n     2     1\r\n     2     4\r\n     3     5\r\n     3     4\r\n     3     1\r\n     4     3\r\n     4     6\r\n     4     2\r\n     5     6\r\n     5     3\r\n     6     5\r\n     6     4\r\n\r\n<\/pre><p>You can use these pairs to construct a graph using the new graph theory tools in R2015b, but first we need to remove the duplicate edges.<\/p><pre class=\"codeinput\">ind2 = unique(sort(ind,2),<span class=\"string\">'rows'<\/span>)\r\n<\/pre><pre class=\"codeoutput\">\r\nind2 =\r\n\r\n     1     2\r\n     1     3\r\n     2     4\r\n     3     4\r\n     3     5\r\n     4     6\r\n     5     6\r\n\r\n<\/pre><pre class=\"codeinput\">g = graph(ind2(:,1),ind2(:,2))\r\n<\/pre><pre class=\"codeoutput\">\r\ng = \r\n\r\n  graph with properties:\r\n\r\n    Edges: [7x1 table]\r\n    Nodes: [6x0 table]\r\n\r\n<\/pre><p>I plan to write a lot more about images and graphs a bit later this fall.<\/p><p>Textbook author <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/63144-stephen-lynch\">Stephen Lynch<\/a> updated the MATLAB files for his book <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/46843-dynamical-systems-with-applications-using-matlab-2e\"><i>Dynamical Systems with Applications using MATLAB<\/i><\/a> for R2015b.<\/p><p>Do you work with data from TrueBeam accelerators from Varian? Then <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/53-shift\">ReadXim<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/2139612-fredrik-nordstrom\">Fredrik Nordstr&ouml;m<\/a> might be of interest.<\/p><p>I noticed some updates of excellent tools that I've seen before, including <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/16233-sc-powerful-image-rendering\">SC - powerful image rendering<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/1073021-oliver-woodford\">Oliver Woodford<\/a> and <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/50124-topotoolbox\">TopoToolbox<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/870595-wolfgang-schwanghart\">Wolfgang Schwanghart<\/a>.<\/p><p>Here I use the <tt>'compress'<\/tt> option of <tt>sc<\/tt> to display a multichannel image as RGB while preserving the maximum variance from the original channels. (The example is from the SC doc.)<\/p><pre class=\"codeinput\">load <span class=\"string\">mri<\/span>\r\nsc(squeeze(D(:,:,:,1:6)),<span class=\"string\">'compress'<\/span>)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/steve\/files\/file_exchange_1_01.png\" alt=\"\"> <p>TopoToolbox contains visualization tools and topological measurements useful for analyzing digital elevation models (DEMs). Here's an example illustrating visualization and flow accumulation from the toolbox documentation (modified by me to use the parula colormap).<\/p><pre class=\"codeinput\">DEM = GRIDobj(<span class=\"string\">'srtm_bigtujunga30m_utm11.tif'<\/span>)\r\n<\/pre><pre class=\"codeoutput\">\r\nDEM = \r\n\r\n  GRIDobj with properties:\r\n\r\n           Z: [643x1197 single]\r\n    cellsize: 30\r\n      refmat: [3x2 double]\r\n        size: [643 1197]\r\n        name: 'srtm_bigtujunga30m_utm11'\r\n       zunit: []\r\n      xyunit: []\r\n      georef: [1x1 struct]\r\n\r\n<\/pre><pre class=\"codeinput\">DEMf = fillsinks(DEM);\r\nFD = FLOWobj(DEMf);\r\nA = flowacc(FD);\r\nimageschs(DEM,dilate(sqrt(A),ones(5)),<span class=\"string\">'colormap'<\/span>,parula);\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/steve\/files\/file_exchange_1_02.png\" alt=\"\"> <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/870202-aslak-grinsted\">Aslak Grinsted<\/a> submitted an update to <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/47140-imgraft\">ImGRAFT<\/a>, an image georectification and feature tracking toolbox used in glaciology research. Citation: Citation: Messerli, A. and Grinsted, A. (2015), Image GeoRectification And Feature Tracking toolbox: ImGRAFT, Geosci. Instrum. Method. Data Syst., 4, 23-34, doi:[10.5194\/gi-4-23-2015](<a href=\"\"><\/a>). Web site: <a href=\"http:\/\/imgraft.glaciology.net\/\">imgraft.glaciology.net<\/a>.<\/p><p>I didn't have space to mention all the worthy submissions in the past month. You should <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/?duration=30&amp;sort=date_asc_updated&amp;term=tag%3A%22image+processing%22\">follow the link<\/a> and take a look!<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_63dbb1395869459da08a0a9bb3f65729() {\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='63dbb1395869459da08a0a9bb3f65729 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 63dbb1395869459da08a0a9bb3f65729';\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        copyright = 'Copyright 2015 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 copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\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     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_63dbb1395869459da08a0a9bb3f65729()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2015b<br><\/p><\/div><!--\r\n63dbb1395869459da08a0a9bb3f65729 ##### SOURCE BEGIN #####\r\n%%\r\n% In the last 30 days, The MATLAB Central File Exchange has had \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/?duration=30&sort=date_asc_updated&term=tag%3A%22image+processing%22 \r\n% 52 submissions that are tagged _image processing_>.\r\n%\r\n% Here are some highlights.\r\n%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3529521-matt-eicholtz\r\n% Matt Eicholtz> submitted\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/53-shift\r\n% neighbor2ind>, a function that computes pairs of linear indices\r\n% that define neighbor relationships in an image. It can be used to\r\n% construct a graph.\r\n%\r\n% For example, consider a 2-by-3 image matrix A, with the pixels\r\n% numbered columnwise:\r\n%\r\n%  1  3  5\r\n%  2  4  6\r\n%\r\n% Then |neighbor2ind([2 3],4)| computes the pairwise neighbor\r\n% indices for 4-connected pixels.\r\n\r\nind = neighbor2ind([2 3],4)\r\n\r\n%%\r\n% You can use these pairs to construct a graph using the new graph\r\n% theory tools in R2015b, but first we need to remove the duplicate\r\n% edges.\r\n\r\nind2 = unique(sort(ind,2),'rows')\r\n\r\n%%\r\n\r\ng = graph(ind2(:,1),ind2(:,2))\r\n\r\n%%\r\n% I plan to write a lot more about images and graphs a bit later\r\n% this fall.\r\n\r\n%%\r\n% Textbook author <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/63144-stephen-lynch \r\n% Stephen Lynch> updated the MATLAB files for his\r\n% book <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/46843-dynamical-systems-with-applications-using-matlab-2e \r\n% _Dynamical Systems with Applications using MATLAB_> for R2015b.\r\n\r\n%%\r\n% Do you work with data from TrueBeam accelerators from Varian? Then\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/53-shift\r\n% ReadXim> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/2139612-fredrik-nordstrom\r\n% Fredrik Nordstr\u00c3\u00b6m> might be of interest.\r\n\r\n%%\r\n% I noticed some updates of excellent tools that I've seen before,\r\n% including\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/16233-sc-powerful-image-rendering\r\n% SC - powerful image rendering> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/1073021-oliver-woodford\r\n% Oliver Woodford> and\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/50124-topotoolbox\r\n% TopoToolbox> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/870595-wolfgang-schwanghart\r\n% Wolfgang Schwanghart>.\r\n%\r\n% Here I use the |'compress'| option of |sc| to display a\r\n% multichannel image as RGB while preserving the maximum variance\r\n% from the original channels. (The example\r\n% is from the SC doc.)\r\n\r\nload mri\r\nsc(squeeze(D(:,:,:,1:6)),'compress')\r\n\r\n%%\r\n% TopoToolbox contains visualization tools and topological\r\n% measurements useful for analyzing digital elevation models (DEMs).\r\n% Here's an example illustrating visualization and flow accumulation\r\n% from the toolbox documentation (modified by me to use the parula\r\n% colormap).\r\n\r\nDEM = GRIDobj('srtm_bigtujunga30m_utm11.tif')\r\n\r\n%%\r\n\r\nDEMf = fillsinks(DEM);\r\nFD = FLOWobj(DEMf);\r\nA = flowacc(FD);\r\nimageschs(DEM,dilate(sqrt(A),ones(5)),'colormap',parula);\r\n\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/870202-aslak-grinsted\r\n% Aslak Grinsted> submitted an update to\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/47140-imgraft\r\n% ImGRAFT>, an image georectification and feature tracking toolbox\r\n% used in glaciology research. Citation: Citation: Messerli, A. and\r\n% Grinsted, A. (2015), Image GeoRectification And Feature Tracking\r\n% toolbox: ImGRAFT, Geosci. Instrum. Method. Data Syst., 4, 23-34,\r\n% doi:[10.5194\/gi-4-23-2015]().\r\n% Web site: <http:\/\/imgraft.glaciology.net\/ imgraft.glaciology.net>.\r\n%\r\n% Here's a sample image from the documentation on the web site.\r\n%\r\n% <<https:\/\/ac27a737-a-6233b4b2-s-sites.googlegroups.com\/a\/glaciology.net\/imgraft\/documentation\/examples\/cias-example\/muragl.png?attachauth=ANoY7cqdn9xmoJN1SWnKpoxW6lWbtfLPp5kpKvUxTik-596aebU49f21FwH_5LBN3ZNNOzytNfleajTkXbFBY7sWqObVBjsfnQcL9VQ3QIqTq5wOWl3VfFRauaxIDDSlyA1YDRPglzP2TVQRSf9pl8sbCRegyp3eznoMVJUBVD5Fdo6fWkBlQrCxXruHt_5TbXcb9cQtTteMsfFNxubOGdZUooqPJE_5Fhj0qSDRg4rTu4Y9DpLAhGaR3NEf_yMFlGCobUk8mCh0&attredirects=0>>\r\n\r\n%%\r\n% I didn't have space to mention all the worthy submissions in the\r\n% past month. You should <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/?duration=30&sort=date_asc_updated&term=tag%3A%22image+processing%22 \r\n% follow the link> and take a look!\r\n##### SOURCE END ##### 63dbb1395869459da08a0a9bb3f65729\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/steve\/files\/file_exchange_1_02.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><p>In the last 30 days, The MATLAB Central File Exchange has had 52 submissions that are tagged image processing.Here are some highlights.Matt Eicholtz submitted neighbor2ind, a function that computes... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2015\/10\/13\/recent-file-exchange-submissions\/\">read more >><\/a><\/p>","protected":false},"author":42,"featured_media":1461,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[1125,362,288,1093,484,1127,350],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/1459"}],"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=1459"}],"version-history":[{"count":6,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/1459\/revisions"}],"predecessor-version":[{"id":1467,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/1459\/revisions\/1467"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media\/1461"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=1459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=1459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=1459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}