freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于改進(jìn)的顏色直方圖的圖像檢索算法-資料下載頁(yè)

2025-06-27 20:22本頁(yè)面
  

【正文】 E) {obj_set[m1].x=3。 obj_set[m1].y=2。 m1++。} if (m_33 == TRUE) {obj_set[m1].x=3。 obj_set[m1].y=3。 m1++。} if (m1 != 4) {AfxMessageBox(請(qǐng)選擇四個(gè)小方塊)。 return。} SeekImage()。}void CImageRetrievalDlg::SeekImage(){ CString imagefilepath = strfile。 CalculateColor(imagefilepath)。 CalculateColorPair(obj_set[0].x, obj_set[0].y)。 CalculateColorPair(obj_set[1].x, obj_set[1].y)。 CalculateColorPair(obj_set[2].x, obj_set[2].y)。 CalculateColorPair(obj_set[3].x, obj_set[3].y)。 SortColorPair()。 struct pairs temps[32]。 for(int count1=0。 count132。 count1++) { temps[count1].x1 = pair[count1].x1。 temps[count1].y1 = pair[count1].y1。 temps[count1].o_dis1 = pair[count1].o_dis1。 } CString temp_1[1000]。 for(int count2=0。 count2counts。 count2++) { temp_1[count2] = *temp[count2]。 } int match=0。 double ave=0。 int scan=0,pium=1002,piccount=0,pic1=0。 CString pi。 for(int s=0。spair_count。s++) { ave+=pair[s].o_dis1。 } ave=ave/pair_count。 ave=ave*。 CWnd* pWnd = GetDlgItem(IDC_STATIC_NUM)。// 獲取繪制直方圖文本框的標(biāo)簽 CDC* pDC = pWndGetDC()。// 獲取設(shè)備上下文 for(int pic=0。 piccounts。 pic++) { CalculateColor(temp_1[pic])。 //顯示正在檢索的第N幅圖 ShowPic(temp_1[pic],IDC_VIEW14)。 (%d,pic+1)。 pDCTextOut(0,0,pi)。 int pairflag[32]。 for(int t=0。 t32。 t++) { pairflag[t]=1。 } for(int i=0。 i4。 i++) for(int j=0。j4。j++) { CalculateColorPair(i,j)。 for( scan=0。 scan8。 scan++) { if(pair[scan].x1==1) break。 } for(int p=0。 pscan。 p++) for(int count=0。 countpair_count。 count++) { if(fabs(temps[count].o_dis1pair[p].o_dis1)ave amp。amp。 pairflag[count]!=0) { pairflag[count]=0。 match++。 break。 } } } for(int re=0。rescan。re++) { pair[re].x1=1。 } if(match=pair_count*) piccount++。 if(match=pair_count* amp。amp。 pium=1013) { ShowPic(temp_1[pic],pium)。 pium++。 } } //顯示相似匹配數(shù) CWnd* pWnd1 = GetDlgItem(IDC_STATIC_TOTAL)。 CDC* pDC1 = pWnd1GetDC()。 (%d,piccount)。 pDC1TextOut(0,0,pi)。 }矩陣旋轉(zhuǎn)算法的實(shí)現(xiàn)作者: 來(lái)源: 發(fā)表時(shí)間:20061219 瀏覽次數(shù): 1171 字號(hào):大中小題目描述:將一個(gè)N*N方陣旋轉(zhuǎn)四次,再回到原來(lái)的樣子,過(guò)程如下(以N=3為例):123456789741852963987654321369258147123456789現(xiàn)要求編程模擬該過(guò)程。算法分析: 對(duì)于該矩陣旋轉(zhuǎn),我們可采用類似堆棧的操作來(lái)實(shí)現(xiàn),方法是定義兩個(gè)數(shù)組,從數(shù)組1中按列取出(彈棧)數(shù)顯示出來(lái),并按行放入數(shù)組2中(壓棧),然后從數(shù)組2中按原規(guī)則取出數(shù)據(jù)顯示并放入數(shù)組1中,如此每進(jìn)行一次操作我們所取的數(shù)組中的數(shù)據(jù)就會(huì)順時(shí)針旋轉(zhuǎn)90度,循環(huán)下去就可顯示其旋轉(zhuǎn)過(guò)程。該過(guò)程如下表所示:數(shù)組1147258369數(shù)組2789456123該算法源代碼如下(C語(yǔ)言):int s[2][3][3]。int c=1,i,a=0,b=1,m,h1[3],j。main(){for(i=0。i=2。i++) for(j=0。j=2。j++) s[0][i][j]=c++。for(i=0。i=4。i++) { h1[1]=h1[2]=h1[0]=2。 for(j=0。j=2。j++) {for(m=0。m=2。m++) {printf(%d\t,s[a][j][m])。 s[b][m][h1[m]]=s[a][j][m]。 h1[m]=1。 } printf(\n)。} a=!a。 b=!b。 printf(\n)。 }} 第1行的s[2][3][3]三維數(shù)組中的s[0][][]做數(shù)組1,s[1][][]做數(shù)組2用a的值決定從哪個(gè)數(shù)組中取值,用b的值決定給哪個(gè)數(shù)組賦值,a,b均在0,1間變動(dòng)即可依次從兩數(shù)組中取值賦值。 若要向左旋轉(zhuǎn)該矩陣,則只需將第12行的s[b][m][h1[m]]換為s[b][2m][2h1[m]]即可。以下是兩種模式匹配的算法,前者為普通算法,后者為KMP算法Index(char S[],char Sub[]){int i=0,j=1。while (i=S[0]amp。amp。j=Sub[0]){ if(S[i]==Sub[j]) { i++。 j++。 } else { i=ij+2。 j=1。 }}if (jSub[0])return iSub[0]。elsereturn 0。}Index_KMP(char S[],char Sub[]){int next[MAXSIZE],i=0,j=1。Get_next(Sub,next)。while (i=S[0]amp。amp。j=Sub[0]){ if (j==0||S[i]==Sub[j]) { i++。 j++。 } else j=next[j]。}if (jSub[0])return iSub[0]。elsereturn 0。}Get_next(char Sub[],int next[]){int i=1,j=0。next[1]=0。while(i=Sub[0]){ if (j==0||Sub[i]==Sub[j]) { i++。 j++。 if (Sub[i]!=Sub[j]) next[i]=j。 else next[i]=next[j]。 } else j=next[j]。}
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1