?? 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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -