示例#1
0
        haar_cascade.flags&CV_MAGIC_MASK==CV_HAAR_MAGIC_VAL

''')


z = sb.mb.class_('CvConnectedComp')
sb.init_class(z)
sb.register_ti('CvConnectedComp')
sb.expose_class_vector('CvConnectedComp')
sb.finalize_class(z)
sb.expose_class_Seq('CvConnectedComp')

# cvEndFindContours -- from cv_h_gen.py
z = sb.mb.free_fun('cvEndFindContours')
FT.expose_func(z, ward_indices=(1,))
FT.add_underscore(z)
sb.cc.write('''
def endFindContours(scanner):
    z = _ext._cvEndFindContours(scanner)
    scanner._ownershiplevel = 0 # not owning the structure anymore
    return z
endFindContours.__doc__ = _ext._cvEndFindContours.__doc__
''')

# CvContourScanner
z = sb.mb.class_('_CvContourScanner')
sb.init_class(z)
z.rename('CvContourScanner')
sb.insert_del_interface('CvContourScanner', '_ext._cvEndFindContours')
sb.finalize_class(z)
示例#2
0
        arg.exclude() # wait until requested
sb.finalize_class(z)
sb.insert_del_interface('CvConDensation', '_ext._cvReleaseConDensation')

for z in (
    'cvConDensUpdateByTime', 'cvConDensInitSampleSet',
    ):
    sb.mb.free_fun(z).include()


# cvCreateConDensation
FT.expose_func(sb.mb.free_fun('cvCreateConDensation'), ownershiplevel=1)

# cvReleaseConDensation
z = sb.mb.free_fun('cvReleaseConDensation')
FT.add_underscore(z)
z._transformer_creators.append(FT.input_double_pointee('condens'))




sb.cc.write('''
#=============================================================================
# cvaux.hpp
#=============================================================================


''')

#=============================================================================
# Structures
示例#3
0
    sb.mb.free_fun('CV_FOURCC').exclude()
except:
    pass

# cvInitSystem
FT.expose_func(sb.mb.free_fun('cvInitSystem'),
               return_pointee=False,
               transformer_creators=[FT.input_list_of_string('argv', 'argc')])

# cvGetWindowHandle, wait until requested

# setMouseCallback
z = sb.mb.free_fun('cvSetMouseCallback')
FT.expose_func(
    z, transformer_creators=[FT.mouse_callback_func('on_mouse', 'param')])
FT.add_underscore(z)
sb.cc.write('''
def setMouseCallback(window_name, on_mouse, param=None):
    _windows_callbacks.setdefault(window_name,{})["mouse"] = _ext._cvSetMouseCallback(window_name, on_mouse, param=param)
setMouseCallback.__doc__ = _ext._cvSetMouseCallback.__doc__
''')

# destroyWindow
z = sb.mb.free_fun('cvDestroyWindow')
FT.add_underscore(z)
sb.cc.write('''
def destroyWindow(name):
    _ext._cvDestroyWindow(name)
    if name in _windows_callbacks:
        _windows_callbacks.pop(name)
destroyWindow.__doc__ = _ext._cvDestroyWindow.__doc__        
示例#4
0
    return isinstance(haar_cascade, CvHaarClassifierCascade) and \
        haar_cascade.flags&CV_MAGIC_MASK==CV_HAAR_MAGIC_VAL

''')

z = sb.mb.class_('CvConnectedComp')
sb.init_class(z)
sb.register_ti('CvConnectedComp')
sb.expose_class_vector('CvConnectedComp')
sb.finalize_class(z)
sb.expose_class_Seq('CvConnectedComp')

# cvEndFindContours -- from cv_h_gen.py
z = sb.mb.free_fun('cvEndFindContours')
FT.expose_func(z, ward_indices=(1, ))
FT.add_underscore(z)
sb.cc.write('''
def endFindContours(scanner):
    z = _ext._cvEndFindContours(scanner)
    scanner._ownershiplevel = 0 # not owning the structure anymore
    return z
endFindContours.__doc__ = _ext._cvEndFindContours.__doc__
''')

# CvContourScanner
z = sb.mb.class_('_CvContourScanner')
sb.init_class(z)
z.rename('CvContourScanner')
sb.insert_del_interface('CvContourScanner', '_ext._cvEndFindContours')
sb.finalize_class(z)