3d Patch intensity

5 visualizzazioni (ultimi 30 giorni)
newnew
newnew il 28 Set 2020
Risposto: Priysha LNU il 9 Ott 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?

Risposta accettata

Priysha LNU
Priysha LNU il 9 Ott 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.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by