<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239714</link>
    <title>MATLAB Central Newsreader - matrix labels for color segmentation</title>
    <description>Feed for thread: matrix labels for color segmentation</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 21 Nov 2008 23:11:03 -0500</pubDate>
      <title>matrix labels for color segmentation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239714#612511</link>
      <author>francesco santi</author>
      <description>I have a MxNx3 matrix which is a color image.&lt;br&gt;
Then I add a 4th column to be used as labeling index for segmentation.&lt;br&gt;
I reshape this matrix to a MNx4 matrix where the first 3 columns are the 3 color components and the 4th column are the labels index.&lt;br&gt;
I need to compute mean and cov of the pixels with assigned label.&lt;br&gt;
I thought about scanning the matrix looking for the rows having as 4th value in the row the same number of the label index.&lt;br&gt;
&lt;br&gt;
temp=zeros(1,4);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for x = 1:3&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (RGB_columns(x,4) == label)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp(x,:) = RGB_columns(x,:);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
MU = mean(temp(:,:));&lt;br&gt;
&lt;br&gt;
In this way I should create the temp matrix with only the rows having the value that I am looking for in the label field...but I get this error message:&lt;br&gt;
&quot;Maximum recursion limit of 500 reached&quot;&lt;br&gt;
and if I change this value of course Matlab crashes.</description>
    </item>
    <item>
      <pubDate>Fri, 21 Nov 2008 23:41:02 -0500</pubDate>
      <title>Re: matrix labels for color segmentation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239714#612514</link>
      <author>francesco santi</author>
      <description>Please consider this code instead of the previous posted.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp=zeros(HLS_RESHAPE_ROWS,HLS_RESHAPE_COLS);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for x = 1:HLS_RESHAPE_ROWS&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (HLS_RESHAPE(x,4) == label)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp(x,1:3) = HLS_RESHAPE(x,1:3);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
MU=mean(temp);&lt;br&gt;
&lt;br&gt;
Thanks very much in advance to whom could help me.</description>
    </item>
    <item>
      <pubDate>Sat, 22 Nov 2008 00:04:02 -0500</pubDate>
      <title>Re: matrix labels for color segmentation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239714#612518</link>
      <author>francesco santi</author>
      <description>solved...</description>
    </item>
  </channel>
</rss>

