Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuration of OpenCV 2.3 of Python in Eclipse

Hi I'm just starting to use python and OpenCV, my IDE is eclipse.

Now I have installed NumPy and SciPy and OpenCV 2.3 and Python 2.7

and I think I configure all the path and interpreter options (may be may not),

here comes the problem:

this is the screen shot of my IDE, all the cv-related are marked wrong in the editor but actually when I run it, it turns out to be fine

so my question is how to make it work fine as in other languages as Java?

Thanks

like image 921
Coderzelf Avatar asked Aug 06 '12 14:08

Coderzelf


People also ask

What version of Python supports OpenCV?

The nice thing with OpenCV is that it comes with a complete Python 3 library. The latest GeeXlab 0.29. 17.0 for Windows 64-bit comes with Python 3.8. 2 and OpenCV 4.2.

Is OpenCV Python and cv2 same?

cv2 is the module import name for opencv-python, "Unofficial pre-built CPU-only OpenCV packages for Python". The traditional OpenCV has many complicated steps involving building the module from scratch, which is unnecessary. I would recommend remaining with the opencv-python library.

How do I run a Python script in eclipse?

Running a Module/Script The first time we run a Python project, Eclipse will display the following Run As pop-up window. Click on Python Run and then click OK. Python will save the file for this module and then run its script; if there is no Console view in which to run the script. Eclipse will create a new one.


1 Answers

In Eclipse go to

Window->Preferences->PyDev->Interpreters->Python Interpreter=> [Forced Builtins](tab)

Add cv (or cv2) and apply - all will be fine.

like image 198
Coderzelf Avatar answered Sep 20 '22 02:09

Coderzelf