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

正文內(nèi)容

指紋識別系統(tǒng)—免費(fèi)畢業(yè)設(shè)計(jì)論文(已改無錯(cuò)字)

2023-01-11 02:55:36 本頁面
  

【正文】 Once() { // TODO: Add your mand handler code here //讀取數(shù)字圖像的文件頭,獲取圖像的屬性參數(shù) LPBITMAPINFOHEADER lpBitmapInfoHeader = (LPBITMAPINFOHEADER)(m_pBitmap+14)。 LPBITMAPFILEHEADER lpBitmapFileHeader = (LPBITMAPFILEHEADER)m_pBitmap。 unsigned char *lpData = m_pBitmap + lpBitmapFileHeaderbfOffBits。 unsigned long biHeight = lpBitmapInfoHeaderbiHeight。 unsigned long biWidth = lpBitmapInfoHeaderbiWidth。 unsigned long biAlign = (biWidth*3+3)/4 *4。 unsigned long bmSize = biHeight * biAlign。 if(m_pTransfered==NULL)m_pTransfered=(unsigned char*) malloc (bmSize)。 if(m_pTransfered==NULL)return。 //圖像矩陣坐標(biāo)與像素?cái)?shù)據(jù) int x,y,cur。 unsigned char tempR, tempG, tempB。 float fTempBufforDisp。 short MaxPixVal,MinPixVal,Diff。 short **spOriginData, **spTransData0, **spTransData1。 //分配圖像小波變換所用的數(shù)據(jù)空間 spOriginData = new short* [biHeight]。 spTransData0 = new short* [biHeight]。 spTransData1 = new short* [biHeight]。 m_WvltCoeff = new short * [biHeight]。 for(int i = 0。 i biHeight。 i ++) { spOriginData[i] = new short [biWidth]。 spTransData0[i] = new short [biWidth]。 spTransData1[i] = new short [biWidth]。 m_WvltCoeff[i] = new short [biWidth]。 } //創(chuàng)建圖像小波變換類 CWvltTrans *pTrans。 //從設(shè)備緩存中獲取原始圖像數(shù)據(jù) for(y=0。 y(int)biHeight。 y++) { for( x=0。 x(int)biWidth。 x++) { cur = y*biAlign+3*x。 tempB=lpData[cur]。 tempG=lpData[cur+1]。 tempR=lpData[cur+2]。 spOriginData[biHeight1y][x]=(short)(*tempR+*tempG+*tempB)。 //no problem }} //完成一次圖像小波變換 pTransDWT_Once(spOriginData,spTransData0,spTransData1,biHeight, biHeight/2,biWidth,biWidth/2,1,)。 //允許圖像復(fù)原操作標(biāo)志 m_bOnce = TRUE。 m_bOnce = m_bOnce amp。 ~m_bTwice amp。 ~m_bTribl amp。 ~m_bFilter。 MaxPixVal=spTransData1[0][0]。 MinPixVal=spTransData1[0][0]。 for( y=0。 y(int)biHeight。 y++) { for( x=0。 x(int)biWidth。 x++) { if(MaxPixValspTransData1[y][x]) MaxPixVal=spTransData1[y][x]。 if(MinPixValspTransData1[y][x]) MinPixVal=spTransData1[y][x]。 m_WvltCoeff[y][x] = spTransData1[y][x]。 }} Diff=MaxPixValMinPixVal。 for(y=0。 y(int)biHeight。 y++) { for(x=0。 x(int)biWidth。 x++) { //因?yàn)樾〔ㄗ儞Q后的小波系數(shù)有可能超過 255 甚至更多,那么就將 //小波系數(shù)的范圍映射到 0~255 區(qū)間內(nèi),以后出現(xiàn)類似的處理,目的都是一樣的 fTempBufforDisp=spTransData1[biHeight1y][x]。 fTempBufforDisp=MinPixVal。 fTempBufforDisp*=255。 fTempBufforDisp/=Diff。 cur= y*biAlign+3*x。 //current pixel m_pTransfered[cur] = (unsigned char)fTempBufforDisp。 m_pTransfered[cur+1]= (unsigned char)fTempBufforDisp。 m_pTransfered[cur+2]= (unsigned char)fTempBufforDisp。 }} //顯示圖像的小波系數(shù) UpdateAllViews(NULL)。 //刪除臨時(shí)的數(shù)據(jù)空間 delete spOriginData。 delete spTransData0。 delete spTransData1。} 編譯后,程序的運(yùn)行如圖 26所示。 圖 26 一層小波變換的運(yùn)行結(jié)果 除了圖像的一層小波變換,很多應(yīng)用使用的是圖像的 3 層小波變換,下面將分析 3層小波變換的實(shí)現(xiàn)代碼。當(dāng)變換層數(shù)大于 1 時(shí),第 2層以后的小波變換的對象是 LL 頻帶的小波系數(shù),該頻帶的系數(shù)包含了圖像的基本信息,它是圖像能量集中的頻 帶。這樣 LL 便如第一層小波變換一般分成 4 個(gè)頻帶,其中 LL仍然是下一層小波變換的數(shù)據(jù)源。 下面看一下 3層小波變換的實(shí)現(xiàn)代碼: ( 1)函數(shù)描述 DWT_TriLayers 完成三次圖像的小波變換 ( 2)函數(shù)參數(shù) short **spOriginData:二維指針,指向原始的圖像數(shù)據(jù) short **spTransData0:小波變換系數(shù),存放一次水平變換后的小波系數(shù) short **spTransData1:小波變換系數(shù),存放一次數(shù)值變換后的小波系數(shù) int nHeight :圖 像屬性參數(shù),數(shù)值為原始圖像的高度值 int nHeight_H:圖像屬性參數(shù),數(shù)值為原始圖像高度值的一半 int nWidth :圖像屬性參數(shù),數(shù)值為原始圖像的寬度值 int nWidth_H :圖像屬性參數(shù),數(shù)值為原始圖像寬度值的一半 int layer:小波變換的層數(shù) ,數(shù)值為 3 層 float fRadius :小波變換因子,在調(diào)用時(shí)候已指定數(shù)值為 ( 3)函數(shù)代碼 Void CWvltTrans::DWT_TriLayers(short** spOriginData, short** spTransData0, short** spTransData1, int nHeight, int nHeight_H, int nWidth, int nWidth_H, int layer, float fRadius) { int i。 short **pData, **pTran0, **pTran1。 //圖像的屬性參數(shù) int iWidth, iHeight, iWidth_H, iHeight_H。 float fr = fRadius。 //獲得數(shù)據(jù)空間的指針 pData = spOriginData。 pTran0 = spTransData0。 pTran1 = spTransData1。 //圖像屬性參數(shù)賦值 iWidth = nWidth。 iWidth_H = nWidth_H。 iHeight = nHeight。 iHeight_H = nHeight_H。 //利用循環(huán)完 成兩次小波變換 for(i=1。 i=layer。 i++) {DWT_Once(pData,pTran0,pTran1,iHeight,iHeight_H,iWidth,iWidth_H,i,fr)。 iHeight=iHeight1。 iWidth=iWidth1。 iHeight_H=iHeight/2。 iWidth_H=iWidth/2。 }} 在 CWvltDoc 方面,首先給菜單選項(xiàng)定義消息 ID,如圖 27所示。 圖 27 消息 ID的定義 下 面來看一下圖像 3層小波變換的實(shí)現(xiàn),并完成小波系數(shù)的顯示。 void CWvltDoc::OnWvltTransTrbl() { // TODO: Add your mand handler code here //讀取數(shù)字圖像的文件頭,獲取圖像的屬性參數(shù) LPBITMAPINFOHEADER lpBitmapInfoHeader = (LPBITMAPINFOHEADER)(m_pBitmap+14)。 LPBITMAPFILEHEADER lpBitmapFileHeader = (LPBITMAPFILEHEADER)m_pBitmap。 unsigned char *lpData = m_pBitmap + lpBitmapFileHeaderbfOffBits。 unsigned long biHeight = lpBitmapInfoHeaderbiHeight。 unsigned long biWidth = lpBitmapInfoHeaderbiWidth。 unsigned long biAlign = (biWidth*3+3)/4 *4。 unsigned long bmSize = biHeight * biAlign。 if(m_pTransfered==NULL)m_pTransfered=(unsigned char*) malloc (bmSize)。 if(m_pTransfered==NULL)return。 //圖像矩陣坐標(biāo)與像素?cái)?shù)據(jù) int x,y,cur。 unsigned char tempR, tempG, tempB。 float fTempBufforDisp。 short MaxPixVal,MinPixVal,Diff。 short **spOriginData, **spTransData0, **spTransData1。 //分配圖像小波變換的數(shù)據(jù)內(nèi)存空間 spOriginData = new short* [biHeight]。 spTransData0 = new short* [biHeight]。 spTransData1 = new short* [biHeight]。 m_WvltCoeff = new short * [biHeight]。 for(int i = 0。 i biHeight。 i ++) { spOriginData[i] = new short [biWidth]。 spTransData0[i] = new short [biWidth]。 spTransData1[i] = new short [biWidth]。 m_WvltCoeff[i] = new short [bi
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1