Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure OpenCV for C++ with vs2019

2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "vs2019 how to configure C++ version of OpenCV", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to configure C++ version of OpenCV vs2019" this article.

one。 Download opencv

Official website: https://opencv.org/releases/

Different versions of vs correspond to different versions of opencv, in which a higher version of vs can be configured with a lower version of vc, and a lower version of vc cannot be configured with a higher version.

The windows system can download the Windows version directly (the downloaded file is an exe file, which is equivalent to decompression). If you do not change the open source code after download, you do not need to recompile! It can be used directly.

Second, configure environment variables

Configure environment variables in Path

D:\ opencv\ build\ x64\ vc14\ bin III, configure vs

1. Create a new vs project

two。 Select View-> other Windows-> property Manager to configure Debug | x64

3. Double-click "Debug | x64"-> "VC++ directory"-> "include directory" to configure the corresponding variable

Library catalog

4. Double click "Debug | x64"-> "linker"-> "input"-> "additional dependency"

Fourth, adjust the Debug configuration to X64

1. Double-click "Debug | x64"-> "Linker"-> "Advanced"-> "Target dependency"-> "X64"

two。 Double click "Debug | x64"-> "Linker"-> "Command Line"

3. Remember to right-click on the solution name, select "Properties" platform, select "x64"

4. Don't forget to select "x64" in the Debug above the toolbar

5. Test # include#includeusing namespace std;using namespace cv; int main () {Mat src = imread ("3.jpg"); imshow ("src_pic", src); waitKey (); return 0;} these are all the contents of the article "how to configure Mat src for C++ OpenCV". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report