CN109558794B - Moire-based image recognition method, device, equipment and storage medium - Google Patents

Moire-based image recognition method, device, equipment and storage medium Download PDF

Info

Publication number
CN109558794B
CN109558794B CN201811206940.0A CN201811206940A CN109558794B CN 109558794 B CN109558794 B CN 109558794B CN 201811206940 A CN201811206940 A CN 201811206940A CN 109558794 B CN109558794 B CN 109558794B
Authority
CN
China
Prior art keywords
image
moire
sub
images
training
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
CN201811206940.0A
Other languages
Chinese (zh)
Other versions
CN109558794A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811206940.0A priority Critical patent/CN109558794B/en
Priority to PCT/CN2018/124583 priority patent/WO2020077866A1/en
Publication of CN109558794A publication Critical patent/CN109558794A/en
Application granted granted Critical
Publication of CN109558794B publication Critical patent/CN109558794B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present application relates to the field of image recognition technologies, and in particular, to an image recognition method, device, computer device, and storage medium based on moire. The image recognition method based on the moire comprises the following steps: acquiring a plurality of images to be processed, and packaging the images into an image set, wherein the image set comprises images with mole patterns and images without mole patterns; extracting mole pattern characteristics contained in any image in the image set to form a training sample; and taking the training sample as a reference, performing SVM training in an SVM model to obtain an image recognition sample, and performing moire recognition on an unknown image according to the image recognition sample. Aiming at the problem of fraud by using the turnup picture in the financial transaction process, the application adopts the LBP algorithm to identify the mole patterns, and improves the identification speed and accuracy of the turnup picture through SVM model training.

Description

Moire-based image recognition method, device, equipment and storage medium
Technical Field
The present application relates to the field of image recognition technologies, and in particular, to a method, an apparatus, a device, and a storage medium for recognizing an image based on moire.
Background
During financial activities, it is often necessary to face the user to determine identity. However, in the face recognition process, some people use the flipped face image to impersonate the real face to achieve the purpose of fraud. At present, in the process of identifying the turner photos, identification is mainly carried out by randomly sending out some random instruction actions, such as blinking, shaking left and right and shaking up and down; or infrared rays are adopted to identify the temperature of the human body.
However, when the identification is performed by using a random instruction action, there is a response time difference, so that the user needs to repeatedly perform the identification for many times, and the accuracy of the identification is reduced due to the fact that the interference of the surrounding environment is received when the infrared human body temperature is used for identification.
Disclosure of Invention
In view of the foregoing, it is necessary to provide an image recognition method, device, equipment and storage medium based on moire, which solve the problem that the conventional flip photo has low recognition degree and cannot recognize the user's identity timely and effectively.
An image recognition method based on mole patterns comprises the following steps:
Acquiring a plurality of images to be processed, and packaging the images into an image set, wherein the image set comprises images with mole patterns and images without mole patterns;
Extracting mole pattern characteristics contained in any image in the image set to form a training sample;
Taking the training sample as an input parameter, and performing SVM training in a Support Vector Machine (SVM) model to obtain an image recognition model;
And receiving the uploaded unknown image, and carrying out moire recognition on the unknown image according to the image recognition model so as to determine whether the image is a flip image.
In one embodiment, the acquiring a plurality of images to be processed is packaged into an image set, where the image set includes an image with moire and an image without moire, and the method includes:
when the distance from any image to the screen of the image collector is smaller than a certain distance threshold value, collecting the image;
Performing size and color normalization processing on the acquired image to obtain a normalized image;
and sequencing all the normalized images according to the generation time, and packaging the images into an image set.
In one embodiment, the extracting the moire feature included in any image in the image set to form a training sample includes:
dividing the image into subblocks with the same size as n multiplied by n according to the horizontal direction and the vertical direction, wherein n is any positive integer;
and respectively carrying out multi-scale local binary pattern LBP histogram calculation on each sub-block, wherein the calculation method comprises the following steps:
The LBP P,R value for each pixel over a scale is:
Wherein g c is the gray value of the pixel point, g p is the gray value of p pixel points extracted on the circumference with g c as the center and R as the radius, S represents the influence factor, 2 p represents the pattern type number, wherein p=0, …, n;
Establishing an LBP histogram of the sub-block according to the LBP P,R value;
And obtaining a sub-block corresponding to the maximum value of the ordinate in the LBP histogram as a training sample to enter into the parameter, wherein if LBP P,R of the sub-block corresponding to the maximum value of the ordinate in the LBP histogram is zero or positive, the image is indicated to have no moire, and if the LBP P,R of the sub-block corresponding to the maximum value of the ordinate in the LBP histogram is negative, the image is indicated to have moire.
In one embodiment, the training samples are used as input parameters, and the SVM training is performed in a support vector machine SVM model to obtain an image recognition model, including:
Acquiring the training sample;
Performing Principal Component Analysis (PCA) on the training sample to reduce the dimension to obtain a low-dimension joint feature matrix;
The low-dimensional combined feature matrix is added into the SVM model for classification training, so that a plurality of two types of identifiers, namely a moire identifier and a moire-free identifier, are obtained;
and carrying out moire recognition on the training sample by using the moire recognizer and the moire-free recognizer, and establishing an image recognition model according to the moire recognition result.
In one embodiment, the extracting the moire feature included in any image in the image set to form a training sample includes:
Dividing the image into nine training sub-image blocks, and dividing the training sub-image blocks into two groups, wherein the first group is composed of m blocks as training sub-image blocks, the second group is composed of 9-m blocks as check sub-image blocks, m is more than or equal to 1 and less than or equal to 8, and m is an integer;
Extracting mole pattern characteristics in the training sub-blocks, wherein the training sub-blocks with mole patterns are marked as '2', the training sub-blocks without mole patterns are marked as '1', and a training histogram is established;
Extracting the moire characteristic in the check sub-graph block, wherein the check sub-graph block with the moire is marked as '2', and the check sub-graph block without the moire is marked as '1', and establishing a check histogram;
Summarizing the training histogram and the checking histogram to obtain an image histogram, if one sub-block mark on the image histogram is '2', the image has moire features, otherwise, the image does not have moire features, and a training sample is formed.
In one embodiment, the performing size and color normalization on the acquired image to obtain a normalized image includes:
Non-downsampling NSCT decomposition with the scale w and the direction h is carried out on the pictures in the picture library, so that a low-frequency sub-picture A0 and a plurality of high-frequency sub-pictures { A1,1 with different scales and different directions are obtained; a1,2; ..; aw,1; ..; aw, h }, the high-frequency subgraph Aw, h describes face texture information on a scale w and a direction h;
Obtaining the size of each high-frequency subgraph, and calculating an arithmetic mean to obtain a size normalized picture;
The gray value of the image is expressed by the corresponding relation between the brightness Y and R, G, B color components established by the size normalized picture according to the change relation between RGB and YUV color spaces, and the formula is as follows: y=ar+bg+cb, where a, b, c are color parameters, 0.ltoreq.a, b, c.ltoreq.1, and the gray value of the image is expressed according to the luminance value Y, so as to achieve normalization of gray.
In one embodiment, the performing size and color normalization on the acquired image to obtain a normalized image includes:
Extracting two-dimensional Gabor small ripple rational characteristics in gray level I (x, y) of the image;
the wavelet theory feature is subjected to filtering convolution in each direction of each scale,
The convolution formula is: w u,v(x,y)=I(x,y)×ψu,v (x, y),
W u,v (x, y) represents texture feature vectors on scale v, direction u, the amplitude of W u,v contains the local energy variation of the image, W u,v includes real and imaginary part responses of Gabor kernel, ψ u,v (x, y) represents frequency, and I (x, y) represents gray value;
the speed of convolution computation is improved by using FFT transformation and inverse FFT transformation, and the formula is:
W1 u,v(x,y)=F-1u,v(x,y))·F(I(x,y)),
W 1 u,v denotes an improved texture feature vector, F () denotes an FFT transform, F -1 () denotes an inverse FFT transform, and u×v feature vectors after the transform are obtained, and these feature vectors are combined to achieve normalization of picture size and gradation.
An image recognition device based on moire, comprising the following modules:
The image set forming module is used for acquiring a plurality of images to be processed and packaging the images into an image set, wherein the image set comprises images with mole patterns and images without mole patterns;
The training sample generation module is used for extracting mole pattern characteristics contained in any image in the image set to form a training sample;
the recognition model generation module is used for taking the training sample as an input parameter, and performing SVM training in a Support Vector Machine (SVM) model to obtain an image recognition model;
the unknown image recognition module is used for receiving the uploaded unknown image, and carrying out moire recognition on the unknown image according to the image recognition model so as to determine whether the image is a flip image or not.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the mole pattern based image recognition method described above.
A storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the mole pattern based image recognition method described above.
The image identification method, the device, the computer equipment and the storage medium based on the moire comprise the steps of obtaining a plurality of images to be processed, and packaging the images into an image set, wherein the image set comprises images with the moire and images without the moire; extracting mole pattern characteristics contained in any image in the image set to form a training sample; taking the training sample as an input parameter, and performing SVM training in a Support Vector Machine (SVM) model to obtain an image recognition model; and receiving the uploaded unknown image, and carrying out moire recognition on the unknown image according to the image recognition model so as to determine whether the image is a flip image. Aiming at the problem of fraud caused by using the turnup picture in the financial transaction process, the technical scheme adopts the LBP algorithm to identify the mole patterns, and improves the identification speed and accuracy of the turnup picture through SVM model training.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application.
FIG. 1 is an overall flow chart of an image recognition method based on moire patterns according to the present application;
FIG. 2 is a schematic diagram of an image set forming process in an image recognition method based on moire according to the present application;
FIG. 3 is a schematic diagram of a mole recognition sample generation process in an image recognition method based on mole patterns according to the present application;
Fig. 4 is a block diagram of an image recognition apparatus based on moire according to the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Fig. 1 is a flowchart of a moire-based image recognition method according to an embodiment of the present application, as shown in fig. 1, the moire-based image recognition method includes the following steps:
S1, acquiring a plurality of images to be processed, and packaging the images into an image set, wherein the image set comprises images with mole patterns and images without mole patterns;
specifically, an image collector arranged at the detection terminal is called to collect images of two groups of images respectively, wherein the first group of images are real faces, the second group of images are flip photos, and the image collector can be a CCD image collector and mainly comprises the following parts: the system comprises a front-end optical device, a CCD image acquisition module, an analog-to-digital conversion module, an FPGA preprocessing module, a Flash program storage module, a DSP image processing module, an SDRAM data storage module, an image display module and an image processor.
When the image acquisition is carried out, the photosensitive element is arranged on the CCD image acquisition device to sense the ambient light intensity, the light intensity threshold value is arranged in the processor of the back-end PC, the light intensity threshold value is generally set to be 200lx, when the ambient light intensity is less than 200lx, the flash lamp is started, and when the ambient light intensity is greater than 200lx, the flash lamp is not used.
S2, extracting mole pattern features contained in any image in the image set to form a training sample;
Specifically, the local binary pattern (English: local binary patterns, abbreviated: LBP) is a feature for classification in the field of machine vision, and is proposed in 1994. The local binary pattern is a very powerful feature on texture classification problems; if the local binary pattern feature is combined with the direction gradient histogram, the detection effect can be effectively improved. The local binary pattern is a simple but very efficient texture operator. The most important property of LBP is robustness to gray scale variations such as illumination variations, and another important property is its simplicity of calculation, which allows it to analyze images in real time.
S3, taking the training sample as a reference, and performing SVM training in a Support Vector Machine (SVM) model to obtain an image recognition model;
SVM (Support Vector Machine) is a support vector machine model, which is a common distinguishing method. In the field of machine learning, a supervised learning model is commonly used for pattern recognition, classification, and regression analysis.
The method is used for analyzing the linear separable condition, and for the linear inseparable condition, a nonlinear mapping algorithm is used for converting a sample which is linearly inseparable in a low-dimensional input space into a high-dimensional characteristic space so as to enable the sample to be linearly separable, so that the high-dimensional characteristic space can be used for carrying out linear analysis on nonlinear characteristics of the sample by adopting a linear algorithm; and based on the theory of structural risk minimization, an optimal hyperplane is constructed in the feature space, so that the learner is globally optimized, and the expectation in the whole sample space meets a certain upper bound with a certain probability.
S4, receiving the uploaded unknown image, and carrying out moire recognition on the unknown image according to the image recognition model so as to determine whether the image is a flip image.
Specifically, the image recognition model (i.e. the trained SVM model) is written into the SDK program for standby, the SDK program written into the image recognition model is called to capture the unknown image, the captured image (i.e. the unknown image) is taken into the SVM model for mole pattern recognition, if the captured image (i.e. the unknown image) is recognized to have mole patterns, the captured image is a flip-flop image, otherwise, the captured image is a real face image.
In the embodiment, the mole pattern features are identified through the LBP algorithm and training is carried out through the SVM model, so that the mole pattern identification efficiency can be effectively improved, and the flip picture can be more rapidly and effectively identified.
Fig. 2 is a schematic diagram of an image set forming process in an image recognition method based on moire, as shown in the drawing, the obtaining a plurality of images to be processed, and packing the images into an image set, where the image set includes an image with moire and an image without moire, and includes:
s101, when the distance between any one of the images and the screen of the image collector is smaller than a certain distance threshold value, collecting the images;
Specifically, when the images are collected, a mode of fixed time interval can be adopted for collection, namely, each image needing image collection is photographed twice, and the image with high definition in the twice photographing is taken as the image to be identified.
In the process of photographing twice, the angle of the image collector is rotated to shoot the images to be subjected to moire recognition from different angles, for example, the first time of shooting and collecting the images in a mode of forming a 90-degree right angle with the images to be subjected to image collection is adopted, and the second time of shooting and collecting the images to be subjected to moire recognition by rotating the image collector by 30-45 degrees. By adopting two image acquisition modes with different angles, the acquired image gray scale can be influenced by different light incidence angles, and the gray scale of the picture is further different in the process of normalizing the picture, so that the condition that the moire characteristic caused by shooting the picture image with a single angle is not outstanding is prevented, and the accuracy of identifying the moire characteristic by applying an LBP algorithm is influenced.
S102, carrying out size and color normalization processing on the acquired image to obtain a normalized image;
Specifically, when the size normalization processing is performed, comparing the size of the image with a preset size, obtaining the preset size of the image, and stretching or extruding the image according to the preset size to achieve the normalization effect.
S103, sorting all the normalized images according to the generation time, and packaging the images into an image set.
Specifically, normalized images are given time marks, images generated at the same time are firstly packed into an image group, common nodes among the image groups are established, and then the images are packed into an image set.
In this embodiment, the speed and efficiency of mole pattern recognition are greatly improved by performing normalization processing on the image.
In one embodiment, the extracting the moire feature included in any image in the image set to form a training sample includes:
dividing the image into subblocks with the same size as n multiplied by n according to the horizontal direction and the vertical direction, wherein n is any positive integer;
and respectively carrying out multi-scale local binary pattern LBP histogram calculation on each sub-block, wherein the calculation method comprises the following steps:
The LBP P,R value for each pixel over a scale is:
Wherein g c is the gray value of the pixel point, g p is the gray value of p pixel points extracted on the circumference with g c as the center and R as the radius, S represents the influence factor, 2 p represents the pattern type number, wherein p=0, …, n;
Establishing an LBP histogram of the sub-block according to the LBP P,R value;
And obtaining a sub-block corresponding to the maximum value of the ordinate in the LBP histogram as a training sample to enter into the parameter, wherein if LBP P,R of the sub-block corresponding to the maximum value of the ordinate in the LBP histogram is zero or positive, the image is indicated to have no moire, and if the LBP P,R of the sub-block corresponding to the maximum value of the ordinate in the LBP histogram is negative, the image is indicated to have moire.
In this embodiment, the image is divided into a plurality of sub-blocks, and each sub-block is solved by using the LBP value, so that the moire feature in the image can be better identified.
Fig. 3 is a schematic diagram of a process of generating a mole recognition sample in an image recognition method based on mole patterns, where as shown in the figure, the training sample is used as a reference, and SVM training is performed in a support vector machine SVM model to obtain an image recognition model, and the method includes:
S301, acquiring the training sample;
S302, performing Principal Component Analysis (PCA) on the training sample to reduce the dimension to obtain a low-dimension joint feature matrix;
PCA is generally used for exploring and visualizing a high-dimensional data set, and can also be used for data compression, data preprocessing and the like. PCA may synthesize high-dimensional variables that may have dependencies into linearly independent low-dimensional variables, referred to as principal components (PRINCIPAL COMPONENTS). The new low-dimensional data set will preserve as much as possible the variables of the original data.
S303, the low-dimensional joint feature matrix is added into the SVM model for classification training, so that a plurality of two types of identifiers, namely a moire identifier and a moire-free identifier, are obtained;
The training sample is classified and identified by using a moire identifier and a moire-free identifier, voting is carried out according to the identification result, the total number of votes obtained from two categories is counted, and the category with more votes is the training sample category; counting the samples by adopting a voting mode can reduce missing important data in the counting process, and if so, other parameters can be used as the basis of voting to vote until the category is selected.
S304, applying the moire identifier and the moire-free identifier to carry out moire identification on the training sample, and establishing an image identification model according to the moire identification result.
Specifically, when the moire or no moire identifier is used for training the training samples, the moire identifier is used for training each training sample to identify images with moire, and then the no moire identifier is used for identifying images without moire; or each picture in the training sample is firstly identified by using a moire identifier, then is directly identified by using a moire-free identifier, and then the identification results are summarized.
In this embodiment, the efficiency of moire recognition may be improved by performing dimension reduction processing on the training sample.
In one embodiment, the extracting the moire feature included in any one of the images in the image set to form a training sample includes:
Dividing the image into nine training sub-image blocks, and dividing the training sub-image blocks into two groups, wherein the first group is composed of m blocks as training sub-image blocks, the second group is composed of 9-m blocks as check sub-image blocks, m is more than or equal to 1 and less than or equal to 8, and m is an integer;
Specifically, the image is divided into nine sub-blocks, the first group is 5 blocks, the second group is 4 blocks, so that the positions of mole lines are determined, position statistics is conducted on the mole line generation positions of different types of the flip pictures, a linear statistical data model of the mole line positions is built, and the linear statistical data model is trained so as to obtain common positions of the mole lines of the different types of the flip pictures. When a new image is identified, mole patterns of the region where a certain image block is located can be identified, and if the region identifies the mole patterns, other regions do not need to be identified. By adopting the mode, the efficiency of moire recognition can be improved, and meanwhile, for a high-definition CCD image collector, the process of extracting pixel points by LBP features is not needed, so that the time for extracting pixels and gray scale is saved.
Extracting mole pattern characteristics in the training sub-blocks, wherein the training sub-blocks with mole patterns are marked as '2', the training sub-blocks without mole patterns are marked as '1', and a training histogram is established;
specifically, in histogram statistics, the number of classes per region in the histogram is determined by the input assignment grid; if a layer is specified, the symbolic means of the layer defines the number of classes; if the data set is specified.
Extracting the moire characteristic in the check sub-graph block, wherein the check sub-graph block with the moire is marked as '2', and the check sub-graph block without the moire is marked as '1', and establishing a check histogram;
Summarizing the training histogram and the checking histogram to obtain an image histogram, if one sub-block mark on the image histogram is '2', the image has moire features, otherwise, the image does not have moire features, and a training sample is formed.
In this embodiment, the training tiles may be further divided, that is, each training tile is divided into nine training sub-tiles with equal areas, LBP features are extracted from each training sub-tile, a histogram is also built, a statistical histogram is calculated, the sub-tiles are marked with "2" and not with "1", and the histogram of the sub-tiles is passed through.
In one embodiment, the performing size and color normalization on the acquired image to obtain a normalized image includes:
Non-downsampling NSCT decomposition with the scale w and the direction h is carried out on the pictures in the picture library, so that a low-frequency sub-picture A0 and a plurality of high-frequency sub-pictures { A1,1 with different scales and different directions are obtained; a1,2; ..; aw,1; ..; aw, h }, the high-frequency subgraph Aw, h describes face texture information on a scale w and a direction h;
Obtaining the size of each high-frequency subgraph, and calculating an arithmetic mean to obtain a size normalized picture;
The gray value of the image is expressed by the corresponding relation between the brightness Y and R, G, B color components established by the size normalized picture according to the change relation between RGB and YUV color spaces, and the formula is as follows: y=ar+bg+cb, where a, b, c are color parameters, 0.ltoreq.a, b, c.ltoreq.1, i.e., any one of a, b, c is a number between 0 and 1, and the gray value of the image is expressed according to the luminance value Y, so that normalization of gray is achieved.
Specifically, in the process of normalizing the picture, a large number of image descriptors (such as SIFT, HOG, etc.) can be randomly extracted, each image descriptor is a vector, and K-means clustering algorithm is adopted to cluster the image descriptors to obtain K categories (K is an adjustable parameter, and typical values are 1024, 2048, 10000, etc.). The clustering center is called as a word, and all the categories obtained by clustering form a codebook;
Extracting feature descriptors (e.g., SIFT, HOG, etc.) in a dense manner for an image; for each descriptor, the codebook is searched for the most similar cluster center (i.e., word). And counting the occurrence frequency of different words in the image to form a histogram. And carrying out L1 normalization on the histogram to obtain the final image texture feature based on the bag-of-words model.
In this embodiment, the interference suffered by the moire recognition process can be reduced by processing the size and the pixels of the picture.
In one embodiment, the performing size and color normalization on the acquired image to obtain a normalized image includes:
Extracting two-dimensional Gabor small ripple rational characteristics in gray level I (x, y) of the image;
the wavelet theory feature is subjected to filtering convolution in each direction of each scale,
The convolution formula is: w u,v(x,y)=I(x,y)×ψu,v (x, y),
W u,v (x, y) represents texture feature vectors on scale v, direction u, the amplitude of W u,v contains the local energy variation of the image, W u,v includes real and imaginary part responses of Gabor kernel, ψ u,v (x, y) represents frequency, and I (x, y) represents gray value;
the speed of convolution computation is improved by using FFT transformation and inverse FFT transformation, and the formula is:
W1 u,v(x,y)=F-1u,v(x,y))·F(I(x,y)),
W 1 u,v denotes an improved texture feature vector, F () denotes an FFT transform, F -1 () denotes an inverse FFT transform, and u×v feature vectors after the transform are obtained, and these feature vectors are combined to achieve normalization of picture size and gradation.
In this embodiment, the face image is normalized by using a Gabor wavelet kernel function method, so as to further improve the accuracy of moire recognition.
In one embodiment, a moire-based image recognition device is provided, as shown in fig. 4, including the following modules:
The image set forming module is used for acquiring a plurality of images to be processed and packaging the images into an image set, wherein the image set comprises images with mole patterns and images without mole patterns;
The training sample generation module is used for extracting mole pattern characteristics contained in any image in the image set to form a training sample;
the recognition model generation module is used for taking the training sample as an input parameter, and performing SVM training in a Support Vector Machine (SVM) model to obtain an image recognition model;
the unknown image recognition module is used for receiving the uploaded unknown image, and carrying out moire recognition on the unknown image according to the image recognition model so as to determine whether the image is a flip image or not.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the mole pattern based image recognition method of the above embodiments.
A storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the mole pattern based image recognition method in the above embodiments. The storage medium may be a non-volatile storage medium.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above-described embodiments represent only some exemplary embodiments of the application, which are described in more detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (9)

1. The image recognition method based on the moire is characterized by comprising the following steps of:
Acquiring a plurality of images to be processed, and packaging the images into an image set, wherein the image set comprises images with mole patterns and images without mole patterns;
Extracting mole pattern characteristics contained in any image in the image set to form a training sample;
Taking the training sample as an input parameter, and performing SVM training in a Support Vector Machine (SVM) model to obtain an image recognition model;
Receiving an uploaded unknown image, and carrying out moire recognition on the unknown image according to the image recognition model so as to determine whether the image is a flip image or not;
The extracting the mole pattern feature contained in any image in the image set to form a training sample comprises the following steps: dividing the image into subblocks with the same size as n multiplied by n according to the horizontal direction and the vertical direction, wherein n is any positive integer; and respectively carrying out multi-scale local binary pattern LBP histogram calculation on each sub-block, wherein the calculation method comprises the following steps: the LBP P,R value for each pixel over a scale is: Wherein g c is the gray value of the pixel point, g p is the gray value of p pixel points extracted on the circumference with g c as the center and R as the radius, S represents the influence factor, 2 p represents the pattern type number, wherein p=0, …, n; establishing an LBP histogram of the sub-block according to the LBP P,R value; and obtaining a sub-block corresponding to the maximum value of the ordinate in the LBP histogram as a training sample to enter into the parameter, wherein if LBP P,R of the sub-block corresponding to the maximum value of the ordinate in the LBP histogram is zero or positive, the image is indicated to have no moire, and if the LBP P,R of the sub-block corresponding to the maximum value of the ordinate in the LBP histogram is negative, the image is indicated to have moire.
2. The moire-based image recognition method according to claim 1, wherein the capturing a plurality of images to be processed is packed into an image set including images with moire and images without moire, comprising:
when the distance from any image to the screen of the image collector is smaller than a certain distance threshold value, collecting the image;
Performing size and color normalization processing on the acquired image to obtain a normalized image;
and sequencing all the normalized images according to the generation time, and packaging the images into an image set.
3. The mole pattern-based image recognition method according to claim 1, wherein the performing SVM training in a support vector machine SVM model with the training sample as a reference to obtain an image recognition model comprises:
Acquiring the training sample;
Performing Principal Component Analysis (PCA) on the training sample to reduce the dimension to obtain a low-dimension joint feature matrix;
The low-dimensional combined feature matrix is added into the SVM model for classification training, so that a plurality of two types of identifiers, namely a moire identifier and a moire-free identifier, are obtained;
and carrying out moire recognition on the training sample by using the moire recognizer and the moire-free recognizer, and establishing an image recognition model according to the moire recognition result.
4. The moire-based image recognition method according to claim 1, wherein said extracting moire features contained in any one of said images in said image set to form a training sample comprises:
dividing the image into nine training sub-image blocks, and dividing the training sub-image blocks into two groups, wherein the first group is composed of m blocks as training sub-image blocks, the second group is composed of 9-m blocks as checking sub-image blocks, m is more than or equal to 1 and less than or equal to 8, and m is an integer;
Extracting the moire characteristics in the training sub-graph block, wherein the training sub-graph block with the moire is marked as '2', the training sub-graph block without the moire is marked as '1', and a training histogram is established;
Extracting the moire characteristic in the check sub-graph block, wherein the check sub-graph block with the moire is marked as '2', and the check sub-graph block without the moire is marked as '1', and establishing a check histogram;
Summarizing the training histogram and the checking histogram to obtain an image histogram, if one sub-block mark on the image histogram is '2', the image has moire features, otherwise, the image does not have moire features, and a training sample is formed.
5. The moire-based image recognition method according to claim 2, wherein said subjecting said acquired image to size and color normalization processing to obtain a normalized image comprises:
non-downsampling NSCT decomposition with the scale w and the direction h is carried out on the acquired image, so that a low-frequency sub-image A0 and a plurality of high-frequency sub-images { A1,1 with different scales and different directions are obtained; a1,2; ..; aw,1; ..; aw, h }, the high-frequency subgraph Aw, h describes face texture information on a scale w and a direction h;
Obtaining the size of each high-frequency subgraph, and calculating an arithmetic mean to obtain a size normalized picture;
The gray value of the image is expressed by the corresponding relation between the brightness Y and R, G, B color components established by the size normalized picture according to the change relation between RGB and YUV color spaces, and the formula is as follows: y=ar+bg+cb, where a, b, c are color parameters, 0.ltoreq.a, b, c.ltoreq.1, and the gray value of the image is expressed according to the luminance value Y, so as to achieve normalization of gray.
6. The moire-based image recognition method according to claim 2, wherein said subjecting said acquired image to size and color normalization processing to obtain a normalized image comprises:
Extracting two-dimensional Gabor small ripple rational characteristics in gray level I (x, y) of the image;
the wavelet theory feature is subjected to filtering convolution in each direction of each scale,
The convolution formula is: w u,v(x,y)=I(x,y)×ψu,v (x, y),
W u,v (x, y) represents texture feature vectors on scale v, direction u, the amplitude of W u,v contains the local energy variation of the image, W u,v includes real and imaginary part responses of Gabor kernel, ψ u,v (x, y) represents frequency, and I (x, y) represents gray value;
the speed of convolution computation is improved by using FFT transformation and inverse FFT transformation, and the formula is:
W1 u,v(x,y)=F-1u,v(x,y))·F(I(x,y)),
W 1 u,v denotes an improved texture feature vector, F () denotes an FFT transform, F -1 () denotes an inverse FF T transform, and u×v feature vectors after the transform are obtained, and these feature vectors are combined to achieve normalization of picture size and gradation.
7. An image recognition device based on moire, which is characterized by comprising the following modules:
The image set forming module is used for acquiring a plurality of images to be processed and packaging the images into an image set, wherein the image set comprises images with mole patterns and images without mole patterns;
The training sample generation module is used for extracting mole pattern characteristics contained in any image in the image set to form a training sample;
the recognition model generation module is used for taking the training sample as an input parameter, and performing SVM training in a Support Vector Machine (SVM) model to obtain an image recognition model;
the unknown image recognition module is used for receiving the uploaded unknown image, and carrying out moire recognition on the unknown image according to the image recognition model so as to determine whether the image is a flip image or not;
The training sample generation module is specifically configured to: dividing the image into subblocks with the same size as n multiplied by n according to the horizontal direction and the vertical direction, wherein n is any positive integer; and respectively carrying out multi-scale local binary pattern LBP histogram calculation on each sub-block, wherein the calculation method comprises the following steps: the LBP P,R value for each pixel over a scale is: Wherein g c is the gray value of the pixel point, g p is the gray value of p pixel points extracted on the circumference with g c as the center and R as the radius, S represents the influence factor, 2 p represents the pattern type number, wherein p=0, …, n; establishing an LBP histogram of the sub-block according to the LBP P,R value; and obtaining a sub-block corresponding to the maximum value of the ordinate in the LBP histogram as a training sample to enter into the parameter, wherein if LBP P,R of the sub-block corresponding to the maximum value of the ordinate in the LBP histogram is zero or positive, the image is indicated to have no moire, and if the LBP P,R of the sub-block corresponding to the maximum value of the ordinate in the LBP histogram is negative, the image is indicated to have moire.
8. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the steps of the mole pattern based image recognition method of any one of claims 1 to 6.
9. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the mole pattern based image recognition method of any one of claims 1 to 6.
CN201811206940.0A 2018-10-17 2018-10-17 Moire-based image recognition method, device, equipment and storage medium Active CN109558794B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811206940.0A CN109558794B (en) 2018-10-17 Moire-based image recognition method, device, equipment and storage medium
PCT/CN2018/124583 WO2020077866A1 (en) 2018-10-17 2018-12-28 Moire-based image recognition method and apparatus, and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811206940.0A CN109558794B (en) 2018-10-17 Moire-based image recognition method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109558794A CN109558794A (en) 2019-04-02
CN109558794B true CN109558794B (en) 2024-06-28

Family

ID=

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105118048A (en) * 2015-07-17 2015-12-02 北京旷视科技有限公司 Method and device for identifying copying certificate image

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105118048A (en) * 2015-07-17 2015-12-02 北京旷视科技有限公司 Method and device for identifying copying certificate image

Similar Documents

Publication Publication Date Title
WO2020077866A1 (en) Moire-based image recognition method and apparatus, and device and storage medium
Jourabloo et al. Face de-spoofing: Anti-spoofing via noise modeling
Qureshi et al. A bibliography of pixel-based blind image forgery detection techniques
Wang et al. Deep networks for saliency detection via local estimation and global search
JP4161659B2 (en) Image recognition system, recognition method thereof, and program
US8184915B2 (en) Device and method for fast computation of region based image features
AU2017201281B2 (en) Identifying matching images
US8842889B1 (en) System and method for automatic face recognition
JP5574033B2 (en) Image recognition system, recognition method thereof, and program
CN111160273A (en) Hyperspectral image space spectrum combined classification method and device
Lin et al. Live Face Verification with Multiple Instantialized Local Homographic Parameterization.
Cun et al. Image splicing localization via semi-global network and fully connected conditional random fields
CN109190456B (en) Multi-feature fusion overlook pedestrian detection method based on aggregated channel features and gray level co-occurrence matrix
Lin et al. Saliency detection within a deep convolutional architecture
Zhong et al. Visual orientation inhomogeneity based scale-invariant feature transform
CN106156777A (en) Textual image detection method and device
CN106056083A (en) Information processing method and terminal
CN114783003A (en) Pedestrian re-identification method and device based on local feature attention
CN111259756A (en) Pedestrian re-identification method based on local high-frequency features and mixed metric learning
Li et al. Quality assessment for fingerprints collected by smartphone cameras
Toca et al. Normalized Autobinomial Markov Channels For Pedestrian Detection.
Avola et al. Real-time deep learning method for automated detection and localization of structural defects in manufactured products
Liao et al. Unconstrained face detection
CN112434731B (en) Image recognition method, device and readable storage medium
CN113963295A (en) Method, device, equipment and storage medium for recognizing landmark in video clip

Legal Events

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