line descriptor for python doesn't work properly
Hi, I"m a new user with opencv, and I"m trying to use it on python 2.7 (Mac OS), I used this guide to install the opencv 3 on my mac and bulid it for python: http://www.pyimagesearch.com/2015/06/... the problem is some modules doesn't work properly, for example, cv2.line_descriptor doesn't contain any functions and all I can see when I create this object is some constants for drawing, here is what the line_descriptor.py contain:
# encoding: utf-8
# module cv2.line_descriptor
# from /Users/r/.virtualenvs/cv/lib/python2.7/site-packages/cv2.so
# by generator 1.136
# no doc
# no imports
# Variables with simple values
DrawLinesMatchesFlags_DEFAULT = 0
DrawLinesMatchesFlags_DRAW_OVER_OUTIMG = 1
DrawLinesMatchesFlags_NOT_DRAW_SINGLE_LINES = 2
DRAW_LINES_MATCHES_FLAGS_DEFAULT = 0
DRAW_LINES_MATCHES_FLAGS_DRAW_OVER_OUTIMG = 1
DRAW_LINES_MATCHES_FLAGS_NOT_DRAW_SINGLE_LINES = 2
# no functions
# no classes
in addition, I there are some modules that completely uninstalled, even though the cmake show them on the modules list, such as xobjdetect and saliency. (perhaps there are more errors that I didn't find yet).
Is anyone can help me how to fix this isuue?
thanks!
where do you find that weird line_descriptor.py file ?
(and no class or function from line_descriptor module is exposed to python, same for xobjdetect and saliency [though someone is working on the latter] )
so, no problem with your build, more an "expectation mismatch".
thanks for the quick reply, If I understood you correctly, I don't need to find the .py files, but I still can use those modules. my problem is that the python don't recognise those modules. for instance,
a = cv2.xobjdetect
gave me error: AttributeError: 'module' object has no attribute 'xobjdetect'
how can I make sure that the cmake files compiled all the modules and functions?
"how can I make sure that the cmake files compiled all the modules and functions?"
just try a
>>> import cv2; help(cv2)
it should give you a list like this:and again someone is working on the saliency part
please also have a look here
when in doubt, check the c++ module headers for
CV_EXPORTS_W
, and the cmakelists.txt forWRAP python
out of curiosity, can you shed some light on line_descriptor.py ? where did you find it, how was it generated ?
I"m sorry for my confusion I never experienced with compiling cpp to python, When you said that line_descriptor not exposed to python,is that mean I can't use them in python? Or that they not written in native python code?
anyway,
I ran the help(cv2) and got:
SUBMODULES
and specific about line_descriptor.py, I just click command+d on it and it send me to the file, which was located in folder with all the above list [from help(cv2)..] that contain the functions names in each module.
Thanks a lot.