这是obj-C代码:
std::vector<Point2f> obj_corners(4);
obj_corners[0] = cvPoint(0,0);
obj_corners[1] = cvPoint(img_object.cols, 0 );
obj_corners[2] = cvPoint(img_object.cols, img_object.rows );
obj_corners[3] = cvPoint(0, img_object.rows );
std::vector<Point2f> scene_corners(4);
perspectiveTransform(obj_corners, scene_corners, H);
我想把它改成java。但是当我perspectiveTransform
从文档中检查函数时,它变成Mat
了vector
:
我怎样才能在 Java 中做同样的事情?谢谢。