首頁 資料庫 mysql教程 [OpenCV]:Visual Studio 2012 搭建 OpenCV2.4.3

[OpenCV]:Visual Studio 2012 搭建 OpenCV2.4.3

Jun 07, 2016 pm 03:33 PM
o opencv studio visual 搭建

[OpenCV under Visual Studio 2012 Ultimate] [Tentative experimentation for x86] Thereare really sofew materials for installing the OpenCV(2.4.3) for Visual Studio 2012. Hence, I have read several blogs to do it, and fortunately Igot it. ---

[OpenCV under Visual Studio 2012 Ultimate]

[Tentative experimentation for x86]

There are really so few materials for installing the OpenCV(2.4.3) for Visual Studio 2012. Hence, I have read several blogs to do it, and fortunately I got it.

----------------------------------------------------------------------------------------------------------------------------

[Envrionment]:

                  [1] OpenCV 2.4.3

                  [2] Winodws Eight

                  [3] Visual Studio 2012 Ultimate

[Steps]:

[1]Based on that you have installed the visual studio 2012 under windows eight.

[2]Download the opencv2.4.3 fromhttp://opencv.org/, you may choose the windows vision.

    And it will prompt the download page automatically.

[3]Double-Click the excutive file(.exe), which will help you unzip it, accurately not "installing".

    And now, we assume the whole directory is -->H:\MySoftware\OpenCV\opencv\

[4]Thenceforth, you get a documentation folder named "opencv", which includes a lot of files

    for current domainant platforms ie: Winodws, Mac, Linux/Unix, iOS, Android.

    Make sure, you get the folder called "build", which is extreme significant for us.

[5]Add the items for your "Path" system variable. Carefully I push two directories into the "Path".

       (1)H:\MySoftware\OpenCV\opencv\build\x86\vc10\bin\

       (2)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\

      Maybe, the second one is meaningless.

      Step by step, complish it.

[6]Restart the Visual Studio 2012, if you have runned it.

[7]Now, we may create a new VC++ project under VS2012.

    I founded the Win32 Console Application and chose the "Empty Project".

[8]Look up at your VS2012 File Bar, and manipulate follow under sequence:

    View -- Other Windows -- Property Manager, so you get the little "Propert Manager Window".

[9]Concentrate the "tree", you get the one like this:

     yourSolutionName:

          @Debug|Win32

              #Microsoft.Cpp.Win32.user

              #Application

              #Unicode Support

              #Core Windows.Libraries

          @Release|Win32

              #Microsoft.Cpp.Win32.user

              ..... .....

[10]Right-Click the orange one called "Microsoft.Cpp.Win32.user", and tap the "Properties" item.

[11]Thereby, a simple window show you where you will work.

[12]Press the "VC++ Directories" the resident on the left tree.

[13]Focus on the right part. And click the "Include Directories" and edit it by pressing the down-arrow.

     Add the three items into it.

     (1)H:\MySoftware\OpenCV\opencv\build\include\

     (2)H:\MySoftware\OpenCV\opencv\build\include\opencv\

     (3)H:\MySoftware\OpenCV\opencv\build\include\opencv2\

    Save it after you have done.

[14]Further more, tap the item "Library Directories" and edit it too.

      Push one directory into it :H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\

      And save it.

[Additionally]Press the "Linker" one the left tree, and choose "Input". Concentrate the right part,

                     and edit the "Additional Dependencies" by adding three items:

                     (1)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_core243d.lib

                     (2)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_highgui243d.lib

                     (3)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_imgproc243d.lib

                     And save it.

[15]Now, you can "cultivate" some opencv codes in your empty project.

     [For example]:

 

        #include "highgui.h";

        int main(int argc , char** argv)
        {
                 IplImage* img= cvLoadImage("./hello.jpg");   //Be sure you have a picture in the root dir
                 cvNamedWindow("Test One", CV_WINDOW_AUTOSIZE);
                 cvShowImage("Test One",img);
                 cvWaitKey(0);
                 cvReleaseImage(&img);
                 cvDestroyWindow("Test One");
                 return 0;
         }

        //Happily, you may find the visual studio 2012 can auto-complete the part of the function

        //, which stands for the success of including the opencv header file.

         //But if you attempt to run it, vs2012 will prompt error saying "Lacking MSVCP100D.dll".

         //So Awful.

[16]So let's solve this problem and try to think about "WHY".

     (Reason:)You may remember or not, we choose the folder which is named "vc10".

            That stands for "Visual Studio 2010" not "2012", so maybe there is something

            gone away from 2010 to 2012. To conquer it, we can find the nut called "MSVCP100D.dll"

            , get it and put it into the right place.

[17]So "google" is a good buddy, get sufficient results of "MSVCP100D.dll" , and you can choose one

     for downloading.

[18]Put this guy into the "Windows\System32\" folder, just it.

[19]Run your OpenCV Project again. What was worse, a "POP" again. This time it complain about

      "NO MSVCR100D.dll". Look at it again: it is not "MSVCP100D.dll" but "MSVCR100D.dll".

[20]So, you may have got the method: google it --> download it -->put it into Windows\System32\.

[21]Now, come back to your cute Visual Studio 2012 andRUNyour OpenCV Project

     (Whose codes you have done) again.

[22]HeHe, it works........................

[23]So, you get the OpenCV now, and it is the lastest one. Enjoy it.

----------------------------------------------------------------------------------------------------------------------------

[Notice]

The method above just show the [Debug Modle]. If you desire to get the [Release One], come back to the

[STEP NINE] and choose the GREEN ONE, and the setting for the "Linker" changing to :

     (1)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_core243.lib

     (2)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_highgui243.lib

     (3)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_imgproc243.lib

Remeber save it.

There is no "d", becuase the character "d" stands for "DEBUG" in this area.

----------------------------------------------------------------------------------------------------------------------------

[SO CUET THE OPENCV IS]

 

 

 

                           

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

<🎜>:泡泡膠模擬器無窮大 - 如何獲取和使用皇家鑰匙
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
北端:融合系統,解釋
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
Mandragora:巫婆樹的耳語 - 如何解鎖抓鉤
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Java教學
1666
14
CakePHP 教程
1425
52
Laravel 教程
1325
25
PHP教程
1273
29
C# 教程
1252
24
使用pip軟體套件管理器快速安裝OpenCV學習指南 使用pip軟體套件管理器快速安裝OpenCV學習指南 Jan 18, 2024 am 09:55 AM

使用pip命令輕鬆安裝OpenCV教程,需要具體程式碼範例OpenCV(OpenSourceComputerVisionLibrary)是一個開源的電腦視覺庫,它包含了大量的電腦視覺演算法和函數,可以幫助開發者快速建立圖像和視訊處理相關的應用程式。在使用OpenCV之前,我們需要先安裝它。幸運的是,Python提供了一個強大的工具pip來管理第三方函式庫

OpenCV安裝教學:PyCharm用戶必看 OpenCV安裝教學:PyCharm用戶必看 Feb 22, 2024 pm 09:21 PM

OpenCV是一種用於電腦視覺和影像處理的開源庫,廣泛應用於機器學習、影像辨識、視訊處理等領域。在使用OpenCV進行開發時,為了能夠更好地調試和運行程序,許多開發者選擇使用PyCharm這款強大的Python整合開發環境。本文將為PyCharm用戶提供OpenCV的安裝教學課程,並附上具體的程式碼範例。第一步:安裝Python首先,請確保您已經安裝了Python

主機板上的數位音訊輸出介面-SPDIF OUT 主機板上的數位音訊輸出介面-SPDIF OUT Jan 14, 2024 pm 04:42 PM

主機板上SPDIFOUT連接線序最近我遇到了一個問題,就是關於電線的接線順序。我上網查了一下,有些資料說1、2、4對應的是out、+5V、接地;而有些資料則說1、2、4對應的是out、接地、+5V。最好的方法是查看你的主機板說明書,如果找不到說明書,你可以使用萬用電表進行測量。首先找到接地,然後就可以確定其他的接線順序了。主機板vdg怎麼接線連接主機板的VDG接線時,您需要將VGA連接線的一端插入顯示器的VGA接口,另一端插入電腦的顯示卡VGA接口。請注意,不要將其插入主機板的VGA介面。完成連接後,您可以

霧鎖王國能野地搭建築嗎 霧鎖王國能野地搭建築嗎 Mar 07, 2024 pm 08:28 PM

玩家在霧鎖王國中進行遊戲時可以收集不同的材料用來建造建築,有很多玩家想知道野地搭建築嗎,霧鎖王國能野地是不能搭建築的,必須要在祭壇的範圍內才可以搭建。霧鎖王國能野地搭建築嗎答:不能。 1.霧鎖王國能野地是不能搭建築的。 2、建築必須要在祭壇的範圍內才可以搭建。 3、玩家可以自行放置靈火祭壇,但一旦離開了範圍,將無法進行建築搭建。 4.我們也可以直接在山上挖個洞當做我們的家,這樣不用耗建築材料。 5.玩家自己搭建的建築中,有舒適度機制,也就是說,內裝越好,舒適度越高。 6.高舒適度將為玩家帶來屬性加成,例如

新手請看:詳細教學如何在PyCharm中安裝OpenCV 新手請看:詳細教學如何在PyCharm中安裝OpenCV Feb 26, 2024 pm 03:24 PM

PyCharm是一款由JetBrains公司開發的強大的Python整合開發環境(IDE),提供了豐富的功能和工具來幫助Python開發者編寫程式碼、除錯程式以及管理專案。在PyCharm中使用OpenCV這一強大的電腦視覺庫,可以輕鬆地進行影像處理、視訊處理等任務。本文將詳細介紹在PyCharm中安裝和設定OpenCV的步驟,並提供具體的程式碼範例。 1.安

在PyCharm中快速安裝PyTorch:簡易指南 在PyCharm中快速安裝PyTorch:簡易指南 Feb 24, 2024 pm 09:54 PM

PyTorch安裝指南:在PyCharm中快速搭建開發環境PyTorch是當前深度學習領域中備受歡迎的框架之一,具有易用性和靈活性的特點,深受開發者青睞。本文將為大家介紹如何在PyCharm中快速建置PyTorch的開發環境,方便大家開始深度學習專案的開發。步驟一:安裝PyTorch首先,我們需要安裝PyTorch。 PyTorch的安裝通常需要考慮到系統環境

PyCharm教學:如何在PyCharm中安裝OpenCV PyCharm教學:如何在PyCharm中安裝OpenCV Feb 23, 2024 am 10:39 AM

在當今世界中,電腦視覺技術正日益廣泛應用於各種領域,如人臉辨識、影像處理、自動駕駛等。而OpenCV(OpenSourceComputerVisionLibrary)作為一個開源的電腦視覺庫,為開發者提供了豐富的功能和工具,幫助他們實現各種視覺任務。在Python環境中使用OpenCV,可以藉助PyCharm這一強大的整合開發環境來更有效率地開

使用pip在Python中安裝OpenCV的方法 使用pip在Python中安裝OpenCV的方法 Jan 18, 2024 am 08:57 AM

在Python中使用OpenCV可以幫助我們進行影像處理、電腦視覺等方面的工作。而pip是Python中一個非常重要的套件管理工具,可以讓我們輕鬆安裝、升級或解除安裝Python套件。在本文中,我將向大家介紹如何使用pip安裝OpenCV,並附上具體的程式碼範例。第一步:安裝pip如果你還沒安裝pip,那你需要先安裝它。在Linux和macOS系統下,可以使用

See all articles