There is no MatOfPoints

im trying. to convert below code which was written in Kotlin
to objc

but the thing is I can not. find any MatOfPoit object on. OpenCV

                                val bgr_img = Mat()
                                Imgproc.cvtColor(img, bgr_img, Imgproc.COLOR_RGB2BGR)

                                    val tracking_mask =
                                        Mat.zeros(bgr_img.size(0), bgr_img.size(1), CvType.CV_8UC1)

                                    val temp = MatOfPoint().apply {
                                        fromList(listROIPoint)
                                    }
                                    fillPoly(
                                        tracking_mask,
                                        mutableListOf(temp),
                                        Scalar(255.0, 255.0, 255.0, 255.0)
                                    )

indeed, that only exists in the java wrappers.
(in c++, you would use a vector<Point>)

1 Like