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

正文內(nèi)容

畢業(yè)論文--直方圖的二值化處理研究-閱讀頁

2025-01-31 21:25本頁面
  

【正文】 cus to a control } void CBmpDlg::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID amp。 ()。 } } // If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework. void CBmpDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this)。 // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON)。 CRect rect。rect)。 int y = (() cyIcon + 1) / 2。 } else { CDialog::OnPaint()。 } void CBmpDlg::OnOpenbmp() { CString strPictureName。 CFileDialog dlg(TRUE, TEXT(.bmp), NULL, 0, strFilter)。 m_sPath=strPictureName。 int pix_number[256]。 CString m_sourcefile=m_sPath。//m_sPath。 BITMAPFILEHEADER sourcefileheader。 sourcefile=fopen(m_sourcefile,rb)。sourcefileheader,1,sizeof(BITMAPFILEHEADER),sourcefile)。 MessageBox(原圖象不為 BMP 圖象! )。 } fread((void*)amp。 int i,j,m,n,k。 // n = 。 //這里是因為 BMP 規(guī)定保存時長度和寬度必須是 4 的整數(shù)倍 ,如果不是則 要補(bǔ)足 m=()*4。 n=()*4。 sourcebuf=(BYTE*)malloc(m*n)。 for(i=0。i++) { for(j=0。j++) { pix_number[sourcebuf[(i*m)+j]]++。 } } fclose(sourcefile)。 fprintf(file,%d ,m*n)。i256。 fclose(file)。i256。 } void CBmpDlg::OnTogray() { CString m_sourcefile=m_sPath。//m_sPath。//m_sPath。 BITMAPFILEHEADER sourcefileheader,targetfileheader。 memset(amp。 memset(amp。 sourcefile=fopen(m_sourcefile,rb)。sourcefileheader,1,sizeof(BITMAPFILEHEADER),sourcefile)。 MessageBox(原圖象不為 BMP 圖象! )。 } fread((void*)amp。 if(!=24) { fclose(sourcefile)。 return。 =+。 =0。 //構(gòu)造灰度圖的信息頭 =8。 =。 =1。 =。 =。 =256。 int i,j,m,n,k。i256。 rgbquad[i].rgbGreen=i。 rgbquad[i].rgbReserved=0。 if(targetfile==0) MessageBox(位圖文件轉(zhuǎn)換成功! ) 。targetfileheader,1,sizeof(BITMAPFILEHEADER),targetfile)。targetinfoheader,1,sizeof(BITMAPINFOHEADER),targetfile)。rgbquad,1,sizeof(RGBQUAD)*256,targetfile)。 BYTE* targetbuf。 if(m) m=m+4。 if(n) n=n+4。 //讀取原圖的顏色矩陣信息 fread(sourcebuf,1,m*n*3,sourcefile)。 targetbuf=(BYTE*)malloc(m*n)。 for(i=0。i++) { for(j=0。j++) 27 { for(k=0。 k++) color[k]=sourcebuf[(i*m+j)*3+k]。 if(targetbuf[(i*m)+j]255) targetbuf[(i*m)+j]=255。 fclose(targetfile)。 } void CBmpDlg::OnZhifangtu2() { int i,maxcount。i256。 } } CString c=。 Line(5,230,270,230,IDC_STATIC_ZHI,2,c,RGB(0,0,0))。 Line(5,30,10,35,IDC_STATIC_ZHI,2,c,RGB(0,0,0))。 Line(270,230,265,235,IDC_STATIC_ZHI,2,c,RGB(0,0,0))。 Line(55,230,55,235,IDC_STATIC_ZHI,2,c,RGB(0,0,0))。 Line(105,230,105,235,IDC_STATIC_ZHI,2,c,RGB(0,0,0))。 Line(155,230,155,235,IDC_STATIC_ZHI,2,c,RGB(0,0,0))。 Line(205,230,205,235,IDC_STATIC_ZHI,2,c,RGB(0,0,0))。 Line(255,230,255,235,IDC_STATIC_ZHI,2,c,RGB(0,0,0))。 for(i=0。i++) Line(6+i,228,6+i,230int(200*count[i]/maxcount),IDC_STATIC_ZHI,1,c,RGB(255,0,0))。 str,COLORREF crColor ) { CPen pen(PS_SOLID,line_Width,crColor)。 CClientDC dc(pWnd)。pen)。 (x_1,y_1)。 (pOldPen)。 CClientDC dc(pWnd)。 (0)。 CRect rctPicture。rctPicture)。 GetObject(HBM,sizeof(bitmap),amp。 SelectObject(MemDC,HBM)。 SetStretchBltMode(dc,COLORONCOLOR)。 } void CBmpDlg::OnErzhihua() { UpdateData()。 //Invalidate()。// = 。 CString m_targetfile= 。 FILE *sourcefile,*targetfile。 BITMAPINFOHEADER sourceinfoheader,targetinfoheader。targetfileheader,0,sizeof(BITMAPFILEHEADER))。targetinfoheader,0,sizeof(BITMAPINFOHEADER))。 fread((void*)amp。 if(!=0x4d42) { fclose(sourcefile)。 return。sourceinfoheader,1,sizeof(BITMAPINFOHEADER),sourcefile)。 29 MessageBox(原圖象不為灰度圖,先做灰度變換! )。 } //構(gòu)造灰度圖的文件頭 =54+sizeof(RGBQUAD)*256。 =0。 =0x4d42。 =40。 =。 =BI_RGB。 =。 =0。 //構(gòu)造灰度圖的調(diào)色版 RGBQUAD rgbquad[256]。 for(i=0。i++) { rgbquad[i].rgbBlue=i。 rgbquad[i].rgbRed=i。 } targetfile=fopen(,wb)。targetfileheader,1,sizeof(BITMAPFILEHEADER),targetfile)。targetinfoheader,1,sizeof(BITMAPINFOHEADER),targetfile)。rgbquad,1,sizeof(RGBQUAD)*256,targetfile)。 BYTE* targetbuf。 if(m) m=m+4。 if(n) n=n+4。 //讀取原圖的顏色矩陣信息 fread(sourcebuf,1,m*n,sourcefile)。 30 targetbuf=(BYTE*)malloc(m*n)。 for(i=0。i++) { for(j=0。j++) { if(!m_ifchoose) { if(sourcebuf[(i*m)+j]m_fazhi) targetbuf[(i*m)+j]=255。 } else if(m_ifchoose==TRUE) { if(m_fazhisourcebuf[(i*m)+j] amp。 sourcebuf[(i*m)+j]m_fazhi2) targetbuf[(i*m)+j]=0。 } } } fwrite((void*)targetbuf,1,m*n+1,targetfile)。 // MessageBox(位圖文件轉(zhuǎn)換成功! )。 //D:\\畢業(yè)設(shè)計 直方圖的二值化處理研究 } void CBmpDlg::OnCheck1() { // TODO: Add your control notification handler code here UpdateData(TRUE)。 else GetDlgItem(IDC_EDIT2)EnableWindow(TRUE)。 }
點擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1