Image Processing Toolbox | ![]() ![]() |
Step 8: Extract Features from Label Matrix
Features can be extracted from the label matrix with the regionprops
function. For example, we can calculate two measurements (area and orientation) and view them as a function of one another.
stats = regionprops(wat, 'Area', 'Orientation'); area = [stats.Area]; orient = [stats.Orientation]; figure, plot(area, orient, 'b*'); title('Relationship of Particle Orientation to Area'); xlabel('particle area (pixels)'); ylabel('particle orientation (degrees)');
![]() | Step 7: Watershed Segmentation | Objects, Regions, and Feature Measurement | ![]() |