Entropy Caluclation on a Masked Region: Basic Question

I just need to know if the entropy function included with matlab is working with my masked region correctly.
I have a 2 channel grayscale tiff file with around 200 stacked images that represent a 3D image of my tissue sample. However, there is lots of empty space in the tissue sample that I do not want to consider in my entropy calculation. So I have masked the image by intensity to mask out the empty space. Now I have a nice 3D image with lots of 'black' space, which is exactly what I want.
Now, when I run the entropy calculation on the 3D matrix that represents my image, does it exclude the masked regions containing 0's from its calculation? Or does it count the empty regions, which would bring my entropy value down considerably? Note that this is the entropy function that is included with matlab: entropy(3DMatrix).
Thanks to anyone who can answer this!

 Accepted Answer

If you:
open entropy
you'll see that it deletes the zero values. This will lower the sum, however, as there are fewer values in the histogram.

2 Comments

Awesome! Thank you very much. I've only been using Matlab for a week, so I've clearly got a lot of learning to do.
Welcome to MATLAB Answers!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!