📄 cbir_featurecalc.m
字号:
function CBIR_featurecalc()
% EE6850 HW3, Content-Based Image Retrieval
% CBIR_featurecalc() --- feature calculation
% input:
% output:
% Feature vectors of each image
% saved as a struct in .mat file: imgname.feature_name
% current supported features:
% 10-19-2001, xlx@ee.columbia.edu
% some global constants
DEBUG = 0;
imgdir = 'H:\courses\vis\hw3\images\';
fetdir = 'H:\courses\vis\hw3\features\';
imgno = 243:245;
imgsuffix = '.png';
% read each image, calculate the feature struct
for i=imgno
imgrgb=imread([imgdir,num2str(i),imgsuffix]);
if DEBUG
imshow(imgrgb);
end
feature.colorhist = CBIR_colorhist(imgrgb);
feature.edgehist = CBIR_edgehist(imgrgb);
feature.edgedirection = CBIR_edgedirection(imgrgb);
save([fetdir,num2str(i),'.mat'], 'feature');
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -