3d Patch intensity

조회 수: 4 (최근 30일)
newnew
newnew 2020년 9월 28일
답변: Priysha LNU 2020년 10월 9일
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?

채택된 답변

Priysha LNU
Priysha LNU 2020년 10월 9일
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개)

카테고리

Help CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by