WO2020082577A1 - Seal anti-counterfeiting verification method, device, and computer readable storage medium - Google Patents
Seal anti-counterfeiting verification method, device, and computer readable storage medium Download PDFInfo
- Publication number
- WO2020082577A1 WO2020082577A1 PCT/CN2018/123591 CN2018123591W WO2020082577A1 WO 2020082577 A1 WO2020082577 A1 WO 2020082577A1 CN 2018123591 W CN2018123591 W CN 2018123591W WO 2020082577 A1 WO2020082577 A1 WO 2020082577A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- feature
- seal
- image
- seal image
- feature points
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
- G06V10/443—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
Definitions
- the present application relates to the field of image recognition technology, and in particular, to a seal anti-counterfeiting inspection method and device based on key feature point detection and comparison, and a computer-readable storage medium.
- the seal is an important certificate that proves the identity of the party and government organs, enterprises, social organizations and other unit organizations, represents their rights and interests, and has legal effect. It is an important means for the state to exercise power, manage society, and citizens and legal persons to exercise civil rights. It plays an extremely important role in social, political and economic life. Due to the current backward technical means in seal management, seal anti-counterfeiting, and identification of counterfeit seals, driven by huge economic interests, criminals have furiously forged administrative agencies, law enforcement departments, financial institutions, enterprises, institutions and legal persons at all levels. The seal has caused serious economic losses to the state, collectives and individuals.
- the present application provides a seal anti-counterfeiting inspection method, device and computer-readable storage medium, and its main purpose is to accurately and quickly detect the authenticity of the seal.
- a seal anti-counterfeiting inspection method includes:
- the number of matching feature points in the feature image of the seal image to be tested and the reference seal image is counted, and the authenticity of the seal image to be tested is verified according to the number of matching feature points.
- the present application also provides a seal anti-counterfeiting inspection device, which includes a memory and a processor, and the memory stores a seal anti-counterfeiting inspection program that can run on the processor, and the seal anti-counterfeiting When the verification program is executed by the processor, the following steps are implemented:
- the number of matching feature points in the feature image of the seal image to be tested and the reference seal image is counted, and the authenticity of the seal image to be tested is verified according to the number of matching feature points.
- the present application also provides a computer-readable storage medium on which a seal anti-counterfeiting verification program is stored, which can be executed by one or more processors, In order to realize the steps of the seal anti-counterfeiting inspection method as described above.
- the method, device and computer-readable storage medium for seal anti-counterfeiting inspection proposed in this application establish a reference database of feature points of reference seal images; extract seal images to be checked from documents; extract feature points of seal images to be checked; and seals to be checked
- the feature points of the image are matched with the feature points of the reference seal image in the reference database to obtain the matched feature points; and the number of feature points matching the feature points of the seal image to be checked and the feature points of the reference seal image is calculated according to The number of matching feature points verifies the authenticity of the seal image to be verified.
- This application can accurately and quickly detect the authenticity of the seal.
- FIG. 1 is a schematic flowchart of a seal anti-counterfeiting inspection method provided by an embodiment of the present application
- FIG. 2 is a schematic diagram of an internal structure of a seal anti-counterfeiting inspection device provided by an embodiment of the present application
- FIG. 3 is a schematic diagram of modules of a seal anti-counterfeiting inspection program in a seal anti-counterfeiting inspection device provided by an embodiment of the present application.
- FIG. 1 it is a schematic flowchart of a seal anti-counterfeiting inspection method provided by an embodiment of the present application.
- the method may be executed by an apparatus, and the apparatus may be implemented by software and / or hardware.
- the seal anti-counterfeiting inspection method includes:
- the preferred embodiment of the present application acquires the seal image of the real seal as an image of the reference seal through an image acquisition device such as a camera, a scanner, a CCD camera, and gives each reference seal image a fixed ID, which corresponds to a specific real seal .
- an image acquisition device such as a camera, a scanner, a CCD camera
- a feature point extraction method is used to extract feature points in the reference seal image, and data such as position information and descriptor information of the feature points contained in the reference seal image are stored in the reference database.
- SIFT Scale Invariant Feature Transform
- the SIFT operator is an operator with better performance in the image matching algorithm, and the feature image registration based on the SIFT algorithm can be roughly divided into feature detection, description, and matching.
- Feature detection is performed in scale space. First, the image scale space is generated, and then the local extremum values in the scale space are detected, and then the local extremum points are accurately located by excluding low-contrast points and edge response points; When calculating the principal direction of each extremum point, the main direction of the extremum point and the histogram gradient direction of the area with the extreme point as the center are calculated to generate the feature point descriptor; the feature point descriptor can be used to find the match Features to establish connections between images.
- SIFT feature detection mainly includes the following four basic steps: 1. Scale space extreme value detection: search for image positions on all scales. Gaussian differential functions are used to identify potential candidate points that are invariant to scale and rotation. 2. Feature point positioning: at each candidate position, a precise model is used to determine the position and scale. The selection of feature points depends on their stability. 3. Direction determination: Based on the local gradient direction of the image, one or more directions are assigned to each feature point location. All subsequent operations on image data are transformed with respect to the direction, scale, and position of the feature points, thereby providing invariance to these transformations. 4. Feature point description: In the neighborhood around each feature point, measure the local gradient of the image at the selected scale.
- the steps of extracting the seal image to be inspected include:
- Substep 1 Separate the feature data of the preset color from the document.
- the three components R, G, and B in the RGB space represent the mixed amounts of red, green, and blue, respectively.
- the red R value that is, the red component must be relatively large, in fact, the RGB value of the standard red in RGB space is (255,0,0), but a large R value does not mean that the color is close to red .
- the size of G value and B value will have a significant effect on the color, for example (255,255,0) represents yellow, and (255,0,255) represents purple. It can be seen from this that when the R value is large and the G and B values are small, the corresponding color is closer to red.
- this solution calculates the difference RG of the R component and the G component of a pixel, and the difference RB of the R component and the B component, when both the difference RG and the difference RB are greater than the corresponding preset threshold To determine that the pixel is red.
- H, S, and V in HSV space represent hue, saturation, and intensity, respectively.
- the description of colors in the HSV space is closer to humans ’understanding of colors: H is the hue, and the phase of the color is expressed in the form of angle values, from 0 ° to 360 °, which indicates the transition from red to green to blue and back to red, S Represents the fill ratio of the color under the corresponding hue, taking 0-100%, V represents the brightness, or light intensity, taking 0-100%.
- the change in red is mainly affected by the light collected by the image (corresponding to the brightness V) and the wear of the paper itself (corresponding to the saturation S), so the value of H can better describe the "color" difference in the general sense .
- this solution calculates the H value of a pixel, and when the H value of the pixel is less than the corresponding preset threshold, it is determined that the pixel is red.
- YCbCr space is not an absolute color space, but an encoding of RGB space.
- the encoding rules are as follows:
- each component of the YCbCr space is still meaningful, Y represents the grayscale of the pixel, and Cb and Cr represent the blue and red density offset components of the pixel, respectively.
- an angle ⁇ between a vector mapped on the CbCr plane and the Cr axis can be used to describe the color of the pixel.
- the effect is similar to H in HSV, but the distribution of H is not the same. among them:
- Sub-step 2 According to the characteristic data of the preset color, the seal image is separated by a double-threshold color separation method.
- this scheme uses the k-means clustering method. Assuming that the ⁇ value in the YCbCr space is used as the color description method, the image is divided into clusters according to the ⁇ value of each pixel. To obtain the upper and lower bounds of the ⁇ value of the cluster to which the seal color belongs [a, b].
- the color of the seal edge tends to be closer to the background color, which means that the color of this part may be very close to the color of part of the noise and it is considered to be removed by noise, so this scheme adopts the double threshold method, based on k-means aggregation
- the value range is first narrowed, and a strict threshold is used to obtain the pixels that absolutely belong to the seal, and the set of pixel points of the seal is formed, and then the value range is expanded to adopt a more relaxed Threshold range to determine whether the adjacent points of each point in the seal pixel set belong to the seal, so as to supplement the seal pixel set and ensure the integrity of the seal image.
- Sub-step 3. Perform contour detection of the seal image, and cut out the seal image according to the detected contour.
- the outline detection of the seal includes any one of the following methods or a combination of several methods:
- Edge detection This solution uses the Canny edge detection algorithm based on Sobel operator. This method can detect the edge of the seal well, and the gradient value of the edge point can be obtained through Sobel operator.
- Random Hough transform detects ellipse. Random Hough transform can effectively detect ellipse, find the position of the ellipse and draw a more accurate ellipse outline, but its mechanism of randomly taking points causes it to be easily disturbed by noise , Easy to appear after reaching the maximum number of cycles still can not find any ellipse results. In addition, its ellipse parameter calculation method also makes it impossible to calculate a very accurate ellipse equation.
- Direct least square fitting of ellipse is an optimized method of ellipse detection. It uses a set of sampling point data to solve unknown parameters in elliptic equations by algebraic method. The key problem to solve with the least square method is the selection of sample points, so other methods need to be combined to obtain better samples.
- SIFT Scale Invariant Feature Transform
- Feature points have two types of descriptors such as feature vector and feature matrix.
- this scheme uses the Euclidean distance evaluation method for feature point matching:
- the two corresponding feature vectors with the smallest Euclidean distance are the matching feature vectors, and the corresponding reference stamp image feature points are the matching feature points.
- the feature matrix of feature points is used as the feature descriptor of feature points. Since such feature matrices are generally positive definite matrices, this solution uses the following methods to perform feature point matching:
- n the number of rows and columns of the feature matrix
- ⁇ distance between the two feature matrices is:
- V i ref and V j recg are two covariance matrices, and ⁇ (V i ref , V j recg ) represents their evaluation distance.
- x k ⁇ 0 is the generalized eigenvector of V i ref and V j recg
- n is the dimension of the generalized eigenvector.
- the two corresponding feature vectors with the smallest distance ⁇ (V i ref , V j recg ) are matching feature vectors, and the corresponding feature points of the reference seal image and the feature image of the seal image to be tested are matching feature points.
- the feature points of the reference seal image [P 1 P 2 ... P n ] and the feature points of the seal image to be tested [P 1 ′ P 2 ′... P n ′], where n represents the number of matching feature points.
- the above formula indicates that the reference image feature point P 1 corresponds to the whole point P 1 ′ of the image to be inspected, P 2 corresponds to P 2 ′, and so on.
- the present application also provides a seal anti-counterfeiting inspection device.
- FIG. 2 it is a schematic diagram of an internal structure of a seal anti-counterfeiting inspection device provided by an embodiment of the present application.
- the seal anti-counterfeiting inspection device 1 may be a PC (Personal Computer), a terminal device such as a smart phone, tablet computer, or portable computer, or a server or server cluster.
- the seal anti-counterfeiting verification device 1 includes at least a memory 11, a processor 12, a communication bus 13, and a network interface 14.
- the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like.
- the memory 11 may be an internal storage unit of the seal anti-counterfeiting verification device 1, such as a hard disk of the seal anti-counterfeiting verification device 1.
- the memory 11 may also be an external storage device of the seal anti-counterfeiting inspection device 1, for example, a plug-in hard disk equipped on the seal anti-counterfeiting inspection device 1, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc. Further, the memory 11 may also include both the internal storage unit of the seal anti-counterfeiting verification device 1 and the external storage device. The memory 11 can be used not only to store application software and various types of data installed in the seal anti-counterfeiting inspection device 1, such as codes of the seal anti-counterfeiting inspection program 01, but also to temporarily store data that has been output or is about to be output.
- the processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip for running the program code or processing stored in the memory 11 Data, for example, the execution of the seal anti-counterfeiting inspection program 01.
- CPU central processing unit
- controller microcontroller
- microprocessor or other data processing chip for running the program code or processing stored in the memory 11 Data, for example, the execution of the seal anti-counterfeiting inspection program 01.
- the communication bus 13 is used to realize connection and communication between these components.
- the network interface 14 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the device 1 and other electronic devices.
- the device 1 may further include a user interface.
- the user interface may include a display and an input unit such as a keyboard.
- the optional user interface may also include a standard wired interface and a wireless interface.
- the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light emitting diode) touch device, or the like.
- the display may also be appropriately referred to as a display screen or a display unit for displaying information processed in the seal anti-counterfeiting inspection device 1 and for displaying a visual user interface.
- FIG. 2 only shows the seal anti-counterfeiting inspection device 1 having the components 11-14 and the seal anti-counterfeiting inspection program 01.
- FIG. 2 May include fewer or more components than shown, or combine certain components, or different component arrangements.
- the seal anti-counterfeit verification program 01 is stored in the memory 11; the processor 12 implements the following steps when executing the seal anti-counterfeit verification program 01 stored in the memory 11:
- Step 1 Establish a reference database for the feature points of the reference stamp image.
- the preferred embodiment of the present application acquires the seal image of the real seal as an image of the reference seal through an image acquisition device such as a camera, a scanner, a CCD camera, and gives each reference seal image a fixed ID, which corresponds to a specific real seal .
- an image acquisition device such as a camera, a scanner, a CCD camera
- a feature point extraction method is used to extract feature points in the reference seal image, and data such as position information and descriptor information of the feature points contained in the reference seal image are stored in the reference database.
- SIFT Scale Invariant Feature Transform
- the SIFT operator is an operator with better performance in the image matching algorithm, and feature image registration based on the SIFT algorithm can be roughly divided into feature detection, description, and matching.
- Feature detection is performed in scale space. First, the image scale space is generated, and then the local extremum values in the scale space are detected, and then the local extremum points are accurately located by excluding low-contrast points and edge response points; When calculating the principal direction of each extremum point, the main direction of the extremum point and the histogram gradient direction of the area with the extreme point as the center are calculated to generate the feature point descriptor; the feature point descriptor can be used to find the match Features to establish connections between images.
- SIFT feature detection mainly includes the following four basic steps: 1. Scale space extreme value detection: search for image positions on all scales. Gaussian differential functions are used to identify potential candidate points that are invariant to scale and rotation. 2. Feature point positioning: at each candidate position, a precise model is used to determine the position and scale. The selection of feature points depends on their stability. 3. Direction determination: Based on the local gradient direction of the image, one or more directions are assigned to each feature point location. All subsequent operations on image data are transformed with respect to the direction, scale, and position of the feature points, thereby providing invariance to these transformations. 4. Feature point description: In the neighborhood around each feature point, measure the local gradient of the image at the selected scale.
- Step 2 Extract the seal image to be checked from the document.
- the process of extracting the seal image to be inspected includes:
- the three components R, G, and B in the RGB space represent the mixed amounts of red, green, and blue, respectively.
- the red R value that is, the red component must be relatively large, in fact, the RGB value of the standard red in RGB space is (255,0,0), but a large R value does not mean that the color is close to red .
- the size of G value and B value will have a significant effect on the color, for example (255,255,0) represents yellow, and (255,0,255) represents purple. It can be seen from this that when the R value is large and the G and B values are small, the corresponding color is closer to red.
- this solution calculates the difference RG of the R component and the G component of a pixel, and the difference RB of the R component and the B component, when both the difference RG and the difference RB are greater than the corresponding preset threshold To determine that the pixel is red.
- H, S, and V in HSV space represent hue, saturation, and intensity, respectively.
- the description of colors in the HSV space is closer to humans ’understanding of colors: H is the hue, and the phase of the color is expressed in the form of angle values, from 0 ° to 360 °, which indicates the transition from red to green to blue and back to red, S Represents the fill ratio of the color under the corresponding hue, taking 0-100%, V represents the brightness, or light intensity, taking 0-100%.
- the change in red is mainly affected by the light collected by the image (corresponding to the brightness V) and the wear of the paper itself (corresponding to the saturation S), so the value of H can better describe the "color" difference in the general sense .
- this solution calculates the H value of a pixel, and when the H value of the pixel is less than the corresponding preset threshold, it is determined that the pixel is red. (3) YCbCr space-deflection angle ⁇ .
- YCbCr space is not an absolute color space, but an encoding of RGB space.
- the encoding rules are as follows:
- each component of the YCbCr space is still meaningful, Y represents the grayscale of the pixel, and Cb and Cr represent the blue and red density offset components of the pixel, respectively.
- an angle ⁇ between a vector mapped on the CbCr plane and the Cr axis can be used to describe the color of the pixel.
- the effect is similar to H in HSV, but the distribution of H is not the same. among them:
- the seal image is separated by a double threshold color separation method.
- this scheme uses the k-means clustering method. Assuming that the ⁇ value in the YCbCr space is used as the color description method, the image is divided into clusters according to the ⁇ value of each pixel. To obtain the upper and lower bounds of the ⁇ value of the cluster to which the seal color belongs [a, b].
- the color of the seal edge tends to be closer to the background color, which means that the color of this part may be very close to the color of part of the noise and it is considered to be removed by noise, so this scheme adopts the double threshold method, based on k-means aggregation
- the value range is first narrowed, and a strict threshold is used to obtain the pixels that absolutely belong to the seal, and the set of pixel points of the seal is formed, and then the value range is expanded to adopt a more relaxed Threshold range to determine whether the adjacent points of each point in the seal pixel set belong to the seal, so as to supplement the seal pixel set and ensure the integrity of the seal image.
- the outline detection of the seal includes any one of the following methods or a combination of several methods:
- Edge detection This solution uses the Canny edge detection algorithm based on Sobel operator. This method can detect the edge of the seal well, and the gradient value of the edge point can be obtained through Sobel operator.
- Random Hough transform detects ellipse. Random Hough transform can effectively detect ellipse, find the position of the ellipse and draw a more accurate ellipse outline, but its mechanism of randomly taking points makes it very susceptible to noise. Interference, easy to appear after reaching the maximum number of cycles and still can not find any elliptical results. In addition, its ellipse parameter calculation method also makes it impossible to calculate a very accurate ellipse equation.
- Direct least squares fitting of ellipse is an optimized method of ellipse detection. It uses a set of sampling point data to solve unknown parameters in the elliptic equation by algebraic method. The key problem to solve with the least square method is the selection of sample points, so other methods need to be combined to obtain better samples.
- Step 3 Extract the feature points of the seal image to be checked.
- SIFT Scale Invariant Feature Transform
- Step 4 Match the feature points of the seal image to be tested with the reference seal image feature point reference database to obtain matching feature points.
- Feature points have two types of descriptors such as feature vector and feature matrix.
- this scheme uses the Euclidean distance evaluation method for feature point matching:
- the two corresponding feature vectors with the smallest Euclidean distance are matching feature vectors
- the corresponding reference stamp image feature points are matching feature points.
- the feature matrix of feature points is used as the feature descriptor of feature points. Since such feature matrices are generally positive definite matrices, this solution uses the following methods to perform feature point matching:
- n the number of rows and columns of the feature matrix
- ⁇ distance between the two feature matrices is:
- V i ref and V j recg are two covariance matrices, and ⁇ (V i ref , V j recg ) represents their evaluation distance.
- the two corresponding feature vectors with the smallest distance between ⁇ (V i ref and V j recg ) are the matching feature vectors, and the corresponding feature points of the reference seal image and the feature image points of the seal image to be tested are matching feature points.
- the feature points of the reference seal image [P 1 P 2 ... 2 n ] and the feature points of the seal image to be tested [P 1 ′ P 2 ′... P n ′], where n represents the number of matching feature points.
- the above formula indicates that the reference image feature point P 1 corresponds to the whole point P 1 ′ of the image to be inspected, P 2 corresponds to P 2 ′, and so on.
- Step 5 Count the number of matching feature points in the feature image of the seal image to be checked and the reference seal image, and verify the authenticity of the seal image to be checked according to the number of matching feature points.
- the seal anti-counterfeiting verification program may also be divided into one or more modules, and the one or more modules are stored in the memory 11 and are processed by one or more processors (this embodiment is The processor 12) is executed to complete this application.
- the module referred to in this application refers to a series of computer program instruction segments capable of performing specific functions, and is used to describe the execution process of the seal anti-counterfeiting verification program in the seal anti-counterfeiting verification device.
- FIG. 3 it is a schematic diagram of a program module of a seal anti-counterfeiting inspection program in an embodiment of a seal anti-counterfeiting inspection device of the present application.
- the module 20, the feature point extraction module 30, the feature point matching module 40 and the seal verification module 50 exemplarily:
- the reference database creation 10 is used to: establish a reference database of feature points of reference seal images
- the seal image extraction module 20 is used to: extract the seal image to be checked from the document;
- the feature point extraction module 30 is used to: extract the feature points of the seal image to be checked;
- the feature point matching module 40 is used to: match the feature points of the seal image to be inspected with the reference seal image feature point reference database to obtain matching feature points;
- the seal verification module 50 is used to count the number of matching feature points in the feature points of the seal image to be verified and the reference seal image feature points, and verify the trueness of the seal image to be verified according to the number of matching feature points Pseudo.
- the above reference database establishment 10 the seal image extraction module 20, the feature point extraction module 30, the feature point matching module 40, and the seal verification module 50, etc., when the program modules are executed, the functions or operation steps are substantially the same as those in the above embodiment, here No longer.
- embodiments of the present application also provide a computer-readable storage medium having a seal anti-counterfeit verification program stored on the computer-readable storage medium, which may be executed by one or more processors to implement the following operating:
- the number of matching feature points in the feature image of the seal image to be tested and the reference seal image is counted, and the authenticity of the seal image to be tested is verified according to the number of matching feature points.
- the methods in the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation.
- the technical solution of the present application can be embodied in the form of a software product in essence or part that contributes to the existing technology, and the computer software product is stored in a storage medium (such as ROM / RAM) as described above , Magnetic disks, optical disks), including several instructions to enable a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to perform the method described in each embodiment of the present application.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Collating Specific Patterns (AREA)
Abstract
Description
本申请要求于2018年10月26日提交中国专利局,申请号为201811256366.X、发明名称为“印章防伪检验方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the China Patent Office on October 26, 2018 with the application number 201811256366.X and the invention titled "Seal Anti-counterfeiting Inspection Method, Device, and Computer-readable Storage Medium", all of its contents Incorporated by reference in this application.
本申请涉及图像识别技术领域,尤其涉及一种基于关键特征点检测比较的印章防伪检验方法、装置及计算机可读存储介质。The present application relates to the field of image recognition technology, and in particular, to a seal anti-counterfeiting inspection method and device based on key feature point detection and comparison, and a computer-readable storage medium.
在我国,印章是证明党政机关、企事业、社会团体等单位组织的身份,代表其权益、具有法律效力的重要凭证。是国家行使权力、对社会进行管理,以及公民、法人行使民事权利的重要手段。它在社会政治、经济生活中起着极其重要的作用。由于当前我国在印章管理,印章防伪,以及伪造印章识别等方面技术手段落后,在巨大经济利益的驱使下,犯罪分子大肆伪造各级行政机关、执法部门、金融机构,以及企事业单位和法人的印章,给国家、集体和个人造成了严重的经济损失。每年两会期间,都有人大代表呼吁尽快完善国家统一的印章管理机制,加快印章制作防伪技术,以及伪造印章识别技术的研究,三管齐下,有效打击伪造印章的犯罪活动。In China, the seal is an important certificate that proves the identity of the party and government organs, enterprises, social organizations and other unit organizations, represents their rights and interests, and has legal effect. It is an important means for the state to exercise power, manage society, and citizens and legal persons to exercise civil rights. It plays an extremely important role in social, political and economic life. Due to the current backward technical means in seal management, seal anti-counterfeiting, and identification of counterfeit seals, driven by huge economic interests, criminals have furiously forged administrative agencies, law enforcement departments, financial institutions, enterprises, institutions and legal persons at all levels. The seal has caused serious economic losses to the state, collectives and individuals. During the two sessions each year, deputies to the National People's Congress called for the improvement of the national unified seal management mechanism as soon as possible, speeding up the production of seal anti-counterfeiting technology, and the study of counterfeit seal identification technology, and three-pronged measures to effectively combat the criminal activities of counterfeit seals.
发明内容Summary of the invention
本申请提供一种印章防伪检验方法、装置及计算机可读存储介质,其主要目的在于准确、快速地对印章的真伪进行检测。The present application provides a seal anti-counterfeiting inspection method, device and computer-readable storage medium, and its main purpose is to accurately and quickly detect the authenticity of the seal.
为实现上述目的,本申请提供的一种印章防伪检验方法,包括:To achieve the above purpose, a seal anti-counterfeiting inspection method provided by this application includes:
建立参考印章图像的特征点参考数据库;Establish a reference database of feature points that refer to the seal image;
从文档中提取待检验的印章图像;Extract the seal image to be checked from the document;
提取待检验的印章图像的特征点;Extract the feature points of the seal image to be checked;
将待检验印章图像的特征点与参考数据库中的参考印章图像特征点进行匹配,以获得相匹配的特征点;及Matching the feature points of the seal image to be inspected with the reference seal image feature points in the reference database to obtain matching feature points; and
统计待检验印章图像的特征点与参考印章图像特征点中相匹配的特征点的数量,根据所述相匹配的特征点的数量,检验所述待检验印章图像的真伪。The number of matching feature points in the feature image of the seal image to be tested and the reference seal image is counted, and the authenticity of the seal image to be tested is verified according to the number of matching feature points.
此外,为实现上述目的,本申请还提供一种印章防伪检验装置,该装置包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的印章防伪检验程序,所述印章防伪检验程序被所述处理器执行时实现如下步骤:In addition, in order to achieve the above object, the present application also provides a seal anti-counterfeiting inspection device, which includes a memory and a processor, and the memory stores a seal anti-counterfeiting inspection program that can run on the processor, and the seal anti-counterfeiting When the verification program is executed by the processor, the following steps are implemented:
建立参考印章图像的特征点参考数据库;Establish a reference database of feature points that refer to the seal image;
从文档中提取待检验的印章图像;Extract the seal image to be checked from the document;
提取待检验的印章图像的特征点;Extract the feature points of the seal image to be checked;
将待检验印章图像的特征点与参考数据库中的参考印章图像特征点进行 匹配,以获得相匹配的特征点;及Matching the feature points of the seal image to be checked with the reference seal image feature points in the reference database to obtain matching feature points; and
统计待检验印章图像的特征点与参考印章图像特征点中相匹配的特征点的数量,根据所述相匹配的特征点的数量,检验所述待检验印章图像的真伪。The number of matching feature points in the feature image of the seal image to be tested and the reference seal image is counted, and the authenticity of the seal image to be tested is verified according to the number of matching feature points.
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有印章防伪检验程序,所述印章防伪检验程序可被一个或者多个处理器执行,以实现如上所述的印章防伪检验方法的步骤。In addition, in order to achieve the above object, the present application also provides a computer-readable storage medium on which a seal anti-counterfeiting verification program is stored, which can be executed by one or more processors, In order to realize the steps of the seal anti-counterfeiting inspection method as described above.
本申请提出的印章防伪检验方法、装置及计算机可读存储介质建立参考印章图像的特征点参考数据库;从文档中提取待检验的印章图像;提取待检验的印章图像的特征点;将待检验印章图像的特征点与参考数据库中的参考印章图像特征点进行匹配,以获得相匹配的特征点;及统计待检验印章图像的特征点与参考印章图像特征点中相匹配的特征点的数量,根据所述相匹配的特征点的数量,检验所述待检验印章图像的真伪。本申请可以准确、快速地对印章的真伪进行检测。The method, device and computer-readable storage medium for seal anti-counterfeiting inspection proposed in this application establish a reference database of feature points of reference seal images; extract seal images to be checked from documents; extract feature points of seal images to be checked; and seals to be checked The feature points of the image are matched with the feature points of the reference seal image in the reference database to obtain the matched feature points; and the number of feature points matching the feature points of the seal image to be checked and the feature points of the reference seal image is calculated according to The number of matching feature points verifies the authenticity of the seal image to be verified. This application can accurately and quickly detect the authenticity of the seal.
图1为本申请一实施例提供的印章防伪检验方法的流程示意图;FIG. 1 is a schematic flowchart of a seal anti-counterfeiting inspection method provided by an embodiment of the present application;
图2为本申请一实施例提供的印章防伪检验装置的内部结构示意图;2 is a schematic diagram of an internal structure of a seal anti-counterfeiting inspection device provided by an embodiment of the present application;
图3为本申请一实施例提供的印章防伪检验装置中印章防伪检验程序的模块示意图。FIG. 3 is a schematic diagram of modules of a seal anti-counterfeiting inspection program in a seal anti-counterfeiting inspection device provided by an embodiment of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional characteristics and advantages of the present application will be further described in conjunction with the embodiments and with reference to the drawings.
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
本申请提供一种印章防伪检验方法。参照图1所示,为本申请一实施例提供的印章防伪检验方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。This application provides a seal anti-counterfeiting inspection method. Referring to FIG. 1, it is a schematic flowchart of a seal anti-counterfeiting inspection method provided by an embodiment of the present application. The method may be executed by an apparatus, and the apparatus may be implemented by software and / or hardware.
在本实施例中,印章防伪检验方法包括:In this embodiment, the seal anti-counterfeiting inspection method includes:
S10、建立参考印章图像的特征点参考数据库。S10. Establish a reference database for the feature points of the reference stamp image.
本申请较佳实施例通过照相机、扫描仪、CCD摄像头等图像获取装置获取真实印章的印章图像作为参考印章图像,并赋予每个参考印章图像一个固定的ID,该ID与特定的真实印章相对应。The preferred embodiment of the present application acquires the seal image of the real seal as an image of the reference seal through an image acquisition device such as a camera, a scanner, a CCD camera, and gives each reference seal image a fixed ID, which corresponds to a specific real seal .
利用特征点提取方法提取所述参考印章图像中的特征点,并将所述参考印章图像中包含的特征点的位置信息以及描述符信息等数据存储在参考数据库中。A feature point extraction method is used to extract feature points in the reference seal image, and data such as position information and descriptor information of the feature points contained in the reference seal image are stored in the reference database.
本提案中所使用到的特征点提取方法是SIFT(Scale Invariant Feature Transform)算法。The feature point extraction method used in this proposal is SIFT (Scale Invariant Feature Transform) algorithm.
所述SIFT算子是图像匹配算法中性能较好的算子,基于SIFT算法的特 征图像配准可大致分为特征的检测、描述和匹配。特征检测是在尺度空间中进行的,首先生成图像尺度空间,然后检测尺度空间中的局部极点值,再通过剔除低对比度点和边缘响应点对局部极值点进行精确定位;在对特征进行描述时,先计算每个极值点的主方向,对极值点的主方向,对极值点为中心的区域进行直方图梯度方向统计,生成特征点描述符;通过特征点描述符可以寻找匹配特征,建立图像之间的联系。The SIFT operator is an operator with better performance in the image matching algorithm, and the feature image registration based on the SIFT algorithm can be roughly divided into feature detection, description, and matching. Feature detection is performed in scale space. First, the image scale space is generated, and then the local extremum values in the scale space are detected, and then the local extremum points are accurately located by excluding low-contrast points and edge response points; When calculating the principal direction of each extremum point, the main direction of the extremum point and the histogram gradient direction of the area with the extreme point as the center are calculated to generate the feature point descriptor; the feature point descriptor can be used to find the match Features to establish connections between images.
SIFT特征检测主要包括以下4个基本步骤:1.尺度空间极值检测:搜索所有尺度上的图像位置。通过高斯微分函数来识别潜在的对于尺度和旋转不变的候选点。2.特征点定位:在每个候选的位置上,通过一个拟合精细的模型来确定位置和尺度。特征点的选择依据于它们的稳定程度。3.方向确定:基于图像局部的梯度方向,分配给每个特征点位置一个或多个方向。所有后面的对图像数据的操作都相对于特征点的方向、尺度和位置进行变换,从而提供对于这些变换的不变性。4.特征点描述:在每个特征点周围的邻域内,在选定的尺度上测量图像局部的梯度。这些梯度被变换成一种表示,这种表示允许比较大的局部形状的变形和光照变化。在特征点描述中,以特征点为中心取16×16的邻域作为采样窗口,将采样点与特征点的相对方向通过高斯加权后归入包含8个bin的方向直方图,最后获得4×4×8的128维特征点描述符。SIFT feature detection mainly includes the following four basic steps: 1. Scale space extreme value detection: search for image positions on all scales. Gaussian differential functions are used to identify potential candidate points that are invariant to scale and rotation. 2. Feature point positioning: at each candidate position, a precise model is used to determine the position and scale. The selection of feature points depends on their stability. 3. Direction determination: Based on the local gradient direction of the image, one or more directions are assigned to each feature point location. All subsequent operations on image data are transformed with respect to the direction, scale, and position of the feature points, thereby providing invariance to these transformations. 4. Feature point description: In the neighborhood around each feature point, measure the local gradient of the image at the selected scale. These gradients are transformed into a representation that allows larger local shape deformations and light changes. In the description of feature points, the neighborhood of 16 × 16 is taken as the sampling window with the feature point as the center, and the relative direction of the sample point and the feature point is weighted by Gaussian into a direction histogram containing 8 bins, and finally 4 × 4 × 8 128-dimensional feature point descriptor.
S20、从文档中提取待检验的印章图像。S20. Extract the seal image to be checked from the document.
本申请较佳实施例中,提取待检验的印章图像的步骤包括:In the preferred embodiment of the present application, the steps of extracting the seal image to be inspected include:
子步骤1、从所述文档中分离出预设颜色的特征数据。
应该了解,大部分的印章都是红色,因此,本实施例以红色为例。It should be understood that most of the seals are red, so this embodiment uses red as an example.
为突出红色与其他颜色在数值上的差异,本方案根据不同色彩空间表达颜色的特点,提出了三种描述颜色的方式,它们分别是:In order to highlight the difference in value between red and other colors, this scheme proposes three ways to describe colors according to the characteristics of colors expressed in different color spaces. They are:
(1)RGB空间的R-G、R-B差值。(1) R-G, R-B difference in RGB space.
RGB空间的三个分量R、G、B分别表示红色、绿色、蓝色的混合量。直观地来讲,红色的R值,即红色分量一定是比较大的,实际上RGB空间中标准红色的RGB值为(255,0,0),但是R值大并不代表该颜色就接近红色,G值和B值的大小会对颜色产生明显的影响,例如(255,255,0)就代表黄色,而(255,0,255)则代表紫色。由此可以看出,R值较大同时G值和B值较小时,对应的颜色越接近红色。The three components R, G, and B in the RGB space represent the mixed amounts of red, green, and blue, respectively. Intuitively speaking, the red R value, that is, the red component must be relatively large, in fact, the RGB value of the standard red in RGB space is (255,0,0), but a large R value does not mean that the color is close to red , The size of G value and B value will have a significant effect on the color, for example (255,255,0) represents yellow, and (255,0,255) represents purple. It can be seen from this that when the R value is large and the G and B values are small, the corresponding color is closer to red.
于是相应的,本方案计算一个像素点的R分量与G分量的差值R-G,以及R分量与B分量的差值R-B,当所述差值R-G与差值R-B均大于对应的预设阈值时,判定所述像素点为红色。Correspondingly, this solution calculates the difference RG of the R component and the G component of a pixel, and the difference RB of the R component and the B component, when both the difference RG and the difference RB are greater than the corresponding preset threshold To determine that the pixel is red.
(2)HSV空间的H值。(2) H value of HSV space.
HSV空间中的H、S、V分别代表色相、饱和度和强度。HSV空间对颜色的描述更接近人类对颜色的认识:H即色相,用角度值的形式表示颜色的相位,从0°到360°表示红色到绿色到蓝色再回到红色的渐变过程,S表示对应色相下颜色的填充比例,取0-100%,V表示亮度,或者说光强度,取0-100%。 对于印章来说,其红色的变化主要受到图像采集光线(对应亮度V)和纸张本身磨损(对应饱和度S)的影响,因而H的取值能够较好地描述一般意义上的“颜色”差异。H, S, and V in HSV space represent hue, saturation, and intensity, respectively. The description of colors in the HSV space is closer to humans ’understanding of colors: H is the hue, and the phase of the color is expressed in the form of angle values, from 0 ° to 360 °, which indicates the transition from red to green to blue and back to red, S Represents the fill ratio of the color under the corresponding hue, taking 0-100%, V represents the brightness, or light intensity, taking 0-100%. For the seal, the change in red is mainly affected by the light collected by the image (corresponding to the brightness V) and the wear of the paper itself (corresponding to the saturation S), so the value of H can better describe the "color" difference in the general sense .
因此,本方案计算一个像素点的H值,当所述像素点的H值小于对应的预设阈值时,判定所述像素点为红色。Therefore, this solution calculates the H value of a pixel, and when the H value of the pixel is less than the corresponding preset threshold, it is determined that the pixel is red.
(3)YCbCr空间的偏转角θ。(3) YCbCr space deflection angle θ.
YCbCr空间不是一种绝对的色彩空间,而是一种对RGB空间的编码,其编码规则如下:YCbCr space is not an absolute color space, but an encoding of RGB space. The encoding rules are as follows:
实际上,YCbCr空间的各个分量依然是有意义的,Y代表像素点的灰度,Cb和Cr分别代表像素点的蓝色和红色的浓度偏移量成分。本方案可以选取一种颜色映射到CbCr平面上的向量与Cr轴之间的夹角θ来描述像素点的颜色,其效果与HSV中的H类似,但是与H的分布情况不尽相同。其中:In fact, each component of the YCbCr space is still meaningful, Y represents the grayscale of the pixel, and Cb and Cr represent the blue and red density offset components of the pixel, respectively. In this solution, an angle θ between a vector mapped on the CbCr plane and the Cr axis can be used to describe the color of the pixel. The effect is similar to H in HSV, but the distribution of H is not the same. among them:
θ=a tan2(Cb,Cr);θ = atan2 (Cb, Cr);
当所述计算出来的θ小于对应的预设阈值时,判定所述像素点为红色。When the calculated θ is less than the corresponding preset threshold, it is determined that the pixel is red.
子步骤2、根据所述预设颜色的特征数据,利用双阈值颜色分离法分离印章图像。Sub-step 2. According to the characteristic data of the preset color, the seal image is separated by a double-threshold color separation method.
为了解决噪声与印章本身的颜色相近的问题,本方案采用k-均值聚类法,假设以YCbCr空间中的θ值作为颜色描述方式,根据每个像素的θ值,将图像按颜色划分聚类,获得印章颜色所属聚类的θ值的上下界[a,b]。印章边缘的颜色有向背景色靠近的趋势,这意味着这部分的颜色可能与部分噪声的颜色非常接近从而被认为是噪声而被去除,所以本方案采取双阈值法,在基于k-均值聚类获取的阈值[a,b]的基础上,先收缩取值范围,采用一个严格的阈值来获取绝对属于印章的像素,并构成印章像素点集合,然后再扩大取值范围,采用一个较为宽松的阈值范围来判定印章像素点集内各点的相邻点是否属于印章,以此来补充印章像素点集,保证印章图像的完整性。In order to solve the problem that the noise is close to the color of the stamp itself, this scheme uses the k-means clustering method. Assuming that the θ value in the YCbCr space is used as the color description method, the image is divided into clusters according to the θ value of each pixel. To obtain the upper and lower bounds of the θ value of the cluster to which the seal color belongs [a, b]. The color of the seal edge tends to be closer to the background color, which means that the color of this part may be very close to the color of part of the noise and it is considered to be removed by noise, so this scheme adopts the double threshold method, based on k-means aggregation On the basis of the threshold [a, b] obtained by the class, the value range is first narrowed, and a strict threshold is used to obtain the pixels that absolutely belong to the seal, and the set of pixel points of the seal is formed, and then the value range is expanded to adopt a more relaxed Threshold range to determine whether the adjacent points of each point in the seal pixel set belong to the seal, so as to supplement the seal pixel set and ensure the integrity of the seal image.
子步骤3、进行印章图像的轮廓检测,根据检测出的所述轮廓切割出印章图像。Sub-step 3. Perform contour detection of the seal image, and cut out the seal image according to the detected contour.
本申请较佳实施例中,所述印章的轮廓检测包括以下的任何一种方法或者几种方法的结合:In a preferred embodiment of the present application, the outline detection of the seal includes any one of the following methods or a combination of several methods:
(1)边缘检测,本方案采用基于Sobel算子的Canny边缘检测算法,该方法能够很好地检测出印章的边缘,并且可以通过Sobel算子获得边缘点的梯度值。(1) Edge detection. This solution uses the Canny edge detection algorithm based on Sobel operator. This method can detect the edge of the seal well, and the gradient value of the edge point can be obtained through Sobel operator.
(2)随机霍夫变换检测椭圆,随机霍夫变换能够有效地检测出椭圆,找到椭圆的位置并能够描绘出较为准确的椭圆轮廓,但是其随机取点的机制导致它很容易受到噪声的干扰,易出现在达到最大循环次数后依然找不到任何椭圆的结果。此外,它的椭圆参数计算方式也使得它不可能计算出非常精确的椭圆方程。(2) Random Hough transform detects ellipse. Random Hough transform can effectively detect ellipse, find the position of the ellipse and draw a more accurate ellipse outline, but its mechanism of randomly taking points causes it to be easily disturbed by noise , Easy to appear after reaching the maximum number of cycles still can not find any ellipse results. In addition, its ellipse parameter calculation method also makes it impossible to calculate a very accurate ellipse equation.
(3)椭圆的直接最小二乘拟合,椭圆的直接最小二乘拟合是一种最优化的椭圆检测方法。它利用一组采样点数据,通过代数的方法拟合求解椭圆方程中的未知参数。利用最小二乘法求解的关键问题在于样本点的选取,因此还需要结合其他的方法来获取较好的样本。(3) Direct least square fitting of ellipse, direct least square fitting of ellipse is an optimized method of ellipse detection. It uses a set of sampling point data to solve unknown parameters in elliptic equations by algebraic method. The key problem to solve with the least square method is the selection of sample points, so other methods need to be combined to obtain better samples.
(4)将随机霍夫变换与椭圆的直接最小二乘拟合相结合来进行椭圆的检测。由于运用这两种方法的步骤比较繁琐,在此就不展开阐述。总之,利用此种方法对于印章图像的椭圆检测,其结果中往往包含同一形心大小不同的两个椭圆,分别对应印章边框的内缘和外缘,取其中较大的一个,就得到了椭圆的精确边缘。将边缘以外的像素颜色置为白色,并根据边缘所在位置对图像进行切割,就得到了轮廓以内的椭圆图像。(4) Combine the random Hough transform with the direct least squares fitting of the ellipse to detect the ellipse. Since the steps of using these two methods are more complicated, they will not be elaborated here. In short, using this method to detect the ellipse of the stamp image, the result often contains two ellipses with different sizes of the same centroid, corresponding to the inner and outer edges of the stamp border, and the larger one is obtained. Precise edge. The color of pixels outside the edge is set to white, and the image is cut according to the position of the edge to obtain an elliptical image within the outline.
S30、提取待检验的印章图像的特征点。S30. Extract the feature points of the seal image to be checked.
本步骤可以同样利用SIFT(Scale Invariant Feature Transform)算法作为提取特征点的方法。In this step, SIFT (Scale Invariant Feature Transform) algorithm can also be used as a method for extracting feature points.
S40、将待检验印章图像的特征点与参考印章图像特征点参考数据库进行匹配,以获得相匹配的特征点。S40. Match the feature points of the seal image to be tested with the reference seal image feature point reference database to obtain matching feature points.
特征点有特征向量及特征矩阵等两种形式的描述符。Feature points have two types of descriptors such as feature vector and feature matrix.
采用特征点的特征向量作为特征点特征描述符的,本方案采用欧式距离评价方法进行特征点匹配:Using feature vectors of feature points as feature point feature descriptors, this scheme uses the Euclidean distance evaluation method for feature point matching:
获取参考印章图像特征点i的特征向量V j recg=[x 1,x 2…x n],待检验印章图像特征点j的特征向量V j recg=[x 1′,x 2′…x n′],其中n表示特征向量的维数,两个特征向量的欧式距离为: Obtain the feature vector V j recg of the feature point i of the reference seal image = [x 1 , x 2 … x n ], and the feature vector V j recg of the feature point j of the seal image to be tested = [x 1 ′, x 2 ′… x n '], Where n represents the dimension of the feature vector, and the Euclidean distance of the two feature vectors is:
欧式距离最小的相对应的两个特征向量为匹配特征向量,相应的参考印章图像特征点为匹配特征点。The two corresponding feature vectors with the smallest Euclidean distance are the matching feature vectors, and the corresponding reference stamp image feature points are the matching feature points.
采用特征点的特征矩阵作为特征点特征描述符的,由于此类特征矩阵一般为正定矩阵,本方案采用如下方法进行特征点匹配:The feature matrix of feature points is used as the feature descriptor of feature points. Since such feature matrices are generally positive definite matrices, this solution uses the following methods to perform feature point matching:
获取参考印章图像特征点i的特征矩阵 待检验印章图像特征点j的特征矩阵 其中n表示特征矩阵的行、列数,两个特征矩阵的ρ距离为: Obtain the feature matrix of the reference point image feature point i Feature matrix of feature point j of seal image to be tested Where n represents the number of rows and columns of the feature matrix, and the ρ distance between the two feature matrices is:
λ k(V i ref,V j recg)λ kV i refx k-V j recgx k=0 k=1…n,x k≠0, λ k (V i ref , V j recg ) λ k V i ref x k -V j recg x k = 0 k = 1 ... n , x k ≠ 0,
其中V i ref和V j recg为两个协方差矩阵,ρ(V i ref,V j recg)表示他们的评价距离。 λ k(V i ref,V j recg)表示V i ref和V j recg的广义本征值,由下式计算:λ kV i refx k-V j recgx k=0 k=1...n其中,x k≠0,为V i ref和V j recg的广义本征向量,n为广义本征向量的维数。 Where V i ref and V j recg are two covariance matrices, and ρ (V i ref , V j recg ) represents their evaluation distance. λ k (V i ref , V j recg ) represents the generalized eigenvalues of V i ref and V j recg and is calculated by the following formula: λ k V i ref x k -V j recg x k = 0 k = 1 .. .n where x k ≠ 0 is the generalized eigenvector of V i ref and V j recg , and n is the dimension of the generalized eigenvector.
ρ(V i ref,V j recg)距离最小的相对应的两个特征向量为匹配特征向量,相应的参考印章图像特征点与待验印章图像特征点为匹配特征点。 The two corresponding feature vectors with the smallest distance ρ (V i ref , V j recg ) are matching feature vectors, and the corresponding feature points of the reference seal image and the feature image of the seal image to be tested are matching feature points.
待检验印章图像的特征点与参考印章图像特征点匹配完成后,将获得参考印章图像的特征点[P 1 P 2 … P n]与待检验印章图像的特征点[P 1′ P 2′ … P n′]的对应关系,其中n表示匹配特征点的数量。上式表示参考图像特征点P 1与待验图像图整点P 1′对应,P 2与P 2′对应,以此类推。 After the matching of the feature points of the seal image to be inspected and that of the reference seal image is completed, the feature points of the reference seal image [P 1 P 2 … P n ] and the feature points of the seal image to be tested [P 1 ′ P 2 ′… P n ′], where n represents the number of matching feature points. The above formula indicates that the reference image feature point P 1 corresponds to the whole point P 1 ′ of the image to be inspected, P 2 corresponds to P 2 ′, and so on.
S50、统计待检验印章图像的特征点与参考印章图像特征点中相匹配的特征点的数量,根据所述相匹配的特征点的数量,检验所述待检验印章图像的真伪。S50. Count the number of feature points matching the feature points of the seal image to be tested and the reference seal image feature points, and verify the authenticity of the seal image to be tested according to the number of matching feature points.
其中,若待检验印章图像的特征点与参考印章图像特征点中相匹配的特征点的数量占所述参考印章图像特征点的总数的百分比超过预设数值,如85%,则认为所述待检验印章图像为真。Where, if the number of matching feature points of the seal image to be checked and the reference seal image feature points in the total number of feature points of the reference seal image exceeds the preset value, such as 85%, the pending Verify that the stamp image is true.
本申请还提供一种印章防伪检验装置。参照图2所示,为本申请一实施例提供的印章防伪检验装置的内部结构示意图。The present application also provides a seal anti-counterfeiting inspection device. Referring to FIG. 2, it is a schematic diagram of an internal structure of a seal anti-counterfeiting inspection device provided by an embodiment of the present application.
在本实施例中,印章防伪检验装置1可以是PC(Personal Computer,个人电脑),也可以是智能手机、平板电脑、便携计算机等终端设备,或者也可以是服务器或者服务器集群等。该印章防伪检验装置1至少包括存储器11、处理器12,通信总线13,以及网络接口14。In this embodiment, the seal
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是印章防伪检验装置1的内部存储单元,例如该印章防伪检验装置1的硬盘。存储器11在另一些实施例中也可以是印章防伪检验装置1的外部存储设备,例如印章防伪检验装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括印章防伪检验装置1的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于印章防伪检验装置1的应用软件及各类数据,例如印章防伪检验程序01的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行印章防伪检验程序01等。In some embodiments, the
通信总线13用于实现这些组件之间的连接通信。The
网络接口14可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该装置1与其他电子设备之间建立通信连接。The
可选地,该装置1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在印章防伪检验装置1中处理的信息以及用于显示可视化的用户界面。Optionally, the
图2仅示出了具有组件11-14以及印章防伪检验程序01的印章防伪检验装置1,本领域技术人员可以理解的是,图1示出的结构并不构成对印章防伪检验装置1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 2 only shows the seal
在图2所示的装置1实施例中,存储器11中存储有印章防伪检验程序01;处理器12执行存储器11中存储的印章防伪检验程序01时实现如下步骤:In the embodiment of the
步骤一、建立参考印章图像的特征点参考数据库。Step 1: Establish a reference database for the feature points of the reference stamp image.
本申请较佳实施例通过照相机、扫描仪、CCD摄像头等图像获取装置获取真实印章的印章图像作为参考印章图像,并赋予每个参考印章图像一个固定的ID,该ID与特定的真实印章相对应。The preferred embodiment of the present application acquires the seal image of the real seal as an image of the reference seal through an image acquisition device such as a camera, a scanner, a CCD camera, and gives each reference seal image a fixed ID, which corresponds to a specific real seal .
利用特征点提取方法提取所述参考印章图像中的特征点,并将所述参考印章图像中包含的特征点的位置信息以及描述符信息等数据存储在参考数据库中。A feature point extraction method is used to extract feature points in the reference seal image, and data such as position information and descriptor information of the feature points contained in the reference seal image are stored in the reference database.
本提案中所使用到的特征点提取方法是SIFT(Scale Invariant Feature Transform)算法。The feature point extraction method used in this proposal is SIFT (Scale Invariant Feature Transform) algorithm.
所述SIFT算子是图像匹配算法中性能较好的算子,基于SIFT算法的特征图像配准可大致分为特征的检测、描述和匹配。特征检测是在尺度空间中进行的,首先生成图像尺度空间,然后检测尺度空间中的局部极点值,再通过剔除低对比度点和边缘响应点对局部极值点进行精确定位;在对特征进行描述时,先计算每个极值点的主方向,对极值点的主方向,对极值点为中心的区域进行直方图梯度方向统计,生成特征点描述符;通过特征点描述符可以寻找匹配特征,建立图像之间的联系。The SIFT operator is an operator with better performance in the image matching algorithm, and feature image registration based on the SIFT algorithm can be roughly divided into feature detection, description, and matching. Feature detection is performed in scale space. First, the image scale space is generated, and then the local extremum values in the scale space are detected, and then the local extremum points are accurately located by excluding low-contrast points and edge response points; When calculating the principal direction of each extremum point, the main direction of the extremum point and the histogram gradient direction of the area with the extreme point as the center are calculated to generate the feature point descriptor; the feature point descriptor can be used to find the match Features to establish connections between images.
SIFT特征检测主要包括以下4个基本步骤:1.尺度空间极值检测:搜索所有尺度上的图像位置。通过高斯微分函数来识别潜在的对于尺度和旋转不变的候选点。2.特征点定位:在每个候选的位置上,通过一个拟合精细的模型来确定位置和尺度。特征点的选择依据于它们的稳定程度。3.方向确定:基于图像局部的梯度方向,分配给每个特征点位置一个或多个方向。所有后面的对图像数据的操作都相对于特征点的方向、尺度和位置进行变换,从而提供对于这些变换的不变性。4.特征点描述:在每个特征点周围的邻域内,在选定的尺度上测量图像局部的梯度。这些梯度被变换成一种表示,这种表示允许比较大的局部形状的变形和光照变化。在特征点描述中,以特征点为中心取16×16的邻域作为采样窗口,将采样点与特征点的相对方向通过高斯 加权后归入包含8个bin的方向直方图,最后获得4×4×8的128维特征点描述符。SIFT feature detection mainly includes the following four basic steps: 1. Scale space extreme value detection: search for image positions on all scales. Gaussian differential functions are used to identify potential candidate points that are invariant to scale and rotation. 2. Feature point positioning: at each candidate position, a precise model is used to determine the position and scale. The selection of feature points depends on their stability. 3. Direction determination: Based on the local gradient direction of the image, one or more directions are assigned to each feature point location. All subsequent operations on image data are transformed with respect to the direction, scale, and position of the feature points, thereby providing invariance to these transformations. 4. Feature point description: In the neighborhood around each feature point, measure the local gradient of the image at the selected scale. These gradients are transformed into a representation that allows larger local shape deformations and light changes. In the description of feature points, the neighborhood of 16 × 16 is taken as the sampling window with the feature point as the center, and the relative direction of the sample point and the feature point is weighted by Gaussian into a direction histogram containing 8 bins, and finally 4 × 4 × 8 128-dimensional feature point descriptor.
步骤二、从文档中提取待检验的印章图像。Step 2: Extract the seal image to be checked from the document.
本申请较佳实施例中,提取待检验的印章图像的流程包括:In the preferred embodiment of the present application, the process of extracting the seal image to be inspected includes:
1、从所述文档中分离出预设颜色的的特征数据。1. Separate feature data of preset colors from the document.
应该了解,大部分的印章都是红色,因此,本实施例以红色为例。It should be understood that most of the seals are red, so this embodiment uses red as an example.
为突出红色与其他颜色在数值上的差异,本方案根据不同色彩空间表达颜色的特点,提出了三种描述颜色的方式,它们分别是:In order to highlight the difference in value between red and other colors, this scheme proposes three ways to describe colors according to the characteristics of colors expressed in different color spaces. They are:
(1)、RGB空间——R-G、R-B。(1), RGB space-R-G, R-B.
RGB空间的三个分量R、G、B分别表示红色、绿色、蓝色的混合量。直观地来讲,红色的R值,即红色分量一定是比较大的,实际上RGB空间中标准红色的RGB值为(255,0,0),但是R值大并不代表该颜色就接近红色,G值和B值的大小会对颜色产生明显的影响,例如(255,255,0)就代表黄色,而(255,0,255)则代表紫色。由此可以看出,R值较大同时G值和B值较小时,对应的颜色越接近红色。The three components R, G, and B in the RGB space represent the mixed amounts of red, green, and blue, respectively. Intuitively speaking, the red R value, that is, the red component must be relatively large, in fact, the RGB value of the standard red in RGB space is (255,0,0), but a large R value does not mean that the color is close to red , The size of G value and B value will have a significant effect on the color, for example (255,255,0) represents yellow, and (255,0,255) represents purple. It can be seen from this that when the R value is large and the G and B values are small, the corresponding color is closer to red.
于是相应的,本方案计算一个像素点的R分量与G分量的差值R-G,以及R分量与B分量的差值R-B,当所述差值R-G与差值R-B均大于对应的预设阈值时,判定所述像素点为红色。Correspondingly, this solution calculates the difference RG of the R component and the G component of a pixel, and the difference RB of the R component and the B component, when both the difference RG and the difference RB are greater than the corresponding preset threshold To determine that the pixel is red.
(2)、HSV空间——H。(2), HSV space-H.
HSV空间中的H、S、V分别代表色相、饱和度和强度。HSV空间对颜色的描述更接近人类对颜色的认识:H即色相,用角度值的形式表示颜色的相位,从0°到360°表示红色到绿色到蓝色再回到红色的渐变过程,S表示对应色相下颜色的填充比例,取0-100%,V表示亮度,或者说光强度,取0-100%。对于印章来说,其红色的变化主要受到图像采集光线(对应亮度V)和纸张本身磨损(对应饱和度S)的影响,因而H的取值能够较好地描述一般意义上的“颜色”差异。H, S, and V in HSV space represent hue, saturation, and intensity, respectively. The description of colors in the HSV space is closer to humans ’understanding of colors: H is the hue, and the phase of the color is expressed in the form of angle values, from 0 ° to 360 °, which indicates the transition from red to green to blue and back to red, S Represents the fill ratio of the color under the corresponding hue, taking 0-100%, V represents the brightness, or light intensity, taking 0-100%. For the seal, the change in red is mainly affected by the light collected by the image (corresponding to the brightness V) and the wear of the paper itself (corresponding to the saturation S), so the value of H can better describe the "color" difference in the general sense .
因此,本方案计算一个像素点的H值,当所述像素点的H值小于对应的预设阈值时,判定所述像素点为红色。(3)、YCbCr空间——偏转角θ。Therefore, this solution calculates the H value of a pixel, and when the H value of the pixel is less than the corresponding preset threshold, it is determined that the pixel is red. (3) YCbCr space-deflection angle θ.
YCbCr空间不是一种绝对的色彩空间,而是一种对RGB空间的编码,其编码规则如下:YCbCr space is not an absolute color space, but an encoding of RGB space. The encoding rules are as follows:
实际上,YCbCr空间的各个分量依然是有意义的,Y代表像素点的灰度,Cb和Cr分别代表像素点的蓝色和红色的浓度偏移量成分。本方案可以选取一种颜色映射到CbCr平面上的向量与Cr轴之间的夹角θ来描述像素点的颜色,其效果与HSV中的H类似,但是与H的分布情况不尽相同。其中:In fact, each component of the YCbCr space is still meaningful, Y represents the grayscale of the pixel, and Cb and Cr represent the blue and red density offset components of the pixel, respectively. In this solution, an angle θ between a vector mapped on the CbCr plane and the Cr axis can be used to describe the color of the pixel. The effect is similar to H in HSV, but the distribution of H is not the same. among them:
θ=a tan2(Cb,Cr);θ = atan2 (Cb, Cr);
当所述计算出来的θ小于对应的预设阈值时,判定所述像素点为红色。。When the calculated θ is less than the corresponding preset threshold, it is determined that the pixel is red. .
2、根据所述预设颜色的特征数据,利用双阈值颜色分离法分离印章图像。2. According to the characteristic data of the preset color, the seal image is separated by a double threshold color separation method.
为了解决噪声与印章本身的颜色相近的问题,本方案采用k-均值聚类法,假设以YCbCr空间中的θ值作为颜色描述方式,根据每个像素的θ值,将图像按颜色划分聚类,获得印章颜色所属聚类的θ值的上下界[a,b]。印章边缘的颜色有向背景色靠近的趋势,这意味着这部分的颜色可能与部分噪声的颜色非常接近从而被认为是噪声而被去除,所以本方案采取双阈值法,在基于k-均值聚类获取的阈值[a,b]的基础上,先收缩取值范围,采用一个严格的阈值来获取绝对属于印章的像素,并构成印章像素点集合,然后再扩大取值范围,采用一个较为宽松的阈值范围来判定印章像素点集内各点的相邻点是否属于印章,以此来补充印章像素点集,保证印章图像的完整性。In order to solve the problem that the noise is close to the color of the stamp itself, this scheme uses the k-means clustering method. Assuming that the θ value in the YCbCr space is used as the color description method, the image is divided into clusters according to the θ value of each pixel. To obtain the upper and lower bounds of the θ value of the cluster to which the seal color belongs [a, b]. The color of the seal edge tends to be closer to the background color, which means that the color of this part may be very close to the color of part of the noise and it is considered to be removed by noise, so this scheme adopts the double threshold method, based on k-means aggregation On the basis of the threshold [a, b] obtained by the class, the value range is first narrowed, and a strict threshold is used to obtain the pixels that absolutely belong to the seal, and the set of pixel points of the seal is formed, and then the value range is expanded to adopt a more relaxed Threshold range to determine whether the adjacent points of each point in the seal pixel set belong to the seal, so as to supplement the seal pixel set and ensure the integrity of the seal image.
3、进行印章图像的轮廓检测,根据检测出的所述轮廓切割出印章图像。3. Perform contour detection of the seal image, and cut out the seal image according to the detected contour.
本申请较佳实施例中,所述印章的轮廓检测包括以下的任何一种方法或者几种方法的结合:In a preferred embodiment of the present application, the outline detection of the seal includes any one of the following methods or a combination of several methods:
(1)、边缘检测,本方案采用基于Sobel算子的Canny边缘检测算法,该方法能够很好地检测出印章的边缘,并且可以通过Sobel算子获得边缘点的梯度值。(1). Edge detection. This solution uses the Canny edge detection algorithm based on Sobel operator. This method can detect the edge of the seal well, and the gradient value of the edge point can be obtained through Sobel operator.
(2)、随机霍夫变换检测椭圆,随机霍夫变换能够有效地检测出椭圆,找到椭圆的位置并能够描绘出较为准确的椭圆轮廓,但是其随机取点的机制导致它很容易受到噪声的干扰,易出现在达到最大循环次数后依然找不到任何椭圆的结果。此外,它的椭圆参数计算方式也使得它不可能计算出非常精确的椭圆方程。(2) Random Hough transform detects ellipse. Random Hough transform can effectively detect ellipse, find the position of the ellipse and draw a more accurate ellipse outline, but its mechanism of randomly taking points makes it very susceptible to noise. Interference, easy to appear after reaching the maximum number of cycles and still can not find any elliptical results. In addition, its ellipse parameter calculation method also makes it impossible to calculate a very accurate ellipse equation.
(3)、椭圆的直接最小二乘拟合,椭圆的直接最小二乘拟合是一种最优化的椭圆检测方法。其利用一组采样点数据,通过代数的方法拟合求解椭圆方程中的未知参数。利用最小二乘法求解的关键问题在于样本点的选取,因此还需要结合其他的方法来获取较好的样本。(3). Direct least squares fitting of ellipse. Direct least squares fitting of ellipse is an optimized method of ellipse detection. It uses a set of sampling point data to solve unknown parameters in the elliptic equation by algebraic method. The key problem to solve with the least square method is the selection of sample points, so other methods need to be combined to obtain better samples.
(4)、将随机霍夫变换与椭圆的直接最小二乘拟合相结合来进行椭圆的检测。由于运用这两种方法的步骤比较繁琐,在此就不展开阐述。总之,利用此种方法对于印章图像的椭圆检测,其结果中往往包含同一形心大小不同的两个椭圆,分别对应印章边框的內缘和外缘,取其中较大的一个,就得到了椭圆的精确边缘。将边缘以外的像素颜色置为白色,并根据边缘所在位置对图像进行切割,就得到了轮廓以内的椭圆图像。(4) Combining random Hough transform and direct least squares fitting of ellipse to detect ellipse. Since the steps of using these two methods are more complicated, they will not be elaborated here. In short, using this method to detect the ellipse of the stamp image, the result often contains two ellipses with different sizes of the same centroid, corresponding to the inner and outer edges of the stamp border, and the larger one is obtained. Precise edge. The color of pixels outside the edge is set to white, and the image is cut according to the position of the edge to obtain an elliptical image within the outline.
步骤三、提取待检验的印章图像的特征点。Step 3: Extract the feature points of the seal image to be checked.
本步骤可以同样利用SIFT(Scale Invariant Feature Transform)算法作为提取特征点的方法。In this step, SIFT (Scale Invariant Feature Transform) algorithm can also be used as a method for extracting feature points.
步骤四、将待检验印章图像的特征点与参考印章图像特征点参考数据库进行匹配,以获得相匹配的特征点。Step 4: Match the feature points of the seal image to be tested with the reference seal image feature point reference database to obtain matching feature points.
特征点有特征向量及特征矩阵等两种形式的描述符。Feature points have two types of descriptors such as feature vector and feature matrix.
采用特征点的特征向量作为特征点特征描述符的,本方案采用欧式距离评价方法进行特征点匹配:Using feature vectors of feature points as feature point feature descriptors, this scheme uses the Euclidean distance evaluation method for feature point matching:
获取参考印章图像特征点i的特征向量V j recg=[x 1,x 2…x n],待检验印章 图像特征点j的特征向量V j recg=[x 1′,x 2′…x n′],其中n表示特征向量的维数,两个特征向量的欧式距离为: Obtain the feature vector V j recg of the feature point i of the reference seal image = [x 1 , x 2 … x n ], and the feature vector V j recg of the feature point j of the seal image to be tested = [x 1 ′, x 2 ′… x n '], Where n represents the dimension of the feature vector, and the Euclidean distance of the two feature vectors is:
其中,欧式距离最小的相对应的两个特征向量为匹配特征向量,相应的参考印章图像特征点为匹配特征点。Among them, the two corresponding feature vectors with the smallest Euclidean distance are matching feature vectors, and the corresponding reference stamp image feature points are matching feature points.
采用特征点的特征矩阵作为特征点特征描述符的,由于此类特征矩阵一般为正定矩阵,本方案采用如下方法进行特征点匹配:The feature matrix of feature points is used as the feature descriptor of feature points. Since such feature matrices are generally positive definite matrices, this solution uses the following methods to perform feature point matching:
获取参考印章图像特征点i的特征矩阵 待检验印章图像特征点j的特征矩阵 其中n表示特征矩阵的行、列数,两个特征矩阵的ρ距离为: Obtain the feature matrix of the reference point image feature point i Feature matrix of feature point j of seal image to be tested Where n represents the number of rows and columns of the feature matrix, and the ρ distance between the two feature matrices is:
λ k(V i ref,V j recg)λ kV i refx k-V j recgx k=0 k=1…n,x k≠0, λ k (V i ref , V j recg ) λ k V i ref x k -V j recg x k = 0 k = 1 ... n , x k ≠ 0,
其中V i ref和V j recg为两个协方差矩阵,ρ(V i ref,V j recg)表示他们的评价距离。λ k(V i ref,V j recg)表示V i ref和V j recg的广义本征值,由下式计算:λ kV i refx k-V j recgx k=0 k=1...n,其中,x k≠0为V i ref和V j recg的广义本征向量,n为广义本征向量的维数。 Where V i ref and V j recg are two covariance matrices, and ρ (V i ref , V j recg ) represents their evaluation distance. λ k (V i ref , V j recg ) represents the generalized eigenvalues of V i ref and V j recg and is calculated by the following formula: λ k V i ref x k -V j recg x k = 0 k = 1 .. .n , where x k ≠ 0 is the generalized eigenvector of V i ref and V j recg , and n is the dimension of the generalized eigenvector.
其中,ρ(V i ref,V j recg)距离最小的相对应的两个特征向量为匹配特征向量,相应的参考印章图像特征点与待验印章图像特征点为匹配特征点。 Among them, the two corresponding feature vectors with the smallest distance between ρ (V i ref and V j recg ) are the matching feature vectors, and the corresponding feature points of the reference seal image and the feature image points of the seal image to be tested are matching feature points.
待检验印章图像的特征点与参考印章图像特征点匹配完成后,将获得参考印章图像的特征点[P 1 P 2 … 2 n]与待检验印章图像的特征点[P 1′ P 2′ … P n′]的对应关系,其中n表示匹配特征点的数量。上式表示参考图像特征点P 1与待验图像图整点P 1′对应,P 2与P 2′对应,以此类推。 After the matching of the feature points of the seal image to be checked and the feature points of the reference seal image is completed, the feature points of the reference seal image [P 1 P 2 … 2 n ] and the feature points of the seal image to be tested [P 1 ′ P 2 ′… P n ′], where n represents the number of matching feature points. The above formula indicates that the reference image feature point P 1 corresponds to the whole point P 1 ′ of the image to be inspected, P 2 corresponds to P 2 ′, and so on.
步骤五、统计待检验印章图像的特征点与参考印章图像特征点中相匹配的特征点的数量,根据所述相匹配的特征点的数量,检验所述待检验印章图像的真伪。Step 5: Count the number of matching feature points in the feature image of the seal image to be checked and the reference seal image, and verify the authenticity of the seal image to be checked according to the number of matching feature points.
可选地,在其他实施例中,印章防伪检验程序还可以被分割为一个或者多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行以完成本申请,本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段,用于描述印章防伪检验程序在印章防伪检验装置中的执行过程。Optionally, in other embodiments, the seal anti-counterfeiting verification program may also be divided into one or more modules, and the one or more modules are stored in the
例如,参照图3所示,为本申请印章防伪检验装置一实施例中的印章防 伪检验程序的程序模块示意图,该实施例中,印章防伪检验程序可以被分割为参考数据库建立10、印章图像提取模块20、特征点提取模块30、特征点匹配模块40和印章检验模块50,示例性地:For example, referring to FIG. 3, it is a schematic diagram of a program module of a seal anti-counterfeiting inspection program in an embodiment of a seal anti-counterfeiting inspection device of the present application. The
参考数据库建立10用于:建立参考印章图像的特征点参考数据库;The
印章图像提取模块20用于:从文档中提取待检验的印章图像;The seal
特征点提取模块30用于:提取待检验的印章图像的特征点;The feature
特征点匹配模块40用于:将待检验印章图像的特征点与参考印章图像特征点参考数据库进行匹配,以获得相匹配的特征点;及The feature
印章检验模块50用于:统计待检验印章图像的特征点与参考印章图像特征点中相匹配的特征点的数量,根据所述相匹配的特征点的数量,检验所述待检验印章图像的真伪。The
上述参考数据库建立10、印章图像提取模块20、特征点提取模块30、特征点匹配模块40和印章检验模块50等程序模块被执行时所实现的功能或操作步骤与上述实施例大体相同,在此不再赘述。The above
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有印章防伪检验程序,所述印章防伪检验程序可被一个或多个处理器执行,以实现如下操作:In addition, the embodiments of the present application also provide a computer-readable storage medium having a seal anti-counterfeit verification program stored on the computer-readable storage medium, which may be executed by one or more processors to implement the following operating:
建立参考印章图像的特征点参考数据库;Establish a reference database of feature points that refer to the seal image;
从文档中提取待检验的印章图像;Extract the seal image to be checked from the document;
提取待检验的印章图像的特征点;Extract the feature points of the seal image to be checked;
将待检验印章图像的特征点与参考印章图像特征点参考数据库进行匹配,以获得相匹配的特征点;及Matching the feature points of the seal image to be tested with the reference seal image feature point reference database to obtain matching feature points; and
统计待检验印章图像的特征点与参考印章图像特征点中相匹配的特征点的数量,根据所述相匹配的特征点的数量,检验所述待检验印章图像的真伪。The number of matching feature points in the feature image of the seal image to be tested and the reference seal image is counted, and the authenticity of the seal image to be tested is verified according to the number of matching feature points.
本申请计算机可读存储介质具体实施方式与上述印章防伪检验装置和方法各实施例基本相同,在此不作累述。The specific implementation of the computer-readable storage medium of the present application is basically the same as the embodiments of the above-mentioned seal anti-counterfeiting verification device and method, and will not be repeated here.
需要说明的是,上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that the sequence numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments. And the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method that includes a series of elements includes not only those elements, but also includes no explicit The other elements listed may also include elements inherent to this process, device, article, or method. Without more restrictions, the element defined by the sentence "include one ..." does not exclude that there are other identical elements in the process, device, article or method that includes the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体 现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods in the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or part that contributes to the existing technology, and the computer software product is stored in a storage medium (such as ROM / RAM) as described above , Magnetic disks, optical disks), including several instructions to enable a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to perform the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the description and drawings of this application, or directly or indirectly used in other related technical fields , The same reason is included in the scope of patent protection of this application.
Claims (20)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811256366.XA CN109635818B (en) | 2018-10-26 | 2018-10-26 | Seal anti-counterfeiting inspection method, seal anti-counterfeiting inspection device and computer-readable storage medium |
| CN201811256366.X | 2018-10-26 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020082577A1 true WO2020082577A1 (en) | 2020-04-30 |
Family
ID=66066749
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/123591 Ceased WO2020082577A1 (en) | 2018-10-26 | 2018-12-25 | Seal anti-counterfeiting verification method, device, and computer readable storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109635818B (en) |
| WO (1) | WO2020082577A1 (en) |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111797830A (en) * | 2020-07-07 | 2020-10-20 | 因凡科技(北京)有限公司 | Method, system and device for fast red stamp detection on bill image |
| CN112381765A (en) * | 2020-10-23 | 2021-02-19 | 杭州翔毅科技有限公司 | Equipment detection method, device, equipment and storage medium based on artificial intelligence |
| CN112560697A (en) * | 2020-12-17 | 2021-03-26 | 合肥高维数据技术有限公司 | Cup building identification method and system based on local features and storage medium |
| CN112597840A (en) * | 2020-12-14 | 2021-04-02 | 深圳集智数字科技有限公司 | Image identification method, device and equipment |
| CN112613003A (en) * | 2020-12-28 | 2021-04-06 | 中国农业银行股份有限公司 | Text processing method and device |
| CN112784835A (en) * | 2021-01-21 | 2021-05-11 | 恒安嘉新(北京)科技股份公司 | Method and device for identifying authenticity of circular seal, electronic equipment and storage medium |
| CN113705330A (en) * | 2021-07-08 | 2021-11-26 | 厦门科路德科技有限公司 | Seal authenticity identification method and system |
| CN116434246A (en) * | 2023-04-18 | 2023-07-14 | 浙江大学 | A method and system for distinguishing the authenticity of stamps and seals on paintings and calligraphy |
| CN116469122A (en) * | 2023-04-04 | 2023-07-21 | 平安科技(深圳)有限公司 | Seal intelligent detection method, device, equipment and storage medium |
| CN116842582A (en) * | 2023-07-06 | 2023-10-03 | 上海朗晖慧科技术有限公司 | Intelligent analysis and identification system and method based on data anti-counterfeiting technology |
| CN117176481A (en) * | 2023-11-03 | 2023-12-05 | 贵阳博亚机械制造有限公司 | Process safety authentication method and device for logic electronic seal |
| CN117592951A (en) * | 2024-01-19 | 2024-02-23 | 南京邮电大学 | A tensor-based multi-dimensional seal data processing method |
| CN119229451A (en) * | 2024-09-13 | 2024-12-31 | 北京元界信用管理有限公司 | A seal authenticity identification system based on artificial intelligence |
| CN119380173A (en) * | 2024-12-27 | 2025-01-28 | 中国科学技术大学 | Seal comparison and authentication method and system based on attention mechanism and image enhancement |
| CN120147757A (en) * | 2025-04-14 | 2025-06-13 | 北京微点科学技术有限公司 | A method and system for determining authenticity of printed matter images |
Families Citing this family (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110472623B (en) * | 2019-06-29 | 2022-08-09 | 华为技术有限公司 | Image detection method, device and system |
| CN111325722B (en) * | 2020-02-17 | 2024-02-20 | 江苏诚印科技有限公司 | Seal image accurate identification method and system and seal image identification processing method |
| CN111291757B (en) * | 2020-02-17 | 2023-08-15 | 江苏诚印科技有限公司 | Method for uniquely identifying seal |
| CN112633366B (en) * | 2020-12-21 | 2023-05-12 | 广州市申迪计算机系统有限公司 | Jade article identification method based on feature matching |
| CN112288045B (en) * | 2020-12-23 | 2021-04-16 | 深圳神目信息技术有限公司 | Seal authenticity distinguishing method |
| CN112862846A (en) * | 2021-01-07 | 2021-05-28 | 北京惠朗时代科技有限公司 | Official seal identification method and system combining multiple detection methods |
| CN113486901B (en) * | 2021-06-23 | 2023-05-02 | 内江师范学院 | Novel high imitation round seal identification method |
| CN114882482B (en) * | 2021-10-12 | 2023-03-17 | 北京九章云极科技有限公司 | Seal anti-counterfeiting identification method and device |
| CN114219056A (en) * | 2021-12-17 | 2022-03-22 | 杭州沃朴物联科技有限公司 | False distinguishing method of line laser label |
| CN114913089B (en) * | 2022-05-13 | 2024-09-20 | 华设设计集团股份有限公司 | Seal extraction method based on multi-scale Hough transformation |
| CN116010642B (en) * | 2023-03-27 | 2023-06-20 | 北京滴普科技有限公司 | A fast search method and system for seals based on HOG features |
| CN117095190A (en) * | 2023-08-04 | 2023-11-21 | 深圳市三品智数科技有限公司 | Seal authenticity detection method, seal authenticity detection system and computer readable storage medium |
| CN120163970B (en) * | 2025-03-07 | 2025-12-02 | 北京航星永志科技有限公司 | Seal recognition methods, systems, devices, and storage media based on generative seal recognition models. |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030108232A1 (en) * | 1999-08-25 | 2003-06-12 | Xuguang Yang | Detection and deterrence of counterfeiting of documents with a seal having characterisitc color, size, shape and radial density profile |
| CN104008369A (en) * | 2014-05-16 | 2014-08-27 | 四川大学 | Method and device for recognizing authenticity of seal |
| CN104626771A (en) * | 2015-03-05 | 2015-05-20 | 深圳市创业印章实业有限公司 | Seal anti-counterfeiting method and system |
| CN108509992A (en) * | 2017-12-27 | 2018-09-07 | 广西新章物电防伪技术开发有限公司 | A kind of seal impression Weigh sensor method for anti-counterfeit based on machine learning techniques |
| CN108509948A (en) * | 2018-02-13 | 2018-09-07 | 浙江天地人科技有限公司 | A kind of seal impression true and false identification system and method |
| CN108596197A (en) * | 2018-05-15 | 2018-09-28 | 汉王科技股份有限公司 | A kind of seal matching process and device |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101556692A (en) * | 2008-04-09 | 2009-10-14 | 西安盛泽电子有限公司 | Image mosaic method based on neighborhood Zernike pseudo-matrix of characteristic points |
| CN101894260B (en) * | 2010-06-04 | 2012-10-17 | 北京化工大学 | Recognition method of counterfeit seal based on random generation of feature lines based on matching feature points |
| CN102054168B (en) * | 2010-12-23 | 2012-11-14 | 武汉大学苏州研究院 | Method for recognizing circular seal on valuable bill |
-
2018
- 2018-10-26 CN CN201811256366.XA patent/CN109635818B/en active Active
- 2018-12-25 WO PCT/CN2018/123591 patent/WO2020082577A1/en not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030108232A1 (en) * | 1999-08-25 | 2003-06-12 | Xuguang Yang | Detection and deterrence of counterfeiting of documents with a seal having characterisitc color, size, shape and radial density profile |
| CN104008369A (en) * | 2014-05-16 | 2014-08-27 | 四川大学 | Method and device for recognizing authenticity of seal |
| CN104626771A (en) * | 2015-03-05 | 2015-05-20 | 深圳市创业印章实业有限公司 | Seal anti-counterfeiting method and system |
| CN108509992A (en) * | 2017-12-27 | 2018-09-07 | 广西新章物电防伪技术开发有限公司 | A kind of seal impression Weigh sensor method for anti-counterfeit based on machine learning techniques |
| CN108509948A (en) * | 2018-02-13 | 2018-09-07 | 浙江天地人科技有限公司 | A kind of seal impression true and false identification system and method |
| CN108596197A (en) * | 2018-05-15 | 2018-09-28 | 汉王科技股份有限公司 | A kind of seal matching process and device |
Cited By (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111797830A (en) * | 2020-07-07 | 2020-10-20 | 因凡科技(北京)有限公司 | Method, system and device for fast red stamp detection on bill image |
| CN112381765A (en) * | 2020-10-23 | 2021-02-19 | 杭州翔毅科技有限公司 | Equipment detection method, device, equipment and storage medium based on artificial intelligence |
| CN112597840A (en) * | 2020-12-14 | 2021-04-02 | 深圳集智数字科技有限公司 | Image identification method, device and equipment |
| CN112560697A (en) * | 2020-12-17 | 2021-03-26 | 合肥高维数据技术有限公司 | Cup building identification method and system based on local features and storage medium |
| CN112613003A (en) * | 2020-12-28 | 2021-04-06 | 中国农业银行股份有限公司 | Text processing method and device |
| CN112613003B (en) * | 2020-12-28 | 2023-12-08 | 中国农业银行股份有限公司 | Text processing method and device |
| CN112784835A (en) * | 2021-01-21 | 2021-05-11 | 恒安嘉新(北京)科技股份公司 | Method and device for identifying authenticity of circular seal, electronic equipment and storage medium |
| CN112784835B (en) * | 2021-01-21 | 2024-04-12 | 恒安嘉新(北京)科技股份公司 | Method and device for identifying authenticity of circular seal, electronic equipment and storage medium |
| CN113705330B (en) * | 2021-07-08 | 2023-12-01 | 厦门科路德科技有限公司 | Seal authenticity identification method and system |
| CN113705330A (en) * | 2021-07-08 | 2021-11-26 | 厦门科路德科技有限公司 | Seal authenticity identification method and system |
| CN116469122A (en) * | 2023-04-04 | 2023-07-21 | 平安科技(深圳)有限公司 | Seal intelligent detection method, device, equipment and storage medium |
| CN116434246A (en) * | 2023-04-18 | 2023-07-14 | 浙江大学 | A method and system for distinguishing the authenticity of stamps and seals on paintings and calligraphy |
| CN116842582A (en) * | 2023-07-06 | 2023-10-03 | 上海朗晖慧科技术有限公司 | Intelligent analysis and identification system and method based on data anti-counterfeiting technology |
| CN116842582B (en) * | 2023-07-06 | 2024-04-23 | 上海朗晖慧科技术有限公司 | Intelligent analysis and identification system and method based on data anti-counterfeiting technology |
| CN117176481A (en) * | 2023-11-03 | 2023-12-05 | 贵阳博亚机械制造有限公司 | Process safety authentication method and device for logic electronic seal |
| CN117176481B (en) * | 2023-11-03 | 2024-01-26 | 贵阳博亚机械制造有限公司 | Process safety authentication method and device for logic electronic seal |
| CN117592951A (en) * | 2024-01-19 | 2024-02-23 | 南京邮电大学 | A tensor-based multi-dimensional seal data processing method |
| CN117592951B (en) * | 2024-01-19 | 2024-03-22 | 南京邮电大学 | A tensor-based multi-dimensional seal data processing method |
| CN119229451A (en) * | 2024-09-13 | 2024-12-31 | 北京元界信用管理有限公司 | A seal authenticity identification system based on artificial intelligence |
| CN119380173A (en) * | 2024-12-27 | 2025-01-28 | 中国科学技术大学 | Seal comparison and authentication method and system based on attention mechanism and image enhancement |
| CN120147757A (en) * | 2025-04-14 | 2025-06-13 | 北京微点科学技术有限公司 | A method and system for determining authenticity of printed matter images |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109635818B (en) | 2024-09-27 |
| CN109635818A (en) | 2019-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020082577A1 (en) | Seal anti-counterfeiting verification method, device, and computer readable storage medium | |
| US20240070214A1 (en) | Image searching method and apparatus | |
| US10248954B2 (en) | Method and system for verifying user identity using card features | |
| CN112381775B (en) | Image tampering detection method, terminal device and storage medium | |
| Carvalho et al. | Illuminant-based transformed spaces for image forensics | |
| De Carvalho et al. | Exposing digital image forgeries by illumination color classification | |
| US9754164B2 (en) | Systems and methods for classifying objects in digital images captured using mobile devices | |
| US20150235110A1 (en) | Object recognition or detection based on verification tests | |
| CN109636825B (en) | Seal pattern segmentation method, device and computer readable storage medium | |
| US20190362193A1 (en) | Eyeglass positioning method, apparatus and storage medium | |
| CN108090511B (en) | Image classification method and device, electronic equipment and readable storage medium | |
| WO2020199475A1 (en) | Facial recognition method and apparatus, computer device and storage medium | |
| WO2019169772A1 (en) | Picture processing method, electronic apparatus, and storage medium | |
| CN105354554A (en) | Color and singular value feature-based face in-vivo detection method | |
| Vanetti et al. | Gas meter reading from real world images using a multi-net system | |
| CN106056083B (en) | A kind of information processing method and terminal | |
| CN110059722A (en) | Checking method, device, equipment and the readable storage medium storing program for executing of seal image | |
| Liu et al. | Image retrieval using the fused perceptual color histogram | |
| US10867170B2 (en) | System and method of identifying an image containing an identification document | |
| Turhal et al. | A new face presentation attack detection method based on face-weighted multi-color multi-level texture features | |
| Gangopadhyay et al. | FACE DETECTION AND RECOGNITION USING HAAR CLASSIFIER AND LBP HISTOGRAM. | |
| Roy et al. | A new multi-modal technique for bib number/text detection in natural images | |
| Berbar | Skin colour correction and faces detection techniques based on HSL and R colour components | |
| US9411825B2 (en) | Computer implemented system for handling text distracters in a visual search | |
| Parra et al. | Recognition, segmentation and retrieval of gang graffiti images on a mobile device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18937752 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18937752 Country of ref document: EP Kind code of ref document: A1 |