{"id":374,"date":"2011-06-21T12:44:29","date_gmt":"2011-06-21T16:44:29","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/2011\/06\/21\/advanced-maneuvers-with-regionprops\/"},"modified":"2019-10-29T16:43:34","modified_gmt":"2019-10-29T20:43:34","slug":"advanced-maneuvers-with-regionprops","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2011\/06\/21\/advanced-maneuvers-with-regionprops\/","title":{"rendered":"Advanced maneuvers with regionprops"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p>Blog reader <a href=\"https:\/\/blogs.mathworks.com\/steve\/2009\/02\/27\/using-ismember-with-the-output-of-regionprops\/#comment-24250\">Mutlu<\/a> recently asked me this question:\r\n   <\/p>\r\n   <p>\"I have two images - one contains class labels (one of 1 or 2) and one containing image segment (region) unique IDs.  I am\r\n      trying to use regionprops (or something like regionprops) to figure out most frequently occurring label from the label image\r\n      per region and generate a new image where each unique region contains this most frequently occurring label. Is there a way\r\n      to do this?\"\r\n   <\/p>\r\n   <p>The answer is yes.  I thought the techniques might be applicable to different kinds of problems, so I'm posting the description\r\n      here for everyone.\r\n   <\/p>\r\n   <p>I don't have a specific example from the Mutlu's own application, so I made up a sample image to illustrate.<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">url = <span style=\"color: #A020F0\">'https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions-classes-example.png'<\/span>;\r\nbw = imread(url);\r\nimshow(bw)<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions_classes_01.png\"> <p>Suppose this image is divided up into three horizontal regions, as defined by this label matrix:<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">regions_url = <span style=\"color: #A020F0\">'https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions.png'<\/span>;\r\nregions = imread(regions_url);\r\nimshow(label2rgb(regions, <span style=\"color: #A020F0\">'jet'<\/span>, [.5 .5 .5]))<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions_classes_02.png\"> <p>Further, suppose that the shapes in the original image are divided into three classes - the stars, the triangles, and the\r\n      circles - as defined by this label matrix:\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">classes_url = <span style=\"color: #A020F0\">'https:\/\/blogs.mathworks.com\/images\/steve\/2011\/classes.png'<\/span>;\r\nclasses = imread(classes_url);\r\nimshow(label2rgb(classes, <span style=\"color: #A020F0\">'jet'<\/span>, [.5 .5 .5]))<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions_classes_03.png\"> <p>I can imagine different ways toward the solution. Here's the rough procedure I'm going to follow:<\/p>\r\n   <p>1. Determine the connected components (objects) in the image, including a list of pixel locations for each one.<\/p>\r\n   <p>2. Determine the class of each connected component.<\/p>\r\n   <p>3. Determine the region of each connected component.<\/p>\r\n   <p>4. For each region, determine the mode of the connected component classes contained in that region.<\/p>\r\n   <p>5. Construct the output image containing only the most frequently occurring object classes in each region.<\/p>\r\n   <p>Step 1: Determine the connected components (objects) in the image, including a list of pixel locations for each one. (I'm\r\n      also going to compute the centroids for each object, but that's only because I'm going to use those for visualization steps\r\n      along the way.)\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">cc = bwconncomp(bw);\r\ns = regionprops(cc, <span style=\"color: #A020F0\">'PixelIdxList'<\/span>, <span style=\"color: #A020F0\">'Centroid'<\/span>);<\/pre><p>Step 2: Determine the class of each connected component. I'll do this by using the pixel index list for each connected component\r\n      to index into the <tt>classes<\/tt> label matrix. I'll tack on the class number to the existing structure array returned by <tt>regionprops<\/tt>; this is a pretty useful technique to remember.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\"><span style=\"color: #0000FF\">for<\/span> k = 1:cc.NumObjects\r\n    s(k).ClassNumber = classes(s(k).PixelIdxList(1));\r\n<span style=\"color: #0000FF\">end<\/span><\/pre><p>Let's plot the class numbers on top of the original image to make sure we did it right. We should have 1s for the stars, 2s\r\n      for the triangles, and 3s for the circles.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">imshow(bw)\r\nhold <span style=\"color: #A020F0\">on<\/span>\r\n<span style=\"color: #0000FF\">for<\/span> k = 1:numel(s)\r\n    x = s(k).Centroid(1);\r\n    y = s(k).Centroid(2);\r\n    text(x, y, sprintf(<span style=\"color: #A020F0\">'%d'<\/span>, s(k).ClassNumber), <span style=\"color: #A020F0\">'Color'<\/span>, <span style=\"color: #A020F0\">'r'<\/span>, <span style=\"color: #0000FF\">...<\/span>\r\n        <span style=\"color: #A020F0\">'FontWeight'<\/span>, <span style=\"color: #A020F0\">'bold'<\/span>);\r\n<span style=\"color: #0000FF\">end<\/span>\r\nhold <span style=\"color: #A020F0\">off<\/span>\r\ntitle(<span style=\"color: #A020F0\">'Class number of each object'<\/span>)<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions_classes_04.png\"> <p>Step 3: Determine the region number associated with each connected component. We have to think a little harder about this\r\n      one, because there's a possibility that a connected component could lie in more than one region. I suggest that we find the\r\n      region number of every pixel of each connected component and then use the <tt>mode<\/tt> function as a tiebreaker for components that lie in multiple regions.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\"><span style=\"color: #0000FF\">for<\/span> k = 1:cc.NumObjects\r\n    s(k).RegionNumber = mode(single(regions(s(k).PixelIdxList)));\r\n<span style=\"color: #0000FF\">end<\/span><\/pre><p>Once again, let's plot the region numbers as a sanity check.<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">imshow(bw)\r\nhold <span style=\"color: #A020F0\">on<\/span>\r\n<span style=\"color: #0000FF\">for<\/span> k = 1:numel(s)\r\n    x = s(k).Centroid(1);\r\n    y = s(k).Centroid(2);\r\n    text(x, y, sprintf(<span style=\"color: #A020F0\">'%d'<\/span>, s(k).RegionNumber), <span style=\"color: #A020F0\">'Color'<\/span>, <span style=\"color: #A020F0\">'r'<\/span>, <span style=\"color: #0000FF\">...<\/span>\r\n        <span style=\"color: #A020F0\">'FontWeight'<\/span>, <span style=\"color: #A020F0\">'bold'<\/span>);\r\n<span style=\"color: #0000FF\">end<\/span>\r\nhold <span style=\"color: #A020F0\">off<\/span>\r\ntitle(<span style=\"color: #A020F0\">'Region number of each object'<\/span>)<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions_classes_05.png\"> <p>Step 4: For each region, determine the most frequently occurring object class in that region. Again, we'll make use of the\r\n      <tt>mode<\/tt> function.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">num_regions = max(regions(:));\r\nmost_frequent_class = zeros(1, num_regions);\r\nregion_vector = [s.RegionNumber];\r\nclass_vector = [s.ClassNumber];\r\n<span style=\"color: #0000FF\">for<\/span> k = 1:num_regions\r\n    most_frequent_class(k) = mode(single(class_vector(region_vector == k)));\r\n<span style=\"color: #0000FF\">end<\/span>\r\n\r\nmost_frequent_class<\/pre><pre style=\"font-style:oblique\">\r\nmost_frequent_class =\r\n\r\n     1     3     2\r\n\r\n<\/pre><p>Step 5: Construct the output image containing only the most frequently occurring object classes in each region.<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">bw2 = false(size(bw));\r\n<span style=\"color: #0000FF\">for<\/span> k = 1:numel(s)\r\n    <span style=\"color: #0000FF\">if<\/span> most_frequent_class(s(k).RegionNumber) == s(k).ClassNumber\r\n        <span style=\"color: #228B22\">% The class number of this object matches the most frequent class<\/span>\r\n        <span style=\"color: #228B22\">% number of objects in this region.<\/span>\r\n        bw2(s(k).PixelIdxList) = 1;\r\n    <span style=\"color: #0000FF\">end<\/span>\r\n<span style=\"color: #0000FF\">end<\/span>\r\n\r\nimshow(bw2)\r\ntitle(<span style=\"color: #A020F0\">'Final result'<\/span>)<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions_classes_06.png\"> <p>You can see that only stars are in region 1, only circles are in region 2, and only triangles are in region 3.<\/p>\r\n   <p>Here's the complete computation in one block of code:<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">cc = bwconncomp(bw);\r\ns = regionprops(cc, <span style=\"color: #A020F0\">'PixelIdxList'<\/span>, <span style=\"color: #A020F0\">'Centroid'<\/span>);\r\n\r\n<span style=\"color: #0000FF\">for<\/span> k = 1:cc.NumObjects\r\n    s(k).ClassNumber = classes(s(k).PixelIdxList(1));\r\n<span style=\"color: #0000FF\">end<\/span>\r\n\r\n<span style=\"color: #0000FF\">for<\/span> k = 1:cc.NumObjects\r\n    s(k).RegionNumber = mode(single(regions(s(k).PixelIdxList)));\r\n<span style=\"color: #0000FF\">end<\/span>\r\n\r\nnum_regions = max(regions(:));\r\nmost_frequent_class = zeros(1, num_regions);\r\nregion_vector = [s.RegionNumber];\r\nclass_vector = [s.ClassNumber];\r\n<span style=\"color: #0000FF\">for<\/span> k = 1:num_regions\r\n    most_frequent_class(k) = mode(single(class_vector(region_vector == k)));\r\n<span style=\"color: #0000FF\">end<\/span>\r\n\r\nbw2 = false(size(bw));\r\n<span style=\"color: #0000FF\">for<\/span> k = 1:numel(s)\r\n    <span style=\"color: #0000FF\">if<\/span> most_frequent_class(s(k).RegionNumber) == s(k).ClassNumber\r\n        <span style=\"color: #228B22\">% The class number of this object matches the most frequent class<\/span>\r\n        <span style=\"color: #228B22\">% number of objects in this region.<\/span>\r\n        bw2(s(k).PixelIdxList) = 1;\r\n    <span style=\"color: #0000FF\">end<\/span>\r\n<span style=\"color: #0000FF\">end<\/span><\/pre><p>The entire computation takes about 11 ms on my laptop.<\/p>\r\n   <p>There were a lot of useful techniques demonstrated here, especially:<\/p>\r\n   <div>\r\n      <ul>\r\n         <li>Connected-component labeling<\/li>\r\n         <li><a href=\"https:\/\/blogs.mathworks.com\/steve\/2008\/01\/28\/logical-indexing\/\">Logical<\/a> and <a href=\"https:\/\/blogs.mathworks.com\/steve\/2008\/02\/08\/linear-indexing\/\">linear<\/a> indexing\r\n         <\/li>\r\n         <li>Using the pixel index lists for the connected components to index into other vectors and matrices<\/li>\r\n         <li>The comma-separated list syntax for structure arrays (something that is particularly useful when working with the output of\r\n            <tt>regionprops<\/tt>).\r\n         <\/li>\r\n      <\/ul>\r\n   <\/div><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_1f9ec6ed64aa4511974413a576d68630() {\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='1f9ec6ed64aa4511974413a576d68630 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 1f9ec6ed64aa4511974413a576d68630';\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_1f9ec6ed64aa4511974413a576d68630()\"><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\n1f9ec6ed64aa4511974413a576d68630 ##### SOURCE BEGIN #####\r\n%%\r\n% Blog reader <https:\/\/blogs.mathworks.com\/steve\/2009\/02\/27\/using-ismember-with-the-output-of-regionprops\/#comment-24250 Mutlu> \r\n% recently asked me this question:\r\n%\r\n% \"I have two images - one contains class labels (one of 1 or 2) and one\r\n% containing image segment (region) unique IDs.  I am trying to use\r\n% regionprops (or something like regionprops) to figure out most frequently\r\n% occurring label from the label image per region and generate a new image\r\n% where each unique region contains this most frequently occurring label.\r\n% Is there a way to do this?\"\r\n%\r\n% The answer is yes.  I thought the techniques might be applicable to\r\n% different kinds of problems, so I'm posting the description here for\r\n% everyone.\r\n%\r\n% I don't have a specific example from the Mutlu's own application, so I\r\n% made up a sample image to illustrate.\r\n\r\nurl = 'https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions-classes-example.png';\r\nbw = imread(url);\r\nimshow(bw)\r\n\r\n%%\r\n% Suppose this image is divided up into three horizontal regions, as\r\n% defined by this label matrix:\r\n\r\nregions_url = 'https:\/\/blogs.mathworks.com\/images\/steve\/2011\/regions.png';\r\nregions = imread(regions_url);\r\nimshow(label2rgb(regions, 'jet', [.5 .5 .5]))\r\n\r\n%%\r\n% Further, suppose that the shapes in the original image are divided into\r\n% three classes - the stars, the triangles, and the circles - as defined by\r\n% this label matrix:\r\n\r\nclasses_url = 'https:\/\/blogs.mathworks.com\/images\/steve\/2011\/classes.png';\r\nclasses = imread(classes_url);\r\nimshow(label2rgb(classes, 'jet', [.5 .5 .5]))\r\n\r\n%%\r\n% I can imagine different ways toward the solution. Here's the rough\r\n% procedure I'm going to follow:\r\n%\r\n% 1. Determine the connected components (objects) in the image, including a\r\n% list of pixel locations for each one.\r\n%\r\n% 2. Determine the class of each connected component.\r\n%\r\n% 3. Determine the region of each connected component.\r\n%\r\n% 4. For each region, determine the mode of the connected component classes\r\n% contained in that region.\r\n%\r\n% 5. Construct the output image containing only the most frequently\r\n% occurring object classes in each region.\r\n%\r\n% Step 1: Determine the connected components (objects) in the image,\r\n% including a list of pixel locations for each one. (I'm also going to\r\n% compute the centroids for each object, but that's only because I'm going\r\n% to use those for visualization steps along the way.)\r\n\r\ncc = bwconncomp(bw);\r\ns = regionprops(cc, 'PixelIdxList', 'Centroid');\r\n\r\n%%\r\n% Step 2: Determine the class of each connected component. I'll do this by\r\n% using the pixel index list for each connected component to index into the\r\n% |classes| label matrix. I'll tack on the class number to the existing\r\n% structure array returned by |regionprops|; this is a pretty useful\r\n% technique to remember.\r\n\r\nfor k = 1:cc.NumObjects\r\n    s(k).ClassNumber = classes(s(k).PixelIdxList(1));\r\nend\r\n\r\n%%\r\n% Let's plot the class numbers on top of the original image to make sure we\r\n% did it right. We should have 1s for the stars, 2s for the triangles, and\r\n% 3s for the circles.\r\n\r\nimshow(bw)\r\nhold on\r\nfor k = 1:numel(s)\r\n    x = s(k).Centroid(1);\r\n    y = s(k).Centroid(2);\r\n    text(x, y, sprintf('%d', s(k).ClassNumber), 'Color', 'r', ...\r\n        'FontWeight', 'bold');\r\nend\r\nhold off\r\ntitle('Class number of each object')\r\n\r\n%%\r\n% Step 3: Determine the region number associated with each connected\r\n% component. We have to think a little harder about this one, because\r\n% there's a possibility that a connected component could lie in more than\r\n% one region. I suggest that we find the region number of every pixel of\r\n% each connected component and then use the |mode| function as a tiebreaker\r\n% for components that lie in multiple regions.\r\n\r\nfor k = 1:cc.NumObjects\r\n    s(k).RegionNumber = mode(single(regions(s(k).PixelIdxList)));\r\nend\r\n\r\n%%\r\n% Once again, let's plot the region numbers as a sanity check.\r\n\r\nimshow(bw)\r\nhold on\r\nfor k = 1:numel(s)\r\n    x = s(k).Centroid(1);\r\n    y = s(k).Centroid(2);\r\n    text(x, y, sprintf('%d', s(k).RegionNumber), 'Color', 'r', ...\r\n        'FontWeight', 'bold');\r\nend\r\nhold off\r\ntitle('Region number of each object')\r\n\r\n%%\r\n% Step 4: For each region, determine the most frequently occurring object\r\n% class in that region. Again, we'll make use of the |mode| function.\r\n\r\nnum_regions = max(regions(:));\r\nmost_frequent_class = zeros(1, num_regions);\r\nregion_vector = [s.RegionNumber];\r\nclass_vector = [s.ClassNumber];\r\nfor k = 1:num_regions\r\n    most_frequent_class(k) = mode(single(class_vector(region_vector == k)));\r\nend\r\n\r\nmost_frequent_class\r\n\r\n%%\r\n% Step 5: Construct the output image containing only the most frequently\r\n% occurring object classes in each region.\r\n\r\nbw2 = false(size(bw));\r\nfor k = 1:numel(s)\r\n    if most_frequent_class(s(k).RegionNumber) == s(k).ClassNumber\r\n        % The class number of this object matches the most frequent class\r\n        % number of objects in this region.\r\n        bw2(s(k).PixelIdxList) = 1;\r\n    end\r\nend\r\n\r\nimshow(bw2)\r\ntitle('Final result')\r\n\r\n%%\r\n% You can see that only stars are in region 1, only circles are in region\r\n% 2, and only triangles are in region 3.\r\n%\r\n% Here's the complete computation in one block of code:\r\n\r\ncc = bwconncomp(bw);\r\ns = regionprops(cc, 'PixelIdxList', 'Centroid');\r\n\r\nfor k = 1:cc.NumObjects\r\n    s(k).ClassNumber = classes(s(k).PixelIdxList(1));\r\nend\r\n\r\nfor k = 1:cc.NumObjects\r\n    s(k).RegionNumber = mode(single(regions(s(k).PixelIdxList)));\r\nend\r\n\r\nnum_regions = max(regions(:));\r\nmost_frequent_class = zeros(1, num_regions);\r\nregion_vector = [s.RegionNumber];\r\nclass_vector = [s.ClassNumber];\r\nfor k = 1:num_regions\r\n    most_frequent_class(k) = mode(single(class_vector(region_vector == k)));\r\nend\r\n\r\nbw2 = false(size(bw));\r\nfor k = 1:numel(s)\r\n    if most_frequent_class(s(k).RegionNumber) == s(k).ClassNumber\r\n        % The class number of this object matches the most frequent class\r\n        % number of objects in this region.\r\n        bw2(s(k).PixelIdxList) = 1;\r\n    end\r\nend\r\n\r\n%%\r\n% The entire computation takes about 11 ms on my laptop.\r\n%\r\n% There were a lot of useful techniques demonstrated here, especially:\r\n%\r\n% * Connected-component labeling\r\n% * <https:\/\/blogs.mathworks.com\/steve\/2008\/01\/28\/logical-indexing\/ Logical>\r\n% and <https:\/\/blogs.mathworks.com\/steve\/2008\/02\/08\/linear-indexing\/ linear>\r\n% indexing\r\n% * Using the pixel index lists for the connected components to index into\r\n% other vectors and matrices\r\n% * The comma-separated list syntax for structure arrays (something that is\r\n% particularly useful when working with the output of |regionprops|).\r\n\r\n##### SOURCE END ##### 1f9ec6ed64aa4511974413a576d68630\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   Blog reader Mutlu recently asked me this question:\r\n   \r\n   \"I have two images - one contains class labels (one of 1 or 2) and one containing image segment (region) unique IDs.  I am\r\n     ... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2011\/06\/21\/advanced-maneuvers-with-regionprops\/\">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":[561,102,90,76,36,152,122,599,162,168,559,190,270,78,52,130],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/374"}],"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=374"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/374\/revisions"}],"predecessor-version":[{"id":3733,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/374\/revisions\/3733"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}