Cómo convertir la tasa de MatOfPoint a MatOfPoint2f usando la API de Java en OpenCV.
public Point[] toArray();
en ambas clases. Puede volver a /// variable fuente
MatOfPoint SrcMtx;
/// nueva variable
MatOfPoint2f NewMtx = new MatOfPoint2f( SrcMtx.toArray()
Imgproc.findContours(gray.cont);
Imgproc.findContours(gray.cont); findContours(gray.cont)findContours(gray, contornos, new Mat(), Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE);
for(int i=0; ilt. contours.length(); i) {
//Convierte contornos(i) de MatOfPoint a MatOfPoint2f
contours.get(i).convertTo(mMOP2f1, CvType.CV_ 32FC2);
//Procesa el mMOP2f1 de tipo MatOfPoint2f
Imgproc.approxPolyDP(mMOP2f1, mMOP2f2, approxDistance, true);
//Convierte de nuevo a MatOfPoint y vuelve a colocar el nuevo valor en la lista de esquemas
mMOP2f2.convertTo(contours.get(x), CvType.CV_32S
}
);