目前,我正在进行一个项目,该项目需要从医生的处方中提取签名。我被困在一个地方,我使用opencv中的轮廓来查找处方中的图案,但我不知道如何比较轮廓来匹配签名图案。 这是签名模式:Image of signature I want to find in the prescription 这是裁剪后的处方:Image of the cropped prescription 在使用裁剪的处方中的轮廓后,我发现了以下模式:Image of contours in cropped prescription
我正在使用下面的代码,以找到一个图像的垫轮廓。我发现轮廓是正确的。但是当我试图在等高线上裁剪图像时,应用程序就会崩溃。
List<MatOfPoint> contours = new ArrayList<MatOfPoint>();
Mat contour_mat = new Mat();
Imgproc.findContours(image, contours, contour_mat, Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_NONE);
Mat roi = null;
for (int idx = 0; idx &