加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

模型转化Mat-〉XML

发布时间:2020-12-15 23:02:50 所属栏目:百科 来源:网络整理
导读:原文:http://www.jb51.cc/article/p-fietxyka-bcb.html 第一步:获取参数 其中为 matlab 语言 1.components 个数 NumComponents= length(model.rules{model.start}) ncom =length(model.rules{model.start}); 2.Numberof features 这个固定, = 31 , model

原文:http://www.52php.cn/article/p-fietxyka-bcb.html

第一步:获取参数

其中为matlab语言

1.components个数

NumComponents= length(model.rules{model.start})

ncom =length(model.rules{model.start});

2.Numberof features这个固定,= 31model文件中没有记录

3.Score threshold= model.thresh

第二步:获取每个componentroot filterpart filtersdeformation filter

1.对于每个component首先获取其中rootfilter的索引

model.start获取root filter的标号,分两种情况:

for icom = 1:ncom %component个数

rhs =model.rules{model.start}(icom).rhs;

% assume the root filter is firston the rhs of the start rules

if model.symbols(rhs(1)).type =='T'

% handle case where there's nodeformation model for the root

root =model.symbols(rhs(1)).filter;

else

% handle case where there is adeformation model for the root

root =model.symbols(model.rules{rhs(1)}(layer).rhs).filter;

end

2.在每个component内,获取part filter的个数,并获取每个part的参数

icom =1:NumComponents

npart =length(model.rules{model.start}(icom).rhs) -1 ;

%icom取值不同不影响这个结果,应该不同的part值一样

for ipart= 2: npart+1

irule =model.rules{model.start}(icom).rhs(ipart);

filternum =model.symbols(model.rules{irule}.rhs).filter;

%获取每个part的相关参数[dx,dy,ds]penalty[dx dy dxx dyy]

Vx =model.rules{model.start}(icom).anchor{ipart}(1)+1;

Vy =model.rules{model.start}(icom).anchor{ipart}(2)+1;

dx = model.rules{irule}.def.w(2);

dy = model.rules{irule}.def.w(4);

dxx = model.rules{irule}.def.w(1);

dyy = model.rules{irule}.def.w(3);

end

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读