OpenCV C++ Install, Build, Run using VS Code and CMake (Debug and Release)

Kevin Wood | Robotics & AI β€’ January 5, 2024
Video Thumbnail
Kevin Wood | Robotics & AI Logo

Kevin Wood | Robotics & AI

View Channel

About

Subscribe to learn robotics, AI/ML, computer vision, and controls! For business inquires or consulting, please email me at kevinwoodrobotics [at] gmail [dot] com

Video Description

🎁 Get FREE Robotics & AI Resources (Guide, Textbooks, Courses, Resume Template, Code & Discounts) – Sign up via the pop-up at https://kevinwoodrobotics.com/ πŸ“ Real-World Robotics Project Course Overview and Waitlist: https://forms.gle/xu4rfk7GWHCaZGBEA 🦾 Learn Robotics and AI: https://kevinwoodrobotics.com/product/all-courses-bundle-deal/ 🀝 Consulting and Mentorship: https://kevinwoodrobotics.com/product-category/consulting/ πŸ‘οΈ Learn OpenCV: https://kevinwoodrobotics.com/product/opencv-python-tutorials-full-playlist/ πŸ€– Learn ROS: https://kevinwoodrobotics.com/product/ros2-tutorials-full-playlist/ 🧠 Learn Computer Vision using AI: https://kevinwoodrobotics.com/product/computer-vision-using-ai/ πŸ–₯️ Learn AI and Machine Learning: https://kevinwoodrobotics.com/product/ai-and-machine-learning-bundle/ πŸ›’ Amazon Store (My Top Picks for Robot Projects and More!): https://www.amazon.com/shop/kevinwoodroboticsai?ref_=cm_sw_r_cp_ud_aipsfshop_Q3AMRNBSVVB00Y1XR9TN_3 I will show you how to install OpenCV C++ in Windows 10 and use it in debug and release using VS Code and CMake. I will go over installing CMake, downloading OpenCV build files, setting up your environment variables, creating the `CMakeLists.txt`, making a simple OpenCV program, configure the build, build the OpenCV project in debug, build the OpenCV project in release, and finally modify the program. I installed visual studio 2019 prior to this video, so you may need to do that as well if you are missing some compilers. FAQ1: I am seeing the following error CMake Error at CMakeLists.txt:10 (find_package): By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenCV", but CMake did not find one. Could not find a package configuration file provided by "OpenCV" with any of the following names: OpenCVConfig.cmake opencv-config.cmake Solution: Make sure you set up the environment variables described in the video. Remember to restart VS Code! Variable: `OpenCV_DIR` Value: `C:\opt\opencv\build` FAQ 2: Compiler not found. Solution: You may need to install visual studio to download the compiler. 0:00 Introduction 0:56 How to install CMake? 1:13 How to install OpenCV C++ build files? 1:57 How to set up your environment variables for OpenCV and CMake? 2:47 How to create a `CMakeLists.txt` to run OpenCV C++ program? 3:20 How to make a simple OpenCV program in C++? 3:39 How to configure the build? 4:28 How to build and run your OpenCV project in debug? 4:54 How to build and run your OpenCV project in release? 5:20 How to modify your program and rebuild? Thanks for watching! If you found this video helpful, please like, subscribe and share: https://www.youtube.com/@kevinwoodrobotics Social: LinkedIn: https://www.linkedin.com/in/kevinwoodrobotics Github: https://github.com/kevinwoodrobotics Instagram: https://www.instagram.com/kevinwoodrobotics/ Twitter: https://twitter.com/kevinwoodrobotics

You May Also Like

Boost Your AI Projects Today

AI-recommended products based on this video

Loading...
Intel Coreβ„’ i5 Desktop Processor 14600K 14 Core (6 P-core + 8 E-core) up to 5.3 GHz

Intel Coreβ„’ i5 Desktop Processor 14600K 14 Core (6 P-core + 8 E-core) up to 5.3 GHz

(466)
$366.66
Loading...
AocBook 15.6'' FHD Laptop, Intel N95, Nvidia GTX 1060 4GB, 32GB DDR4 RAM, M.2 SSD, Sleek Notebook with Type-C, HDMI, RJ45 Ethernet, Backlit Keyboard, Fingerprint (32GB DDR4 | 1TB SSD)

AocBook 15.6'' FHD Laptop, Intel N95, Nvidia GTX 1060 4GB, 32GB DDR4 RAM, M.2 SSD, Sleek Notebook with Type-C, HDMI, RJ45 Ethernet, Backlit Keyboard, Fingerprint (32GB DDR4 | 1TB SSD)

(3)
$749.00
FREE delivery Fri, Jun 20
Loading...
acer Nitro 50 N50-620-UA91 Gaming Desktop | 11th Gen Intel Core i5-11400F 6-Core Processor | NVIDIA GeForce GTX 1650 | 8GB DDR4 | 512GB NVMe M.2 SSD | Intel Wi-Fi 6 AX201 | Keyboard and Mouse

acer Nitro 50 N50-620-UA91 Gaming Desktop | 11th Gen Intel Core i5-11400F 6-Core Processor | NVIDIA GeForce GTX 1650 | 8GB DDR4 | 512GB NVMe M.2 SSD | Intel Wi-Fi 6 AX201 | Keyboard and Mouse

(283)
$1,658.99
Loading...
Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

(103,365)
$13.49
5K+ bought in past month
Loading...
Anker USB C Charger Cable (6ft 100W, 2Pack), USB 2.0 Type C Fast Charging Cable for iPhone 15 / 15Pro / 15Plus / 15ProMax MacBook Pro 2020, iPad Pro 2020, iPad Air 4, Samsung Galaxy S23+/S23 Ultra ClimatePartner certified

Anker USB C Charger Cable (6ft 100W, 2Pack), USB 2.0 Type C Fast Charging Cable for iPhone 15 / 15Pro / 15Plus / 15ProMax MacBook Pro 2020, iPad Pro 2020, iPad Air 4, Samsung Galaxy S23+/S23 Ultra ClimatePartner certified

(44,904)
$17.99
FREE delivery Wed, Aug 20 on your first order
6K+ bought in past month
Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
Laplink PCmover Ultimate 11 - Migration of your Applications, Files and Settings from an Old PC to a New PC - Data Transfer Software - With Optional High Speed Ethernet Cable - 1 License

Laplink PCmover Ultimate 11 - Migration of your Applications, Files and Settings from an Old PC to a New PC - Data Transfer Software - With Optional High Speed Ethernet Cable - 1 License

(4,609)
$54.95
PrimeFREE delivery Sat, Jun 14