Ask Your Question

domagoj's profile - activity

2018-07-23 07:29:32 -0600 received badge  Famous Question (source)
2014-07-06 03:47:25 -0600 received badge  Notable Question (source)
2013-11-29 04:45:14 -0600 received badge  Popular Question (source)
2013-03-07 09:38:46 -0600 received badge  Student (source)
2012-11-14 09:57:28 -0600 received badge  Editor (source)
2012-11-14 09:55:54 -0600 asked a question Python and OpenCV 2.4.3

Few days ago I went into searching for a good way to make a simple computer vision system. OpenCV library is something I need but it proved hard to learn with Python especially after OpenCV 2.4.3 update which have very slim Python related documentation. So I now understand that there was a bunch of changes in OpenCV, for exaxmple

import cv

is now

import cv2

And there is bunch of modules that is missing. I mean, yes there are examples of the new python-opencv syntax but it's very narrow and proven to be hard to understand. For example: Example in official documentation for Python code

cv2.cvtColor(src, code[, dst[, dstCn]])

I know what this code means and how to use it, at least I think i know. But writing source and color code does nothing just give me :

    Traceback (most recent call last):
  File "C:\FILEFOLDER\tut.py", line 11, in <module>
    cv.cvtColor('proba.jpg', 'CV_RGB2GRAY')
TypeError: an integer is required

Or if i try to write code like variable:

Traceback (most recent call last):
  File "C:\FILEFOLDER\tut.py", line 11, in <module>
    cv.cvtColor('proba.jpg', CV_RGB2GRAY)
NameError: name 'CV_RGB2GRAY' is not defined

So is there any Python related reference document/tutorial/book/guide for newest OpenCV with the ground up explanations that does not confuse newbie like me with unwanted code examples for C++ or Java?