A problem with quantization of HSI space

5 ビュー (過去 30 日間)
preet
preet 2013 年 10 月 10 日
編集済み: preet 2013 年 10 月 11 日
here H(0-360), S(0-1),I(0-1) . i want to divide in this way 12*3*3 .12-h,3-s,3-i
if I want to convert RGB in 4*4*4 , i am working like this
lbin=4;
abin=4;
bbin=4;
l=256/lbin;
a=256/abin;
b=256/bbin;
for(x=0;x<M;x++)
{
for(y=0;y<N;y++)
{
l1=LstarM1[x][y]/l;
a1=aM1[x][y]/a;
b1=bM1[x][y]/b;
bin=(l1*pow(lbin,2))+a1*pow(abin,1)+b1*pow(bbin,0);
count[bin]=count[bin]+1;
colorBin[x][y]=bin;
}//y
}//x
but i am trying to do this way in HSI , i am not getting the exact bins means 108 . when i am divide into 8*4*4 . use abin instead of lbin in following then i get the exact bins according to values and l=360/8
bin=(l1*pow(abin,2))+a1*pow(abin,1)+b1*pow(bbin,0);

回答 (0 件)

カテゴリ

Help Center および File ExchangeSignal Analysis についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by