MATLAB: Create a single matrix from regionprops outputs

loopmatrixregionprops

Hello, I use an active contour algorithm in order to get morphometry of 103 features from a raster image. I create a loop in order to launch the algorithm for each matrix which represents a feature. When I start it, I obtain a binary image of the first extracted feature but also its morphometrical properties (using regionprops function). The algorithm restart automatically and overwrites the previous results. Then, I obtain a binary image of the second extracted feature and its morphometrical properties. And so on, until the 103rd feature.
My question is : How can I save the regionprops output of my 103 features in a single matrix ? Do I have to save each binary image and not overwriting it?
%I use regionprops function on a binary image called "mask".
regionprops(mask,'Area','Eccentricity','MajorAxisLengt','MinorAxisLengt','MinorAxisLengt','Perimeter')
%For example, this is the output for feature 52 (on 103):
ans =
Area: 242
MajorAxisLength: 18.2367
MinorAxisLength: 17.0530
Eccentricity: 0.3544
Perimeter: 53.1110
%I wanna get this kind of matrix :
Feature Area MajorAxisLength MinorAxisLength Eccentricity Perimeter
Mask1 106 12.2514 8.6161 0.6054 32.1123
Mask2 217 16.2455 15.6546 0.9851 42.1565
Maskn .................................
Mask103 164 15.8454 9.1564 0.5463 35.1654
Thanks for your help!

Best Answer

for K = 1 : 103
rprops(K) = regionprops(....);
end
Areas = [props.Area];
MajorAxisLengths = [props.MajorAxisLength];
MinorAxisLengths = [props.MinorAxisLength];
[Areas(:), MajorAxisLengths(:), MinorAxisLengths(:)]