A problem with quantization of HSI space

조회 수: 2 (최근 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 CenterFile Exchange에서 Data Import and Network Parameters에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by