Install opencv Visual Studio 2015

Opencv tutorial on how to build OpenCV from source in Visual Studio 2015. This is useful when the new version has just been released and there is no prebuild library available.  If you download prebuild libs for Windows Visual Studio times again there is a problem with the newest VS just mussing. Let's check the version of libraries and VS.

Prebuild libs are only for versions VC11 and VC12. This means Visual Studio 2012 and 2013.

This step helps you compile your own opencv libs for VC14  - Visual Studio 2015 Community edition.

Important !!
 Nowadays just use NUGET packages in Visual Studio and you can code in under 1 minute. here.

Prepare third-party libs for opencv 

This step depends on your requirements. If you want Python lets install Python. But I can recommend installing the following parts. 

Build opencv 3.0.0 

Download Opencv 3.0.0 gold
  • Extract files folder into C:/opencv-3.0.0
  • Prepare Empty folder C:/opencv-build

Build your own OPENCV by CMAKE and VISUAL STUDIO.

Prepare Solution

  • install CMAKE
CMake is an extensible, open-source system that manages the build process in an operating system.
With this program, you generate a visual studio Opencv.sln solution file.


Choose windows installer 

Windows (Win32 Installer)
cmake-3.4.0-win32-x86.exe

Run Cmake

cmake-gui.exe


cmake opencv
cmake-gui

Set field-

  •  Where is the source code?  C:/opencv-3.0.0   (downloaded from git)
  •  Where to build the binaries C:/opencv-build   (the empty folder you create)
Select configure button
  • Choose Visual Studio 14 2015    Win64 bits of 32 as you like.
  • I am using default native compiler options. 
  • Hit a Finish button
In the table name- Choose the components you want to install. Just try the default first,

Now press the Generate button an with, 
This process takes some time and copies files and generates a Visual Studio OpenCV.sln file in the C:/opencv-build folder.

Build and release Opencv 3.0.0 in Visual Studio 2015

  • Open Visual Studio 2015 
  • By file-open-project choose OpenCV.sln in C:/opencv-build
  • Visual Studio open this project structure.
Build opencv Visual Studio 2015


  • Choose Debug and green start. 
  • After that choose Release and press green start. 

Opencv 3 visual studio 2015



This build and release process can generate some errors.
Look at the details. All these errors in my case are in performance test parts.

  • Ok  Some errors but in test parts. I don't care. Let's install OpenCV.

Install opencv Visual Studio 2015

Install Opencv, Windows 7, Windows 10, Visual Studio 2015

Visual Studio 2015 64-bit version

In case you open your build folder before this step and you can't find Opencv Libs and Headers. 
You need to do the following.
  • Choose an INSTALL project in the visual studio like in the picture.
  • Build Release only this install project
Install opencv Visual Studio 2015
Install your project

The result is 1 successfully built solution and 0 failed as in the picture.

Your installation of opencv is c:/opencv-build/install

There is your header and libs for Visual Studio 2015.
I have got only the x64 version.

Test Opencv Visual Studio 2015

Include Project in Visual Studio.

Choose the Property pages of the project.
C\C++
    General  
         Additional Include Directory as C:\opencv-build\install\include
         Additional #using Directory as C:\opencv-build\install\include
Linker
      General
         Additional Library Directories as C:\opencv-build\install\x64\vc14\lib
Linker
       Input
          Additional Dependencies add some libs like
         opencv_core300.lib
         opencv_highgui300.lib
         opencv_imgcodecs300.lib
         opencv_imgproc300.lib

And you can build your Opencv program. You can copy mine from the image but choose your picture.

Opencv 3.0.0 Visual Studio 2015









Next Post Previous Post
69 Comments
  • Anonymous
    Anonymous January 2, 2016 at 1:31 PM

    Hello,

    When I trying to build the libraries with CMake, I am getting an error saying there is no CMakeLists.txt so do we have to create that txt file or am i doing something wrong.

    Another question is when using cmake i directed the browse source to the opencv file and then for browse build do we direct it to the build file already existing in the extracted opencv or do make a new folder?

    Thank you,
    Tamara

    • Anonymous
      Anonymous January 10, 2016 at 7:45 AM

      This comment has been removed by the author.

    • Anonymous
      Anonymous January 10, 2016 at 7:49 AM

      This comment has been removed by the author.

    • Anonymous
      Anonymous January 10, 2016 at 7:50 AM

      Set your source code as C:/opencv-3.0.0/opencv/sources

      This is where the CMakeList.txt file is located.

  • Unknown
    Unknown January 2, 2016 at 6:42 PM

    I am getting this error
    Unable to start the program x64\Debug\ALL_BUILD
    Accsess Denied

    What i can do to solve this error

    • Unknown
      Unknown January 2, 2016 at 7:00 PM

      I am using windows 10 , x64 bit , obious VS 2015

    • George Lukus
      George Lukus June 6, 2016 at 10:01 AM

      I don't know if you still have this issue... I had it for a long time. But just right click and compile INSTALL separately and it all seems to work...

  • Vl
    Vl January 3, 2016 at 10:41 AM

    I am on holidays. I Check it out your problem soon. The Opencv 3.1 just released. There is prebuild libs for visual studio 2015. This is best solution for now. Just download version 3.1 for windows. And there is VS 2015 libs included. Best

    • Unknown
      Unknown January 6, 2016 at 4:12 PM

      Thanks !

  • Unknown
    Unknown January 23, 2016 at 7:44 AM

    I can not find a "OpenCV.sln" anywhere. Also letting windows search for *.sln didn't show any results.
    Any suggestions, what went wrong, or how to fix this?

    • Unknown
      Unknown January 23, 2016 at 8:04 AM

      Found that running cmake a second or even a third time solves the issue - I dont know why.
      It was suggested by this tutorial: http://inside.mines.edu/~whoff/courses/EENG510/lectures/other/CompilingOpenCV.pdf

  • Vl
    Vl January 23, 2016 at 7:50 AM

    At this time just use 3.1 Opencv Version. There is prebuild libs. I already delete this project, but opencv.sln are generated in C:/opencv-build folder by cmake. Cmake generate project in visual studio. This could be problem with cmake in your case. Just use opencv 3.1 with prebuild libs. Hope this help

  • reza prasetyo
    reza prasetyo January 25, 2016 at 12:43 AM

    im using openCV 3.1 and visual studio 2015, can you tell me how to compile the image processing in the visual studio 2015, im new in programming.

    and where is the directory for the prebuild libs?

    • Vl
      Vl January 25, 2016 at 12:55 AM

      It is long story.
      1. You can use Nuget package. Create project and add opencv nuget distribution to your project. Its something easy like frameworks on Mac Os x.

      Read something about Nuget packages and how to add them to VS project. It is most easy way.

      2. Right installation of opencv.
      Read carefully original documentation.
      1. Extract opencv and set enviromental and other patches. If you skipped this VS can not link your opencv.
      http://docs.opencv.org/2.4/doc/tutorials/introduction/windows_install/windows_install.html#windows-installation
      2. Right setting of VS project,
      http://docs.opencv.org/2.4/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to

  • Vl
    Vl January 25, 2016 at 12:55 AM

    It is long story.
    1. You can use Nuget package. Create project and add opencv nuget distribution to your project. Its something easy like frameworks on Mac Os x.

    Read something about Nuget packages and how to add them to VS project. It is most easy way.

    2. Right installation of opencv.
    Read carefully original documentation.
    1. Extract opencv and set enviromental and other patches. If you skipped this VS can not link your opencv.
    http://docs.opencv.org/2.4/doc/tutorials/introduction/windows_install/windows_install.html#windows-installation
    2. Right setting of VS project,
    http://docs.opencv.org/2.4/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to

  • Unknown
    Unknown February 6, 2016 at 1:12 AM

    I have problems. There problems in lines

    include "opencv2/core.hpp"
    include "opencv2/highgui.hpp"

    It says that it cant open these files
    I dont know what I did wrong. I will appreciate any advice

  • Vl
    Vl February 10, 2016 at 12:49 AM

    Maybe problem is in Include settings. Who knows, global variable settings lead to missing dll.
    General
    Additional Include Directory as C:\opencv-build\install\include
    Additional #using Directory as C:\opencv-build\install\include

  • 078emil
    078emil February 10, 2016 at 2:19 AM

    Hi, thank you for a good guide!
    i experience some errors as missing dll files.
    opencv_core300.lib
    opencv_highgui300.lib
    opencv_imgcodecs300.lib
    opencv_imgproc300.lib
    i include all of them in the properties and set the parth to
    C:\opencv-build\install\x86\vc14\lib
    and running everything in 32bit, I feel like I have tried everything now... any advice?

    • Vl
      Vl February 14, 2016 at 5:35 AM

      Look at my comments below. Problem is in enviromental variable setting. Set enviroment varibales by setx -m
      This depends on your path
      in command line set this. Use cmd to start command line.
      setx -m OPENCV_DIR C:\opencv\build\x64\vc14 /// your path where the bin and lib folder is.
      4. In Path editor under control pannels/system/ just set
      %OPENCV_DIR%\bin

      More datail is here set enviromental variables http://docs.opencv.org/2.4/doc/tutorials/introduction/windows_install/windows_install.html#windowssetpathandenviromentvariable

  • Unknown
    Unknown February 12, 2016 at 4:57 AM

    Hi,
    When I Select configure button, I am getting this error "Error in configuration process, project file may be invalid"
    Please, help

  • Vl
    Vl February 13, 2016 at 1:57 AM

    If you don't need any arm and other devices. Only windows Visual Studio 2015.. USE OPENCV 3.1 !! This is litte bit complicated. Opencv 3.1 has prebuild libs for Visual Studio 2015.
    http://funvision.blogspot.com/2016/01/opencv-31-visual-sturio-2015-support.html

    You install, opencv Set Enviromental variable and code. Also you can use Nuget package manager. There is instalation for some opencv dist. Opencv 3.1 is rly good.

    This tutorial released before 3.1 version for Visual Studio 2015. After 3.1 release just use standard instalation. Do not compile opencv by your self if you have any experience. If you want my approach works perfect but you need to check related libs to opencv must be installed first.

    • Unknown
      Unknown February 13, 2016 at 2:58 AM

      This comment has been removed by the author.

    • Unknown
      Unknown February 13, 2016 at 3:02 AM

      I followed all steps, but the project does not find DLL library.
      Please help me

    • Vl
      Vl February 13, 2016 at 3:56 AM

      This is important steps. If you include Opencv project without this Project in visual studio failed because the project can not find DLL library.

      Set enviroment varibales by setx -m
      This depends on your path
      in command line set this. Use cmd to start command line.
      setx -m OPENCV_DIR C:\opencv\build\x64\vc14 /// your path where the bin and lib folder is.
      4. In Path editor under control pannels/system/ just set
      %OPENCV_DIR%\bin

      More datail is here set enviromental variables http://docs.opencv.org/2.4/doc/tutorials/introduction/windows_install/windows_install.html#windowssetpathandenviromentvariable

    • Unknown
      Unknown February 14, 2016 at 2:00 AM

      Thank you very much. I did it all over again. And it works.

  • Unknown
    Unknown March 4, 2016 at 9:26 AM

    this may be silly , but the opencv we installed works in python also right ? We build all of this in visual studio without idea of what packages python or C# are getting loaded . I am very very new to this so please help me

  • Unknown
    Unknown March 4, 2016 at 9:56 AM

    Hi,I tried to do your method of installation . I have two versions of python installed in my PC . Cmake GUI takes my Python 3.5.1 as defaultt python . How can i change this to python 2.7
    Thanks in advance

    • Vl
      Vl March 11, 2016 at 12:15 AM

      I don't have any experience with python. Sorry, C++ is a best choice in image processing.

  • Unknown
    Unknown April 3, 2016 at 10:02 AM

    Thank you for shared a good topic. I think it will help the people to repair the car and another car instrument. Our variety of parts ranges from suspension kits to motor mounts. View our online gallery for examples of work we’ve done Mustang II IFS Suspension. I think it will a great opportunity to me.

  • noman dudda
    noman dudda April 4, 2016 at 4:34 AM

    Thanks!

  • noman dudda
    noman dudda April 4, 2016 at 4:42 AM

    I have done the following - Choose INSTALL project in visual studio like on picture.
    Build Release only this install project. But i am still failure.
    InstallAware performance

  • Unknown
    Unknown November 14, 2016 at 9:22 AM

    This might help you:
    Install and Configure OpenCV with Visual Studio 2015 in Windows 10

  • Anonymous
    Anonymous May 26, 2017 at 4:41 AM

    Thank you for shared a good topic.




    gclub
    บาคาร่า

  • Unknown
    Unknown June 5, 2017 at 4:33 AM

    Hello I am so delighted I located your I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. Virtual Edge

  • Unknown
    Unknown August 12, 2017 at 1:07 PM

    This comment has been removed by the author.

  • vaiybora
    vaiybora November 27, 2017 at 7:46 AM

    Your blog is very useful for me,Thanks for your sharing.

    แคมฟรอก

  • Unknown
    Unknown November 30, 2017 at 6:51 PM

    Thanks.
    goldenslot
    สล็อตออนไลน์
    gclub
    คาสิโนออนไลน์

  • Unknown
    Unknown November 30, 2017 at 8:42 PM

    โพตส์ของคุณไม่ทำให้ฉันผิดหวังจริง! ฉันชอบ
    goldenslot
    สล็อตออนไลน์
    สมัคร gclub
    คาสิโนออนไลน์
    maxbet
    m8bet

  • ambitz
    ambitz December 1, 2017 at 6:53 PM

    Thank you for the posts. This article is very useful.
    Thank you very much.
    รีวิวตัวละคร Leeague of legends
    ขนมมงคล
    ทะเลไทยไม่แพ้ชาติใดในโลก

  • aodlord13
    aodlord13 December 1, 2017 at 11:26 PM

    Thanks for a great article. :D
    แหล่งรวมหนังผีไทย
    ไอเดียสิ่งประดิษจากของเหลือใช้
    การเลีอกเครื่องสำอางค์


  • Spack Jarrow
    Spack Jarrow December 6, 2017 at 1:05 AM

    Thanks for sharing the steps.
    goldenslotสล็อตออนไลน์สมัคร gclub

  • sahmon
    sahmon December 12, 2017 at 12:00 AM

    Thanks for the information.

    goldenslot

    สูตรบาคาร่า

    สมัครแทงบอล

  • Mozmee007
    Mozmee007 December 12, 2017 at 7:46 PM

    It is recommended to use gloves when using this tool.


    sbobet
    ทางเข้า sbo
    ทางเข้า sbobet

  • kfc55
    kfc55 December 12, 2017 at 7:55 PM

    This comment has been removed by the author.

  • omar2002
    omar2002 December 12, 2017 at 11:17 PM

    This comment has been removed by the author.

  • TONLOVE69
    TONLOVE69 December 14, 2017 at 12:41 AM

    This comment has been removed by the author.

  • boonmee
    boonmee December 16, 2017 at 10:33 PM

    This comment has been removed by the author.

  • Toni444
    Toni444 December 22, 2017 at 10:42 PM

    This comment has been removed by the author.

  • Toni444
    Toni444 January 2, 2018 at 9:11 PM

    Your blog has given me that thing which I never expect to get from all over the websites. Its very easy to understand and very helpful. Nice post guys!



    ทางเข้า sbo

    ทางเข้า sbobet

    แทงบอล sbobet

  • omar2002
    omar2002 January 3, 2018 at 12:26 AM

    Thank you for shared a good topic.

    sbobet
    ทางเข้า sbo
    ทางเข้า sbobet

  • boonmee
    boonmee January 3, 2018 at 7:41 PM

    Thanks for sharing a great topic.

    sbobet

    แทงบอล sbobet

    sbobet mobile

  • TONLOVE69
    TONLOVE69 January 4, 2018 at 11:21 PM

    Thanks for the info, it was helpful for me.

    ทางเข้า sbo
    ทางเข้า sbobet
    แทงบอล sbobet

  • Toni444
    Toni444 January 15, 2018 at 8:04 PM

    This comment has been removed by the author.

  • Toni444
    Toni444 January 15, 2018 at 8:57 PM

    Wow, I like it a lot with what I see and get to know.

    sbobet mobile

    รับแทงบอล

    maxbet

  • mozav007
    mozav007 January 23, 2018 at 12:00 AM

    Thanks for the info, it was helpful for me.

    sbobet
    ทางเข้า sbo
    ทางเข้า sbobet

  • Unknown
    Unknown March 5, 2018 at 5:27 AM

    Ask for permission to present my site.

    Gclub

    จีคลับ

    คาสิโน

    คาสิโนออนไลน์

    Thank you very much!!

  • Mobilunity
    Mobilunity March 12, 2018 at 5:25 AM

    Thank you for this article on opencv. I did a research on what opencv face detection c++ developers do. Feel free to ask me questions

  • Spack Jarrow
    Spack Jarrow March 18, 2018 at 11:35 PM

    Thanks for the installation.
    m8betsavanvegas casinosavanvegas online

  • dokdok
    dokdok December 4, 2018 at 12:48 AM

    HIFU ช่องทางใหม่ ของการชูกระชับหน้า
    ของการชูกระชับหน้า ปรับหน้าเรียว กรอบหน้าชัด ลดเหนียง คาง 2 ชั้น ผิวกระชับมองอ่อนวัย ลดลางเลือนริ้วรอย ผิวมองเรียบเนียนขึ้นลดความหย่อนยานรอบๆร่องแก้ม ความกระชับของบริเวณใบหน้านั้นเป็นเรื่องสำคัญที่สตรีรวมทั้งเพศชายมีความสนใจ ที่จะดูแลตนเอง เห็นแล้วก็รู้เรื่องสำหรับการรักษา เลยนำเทคโนโลยีใหม่ๆที่ตอบปัญหาการดูแลและรักษาแบบไม่จำเป็นที่จะต้องใช้เข็ม ชูกระชับบริเวณใบหน้าที่หย่อนยานคล้อย เติมเต็มคอลลาเจน กระตุ้นการผลิตเนื้อเหยื่อ แบบไม่เป็นอันตราย


    ทำ hifu
    ทำ hifu ที่ไหนดี
    ทำไฮฟู
    ทำ ไฮฟู รีวิว

  • dokdok
    dokdok December 4, 2018 at 12:49 AM

    HIFU ช่องทางใหม่ ของการชูกระชับหน้า
    ของการชูกระชับหน้า ปรับหน้าเรียว กรอบหน้าชัด ลดเหนียง คาง 2 ชั้น ผิวกระชับมองอ่อนวัย ลดลางเลือนริ้วรอย ผิวมองเรียบเนียนขึ้นลดความหย่อนยานรอบๆร่องแก้ม ความกระชับของบริเวณใบหน้านั้นเป็นเรื่องสำคัญที่สตรีรวมทั้งเพศชายมีความสนใจ ที่จะดูแลตนเอง เห็นแล้วก็รู้เรื่องสำหรับการรักษา เลยนำเทคโนโลยีใหม่ๆที่ตอบปัญหาการดูแลและรักษาแบบไม่จำเป็นที่จะต้องใช้เข็ม ชูกระชับบริเวณใบหน้าที่หย่อนยานคล้อย เติมเต็มคอลลาเจน กระตุ้นการผลิตเนื้อเหยื่อ แบบไม่เป็นอันตราย

    ทำ hifu
    ทำ hifu ที่ไหนดี
    ทำไฮฟู
    ทำ ไฮฟู รีวิว

  • bong
    bong January 8, 2019 at 11:38 PM

    Hi, thank you for a good guide!



    ព័័តមានកីឡាបាល់ទាត់


    livescore

  • Davet1986
    Davet1986 January 12, 2019 at 10:51 PM

    This comment has been removed by the author.

  • Ahab1231
    Ahab1231 January 13, 2019 at 1:28 AM

    ហៃឡាយបាល់ទាត់

  • pawida5523
    pawida5523 January 16, 2019 at 6:57 PM

    ขอบคุณสำหรับการโพสต์ บทความนี้มีประโยชน์มาก
    ขอบคุณมาก.



    แทงหวยออนไลน์

  • Momaza
    Momaza January 30, 2019 at 7:15 PM

    Yes ... It's a very good story and information. I agree.


    หวยจับยี่กี

  • basha
    basha March 23, 2019 at 4:47 AM

    Excellent blog I visit this blog it's really awesome. The important thing is that in this blog content written clearly and understandable. The content of information is very informative.
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training
    Oracle Fusion Financials Online Training
    Big Data and Hadoop Training In Hyderabad
    oracle fusion financials classroom training
    Workday HCM Online Training
    Oracle Fusion HCM Classroom Training
    Workday HCM Online Training

  • You to view
    You to view May 9, 2019 at 2:01 AM

    Gclub
    Gclub
    เว็บไซต์คาสิโนออนไลน์ที่ได้คุณภาพอับดับ 1 ของประเทศ https://gclub-casino.casino/

  • Heehiso
    Heehiso September 29, 2019 at 9:21 PM

    เว็บโป๊ออนไลน์ที่ดีที่สุดในประเทศไทย
    ทุกวันนี้การรับชมหนังโป๊ออนไลน์สามารถรับชมได้อย่างสะดวกและง่าย โดยการเข้าชมผ่านทางมือถือได้ทุกที่ทุกเวลาเลยก็ว่าได้ วันนี้เราอยากจะมานำเสนอเว็บดูหนังโป๊ออนไลน์ฟรีแบบเต็มเรื่อง และยังมีการอัพเดทหนังโป๊ใหม่ล่าสุดกันทุกวัน อีกทั้งยังมีหลากหลายหมวดหมู่หนังxxxให้ท่านได้รับชมไม่ว่าจะเป็น หนังโป๊ไทยคลิปโป๊คลิปหลุดรูปโป๊หนังโป๊HDหนังเอ็กฟรี และห้องเชือดที่เป็นข่าวต่าง ๆ อีกมากมาย ดูง่ายสะดวกรับชมได้ฟรีไม่ต้องเสียค่าสมัครสมาชิกหรือต้องไปจ่ายดูคลิปโป๊กลุ่มลับให้เสียเงิน
    Free video porn in thailand on web fuck study thai

  • wepeachstuff
    wepeachstuff November 8, 2019 at 7:01 PM

    his is really good blog

    UFABET บาคาร่า

Add Comment
comment url