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

正文內(nèi)容

快速中值濾波算法-資料下載頁(yè)

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

【正文】 ) {// TODO: Add your mand handler code here}void CImageProcessingDoc::OnWaveletTransform() {// TODO: Add your mand handler code here}void CImageProcessingDoc::OnGreyAdjustifcation() {// TODO: Add your mand handler code here}void CImageProcessingDoc::OnGreyLinearAdjustifcation() {// TODO: Add your mand handler code here int x。 int y。 int tmp。 CGreyRatio mdlg。 ()。 for(y=0。ynRows。y++) for(x=0。xnCols。x++){ tmp =(int)(*mSourceData[y*nCols+x])。 tmp = tmp255?255:tmp。 pResultData[3*y*nCols+3*x] = tmp。 pResultData[3*y*nCols+3*x+1] = tmp。 pResultData[3*y*nCols+3*x+2] = tmp。 } UpdateAllViews(NULL)。 }void CImageProcessingDoc::OnGreySeglinearAdjustifcation() {// TODO: Add your mand handler code here}void CImageProcessingDoc::On2dgrad() {// TODO: Add your mand handler code here int x。 int y。 int dx。 int dy。 int tmp。 for(y=0。ynRows1。y++){ for(x=0。xnCols1。x++){ dx = mSourceData[y*nCols+x] mSourceData[y*nCols+x+1]。 dy = mSourceData[y*nCols+x] mSourceData[(y+1)*nCols+x]。 tmp = (int) sqrt(dx*dx+dy*dy)。 tmp = tmp255?255:tmp。 pResultData[3*y*nCols+3*x] = tmp。 pResultData[3*y*nCols+3*x+1] = tmp。 pResultData[3*y*nCols+3*x+2] = tmp。 } UpdateAllViews(NULL)。 }void CImageProcessingDoc::OnRobert() {// TODO: Add your mand handler code here int x。 int y。 int dx。 int dy。 int tmp。 for(y=0。ynRows1。y++){ for(x=0。xnCols1。x++){ dx = mSourceData[y*nCols+x] mSourceData[(y+1)*nCols+x+1]。 dy = mSourceData[y*nCols+x+1] mSourceData[(y+1)*nCols+x]。 tmp = (int) sqrt(dx*dx+dy*dy)。 tmp = tmp255?255:tmp。 pResultData[3*y*nCols+3*x] = tmp。 pResultData[3*y*nCols+3*x+1] = tmp。 pResultData[3*y*nCols+3*x+2] = tmp。 } UpdateAllViews(NULL)。}void CImageProcessingDoc::DCTandIDCT(float *Ff, int N, bool bDctIDct){ float *mR。 float *mI。 int i。 float Ff0 = 0。 mR = new float[N*2]。 mI = new float[N*2]。 if(bDctIDct){ for(i=0。i2*N。i++){ if(iN) mR[i] = Ff[i]。 else{ mR[i] = 0。 mI[i] = 0。 } for(i=0。iN。i++){ Ff0 += Ff[i]。 Ff0 = Ff0/sqrt(N)。 FFTandIFFT(mR,mI,2*N,true) Ff[0] = Ff0。 for(i=0。iN。i++){ Ff[i] = (mR[i]*cos(i*PI/(2*N)) + mI[i]*sin(i*PI/(2*N))) *sqrt()。 } else{ for(i=0。i2*N。i++){ if(iN){ mR[i] = Ff[i]*cos(i*PI/(2*N))。 mI[i] = Ff[i]*sin(i*PI/(2*N))。 } else{ mR[i] = 0。 mI[i] = 0。 } } for(i=0。iN。i++){ Ff0 += Ff[i]。 Ff0 = Ff0/sqrt(N)。 FFTandIFFT(mR,mI,2*N,false)。 for(i=0。iN。i++){ Ff[i] = 1/sqrt(N) sqrt() + sqrt()*mR[i]。 } return。}六、實(shí)驗(yàn)數(shù)據(jù)七、思考及體會(huì)在設(shè)計(jì)算法編制程序的時(shí)候,我們充分考慮到程序運(yùn)行的時(shí)間復(fù)雜度和空間復(fù)雜度問(wèn)題,在解決問(wèn)題的前提下,使算法盡量簡(jiǎn)單,使程序運(yùn)行占有的空間盡量的小,這樣來(lái)減少不必要的時(shí)問(wèn)浪費(fèi)和空間浪費(fèi),從而太大的提高程序執(zhí)行的效率。采用迭代,逐次逼近的方法得到本次的中值,在一行處理完畢后轉(zhuǎn)人下一行也采用走S型的方法.這樣除第一個(gè)窗口采用了一伏排序得到中值外,其它的窗口都利用上伏的窗口的象素刪除無(wú)用的3個(gè)象素后再加人新的3個(gè)象素,利用迭代的方法得到本次窗口的中值.這樣太大地提高了程序執(zhí)行的效率。本實(shí)驗(yàn)充分考慮到程序運(yùn)行的時(shí)間復(fù)雜度和空間復(fù)雜度問(wèn)題。解決了圖象大而內(nèi)存不足的問(wèn)題。對(duì)中值濾波的普通算法采用一般的常規(guī)算法,而對(duì)其快速算法采用走S型并且迭代的方法。采用對(duì)程序運(yùn)行計(jì)時(shí)的方法.對(duì)中值濾波的快速算法和普通算法進(jìn)行精確的比較,結(jié)論可靠。
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1