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 compile opencv source code

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will explain in detail how to compile opencv source code, the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Opencv code version: opencv-3.2.0-vc14.exe

Compilation environment VS2010

Note: after CMake clicks Configure configuration, BUILD_CUDA_STUBS is canceled. You can search cuda for details, otherwise there is an error of not finding and typing cuda_runtime.h file during compilation.

After CMake generates the dynamic library, all include and lib,dll are in the install file.

The numbers in the lib and dll names generated by different versions are different. Copy the following projects that are not necessarily suitable for construction.

Opencv_calib3d320d.lib

Opencv_core320d.lib

Opencv_features2d320d.lib

Opencv_flann320d.lib

Opencv_highgui320d.lib

Opencv_imgcodecs320d.lib

Opencv_imgproc320d.lib

Opencv_ml320d.lib

Opencv_photo320d.lib

Opencv_shape320d.lib

Opencv_stitching320d.lib

Opencv_superres320d.lib

Opencv_video320d.lib

Opencv_videoio320d.lib

Opencv_videostab320d.lib

Copy dll to the debug directory instead of placing it in the system directory when you create the sample program

Configuration Properti

Routine

Output directory: $(ProjectDir)\ Debug

Copy all the dll to the current directory to debug

Some additions to the conflict between Modular computer Type "X64" and Target computer Type "X86"

The compilation platform is 64-bit, open the configuration manager, select X64 in the properties of the project, and create a new one if you don't have it.

Reference:

Http://blog.csdn.net/ac273317472/article/details/51391951

# include "opencv2/highgui.hpp"

Using namespace cv

Int main (int argc, const char** argv)

{

Const char* p_w_picpathname = "D:/Documents/Pictures/142802955.jpg"

Cv::Mat img = cv::imread (p_w_picpathname)

If (img.empty ())

{fprintf (stderr, "Can not load p_w_picpath% s\ n", p_w_picpathname)

Return-1

}

If (! img.data)

Return-1

Cv::namedWindow ("p_w_picpath", CV_WINDOW_AUTOSIZE)

Cv::imshow ("p_w_picpath", img)

Cv::waitKey ()

Return 0

}

Http://www.opencv.org.cn/opencvdoc/2.3.2/html/doc/tutorials/imgproc/histograms/histogram_equalization/histog

Ram_equalization.html

On how to compile the opencv source code to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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