Python image processing (1): Replace OpenCV

Source: Internet
Author: User

Happy Shrimp

http://blog.csdn.net/lights_joy/(QQ group: Visual embedlinux Tools 375515651)

Welcome reprint, but please keep the author information


when the image processing development environment was previously constructed, an installation package that was compiled by someone else wouldOpenCVinstalled in thec:\python27\lib\site-packagesdirectory, but thisOpenCVno symbol table, cannot beC + +debugging of the code. We useVScompiled byOpenCVreplace it.


first modify opencv python interface engineering, output it to python cv2.pyd


Let it generate debug information:


Compile Build Cv2.pyd file.


Create a python application , write a simple test code:


Import cv2img = Cv2.imread (' f:\\tmp\\cotton.jpg ') cv2.imshow (' Test win ', IMG) cv2.waitkey (0)

Add this python application of the project properties in the enablenative Debug Open.


in the python of the script Imread This line sets breakpoints


F5 Run, in Imread This line breaks down .


press f11 , step in , vs correct access to python the interface function.



Modify the project properties under modules, and put their project output in the c:\python27\lib\site-packages directory. We have a OpenCV library that can be debugged under python !


because we want to debug OpenCV , so you also need to turn off its optimization features:


Get!




??

Python image processing (1): Replace OpenCV

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.