%特征1为质心,特征2为轮廓面积,特征3为蓝色色度值均值,特征4为红色色度值均值
B1=FVetorBracketsM1;
B2=FVectorBracketsA2;
B3=FVectorBracketsPAB3;
B4=FVectorBracketsPAR4;
S1=FVetorScrewsM1;
S2=FVectorScrewsA2;
S3=FVectorScrewsPAB3;
S4=FVectorScrewsPAR4;
W1=FVetorWashersM1;
W2=FVectorWashersA2;
W3=FVectorWashersPAB3;
W4=FVectorWashersPAR4;
N1=FVetorNutsM1;
N2=FVectorNutsA2;
N3=FVectorNutsPAB3;
N4=FVectorNutsPAR4;
%特征1与特征2的相关性
subplot(2,3,1)
scatter(B1,B2,50,'r','o','filled'),
xlabel('Feature1'),
ylabel('Feature2'),
axis([0 200 0 20]);
hold on
scatter(S1,S2,50,'b','o','filled'),
hold on
scatter(W1,W2,50,'k','o','filled'),
hold on
scatter(N1,N2,50,'y','o','filled'),
hleg1 = legend('Braket`s Feature1 vs Feature2','Screw`s Feature1 vs Feature2','Washer`s Feature1 vs Feature2','Nut`s Feature1 vs Feature2');
%特征1与特征3的相关性
subplot(2,3,2)
xlabel('Feature1'),
ylabel('Feature3'),
scatter(B1,B3,50,'r','o','filled'),
% axis([0 300 0 20]);
hold on
scatter(S1,S3,50,'b','o','filled'),
hold on
scatter(W1,W3,50,'k','o','filled'),
hold on
scatter(N1,N3,50,'y','o','filled'),
hleg1 = legend('Braket`s Feature1 vs Feature3','Screw`s Feature1 vs Feature3','Washer`s Feature1 vs Feature3','Nut`s Feature1 vs Feature3');
%特征1与特征4的相关性
subplot(2,3,3)
xlabel('Feature1'),
ylabel('Feature4'),
scatter(B1,B4,50,'r','o','filled'),
% axis([0 300 0 20]);
hold on
scatter(S1,S4,50,'b','o','filled'),
hold on
scatter(W1,W4,50,'k','o','filled'),
hold on
scatter(N1,N4,50,'y','o','filled'),
hleg1 = legend('Braket`s Feature1 vs Feature4','Screw`s Feature1 vs Feature4','Washer`s Feature1 vs Feature4','Nut`s Feature1 vs Feature4');
%特征2与特征3的相关性
subplot(2,3,4)
xlabel('Feature2'),
ylabel('Feature3'),
scatter(B2,B3,50,'r','o','filled'),
axis([0 8 100 250]);
hold on
scatter(S2,S3,50,'b','o','filled'),
hold on
scatter(W2,W3,50,'k','o','filled'),
hold on
scatter(N2,N3,50,'y','o','filled'),
hleg1 = legend('Braket`s Feature2 vs Feature3','Screw`s Feature2 vs Feature3','Washer`s Feature2 vs Feature3','Nut`s Feature2 vs Feature3');
%特征2与特征4的相关性
subplot(2,3,5)
xlabel('Feature2'),
ylabel('Feature4'),
scatter(B2,B4,50,'r','o','filled'),
axis([0 8 100 250]);
hold on
scatter(S2,S4,50,'b','o','filled'),
hold on
scatter(W2,W4,50,'k','o','filled'),
hold on
scatter(N2,N4,50,'y','o','filled'),
hleg1 = legend('Braket`s Feature2 vs Feature4','Screw`s Featur2 vs Feature4','Washer`s Feature2 vs Feature4','Nut`s Feature2 vs Feature4');
%特征3与特征4的相关性
subplot(2,3,6)
xlabel('Feature3'),
ylabel('Feature4'),
scatter(B3,B4,50,'r','o','filled'),
% axis([0 8 0 300]);
hold on
scatter(S3,S4,50,'b','o','filled'),
hold on
scatter(W3,W4,50,'k','o','filled'),
hold on
scatter(N3,N4,50,'y','o','filled'),
hleg1 = legend('Braket`s Feature3 vs Feature4','Screw`s Featur3 vs Feature4','Washer`s Feature3 vs Feature4','Nut`s Feature3 vs Feature4');
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
(1)冬1显示了4种装配零件的彩色冬像:螺母(nuts)、螺钉(screws)、支架(brackets) 和垫圈(washers)。请你设计一组特征(不超过4种),能很好地把4种零件分开。 分析、讨论你的特征和背后的原理。 (2) 编写代码提取每种模式的上述4种特征,绘制每对特征的二维散点图(如.fl vs.f2,f3 vs.f4,等),讨论你的结果。 (3)计算原始空间中每一对样本之间的欧式距离。首先,你得把所有图像都转换 为同样大小,比如 32x32 彩色像素(提示:在 MATLAB 中,可使用函数 imresize)。 把距离组成30x30 的矩阵进行显示(提示:在 MATLAB中,可使用承数 imagesc)。 在一维特征空间中,重复上述过程。比较两种距离矩阵,在原始图像空间中和特征 =====================================================================================================================================================
资源推荐
资源详情
资源评论
收起资源包目录
PatternRecognizeHW1Problem_1.rar (49个子文件)
PatternRecognizeHW1Problem_1
w8.jpg 2KB
w9.jpg 16KB
b9.jpg 17KB
s7.jpg 5KB
s0.jpg 7KB
n6.jpg 3KB
w2.jpg 9KB
n9.jpg 8KB
b2.jpg 15KB
w4.jpg 2KB
b7.jpg 3KB
b1.jpg 7KB
b6.jpg 3KB
s6.jpg 6KB
w5.jpg 2KB
w0.jpg 16KB
n7.jpg 2KB
PAB_Get.m 514B
w7.jpg 7KB
b8.jpg 2KB
w6.jpg 7KB
n5.jpg 3KB
n4.jpg 4KB
b5.jpg 6KB
EulerDitanceCalculating.m 869B
s9.jpg 4KB
n3.jpg 5KB
s4.jpg 6KB
n0.jpg 4KB
n8.jpg 24KB
EulerDistanceOfFeature.mat 4KB
b4.jpg 14KB
w1.jpg 18KB
s2.jpg 7KB
EulerDistanceOfFeature.m 2KB
QualityHeartGet.m 1KB
w3.jpg 1KB
PAB_Get.asv 514B
s3.jpg 3KB
s1.jpg 15KB
PerimeterGet.m 481B
b0.jpg 4KB
s5.jpg 14KB
AreaGet.m 797B
n2.jpg 8KB
s8.jpg 3KB
b3.jpg 2KB
n1.jpg 5KB
ScatterFeature.m 3KB
共 49 条
- 1
资源评论
小城老师
- 粉丝: 25
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功