CN116959004A - Handwritten signature recognition methods, devices, electronic equipment and computer program products - Google Patents

Handwritten signature recognition methods, devices, electronic equipment and computer program products Download PDF

Info

Publication number
CN116959004A
CN116959004A CN202310864798.3A CN202310864798A CN116959004A CN 116959004 A CN116959004 A CN 116959004A CN 202310864798 A CN202310864798 A CN 202310864798A CN 116959004 A CN116959004 A CN 116959004A
Authority
CN
China
Prior art keywords
path
signature
handwritten signature
vector image
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310864798.3A
Other languages
Chinese (zh)
Inventor
黄文利
吴磊
李玲玲
范岩
黄春
张立成
孙全勇
孙明帅
那铁鑫
刘洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Heilongjiang Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Heilongjiang Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Group Heilongjiang Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202310864798.3A priority Critical patent/CN116959004A/en
Publication of CN116959004A publication Critical patent/CN116959004A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/22Character recognition characterised by the type of writing
    • G06V30/226Character recognition characterised by the type of writing of cursive writing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • G06V30/1801Detecting partial patterns, e.g. edges or contours, or configurations, e.g. loops, corners, strokes or intersections
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Collating Specific Patterns (AREA)

Abstract

本申请涉及数据处理技术领域,提供一种手写签名识别方法、装置、电子设备及计算机程序产品。方法包括:基于待识别文件的文件格式,提取所述待识别文件的矢量图像对象,所述矢量图像对象包括手写签名的特征信息;基于所述矢量图像对象,构建路径对象,所述路径对象用于表征图像的路径或轮廓;对所述路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。本申请实施例通过提取矢量图像对象,基于矢量图像对象,构建、绘制、裁剪路径对象,得到手写签名图片,基于此,当手写签名背景有水印,或者叠加部分单据文件上有其他文字等干扰因素时,截取到的手写签名图片抗干扰性强,提高了稽核准确率以及手写签名识别的准确性。

This application relates to the field of data processing technology and provides a handwritten signature recognition method, device, electronic equipment and computer program products. The method includes: extracting a vector image object of the file to be recognized based on the file format of the file to be recognized, where the vector image object includes characteristic information of a handwritten signature; and constructing a path object based on the vector image object, where the path object is To characterize the path or contour of the image; draw the path object, and cut the drawn path object to obtain a handwritten signature picture. The embodiment of this application obtains a handwritten signature picture by extracting vector image objects, constructing, drawing, and clipping path objects based on the vector image objects. Based on this, when there is a watermark on the background of the handwritten signature, or there are other interfering factors such as other text on the superimposed document document At this time, the intercepted handwritten signature picture has strong anti-interference, which improves the audit accuracy and the accuracy of handwritten signature recognition.

Description

手写签名识别方法、装置、电子设备及计算机程序产品Handwritten signature recognition methods, devices, electronic equipment and computer program products

技术领域Technical field

本申请涉及数据处理技术领域,具体涉及一种手写签名识别方法、装置、电子设备及计算机程序产品。This application relates to the field of data processing technology, specifically to a handwritten signature recognition method, device, electronic equipment and computer program product.

背景技术Background technique

在运营商业务无纸化电子单据的稽核业务中,对业务单据中客户手写电子签名的定位识别和提取保存,关系到对单据业务客户主体的身份鉴定,是业务稽核的入口,因此在整个运营商无纸化单据稽核业务中显得尤为重要和关键。In the audit business of paperless electronic documents of the operator's business, the location, identification, extraction and preservation of the customer's handwritten electronic signature in the business document is related to the identification of the customer subject of the document business. It is the entrance to the business audit, so it is important in the entire operation. It is particularly important and critical in the business of paperless document audit.

目前,对于电子单据手写签名的提取和保存主要有以下三种方式:按坐标截取签名的方式、按图片元素截取签名的方式、AI识别签名区域并截取的方式。Currently, there are three main ways to extract and save handwritten signatures on electronic documents: intercepting signatures based on coordinates, intercepting signatures based on picture elements, and using AI to identify signature areas and intercept them.

针对按坐标截取签名的方式:当签名背景有水印,或者叠加部分单据文件上的其他文字时,截取到的签名图片对于人工识别和程序识别都会造成一定程度的干扰。针对按图片元素截取签名的方式:PDF单据文件中含有多张图片元素,且按尺寸颜色,无法明确区分哪个是签名图片,如果签名图片不是以图片形式存储于PDF单据文件中时,则无法得到签名图片。针对采用AI识别签名区域并截取的方式:需要大量样本进行训练,且需要大量的标注工作,准确率达不到100%。Regarding the method of intercepting signatures by coordinates: When there is a watermark on the background of the signature, or other text on part of the document is superimposed, the intercepted signature image will cause a certain degree of interference for manual recognition and program recognition. Regarding the method of intercepting signatures based on picture elements: the PDF document file contains multiple picture elements, and it is impossible to clearly distinguish which one is the signature picture based on size and color. If the signature picture is not stored in the PDF document file in image form, it cannot be obtained. Signed picture. Regarding the method of using AI to identify signature areas and intercept them: a large number of samples are required for training, and a large amount of annotation work is required, and the accuracy rate cannot reach 100%.

基于此,现有的识别电子单据手写签名的方法不准确。Based on this, existing methods for identifying handwritten signatures on electronic documents are inaccurate.

发明内容Contents of the invention

本申请实施例提供一种手写签名识别方法、装置、电子设备及计算机程序产品,用以解决手写签名识别不准确的技术问题。Embodiments of the present application provide a handwritten signature recognition method, device, electronic equipment and computer program product to solve the technical problem of inaccurate handwritten signature recognition.

第一方面,本申请实施例提供一种手写签名识别方法,包括:In a first aspect, embodiments of the present application provide a handwritten signature recognition method, including:

基于待识别文件的文件格式,提取所述待识别文件的矢量图像对象,所述矢量图像对象包括手写签名的特征信息;Based on the file format of the file to be recognized, extract a vector image object of the file to be recognized, where the vector image object includes characteristic information of a handwritten signature;

基于所述矢量图像对象,构建路径对象,所述路径对象用于表征图像的路径或轮廓;Based on the vector image object, construct a path object, which is used to represent the path or contour of the image;

对所述路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。The path object is drawn, and the drawn path object is cropped to obtain a handwritten signature picture.

在一个实施例中,所述基于所述矢量图像对象,构建路径对象,包括:In one embodiment, constructing a path object based on the vector image object includes:

基于所述矢量图像对象的手写签名的特征信息和至少一个路径构建算子,构建所述路径对象。The path object is constructed based on the characteristic information of the handwritten signature of the vector image object and at least one path construction operator.

在一个实施例中,所述对所述路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片,包括:In one embodiment, the step of drawing the path object and cropping the drawn path object to obtain a handwritten signature picture includes:

采用路径绘制算子,对所述路径对象进行描边和填充,以将所述路径对象绘制在画布上;Using a path drawing operator, stroke and fill the path object to draw the path object on the canvas;

采用路径裁剪算子,对绘制后的路径对象与裁剪区域进行交叉处理,以裁剪在所述裁剪区域外的所述路径对象,得到所述手写签名图片。A path clipping operator is used to cross-process the drawn path object and the clipping area to clip the path object outside the clipping area to obtain the handwritten signature picture.

在一个实施例中,所述基于待识别文件的文件格式,提取所述待识别文件的矢量图像对象,包括:In one embodiment, extracting the vector image object of the file to be identified based on the file format of the file to be identified includes:

基于签名页标识,确定所述待识别文件的签名页;Based on the signature page identification, determine the signature page of the document to be identified;

基于所述文件格式,识别所述签名页的内容;identifying the content of the signature page based on the file format;

从识别得到的所述签名页的内容中提取所述矢量图像对象。The vector image object is extracted from the recognized content of the signature page.

在一个实施例中,所述基于所述文件格式,识别所述签名页的内容,包括:In one embodiment, identifying the content of the signature page based on the file format includes:

基于所述文件格式,对所述签名页进行解析和渲染,得到所述签名页的内容。Based on the file format, the signature page is parsed and rendered to obtain the content of the signature page.

在一个实施例中,所述从识别得到的所述签名页的内容中提取所述矢量图像对象,包括:从所述签名页的内容中提取目标元素,对所述目标元素进行文本处理得到目标文本;基于矢量图像对象的特征,提取所述目标文本中的所述矢量图像对象。In one embodiment, extracting the vector image object from the recognized content of the signature page includes: extracting a target element from the content of the signature page, and performing text processing on the target element to obtain the target Text; based on the characteristics of the vector image object, extract the vector image object in the target text.

在一个实施例中,所述对所述路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片之后,包括:将所述手写签名图片转换为栅格图片,并存储所述栅格图片。In one embodiment, after drawing the path object, cropping the drawn path object, and obtaining a handwritten signature image, the method includes: converting the handwritten signature image into a raster image, and storing the raster image. .

第二方面,本申请实施例提供一种手写签名识别装置,包括:In a second aspect, embodiments of the present application provide a handwritten signature recognition device, including:

提取模块,用于基于待识别文件的文件格式,提取所述待识别文件的矢量图像对象,所述矢量图像对象包括手写签名的特征信息;An extraction module, configured to extract a vector image object of the file to be recognized based on the file format of the file to be recognized, where the vector image object includes characteristic information of a handwritten signature;

构建模块,用于基于所述矢量图像对象,构建路径对象,所述路径对象用于表征图像的路径或轮廓;A construction module, configured to construct a path object based on the vector image object, where the path object is used to represent the path or contour of the image;

获得模块,用于对所述路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。Obtaining a module for drawing the path object, cropping the drawn path object, and obtaining a handwritten signature picture.

第三方面,本申请实施例提供一种电子设备,包括处理器和存储有计算机程序的存储器,所述处理器执行所述程序时实现第一方面所述的手写签名识别方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, including a processor and a memory storing a computer program. When the processor executes the program, the steps of the handwritten signature recognition method described in the first aspect are implemented.

第四方面,本申请实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现第一方面的手写签名识别方法方法的步骤。In a fourth aspect, embodiments of the present application provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the handwritten signature recognition method of the first aspect.

本申请实施例提供的手写签名识别方法、装置、电子设备及计算机程序产品,通过基于待识别文件的文件格式,提取所述待识别文件的矢量图像对象,所述矢量图像对象包括手写签名的特征信息;基于所述矢量图像对象,构建路径对象,所述路径对象用于表征图像的路径或轮廓;对所述路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。本申请实施例通过提取矢量图像对象,基于矢量图像对象,构建、绘制、裁剪路径对象,得到手写签名图片,基于此,当手写签名背景有水印,或者叠加部分单据文件上有其他文字等干扰因素时,截取到的手写签名图片抗干扰性强,提高了稽核准确率以及手写签名识别的准确性。The handwritten signature recognition method, device, electronic equipment and computer program product provided by the embodiments of the present application extract the vector image object of the file to be recognized based on the file format of the file to be recognized, and the vector image object includes the characteristics of the handwritten signature. information; based on the vector image object, construct a path object, the path object is used to represent the path or outline of the image; draw the path object, and cut the drawn path object to obtain a handwritten signature picture. The embodiment of this application obtains a handwritten signature picture by extracting vector image objects, constructing, drawing, and clipping path objects based on the vector image objects. Based on this, when there is a watermark on the background of the handwritten signature, or there are other interfering factors such as other text on the superimposed document document At this time, the intercepted handwritten signature picture has strong anti-interference, which improves the audit accuracy and the accuracy of handwritten signature recognition.

附图说明Description of the drawings

为了更清楚地说明本申请或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in this application or the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are of the present invention. For some embodiments of the application, those of ordinary skill in the art can also obtain other drawings based on these drawings without exerting creative efforts.

图1是本申请实施例提供的手写签名识别方法的流程示意图;Figure 1 is a schematic flow chart of a handwritten signature recognition method provided by an embodiment of the present application;

图2是本申请实施例提供的手写签名识别装置的结构示意图;Figure 2 is a schematic structural diagram of a handwritten signature recognition device provided by an embodiment of the present application;

图3是本申请实施例提供的电子设备的结构示意图。Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are part of this application. Examples, not all examples. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.

图1是本申请实施例提供的手写签名识别方法的流程示意图。参照图1,本申请实施例提供一种手写签名识别方法,可以包括:Figure 1 is a schematic flowchart of a handwritten signature recognition method provided by an embodiment of the present application. Referring to Figure 1, an embodiment of the present application provides a handwritten signature recognition method, which may include:

S100,基于待识别文件的文件格式,提取待识别文件的矢量图像对象,矢量图像对象包括手写签名的特征信息;S100, based on the file format of the file to be recognized, extract the vector image object of the file to be recognized. The vector image object includes the characteristic information of the handwritten signature;

待识别文件为运营商业务的电子单据,该待识别文件上具有客户的手写签名。The document to be identified is an electronic document of the operator's business, and the document to be identified has the customer's handwritten signature.

本申请实施例的电子单据为PDF格式,文件格式包括文件的PDF结构。PDF结构包括:文件头、交叉引用表、目录、对象、页面、字体、注释、图像等,不同的PDF文件可以有不同的结构和内容。The electronic document in the embodiment of this application is in PDF format, and the file format includes the PDF structure of the file. PDF structure includes: file header, cross-reference table, directory, object, page, font, annotation, image, etc. Different PDF files can have different structures and contents.

矢量图像对象为包含手写签名的特征信息,如签名的矢量图像。矢量图像是使用数学公式和几何元素描述的图像类型,与像素图像(位图)相对应。矢量图像通过定义几何形状、路径、曲线和颜色等属性来表示图像,而不是通过像素阵列来表示。The vector image object is a vector image containing characteristic information of a handwritten signature, such as a signature. Vector images are a type of image described using mathematical formulas and geometric elements, corresponding to pixel images (bitmaps). Vector images represent images by defining properties such as geometric shapes, paths, curves, and colors, rather than through arrays of pixels.

基于待识别文件的PDF结构,通过分析该PDF结构,对客户的手写签名,定位PDF待识别文件中的目标元素,进一步从目标元素中提取出矢量图像对象,进而得到客户的手写签名。Based on the PDF structure of the file to be identified, by analyzing the PDF structure, the customer's handwritten signature is located, the target element in the PDF file to be identified is located, and the vector image object is further extracted from the target element to obtain the customer's handwritten signature.

S200,基于矢量图像对象,构建路径对象,路径对象用于表征图像的路径或轮廓;S200, based on the vector image object, construct a path object, which is used to represent the path or contour of the image;

确定PDF待识别文件中矢量图像对象的关键参数,基于该关键参数,建立PDF结构内手写签名的图形元素和栅格图形的映射关系,明确手写签名的图形元素到栅格图形的转换逻辑。Determine the key parameters of the vector image object in the PDF file to be recognized. Based on the key parameters, establish the mapping relationship between the graphic elements of the handwritten signature and the raster graphic within the PDF structure, and clarify the conversion logic from the graphic elements of the handwritten signature to the raster graphic.

根据矢量图像对象的关键参数,构建矢量图像对象的路径对象;例如,提取矢量图像对象的线条形状以及数量,基于矢量图像对象的线条形状以及数量,构建出具有相同线条形状和数量的路径对象。Construct a path object of the vector image object based on the key parameters of the vector image object; for example, extract the line shape and number of the vector image object, and construct a path object with the same line shape and number based on the line shape and number of the vector image object.

S300,对路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。S300: Draw a path object, crop the drawn path object, and obtain a handwritten signature image.

对所构建的路径对象进行绘制,将路径对象绘制在一个画布上。对画布中的路径对象区域进行裁剪,得到手写签名图片。例如预先设置裁剪形状,例如矩形框或者圆框,将绘制后的路径对象放置于裁剪形状中,根据裁剪形状对路径对象及周边区域进行裁剪,得到手写签名图片。Draw the constructed path object and draw the path object on a canvas. Crop the path object area in the canvas to obtain a handwritten signature image. For example, a cropping shape is set in advance, such as a rectangular frame or a circular frame, the drawn path object is placed in the cropping shape, and the path object and the surrounding area are cropped according to the cropping shape to obtain a handwritten signature image.

本申请实施例通过基于待识别文件的文件格式,提取待识别文件的矢量图像对象,矢量图像对象包括手写签名的特征信息;基于矢量图像对象,构建路径对象,路径对象用于表征图像的路径或轮廓;对路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。本申请实施例通过提取矢量图像对象,基于矢量图像对象,构建、绘制、裁剪路径对象,得到手写签名图片,基于此,当手写签名背景有水印,或者叠加部分单据文件上有其他文字等干扰因素时,截取到的手写签名图片抗干扰性强,提高了稽核准确率以及手写签名识别的准确性。The embodiment of the present application extracts the vector image object of the file to be recognized based on the file format of the file to be recognized. The vector image object includes the characteristic information of the handwritten signature; based on the vector image object, a path object is constructed, and the path object is used to characterize the path or path of the image. Contour; draw the path object, crop the drawn path object, and obtain the handwritten signature picture. The embodiment of this application obtains a handwritten signature picture by extracting vector image objects, constructing, drawing, and clipping path objects based on the vector image objects. Based on this, when there is a watermark on the background of the handwritten signature, or there are other interfering factors such as other text on the superimposed document document At this time, the intercepted handwritten signature picture has strong anti-interference, which improves the audit accuracy and the accuracy of handwritten signature recognition.

基于上述实施例,基于矢量图像对象,构建路径对象,包括:Based on the above embodiment, based on the vector image object, a path object is constructed, including:

S210,基于矢量图像对象的手写签名的特征信息和至少一个路径构建算子,构建路径对象。S210: Construct a path object based on the feature information of the handwritten signature of the vector image object and at least one path construction operator.

特征信息包括手写签名的几何形状,例如直线、曲线、斜线等。路径构建算子为构建路径对象的算子。Feature information includes the geometric shape of the handwritten signature, such as straight lines, curves, diagonal lines, etc. The path construction operator is an operator for constructing path objects.

通过手写签名的几何形状,使用至少一个路径构建算子来构建路径对象,例如,使用路径构建算子,如移动到(Move To)、直线到(Line To)、二次贝塞尔曲线到(QuadraticBezier Curve To)等操作,来构建路径对象的形状和轮廓。根据手写签名样式和形状,使用这些算子创建路径;例如,当手写签名的几何形状为曲线形状时,使用三次贝塞尔曲线,其中,三次贝塞尔曲线的表达式为:Construct a path object from the geometry of the handwritten signature using at least one path construction operator, for example, using a path construction operator such as Move To, Line To, Quadratic Bezier Curve to ( QuadraticBezier Curve To) and other operations to construct the shape and outline of the path object. Use these operators to create paths based on the handwritten signature style and shape; for example, when the geometry of the handwritten signature is a curve shape, a cubic Bezier curve is used, where the expression of the cubic Bezier curve is:

R(t)=(1-t)3×P0+3t×(1-t)2×P1+3t2×(1-t)P2+t3×P3R(t)=(1-t) 3 ×P 0 +3t×(1-t) 2 ×P 1 +3t 2 ×(1-t)P 2 +t 3 ×P 3 ;

其中,P0为起始点,P1、P2为控制点,P3为结束点,R(t)为三次贝塞尔曲线,t为具体一个点的位置。Among them, P 0 is the starting point, P 1 and P 2 are control points, P 3 is the end point, R(t) is the cubic Bezier curve, and t is the position of a specific point.

通过不同的参数值t,可以计算出曲线上的不同点的位置,从而绘制出整个三次贝塞尔曲线。t在三次贝塞尔曲线中表示曲线上的一个点的位置,它决定了曲线在起点和终点之间的形状。当t的数值为0到1之间时,表示从曲线起点到终点的位置。而当t趋近于0时,曲线上的点会趋近于起点P0;当t趋近于1时,曲线上的点会趋近于终点P3Through different parameter values t, the positions of different points on the curve can be calculated, thereby drawing the entire cubic Bezier curve. t represents the position of a point on the curve in a cubic Bezier curve, which determines the shape of the curve between the starting point and the end point. When the value of t is between 0 and 1, it represents the position from the starting point to the end point of the curve. When t approaches 0, the points on the curve will approach the starting point P 0 ; when t approaches 1, the points on the curve will approach the end point P 3 .

本申请实施例通过特征信息和路径构建算子构建路径对象,提高了构建路径对象的准确率。The embodiment of the present application constructs a path object through feature information and a path construction operator, thereby improving the accuracy of constructing a path object.

基于上述实施例,对路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片,包括:Based on the above embodiment, the path object is drawn and the drawn path object is cropped to obtain a handwritten signature image, including:

S310,采用路径绘制算子,对路径对象进行描边和填充,以将路径对象绘制在画布上;S310, use a path drawing operator to stroke and fill the path object to draw the path object on the canvas;

S320,采用路径裁剪算子,对绘制后的路径对象与裁剪区域进行交叉处理,以裁剪在裁剪区域外的路径对象,得到手写签名图片。S320: Use a path clipping operator to cross-process the drawn path object and the clipping area to clip the path object outside the clipping area to obtain a handwritten signature image.

路径绘制算子是描述如何构建和绘制路径的算子,其中路径包括直线、曲线和闭合路径等。Path drawing operators are operators that describe how to construct and draw paths, where paths include straight lines, curves, closed paths, etc.

本申请实施例中的路径对象可为多个,路径对象的数量由手写签名的字数决定,例如手写签名为“张小明”,则手写签名的字数有3个,对应的路径对象的数量有3个。There can be multiple path objects in the embodiment of this application. The number of path objects is determined by the number of words in the handwritten signature. For example, if the handwritten signature is "Zhang Xiaoming", then the number of words in the handwritten signature is 3, and the number of corresponding path objects is 3. .

按照从前到后的顺序对每个路径对象进行绘制,例如先找到“张”的路径对象,绘制“张”;然后找到“小”的路径对象,绘制“小”;最后找到“明”的路径对象,绘制“明”。Draw each path object in order from front to back. For example, first find the path object of "Zhang" and draw "Zhang"; then find the path object of "Small" and draw "Small"; finally find the path of "Ming" Object, drawn "Ming".

每个路径对象的绘制包括在画布上对路径对象进行描边和填充,其中,描边可以给路径轮廓添加颜色和线条样式,填充可以给路径内部添加颜色和纹理。在绘制下一个路径对象时,会考虑上一个路径对象的绘制过程,例如上一个路径对象的坐标位置,颜色设置等。The drawing of each path object includes stroking and filling the path object on the canvas. Stroking can add color and line style to the outline of the path, and filling can add color and texture to the interior of the path. When drawing the next path object, the drawing process of the previous path object will be considered, such as the coordinate position, color settings, etc. of the previous path object.

当需要将路径对象裁剪为特定的形状时,使用路径裁剪算子。通过将路径对象与裁剪区域进行相交运算,只保留路径对象在裁剪区域内的部分,实现对路径对象的裁剪效果。When you need to clip a path object into a specific shape, use the path clipping operator. By performing an intersection operation on the path object and the clipping area, only the part of the path object within the clipping area is retained to achieve the clipping effect on the path object.

本申请实施例通过使用路径绘制算子和路径裁剪算子,实现对路径对象的绘制和裁剪,进而得到手写签名,提高了对手写签名识别的准确率。Embodiments of the present application implement drawing and clipping of path objects by using path drawing operators and path clipping operators, thereby obtaining handwritten signatures and improving the accuracy of handwritten signature recognition.

基于上述实施例,基于待识别文件的文件格式,提取待识别文件的矢量图像对象,包括:Based on the above embodiment, based on the file format of the file to be recognized, extracting the vector image object of the file to be recognized includes:

S110,基于签名页标识,确定待识别文件的签名页;S110, based on the signature page identification, determine the signature page of the file to be identified;

S120,基于文件格式,识别签名页的内容;S120, based on the file format, identify the content of the signature page;

S130,从识别得到的签名页的内容中提取矢量图像对象。S130: Extract vector image objects from the recognized content of the signature page.

签名页标识是在文档中用于识别和定位签名位置的一种标记或标识,以提供用户一个明确定位签名的区域,例如“甲方或甲方监护人”、“本人签名”、“经办人签名”等。签名页标识可以是以下几种形式之一:The signature page mark is a mark or mark used to identify and locate the signature position in the document to provide users with an area to clearly locate the signature, such as "Party A or Party A's guardian", "My signature", "Handling person" Signature" etc. The signature page identification can be one of the following forms:

(1)签名行:在表格或文件中为签名预留一行空间,通常在该行上方或下方注明“签名”或“Signature(签名)”字样。(2)签名框:在文档中划定一个矩形区域,用于放置签名。这个矩形通常会被用虚线或其他特殊样式来标识。(3)签名标签:在文档中使用文字或图标标记出需要签名的位置,例如使用“Sign Here(签字)”字样或指示箭头。(4)手写签名区域:在电子文档中预留一个空白的可手写区域,用户可以使用触摸屏、数字板或鼠标等输入设备直接在该区域进行手写签名。(1) Signature line: Reserve a line of space for a signature in a form or document, usually with the words "Signature" or "Signature" above or below the line. (2) Signature box: Define a rectangular area in the document for placing signatures. This rectangle is usually marked with a dashed line or other special style. (3) Signature label: Use text or icons to mark the location where a signature is required in the document, such as using the words "Sign Here" or an indicator arrow. (4) Handwritten signature area: A blank handwritten area is reserved in the electronic document. Users can use input devices such as touch screens, digital pads, or mice to directly handwrite signatures in this area.

当运营商业务的电子单据页数很多,例如超过20页时,通过签名页标识,快速定位到签名页。遍历PDF待识别文件的每页内容,基于签名页标识,识别签名页。从签名页的内容中识别并提取出目标元素,基于目标元素识别出矢量图形对象。When an operator's business electronic document has many pages, for example, more than 20 pages, the signature page can be quickly located through the signature page identification. Traverse the content of each page of the PDF file to be identified, and identify the signature page based on the signature page identification. Identify and extract target elements from the content of the signature page, and identify vector graphic objects based on the target elements.

可选的,直接识别待识别页的内容,而不识别签名页,例如,直接遍历待识别文件中的每一页的PDF页面元素,得到待识别页的内容。从待识别页的内容中识别并提取出目标元素,基于目标元素识别出矢量图形对象。Optionally, directly identify the content of the page to be identified without identifying the signature page, for example, directly traverse the PDF page elements of each page in the file to be identified to obtain the content of the page to be identified. Identify and extract target elements from the content of the page to be identified, and identify vector graphics objects based on the target elements.

本申请实施例通过识别签名页的内容,进而提取矢量图像对象,提高了对手写签名识别的效率。The embodiment of the present application improves the efficiency of handwritten signature recognition by identifying the content of the signature page and then extracting vector image objects.

基于上述实施例,基于文件格式,识别签名页的内容,包括:Based on the above embodiment, based on the file format, identifying the content of the signature page includes:

S121,基于文件格式,对签名页进行解析和渲染,得到签名页的内容。S121: Based on the file format, parse and render the signature page to obtain the content of the signature page.

解析和渲染引擎包括:PyMuPDF、MuPDF等。本申请实施例以PyMuPDF为例进行说明。Parsing and rendering engines include: PyMuPDF, MuPDF, etc. The embodiment of this application takes PyMuPDF as an example for description.

PyMuPDF是一个功能强大且灵活的PDF处理库,它可以对PDF文件的进行读取、写入和处理操作。PyMuPDF可以解析PDF文件,提取文本、图像、字体和其他对象。PyMuPDF is a powerful and flexible PDF processing library that can read, write and process PDF files. PyMuPDF can parse PDF files and extract text, images, fonts and other objects.

使用PyMuPDF遍历PDF签名页的页面、获取页面内容、检测页面中的文本和图像,进而识别签名页的内容。Use PyMuPDF to traverse the pages of the PDF signature page, obtain the page content, detect the text and images in the page, and then identify the content of the signature page.

可选地,使用PyMuPDF遍历待识别文件所有页的页面获取页面内容、检测页面中的文本和图像,进而识别待识别文件的内容。Optionally, use PyMuPDF to traverse all pages of the file to be identified to obtain the page content, detect the text and images in the page, and then identify the content of the file to be identified.

本身申请实施例通过解析和渲染引擎,识别签名页的内容,提高了对手写签名识别的效率。The application embodiment uses a parsing and rendering engine to identify the content of the signature page, thereby improving the efficiency of handwritten signature recognition.

基于上述实施例,从识别得到的签名页的内容中提取矢量图像对象,包括:Based on the above embodiment, vector image objects are extracted from the recognized content of the signature page, including:

S131,从签名页的内容中提取目标元素,对目标元素进行文本处理得到目标文本;S131, extract the target element from the content of the signature page, and perform text processing on the target element to obtain the target text;

S132,基于矢量图像对象的特征,提取目标文本中的矢量图像对象。S132. Based on the characteristics of the vector image object, extract the vector image object in the target text.

目标元素为完整的流(Stream)类型的元素。在PDF文件中,流类型的元素是一种用于存储和传输数据的对象类型。流类型的元素用于存储各种类型的数据,例如文本内容、图像数据、字体数据等。The target element is a complete stream type element. In a PDF file, an element of stream type is an object type used to store and transmit data. Stream type elements are used to store various types of data, such as text content, image data, font data, etc.

矢量图像对象的特征包括矢量图像的存储位置和结构的特征。The characteristics of the vector image object include the storage location and structure characteristics of the vector image.

对识别出的签名页的内容进行列表得到识别内容列表。可选地,对识别出的待识别文件的内容进行列表得到识别内容列表。List the recognized contents of the signature page to obtain a recognized content list. Optionally, list the recognized contents of the files to be recognized to obtain a recognized content list.

本申请实施例的识别内容列表,包括交叉引用表(Cross-Reference Table,XRef)。XRef列表可以记录识别内容的位置和编号信息。根据XRef列表找到完整的流类型的元素。再把流类型的元素中的外部对象(External Object,XObject)进行文本化处理,得到目标文本,其中XObject对象是一种用于表示嵌入的图像、表单、矢量图形等元素的类型。检测并分析每个XObject对象的目标文本中的部分字节中的指令序列,例如前40个字节中的指令序列;得到该XObject对象的存储位置和结构。将所分析的XObject对象的存储位置和结构与矢量图像对象(手写签名)的存储位置和结构进行比对,进而判断该XObject对象是否为矢量图像对象。The identification content list in the embodiment of this application includes a cross-reference table (Cross-Reference Table, XRef). The XRef list can record the location and number information of the identified content. Find the complete stream type element based on the XRef list. Then the external object (XObject) in the stream type element is text-processed to obtain the target text. The XObject object is a type used to represent embedded images, forms, vector graphics and other elements. Detect and analyze the instruction sequence in some bytes in the target text of each XObject object, such as the instruction sequence in the first 40 bytes; obtain the storage location and structure of the XObject object. Compare the storage location and structure of the analyzed XObject object with the storage location and structure of the vector image object (handwritten signature), and then determine whether the XObject object is a vector image object.

例如,若一个XObject对象的目标文本的前40字节是以[1J1j/DeviceRGB CS 0.000.00 0.00SCN]或[Q\nq\nq\n0 0 0RG]开始的,则查找该XObject对象的图形状态操作指令、色彩空间的指令以及保存和恢复图形状态的指令,基于上述指令分析出XObject对象的存储位置和结构,进而判断该XObject对象是否为矢量图像对象。For example, if the first 40 bytes of the target text of an XObject object start with [1J1j/DeviceRGB CS 0.000.00 0.00SCN] or [Q\nq\nq\n0 0 0RG], then find the graphics status of the XObject object Based on the operation instructions, color space instructions, and instructions to save and restore the graphics state, the storage location and structure of the XObject object are analyzed based on the above instructions, and then whether the XObject object is a vector image object is determined.

预先收集多种含有手写签名的运营商业务的电子单据,对该运营商业务的电子单据中的手写签名进行分析,总结出矢量图像对象(手写签名)的存储位置和结构,作为识别矢量图像对象的依据。Collect in advance a variety of electronic documents of operator services containing handwritten signatures, analyze the handwritten signatures in the electronic documents of the operator's services, and summarize the storage location and structure of vector image objects (handwritten signatures) as a means to identify vector image objects. basis.

基于上述方法,提取出所有矢量图像对象。Based on the above method, all vector image objects are extracted.

本申请实施例通过提取目标元素,对目标元素进行文本处理,进而得到矢量图像对象,提高了对手写签名识别的效率。The embodiment of the present application improves the efficiency of handwritten signature recognition by extracting target elements and performing text processing on the target elements to obtain vector image objects.

基于上述实施例,对路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片之后,包括:Based on the above embodiment, the path object is drawn, the drawn path object is cropped, and the handwritten signature image is obtained, including:

S330,将手写签名图片转换为栅格图片,并存储栅格图片。S330: Convert the handwritten signature image into a raster image, and store the raster image.

栅格图片包括位图或像素图像,是由像素组成的图像。栅格图片以矩阵形式表示,其中每个像素都有自己的颜色值和位置。每个像素的颜色值表示了图像在该位置的颜色和亮度信息。栅格图片可以以多种文件格式保存,如连续图像专家组(Joint PhotographicExperts Group,JPG)、便携式网络图形(Portable Network Graphics,PNG)等。不同的文件格式具有不同的特性和用途,例如JPEG适用于照片,PNG适用于图像需要透明度的情况。Raster images include bitmaps or pixel images, which are images composed of pixels. Raster pictures are represented in matrix form, where each pixel has its own color value and position. The color value of each pixel represents the color and brightness information of the image at that location. Raster images can be saved in a variety of file formats, such as Joint PhotographicExperts Group (JPG), Portable Network Graphics (PNG), etc. Different file formats have different characteristics and uses, such as JPEG for photos and PNG for when images require transparency.

将手写签名图片保存为PNG格式:保存手写签名图片中的路径信息,留空手写签名图片中的非路径信息,得到透明的手写签名的签名轨迹图。PNG格式具有无损压缩的特性,可以保存图像的质量和细节,并支持透明度。Save the handwritten signature image in PNG format: save the path information in the handwritten signature image, leave the non-path information in the handwritten signature image blank, and obtain a transparent handwritten signature signature trajectory map. The PNG format has lossless compression characteristics, can preserve the quality and details of the image, and supports transparency.

可选地,将PNG格式的签名轨迹图保存为JPG格式。Optionally, save the signature trajectory map in PNG format as JPG format.

可选的,将手写签名图片直接保存为JPG格式。Optionally, save the handwritten signature image directly in JPG format.

本申请实施例通过先将手写签名图片保存为PNG格式再转换为JPG格式的过程,可以在保留较高质量、透明度以及线条和文字清晰度的同时,控制文件大小和压缩率,进而提高对手写签名识别的准确率。In the embodiment of this application, by first saving the handwritten signature image in PNG format and then converting it into JPG format, the file size and compression rate can be controlled while retaining higher quality, transparency, and clarity of lines and text, thereby improving handwriting. Accuracy of signature recognition.

为了进一步对本申请实施例提供出的手写签名识别方法进行解析说明,具体通过以下实施例进行说明:In order to further analyze and explain the handwritten signature recognition method provided by the embodiments of this application, the following embodiments will be specifically described:

步骤1:输入PDF文件,遍历PDF文件的每页内容,基于签名页标识,找出签名页;Step 1: Input the PDF file, traverse the content of each page of the PDF file, and find the signature page based on the signature page identifier;

步骤2:用PyMuPDF加载PDF签名页的内容,得到签名页的XRef列表;Step 2: Use PyMuPDF to load the content of the PDF signature page and obtain the XRef list of the signature page;

步骤3:遍历XRef列表,对于每个XRef列表中的XRef索引,查找到完整的Streams类型的元素,将Streams类型的元素中的XObject对象进行文本化处理得到目标文本,检测并分析每个XObject对象的目标文本中的前40个字节中的指令序列;根据矢量图像对象的特征对每个XObject对象进行判断,进而找到矢量图像对象;Step 3: Traverse the XRef list, find the complete Streams type element for the XRef index in each XRef list, textualize the XObject object in the Streams type element to obtain the target text, detect and analyze each XObject object The instruction sequence in the first 40 bytes of the target text; judge each XObject object according to the characteristics of the vector image object, and then find the vector image object;

步骤4:分析矢量图像对象的路径元素,采用路径构建算子对矢量图像的路径元素进行构建,得到路径对象;具体包括设置线条宽度指令,绘制直线指令,绘制贝塞尔指令;Step 4: Analyze the path elements of the vector image object, use the path construction operator to construct the path elements of the vector image, and obtain the path object; specifically, it includes setting line width instructions, drawing straight line instructions, and drawing Bezier instructions;

步骤5:绘制路径对象:使用路径绘制算子,在画布上,对路径对象进行描边和填充;Step 5: Draw the path object: Use the path drawing operator to stroke and fill the path object on the canvas;

步骤6:裁剪路径对象:使用路径裁剪算子对绘制后的路径对象进行裁剪,得到手写签名图片。Step 6: Clipping the path object: Use the path clipping operator to clip the drawn path object to obtain the handwritten signature image.

步骤7:将手写签名图片保存为PNG格式:只保存路径信息,非路径信息留空,即可得到透明的签名轨迹图。Step 7: Save the handwritten signature image in PNG format: save only the path information and leave the non-path information blank to get a transparent signature track map.

步骤8:将PNG格式的手写签名图片保存为JPG格式。Step 8: Save the handwritten signature image in PNG format to JPG format.

本申请实施例通过分析PDF文件格式的运营商业务的电子单据的文件结构,对于其中的手写客户签名,定位相应的PDF中的图形元素的矢量路径类型的元素,并直接提取这部分矢量路径元素,然后把这部分矢量路径重绘,并保存为栅格图片。本申请实施例最大的优点是无干扰因素,直接得到签名图层,当签名背景有水印,或者叠加部分单据文件上的其他文字等干扰因素时,截取到的签名图片抗干扰性强,极大提高了识别手写签名的准确率。The embodiment of this application analyzes the file structure of the electronic document of the operator's business in PDF file format, locates the vector path type element of the corresponding graphic element in the PDF for the handwritten customer signature, and directly extracts this part of the vector path element. , and then redraw this part of the vector path and save it as a raster image. The biggest advantage of the embodiment of this application is that there are no interference factors, and the signature layer can be obtained directly. When there are watermarks in the background of the signature, or other interference factors such as other text on part of the document are superimposed, the intercepted signature image has strong anti-interference, which is greatly Improved accuracy in recognizing handwritten signatures.

下面对本申请实施例提供的手写签名识别装置进行描述,下文描述的手写签名识别装置与上文描述的手写签名识别方法可相互对应参照。参照图2,图2是本申请实施例提供的手写签名识别装置的结构示意图。一种手写签名识别装置,包括:The handwritten signature recognition device provided by the embodiment of the present application is described below. The handwritten signature recognition device described below and the handwritten signature recognition method described above can be mutually referenced. Referring to Figure 2, Figure 2 is a schematic structural diagram of a handwritten signature recognition device provided by an embodiment of the present application. A handwritten signature recognition device, including:

提取模块201,用于基于待识别文件的文件格式,提取待识别文件的矢量图像对象,矢量图像对象包括手写签名的特征信息;The extraction module 201 is used to extract the vector image object of the file to be recognized based on the file format of the file to be recognized, where the vector image object includes characteristic information of the handwritten signature;

构建模块202,用于基于矢量图像对象,构建路径对象,路径对象用于表征图像的路径或轮廓;The construction module 202 is used to construct a path object based on the vector image object. The path object is used to represent the path or outline of the image;

获得模块203,用于对路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。The obtaining module 203 is used to draw a path object, crop the drawn path object, and obtain a handwritten signature picture.

本申请实施例提供的手写签名识别装置,通过基于待识别文件的文件格式,提取待识别文件的矢量图像对象,矢量图像对象包括手写签名的特征信息;基于矢量图像对象,构建路径对象,路径对象用于表征图像的路径或轮廓;对路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。本申请实施例通过提取矢量图像对象,基于矢量图像对象,构建、绘制、裁剪路径对象,得到手写签名图片,基于此,当手写签名背景有水印,或者叠加部分单据文件上有其他文字等干扰因素时,截取到的手写签名图片抗干扰性强,提高了稽核准确率以及手写签名识别的准确性。The handwritten signature recognition device provided by the embodiment of the present application extracts the vector image object of the file to be recognized based on the file format of the file to be recognized. The vector image object includes the characteristic information of the handwritten signature; based on the vector image object, a path object is constructed, and the path object Used to characterize the path or outline of an image; draw the path object and crop the drawn path object to obtain a handwritten signature image. The embodiment of this application obtains a handwritten signature picture by extracting vector image objects, constructing, drawing, and clipping path objects based on the vector image objects. Based on this, when there is a watermark on the background of the handwritten signature, or there are other interfering factors such as other text on the superimposed document document At this time, the intercepted handwritten signature picture has strong anti-interference, which improves the audit accuracy and the accuracy of handwritten signature recognition.

在一个实施例中,构建模块202用于:基于矢量图像对象的手写签名的特征信息和至少一个路径构建算子,构建路径对象。In one embodiment, the construction module 202 is configured to: construct a path object based on the feature information of the handwritten signature of the vector image object and at least one path construction operator.

在一个实施例中,获得模块203用于:采用路径绘制算子,对路径对象进行描边和填充,以将路径对象绘制在画布上;采用路径裁剪算子,对绘制后的路径对象与裁剪区域进行交叉处理,以裁剪在裁剪区域外的路径对象,得到手写签名图片。In one embodiment, the obtaining module 203 is used to: use a path drawing operator to stroke and fill the path object to draw the path object on the canvas; use a path cutting operator to combine the drawn path object with the cut The area is intersected to clip the path object outside the clipping area to obtain the handwritten signature image.

在一个实施例中,提取模块201用于:基于签名页标识,确定待识别文件的签名页;基于文件格式,识别签名页的内容;从识别得到的签名页的内容中提取矢量图像对象。In one embodiment, the extraction module 201 is configured to: determine the signature page of the file to be recognized based on the signature page identifier; identify the content of the signature page based on the file format; and extract vector image objects from the recognized content of the signature page.

在一个实施例中,提取模块201用于:基于文件格式,对所述签名页进行解析和渲染,得到签名页的内容。In one embodiment, the extraction module 201 is configured to parse and render the signature page based on the file format to obtain the content of the signature page.

在一个实施例中,提取模块201用于:从签名页的内容中提取目标元素,对目标元素进行文本处理得到目标文本;基于矢量图像对象的特征,提取目标文本中的矢量图像对象。In one embodiment, the extraction module 201 is used to: extract target elements from the content of the signature page, perform text processing on the target elements to obtain target text; and extract vector image objects in the target text based on the characteristics of the vector image objects.

在一个实施例中,获得模块203还用于:将手写签名图片转换为栅格图片,并存储栅格图片。In one embodiment, the obtaining module 203 is also configured to: convert the handwritten signature image into a raster image, and store the raster image.

图3示例了一种电子设备的实体结构示意图,如图3所示,该电子设备可以包括:处理器(processor)310、通信接口(Communication Interface)320、存储器(memory)330和通信总线340,其中,处理器310,通信接口320,存储器330通过通信总线340完成相互间的通信。处理器310可以调用存储器330中的计算机程序,以执行手写签名识别方法的步骤,例如包括:Figure 3 illustrates a schematic diagram of the physical structure of an electronic device. As shown in Figure 3, the electronic device may include: a processor (processor) 310, a communication interface (Communication Interface) 320, a memory (memory) 330 and a communication bus 340. Among them, the processor 310, the communication interface 320, and the memory 330 complete communication with each other through the communication bus 340. The processor 310 can call the computer program in the memory 330 to perform the steps of the handwritten signature recognition method, for example, including:

基于待识别文件的文件格式,提取待识别文件的矢量图像对象,矢量图像对象包括手写签名的特征信息;基于矢量图像对象,构建路径对象,路径对象用于表征图像的路径或轮廓;对路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。Based on the file format of the file to be recognized, the vector image object of the file to be recognized is extracted. The vector image object includes the characteristic information of the handwritten signature; based on the vector image object, a path object is constructed. The path object is used to represent the path or contour of the image; the path object is Draw and crop the drawn path object to obtain a handwritten signature image.

此外,上述的存储器330中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logical instructions in the memory 330 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code. .

另一方面,本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序可存储在非暂态计算机可读存储介质上,所述计算机程序被处理器执行时,计算机能够执行上述各实施例所提供的手写签名识别方法的步骤,例如包括:On the other hand, embodiments of the present application also provide a computer program product. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. The computer program is executed by a processor. When , the computer can perform the steps of the handwritten signature recognition method provided by the above embodiments, including, for example:

基于待识别文件的文件格式,提取待识别文件的矢量图像对象,矢量图像对象包括手写签名的特征信息;基于矢量图像对象,构建路径对象,路径对象用于表征图像的路径或轮廓;对路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。Based on the file format of the file to be recognized, the vector image object of the file to be recognized is extracted. The vector image object includes the characteristic information of the handwritten signature; based on the vector image object, a path object is constructed. The path object is used to represent the path or contour of the image; the path object is Draw and crop the drawn path object to obtain a handwritten signature image.

另一方面,本申请实施例还提供一种处理器可读存储介质,所述处理器可读存储介质存储有计算机程序,所述计算机程序用于使处理器执行上述各实施例提供的手写签名识别方法的步骤,例如包括:On the other hand, embodiments of the present application also provide a processor-readable storage medium that stores a computer program. The computer program is used to cause the processor to execute the handwritten signature provided in the above embodiments. The steps of the identification method include, for example:

基于待识别文件的文件格式,提取待识别文件的矢量图像对象,矢量图像对象包括手写签名的特征信息;基于矢量图像对象,构建路径对象,路径对象用于表征图像的路径或轮廓;对路径对象进行绘制,裁剪绘制后的路径对象,得到手写签名图片。Based on the file format of the file to be recognized, the vector image object of the file to be recognized is extracted. The vector image object includes the characteristic information of the handwritten signature; based on the vector image object, a path object is constructed. The path object is used to represent the path or contour of the image; the path object is Draw and crop the drawn path object to obtain a handwritten signature image.

所述处理器可读存储介质可以是处理器能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NANDFLASH)、固态硬盘(SSD))等。The processor-readable storage medium may be any available media or data storage device that the processor can access, including but not limited to magnetic storage (such as floppy disks, hard disks, tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor memories (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid state drive (SSD)), etc.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in One location, or it can be distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Persons of ordinary skill in the art can understand and implement the method without any creative effort.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the part of the above technical solution that essentially contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., including a number of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments.

最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application, but not to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent substitutions are made to some of the technical features; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions in the embodiments of the present application.

Claims (10)

1. A method of handwriting signature recognition, comprising:
extracting a vector image object of a file to be identified based on a file format of the file to be identified, wherein the vector image object comprises characteristic information of a handwriting signature;
constructing a path object based on the vector image object, wherein the path object is used for representing a path or a contour of an image;
and drawing the path object, and cutting the drawn path object to obtain a handwritten signature picture.
2. The handwritten signature recognition method according to claim 1, wherein said constructing a path object based on said vector image object comprises:
and constructing the path object based on the characteristic information of the handwritten signature of the vector image object and at least one path construction operator.
3. The method for recognizing a handwritten signature according to claim 1, wherein the drawing the path object, cutting the drawn path object to obtain a handwritten signature picture, includes:
drawing and filling the path object by adopting a path drawing operator so as to draw the path object on a canvas;
and adopting a path clipping operator to perform cross processing on the drawn path object and a clipping region so as to clip the path object outside the clipping region, thereby obtaining the handwritten signature picture.
4. The handwritten signature recognition method according to claim 1, wherein the extracting a vector image object of a file to be recognized based on a file format of the file to be recognized includes:
determining a signature page of the file to be identified based on the signature page identification;
identifying content of the signature page based on the file format;
and extracting the vector image object from the content of the signature page obtained by recognition.
5. The handwritten signature recognition method according to claim 4, wherein the recognition of the content of the signature page based on the file format includes:
and analyzing and rendering the signature page based on the file format to obtain the content of the signature page.
6. The handwritten signature recognition method according to claim 4, wherein said extracting the vector image object from the content of the signature page obtained by the recognition includes:
extracting target elements from the content of the signature page, and performing text processing on the target elements to obtain target texts;
extracting the vector image object in the target text based on the characteristics of the vector image object.
7. The method for recognizing a handwritten signature according to claim 1, wherein the steps of drawing the path object, cutting the drawn path object to obtain a handwritten signature picture, and then:
and converting the handwritten signature picture into a grid picture, and storing the grid picture.
8. A handwritten signature recognition apparatus, comprising:
the extraction module is used for extracting a vector image object of the file to be identified based on the file format of the file to be identified, wherein the vector image object comprises characteristic information of a handwriting signature;
a construction module for constructing a path object based on the vector image object, the path object being used for characterizing a path or a contour of an image;
and the obtaining module is used for drawing the path object, cutting the drawn path object, and obtaining a handwritten signature picture.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the handwritten signature recognition method according to any one of claims 1 to 7 when the program is executed.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the handwritten signature recognition method as claimed in any one of claims 1 to 7.
CN202310864798.3A 2023-07-14 2023-07-14 Handwritten signature recognition methods, devices, electronic equipment and computer program products Pending CN116959004A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310864798.3A CN116959004A (en) 2023-07-14 2023-07-14 Handwritten signature recognition methods, devices, electronic equipment and computer program products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310864798.3A CN116959004A (en) 2023-07-14 2023-07-14 Handwritten signature recognition methods, devices, electronic equipment and computer program products

Publications (1)

Publication Number Publication Date
CN116959004A true CN116959004A (en) 2023-10-27

Family

ID=88450511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310864798.3A Pending CN116959004A (en) 2023-07-14 2023-07-14 Handwritten signature recognition methods, devices, electronic equipment and computer program products

Country Status (1)

Country Link
CN (1) CN116959004A (en)

Similar Documents

Publication Publication Date Title
CN109933756B (en) Image conversion method, device, device and readable storage medium based on OCR
US8000529B2 (en) System and method for creating an editable template from a document image
US8718364B2 (en) Apparatus and method for digitizing documents with extracted region data
JP4402138B2 (en) Image processing apparatus, image processing method, and computer program
CN101452444A (en) Rapid editing and typesetting method for handwriting information and edition symbol identification method
CN110674814A (en) A picture recognition and translation method, terminal and medium
JP5439456B2 (en) Electronic comic editing apparatus, method and program
JP5439455B2 (en) Electronic comic editing apparatus, method and program
US20200226174A1 (en) Cloud-based large-scale pathological image collaborative annotation method and system
WO2013058397A1 (en) Digital comic editing device and method therefor
CN109658485B (en) Webpage animation drawing method, device, computer equipment and storage medium
WO2019041442A1 (en) Method and system for structural extraction of figure data, electronic device, and computer readable storage medium
CN111461070A (en) Text recognition method, device, electronic device and storage medium
US9384562B2 (en) Methods for visual content processing, and systems and computer program codes thereto
CN113887375A (en) Text recognition method, device, equipment and storage medium
CN111986292A (en) Layer restoration method, apparatus, computer-readable storage medium and computer device
CN113870196A (en) Image processing method, device, equipment and medium based on anchor point cutting graph
KR102598210B1 (en) Drawing information recognition method of engineering drawings, drawing information recognition system, computer program therefor
CN119597182A (en) Text selection method, device, electronic device and computer-readable storage medium
JP7447614B2 (en) information processing equipment
CN115019324A (en) Interactive method, device, computer device and storage medium for text scanning
CN116959004A (en) Handwritten signature recognition methods, devices, electronic equipment and computer program products
US11914567B2 (en) Text-based machine learning extraction of table data from a read-only document
JP5197694B2 (en) Image processing apparatus, image processing method, and computer program
CN101833411B (en) For the method and apparatus of person's handwriting input

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination