資源簡介
圖像檢索的matlab程序圖像檢索的matlab程序圖像檢索的matlab程序圖像檢索的matlab程序

代碼片段和文件信息
function?colorhist?=?CBIR_colorhist(rgb)
%?EE6850?HW3?Content-based?Image?Retrieval
%?CBIR_colorhist()?---?color?histogram?calculation
%?input:
%???MxNx3?image?data?in?RGB
%?output:
%???1x256?colorhistogram?<==?(HxSxV?=?16x4x4)
%?as?the?MPEG-7?generic?color?histogram?descriptor
%?[Ref]?Manjunath?B.S.;?Ohm?J.-R.;?Vasudevan?V.V.;?Yamada?A.?“Color?and?texture?descriptors“?
%?IEEE?Trans.?CSVT?Volume:?11?Issue:?6??Page(s):?703?-715?June?2001?(section?III.B)
%?
%?10-19-2001?xlx@ee.columbia.edu
%?check?input
if?size(rgb3)~=3
????error(‘3?components?is?needed?for?histogram‘);
end
%?globals
H_BITS?=?4;
S_BITS?=?2;
V_BITS?=?2;
%?convert?to?hsv
hsv?=?uint8(255*rgb2hsv(rgb));
imgsize?=?size(hsv);
%?get?rid?of?irrelevant?boundaries
i0=round(0.05*imgsize(1));??i1=round(0.95*imgsize(1));
j0=round(0.05*imgsize(2));??j1=round(0.95*imgsize(2));
hsv?=?hsv(i0:i1?j0:j1?:);
%?histogram
for?i?=?1?:?2^H_BITS
????for?j?=?1?:?2^S_BITS
????????for?k?=?1?:?2^V_BITS
????????????colorhist(ijk)?=?sum(sum(?...
????????????????bitshift(hsv(::1)-(8-H_BITS))==i-1?&...
????????????????bitshift(hsv(::2)-(8-S_BITS))==j-1?&...
????????????????bitshift(hsv(::3)-(8-V_BITS))==k-1?));????????????
????????end????????
????end
end
colorhist?=?reshape(colorhist?1?2^(H_BITS+S_BITS+V_BITS));
%?normalize
colorhist?=?colorhist/sum(colorhist);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1386??2001-10-26?10:56??CBIR-matlab\CBIR_colorhist.m
?????文件????????501??2001-10-26?12:59??CBIR-matlab\CBIR_cosinedist.m
?????文件???????1914??2001-10-26?23:46??CBIR-matlab\CBIR_edgedirection.m
?????文件???????1679??2001-10-27?03:24??CBIR-matlab\CBIR_edgehist.m
?????文件????????847??2001-10-27?03:40??CBIR-matlab\CBIR_featurecalc.m
?????文件????????760??2001-10-26?13:10??CBIR-matlab\CBIR_histintersection.m
?????文件????????412??2001-10-27?02:23??CBIR-matlab\CBIR_L2dist.m
?????文件???????2349??2001-10-28?04:04??CBIR-matlab\CBIR_Query.m
?????文件???????2754??2001-10-28?03:18??CBIR-matlab\CBIR_Query_minmax.m
?????目錄??????????0??2011-01-16?16:01??CBIR-matlab
-----------?---------??----------?-----??----
????????????????12602????????????????????10
- 上一篇:matlab小波復合閡值算法
- 下一篇:各種數字水印的matlab源代碼
評論
共有 條評論