Message Boards Message Boards


calculate standard deviation

Posted 8 years ago
1 Reply
0 Total Likes

I need to calculate standard deviation RGB image characteristics. I need to calculatie Green standard deviation and Blue Standard deviation. How can I do this? I tryed to write something like this but I don't understand why this code doesn't work/ file = Import["D:\Mathematica\1.jpg"];(open filr) imagedata = ImageData[file]; array = ImageData[file]; totalSKO = StandardDeviation[array[[all, , ]]]

POSTED BY: Dmitry Dmitriev
Posted 8 years ago

Hi Dimitry, The attached notebook does this. But, in brief:

In[10]:= {redData, greenData, blueData} = Transpose@Partition[Flatten[imageData], 3];

In[11]:= StandardDeviation /@ {redData, greenData, blueData} // N

Out[11]= {74.1906, 55.9707, 57.511}

In[12]:= Mean /@ {redData, greenData, blueData} // N

Out[12]= {165.726, 151.901, 141.397}
POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract