I'm working on an image processing program that takes coordinate data of objects in an image acquired via the command regionprops and throws it into an array (that I will grab with a C program).
I'm having no issue sorting singular values into an array, but I am failing to put the coordinate data into one, which looks like [x,y].
blobMeasurements = regionprops(labeledImage, i, 'all');
numberOfBlobs = size(blobMeasurements, 1);
Centroid = size(blobMeasurements, ???);
g = 1;
n = 1;
for n = 1:97
if (blobMeasurements(n).Area > 500)
Centroid(g) = blobMeasurements(n).Centroid;
g = g + 1;
All I need is a simple set of lines that can achieve this. For the record, this isn't a homework assignment.