Message Boards Message Boards

0
|
3489 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

calculate standard deviation

Posted 9 years ago

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 9 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}
Attachments:
POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract