| 查看: 1973 | 回复: 8 | ||
[求助]
如何在MATLAB读取的图片中添加坐标系 已有1人参与
|
FMStation
至尊木虫 (知名作家)
- 应助: 591 (博士)
- 贵宾: 0.03
- 金币: 18114.7
- 红花: 97
- 帖子: 8891
- 在线: 1485.3小时
- 虫号: 2400059
- 注册: 2013-04-04
- 专业: 计算机应用技术
2楼2016-09-23 18:01:57
3楼2016-09-24 13:54:19
4楼2016-09-24 14:15:25
FMStation
至尊木虫 (知名作家)
- 应助: 591 (博士)
- 贵宾: 0.03
- 金币: 18114.7
- 红花: 97
- 帖子: 8891
- 在线: 1485.3小时
- 虫号: 2400059
- 注册: 2013-04-04
- 专业: 计算机应用技术
【答案】应助回帖
★ ★ ★ ★ ★ ★ ★ ★ ★ ★
小鬼木木: 金币+10, ★★★很有帮助 2016-09-24 19:42:50
小鬼木木: 金币+10, ★★★很有帮助 2016-09-24 19:42:50
|
在调用regionprops之前必须将二值图像转变为标注矩阵。两个函数可以做到: L = bwlabel(BW); L = double(BW); regionprops。顾名思义:它的用途是get the properties of region,即用来度量图像区域属性的函数。 语法 STATS = regionprops(L,properties) http://blog.sina.com.cn/s/blog_45b486b80100g45a.html |
5楼2016-09-24 15:10:12
6楼2016-09-24 15:26:41
|
>>clear all;close all; >> I=imread('v4.jpg'); >> i=im2bw(I); >> L=bwlabel(i); >> ZB1=regionprops(L,'Centroid');%acquire the center of mass >> center_x=ZB1.Centroid(1);%acquire X position of the center mass error: Field reference for multiple structure elements that is followed by more reference blocks is an error. 不知道问题出在了哪里?还望指点,谢谢! |
7楼2016-09-24 19:41:32
FMStation
至尊木虫 (知名作家)
- 应助: 591 (博士)
- 贵宾: 0.03
- 金币: 18114.7
- 红花: 97
- 帖子: 8891
- 在线: 1485.3小时
- 虫号: 2400059
- 注册: 2013-04-04
- 专业: 计算机应用技术
【答案】应助回帖
★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
小鬼木木: 金币+30, ★★★★★最佳答案 2016-09-24 20:26:58
小鬼木木: 金币+30, ★★★★★最佳答案 2016-09-24 20:26:58
8楼2016-09-24 19:56:51
9楼2016-09-24 20:26:44













回复此楼
小鬼木木