資源簡介
將圖像映射到HSV視覺接近的顏色空間中
計算統計在該空間的直方圖
代碼片段和文件信息
function?colorhist?=?colorhist(rgb)?
%?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)?
?%?check?input?
?
if?size(rgb3)~=3?
????error(‘3?components?is?needed?for?histogram‘);?
end?
%?globals?
H_BITS?=?4;?S_BITS?=?2;?V_BITS?=?2;?
%rgb2hsv可用rgb2hsi代替
hsv?=?uint8(255*rgb2hsv(rgb));?
imgsize?=?size(hsv);?
%?get?rid?of?irrelev
- 上一篇:梯度下降擬合算法例程
- 下一篇:自適應遺傳算法matlab代碼
評論
共有 條評論