3d Patch intensity

4 visualizaciones (últimos 30 días)
newnew
newnew el 28 de Sept. de 2020
Respondida: Priysha LNU el 9 de Oct. de 2020
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?

Respuesta aceptada

Priysha LNU
Priysha LNU el 9 de Oct. de 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.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by