CN118015685B - Method and system for identifying one-card - Google Patents

Method and system for identifying one-card Download PDF

Info

Publication number
CN118015685B
CN118015685B CN202410418672.8A CN202410418672A CN118015685B CN 118015685 B CN118015685 B CN 118015685B CN 202410418672 A CN202410418672 A CN 202410418672A CN 118015685 B CN118015685 B CN 118015685B
Authority
CN
China
Prior art keywords
card
image
key points
feature vector
range
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.)
Active
Application number
CN202410418672.8A
Other languages
Chinese (zh)
Other versions
CN118015685A (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.)
Hubei Chutianlong Industry Co ltd
Original Assignee
Hubei Chutianlong Industry 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 Hubei Chutianlong Industry Co ltd filed Critical Hubei Chutianlong Industry Co ltd
Priority to CN202410418672.8A priority Critical patent/CN118015685B/en
Publication of CN118015685A publication Critical patent/CN118015685A/en
Application granted granted Critical
Publication of CN118015685B publication Critical patent/CN118015685B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a method and a system for identifying a one-card, wherein the method comprises the steps of acquiring a face image of a person swiping a card in a target scene and a face image recorded during one-card registration, and extracting a face region in the face image; obtaining key points of the face area according to a scale invariant feature transformation algorithm; adjusting the image range required by the key points when generating the feature vector; determining a feature vector corresponding to the key point according to the gradient of the pixel point in the image range; and matching the feature vector of the face image of the card swiping person with the feature vector corresponding to the face image recorded during the registration of the one-card, and judging whether the card swiping person is the card owner according to the matching result. According to the scheme of the invention, the problems of low face matching accuracy and poor efficiency in the one-card face recognition technology are solved.

Description

Method and system for identifying one-card
Technical Field
The present invention relates generally to the field of image processing technology. More particularly, the invention relates to a method and a system for identifying a one-card.
Background
One-card is a common name of intelligent card, and is widely applied to urban public transportation, automatic highway charging, public charging, small-amount consumption, intelligent building, intelligent community, property management, attendance gate inhibition management, campus and factory one-card system, so that people fully enjoy the convenience brought by modern technology to daily work and life. The one-card is required to be carried with, and is extremely easy to lose in the process of taking and placing because the one-card is extremely light and thin, and is easy for others to pick up and steal.
Face recognition technology is a technology for confirming identity by recognizing face features. The basic principle is that the identity is confirmed by collecting, processing and extracting the characteristics of the face image and then comparing the face image with the characteristics in a face database stored in advance. In the face recognition technology, the method mainly comprises the steps of face image acquisition, image preprocessing, feature extraction, matching ratio and the like. Through the steps, the accurate identification and identity confirmation of the human face can be realized.
The face recognition is an advanced identity recognition technology, and the one-card and the face recognition technology are combined, so that the identity recognition can be performed in a biological recognition mode, the face recognition is not easy to copy and steal, and the risk of losing is avoided. The one-card face recognition solution is to directly change the traditional one-card-swiping one-card into one-card face recognition.
However, in the existing one-card face recognition scheme, the face features of the cardholder are generally extracted through a scale-invariant feature conversion algorithm and are matched with the face features recorded during one-card registration, and the card can be successfully swiped only after successful matching. However, due to the fact that the face image collection is different from the shooting conditions such as illumination and shooting angles when the face information is registered and recorded by the one-card and the appearance characteristics such as facial expression and state are different when the card is swiped, the currently adopted scale-invariant feature conversion algorithm is sensitive to image noise and illumination changes, so that the situation that the face matching fails frequently occurs when the card is swiped by the card owner, and a plurality of inconveniences are brought to the card owner.
Based on the above, how to solve the problems of low face matching accuracy and poor efficiency in the one-card face recognition technology is the key point of the current research.
Disclosure of Invention
Aiming at the problem that the feature vector interferes with the expression of the feature vector to the facial image features due to the sensitivity of the scale-invariant feature conversion algorithm to the image noise and illumination variation, the invention adjusts the size and shape of the image area required by the key point when the feature vector is generated by the image local contrast, the key point density and the position information, so that the feature description of the key point can more express the features of each part of the facial, thereby improving the probability of correct matching of the facial information of a cardholder and the input information of the one-card registration, and ensuring that the recognition process of whether the one-card belongs to a card swiping person is more accurate and quick.
In a first aspect, the present invention provides a method for identifying a one-card, including: acquiring a face image of a card swiping person in a target scene and a face image recorded during registration of a card, and extracting a face region in the face image; obtaining key points of the face area according to a scale invariant feature transformation algorithm; adjusting the image range required by the key points when generating the feature vector; determining a feature vector corresponding to the key point according to the gradient of the pixel point in the image range; matching the feature vector of the face image of the card swiping person with the feature vector corresponding to the face image recorded during the registration of the one-card, and judging whether the card swiping person is the card owner according to the matching result; the adjustment mode of the image range required in the generation of the feature vector comprises the following steps: calculating the initial size of an image range required when the key point generates a feature vector according to the local contrast of the pixel point in the key point scale range; obtaining the position of the center point of the corresponding part according to the average value of the transverse coordinates and the longitudinal coordinates of the key points of each part; taking a vector formed by the positions of the key points and the central points as an expansion direction vector to obtain an expansion direction; calculating the density degree of the key points according to the ratio of the number of the key points of each part in the range of the included angle of the extending direction to the total number of all the key points of the corresponding part; calculating the expansion quantity of the range required by generating the feature vector by the key points according to the main direction of each key point of each part, the density degree of the key points and the expansion direction vector; the image range required when the feature vector is generated is determined according to the initial size, the expansion direction and the expansion amount of the required image range.
In one embodiment, the calculation formula for the initial size of the required image range when generating the feature vector is:
wherein, W i,j is the initial size of the side length of the image range required when generating the feature vector for the jth key point of the ith part; sigma i,j is the scale of the jth key point of the ith part; d i,j is the contrast of the image area in the circular range taking the corresponding position of the jth key point of the ith part as the center and sigma i,j as the radius; i i,j is a set of gray values of all pixel points in the image area in a circular range with the jth key point of the ith part as a circle center and sigma i,j as a radius; max () and min () are a maximum function and a minimum function, respectively; d is the contrast of the image global, P is the set of gray values of all pixel points in the image global range, and [ (] is a rounding function.
In one embodiment, the calculation formula of the intensity of the key points includes: s i,j=ni,j/Ni, wherein S i,j is the density of key points of the jth key point of the ith part in a right angle range between two expansion directions; the number of the ith key points of the ith part of n i,j in the range of the included angle between the two expansion directions; n i is the total number of all key points corresponding to the ith position.
In one embodiment, the calculation formula for the expansion amount of the range required when the key point generates the feature vector is:
; wherein D x,i,j represents the expansion amount of the image range in the horizontal direction required for generating the feature vector by the key point, D y,i,j represents the expansion amount of the image range in the vertical direction required for generating the feature vector by the key point, Is the ith partVectors of horizontal directions of key pointsIs a mold of (2); vector in vertical direction for jth key point of ith part Is a mold of (2); s i,j is the degree of density of the jth key point of the ith part in the range of the included angle between the two expansion directions; f i,j is the ratio of the amplitude value of the principal direction theta of the jth key point of the ith part to the sum of the amplitude values of all directions; alpha is a custom parameter and alpha e (0, 1).
In one embodiment, a vector formed by the positions of the key points and the center points is used as an expansion direction vector to obtain an expansion direction, and the method comprises the following steps: determining the central points of all the parts, taking the direction of the key points in the corresponding parts towards the central points of the parts as the vector direction, and calculating the coordinates of the key points and the distance between the central points of the parts; taking the distance as a modular length, and constructing an expansion direction vector according to the vector direction; the expansion direction vector is subjected to orthogonal decomposition and is divided into a vector in the horizontal direction and a vector in the vertical direction, so that the expansion direction is obtained.
In one embodiment, matching the feature vector of the face image of the card swiping person with the feature vector corresponding to the face image recorded during the registration of the one-card comprises: the European or cosine similarity of the two feature vectors is calculated.
In one embodiment, determining whether the card swiping person is the card owner according to the matching result includes: matching key points in the face image of the card swiping person and the face image recorded during registration of the one-card according to a nearest neighbor algorithm, and finding out the most similar key points; calculating cosine similarity between feature vectors corresponding to all the most similar key points; calculating the average value of all cosine similarity, and taking the average value as the similarity between the face image of the card swiping person and the face image recorded during the registration of the all-purpose card; responding to the similarity larger than the first set value, and judging that the person swiping the card is the card owner; notifying the card reader to re-acquire the face image in response to the similarity being greater than the second set value and less than the first set value; and in response to the similarity being smaller than the second set value, judging that the card swiping person is not the card owner.
In a second aspect, the present invention further provides an identification system for a one-card, including: a processor; and a memory storing computer program instructions which, when executed by the processor, implement a method of identification according to one of the one-card as described hereinbefore.
The invention has the beneficial effects that: in the process of using a scale-invariant feature transformation algorithm, when feature description is carried out through key points, the size and shape of a required image area when the key points generate feature vectors are regulated through image local contrast, key point density and position information, so that the size and shape of the required image area are regulated according to face positions of corresponding positions of the key points, the feature generated by the key points can better express face information, and face matching accuracy and efficiency in a cartoon face recognition technology are effectively improved.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the invention are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
Fig. 1 is a flowchart schematically showing an identification method of a one-card according to an embodiment of the present invention;
FIG. 2 is a schematic diagram schematically illustrating the variation of the required image range when generating feature vectors for keypoints according to an embodiment of the invention;
Fig. 3 is a schematic diagram schematically showing a forming process of 8-dimensional vectors corresponding to each region according to an embodiment of the present invention;
Fig. 4 is a block diagram schematically showing the structure of an identification system of a one-card according to the present embodiment.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart schematically illustrating an identification method 100 of a one-card according to an embodiment of the present invention.
As shown in fig. 1, at step S101, a face region in a face image is extracted. Specifically, a face image of a card swiping person in a target scene and a face image recorded during registration of the all-purpose card are obtained, and a face region in the face image is extracted. In some embodiments, when extracting the face region in the face image, the face image may be processed by a semantic segmentation algorithm.
At step S102, key points of the face region are acquired. Specifically, key points of the face region are obtained according to a scale invariant feature transform algorithm. Since the scale invariant feature transform algorithm belongs to the prior art, it will not be described in detail here.
At step S103, the image range required when the key point generates the feature vector is adjusted. In some embodiments, the initial size of the image range required when the keypoint generates the feature vector is calculated by the local contrast of the pixel point within the keypoint scale range; obtaining the position of the center point of the corresponding part according to the average value of the transverse coordinates and the longitudinal coordinates of the key points of each part; taking a vector formed by the positions of the key points and the central points as an expansion direction vector to obtain an expansion direction; calculating the density degree of the key points according to the ratio of the number of the key points of each part in the range of the included angle of the extending direction to the total number of all the key points of the corresponding part; calculating the expansion quantity of the range required by generating the feature vector by the key points according to the main direction of each key point of each part, the density degree of the key points and the expansion direction vector; the image range required when the feature vector is generated is determined according to the initial size, the expansion direction and the expansion amount of the required image range.
At step S104, feature vectors corresponding to the key points are determined. Specifically, the feature vector corresponding to the key point is determined according to the gradient of the pixel point in the image range. This step is prior art and will not be repeated here.
At step S105, it is determined whether the card reader is a card owner according to the matching result. Specifically, the feature vector of the face image of the card swiping person is matched with the feature vector corresponding to the face image recorded during the registration of the all-purpose card, and whether the card swiping person is the card owner is judged according to the matching result. In some embodiments, the matching result may be obtained by calculating the euclidean distance between the two feature vectors, or may be obtained by calculating the cosine similarity.
The scheme of the present invention will be described in detail with reference to fig. 2 and 3.
Step one: and acquiring a face image of a card swiping person in the target scene and a face image recorded during registration of the one-card, and extracting a face region in the face image.
Specifically, the face region may be segmented out by semantic segmentation. Because of the complexity and uncertainty of background information during image acquisition, key points outside a face area are easy to acquire when key points are acquired, and the generation of the features of each part of the subsequent face is interfered, so that the face area is segmented through semantic segmentation, and then the subsequent steps are carried out. The related steps of extracting the face area in the face image are as follows:
(1) Setting a label, dividing a face image into two types of face areas and background areas, namely marking the pixel points of the face areas of the image as 1, marking the pixel points corresponding to the background areas as 0, and constructing a training set.
(2) The network in the semantic segmentation model adopts Unet structure, cross entropy loss function is used, and training is carried out to obtain a trained semantic segmentation model.
(3) And processing the obtained face image by using the trained semantic segmentation model, and extracting the face region.
Step two: key points of the face image are obtained through a Scale-invariant feature transform algorithm (Scale-INVARIANT FEATURE TRANSFORM or a SIFT algorithm), and the size and shape of an image area required by each key point when the feature is generated are adjusted according to local contrast, key point density and position information around the key points, so that feature vectors capable of better expressing the features of different parts of the face are obtained.
In face recognition, key points of a face image can be extracted by using a SIFT algorithm, and feature vectors are generated through pixel points in a certain range around the key points, so that the size and shape of an image area required by each key point when the feature vectors are generated according to local contrast, key point density and position information in a certain range around the pixel points corresponding to the image positions of the key points can be dynamically adjusted, and the generated features of the key points in different positions can better express the information of corresponding parts of the face.
The specific flow of the invention for processing the face image is as follows:
a. and extracting key points of different parts from the face area.
In the face image, different parts of the face have different obvious texture characteristics and gradient characteristics, so key points with obvious characteristic areas on the face image can be extracted through a SIFT algorithm. These areas generally correspond to important parts of the face, such as eyes, nose, mouth, facial contours, eyebrows, ears, etc. Feature vectors which are easier to compare differences can be generated through feature points of different parts.
In the above step, the face region in the image is extracted through semantic segmentation, so that the key points obtained through the SIFT algorithm have no interference of background information, the characteristics of each part of the face can be well represented, and each key point has three pieces of information including position (x, y), scale sigma and main direction theta.
B. and calculating and adjusting the size and shape of the image area required by each key point when generating the feature vector according to the local contrast, the key point density and the position information of the pixel points around each key point and the corresponding information of other key points nearby the key point.
When the key points adopt the fixed size and shape of the image area, the edge information of the face parts where the key points are positioned on the face image is mainly expressed, and the information expression in the outline of each part of the face is insufficient. Therefore, the size and shape of the required image area when each key point generates the feature vector are adjusted through the local contrast, the key point density and the position information of the pixel points around the key point and the corresponding information of other key points nearby the key point, so that the required image area is expanded into or along the outline of each part of the face, and the information of each part of the face can be expressed more comprehensively when the key point generates the feature vector.
1) And classifying the identified key points to obtain key points of different categories. Wherein the key points comprise key points of the face part and key points of special point categories. All key points are divided into nine categories by a clustering algorithm, namely left eyebrow, right eyebrow, left eye, right eye, nose, mouth, left ear, right ear and face outline. Because the position span of the face outline in the face image is the largest, the key point with the largest horizontal and vertical coordinate variance in the class is the key point corresponding to the face outline.
And obtaining key points of the key points of each category, which do not belong to the face part, by using an isolated forest algorithm through the values of the horizontal and vertical coordinates, and forming a special point category by the key points of the key points which do not belong to any part, wherein the key points of the special point category possibly represent the characteristics of wrinkles, moles and the like of each part of the face, which do not belong to the main part of the face, and are also beneficial to representing the characteristics of the face image. The eight parts of the left and right eyebrows, left and right eyes, left and right ears, mouth and nose are respectively the 1 st part to the 8 th part, the 9 th part is the special point, and the 10 th part is the facial contour.
2) And expanding the required image area into the outline of each part when each key point generates the feature vector. Specifically, the image area required by each key point when generating the feature vector is expanded into the outline of each part, so that the feature vector generated by the key point of the corresponding part can more comprehensively express the features of each part. The larger the contrast in the area around the key point, the more information the pixel points near the key point contain, the more the required range for generating the feature vector should be enlarged, so that the generated feature vector contains more detail information. On the contrary, the smaller the contrast in the area around the key point, the less information the pixel points near the key point contain, and the range required for generating the feature vector does not need to be enlarged, and even the range is contracted.
For each keypoint, an initial size of the range side needed for each keypoint to generate the feature vector is first determined. And calculating the initial size of a range required when the key point generates the feature vector according to the local contrast of the pixel points in the key point scale sigma range.
The calculation method of the initial size W i,j of the required range side length when the key point generates the feature vector is as follows:
wherein, W i,j is the initial size of the side length of the image range required when generating the feature vector for the jth key point of the ith part; sigma i,j is the scale of the jth key point of the ith part; d i,j is the contrast of the image area in the circular range taking the corresponding position of the jth key point of the ith part as the center and sigma i,j as the radius; i i,j is a set of gray values of all pixel points in the image area in a circular range with the jth key point of the ith part as a circle center and sigma i,j as a radius; max () and min () are a maximum function and a minimum function, respectively; d is the contrast of the image global, P is the set of gray values of all pixel points in the image global range, and [ (] is a rounding function.
Determining the expansion direction of each key point: and taking a vector formed by the positions of the key points and the central points as an expansion direction vector. Specifically, the mean of the abscissa and ordinate of the ith site key point obtains the position of the site center pointThe pixel points between the key points and the central points of each part can embody the characteristics of the part, and the position of the range, which is required when the key points generate the characteristic vector, towards the central points is expanded. The positions of the eight parts of the left eyebrow, the right eye, the left ear, the right ear, the mouth and the nose and the position span of the special point part on the face are small, the position span of the face outline on the face is large because of no other parts in each part outline, and the key points of other parts in the face outline influence the adjustment of the required range when the key points corresponding to the face outline generate the feature vector, so i epsilon [1,9] excludes the key points corresponding to the face outline.
With the jth key point coordinate (x i,j,yi,j) of the ith location toward the ith location center pointTaking the distance between two points as the modular length to make the vector of the jth key point of the ith part towards the central point of the ith partI.e. extending the direction vector, by orthogonal decompositionVector divided into the horizontal direction of the jth key point of the ith partVector in vertical direction to jth key point of ith positionAndThe direction of (2) is the direction in which the range required for generating the feature vector by the jth key point of the ith part is expanded.
And finally, determining the expansion quantity of the required range in the determined direction when the feature vector is generated by the corresponding key points of each part. Modulus of vector of key point horizontal directionThe larger the horizontal distance between the key point and the central point of the part is, the smaller the horizontal distance between the key point and the central point of the part is, the less prominent the characteristics of the part are expressed by the nearby pixel points, the more the range required for generating the characteristic vector should be expanded in the horizontal direction, so that the key point which is slightly far away from the central point can also express the characteristics of the part well, the smaller the horizontal distance between the key point and the central point of the part is, the more the key point is close to the central point of the part in the horizontal direction, and the range required for generating the characteristic vector does not need to be greatly expanded in the direction or the range does not need to be expanded in the direction. In the vertical direction, the description thereof will be omitted. Meanwhile, the denser the key points in each area are in the range of the included angle of the extending direction, the more outstanding the characteristics of the key points in the range of the included angle are, the greater the extending degree of the key points in the two directions is, the thinner the key points in the area are, the less outstanding the characteristics of the key points in the range of the included angle are, and the lesser the extending degree of the key points in the two directions is.
Therefore, the expansion degree of the required range when the feature vector is generated by the key points can be determined through the key point density degree S i,j, and the key point density degree S i,j is calculated as follows: s i,j=ni,j/Ni. Wherein S i,j is the degree of density of the key points of the jth key point of the ith part in the right angle range between the two expansion directions, N i,j is the number of the key points of the ith part in the included angle range between the two expansion directions, and N i is the total number of all the key points corresponding to the ith part.
The main directions of the key points are obtained by gradients in a certain range around the key points, the amplitude of gradients in all directions in a certain range around the key points can be counted by each key point in the process of obtaining the main directions of the key points, and the direction with the largest amplitude is the main direction of the key points, so that the main direction of each key point represents the complexity of the features near the positions of the corresponding images of the key points to a certain extent, the larger the main direction amplitude is, the more the features near the positions of the corresponding images of the key points are highlighted, and the range required by the feature vector generated by the key points does not need to be enlarged. If the smaller the main direction amplitude value is, the less the feature near the position of the corresponding image of the key point is highlighted, the range required by the key point when generating the feature vector should be enlarged to obtain the highlighted feature.
Through the main direction theta of each key point of each part, the density degree S i,j of the key points and the modulus of the corresponding vectorAndAn expansion D x,i,j of the image range in the horizontal direction and an expansion D y,i,j of the image range in the vertical direction required for generating the feature vector by the key point are calculated.
Wherein D x,i,j represents the expansion amount of the image range in the horizontal direction required for generating the feature vector by the key point, D y,i,j represents the expansion amount of the image range in the vertical direction required for generating the feature vector by the key point,Is the ith partVectors of horizontal directions of key pointsIs provided with a die for the mold,Vector in vertical direction for jth key point of ith partS i,j is the degree of density of the jth key point of the ith part in the range of the included angle between the two extending directions, F i,j is the ratio of the amplitude value of the main direction theta of the jth key point of the ith part to the sum of the amplitudes of all directions, and alpha is a custom parameter alpha E (0, 1), in this embodiment alpha=0.5.
And obtaining the range of each key point when the key point generates the feature vector according to the initial range side length and the expansion amounts of the vertical direction and the horizontal direction when the key point generates the feature vector. And taking the corresponding position of the key point as the center, taking the side length of the initial range when the feature vector is generated, if the expansion direction of the range required by the key point when the feature vector is generated is right and upper, expanding the expansion amount of the horizontal direction at the right of the initial range, and expanding the expansion amount of the vertical direction at the upper of the range on the sub-basis. If the initial range side length is 4, the expansion amount in the horizontal direction is 3, the expansion amount in the vertical direction is 1, and the expansion directions are right and upper, the change of the range when the feature vector is generated by the key point is as shown in fig. 2. Wherein the solid square represents the initial image range when the feature vector is generated, and the dotted square represents the image range after expansion to the right and upward.
C. and obtaining the corresponding characteristics of the key points according to the gradient of the pixel points in the range required by each key point when the characteristic vector is generated.
The pixel points around each key point can represent the characteristics of the corresponding face part of the key point, all the key points of the face images are converted into characteristic vectors, and the similarity of two face images can be judged through the difference between the characteristic vectors converted by different face images.
And (3) dividing the image area required by generating the feature vector corresponding to each key point into four equal parts according to the transverse size and the longitudinal size, dividing the area into 16 parts by connecting the corresponding four equal parts, generating an 8-dimensional vector in each part of area, and splicing the 16 8-dimensional vectors to obtain the 128-dimensional vector corresponding to each key point. As shown in fig. 3, the gradient directions and gradient amplitudes of all pixels in each area are counted, the gradient directions are rotated from the anticlockwise direction by 0 degrees, the gradient directions are divided into 8 directions every 45 degrees, wherein 0 degrees to 45 degrees are the first direction, 45 degrees to 90 degrees are the second direction, and so on, the gradient amplitudes of each direction are accumulated, so that the gradient amplitude sum of each direction in 8 directions in each area is obtained, the gradient amplitude sum of the first direction is a first value of an 8-dimensional vector, the gradient amplitude sum of the second direction is a second value of the 8-dimensional vector, and so on, and the gradient amplitude sums of the 8 directions are sequentially combined to form an 8-dimensional vector.
And splicing the 8-dimensional vectors corresponding to each region into a 128-dimensional vector according to the sequence from top to bottom, wherein each key point corresponds to a 128-dimensional vector.
Step three: whether the person who swipes the card is a card owner or not according to the distance between the feature vector generated by the face image of the person who swipes the card and the feature vector generated by the face image recorded during the registration of the one-card
And matching key points in the two images by using a nearest neighbor algorithm, and finding out the most similar key point of each key point in the other image. For each key point in the face image recorded during the registration of the one-card, the cosine similarity between the key point and all key points in the face image of the person who swipes the card is calculated, and the key point with the smallest distance is selected as the best matching key point to form a key point pair. The RANSAC algorithm (Random Sample Consensus, random sample consensus algorithm) is used to remove key points due to image noise. And calculating the cosine similarity between the corresponding vectors of the two key points in each key point pair, and calculating the average value of the cosine similarity between the corresponding vectors of all the key point pairs as the similarity of the two images.
When the similarity of the two images is larger than 0.8, the card reader is judged to be the card owner, and successful card reading is allowed. And when the similarity of the two images is more than 0.7 and less than or equal to 0.8, informing a card reader of re-acquiring the face images, judging that the card reader is a card owner if the similarity of the two images is more than 0.8, allowing successful card reading, and judging that the card reader is not the card owner if the similarity of the two images is still not more than 0.8, and disallowing successful card reading. If the similarity of the two images is smaller than 0.7, the card swiping person is directly judged not to be the card owner, and successful card swiping is not allowed.
Fig. 4 is a block diagram schematically showing the structure of an identification system of a one-card according to the present embodiment.
The invention also provides a system for identifying the one-card. As shown in fig. 4, the system includes a processor and a memory storing computer program instructions that when executed by the processor implement a method of identification according to one of the aforementioned one-card.
The system further comprises other components known to those skilled in the art, such as a communication bus and a communication interface, the arrangement and function of which are known in the art and are therefore not described in detail herein.
In the context of this patent, the foregoing memory may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, the computer-readable storage medium may be any suitable magnetic or magneto-optical storage medium, such as, for example, resistance change Memory RRAM (Resistive Random Access Memory), dynamic Random Access Memory DRAM (Dynamic Random Access Memory), static Random Access Memory SRAM (Static Random-Access Memory), enhanced dynamic Random Access Memory EDRAM (ENHANCED DYNAMIC Random Access Memory), high-Bandwidth Memory HBM (High-Bandwidth Memory), hybrid storage cube HMC (Hybrid Memory Cube), or the like, or any other medium that may be used to store the desired information and that may be accessed by an application, a module, or both. Any such computer storage media may be part of, or accessible by, or connectable to, the device. Any of the applications or modules described herein may be implemented using computer-readable/executable instructions that may be stored or otherwise maintained by such computer-readable media.
In the description of the present specification, the meaning of "a plurality", "a number" or "a plurality" is at least two, for example, two, three or more, etc., unless explicitly defined otherwise.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.

Claims (5)

1. The utility model provides a method for identifying a one-card, which is characterized by comprising the following steps:
acquiring a face image of a card swiping person in a target scene and a face image recorded during registration of a card, and extracting a face region in the face image;
obtaining key points of the face area according to a scale invariant feature transformation algorithm;
adjusting the image range required by the key points when generating the feature vector;
determining a feature vector corresponding to the key point according to the gradient of the pixel point in the image range;
matching the feature vector of the face image of the card swiping person with the feature vector corresponding to the face image recorded during the registration of the one-card, and judging whether the card swiping person is the card owner according to the matching result;
the adjustment mode of the image range required in the generation of the feature vector comprises the following steps:
Calculating the initial size of an image range required when the key point generates a feature vector according to the local contrast of the pixel point in the key point scale range;
Obtaining the position of the center point of the corresponding part according to the average value of the transverse coordinates and the longitudinal coordinates of the key points of each part;
Taking a vector formed by the positions of the key points and the central points as an expansion direction vector to obtain an expansion direction;
calculating the density degree of the key points according to the ratio of the number of the key points of each part in the range of the included angle of the extending direction to the total number of all the key points of the corresponding part;
calculating the expansion quantity of the range required by generating the feature vector by the key points according to the main direction of each key point of each part, the density degree of the key points and the expansion direction vector;
Determining the image range required when the feature vector is generated according to the initial size, the expansion direction and the expansion amount of the required image range;
The calculation formula of the density degree of the key points comprises the following steps: s i,j=ni,j/Ni; wherein S i,j is the degree of density of the jth key point of the ith part in the right angle range between the two expansion directions; the number of the ith key points of the ith part of n i,j in the range of the included angle between the two expansion directions; n i is the total number of all key points corresponding to the ith part;
The calculation formula of the expansion amount of the range required when the key point generates the feature vector is as follows:
Wherein D x,i,j represents the expansion amount of the image range in the horizontal direction required for generating the feature vector by the key point, D y,i,j represents the expansion amount of the image range in the vertical direction required for generating the feature vector by the key point, Is the ith partVectors of horizontal directions of key pointsIs a mold of (2); vector in vertical direction for jth key point of ith part Is a mold of (2); s i,j is the degree of density of the jth key point of the ith part in the range of the included angle between the two expansion directions; f i,j is the ratio of the amplitude value of the principal direction theta of the jth key point of the ith part to the sum of the amplitude values of all directions; alpha is a custom parameter, and alpha epsilon (0, 1);
Taking a vector formed by the positions of the key points and the central points as an expansion direction vector to obtain an expansion direction, wherein the method comprises the following steps of:
Determining the central points of all the parts, taking the direction of the key points in the corresponding parts towards the central points of the parts as the vector direction, and calculating the coordinates of the key points and the distance between the central points of the parts;
taking the distance as a modular length, and constructing an expansion direction vector according to the vector direction;
The expansion direction vector is subjected to orthogonal decomposition and is divided into a vector in the horizontal direction and a vector in the vertical direction, so that the expansion direction is obtained.
2. The method for recognizing a one-card according to claim 1, wherein the calculation formula of the initial size of the required image range when generating the feature vector is:
wherein, W i,j is the initial size of the side length of the image range required when generating the feature vector for the jth key point of the ith part; sigma i,j is the scale of the jth key point of the ith part; d i,j is the contrast of the image area in the circular range taking the corresponding position of the jth key point of the ith part as the center and sigma i,j as the radius; i i,j is a set of gray values of all pixel points in the image area in a circular range with the jth key point of the ith part as a circle center and sigma i,j as a radius; max () and min () are a maximum function and a minimum function, respectively; d is the contrast of the image global, P is the set of gray values of all pixel points in the image global range, and [ (] is a rounding function.
3. The method for identifying a one-card according to claim 1, wherein matching the feature vector of the face image of the person who swipes the card with the feature vector corresponding to the face image entered at the time of registration of the one-card comprises:
The European or cosine similarity of the two feature vectors is calculated.
4. The method for recognizing a one-card according to claim 3, wherein the step of judging whether the card swiping person is a card owner according to the matching result comprises:
matching key points in the face image of the card swiping person and the face image recorded during registration of the one-card according to a nearest neighbor algorithm, and finding out the most similar key points;
calculating cosine similarity between feature vectors corresponding to all the most similar key points;
calculating the average value of all cosine similarity, and taking the average value as the similarity between the face image of the card swiping person and the face image recorded during the registration of the all-purpose card;
responding to the similarity larger than the first set value, and judging that the person swiping the card is the card owner;
notifying the card reader to re-acquire the face image in response to the similarity being greater than the second set value and less than the first set value;
and in response to the similarity being smaller than the second set value, judging that the card swiping person is not the card owner.
5. A one-card identification system, comprising:
A processor;
Memory storing computer program instructions which, when executed by the processor, implement a method of identification of a one-card according to any one of claims 1-4.
CN202410418672.8A 2024-04-09 2024-04-09 Method and system for identifying one-card Active CN118015685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410418672.8A CN118015685B (en) 2024-04-09 2024-04-09 Method and system for identifying one-card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410418672.8A CN118015685B (en) 2024-04-09 2024-04-09 Method and system for identifying one-card

Publications (2)

Publication Number Publication Date
CN118015685A CN118015685A (en) 2024-05-10
CN118015685B true CN118015685B (en) 2024-07-02

Family

ID=90950338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410418672.8A Active CN118015685B (en) 2024-04-09 2024-04-09 Method and system for identifying one-card

Country Status (1)

Country Link
CN (1) CN118015685B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661557A (en) * 2009-09-22 2010-03-03 中国科学院上海应用物理研究所 Face recognition system and face recognition method based on intelligent card
CN117078960A (en) * 2023-08-22 2023-11-17 华东理工大学 A near-infrared spectrum analysis method and system based on image feature extraction

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8885893B1 (en) * 2011-11-22 2014-11-11 The United States Of America As Represented By The Secretary Of The Navy System and method for adaptive face recognition
CN103514432B (en) * 2012-06-25 2017-09-01 诺基亚技术有限公司 Face feature extraction method, device and computer program product
JP6474210B2 (en) * 2014-07-31 2019-02-27 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation High-speed search method for large-scale image database
CN106780440B (en) * 2016-11-29 2019-05-31 北京邮电大学 A method for automatic comparison and identification of images of exploding circuit board fragments
CN108154107B (en) * 2017-12-22 2021-09-14 北京航空航天大学 Method for determining scene category to which remote sensing image belongs
CN109102559B (en) * 2018-08-16 2021-03-23 Oppo广东移动通信有限公司 Three-dimensional model processing method and device
CN110033484B (en) * 2019-04-22 2022-05-24 福州大学 High canopy density forest sample plot tree height extraction method combining UAV image and TLS point cloud
CN110728234A (en) * 2019-10-12 2020-01-24 爱驰汽车有限公司 Driver face recognition method, system, device and medium
CN113986105B (en) * 2020-07-27 2024-05-31 北京达佳互联信息技术有限公司 Face image deformation method and device, electronic equipment and storage medium
CN115063566B (en) * 2022-08-15 2022-11-22 天津艺点意创科技有限公司 AR-based creative product display method and display equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661557A (en) * 2009-09-22 2010-03-03 中国科学院上海应用物理研究所 Face recognition system and face recognition method based on intelligent card
CN117078960A (en) * 2023-08-22 2023-11-17 华东理工大学 A near-infrared spectrum analysis method and system based on image feature extraction

Also Published As

Publication number Publication date
CN118015685A (en) 2024-05-10

Similar Documents

Publication Publication Date Title
CN111368683B (en) Face Image Feature Extraction Method and Face Recognition Method Based on Modular Constraint CenterFace
US6222939B1 (en) Labeled bunch graphs for image analysis
CN105447441B (en) Face authentication method and device
CN105956578B (en) A kind of face verification method of identity-based certificate information
CN101540000B (en) Iris classification method based on texture primitive statistical characteristic analysis
Yao et al. A new pedestrian detection method based on combined HOG and LSS features
CN112232184A (en) A multi-angle face recognition method based on deep learning and spatial transformation network
CN107169479A (en) Intelligent mobile equipment sensitive data means of defence based on fingerprint authentication
CN101131728A (en) A Face Shape Matching Method Based on Shape Context
CN118710866A (en) A target positioning method based on monocular vision
CN115795394A (en) Hierarchical Multimodality and Advanced Incremental Learning for Biometric Fusion Identity Recognition
CN118982681A (en) Object identification method, system, device and computer readable storage medium
CN110969101A (en) A Face Detection and Tracking Method Based on HOG and Feature Descriptors
CN118015685B (en) Method and system for identifying one-card
CN109753912A (en) A Tensor-Based Multispectral Palmprint Matching Method
CN116959075B (en) Deep learning-based iterative optimization method for identity recognition robot
Khoirunnisaa et al. The biometrics system based on iris image processing: a review
Vinitha et al. Face recognition using probabilistic neural networks
CN114612692A (en) Feature extraction method based on artificial intelligence image recognition
Ayodele et al. Development of a modified local Binary Pattern-Gabor Wavelet transform aging invariant face recognition system
CN116110077B (en) A pedestrian re-identification method based on block partitioning and pose-assisted alignment under occlusion conditions
Yu et al. Improved MB-LBP feature extraction algorithm based on reduced-dimensional HOG
CN116229557B (en) Identification methods, devices, equipment and storage media
Zhang et al. Gender recognition based on face image
Zhou et al. Eye localization based on face alignment

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