# z.mem_funs('adjustROI').call_policies = CP.return_self()
        # for t in ('MatExp', 'vector'):
            # z.decls(lambda x: t in x.decl_string).exclude()
        # for t in ('begin', 'end'):
            # z.decls(t).exclude() # TODO
        # z.operators().exclude() # TODO

# sb.dtypecast(Mat_list)

# MatND
z = sb.mb.class_('MatND')
z.include_files.append("boost/python/make_function.hpp")
z.include_files.append("opencv_converters.hpp")
z.include_files.append("boost/python/str.hpp")
sb.init_class(z)
FT.set_array_item_type_as_size_t(z, 'step')
sb.expose_class_vector('cv::MatND')

z.constructors(lambda x: 'const *' in x.decl_string).exclude()
z.add_declaration_code('''
static boost::shared_ptr<cv::MatND> MatND__init1__(std::vector<int> const &_sizes, int _type)
{
    return boost::shared_ptr<cv::MatND>(new cv::MatND(_sizes.size(), &_sizes[0], _type));
}

static boost::shared_ptr<cv::MatND> MatND__init2__(std::vector<int> const &_sizes, int _type, const cv::Scalar& _s)
{
    return boost::shared_ptr<cv::MatND>(new cv::MatND(_sizes.size(), &_sizes[0], _type, _s));
}

static boost::shared_ptr<cv::MatND> MatND__init3__(const cv::MatND& m, std::vector<cv::Range> const &ranges)
# z.mem_funs('adjustROI').call_policies = CP.return_self()
# for t in ('MatExp', 'vector'):
# z.decls(lambda x: t in x.decl_string).exclude()
# for t in ('begin', 'end'):
# z.decls(t).exclude() # TODO
# z.operators().exclude() # TODO

# sb.dtypecast(Mat_list)

# MatND
z = sb.mb.class_('MatND')
z.include_files.append("boost/python/make_function.hpp")
z.include_files.append("opencv_converters.hpp")
z.include_files.append("boost/python/str.hpp")
sb.init_class(z)
FT.set_array_item_type_as_size_t(z, 'step')
sb.expose_class_vector('cv::MatND')

z.constructors(lambda x: 'const *' in x.decl_string).exclude()
z.add_declaration_code('''
static boost::shared_ptr<cv::MatND> MatND__init1__(std::vector<int> const &_sizes, int _type)
{
    return boost::shared_ptr<cv::MatND>(new cv::MatND(_sizes.size(), &_sizes[0], _type));
}

static boost::shared_ptr<cv::MatND> MatND__init2__(std::vector<int> const &_sizes, int _type, const cv::Scalar& _s)
{
    return boost::shared_ptr<cv::MatND>(new cv::MatND(_sizes.size(), &_sizes[0], _type, _s));
}

static boost::shared_ptr<cv::MatND> MatND__init3__(const cv::MatND& m, std::vector<cv::Range> const &ranges)
Exemple #3
0
def expose_QuadEdge2D_members(z):
    FT.expose_member_as_array_of_pointees(z, 'pt', 4)
    FT.set_array_item_type_as_size_t(z, 'next')
Exemple #4
0
def expose_QuadEdge2D_members(z):
    FT.expose_member_as_array_of_pointees(z, 'pt', 4)
    FT.set_array_item_type_as_size_t(z, 'next')