matlab图片处理中的问题(求大佬解释下t1,t2,t3,t4代表的含义,还有if语句中条件是什么意思) 100
bx=boud(Max(i),1);by=boud(Max(i),2);blen=boud(Max(i),4);bwid=boud(Max(i),3);%然后取整bx1=...
bx=boud(Max(i),1);by=boud(Max(i),2);
blen=boud(Max(i),4);bwid=boud(Max(i),3);
%然后取整
bx1=round(bx);by1=round(by);
Mblen(i)=round(blen);Mbwid(i)=round(bwid);
if (blen>=bwid)
MR=bwid;
else
MR=blen;
end
%把小的赋值给MR
if (MX(i)+round(MR/4)<=lie&&MY(i)+round(MR/6)<=hang&&TC(MY(i)+round(MR/6),MX(i)+round(MR/4))==1)
t2=1;
end
if (MX(i)-round(MR/4)>0&&MY(i)-round(MR/6)>0&&TC(MY(i)-round(MR/6),MX(i)-round(MR/4))==1)
t4=1;
end
if (MY(i)+round(MR/6)<=hang&&MX(i)-round(MR/4)>0&&TC(MY(i)+round(MR/6),MX(i)-round(MR/4))==1)
t7=1;
end
if (MY(i)-round(MR/6)>0&&MX(i)+round(MR/4)<=lie&&TC(MY(i)-round(MR/6),MX(i)+round(MR/4))==1)
t8=1;
end
if(t2&&t4&&t7&&t8&&S(Max(i)).Area/(hang*lie)>0.01) %当对象的象素少于1000的时候默认他不是路标
tz(i)=1;
t2=0;t4=0;t7=0;t8=0;
说错了是t2,t4,t7,t8.. 展开
blen=boud(Max(i),4);bwid=boud(Max(i),3);
%然后取整
bx1=round(bx);by1=round(by);
Mblen(i)=round(blen);Mbwid(i)=round(bwid);
if (blen>=bwid)
MR=bwid;
else
MR=blen;
end
%把小的赋值给MR
if (MX(i)+round(MR/4)<=lie&&MY(i)+round(MR/6)<=hang&&TC(MY(i)+round(MR/6),MX(i)+round(MR/4))==1)
t2=1;
end
if (MX(i)-round(MR/4)>0&&MY(i)-round(MR/6)>0&&TC(MY(i)-round(MR/6),MX(i)-round(MR/4))==1)
t4=1;
end
if (MY(i)+round(MR/6)<=hang&&MX(i)-round(MR/4)>0&&TC(MY(i)+round(MR/6),MX(i)-round(MR/4))==1)
t7=1;
end
if (MY(i)-round(MR/6)>0&&MX(i)+round(MR/4)<=lie&&TC(MY(i)-round(MR/6),MX(i)+round(MR/4))==1)
t8=1;
end
if(t2&&t4&&t7&&t8&&S(Max(i)).Area/(hang*lie)>0.01) %当对象的象素少于1000的时候默认他不是路标
tz(i)=1;
t2=0;t4=0;t7=0;t8=0;
说错了是t2,t4,t7,t8.. 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询