コード例 #1
0
ファイル: cvaux_gen.py プロジェクト: BackupGGCode/pyopencv

''')

# A few functions from old stereo gesture recognition demosions - TODO
sb.cc.write('''
#-----------------------------------------------------------------------------
# A few functions from old stereo gesture recognition demosions
#-----------------------------------------------------------------------------


''')

# cvCalcImageHomography
FT.expose_func(sb.mb.free_fun('cvCalcImageHomography'), return_pointee=False, transformer_creators=[
    FT.input_static_array('line', 3), FT.input_static_array('intrinsic', 9), FT.output_static_array('homography', 9)])

# Additional operations on Subdivisions -- TODO
sb.cc.write('''
#-----------------------------------------------------------------------------
# Additional operations on Subdivisions
#-----------------------------------------------------------------------------


''')

# More operations on sequences -- TODO
sb.cc.write('''
#-----------------------------------------------------------------------------
# More operations on sequences
#-----------------------------------------------------------------------------
コード例 #2
0
ファイル: cv_hpp_gen.py プロジェクト: uniquerobot/pyopencv
                       FT.input_array1d('channels'),
                       FT.input_array2d('ranges')
                   ])
    z._transformer_kwds['alias'] = 'calcBackProject'

# floodFill
for z in sb.mb.free_funs('floodFill'):
    FT.expose_func(z,
                   return_pointee=False,
                   transformer_creators=[FT.output_type1('rect')])
    z._transformer_kwds['alias'] = 'floodFill'

# HuMoments
FT.expose_func(sb.mb.free_fun('HuMoments'),
               return_pointee=False,
               transformer_creators=[FT.output_static_array('hu', 7)])

# findContours
z = sb.mb.free_fun(
    lambda x: x.name == 'findContours' and len(x.arguments) == 6)
z.include()
z._transformer_kwds['alias'] = 'findContours'
z._transformer_creators.append(FT.arg_output('contours'))
z._transformer_creators.append(FT.arg_output('hierarchy'))

# findContours
z = sb.mb.free_fun(
    lambda x: x.name == 'findContours' and len(x.arguments) == 5)
z.include()
z._transformer_kwds['alias'] = 'findContours'
z._transformer_creators.append(FT.arg_output('contours'))
コード例 #3
0
# A few functions from old stereo gesture recognition demosions - TODO
sb.cc.write('''
#-----------------------------------------------------------------------------
# A few functions from old stereo gesture recognition demosions
#-----------------------------------------------------------------------------


''')

# cvCalcImageHomography
FT.expose_func(sb.mb.free_fun('cvCalcImageHomography'),
               return_pointee=False,
               transformer_creators=[
                   FT.input_static_array('line', 3),
                   FT.input_static_array('intrinsic', 9),
                   FT.output_static_array('homography', 9)
               ])

# Additional operations on Subdivisions -- TODO
sb.cc.write('''
#-----------------------------------------------------------------------------
# Additional operations on Subdivisions
#-----------------------------------------------------------------------------


''')

# More operations on sequences -- TODO
sb.cc.write('''
#-----------------------------------------------------------------------------
# More operations on sequences
コード例 #4
0
ファイル: cv_hpp_gen.py プロジェクト: BackupGGCode/pyopencv
        
# calcBackProject
for z in sb.mb.free_funs('calcBackProject'):
    FT.expose_func(z, return_pointee=False, transformer_creators=[
        FT.input_array1d('images', 'nimages'), FT.input_array1d('channels'),
        FT.input_array2d('ranges')])
    z._transformer_kwds['alias'] = 'calcBackProject'
        
# floodFill
for z in sb.mb.free_funs('floodFill'):
    FT.expose_func(z, return_pointee=False, transformer_creators=[FT.output_type1('rect')])
    z._transformer_kwds['alias'] = 'floodFill'

# HuMoments
FT.expose_func(sb.mb.free_fun('HuMoments'), return_pointee=False,
    transformer_creators=[FT.output_static_array('hu', 7)])
    
# findContours
z = sb.mb.free_fun(lambda x: x.name=='findContours' and len(x.arguments)==6)
z.include()
z._transformer_kwds['alias'] = 'findContours'
z._transformer_creators.append(FT.arg_output('contours'))
z._transformer_creators.append(FT.arg_output('hierarchy'))
    
# findContours
z = sb.mb.free_fun(lambda x: x.name=='findContours' and len(x.arguments)==5)
z.include()
z._transformer_kwds['alias'] = 'findContours'
z._transformer_creators.append(FT.arg_output('contours'))

# groupRectangles