OpenCV的Andr​​oid的 - 转换为MatOfPoint太 [英] OpenCV Android - convert MatOfPoint to Mat

查看:287
本文介绍了OpenCV的Andr​​oid的 - 转换为MatOfPoint太的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想转换MatOfPoint发现Imgproc.findContours成(二进制)垫。我知道有一种方法做反向转换(只使用构造MatOfPoint(板M)),​​但有一个内置的方式做到这一点的转换?如果没有,什么是转换元素乘元素的正确方法。谢谢!

I'd like to convert a MatOfPoint found with Imgproc.findContours into a (binary) Mat. I know there's a way to do the reverse conversion (just use the constructor MatOfPoint(Mat m)) but is there a built-in way to do this conversion? If not, what is the correct way to convert element-by-element. Thanks!

推荐答案

您不需要任何转换器。 MatOfPoint是垫的一个子类:

You don't need any converters. MatOfPoint is a subclass of Mat:

从OpenCV的源:

public class MatOfPoint extends Mat

这篇关于OpenCV的Andr​​oid的 - 转换为MatOfPoint太的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆