How to calculate entropy of color image in matlab?

32 views (last 30 days)
I want to calculate entropy of color image. I found the command entropy(img) for the grayscale image. I dont know how to find entropy for a color image in matlab. Please help me.
  1 Comment
KSSV on 22 Feb 2017
It accepts RGB matrix i.e 3D matrix too. But I am not sure of the value.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 22 Feb 2017
reshape() the image to a vector and call entropy on that.
Image Analyst
Image Analyst on 19 Aug 2017
entropyWithinMask = entropy(grayImage(mask));

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!