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

正文內(nèi)容

基于vc數(shù)字圖像處理課程設(shè)計說明書-資料下載頁

2025-06-05 16:28本頁面
  

【正文】 ) m_lpDib。//填寫位圖信息頭BITMAPINFOHEADER結(jié)構(gòu) m_lpBmpInfoHeadbiSize = sizeof(BITMAPINFOHEADER)。 m_lpBmpInfoHeadbiWidth = m_imgWidth。 m_lpBmpInfoHeadbiHeight = m_imgHeight。 m_lpBmpInfoHeadbiPlanes = 1。 m_lpBmpInfoHeadbiBitCount = m_nBitCount。 m_lpBmpInfoHeadbiCompression = BI_RGB。 m_lpBmpInfoHeadbiSizeImage = 0。 m_lpBmpInfoHeadbiXPelsPerMeter = 0。 m_lpBmpInfoHeadbiYPelsPerMeter = 0。 m_lpBmpInfoHeadbiClrUsed = m_nColorTableLength。 m_lpBmpInfoHeadbiClrImportant = m_nColorTableLength。 m_hPalette = NULL。//調(diào)色板置空 if(m_nColorTableLength!=0){ m_lpColorTable=(LPRGBQUAD)(m_lpDib+sizeof(BITMAPINFOHEADER))。 memcpy(m_lpColorTable,lpColorTable,sizeof(RGBQUAD) * m_nColorTableLength)。 MakePalette()。}//如果有顏色表,則將顏色表拷貝至新生成的 DIB,并生成調(diào)色板 m_pImgData = (LPBYTE)m_lpDib+sizeof(BITMAPINFOHEADER)+ sizeof(RGBQUAD) * m_nColorTableLength。 memcpy(m_pImgData,pImgData,imgBufSize)。//將新位圖數(shù)據(jù)拷貝至 新的 DIB中 } ///////////////////////////《 VC++》課程設(shè)計 25 void Pic_Enhance::GradSharp(unsigned char Thre)//圖像銳化 { unsigned char* pSrc。 // 指向源圖像的指針 unsigned char* pDst。 unsigned char* pSrc1。 unsigned char* pSrc2。 LONG i,j。 // 循環(huán)變量 int bTemp。 if(m_pImgDataOut != NULL) {delete []m_pImgDataOut。m_pImgDataOut = NULL。 } int lineByte = (m_imgWidth * m_nBitCount / 8 + 3) / 4 * 4。 if(m_nBitCount != 8) {AfxMessageBox(只能處理 8位灰度圖像 !)。return 。} //創(chuàng)建要復(fù)制的圖像區(qū)域 m_nBitCountOut = m_nBitCount。 int lineByteOut = (m_imgWidth * m_nBitCountOut / 8 + 3) / 4 * 4。 if (!m_pImgDataOut) {m_pImgDataOut = new unsigned char[lineByteOut * m_imgHeight]。} int pixelByte = m_nBitCountOut / 8。 for(i = 0。 i m_imgHeight。 i++){ for(j = 0。 j m_imgWidth * pixelByte。 j++) *(m_pImgDataOut + i * lineByteOut + j) = *(m_pImgData + i * lineByteOut + j)。} for(i = 0。 i m_imgHeight。 i++) // 每行 { for(j = 0。 j m_imgWidth。 j++) // 每列 { pDst = m_pImgDataOut + lineByte * (m_imgHeight 1 i) + j。 //指向新 DIB第 i行第 j列的像素的指針 pSrc = (unsigned char*)m_pImgData + lineByte * (m_imgHeight 1 i) + j。 pSrc1 = (unsigned char*)m_pImgData + lineByte * (m_imgHeight 2 i) + j。 pSrc2 = (unsigned char*)m_pImgData + lineByte * (m_imgHeight 1 i)+ j + 1。 bTemp = abs((*pSrc)(*pSrc1)) + abs((*pSrc)(*pSrc2))。 if ((bTemp+120) 255)// 判斷是否小于閾值 { if (bTemp = Thre){*pSrc = bTemp + 120。}} else{ *pSrc = 255。} *pDst = *pSrc。 } } } ///////////////////// 《 VC++》課程設(shè)計 26 void GeometryTrans::MirrorHori() //圖像水平鏡像 { if(m_pImgDataOut!=NULL){delete []m_pImgDataOut。m_pImgDataOut=NULL。} m_imgWidthOut=m_imgWidth。 m_imgHeightOut=m_imgHeight。 int lineByte=(m_imgWidth*m_nBitCount/8+3)/4*4。 m_pImgDataOut=new unsigned char[lineByte*m_imgHeight]。 int i,j。 int k。 int pixelByte=m_nBitCountOut/8。 for(i=0。im_imgHeight。i++){ for(j=0。jm_imgWidth。j++){ for(k=0。kpixelByte。k++) *(m_pImgDataOut+i*lineByte+j*pixelByte+k) =*(m_pImgData+i*lineByte+(m_imgWidth1j)*pixelByte+k)。 } } } void GeometryTrans::MirrorVerti() //圖像垂直鏡像 { if(m_pImgDataOut!=NULL){delete []m_pImgDataOut。m_pImgDataOut=NULL。} m_imgWidthOut=m_imgWidth。 m_imgHeightOut=m_imgHeight。 int lineByte=(m_imgWidth*m_nBitCount/8+3)/4*4。 m_pImgDataOut=new unsigned char[lineByte*m_imgHeight]。//申請緩沖區(qū),存放輸出結(jié)果 int i,j。 int k。 int pixelByte=m_nBitCountOut/8。 for(i=0。im_imgHeight。i++){ for(j=0。jm_imgWidth。j++){ for(k=0。kpixelByte。k++) *(m_pImgDataOut+i*lineByte+j*pixelByte+k) =*(m_pImgData+(m_imgHeight1i)*lineByte+j*pixelByte+k)。 } } } ///////////////////////void SpecialEffectShow::Scan(CDC *pDC) //掃描顯示一幅圖象 { int bitmapWidth=GetDimensions().cx。//獲得源圖象的寬度,以象素為單位 int bitmapHeight=GetDimensions().cy。//獲得源圖象的高度,以象素為單位 CRect rect(0,0,bitmapWidth,bitmapHeight)。//以源圖象的尺寸創(chuàng)建一個矩形 CBrush brush(RGB(255,255,255))。 //設(shè)置畫刷為白色 pDCFillRect(amp。rect,amp。brush)。 LPBITMAPINFO pBitmapInfo=(BITMAPINFO*)m_lpBmpInfoHead。 for(int j=0。jbitmapHeight。j++)//掃描特效顯示的具體算法 { ::StretchDIBits(pDCGetSafeHdc(),0, j, bitmapWidth, 1,0, bitmapHeightj, 《 VC++》課程設(shè)計 27 bitmapWidth, 1,m_pImgData, pBitmapInfo,DIB_RGB_COLORS, SRCCOPY)。 Sleep(3)。//設(shè)置延時時間 } } void SpecialEffectShow::Slide(CDC *pDC)//滑動顯示 { int bitmapWidth=GetDimensions().cx。 int bitmapHeight=GetDimensions().cy。 CRect rect(0,0,bitmapWidth,bitmapHeight)。//以源圖象的尺寸創(chuàng)建一個矩形 CBrush brush(RGB(255,255,255))。 //設(shè)置畫刷為白色 pDCFillRect(amp。rect,amp。brush)。//將已經(jīng)顯示出來的原圖象重新設(shè)置成白色,達(dá)到刷新屏幕的效果 LPBITMAPINFO pBitmapInfo=(BITMAPINFO*)m_lpBmpInfoHead。 for(int i=0。i=bitmapWidth。i++)//滑動特效顯示的具體算法 {for(int j=0。j=bitmapHeight。j=j+8) {::StretchDIBits(pDCGetSafeHdc(), 0, j8 , i+1, 8, bitmapWidthi, bitmapHeightj, i+1, 8, m_pImgData, pBitmapInfo, DIB_RGB_COLORS, SRCCOPY)。 } Sleep(3)。//設(shè)置延時時間 } } void SpecialEffectShow::FadeIn(CDC *pDC)//漸進(jìn)顯示 { int bitmapWidth=GetDimensions().cx。 int bitmapHeight=GetDimensions().cy。 CRect rect(0,0,bitmapWidth,bitmapHeight)。 CBrush brush(RGB(0,0,0))。 //設(shè)置畫刷為黑色 pDCFillRect(amp。rect,amp。brush)。 LPBITMAPINFO pBitmapInfo=(BITMAPINFO*)m_lpBmpInfoHead。 int lineByte=(m_imgWidth*m_nBitCount/8+3)/4*4。 LPBYTE temp =new BYTE[bitmapHeight*lineByte]。 memset (temp,0,bitmapHeight*lineByte)。//初始置零 for(int m=0。m256。m++) { for(int j = 0。 j bitmapHeight。 j++) { for(int i = 0。 i lineByte。 i ++) temp[j*lineByte+i]=m_pImgData[j*lineByte+i]*m/256。} ::StretchDIBits(pDCGetSafeHdc(), 0, 0, bitmapWidth, bitmapHeight, 0, 0, bitmapWidth, bitmapHeight, temp, pBitmapInfo,DIB_RGB_COLORS, SRCCOPY)。 《 VC++》課程設(shè)計 28 Sleep(3)。//設(shè)置延時時間 } delete [] temp。//釋放堆上分配的內(nèi)存 } 本科生課程設(shè)計成績評定表 姓 名 性 別 專業(yè)、班級 課程 設(shè)計題目 : 課程設(shè)計答辯或
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1