2011-07-02 84 views

回答

6

I think this is what you are looking for.此代碼由Ray Juang編寫。使用上面的代碼

void main(int argc, char *argv[]) 
    if (argc <= 1) { 
      printf("Usage: %s <image>\n", argv[0]); 
      return; 
     } 

    IplImage *tmp = cvLoadImage(argv[1]); 
    IplImage *tmp2 = cvCreateImage(cvSize(tmp->width, tmp->height), IPL_DEPTH_8U, 1); 

    cvCvtColor(tmp, tmp2, CV_RGB2GRAY); 

    cvNamedWindow("Before"); 
    cvShowImage("Before", tmp); 

    cvWiener2(tmp2, tmp2, 3,3); 
    cvNamedWindow("After"); 

    cvShowImage("After", tmp2); 
    //cvSaveImage("C:/temp/result.png", tmp2); 
    cvWaitKey(-1); 


    cvReleaseImage(&tmp); 
    cvReleaseImage(&tmp2); 
} 
+0

鏈接到yahoo組消息

例如是斷開的。 –

+0

已更新。無論如何,備用鏈接指向相同的兩個文件 – Niroshan

+1

所有鏈接都關閉了,我認爲這些是原始來源:https://www.ocf.berkeley.edu/~rayver/mm/code/cvWiener2/ – Amro