资源描述:
《如何在vc下使用opencv》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、如何初步在VisualC++6.0上使用OpenCV如何在VisualC++6.0上使用OpenCV王光一東華大學資訊工程研究所電腦視覺實驗室otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevic
2、toryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersand第7頁如何初步在VisualC++6.0上使用OpenCV目錄第一步使用VisualC++讀入檔案第二步使用OpenCV將影像讀入與顯示otherstaffoftheCe
3、ntre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,
4、ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersand第7頁如何初步在VisualC++6.0上使用OpenCV第一步如何使用VisualC++讀入檔案首先,請先開啟您的VC的程式。選擇開啟新專案(FileàNew),當視窗開啟後(圖1.1),選擇MFCAppWizard(exe)的選項。右邊請填上專案名稱(Projectname,本範例名稱為step1)與檔案的位置(Location)。完成後請
5、選擇OK。圖1.1New視窗進入下一個視窗後請選擇Dialogbased的選項,之後請按Finish的按鈕,完成新增一個視窗的程式。進入到一個新的編輯程式(圖1.2)之後,請拉出一個按鈕(Button)出來,Button名稱為IDC_LOADIMG(圖1.3)。請在按鈕上點滑鼠兩下(圖1.4),就會產生出一個函式。我們讀入影像的功能就寫在該函式中(圖1.5)。otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitt
6、eeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommit
7、teeSecretary,Ministersand第7頁如何初步在VisualC++6.0上使用OpenCV圖1.2一個新的編輯介面圖1.3按鈕的屬性圖1.4按鈕點兩下看到該視窗按OK就會產生新的函式otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,Ji