% 矩阵result中存要显示的图片编号1, 2, ……
% 图片名称为001,002,……
% 读取矩阵result中的内容 并在一张图中显示多个图像
% 其中数字前补零的方法:num2str(i,'%03d')
str1 = 'D:\pic_test\business_cards\Canon\';
str2 = 'D:\pic_test\business_cards\Reference\';
x = 5; % 要显示的待查询图片个数
imt = 1;
for i = 1 : x
im = imread([str2,num2str(i,'%03d'),'.jpg']);
subplot(x, 6, imt);
imshow(im);
imt = imt+1;
for j = 1 : 5
jj = result(i,j);
if jj ~= 0
I=imread([str1,num2str(jj,'%03d'),'.jpg']);
subplot(x, 6, imt);
imshow(I);
end
imt = imt+1;
end
end
matlab图像处理一些小知识
最新推荐文章于 2021-03-25 11:33:07 发布