Volume Fraction for 2D image
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello Folks,
Im newbie in matlab.
Im working on image processing of bubble. I have questions :
- How to calculate the volume fraction for 2D image?
- WHats the difference between bwarea, and just 'Area' using regionprops?
- Is areaFraction in 2D represent volume fraction?
- How to convert my 2D image to 3D?
Thank you so much
:: Vira ::
댓글 수: 0
채택된 답변
Walter Roberson
2016년 1월 11일
1) and 3):
"volume fraction" does not apply to 2D images, just like "volume" does not apply to circles or squares.
Not unless you are using "volume" as the short form of "hypervolume" as "hypervolume" is a term that is applicable to the N-dimensional integral of containment for an N-dimensional figure. "hypervolume" includes "one dimensional content" == "length" for a one dimensional object == "line", "two dimensional content" == "area" for a two dimensional object, "three dimensional content" == "volume" for a three-dimensional object, and so on. If you then relax "hypervolume" to "volume" then "volume" of a 2D object would be the same as "area" of the object.
2) The area calculation for bwarea is described at http://www.mathworks.com/help/images/ref/bwarea.html#f1-71878. The Area returned by regionprops is the number of non-zero pixels in the region.
4) How do you make a piece of paper into a book? Answer: you stack it with a number of other pieces of paper. What you stack might be copies of the original or they might be different. There are different ways you can implement depending on your intent:
%copies
Image_3D = repmat(Image_2D, 1, 1, NumberOfLayers);
or
%layer distinct existing images
Image_3D = cat(3, Image_2D_A, Image_2D_B, Image_2D_C, Image_2D_D, ...);
or
%by computation
rows = size(Image_2D,1);
cols = size(Image_2D,2);
Image_3D = zeros(rows, cols, NumberOfLayers);
Image_3D(:,:,1) = Image_2D; %put original in the first layer
for K = 2 : NumberOfLayers
%e.g., Additive Noise
Noise = rand(rows,cols) < 0.05;
Image_3D(:,:,K) = Image_2D + Noise;
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!