[OpenCV Getting Started Guide] Article 12th sharing OpenCV programs on Windows Platforms

Source: Internet
Author: User

The "OpenCV Getting Started Guide" series has been explained in eleven articles. I believe you have a preliminary understanding of OpenCV. Some netizens reported how they could not copy their own OpenCV programs to others' computers? For computer experts, this question is not worth mentioning. However, for new users, there is a detailed article to teach them to solve this problem, which will certainly save their time. So this article will solve this problem-so that computers without OpenCV can run the OpenCV program we wrote.

 

For example, run opencv_test1.exe on a computer without opencv1. The error message is as follows -- this program cannot be started because opencv_core231d.dll is lost in the computer. Try to reinstall the program to solve this problem.

The cause of the error is that some DLL files are not loaded, so you can check if this problem can be solved with the DLL attached to the program.

Use vc6's depends.exe to view which DLL Programs depend on.

The worker is placed in the same directory and then run. An error is returned. The error message is as follows: the application cannot be started properly (0xc0150002 ). Click OK to close the program.

 

I checked the solution "the application cannot start 0xc0150002 normally" on the Internet. Some people say they want the next VC Support Program.

Http://www.microsoft.com/downloads/details.aspx? Displaylang = zh-cn & FamilyID = 200b2fd9-ae1a-4a14-984d-389c36f85647

However, an error is reported after installation !!!!

 

Search for the solution. The original OpenCV DLL is divided into Debug and Release. For example, opencv_core231d.dll, the file name d indicates that this is generated under Debug, if d is not added, opencv_core231.dll is generated under Release.

The releasegenerated program should release the releasegenerated dll. because opencv_test1.exe should load opencv_core231.dll and opencv_highgui231.dll. In the project configuration, change

Opencv_core231d.lib using opencv_gpu231d.lib opencv_highgui231d.lib opencv_imgproc231d.lib using opencv_ml231d.lib using opencv_ts231d.lib opencv_video231d.lib

Change

Using opencv_contrib231.lib opencv_core231.lib using opencv_gpu231.lib opencv_highgui231.lib opencv_imgproc231.lib using opencv_ml231.lib using opencv_ts231.lib opencv_video231.lib

For the configuration setting method, see the following figure (see [OpenCV Getting Started Guide] For the first installation of OpenCV ):

In VS2008, click "project" and then "properties ", expand "configuration properties"> "linker"> "input" and add it to "additional dependencies" (Release ).

 

Then, put opencv_core231.dlland opencv_highgui231.dllin the opencv_test1.exe directory. Double-click.

 

 

This method is primitive in this article. The standard practice should be to create an installation package to release the program. The installation package is complex and may not be completely explained in one or two blogs. You can search for "Install and deploy VS2008 ". Using other packaging tools is also a good choice.

Static compilation can also be used, but the generated exe program will be large. See http://www.opencvchina.com/thread-1368-1-1.html

 

 

OpenCV Getting Started Guide series Article address: http://blog.csdn.net/morewindows/article/category/863841

Reprinted please indicate the source, original address: http://blog.csdn.net/morewindows/article/details/8426295

Welcome to Weibo: http://weibo.com/MoreWindows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.