您的位置:首页 > 编程语言 > MATLAB

matlab用来度量图像区域属性的函数——regionprops

2012-08-15 22:23 344 查看


在此用regionprops实现了二值图像划region,找质心

clc; clear all; close all;
I=imread('1.jpg');
I1 = im2bw(I);
figure; imshow(I, []);
figure; imshow(I1, []);
L = bwlabel(I1);
stats = regionprops(L, 'all');
hold on;
for i = 1 : length(stats)
temp = stats(i).Centroid;
plot(temp(1), temp(2), 'r.');
end




  from:/article/1821077.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: