基于改进的颜色直方图的图像检索算法(7)

2018-11-18 21:10

}

}

{ } count--; o_dis[count]=-1; k1--;

o_dis[l]=o_dis[l+1];

//将该字块计算得到的颜色对表填入该图像的特征颜色对表

for(int scan=0; scan<8; scan++) { } }

if(o_dis[scan]>0) { }

pair[num].x1=x; pair[num].y1=y;

pair[num].o_dis1=o_dis[scan]; num++;

//对四个子块的颜色对表排序

void CImageRetrievalDlg::SortColorPair() {

//32个数据项中有count个实际数值 for(int count=0; count<32; count++)

{ }

if(pair[count].x1 == -1) break;

//对颜色对表从大到小排列序

struct pairs temp; for(int i=count; i>0; i--) { }

//计算域值 double ave=0;

for(int e=0; e

ave=ave/count; ave=ave*0.02; //消除差值小于域值的颜色对

ave += pair[e].o_dis1; for(int j=0; j

if(pair[j].o_dis1

temp = pair[j]; pair[j] = pair[j+1]; pair[j+1] = temp;

for(int k=0; k

if(fabs(pair[k].o_dis1-pair[k+1].o_dis1)

for(int l=k+1; l

pair[count-1].x1 = -1; count--; k--;

pair[l] = pair[l+1];

//臵特征颜色对数目变量 pair_count=count; }

//显示关键图(1,1)块颜色对信息

void CImageRetrievalDlg::OnShowInfo() {

CWnd* pWnd = GetDlgItem(IDC_STATIC_SHOWINFO); CDC* pDC = pWnd->GetDC(); pDC->Rectangle(0, 0, 120,160); int t1=0;

CString imagefilepath = strfile; CalculateColor(imagefilepath);

}

CalculateColorPair(1, 1); for(int ka1=0; ka1<8; ka1++) { }

CString sd1;

sd1.Format(\ pDC->TextOut(0,t1,sd1); t1+=20;

//开始检索

void CImageRetrievalDlg::OnStartRetrieval() {

UpdateData(TRUE);

for (int objset=0; objset<4; objset++) { } int m1=0;

if (m_00 == TRUE)

{obj_set[m1].x=0; obj_set[m1].y=0; m1++;} if (m_01 == TRUE)

{obj_set[m1].x=0; obj_set[m1].y=1; m1++;} if (m_02 == TRUE)

{obj_set[m1].x=0; obj_set[m1].y=2; m1++;}

obj_set[objset].x=0; obj_set[objset].y=0;

if (m_03 == TRUE)

{obj_set[m1].x=0; obj_set[m1].y=3; m1++;} if (m_10 == TRUE)

{obj_set[m1].x=1; obj_set[m1].y=0; m1++;} if (m_11 == TRUE)

{obj_set[m1].x=1; obj_set[m1].y=1; m1++;} if (m_12 == TRUE)

{obj_set[m1].x=1; obj_set[m1].y=2; m1++;} if (m_13 == TRUE)

{obj_set[m1].x=1; obj_set[m1].y=3; m1++;} if (m_20 == TRUE)

{obj_set[m1].x=2; obj_set[m1].y=0; m1++;} if (m_21 == TRUE)

{obj_set[m1].x=2; obj_set[m1].y=1; m1++;} if (m_22 == TRUE)

{obj_set[m1].x=2; obj_set[m1].y=2; m1++;} if (m_23 == TRUE)

{obj_set[m1].x=2; obj_set[m1].y=3; m1++;} if (m_30 == TRUE)

{obj_set[m1].x=3; obj_set[m1].y=0; m1++;} if (m_31 == TRUE)

{obj_set[m1].x=3; obj_set[m1].y=1; m1++;} if (m_32 == TRUE)

{obj_set[m1].x=3; obj_set[m1].y=2; m1++;} if (m_33 == TRUE)


基于改进的颜色直方图的图像检索算法(7).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:标准化管理

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: