1 / 8

OpenCV

OpenCV. OpenCV- Intel 所開發的 OpenCV 全名是 Open Source Computer Vision Library ,對於 Computer Vision 的研究或是軟體的開發等都很有幫助 OpenCV 作為開放的數字圖像處理和電腦視覺軟體平臺,有以下特點: ① 開放 C 源碼。 ② 基於 Intel 處理器指令集開發的優化代碼。 ③ 統一的結構和功能定義。 ④ 強大的圖像和矩陣運算能力。 ⑤ 方便靈活的用戶介面。 ⑥ 同時支持 MSWindows 和 Linux 平臺。. VC 2005 Express 下安裝與配置

loki
Télécharger la présentation

OpenCV

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OpenCV

  2. OpenCV- Intel所開發的OpenCV全名是Open Source Computer Vision Library,對於Computer Vision的研究或是軟體的開發等都很有幫助 OpenCV作為開放的數字圖像處理和電腦視覺軟體平臺,有以下特點: ① 開放C源碼。 ② 基於Intel處理器指令集開發的優化代碼。 ③ 統一的結構和功能定義。 ④ 強大的圖像和矩陣運算能力。 ⑤ 方便靈活的用戶介面。 ⑥ 同時支持MSWindows和Linux平臺。

  3. VC 2005 Express下安裝與配置 安裝VC 2005 Express 安裝Microsoft Platform SDK 安裝OpenCV

  4. cv –主要的OpenCV 函數。 例: 圖像處理、結構分析、運動分析和對象追蹤 …等 • cvaux –輔助的OpenCV 函數。 • cxcore –數據結構與線性代數。 例: 基礎結構、動態結構、繪圖函數 …等 • highgui –圖像界面函數。 例: 簡單圖形介面、讀取與保存圖像、視頻讀寫函數…等

  5. 圖像讀入、顯示和儲存 IplImage* pImg; //宣告圖像 pImg=cvLoadImage(“檔案名稱”, int flags ); //載入圖片 flags= 0 (8bits gray) flags= 1 (RGB color) flags= 2 (可以為8bits、16bits無號數,32bits有號數、 浮點數gray) flags=4 (保持不變)

  6. cvNamedWindow(“視窗名稱”, int flags ); //建立視窗 視窗屬性 flags,目前唯一支持的是CV_WINDOW_AUTOSIZE cvShowImage( “視窗名稱”,pImg); //顯示圖像 cvSaveImage( “儲存檔名”,pImg); //儲存圖像 cvReleaseImage( &pImg ); //釋放圖像

  7. 處理圖像pixels nr=pImg->height; nc=pImg->width; x=0~nr , y=0~nc; uchar* temp_ptr = &((uchar*)(pImg->imageData + pImg->widthStep*x))[y*3]; temp_ptr[0] = 0~255; // blue temp_ptr[1] = 0~255; // green temp_ptr[2] = 0~255; // red

  8. 使用function cvSobel( const CvArr* src, CvArr* dst, int xorder, int yorder, int size ); src=input image dst=output image size=1,3,5,7 (xorder=1, yorder=0, size=3)(xorder=0, yorder=1, size=3)

More Related