OpenCV4Android development tour (iii) ---- configure OpenCV2.4.4 in Eclipse and MinGW on Windows

Source: Internet
Author: User

In the previous article, the author introduced the development and use of OpenCV4Android of OpenCV, and attached the Android development example of calling OpenCV using Java interfaces.

With these two methods, you can easily develop and utilize OpenCV applications in Android. The second article can be used to quickly verify the algorithm in Java. But for the majority, I think you still like to use the C ++ interface to write algorithms. For this reason, I wrote OpenCV2.0 for use on the windows platform. The configuration is relatively simple. See here. After all, OpenCV2.0 and later versions have relatively weak features, especially in face recognition algorithms. This article describes how to use the C ++ interface in Eclipse to call OpenCV2.4.4 on Windows. After OpenCV2.4.4 is decompressed, the build/x86/file contains the OpenCV versions compiled by mingw, vc9, vc10, and vc11 for different compilers on windows platforms. Unfortunately, the compiled mingw cannot be used. After I have configured everything, I click run to find that there are no prompts. I had to re-compile it myself. The compilation process is recorded below:

At this time, the OpenCV2.4.4 library has been compiled. You only need to configure three steps to call it normally. Therefore, it is best to create a new workspace and create a new C ++ project, and then follow the configuration steps below to use OpenCV. Remember that it must be a new C ++ project. If you have used the original C ++ project with the mingw library provided by OpenCV, but it is not successful, after compilation at this moment, no matter how you configure or test fails.

Add it in. The directory is dll. It is recommended that you restart your computer after completing the settings. Then start Eclipse. If Eclipse is on, restart it at least.

(This directory is the default directory after opencv is decompressed and has nothing to do with compilation)

Opencv_contrib244
Opencv_core244
Opencv_features2d244
Opencv_flann244
Opencv_gpu244
Opencv_highgui244
Opencv_imgproc244
Opencv_legacy244
Opencv_ml244
Opencv_nonfree244
Opencv_objdetect244
Opencv_photo244
Opencv_stitching244
Opencv_ts244
Opencv_video244
Opencv_videostab244

Add it to the. a static library in this path.

In addition, on the header file contains the problem, after testing using the above Code is no problem, if you have any questions about the header file can refer to here: http://blog.csdn.net/moc062066/article/details/6671481

By now, the use of OpenCV4, the call of OpenCV2.4.4 for windows interfaces, and The OpenCV2.4.4 for windows interfaces (through the MinGW compiler) have all been clearly stated, and all the development ides used are Eclipse, powerful enough. There are still a few minutes before 2014 is coming. On the last day of 2013, I wish you all the best in your life and good health, more progress in the new year!

If you think that I am writing a blog and selecting the CSDN2013 blog star, please vote for me. Thank you for your encouragement!

 

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.