sethrh / pyopencv

Automatically exported from code.google.com/p/pyopencv
0 stars 0 forks source link

NameError: global name 'cvGetSeqElem' is not defined #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. After Train a Cv_Boost() trying to get_weak_predictors,
and iterate over a sequence of Pointers to Cv_DTree objects
2. Code: 
        cvseq  = strong.get_weak_predictors();
        for i in range(cvseq.total):
             CV_GET_SEQ_ELEM(CV_TYPE_NAME_SEQ_TREE,i,cvseq)

What is the expected output? What do you see instead?
For each DecisionStump, the attribute selected in the trained model.
Returns: File  line 146, in get_weak_predictors
    CV_GET_SEQ_ELEM(CV_TYPE_NAME_SEQ_TREE,i,cvseq)
  File "/usr/lib/python2.6/dist-packages/pyopencv/cxtypes_h.py", line 438, in CV_GET_SEQ_ELEM
    result = cvGetSeqElem(seq, index)
NameError: global name 'cvGetSeqElem' is not defined

What version of the product are you using? On what operating system?
>>> pyopencv.PYOPENCV_VERSION
'2.1.0.wr1.2.0'
UBUNTU 0.9.10.1

Please provide any additional information below.
There is any workaround for accessing to DecisionStump's selected attribute 
over the sequence of weaks predictors ?
Thanks in advance for your time.

Original issue reported on code.google.com by espavi...@gmail.com on 14 Dec 2010 at 5:16