How to use code completion in Eclipse using OpenCV

I would like to do the work of completing the source code for Opencv 2.3 on Eclipse. How can i do this? Programs work fine, but [ctrl + space] appears: "There are no default suggestions."

+4
source share
2 answers

For C / C ++:

  • Use CDT in Eclipse
  • In the root directory of the project, create the Makefiles project:

    cmake -G 'Eclipse CDT4 - Unix Makefile'

  • Import the project using Eclipse-> File-> Import-> General-> Existing Projects

  • Enjoy code completion with Ctrl-Space

For python

  • Install PyDev
  • In Eclipse Go to ... Window-> Settings-> PyDev-> Interpreters
  • Configuring PyDev, choosing which Python interpreter to use
  • Add / usr / local / lib / python 2.7 / dist-packages (or other valid paths) to the system libraries
  • Add cv (or cv2) to forced built-in functions
  • Enjoy the code with Ctrl-Space
+10
source

If you are trying to use python opencv, I found

from cv2.cv import * 

in the site-packages / cv.py file, for this case I had to use import:

 import cv2.cv as cv #instead of import cv 

to complete the code.

+3
source

Source: https://habr.com/ru/post/908672/


All Articles