Summary of the invention
In order to solve the problems, such as at least one mentioned in above-mentioned background technique, the present invention provides a kind of certificate video features
Extracting method, device, computer equipment and storage medium, by being extracted certificate video features with reality based on template matching
The true and false of existing certificate identifies, and has good versatility, can take into account the various features including behavioral characteristics, and simultaneously
With good scalability.
Specific technical solution provided in an embodiment of the present invention is as follows:
In a first aspect, the present invention provides a kind of certificate video feature extraction method, which comprises
Image sequence is obtained from the video comprising certificate, described image sequence includes an at least frame certificate image;
According to multiple anti-counterfeiting characteristics of the certificate, multiple feature subgraphs of certificate image described in each frame are extracted;
Multiple feature subgraphs of certificate image described in each frame are carried out corresponding with preset multiple images template respectively
With calculating, the matching score value vector that certificate image described in each frame corresponds to described multiple images template is obtained;
Matching score matrix is formed according to the corresponding matching score value vector of certificate image described in each frame, and by the matching
Score matrix is mapped as video feature vector.
It is in a preferred embodiment, described that image sequence is obtained from the video comprising certificate, comprising:
Multiframe certificate image is extracted to the video comprising certificate;
The certificate image described in the multiframe extracted carries out processing of becoming a full member;
Selection is become a full member certificate image described in a successful at least frame, and described image sequence is constituted.
In a preferred embodiment, multiple anti-counterfeiting characteristics according to the certificate, extract certificate described in each frame
Before multiple feature subgraph steps of image, the method also includes:
The certificate image described in each frame pre-processes, wherein the pretreatment includes at least white balance, noise reduction, sharp
One in change.
In a preferred embodiment, multiple anti-counterfeiting characteristics of the certificate include the color shifting ink of the certificate, chip
At least two in block, dynamic printed character and dynamic printing portrait.
In a preferred embodiment, multiple feature subgraphs by certificate image described in each frame respectively with it is preset
Multiple images template carries out Corresponding matching calculating, obtains the matching that certificate image described in each frame corresponds to described multiple images template
Score value vector, comprising:
For each feature subgraph of certificate image described in each frame, perform the following operations:
If the feature subgraph is not dynamic printing portrait, figure corresponding with the feature subgraph to the feature subgraph
As template progress relevant matches, matching score value corresponding to the feature subgraph is calculated;
If the feature subgraph is dynamic printing portrait, the dynamic printing portrait and corresponding portrait template are distinguished
Face characteristic is extracted, and according to the face characteristic extracted, calculates matching score value corresponding to the dynamic printing portrait;
According to matching score value corresponding to each feature subgraph of certificate image described in each frame, generate described in each frame
Certificate image corresponds to the matching score value vector of described multiple images template.
It is in a preferred embodiment, described that the matching score matrix is mapped as video feature vector, comprising:
According to preset mapping function, each column of the matching score matrix are calculated, by the matching score value
The calculated result of each column of matrix is mapped to the video feature vector.
In a preferred embodiment, described calculate includes one of linear operation and nonlinear operation;
Between the linear operation includes mean value computation, one or more of takes intermediate value, is maximized and is minimized
And difference operation.
In a preferred embodiment, the method also includes:
The video feature vector is input to default regression model, obtains the visual classification for indicating the true and false of the certificate
As a result;
In a preferred embodiment, the default regression model is linear regression model (LRM), Logic Regression Models or nerve
Network model;
The feature weight parameter of the default regression model is to be obtained or in advance using the method training of machine learning in advance
First set.
Second aspect, provides a kind of certificate video feature extraction device, and described device includes:
Module is obtained, for obtaining image sequence from the video comprising certificate, described image sequence includes an at least frame
Certificate image;
Extraction module extracts the multiple of certificate image described in each frame for multiple anti-counterfeiting characteristics according to the certificate
Feature subgraph;
Matching module, for by multiple feature subgraphs of certificate image described in each frame respectively with preset multiple images mould
Plate carries out Corresponding matching calculating, obtains the matching score value vector that certificate image described in each frame corresponds to described multiple images template;
Mapping block forms matching score value square for the corresponding matching score value vector of the certificate image according to each frame
Battle array, and the matching score matrix is mapped as video feature vector.
The third aspect provides a kind of computer equipment, comprising:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes the method as described in first aspect is any.
Fourth aspect provides a kind of computer readable storage medium, is stored thereon with computer program, described program quilt
The method as described in first aspect is any is realized when processor executes.
The embodiment of the invention provides a kind of certificate video feature extraction method, apparatus, computer equipment and storage medium,
By obtaining image sequence from the video comprising certificate, image sequence includes an at least frame certificate image;According to the more of certificate
A anti-counterfeiting characteristic extracts multiple feature subgraphs of each frame certificate image;By multiple feature subgraphs of each frame certificate image point
Corresponding matching calculating is not carried out with preset multiple images template, obtains that each frame certificate image corresponds to multiple images template
With score value vector;Matching score matrix is formed according to the corresponding matching score value vector of each frame certificate image, and score value will be matched
Matrix is mapped as video feature vector.It can be seen that the present invention verifies part video frame extraction according to the different anti-counterfeiting characteristics of certificate
Corresponding region subgraph, the image template with real docu-ment is matched, and to match score value as feature, need to only be acquired so few
The real docu-ment data of amount simultaneously make template feature extraction can be completed, without using deep neural network.In addition, this hair
The bright true and false by extracting the template under feature subgraph match to different conditions to certificate video features to realize certificate
Identify, there is good versatility, the various features including behavioral characteristics can be taken into account, and have well may be used simultaneously
Scalability can adapt to the certificate false proof demand under several scenes.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached in the embodiment of the present invention
Figure, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only this
Invention a part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art exist
Every other embodiment obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
It should be noted that unless the context clearly requires otherwise, " comprising " otherwise throughout the specification and claims,
The similar word such as "comprising" should be construed as the meaning for including rather than exclusive or exhaustive meaning;That is, be " including but
Be not limited to " meaning.
In addition, in the description of the present invention, it is to be understood that, term " first ", " second " etc. are used for description purposes only,
It is not understood to indicate or imply relative importance.In addition, in the description of the present invention, unless otherwise indicated, " multiples' "
It is meant that two or more.
Fig. 1 is the application environment schematic diagram of certificate video feature extraction method provided in an embodiment of the present invention.Such as Fig. 1 institute
Show, first terminal 102 and second terminal 106 are communicated by network with server 104 respectively.Wherein, first terminal 102 is used
On the video of certificate is uploaded onto the server, server is used to receive the video of the upload of first terminal 102, is based on template matching
Certificate video features are extracted and are identified with the true and false for realizing certificate, second terminal 106 is used to receive the certificate of server 104
True and false identification result.Wherein, first terminal 102 can be with built-in video acquisition module or external video acquisition module
Electronic equipment, the electronic equipment can be, but not limited to be various personal computers, laptop, smart phone and plate electricity
Brain, second terminal 106 can be, but not limited to be various personal computers, laptop, smart phone and tablet computer, service
Device 104 can be realized with the server cluster of the either multiple server compositions of independent server.
It should be noted that certificate video feature extraction method provided by the invention, can be applied to financial credit scene,
Feature extraction is carried out to identity card in banking and insurance business scene or other scenes to identify with the true and false for realizing identity card, it can be with specific
It carries out feature extraction to the certificate except identity card under scene to identify to be used for the true and false, such as credit card etc., the embodiment of the present invention
Concrete application scene is not construed as limiting.
It carries out illustrating certificate video feature extraction method provided in an embodiment of the present invention with 2003 editions Hong Kong identity cards.
In one embodiment, it as shown in Fig. 2, providing a kind of certificate video feature extraction method, applies in this way
It is illustrated for server in Fig. 1, comprising the following steps:
Step 201, image sequence is obtained from the video comprising certificate, image sequence includes an at least frame certificate image.
Wherein, the video comprising certificate can be uploaded onto the server by terminal (first terminal in Fig. 1) on, terminal
The video comprising certificate is obtained by carrying out video acquisition to certificate.
Specifically, server carries out a sample decimation at least frame certificate image to certificate video, forms image sequence.
Step 202, according to multiple anti-counterfeiting characteristics of certificate, multiple feature subgraphs of each frame certificate image are extracted.
Here, the anti-counterfeiting characteristic of certificate refers to that certificate can be played the feature of anti-fake effect.
Wherein, multiple anti-counterfeiting characteristics of certificate include color shifting ink, chip block, dynamic printed character and the dynamic print of certificate
At least two in brush portrait.It in this present embodiment, include color shifting ink, chip block, dynamic printed words with multiple anti-counterfeiting characteristics
Female and dynamic printing portrait is preferably.
Wherein, color shifting ink refers to that certificate chromic ink colors under different angle change;Chip block refers to certificate
In anti-counterfeiting chip, be static nature, there is usually no significant changes;Dynamic printed character refers to the anti-fake word printed on certificate
Symbol is shown as a letter under certain angles, another letter is shown as under certain angles;Innervation printing portrait.Innervation printing
It will appear relatively clear portrait or unsharp portrait under portrait different angle.
Specifically, server is directed to each frame certificate image of image sequence, and the multiple of certificate are positioned in certificate image
The respective region of anti-counterfeiting characteristic, extracts multiple feature subgraphs of certificate image, obtains multiple features of each frame certificate image
Figure.
Further, it is also possible to realize the process for extracting multiple feature subgraphs of certificate image by operation as follows:
Server and default terminal (second terminal in Fig. 1)) it interacts, image sequence is sent to default terminal,
Multiple feature subgraphs of each frame certificate image, and mentioning feature subgraph are extracted based on artificial extracting mode by default terminal
Result is taken to return to server.
Illustratively, according to multiple anti-counterfeiting characteristics of certificate, multiple feature subgraphs of the single frames certificate image extracted can
With referring to shown in Fig. 3, Fig. 3 is the schematic diagram of the feature subgraph of single frames certificate image provided in an embodiment of the present invention, wherein Fig. 3
In region a, b, c, d in each solid box be respectively color shifting ink subgraph, chip block subgraph, dynamic printed character subgraph and dynamic
Sense printing portrait.
In the embodiment of the present invention, since multiple anti-counterfeiting characteristics of certificate include the color shifting ink, chip block, dynamic print of certificate
At least two in brush letter and dynamic printing portrait, these anti-counterfeiting characteristics are to be evident that feature, therefore true in certificate
Reach very high standard without certificate video quality in pseudo- discrimination process, can be mentioned according to these anti-counterfeiting characteristics from certificate image
Corresponding feature subgraph is taken, so as to be substantially reduced the requirement to data acquisition conditions.
Step 203, multiple feature subgraphs of each frame certificate image are carried out with preset multiple images template respectively pair
Matching primitives are answered, the matching score value vector that each frame certificate image corresponds to multiple images template is obtained.
Specifically, it is determined that the corresponding relationship between multiple feature subgraphs and preset multiple images template, is closed based on corresponding
Multiple feature subgraphs of each frame certificate image are carried out Corresponding matching calculating with preset multiple images template respectively, obtained by system
To the corresponding matching score value of multiple feature subgraphs of each frame certificate image, wherein matching score value is for indicating feature
Scheme and the matching degree between corresponding image template;According to the corresponding matching of multiple feature subgraphs of each frame certificate image
Score value obtains the matching score value vector that each frame certificate image corresponds to multiple images template.
In the present embodiment, the corresponding relationship between feature subgraph and image template can be determined based on correlation matching algorithm, if
The multiple feature subgraphs extracted include color shifting ink subgraph, chip block subgraph, dynamic printed character subgraph and dynamic printing people
Picture can then be based on corresponding relationship, color shifting ink subgraph is matched the first color ink template, the second color ink template respectively
It carries out calculating corresponding distribution score value, chip block subgraph match chip block template is carried out to calculate matching score value, innervation is printed
Alphabetical subgraph matches the first alphabetical template respectively, the second alphabetical template carries out calculating corresponding distribution score value, and innervation is printed people
Score value is distributed as matching portrait template calculate, amounts to available M=6 matching score value.
Wherein, the first color ink template, the second color ink template, chip block template, the first alphabetical template and second
Alphabetical template is pre-generated based on real docu-ment respectively, and pre-generated template can be adapted for the letter of different universal certificates
Breath, such as 2003 editions Hong Kong identity cards may include inclined yellowish discoloration ink template, partially red color shifting ink template, chip block
Template, the dynamic printed character template for letter H occur and the dynamic printed character template for letter K occur.And portrait template is base
In additional clause Face image synthesis to be identified, that is to say, that portrait template is that being suitable for based on extract real-time is each
The distinctive Face image synthesis of certificate, because the face of different certificates is different, therefore the portrait template generated is also different.Based on card
The portrait template of Face image synthesis in part is referred to shown in Fig. 3, and the region e in Fig. 3 in dotted line frame is portrait template.
As shown in figure 4, Fig. 4 is the matched flow diagram of single frames certificate image provided in an embodiment of the present invention, certificate figure
Image as being 2003 editions Hong Kong identities card extracts chip block subgraph from single frames certificate image, innervation prints portrait and dynamic
Feel multiple feature subgraphs such as printed character subgraph, chip block subgraph is matched with chip block template, innervation is printed into portrait
Matched with portrait template, by dynamic printed character subgraph respectively with occur letter H dynamic printed character template and appearance
The dynamic printed character template of alphabetical K is matched, each feature subgraph difference of the single frames certificate image available in this way
Corresponding matching score value, and then the available single frames certificate image corresponds to the matching score value vector of multiple images template.
Step 204, matching score matrix is formed according to the corresponding matching score value vector of each frame certificate image, and will matching
Score matrix is mapped as video feature vector.
Specifically, the corresponding matching score value vector of each frame certificate image is stacked, each matching score value vector
Dimension is M, obtains matching score matrixWherein, its element of element fijIndicate j-th of template dimension under the i-th frame
Degree, by matching score matrix F by mapping function to video feature vector x=Φ (F), whereinFor
Mapping function, V are the dimension of video feature vector X.
In the present embodiment, for P frame certificate image, if each frame certificate image corresponds to the matching score value vector of multiple images
It is based on corresponding to the first color ink template, the second color ink template, chip block template, the first alphabetical template, the second word
Caster and the matching score value of portrait template are formed by, then matching score matrix F=(f1,f2,f3,f4,f5,f6) share M
=6 column, wherein f1P between color shifting ink subgraph and the first color ink template including P frame certificate image match point
Value, f2P between color shifting ink subgraph and the second color ink template including P frame certificate image match score value, f3Including P
P between the chip block subgraph of frame certificate image and chip block template match score value, f4Dynamic print including P frame certificate image
P brushed between alphabetical subgraph and the first alphabetical template match score value, f5Dynamic printed character subgraph including P frame certificate image
P between the second alphabetical template match score value, f6Innervation including P frame certificate image is printed between portrait and portrait template
P matching score value.
Further, method provided in an embodiment of the present invention can with comprising steps of
Video feature vector is input to default regression model, obtains the visual classification result of the true and false of instruction certificate.
Specifically, video feature vector is input in default regression model y=g (x, w), wherein y is video identification point
Value, w are the parameter of model, and g () is regression model, according to the feature weight parameter w in regression model, to video feature vector
In each video features be weighted, obtain video identification score value, according to video identify score value, generate instruction certificate it is true
Pseudo- visual classification result, wherein video identifies score value to indicate that certificate is the probability of real docu-ment, if video identifies score value
Greater than preset threshold, then certificate is real docu-ment, and otherwise, then certificate is to copy certificate.
Wherein, default regression model can be linear regression model (LRM), Logic Regression Models or neural network model, the present invention
Preferably with Logic Regression Models.
Wherein, the feature weight parameter for presetting regression model can be obtained using the method training of machine learning in advance,
It rule of thumb can directly set, such as directly each feature is weighted and averaged.
Preferably, the embodiment of the present invention obtains the feature of default regression model using the method training of machine learning
Weight parameter, specific training process are as follows:
Obtain the multiple Sample videos marked, wherein include the video of true anti-counterfeiting product in multiple Sample videos
With the video of the anti-counterfeiting product of imitation;
For each of multiple Sample videos Sample video, perform the following operations:
Image sequence is obtained from Sample video, according to multiple anti-counterfeiting characteristics of certificate, extracts each frame certificate image
Multiple feature subgraphs, and multiple feature subgraphs of each frame certificate image are carried out with preset multiple images template respectively corresponding
Matching primitives obtain the matching score value vector that each frame certificate image corresponds to multiple images template;
Matching score matrix is formed according to the corresponding matching score value vector of each frame certificate image, and score matrix will be matched
It is mapped as video feature vector;
The video feature vector of each Sample video is input in regression model and is trained, the feature of regression model is obtained
Weight parameter.
Illustratively, acquire N=50 certificate video, including real docu-ment and imitation certificate (such as to the printing of certificate or
Reproduction), the label of corresponding real docu-ment is 1, and the label for copying certificate is 0, to N number of certificate video extraction video feature vector,
The feature weight parameter of training regression model.
In the present embodiment, since quantitative requirement of the regression model to training sample does not have deep learning to the number of training sample
Amount requires height, therefore by a small amount of training sample, can train to obtain the regression model for visual classification, thus based on instruction
The accurate identification of the certificate true and false may be implemented in the regression model perfected.
Illustratively, as shown in figure 5, Fig. 5 shows certificate true and false identification flow schematic diagram provided in an embodiment of the present invention,
For the video V comprising certificate, P frame certificate image is obtained first from video V, then according to the anti-counterfeiting characteristic of certificate, is extracted
Multiple feature subgraphs of each frame certificate image, and each frame certificate image and multiple images template are subjected to Corresponding matching meter
It calculates, obtains the corresponding matching score value vector of each frame certificate image, form matching score matrix F, the row of the matching score matrix
Number is P row, then generates video feature vector X according to matching score matrix F, and video feature vector X is inputted regression model, is obtained
It must indicate the visual classification result Y of the certificate true and false.
Certificate video feature extraction method provided in an embodiment of the present invention, by obtaining image from the video comprising certificate
Sequence, image sequence include an at least frame certificate image;According to multiple anti-counterfeiting characteristics of certificate, each frame certificate image is extracted
Multiple feature subgraphs;Multiple feature subgraphs of each frame certificate image are carried out corresponding with preset multiple images template respectively
With calculating, the matching score value vector that each frame certificate image corresponds to multiple images template is obtained;According to each frame certificate image pair
The matching score value vector answered forms matching score matrix, and matching score matrix is mapped as video feature vector.It can be seen that
The present invention verifies the corresponding region subgraph of part video frame extraction according to the different anti-counterfeiting characteristics of certificate, with the image mould of real docu-ment
Plate is matched, and to match score value as feature, only need to acquire a small amount of real docu-ment data in this way and make template can be complete
At feature extraction, without using deep neural network.In addition, the present invention is by will be under feature subgraph match to different conditions
Template certificate video features are extracted with realize certificate the true and false identify, have good versatility, can take into account
Various features including behavioral characteristics, and there is good scalability simultaneously, it can adapt to the certificate under several scenes
Anti-fake demand.
In one embodiment, above-mentioned that image sequence is obtained from the video comprising certificate, which may include:
Multiframe certificate image is extracted to the video comprising certificate, the place that becomes a full member is carried out to the multiframe certificate image extracted
Reason, and a successful at least frame certificate image of becoming a full member is chosen, constitute image sequence.
Specifically, uniform sampling approach can be used, multiframe certificate image is extracted to the video comprising certificate.For example,
Use every 1 second extraction video p=3 frame of uniform sampling, it is to be understood that can also using other methods in the prior art into
Row extracts multiframe certificate image, such as key-frame extraction, and the present invention is not especially limit this.
In addition, it is contemplated that the angle problem of certificate image can use scale for each frame certificate image extracted
Invariant features transformation (Scale-invariant feature transform, SIFT) realizes certificate detection and becomes a full member, to mention
The accuracy that the high certificate true and false identifies.
In one embodiment, above-mentioned multiple anti-counterfeiting characteristics according to certificate, extract the multiple of each frame certificate image
Before feature subgraph step, method can also include:
Each frame certificate image is pre-processed, wherein pretreatment is including at least one in white balance, noise reduction, sharpening
It is a.
Above-mentioned preprocess method can use white balance, which may include:
Region unit is extracted respectively from four angles of certificate image, calculates the average R of the region unit extracted, G, B face
Color valueUtilize average R, G, B color valueTo the color of each pixel in certificate image
(r, g, b) is normalized, and obtains normalization color
Wherein, four region units extracted in four angles of certificate image are referred to shown in Fig. 6, the solid line in Fig. 6
Region shown in frame respectively corresponds four region units.
It is excellent by the way that the color of image under different-colour illumination can be automatically adjusted to certificate image progress white balance processing
Change certificate image, consequently facilitating subsequent extract multiple feature subgraphs from certificate image.
Above-mentioned image noise reduction can carry out noise reduction process to certificate image based on median filtering, to reduce in certificate image
Noise jamming.When specific implementation, choose the filter window of certain size, by filter window the initial position of filtering ash
Angle value is substituted by intermediate value in the neighborhood of set filter window, so that the pixel value around filter window is more nearly really
Value, to eliminate isolated noise spot.
Above-mentioned image sharpening can be by adjusting the contrast of certificate image, to protrude of the feature in certificate image
Figure, in order to the extraction of subsequent characteristics subgraph.
In one embodiment, above-mentioned multiple feature subgraphs by each frame certificate image respectively with preset multiple figures
As template progress Corresponding matching calculating, the corresponding matching score value vector of each frame certificate image is obtained, which may include:
For each feature subgraph of each frame certificate image, if feature subgraph is not dynamic printing portrait, to spy
It levies subgraph image template corresponding with feature subgraph and carries out relevant matches, calculate matching score value corresponding to feature subgraph;If special
Sign subgraph is dynamic printing portrait, then extracts face characteristic respectively to innervation printing portrait and corresponding portrait template, and according to
The face characteristic extracted calculates matching score value corresponding to dynamic printing portrait;According to each of each frame certificate image
Matching score value corresponding to feature subgraph generates the matching score value vector that each frame certificate image corresponds to multiple images template.
Specifically, for each feature subgraph of each frame certificate image, if feature subgraph is not dynamic printing portrait,
It is then matched, i.e., is overlayed this feature subgraph corresponding image template on this feature subgraph by space two-dimensional sleiding form
Translation search is carried out, the smallest pixel position of error is found, calculates matching score value corresponding to this feature subgraph;If this feature
Subgraph is dynamic printing portrait, then extracts face spy respectively to innervation printing portrait and corresponding portrait template respectively using dlib
Sign calculates matching score value corresponding to dynamic printing portrait according to the face characteristic extracted.
In one embodiment, above-mentioned that matching score matrix is mapped as video feature vector, which may include:
According to preset mapping function, each column of matching score matrix are calculated, the every of score matrix will be matched
The calculated result of one column is mapped to video feature vector.
Wherein, each column of matching score matrix calculate including one of linear operation and nonlinear operation,
Linear operation include mean value computation, one or more of take intermediate value, be maximized and be minimized between and difference operation.
Wherein, the calculated result for matching each column of score matrix is mapped to video feature vector, it can be there are many reflecting
Penetrate mode, comprising:
Mode one: the calculated result correspondence mappings of each column in score matrix will be matched at every in video feature vector
One characteristic value, the dimension of video feature vector is equal to the columns of matching score matrix at this time.For example, directly to matching score value square
Each column in battle array carry out mean value computation, by the mean value of each column to each characteristic value that should be used as video feature vector;Again
For example, nonlinear operation is carried out to each column in matching score matrix, by the sequence of matching score value from big to small to each column
After being ranked up, the value for coming N is selected from each column to each characteristic value that should be used as video feature vector, N can
It, so can be to avoid the calculating of influence of noise to characteristic value to be equal to 3.
Mode two: the different calculated result correspondence mappings of each column in score matrix will be matched in video feature vector
Each characteristic value, at this point, the dimension of video feature vector be greater than matching score matrix columns.For example, video features to
The dimension of amount includes x=(x1,x2,...,xV) V=7 dimension is shared, wherein preceding 6 dimension meets xk=max (fk), k≤6, for matching point
The maximum value of each column in value matrix, indicates the maximum matching score value for occurring correspondence image template in video, and the 7th dimension takes x7=
min(f6), i.e., it is to be based on that innervation, which prints portrait the reason of corresponding to the minimum matching score value of portrait template, choose this feature, in video
It is that innervation printing portrait will appear unsharp head portrait under certain angles it is assumed that dynamic printing portrait can be embodied at different angles
Variation characteristic under degree.
In addition to this, mapping mode can also be takes intermediate value to certain two column in matching score matrix respectively, this two is arranged
A characteristic value as video feature vector of the sum of intermediate value, the dimension of video feature vector can be less than matching score value at this time
Matrix column number.
In the embodiment of the present invention, it is mapped as video feature vector by the way that score matrix will be matched, so that video
The matching score value of middle corresponding different images template only need to acquire a small amount of real docu-ment data and make template in this way as feature
Feature extraction can be completed, without using deep neural network, there is good versatility, can take into account special including dynamic
Various features including sign, and there is good scalability.
In one embodiment, as shown in fig. 7, providing a kind of certificate video feature extraction device, device includes:
Module 71 is obtained, for obtaining image sequence from the video comprising certificate, image sequence is demonstrate,proved including an at least frame
Part image;
Extraction module 73 extracts multiple features of each frame certificate image for multiple anti-counterfeiting characteristics according to certificate
Figure;
Matching module 74, for by multiple feature subgraphs of each frame certificate image respectively with preset multiple images template
Corresponding matching calculating is carried out, the matching score value vector that each frame certificate image corresponds to multiple images template is obtained;
Mapping block 75, for forming matching score matrix according to the corresponding matching score value vector of each frame certificate image,
And matching score matrix is mapped as video feature vector.
In a preferred embodiment, module 71 is obtained to be specifically used for:
Multiframe certificate image is extracted to the video comprising certificate;
Processing of becoming a full member is carried out to each frame certificate image extracted;
Selection is become a full member a successful at least frame certificate image, and image sequence is constituted.
In a preferred embodiment, device further include:
Preprocessing module 72, for being pre-processed to each frame certificate image, wherein pretreatment includes at least white flat
Weighing apparatus, noise reduction, one in sharpening.
In a preferred embodiment, multiple anti-counterfeiting characteristics of certificate include the color shifting ink, chip block, dynamic print of certificate
At least two in brush letter and dynamic printing portrait.
In a preferred embodiment, matching module 74 is specifically used for:
For each feature subgraph of each frame certificate image,
If feature subgraph is not dynamic printing portrait, phase is carried out to feature subgraph image template corresponding with feature subgraph
Matching is closed, matching score value corresponding to feature subgraph is calculated;
If feature subgraph is dynamic printing portrait, face is extracted respectively to innervation printing portrait and corresponding portrait template
Feature, and according to the face characteristic extracted, calculate matching score value corresponding to dynamic printing portrait;
According to matching score value corresponding to each feature subgraph of each frame certificate image, each frame certificate image is generated
The matching score value vector of corresponding multiple images template.
In a preferred embodiment, mapping block 75 is specifically used for:
According to preset mapping function, each column of matching score matrix are calculated, the every of score matrix will be matched
The calculated result of one column is mapped to video feature vector.
In a preferred embodiment, calculate includes one of linear operation and nonlinear operation;
Linear operation include mean value computation, one or more of take intermediate value, be maximized and be minimized between sum
Difference operation.
In a preferred embodiment, device further include:
Identification module 76 obtains the true and false of instruction certificate for video feature vector to be input to default regression model
Visual classification result.
In a preferred embodiment, presetting regression model is linear regression model (LRM), Logic Regression Models or neural network
Model;
The feature weight parameter of default regression model is to be obtained or set in advance using the method training of machine learning in advance
It is fixed.
Certificate true and false identification device provided in this embodiment, with certificate video feature extraction provided by the embodiment of the present invention
Method belongs to same inventive concept, and certificate video feature extraction method provided by the embodiment of the present invention can be performed, have execution
The corresponding functional module of certificate video feature extraction method and beneficial effect.The technology of detailed description is not thin in the present embodiment
Section, reference can be made to certificate video feature extraction method provided in an embodiment of the present invention, details are not described herein again.
In one embodiment, a kind of computer equipment is provided, which includes:
One or more processor;
Memory;
Program stored in memory, when being executed by one or more processor, program executes processor
The step of stating the certificate video feature extraction method of embodiment.
In one embodiment, a kind of computer readable storage medium is provided, computer-readable recording medium storage has journey
Sequence, when program is executed by processor, so that the step of processor executes the certificate video feature extraction method of above-described embodiment.
It should be understood by those skilled in the art that, the embodiment in the embodiment of the present invention can provide as method, system or meter
Calculation machine program product.Therefore, complete hardware embodiment, complete software embodiment can be used in the embodiment of the present invention or combine soft
The form of the embodiment of part and hardware aspect.Moreover, being can be used in the embodiment of the present invention in one or more wherein includes meter
Computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, the optical memory of calculation machine usable program code
Deng) on the form of computer program product implemented.
It is referring to the method for middle embodiment, equipment (system) according to embodiments of the present invention and to calculate in the embodiment of the present invention
The flowchart and/or the block diagram of machine program product describes.It should be understood that can be realized by computer program instructions flow chart and/or
The combination of the process and/or box in each flow and/or block and flowchart and/or the block diagram in block diagram.It can mention
For the processing of these computer program instructions to general purpose computer, special purpose computer, Embedded Processor or other programmable datas
The processor of equipment is to generate a machine, so that being executed by computer or the processor of other programmable data processing devices
Instruction generation refer to for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram
The device of fixed function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment in the embodiment of the present invention has been described, once a person skilled in the art knows
Basic creative concept, then additional changes and modifications may be made to these embodiments.So appended claims are intended to explain
Being includes preferred embodiment and all change and modification for falling into range in the embodiment of the present invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.