volume fraction for 2-d image

7 views (last 30 days)
Tin Man To
Tin Man To on 19 May 2015
Commented: Image Analyst on 17 Jul 2020
How can I find the volume fraction difference between the two images? And is there a way to simulate the dry image looks like the wet one using matlab?
  2 Comments
Image Analyst
Image Analyst on 19 May 2015
It says wet1.jpg can't be displayed because of errors. What is your definition of volume fraction between two images? Can we assume the 2D area fraction is a measure of the volume fraction?
Tin Man To
Tin Man To on 19 May 2015
Here is the new wet1.jpg. Yes, I think we can assume it as area fraction:)

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 19 May 2015
Just threshold
binaryImage = grayImage > someThreshold;
areaFraction = sum(binaryImage(:)) / numel(binaryImage);
Do it for each image. You might want to mask it by the circle. Let me know if you need to know how to mask.
  5 Comments
SojM
SojM on 17 Jul 2020
How would you calculate volume fraction for stack of 2D binary images? I want to divide 3D volume in small subvolumes and obtain volume fraction in each subsolume.
Image Analyst
Image Analyst on 17 Jul 2020
volumeFraction = nnz(volumeArray) / numel(volumeArray)
volumeArray can be a sub-volume of your larger array if you want.

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!