我有自己的C++,我想用pybdN11:
生成Python绑定。
auto markerParams = MarkerDetector::Params::create(MarkerType::chessboard);
markerDetector.detect(image, markerParams);
我在为MarkerDetector::Params
结构生成绑定时遇到了问题,因为它是一个内部结构,使用一个以enum为参数的工厂方法构造:
^{pr2}$
有人知道如何处理这个更高级的案子吗?在
Tags:
我有一个基本的代码实现要运行,根据您的设计使用内部结构。为了简洁起见,我只包含了marketector和Params的相关细节,但它应该与您所做的匹配。在
c++代码:
(如果您感兴趣,可以使用命令行来编译上面的代码:)
^{pr2}$python代码:
这将给出以下输出,根据设计,这些输出看起来是正确的:
我希望这能给你一些工作上的帮助。尊敬的,如
相关问题 更多 >
编程相关推荐