Using regionprops to calculate the sum inside the ROI
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aaron Smith
am 26 Jul. 2017
Kommentiert: Aaron Smith
am 8 Aug. 2017
I have a logical mask with several regions of interest. I need to calculate the total intensity inside each of the regions of interest. I know that the max, min and mean intensities can be calculated but is it possible to calculate the sum. I am also applying this mask to a number of other matrices. My goal is to be able to compare the sum of each region for the different matrices and tabulate the data to show the differences between the regions and from matrix to matrix.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 26 Jul. 2017
Of course. Just ask regionprops() for the area and MeanIntensity and multiply them.
props = regionprops(labeledImage, grayImage, 'Area', 'MeanIntensity');
% Get the areas of all blobs.
allAreas = [props.Area];
% Get the mean intensities of all blobs.
allMeans = [props.MeanIntensity];
% Get the integrated gray level of all blobs.
allIGLs = allAreas .* allMeans;
4 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!