CN108596197A - A kind of seal matching process and device - Google Patents

A kind of seal matching process and device Download PDF

Info

Publication number
CN108596197A
CN108596197A CN201810464243.9A CN201810464243A CN108596197A CN 108596197 A CN108596197 A CN 108596197A CN 201810464243 A CN201810464243 A CN 201810464243A CN 108596197 A CN108596197 A CN 108596197A
Authority
CN
China
Prior art keywords
seal
image
identified
reserved
seal image
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.)
Granted
Application number
CN201810464243.9A
Other languages
Chinese (zh)
Other versions
CN108596197B (en
Inventor
王亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hanwang Technology Co Ltd
Original Assignee
Hanwang Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hanwang Technology Co Ltd filed Critical Hanwang Technology Co Ltd
Priority to CN201810464243.9A priority Critical patent/CN108596197B/en
Publication of CN108596197A publication Critical patent/CN108596197A/en
Application granted granted Critical
Publication of CN108596197B publication Critical patent/CN108596197B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides a kind of seal matching process, it is anti-fake with identification technology field to belong to seal, solves the problems, such as to carry out that existing operand when seal matching is big and inefficiency in the prior art.The method includes:It treats identifying stamp image and reserved seal image carries out Feature Points Matching, screening obtains several to candidate feature point;According to described several to candidate feature point, affine transformation matrix is determined;Determination includes the first figure of the seal image to be identified, and, the second graph that first figure obtain after affine transformation based on the affine transformation matrix;According to the information of the information and the second graph of first figure, the similarity score of the seal image to be identified and the seal in the reserved seal image is determined.Seal matching process disclosed in the embodiment of the present application, operand is small, effectively improves the matched efficiency of seal.

Description

A kind of seal matching process and device
Technical field
It is anti-fake with identification technology field more particularly to a kind of seal matching process and device that the present invention relates to seals.
Background technology
Seal matching technique is usually to first pass through image processing techniques position seal image, then extract the feature of seal image Carry out seal matching.Current more common seal matching process, including following steps:First, HIS (Hue- are utilized Saturation-Intensity) color space model carries out the extraction of red seal image;Secondly, to the seal extracted Morphological image operation is carried out, such as Canny edge detections, generates binaryzation seal image;Then, pass through SIFT (Scale Invariant Feature Transform) algorithm to binary image characteristic point detection and match, according to matching The feature point number arrived carries out the thick identification of seal;Finally, image registration is carried out, pixel operation is carried out to the image after registration, And discrepant part is filtered and is quantified, obtain the similarity of two images.
Calculation amount of said program during to seal Abstraction is relatively large, especially in finely identification link, needs It is first registrated again to pixel operation, operand is big, and efficiency is low.
To sum up, at least there is operand greatly and then cause matching efficiency is low to ask in seal matching process in the prior art Topic.
Invention content
The embodiment of the present invention provides a kind of seal matching process, to solve to exist when carrying out seal matching in the prior art Operand greatly caused by inefficiency the problem of.
In a first aspect, an embodiment of the present invention provides a kind of seal matching process, including:
Feature Points Matching is carried out by treating identifying stamp image and reserved seal image, screening obtains several to candidate special Sign point;
According to described several to candidate feature point, affine transformation matrix is determined;
Determination includes the first figure of the seal image to be identified, and, based on the affine transformation matrix to described First figure carries out the second graph obtained after affine transformation;
According to the information of the information and the second graph of first figure, the seal image to be identified and institute are determined State the similarity score of the seal in reserved seal image.
Optionally, described to carry out Feature Points Matching by treating identifying stamp image and reserved seal image, screening obtains Before the step of several points to candidate feature, further include:
By seal image to be identified and/or reserved seal image, it is transformed into CMYK color pattern;
According to specified Color Channel in the seal image to be identified of CMYK color pattern and the reserved seal image Image data, gray processing processing is carried out respectively to the seal image to be identified and the reserved seal image, determines gray scale The reserved seal image of the seal image to be identified and gray processing changed.
Optionally, the seal image to be identified according to CMYK color pattern and the reserved seal image middle finger The image data for determining Color Channel carries out at gray processing the seal image to be identified and the reserved seal image respectively Reason, including:
According to the pixel value in the channels M and the channels Y, the seal image to be identified of CMYK color pattern and reserved print are determined respectively The gray value of respective pixel point in chapter image;Or,
According to the pixel value of C-channel and the channels M, the seal image to be identified of CMYK color pattern and reserved print are determined respectively The gray value of respective pixel point in chapter image.
Optionally, the reserved seal image of the seal image to be identified of the determining gray processing and gray processing it Afterwards, further include:
Determine the seal region to be identified in the seal image to be identified of gray processing, and, determine the institute of gray processing State the reserved seal region in reserved seal image;
The corresponding image in seal region to be identified and the corresponding image in the reserved seal region are normalized Processing;
According to profile information, the reserved seal of the corresponding image in the seal region to be identified after normalized The profile information of the corresponding image in region, determines whether the seal image to be identified and the reserved seal image match;
When determining matching, jump to described by treating identifying stamp image and reserved seal image progress characteristic point Match, screens the step of obtaining several points to candidate feature.
Optionally, described to carry out Feature Points Matching by treating identifying stamp image and reserved seal image, screening obtains The step of several points to candidate feature, including:
Extract the characteristic point in seal image to be identified and reserved seal image;
By calculate in the seal image to be identified each characteristic point respectively with each spy in the reserved seal image The distance between sign point, determines each Feature Points Matching with the seal image to be identified in the reserved seal image Characteristic point;
Determine that the distance meets the characteristic point of the seal image to be identified of preset condition and the reserved seal figure The characteristic point of picture obtains several to candidate feature point.
Optionally, described according to described several to candidate feature point, the step of determining affine transformation matrix, including:
According at least four pairs of candidate feature points in several points to candidate feature, affine transformation matrix is determined.
Optionally, the determination includes the steps that the first figure of the seal image to be identified, including:
Determine that the boundary rectangle of the seal image to be identified is the first figure.
Optionally, the information of the information and the second graph according to first figure, determines described to be identified The step of similarity score of seal image and the seal in the reserved seal image, including:
The length-width ratio and area of first figure are determined according to the information of first figure, and, according to described The information of two figures determines the length-width ratio and area of the second graph;
According to formula
Score=(min (SRatio,RRatio)/max(SRatio,RRatio)+min(SArea,RArea)/max(SArea,RArea))/ 2, determine the similarity score score of the seal image to be identified and the seal in the reserved seal image, wherein SRatio For the length-width ratio of the first figure, SAreaFor the area of the first figure, RRatioFor the length-width ratio of second graph, RAreaFor second graph Area, min () be minimum value function, max () be max function.
Second aspect, the embodiment of the present invention additionally provide a kind of seal coalignment, including:
Candidate feature point is to determining module, for carrying out characteristic point by treating identifying stamp image and reserved seal image Matching, screening obtain several to candidate feature point;
Affine transformation matrix determining module, for according to described several to candidate feature point, determining affine transformation matrix;
Information extraction and conversion module include the first figure of the seal image to be identified for determination, and, it is based on The second graph that the affine transformation matrix to first figure obtain after affine transformation;
Matching module is used for the information of the information and the second graph according to first figure, waits knowing described in determination The similarity score of other seal image and the seal in the reserved seal image.
Optionally, described device further includes:
Color mode conversion module, for by seal image to be identified and/or reserved seal image, being transformed into CMYK color Pattern;
Gray processing module is used for the seal image to be identified according to CMYK color pattern and the reserved seal image In specify Color Channel image data, gray processing is carried out respectively to the seal image to be identified and the reserved seal image Processing, determines the seal image to be identified of gray processing and the reserved seal image of gray processing.
Optionally, the gray processing module is further used for:
According to the pixel value in the channels M and the channels Y, the seal image to be identified of CMYK color pattern and reserved print are determined respectively The gray value of respective pixel point in chapter image;Or,
According to the pixel value of C-channel and the channels M, the seal image to be identified of CMYK color pattern and reserved print are determined respectively The gray value of respective pixel point in chapter image.
Optionally, described device further includes:
Seal area determination module, the seal area to be identified in the seal image to be identified for determining gray processing Domain, and, determine the reserved seal region in the reserved seal image of gray processing;
Module is normalized, for corresponding to the corresponding image in seal region to be identified and the reserved seal region Image is normalized;
Preliminary matches module, for the profile according to the corresponding image in the seal region to be identified after normalized The profile information of information, the corresponding image in the reserved seal region, determines the seal image to be identified and the reserved print Whether chapter image matches;
Jump module is judged, in the seal image to be identified and the reserved seal image matching, jumping to The candidate feature point is executed to determining module.
Optionally, the candidate feature point is further used for determining module:
Extract the characteristic point in seal image to be identified and reserved seal image;
By calculate in the seal image to be identified each characteristic point respectively with each spy in the reserved seal image The distance between sign point, determines each Feature Points Matching with the seal image to be identified in the reserved seal image Characteristic point;
Determine that the distance meets the characteristic point of the seal image to be identified of preset condition and the reserved seal figure The characteristic point of picture obtains several to candidate feature point.
Optionally, the affine transformation matrix determining module is further used for:
According at least four pairs of candidate feature points in several points to candidate feature, affine transformation matrix is determined.
Optionally, the determination includes the first figure of the seal image to be identified, including:
Determine that the boundary rectangle of the seal image to be identified is the first figure.
Optionally, the matching module is further used for:
The length-width ratio and area of first figure are determined according to the information of first figure, and, according to described The information of two figures determines the length-width ratio and area of the second graph;
According to formula
Score=(min (SRatio,RRatio)/max(SRatio,RRatio)+min(SArea,RArea)/max(SArea,RArea))/ 2 determine the similarity score score of the seal image to be identified and the seal in the reserved seal image, wherein SRatio For the length-width ratio of the first figure, SAreaFor the area of the first figure, RRatioFor the length-width ratio of second graph, RAreaFor second graph Area, min () be minimum value function, max () be max function.
The third aspect, the embodiment of the present invention additionally provide a kind of electronic equipment, including memory, processor and are stored in institute The computer program that can be run on memory and on a processor is stated, the processor realizes this when executing the computer program Seal matching process described in inventive embodiments.
Fourth aspect, the embodiment of the present invention additionally provide a kind of computer readable storage medium, are stored thereon with computer Program, when which is executed by processor realize the embodiment of the present invention described in seal matching process the step of.
Seal matching process disclosed by the embodiments of the present invention is carried out by treating identifying stamp image and reserved seal image Feature Points Matching, screening obtain several to candidate feature point;According to described several to candidate feature point, affine transformation square is determined Battle array;Determination includes the first figure of the seal image to be identified, and, based on the affine transformation matrix to first figure Shape carries out the second graph obtained after affine transformation;According to the information of the information and the second graph of first figure, really The similarity score of the fixed seal image to be identified and the seal in the reserved seal image, solve in the prior art into The low problem of matching efficiency caused by existing operand is big when row seal matches.Seal disclosed in the embodiment of the present application matches Method, by according to matched characteristic point to build affine matrix, and further according to affine matrix to seal to be matched carry out The deviation of the result of affine transformation, the anti-matching degree for pushing away the characteristic point pair for generating affine transformation matrix, and then realize seal matching, Operand is small, effectively improves the matched efficiency of seal.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, needed in being described below to the embodiment of the present invention Attached drawing to be used is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, For those of ordinary skill in the art, without having to pay creative labor, it can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is the seal matching process flow chart of the embodiment of the present invention one;
Fig. 2 is the seal matching process flow chart of the embodiment of the present invention two;
Fig. 3 is the seal matching process flow chart of the embodiment of the present invention three;
Fig. 4 is one of seal coalignment structural schematic diagram of the embodiment of the present invention four;
Fig. 5 is the seal coalignment second structural representation of the embodiment of the present invention four;
Fig. 6 is the seal coalignment third structural representation of the embodiment of the present invention four.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, all other implementation that those of ordinary skill in the art are obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Embodiment one:
A kind of seal matching process is present embodiments provided, as shown in Figure 1, the method includes:Step 10 is to step 13.
Step 10, Feature Points Matching is carried out by treating identifying stamp image and reserved seal image, screening obtains several To candidate feature point.
Seal image to be identified and reserved seal image described in the present embodiment are the gray level image segmented, described to wait for Only include seal image in identifying stamp image and reserved seal image, does not include other ambient noise images.When to be matched When image includes other ambient noise images, it is also necessary to not include other to extract by being positioned to seal image The seal image of noise image.When the non-gray level image of image to be matched, it is also necessary to first carry out gray processing to image to be matched Processing, with the seal image to be identified for obtaining gray processing and reserved seal image.
When the gray value that certain in image is put is all bigger or small than the gray value of most of pixels in surrounding neighbors, which is Characteristic point.When it is implemented, method in the prior art is used first, such as ORB (Oriented FAST and Rotated BRIEF) algorithm extracts the characteristic point in seal image to be identified and reserved seal image;Then, according to the spy in two images The distance between sign point is filtered noise characteristic point, determines that the distance between characteristic point is less than the several to spy of predetermined threshold value Sign point is for carrying out characteristic matching.In general, the distance between characteristic point is smaller to illustrate that respective image location matches degree is higher.
Step 11, according to described several to candidate feature point, affine transformation matrix is determined.
Affine transformation, also known as affine maps refer in geometry, and a vector space carries out once linear transformation and connects One translation, is transformed to another vector space.Affine transformation is one between being geometrically defined as two vector spaces Affine transformation or affine maps.The finite dimension the case where, each affine transformation can be provided by a matrix and a vector, Matrix, that is, the affine transformation matrix.The process of affine transformation is actually to be carried out to input vector by affine transformation matrix Linear function converts and the process of translation.The application by the mapping relations of multipair candidate feature point when it is implemented, determined imitative The parameter for penetrating transformation matrix, finally obtains affine transformation matrix.
Step 12, determination includes the first figure of the seal image to be identified, and, it is based on the affine transformation matrix The second graph that first figure obtained after affine transformation.
When it is implemented, can include print to be identified according to the edge determination in seal region in the seal image to be identified The minimum rectangle or smallest circular of chapter, smallest triangle etc., as the first figure.Then, pass through the affine transformation matrix pair First figure carries out affine transformation, obtains second graph.For example, when first figure is rectangle, for the first figure Affine transformation is made on four vertex of shape respectively, four after being converted vertex, according to four vertex after transformation, determines second Figure.
Step 13, according to the information of the information and the second graph of first figure, the seal to be identified is determined The similarity score of image and the seal in the reserved seal image.
When it is implemented, can according to before transformation the first figure and transformation after second graph length-width ratio and area, Determine the similarity score of the seal image to be identified and the seal in the reserved seal image.For example, by calculating two The change rate of the length-width ratio of a rectangle and the change rate of area determine the seal image to be identified and the reserved seal image In seal similarity score.Since affine transformation matrix obtains training according to matched characteristic point, it is affine Transformation matrix reflects the matching relationship of seal image to be identified and reserved seal image.It is carried out according to by affine transformation matrix The difference between object before the object obtained after affine transformation and affine transformation further determines that and generates affine transformation matrix Difference between seal image.
Seal matching process disclosed in the embodiment of the present application is carried out by treating identifying stamp image and reserved seal image Feature Points Matching, screening obtain several to candidate feature point;According to described several to candidate feature point, affine transformation square is determined Battle array;Determination includes the first figure of the seal image to be identified, and, based on the affine transformation matrix to first figure Shape carries out the second graph obtained after affine transformation;According to the information of the information and the second graph of first figure, really The similarity score of the fixed seal image to be identified and the seal in the reserved seal image, solve in the prior art into The row seal problem that existing operand causes matching efficiency low in turn greatly when matching.Seal disclosed in the embodiment of the present application matches Method, by according to matched characteristic point to build affine matrix, and further according to affine matrix to seal to be matched carry out The deviation of the result of affine transformation, the anti-matching degree for pushing away the characteristic point pair for generating affine transformation matrix, and then realize seal matching, Operand is small, effectively improves the matched efficiency of seal.
Embodiment two:
Referring to Fig. 2, seal matching process disclosed in the present embodiment, including:Step 20 is to step 25.
Step 20, by seal image to be identified and/or reserved seal image, it is transformed into CMYK color pattern.
When it is implemented, if two seal images to be matched, i.e., seal image to be identified and reserved seal image are not Only include seal region including noise image, still, wherein some image is not gray level image, then firstly the need of by the figure As being converted to gray level image, to reduce the operand of images match.Therefore, when in seal image to be identified and reserved seal image Any one when not being gray level image, it is described to carry out characteristic point by treating identifying stamp image and reserved seal image Match, before screening obtains several points to candidate feature, further includes:By seal image to be identified and/or reserved seal image, conversion To CMYK color pattern;According to specified face in the seal image to be identified of CMYK color pattern and the reserved seal image The image data of chrominance channel carries out gray processing processing, really respectively to the seal image to be identified and the reserved seal image Determine the seal image to be identified of gray processing and the reserved seal image of gray processing.
In general, the seal image to be matched of acquisition is the image of RGB (Red, Green, Blue) color mode.It carries out special Before sign point extraction, first, by seal image to be identified and/or reserved seal image, be transformed into CMYK (Cyan, Magenta, Yellow, Key Plate) color mode.For example, treating each rgb pixel of matched seal image and reserved seal image It proceeds as follows, to execute the conversion of color of image pattern:K values are calculated by formula K=min (1-R, 1-G, 1-B) first; Then, then by formula C=255-R-K, M=255-G-K, Y=255-B-K calculate separately the value of C, M, Y.To in seal image Each pixel execute above-mentioned conversion respectively after, the seal image to be identified of CMYK color pattern and described will be obtained Reserved seal image.
Step 21, according to specified face in the seal image to be identified of CMYK color pattern and the reserved seal image The image data of chrominance channel carries out gray processing processing, really respectively to the seal image to be identified and the reserved seal image Determine the seal image to be identified of gray processing and the reserved seal image of gray processing.
Common seal is red seal, and in the prior art, there is also blue seal, purple seals etc..When it is implemented, It can be determined by the distribution of each channel image data in statistics seal image to be identified or reserved seal image described to be identified The color of seal image or reserved seal image.It is more than default value for example, in seal image to be identified in the data of C-channel Pixel accounting be higher than other channels, it is determined that current seal is red seal.Seal figure to be identified can also be preset Seal color in picture or reserved seal image.
When it is implemented, by taking the red seal of matching as an example, the seal figure to be identified according to CMYK color pattern The image data that Color Channel is specified in picture and the reserved seal image, to the seal image to be identified and the reserved print Chapter image carries out gray processing processing respectively, including:According to the pixel value in the channels M and the channels Y, CMYK color pattern is determined respectively The gray value of respective pixel point in seal image to be identified and reserved seal image.Seal is usually peony, in CMYK color Under pattern (indigo-blue C, magenta M, Huang Y, black K), the mixing of pinkish red (M) and yellow (Y) are peony, in order to by the red in image Seal Abstraction comes out, and when carrying out gradation conversion to seal image, can only consider the picture in the two channels of the channels M and the channels Y Element value, you can red seal Abstraction is come out, therefore proposes to extract the algorithm of red seal under CMYK color pattern.
For example, under CMYK patterns, can summation directly be weighted to the pixel value in the channels M and the channels Y, obtain corresponding picture The gray value Gray of vegetarian refreshments.For example, integrating the pixel value in the channels M and the channels Y by formula Gray=0.6*M+0.4*Y, obtain The gray value of respective pixel point.Wherein, the weight of the pixel value in the channels M and the channels Y is empirically determined.By this method, The seal image to be identified of gray processing and reserved seal image can be respectively obtained.By this method, ash is being carried out to image While degreeization processing, and the noise image in addition to seal region is filtered out, has further improved the matched accuracy of seal.
In another case, described according to the described to be identified of CMYK color pattern if matched is blue seal The image data that Color Channel is specified in seal image and the reserved seal image, to the seal image to be identified and described Reserved seal image carries out gray processing processing respectively, including:According to the pixel value of C-channel and the channels M, CMYK color is determined respectively The gray value of respective pixel point in the seal image to be identified and reserved seal image of pattern.Pass through the picture to C-channel and the channels M Plain value is weighted summation, obtains the method for the gray value Gray of respective pixel point referring to aforementioned formula, details are not described herein again.
After step 20 and step 21 processing, the seal image to be identified and the reserved seal image are gray-scale map Picture can be used for carrying out Feature Points Matching.
Step 22, Feature Points Matching is carried out by treating identifying stamp image and reserved seal image, screening obtains several To candidate feature point.
Described to carry out Feature Points Matching by treating identifying stamp image and reserved seal image, screening obtains several to waiting Characteristic point is selected, including:Extract the characteristic point in seal image to be identified and reserved seal image;By calculating the print to be identified Each characteristic point determines the reserved print respectively with the distance between each characteristic point in the reserved seal image in chapter image In chapter image with the characteristic point of each Feature Points Matching of the seal image to be identified;It is default to determine that the distance meets The characteristic point of the characteristic point and the reserved seal image of the seal image to be identified of condition, as a pair of of candidate feature Point, it is several to candidate feature point to obtain.
In the present embodiment, to use ORB (Oriented FAST and Rotated BRIEF) algorithm, extraction to be identified Seal image and characteristic point in reserved seal image and for carrying out Feature Points Matching, identifying stamp image is treated in detailed description Feature Points Matching, the method for determining characteristic point pair are carried out with reserved seal image.
ORB Feature Points Matching algorithms are established on the basis of the detection of FAST characteristic points and BRIEF feature point descriptions, and It is better than both algorithms on matching speed.ORB matching algorithms are broadly divided into following steps:First, it is calculated using Oriented FAST Method detects the characteristic point on two images to be matched;The characteristic point detected is converted by Rotated BRIEF descriptors again For binary system description vectors;Finally, final characteristic point pair is obtained further according to the Hamming distance between characteristic point, as matching The characteristic point arrived.
Gray value is I (P) at postulated point P, and 16 gray values around point P are I (x), x ∈ [0,15], then can be used such as Lower angle point receptance function CRF judges whether point P is characterized a little:
Wherein, εdTo meet the threshold value of 2 gray differences.When N be more than certain threshold value when, judge this point be characterized a little, N is 9 in ORB algorithms.In order to make Feature Points Matching algorithm that there is direction invariance, ORB algorithms to be characterized using gray scale centroid method Point provides a principal direction:The gray scale centre of form in characteristic point regional area is found, with the direction vector of characteristic point to the centre of form come really Determine the principal direction of characteristic point, the formula of regional area square is:
Then the gray scale centre of form on characteristic point region is:
The then principal direction of the angle and FAST characteristic points of barycenter and characteristic point:θ=arctan (m01,m10).BRIEF is described Sub- generating process is as follows:Point is generated at random in image block to (points can be 128,256,512), each point is to corresponding one A binary digit, is defined as follows:
Wherein, I (x), I (y) are the gray scales of point pair, and random selection N is to putting to (xi, yi), so that it may to generate binary system descriptor, indicate as follows:
To avoid the influence of noise, ORB algorithms are using following strategy:In the 31*31 pixel regions of feature vertex neighborhood with Machine chooses the child window of 5*5, and the gray integration of comparison window carrys out the comparison of the pixel value of substitution point pair.It is retouched to solve BRIFEF It states son and does not have the problem of rotational invariance, ORB algorithms propose to determine transformation matrix R using the principal direction of characteristic pointθ, in spy The n chosen on sign point converts eigenmatrix S, obtains new Description Matrix Sθ, specific as follows:
Therefore the BRIEF after correcting describes son and is:
gn(p,θ):=fn(p)|(xi,yi)∈Sθ, wherein n desirable 128,256,512.
Characteristic point in identifying stamp image and reserved seal image is treated to later, further according to characteristic point determining The distance between noise characteristic point is filtered, determine the distance between characteristic point be less than predetermined threshold value it is several to characteristic point For carrying out characteristic matching.For example, ORB Feature Descriptors are tieed up for having obtained n in abovementioned steps, in order to establish two images Correspondence, calculates each characteristic point on seal image to be identified to reserving the Hamming distances of whole characteristic points in seal image, It is indicated with D (Vp, Vq), wherein Vp is the feature vector of a certain characteristic point in seal image to be identified, and Vq is reserved seal image The feature vector of upper characteristic point q, D (Vp, Vq) is smaller, illustrates that two characteristic points are more similar, takes the characteristic point of Hamming distance minimum To being the characteristic point being matched to.
The characteristic point being matched to is characterized a little pair.When it is implemented, each pair of characteristic point can calculate an Euclidean distance, According to the length filtering characteristic point of Euclidean distance.It is P with characteristic point on reserved seal imaget(Xt,Yt) for, it is assumed that it is right therewith The pixel on seal image to be identified answered is Ps(Xs,Ys), then the calculation of Euclidean distance is as follows:
When it is implemented, can determine that the Euclidean distance is less than pre-determined distance The characteristic point of the characteristic point and the reserved seal image of the seal image to be identified of threshold value, as a pair of of candidate feature Point, it is several to candidate feature point to obtain.
Step 23, according to described several to candidate feature point, affine transformation matrix is determined.
When it is implemented, can be according to RANSAC algorithms, based on determining several candidate feature points to obtaining affine transformation Matrix H.
Assuming that the characteristic point on reserved seal image is Pt(Xt,Yt), the feature on corresponding seal image to be identified Point is Ps(Xs,Ys), the another correspondence is affine transformation matrix H, then the pixel of reserved seal image to seal image to be identified The mapping relations of point are expressed from the next:
As can be seen from the above equation, affine transformation matrix H has 8 degree of freedom, theoretically at least needs four pairs of characteristic points can To estimate H.The solution procedure of above-mentioned matrix can regard the process for solving equation group as, can be obtained including 3 by above-mentioned matrix The equation group that 3 equations of a unknown number and 9 coefficients are constituted needs to solve the coefficient unique value in above-mentioned equation group The value of multigroup unknown number.In general, in order to determine 9 coefficients, the actual value of 9 groups of unknown numbers is needed, still, by this matrix conversion Obtained equation can derive coefficient h20And h21It is linearly related, can be turned above-mentioned 9 coefficients by linear relationship 8 coefficients are melted into, and solve 8 coefficients, at least need the actual value of 8 groups of unknown numbers, i.e., the value of 4 characteristic points pair.Therefore, institute State according to it is described it is several affine transformation matrix is determined to candidate feature point, including:According in several points to candidate feature At least four pairs of candidate feature points, determine affine transformation matrix.
There are many ways to estimating H, least square method may be used in mode the most traditional, but least square method is to making an uproar Acoustic sensing is not suitable for the fitting of characteristic point mapping relations in image;Another method is random sampling consistency (RANSAC) Algorithm, the algorithm are widely used in the estimation of image mapping matrix, therefore it is affine to utilize RANSAC algorithms to estimate in this patent Transformation matrix H.
The input of RANSAC algorithms is one group of observation data, a determining parameterization matrix (unknown parameters), in order to incite somebody to action Parameter estimation comes out, and RANSAC reaches target by choosing in data one group of random subset repeatedly, and the subset being selected becomes Intra-office point, intra-office are counted out more, and model is more reasonable, until reaching end condition, terminate iteration.Basic step can be summarized such as Under:
1) randomly selects the minimal data of affine transformation matrix parameter Estimation from data, in the present embodiment, minimum It is 4 according to number, affine transformation matrix H is calculated using least square method.
2) calculates remaining in data set and puts and calculated model distance D, works as D<t1When, decide that the point is interior point, and Point number n in statistics.Work as n>t2When, judge the affine transformation matrix for Optimal matrix Hbest, and record statistical error errormin (range error of the point with affine transformation matrix in each).
3) repeats process above, the error and error newly obtainedminSize works as error<errorminWhen, errormin=error.
4) is when by n times iteration, so that it may to obtain Optimal matrix H.
Step 24, determination includes the first figure of the seal image to be identified, and, it is based on the affine transformation matrix The second graph that first figure obtained after affine transformation.
The first figure including the seal image to be identified is the Minimum Area for including all seal regions to be identified, this In embodiment, seal matching process is illustrated by rectangle of the first figure.When it is implemented, the determination waits knowing including described First figure of other seal image, including:Determine that the boundary rectangle of the seal image to be identified is the first figure.It is described to wait knowing The boundary rectangle of other seal image can carry out binaryzation by the seal image to be identified to gray processing and then further lead to The boundary rectangle that sciagraphy determines seal region in the seal image to be identified according to binary image is crossed, as the first figure Shape.
By taking the first graphical representation is S as an example, it is assumed that the width of the first figure is denoted as w, and height is denoted as h, and the vertex of the first figure S is sat Mark is expressed as:
SLT(0,0)、SRT(w-1,0)、SLB(0,h-1)、SRB(w-1,h-1)。
Then, the affine transformation matrix obtains second graph after carrying out affine transformation to first figure.For example, logical It crosses formula 1 and affine transformation is done to four fixed point coordinates of the first figure S respectively, obtain four new summit S'LT、S'RT、S'LB、S 'RB, further, using this four new summits as the upper left of rectangle, upper right, lower-left, bottom right vertex coordinate, determine one A new rectangle is denoted as second graph R.
Step 25, according to the information of the information and the second graph of first figure, the seal to be identified is determined The similarity score of image and the seal in the reserved seal image.
According to the information of the information and the second graph of first figure, the seal image to be identified and institute are determined The similarity score of the seal in reserved seal image is stated, including:According to the information of first figure and the second graph Information difference, determine the similarity score of the seal image to be identified and the seal in the reserved seal image.
Specifically, according to the information of the information and the second graph of first figure, the seal to be identified is determined The similarity score of image and the seal in the reserved seal image can be:Institute is determined according to the information of first figure The length-width ratio and area of the first figure are stated, and, the length-width ratio of the second graph is determined according to the information of the second graph And area;According to formula S core=(min (SRatio,RRatio)/max(SRatio,RRatio)+min(SArea,RArea)/max(SArea, RArea))/2 similarity score score for determining the seal image to be identified and the seal in the reserved seal image, In, SRatioFor the length-width ratio of the first figure, SAreaFor the area of the first figure, RRatioFor the length-width ratio of second graph, RAreaFor The area of second graph, min () are minimum value function, and max () is max function;Wherein, the length-width ratio of the first figure is the The most short side of one figure and the ratio of longest edge, the length-width ratio of second graph are the ratio of the most short side and longest edge of second graph Value.
When it is implemented, first, according to formula SRatio=Min (width, height)/Max (width, height) is calculated Go out the length-width ratio S of the first figureRatio, and according to formula SArea=width*height calculates the area of the first figure SArea, wherein width is the width of the first figure, and height is the height of the first figure.Then, is calculated according to the method described above The length-width ratio R of two figuresRatioWith area RArea.Finally, according to formula
Score=(min (SRatio,RRatio)/max(SRatio,RRatio)+min(SArea,RArea)/max(SArea,RArea))/ 2 determine the similarity score score of the seal image to be identified and the seal in the reserved seal image.
When Sroce closer to 1 when, illustrate the seal in seal image to be identified and the seal phase in reserved seal image It is bigger like degree, it is that the possibility of the same seal is bigger;Conversely, illustrating the seal in seal image to be identified and reserved seal Seal similarity degree in image is smaller, is that the possibility of the same seal is smaller.
Seal matching process disclosed in the embodiment of the present application, by first by seal image to be identified and/or reserved seal Image is transformed into CMYK color pattern;Then, according to the seal image to be identified of CMYK color pattern and the reserved print The image data that Color Channel is specified in chapter image, carries out the seal image to be identified and the reserved seal image respectively Gray processing processing, determines the seal image to be identified of gray processing and the reserved seal image of gray processing, further, Seal image to be identified and reserved seal image to gray processing carry out Feature Points Matching, and screening obtains several to candidate feature Point;According to described several to candidate feature point, affine transformation matrix is determined;Determination includes the first of the seal image to be identified Figure, and, the second graph that first figure obtain after affine transformation based on the affine transformation matrix;Most Afterwards, according to the information of the information and the second graph of first figure, the seal image to be identified and described pre- is determined The similarity score for staying the seal in seal image solves existing operand when carrying out seal matching in the prior art and leads greatly The problem of inefficiency of cause.
Seal matching process disclosed in the embodiment of the present application, by according to matched characteristic point to build affine matrix, and The deviation of the result of affine transformation is further carried out to seal to be matched according to affine matrix, counter push away generates affine transformation matrix The matching degree of characteristic point pair, and then realize seal matching, operand is small, effectively improves the matched efficiency of seal.According to affine The characteristic information of transformation gained rectangle does seal matching, to insensitive for noise, and more in the prior art by rotating, being registrated iseikonia Element operation carries out seal matching and compares, and operand is small, and seal matching efficiency is high.
When scheme in the prior art is based on extracting seal image under HIS color modes, used in calculating process floating Point processing, and after obtaining red seal location information according to HSI models, directly done binary conversion treatment, be unfavorable for subsequent Characteristic point detects.And the application is by CMYK color pattern, carrying out gray processing processing, while carrying out gray processing processing, It has been effectively maintained seal region, while effectively having filtered ambient noise, has further improved the matched efficiency of seal and accurate Rate.
Embodiment three:
Referring to Fig. 3, seal matching process disclosed in the present embodiment, including:Step 30 is to step 38.
Step 30, by seal image to be identified and/or reserved seal image, it is transformed into CMYK color pattern.
By seal image to be identified and/or reserved seal image, it is transformed into the specific implementation mode ginseng of CMYK color pattern See embodiment two, this embodiment is not repeated.
Step 31, according to specified face in the seal image to be identified of CMYK color pattern and the reserved seal image The image data of chrominance channel carries out gray processing processing, really respectively to the seal image to be identified and the reserved seal image Determine the seal image to be identified of gray processing and the reserved seal image of gray processing.
According to specified Color Channel in the seal image to be identified of CMYK color pattern and the reserved seal image Image data, gray processing processing is carried out respectively to the seal image to be identified and the reserved seal image, determines gray scale The specific implementation mode of the reserved seal image of the seal image to be identified and gray processing changed is referring to embodiment two, originally Embodiment repeats no more.
After step 30 and step 31 processing, the seal image to be identified and the reserved seal image are gray-scale map Picture.If in seal image to be identified and the reserved seal image not including ambient noise image, and point of two images Resolution and in the same size, then the seal image to be identified after gray processing and the reserved seal image can be used for carrying out characteristic point Matching.
Preferably, in order to avoid two images size to be matched or the inconsistent or to be matched two images of shape In there are ambient noise image, the seal image to be identified of the determining gray processing and the reserved seal figures of gray processing As after, further include:Determine the seal region to be identified in the seal image to be identified of gray processing, and, determine gray scale Reserved seal region in the reserved seal image changed;To the corresponding image in the seal region to be identified and described reserved The corresponding image in seal region is normalized;According to the corresponding figure in the seal region to be identified after normalized The profile information of the profile information of picture, the corresponding image in the reserved seal region, determines the seal image to be identified and institute State whether reserved seal image matches;If the seal image to be identified and the reserved seal image matching, jump to described Feature Points Matching is carried out by treating identifying stamp image and reserved seal image, screening obtains several steps to candidate feature point Suddenly;If the seal image to be identified and the reserved seal image mismatch, terminate to match flow.
Step 32, the seal region to be identified in the seal image to be identified of gray processing is determined, and, determine gray scale Reserved seal region in the reserved seal image changed.
When it is implemented, in order to filter the noise image in the seal image to be identified and the reserved seal image, After the seal image to be identified of the determining gray processing and the reserved seal image of gray processing, it is also necessary to described to wait for Identifying stamp image and/or reserved seal image carry out denoising, specifically include:By the seal figure to be identified of gray processing Picture and the reserved seal image, difference binaryzation;It is determined respectively using big law combination sciagraphy and waits knowing described in gray processing The reserved seal region in seal region to be identified and the reserved seal image in other seal image.
Seal region to be identified in the seal image to be identified for determining gray processing and the reserved seal image In reserved seal region after, can be cut off other than seal region to be identified and reserved seal region by way of cutting figure Ambient noise image, to determine that the image in seal region to be identified described in the seal image to be identified of gray processing is to wait for The matched seal image to be identified, and, it determines and reserves seal region described in the reserved seal image of gray processing Image be the reserved seal image to be matched.
Step 33, the corresponding image of the corresponding image in seal region to be identified and the reserved seal region is carried out Normalized.
Further, it in order to avoid the seal image to be identified got is different with the resolution ratio of reserved seal image, leads The size of cause is inconsistent, and the application is when it is implemented, also need to the corresponding image in the seal region to be identified and described pre- The corresponding image in seal region is stayed to be normalized, the image to be matched sought unity of standard.
When it is implemented, can be by way of cubic interpolation, to the corresponding image in the seal region to be identified and institute It states the corresponding image in reserved seal region to be normalized, by distortion of the corresponding image in seal region in normalization It is reduced to minimum.The consistent corresponding image in seal region to be identified of resolution ratio and the reserved seal region are corresponded to Image, need not be normalized.By to the corresponding image in seal region to be identified and the reserved seal The corresponding image in region is normalized, and can promote the matched accuracy of seal.
Step 34, according to the profile information of the corresponding image in seal region to be identified after normalized, reserved seal The profile information of the corresponding image in region, determines whether seal image to be identified and reserved seal image match, if so, executing Step 35, otherwise, terminate current matching flow.
If passing through the profile of seal the region corresponding image and the corresponding image in the reserved seal region to be identified Information determines that the seal to be identified and the reserved seal mismatch, then no longer carries out subsequent match operation.Specific implementation When, the profile information can be length-width ratio, shape etc..
For example, reserved seal region is complete circular stamp, and seal to be identified is semicircle or rectangular seal, then this step According to the length-width ratio of the corresponding image in the seal region to be identified, the length and width of the corresponding image in the reserved seal region in rapid Than can directly determine that two seals to be matched mismatch.If according to the corresponding figure in the seal region to be identified in this step Whether the length-width ratio of picture, the length-width ratio of the corresponding image in the reserved seal region can not directly determine two seals to be matched It matches (such as two seal profile informations to be matched are identical), then continues to execute and matched operation is carried out according to characteristic point.
If the seal image to be identified and the reserved seal image matching, illustrate the seal image to be identified and institute It is outline to state reserved seal image only, it is also necessary to further carry out Feature Points Matching.It jumps to described by treating knowledge The step of other seal image and reserved seal image carry out Feature Points Matching, and screening obtains several points to candidate feature, after continuation Continuous matching flow.
Step 35, Feature Points Matching is carried out by treating identifying stamp image and reserved seal image, screening obtains several To candidate feature point.
Feature Points Matching is carried out by treating identifying stamp image and reserved seal image, screening obtains several to candidate special The specific implementation mode of point is levied referring to embodiment two, this embodiment is not repeated.
Step 36, according to described several to candidate feature point, affine transformation matrix is determined.
According to described several to candidate feature point, the specific implementation mode of affine transformation matrix is determined referring to embodiment two, This embodiment is not repeated.
Step 37, determination includes the first figure of the seal image to be identified, and, it is based on the affine transformation matrix The second graph that first figure obtained after affine transformation.
Determination includes the first figure of the seal image to be identified, and, based on the affine transformation matrix to described First figure carries out the specific implementation mode of the second graph obtained after affine transformation referring to embodiment two, and the present embodiment is no longer superfluous It states.
Step 38, according to the information of the information and the second graph of first figure, the seal to be identified is determined The similarity score of image and the seal in the reserved seal image.
According to the information of the information and the second graph of first figure, the seal image to be identified and institute are determined The specific implementation mode of the similarity score of the seal in reserved seal image is stated referring to embodiment two, the present embodiment is no longer superfluous It states.
Terminate matching flow.
Seal matching process disclosed in the embodiment of the present application is treating identifying stamp image and the progress of reserved seal image With image normalization is carried out first before, to promote the matched accuracy of seal image.Further, by according to figure to be matched The profile information in seal region tentatively judges whether two seal images to be matched match as in, can quickly recognize mismatch Seal, to improve the matched efficiency of seal.
Example IV:
Correspondingly, the invention also discloses a kind of seal coalignments, as shown in figure 4, described device includes:
Candidate feature point is to determining module 410, for carrying out spy by treating identifying stamp image and reserved seal image Sign point matching, screening obtains several to candidate feature point;
Affine transformation matrix determining module 420, for according to described several to candidate feature point, determining affine transformation square Battle array;
Information extraction and conversion module 430 include the first figure of the seal image to be identified for determination, and, The second graph that first figure obtain after affine transformation based on the affine transformation matrix;
Matching module 440 is used for the information of the information and the second graph according to first figure, is waited for described in determination The similarity score of identifying stamp image and the seal in the reserved seal image.
Seal coalignment disclosed in the embodiment of the present application is carried out by treating identifying stamp image and reserved seal image Feature Points Matching, screening obtain several to candidate feature point;According to described several to candidate feature point, affine transformation square is determined Battle array;Determination includes the first figure of the seal image to be identified, and, based on the affine transformation matrix to first figure Shape carries out the second graph obtained after affine transformation;According to the information of the information and the second graph of first figure, really The similarity score of the fixed seal image to be identified and the seal in the reserved seal image, solve in the prior art into The row seal problem that existing operand causes matching efficiency low in turn greatly when matching.Seal disclosed in the embodiment of the present application matches Device, by according to matched characteristic point to build affine matrix, and further according to affine matrix to seal to be matched carry out The deviation of the result of affine transformation, the anti-matching degree for pushing away the characteristic point pair for generating affine transformation matrix, and then realize seal matching, Operand is small, effectively improves the matched efficiency of seal.
Optionally, as shown in figure 5, described device further includes:
Color mode conversion module 450, for by seal image to be identified and/or reserved seal image, being transformed into CMYK Color mode;
Gray processing module 460 is used for the seal image to be identified according to CMYK color pattern and the reserved seal The image data that Color Channel is specified in image, ash is carried out to the seal image to be identified and the reserved seal image respectively Degreeization processing, determines the seal image to be identified of gray processing and the reserved seal image of gray processing.
Optionally, gray processing module 460 is further used for:
According to the pixel value in the channels M and the channels Y, the seal image to be identified of CMYK color pattern and reserved print are determined respectively The gray value of respective pixel point in chapter image;Or,
According to the pixel value of C-channel and the channels M, the seal image to be identified of CMYK color pattern and reserved print are determined respectively The gray value of respective pixel point in chapter image.
And the application is by CMYK color pattern, carrying out gray processing processing, while carrying out gray processing processing, very well Remain seal region, while effectively having filtered ambient noise, further improved the matched efficiency of seal and accuracy rate.
Optionally, as shown in fig. 6, above-mentioned apparatus further includes:
Seal area determination module 470, the seal to be identified in the seal image to be identified for determining gray processing Region, and, determine the reserved seal region in the reserved seal image of gray processing;
Module 480 is normalized, for the corresponding image in seal region to be identified and the reserved seal region pair The image answered is normalized;
Preliminary matches module 490, for according to the corresponding image in the seal region to be identified after normalized The profile information of profile information, the corresponding image in the reserved seal region determines the seal image to be identified and described pre- Stay whether seal image matches;
Jump module 4100 is judged, in the seal image to be identified and the reserved seal image matching, jumping It goes to and executes the candidate feature point to determining module.
Optionally, candidate feature point is further used for determining module 410:
Extract the characteristic point in seal image to be identified and reserved seal image;
By calculate in the seal image to be identified each characteristic point respectively with each spy in the reserved seal image The distance between sign point, determines each Feature Points Matching with the seal image to be identified in the reserved seal image Characteristic point;
Determine that the distance meets the characteristic point of the seal image to be identified of preset condition and the reserved seal figure The characteristic point of picture obtains several to candidate feature point.
Optionally, affine transformation matrix determining module 420 is further used for:
According at least four pairs of candidate feature points in several points to candidate feature, affine transformation matrix is determined.
Optionally, the determination includes the first figure of the seal image to be identified, including:
Determine that the boundary rectangle of the seal image to be identified is the first figure.
Optionally, matching module 430 is further used for:
The length-width ratio and area of first figure are determined according to the information of first figure, and, according to described The information of two figures determines the length-width ratio and area of the second graph;
According to formula
Score=(min (SRatio,RRatio)/max(SRatio,RRatio)+min(SArea,RArea)/max(SArea,RArea))/ 2 determine the similarity score score of the seal image to be identified and the seal in the reserved seal image, wherein SRatio For the length-width ratio of the first figure, SAreaFor the area of the first figure, RRatioFor the length-width ratio of second graph, RAreaFor second graph Area, min () be minimum value function, max () be max function.
Seal coalignment disclosed in the embodiment of the present application is treating identifying stamp image and the progress of reserved seal image With image normalization is carried out first before, to promote the matched accuracy of seal image.Further, by according to figure to be matched The profile information in seal region tentatively judges whether two seal images to be matched match as in, can quickly recognize mismatch Seal, to improve the matched efficiency of seal.
Correspondingly, the embodiment of the invention also discloses a kind of electronic equipment, the electronic equipment, including memory, processing Device and it is stored in the computer program that can be run on the memory and on a processor, the processor executes the computer The seal matching process described in the embodiment of the present invention one to embodiment three is realized when program.The electronic equipment can be mobile phone, PAD, tablet computer, human face recognition machine etc..
Correspondingly, the embodiment of the present invention additionally provides a kind of computer readable storage medium, it is stored thereon with computer journey Sequence, when which is executed by processor realize the embodiment of the present invention one to embodiment three described in seal matching process the step of.
The device of the invention embodiment is corresponding with method, the specific implementation side of each module and each unit in device embodiment Formula is referring to embodiment of the method, and details are not described herein again.
Those of ordinary skill in the art may realize that lists described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, depends on the specific application and design constraint of technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
One with ordinary skill in the art would appreciate that in embodiment provided herein, it is described to be used as separating component The unit of explanation may or may not be physically separated, you can be located at a place, or can also be distributed Onto multiple network element.In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit In, can also be that each unit physically exists alone, it can also be during two or more units be integrated in one unit.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention can be produced with software The form of product embodies, which is stored in a storage medium, including some instructions are used so that one Platform computer equipment (can be personal computer, server or the network equipment etc.) executes described in each embodiment of the present invention The all or part of step of method.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, ROM, RAM, magnetic disc or CD etc. The various media that can store program code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, ability Domain those of ordinary skill is it is to be appreciated that unit described in conjunction with the examples disclosed in the embodiments of the present disclosure and algorithm steps Suddenly, it can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions actually with hardware still Software mode executes, and depends on the specific application and design constraint of technical solution.Professional technician can be to each Specific application uses different methods to achieve the described function, but this realizes it is not considered that the model beyond the present invention It encloses.

Claims (18)

1. a kind of seal matching process, which is characterized in that including:
Feature Points Matching is carried out by treating identifying stamp image and reserved seal image, screening obtains several to candidate feature Point;
According to described several to candidate feature point, affine transformation matrix is determined;
Determination includes the first figure of the seal image to be identified, and, based on the affine transformation matrix to described first Figure carries out the second graph obtained after affine transformation;
According to the information of the information and the second graph of first figure, the seal image to be identified and described pre- is determined Stay the similarity score of the seal in seal image.
2. according to the method described in claim 1, it is characterized in that, described by treating identifying stamp image and reserved seal figure As carrying out Feature Points Matching, before screening the step of obtaining several points to candidate feature, further include:
By seal image to be identified and/or reserved seal image, it is transformed into CMYK color pattern;
According to the figure for specifying Color Channel in the seal image to be identified of CMYK color pattern and the reserved seal image As data, gray processing processing is carried out respectively to the seal image to be identified and the reserved seal image, determines gray processing The reserved seal image of the seal image to be identified and gray processing.
3. according to the method described in claim 2, it is characterized in that, the seal to be identified according to CMYK color pattern The image data that Color Channel is specified in image and the reserved seal image, to the seal image to be identified and described reserved Seal image carries out gray processing processing respectively, including:
According to the pixel value in the channels M and the channels Y, the seal image to be identified of CMYK color pattern and reserved seal figure are determined respectively The gray value of respective pixel point as in;Or,
According to the pixel value of C-channel and the channels M, the seal image to be identified of CMYK color pattern and reserved seal figure are determined respectively The gray value of respective pixel point as in.
4. according to the method described in claim 2, it is characterized in that, the seal image to be identified of the determining gray processing and After the reserved seal image of gray processing, further include:
Determine the seal region to be identified in the seal image to be identified of gray processing, and, determine the described pre- of gray processing Stay the reserved seal region in seal image;
The corresponding image in seal region to be identified and the corresponding image in the reserved seal region are normalized;
According to the profile information of the corresponding image in the seal region to be identified after normalized, the reserved seal region The profile information of corresponding image, determines whether the seal image to be identified and the reserved seal image match;
When determining matching, jump to described by treating identifying stamp image and reserved seal image progress Feature Points Matching, sieve The step of choosing obtains several points to candidate feature.
5. method according to any one of claims 1 to 4, which is characterized in that it is described by treat identifying stamp image and The step of reserved seal image carries out Feature Points Matching, and screening obtains several points to candidate feature, including:
Extract the characteristic point in seal image to be identified and reserved seal image;
By calculate in the seal image to be identified each characteristic point respectively with each characteristic point in the reserved seal image The distance between, determine the spy of each Feature Points Matching in the reserved seal image with the seal image to be identified Sign point;
Determine that the distance meets the characteristic point of the seal image to be identified of preset condition and the reserved seal image Characteristic point obtains several to candidate feature point.
6. method according to any one of claims 1 to 4, which is characterized in that described according to described several to candidate feature Point, the step of determining affine transformation matrix, including:
According at least four pairs of candidate feature points in several points to candidate feature, affine transformation matrix is determined.
7. method according to any one of claims 1 to 4, which is characterized in that the determination includes the seal to be identified The step of first figure of image, including:
Determine that the boundary rectangle of the seal image to be identified is the first figure.
8. the method according to the description of claim 7 is characterized in that described according to the information of first figure and described second The information of figure determines the step of the similarity score of the seal image to be identified and the seal in the reserved seal image Suddenly, including:
The length-width ratio and area of first figure are determined according to the information of first figure, and, according to second figure The information of shape determines the length-width ratio and area of the second graph;
According to formula
Score=(min (SRatio,RRatio)/max(SRatio,RRatio)+min(SArea,RArea)/max(SArea,RArea))/2, really The similarity score score of the fixed seal image to be identified and the seal in the reserved seal image, wherein SRatioIt is The length-width ratio of one figure, SAreaFor the area of the first figure, RRatioFor the length-width ratio of second graph, RAreaFor the face of second graph Product, min () are minimum value function, and max () is max function.
9. a kind of seal coalignment, which is characterized in that including:
Candidate feature point is to determining module, for carrying out characteristic point by treating identifying stamp image and reserved seal image Match, screening obtains several to candidate feature point;
Affine transformation matrix determining module, for according to described several to candidate feature point, determining affine transformation matrix;
Information extraction and conversion module include the first figure of the seal image to be identified for determination, and, based on described The second graph that affine transformation matrix to first figure obtain after affine transformation;
Matching module is used for the information of the information and the second graph according to first figure, determines the print to be identified The similarity score of chapter image and the seal in the reserved seal image.
10. device according to claim 9, which is characterized in that described device further includes:
Color mode conversion module, for by seal image to be identified and/or reserved seal image, being transformed into CMYK color mould Formula;
Gray processing module is used for the seal image to be identified according to CMYK color pattern and the reserved seal image middle finger The image data for determining Color Channel carries out at gray processing the seal image to be identified and the reserved seal image respectively Reason, determines the seal image to be identified of gray processing and the reserved seal image of gray processing.
11. device according to claim 10, which is characterized in that the gray processing module is further used for:
According to the pixel value in the channels M and the channels Y, the seal image to be identified of CMYK color pattern and reserved seal figure are determined respectively The gray value of respective pixel point as in;Or,
According to the pixel value of C-channel and the channels M, the seal image to be identified of CMYK color pattern and reserved seal figure are determined respectively The gray value of respective pixel point as in.
12. device according to claim 10, which is characterized in that described device further includes:
Seal area determination module, the seal region to be identified in the seal image to be identified for determining gray processing, with And determine reserved seal region in the reserved seal image of gray processing;
Module is normalized, for the corresponding image in seal region to be identified and the corresponding image in the reserved seal region It is normalized;
Preliminary matches module, for being believed according to the profile of the corresponding image in the seal region to be identified after normalized The profile information of breath, the corresponding image in the reserved seal region, determines the seal image to be identified and the reserved seal Whether image matches;
Jump module is judged, in the seal image to be identified and the reserved seal image matching, jumping to execution The candidate feature point is to determining module.
13. according to claim 9 to 12 any one of them device, which is characterized in that the candidate feature point is to determining module It is further used for:
Extract the characteristic point in seal image to be identified and reserved seal image;
By calculate in the seal image to be identified each characteristic point respectively with each characteristic point in the reserved seal image The distance between, determine the spy of each Feature Points Matching in the reserved seal image with the seal image to be identified Sign point;
Determine that the distance meets the characteristic point of the seal image to be identified of preset condition and the reserved seal image Characteristic point obtains several to candidate feature point.
14. according to claim 9 to 12 any one of them device, which is characterized in that the affine transformation matrix determining module It is further used for:
According at least four pairs of candidate feature points in several points to candidate feature, affine transformation matrix is determined.
15. according to claim 9 to 12 any one of them device, which is characterized in that the determination includes the print to be identified First figure of chapter image, including:
Determine that the boundary rectangle of the seal image to be identified is the first figure.
16. device according to claim 15, which is characterized in that the matching module is further used for:
The length-width ratio and area of first figure are determined according to the information of first figure, and, according to second figure The information of shape determines the length-width ratio and area of the second graph;
According to formula
Score=(min (SRatio,RRatio)/max(SRatio,RRatio)+min(SArea,RArea)/max(SArea,RArea))/2 really The similarity score score of the fixed seal image to be identified and the seal in the reserved seal image, wherein SRatioIt is The length-width ratio of one figure, SAreaFor the area of the first figure, RRatioFor the length-width ratio of second graph, RAreaFor the face of second graph Product, min () are minimum value function, and max () is max function.
17. a kind of electronic equipment, including memory, processor and it is stored on the memory and can runs on a processor Computer program, which is characterized in that the processor realizes claim 1 to 8 any one when executing the computer program The seal matching process.
18. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The step of seal matching process described in claim 1 to 8 any one is realized when execution.
CN201810464243.9A 2018-05-15 2018-05-15 Seal matching method and device Active CN108596197B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810464243.9A CN108596197B (en) 2018-05-15 2018-05-15 Seal matching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810464243.9A CN108596197B (en) 2018-05-15 2018-05-15 Seal matching method and device

Publications (2)

Publication Number Publication Date
CN108596197A true CN108596197A (en) 2018-09-28
CN108596197B CN108596197B (en) 2020-08-25

Family

ID=63631137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810464243.9A Active CN108596197B (en) 2018-05-15 2018-05-15 Seal matching method and device

Country Status (1)

Country Link
CN (1) CN108596197B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615645A (en) * 2018-12-07 2019-04-12 国网四川省电力公司电力科学研究院 The Feature Points Extraction of view-based access control model
CN109635818A (en) * 2018-10-26 2019-04-16 平安科技(深圳)有限公司 The anti-counterfeit of seals method of inspection, device and computer readable storage medium
CN111353485A (en) * 2018-12-20 2020-06-30 中国移动通信集团辽宁有限公司 Seal identification method, device, equipment and medium
CN111680549A (en) * 2020-04-28 2020-09-18 肯维捷斯(武汉)科技有限公司 Paper pattern recognition method
CN111753719A (en) * 2020-06-24 2020-10-09 上海依图网络科技有限公司 Fingerprint identification method and device
CN111860536A (en) * 2020-06-23 2020-10-30 南京南审审计大数据研究院有限公司 Image recognition method, device and storage medium
WO2021000702A1 (en) * 2019-06-29 2021-01-07 华为技术有限公司 Image detection method, device, and system
CN112766264A (en) * 2021-01-25 2021-05-07 广州互联网法院 Picture comparison method, electronic device and computer readable storage medium
CN112784835A (en) * 2021-01-21 2021-05-11 恒安嘉新(北京)科技股份公司 Method and device for identifying authenticity of circular seal, electronic equipment and storage medium
CN113077355A (en) * 2021-06-04 2021-07-06 国任财产保险股份有限公司 Insurance claim settlement method and device, electronic equipment and storage medium
CN113673321A (en) * 2021-07-12 2021-11-19 浙江大华技术股份有限公司 Target re-recognition method, target re-recognition apparatus, and computer-readable storage medium
US11354883B2 (en) 2019-12-30 2022-06-07 Sensetime International Pte. Ltd. Image processing method and apparatus, and electronic device
CN114882482A (en) * 2021-10-12 2022-08-09 北京九章云极科技有限公司 Seal anti-counterfeiting identification method and device
CN115063605A (en) * 2022-08-16 2022-09-16 南通卓越数码科技有限公司 Method for identifying color printing package by using electronic equipment
CN112766264B (en) * 2021-01-25 2024-06-07 广州互联网法院 Picture comparison method, electronic device and computer readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070179921A1 (en) * 2006-01-27 2007-08-02 Microsoft Corporation Object instance recognition using feature symbol triplets
CN101324928A (en) * 2007-06-13 2008-12-17 夏普株式会社 Image processing method, image processing apparatus, and image forming apparatus
CN101393605A (en) * 2007-09-18 2009-03-25 索尼株式会社 Image processing device and image processing method, and program
CN101770582A (en) * 2008-12-26 2010-07-07 鸿富锦精密工业(深圳)有限公司 Image matching system and method
CN102026013A (en) * 2010-12-18 2011-04-20 浙江大学 Stereo video matching method based on affine transformation
US20120128247A1 (en) * 2010-11-18 2012-05-24 Fuji Xerox Co., Ltd. Image processing system, image processing apparatus and computer readable medium
CN103403739A (en) * 2011-01-25 2013-11-20 意大利电信股份公司 Method and system for comparing images
CN104589816A (en) * 2014-11-25 2015-05-06 深圳市神州通付科技有限公司 Electronic seal and method and device for identity recognition through electronic seal
CN106056040A (en) * 2016-05-18 2016-10-26 深圳市源厚实业有限公司 Palm vein identification method and device
CN106295710A (en) * 2016-08-18 2017-01-04 晶赞广告(上海)有限公司 Image local feature matching process, device and terminal of based on non-geometric constraint

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070179921A1 (en) * 2006-01-27 2007-08-02 Microsoft Corporation Object instance recognition using feature symbol triplets
CN101324928A (en) * 2007-06-13 2008-12-17 夏普株式会社 Image processing method, image processing apparatus, and image forming apparatus
CN101393605A (en) * 2007-09-18 2009-03-25 索尼株式会社 Image processing device and image processing method, and program
CN101770582A (en) * 2008-12-26 2010-07-07 鸿富锦精密工业(深圳)有限公司 Image matching system and method
US20120128247A1 (en) * 2010-11-18 2012-05-24 Fuji Xerox Co., Ltd. Image processing system, image processing apparatus and computer readable medium
CN102026013A (en) * 2010-12-18 2011-04-20 浙江大学 Stereo video matching method based on affine transformation
CN103403739A (en) * 2011-01-25 2013-11-20 意大利电信股份公司 Method and system for comparing images
CN104589816A (en) * 2014-11-25 2015-05-06 深圳市神州通付科技有限公司 Electronic seal and method and device for identity recognition through electronic seal
CN106056040A (en) * 2016-05-18 2016-10-26 深圳市源厚实业有限公司 Palm vein identification method and device
CN106295710A (en) * 2016-08-18 2017-01-04 晶赞广告(上海)有限公司 Image local feature matching process, device and terminal of based on non-geometric constraint

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
TORU WAKAHARA,YOSHIMASA KIMURA,AKIRA TOMONO: ""Affine-Invariant Recognition of Gray-Scale Characters Using Global Affine Transformation Correlation"", 《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》 *
史晶晶,杜江,王磊,张蓬: ""基于SIFT 的印鉴配准算法研究"", 《计算机应用与软件》 *
程琳,袁玲: ""一种利用Photoshop 进行印章印文图像重合比对的方法"", 《电脑知识与技术》 *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109635818A (en) * 2018-10-26 2019-04-16 平安科技(深圳)有限公司 The anti-counterfeit of seals method of inspection, device and computer readable storage medium
WO2020082577A1 (en) * 2018-10-26 2020-04-30 平安科技(深圳)有限公司 Seal anti-counterfeiting verification method, device, and computer readable storage medium
CN109615645A (en) * 2018-12-07 2019-04-12 国网四川省电力公司电力科学研究院 The Feature Points Extraction of view-based access control model
CN111353485A (en) * 2018-12-20 2020-06-30 中国移动通信集团辽宁有限公司 Seal identification method, device, equipment and medium
CN111353485B (en) * 2018-12-20 2023-09-05 中国移动通信集团辽宁有限公司 Seal identification method, device, equipment and medium
WO2021000702A1 (en) * 2019-06-29 2021-01-07 华为技术有限公司 Image detection method, device, and system
US11354883B2 (en) 2019-12-30 2022-06-07 Sensetime International Pte. Ltd. Image processing method and apparatus, and electronic device
CN111680549A (en) * 2020-04-28 2020-09-18 肯维捷斯(武汉)科技有限公司 Paper pattern recognition method
CN111680549B (en) * 2020-04-28 2023-12-05 肯维捷斯(武汉)科技有限公司 Paper grain identification method
WO2021258634A1 (en) * 2020-06-23 2021-12-30 南京南审审计大数据研究院有限公司 Image auditing and identification method and apparatus, and storage medium
CN111860536A (en) * 2020-06-23 2020-10-30 南京南审审计大数据研究院有限公司 Image recognition method, device and storage medium
CN111860536B (en) * 2020-06-23 2024-01-23 南京南审审计大数据研究院有限公司 Image recognition method, device and storage medium
CN111753719A (en) * 2020-06-24 2020-10-09 上海依图网络科技有限公司 Fingerprint identification 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
CN112766264B (en) * 2021-01-25 2024-06-07 广州互联网法院 Picture comparison method, electronic device and computer readable storage medium
CN112766264A (en) * 2021-01-25 2021-05-07 广州互联网法院 Picture comparison method, electronic device and computer readable storage medium
CN113077355A (en) * 2021-06-04 2021-07-06 国任财产保险股份有限公司 Insurance claim settlement method and device, electronic equipment and storage medium
CN113673321A (en) * 2021-07-12 2021-11-19 浙江大华技术股份有限公司 Target re-recognition method, target re-recognition apparatus, and computer-readable storage medium
CN114882482A (en) * 2021-10-12 2022-08-09 北京九章云极科技有限公司 Seal anti-counterfeiting identification method and device
CN115063605A (en) * 2022-08-16 2022-09-16 南通卓越数码科技有限公司 Method for identifying color printing package by using electronic equipment

Also Published As

Publication number Publication date
CN108596197B (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN108596197A (en) A kind of seal matching process and device
Zhou et al. Learning rich features for image manipulation detection
Jourabloo et al. Face de-spoofing: Anti-spoofing via noise modeling
JP7413400B2 (en) Skin quality measurement method, skin quality classification method, skin quality measurement device, electronic equipment and storage medium
CN112381775B (en) Image tampering detection method, terminal device and storage medium
CN102667810B (en) Face recognition in digital images
JP4903854B2 (en) Object detection method in digital image
JP2017004480A (en) Conspicuity information acquisition device and conspicuity information acquisition method
Wang et al. Background-driven salient object detection
CN108765278A (en) A kind of image processing method, mobile terminal and computer readable storage medium
CN110084135A (en) Face identification method, device, computer equipment and storage medium
CN106951869B (en) A kind of living body verification method and equipment
CN103839042B (en) Face identification method and face identification system
CN106683046A (en) Real-time image splicing method for police unmanned aerial vehicle investigation and evidence obtaining
CN109859305A (en) Three-dimensional face modeling, recognition methods and device based on multi-angle two-dimension human face
CN108416291B (en) Face detection and recognition method, device and system
JP4098021B2 (en) Scene identification method, apparatus, and program
CN104217221A (en) Method for detecting calligraphy and paintings based on textural features
CN109740572A (en) A kind of human face in-vivo detection method based on partial color textural characteristics
WO2007074844A1 (en) Detecting method and detecting system for positions of face parts
CN108255858A (en) A kind of image search method and system
CN113901972A (en) Method, device and equipment for detecting remote sensing image building and storage medium
CN104408728A (en) Method for detecting forged images based on noise estimation
CN111222440A (en) Portrait background separation method, device, server and storage medium
CN111161281A (en) Face region identification method and device and storage medium

Legal Events

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