- https://www.mathworks.com/help/images/ref/regionprops.html
- https://www.mathworks.com/help/images/ref/regionprops3.html
3d Patch intensity
3 views (last 30 days)
Show older comments
I have divided 3D image size of 240x240x240 by k=4. Thus, I have a total of 60x60x60 patches and each patch have a size of 4x4x4. I would like to find the mean intensity of R G B respectively for each patch (4x4x4) and store it as the voxel value. May I know how do I proceed to do it?
For 2d image, i can use R = image(:,:,1), G = image(:,:,2) and B = image(:,:,3). However, i am not sure how do i do this for a 4x4x4 patch. Can i use the same way to do it?
0 Comments
Accepted Answer
Priysha LNU
on 9 Oct 2020
The 'REGIONPROPS' or 'REGIONPROPS3' command from the Image Processing Toolbox can calculate the minimum, maximum, and average intensity of regions. You can use 'regionprops()'/'regionprops3()'/ function and ask for the mean intensity of all the blobs by setting the 'Pixel Value Measurements' property or the 'Voxel Value Measurements' property respectively.
labeledImage = bwlabel(binaryImage);
measurements = regionprops(labeledImage, grayscaleImage, 'MeanIntensity');
OR, measurements = regionprops3(labeledImage, grayscaleImage, 'MeanIntensity');
For more information on the REGIONPROPS/REGIONPROPS3 function, type
doc regionprops
doc regionprops3
at the MATLAB Command Window, or go to these documentation links:
DISCLAIMER: These are my own views and in no way depict those of MathWorks.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!