1''
1''

Reputation: 27105

OpenCV Android - convert MatOfPoint to Mat

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!

Upvotes: 2

Views: 7705

Answers (1)

Andrey Kamaev
Andrey Kamaev

Reputation: 30122

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

From OpenCV source:

public class MatOfPoint extends Mat

Upvotes: 9

Related Questions