CN117095444B - Image recognition method based on artificial intelligence - Google Patents

Image recognition method based on artificial intelligence Download PDF

Info

Publication number
CN117095444B
CN117095444B CN202311101271.1A CN202311101271A CN117095444B CN 117095444 B CN117095444 B CN 117095444B CN 202311101271 A CN202311101271 A CN 202311101271A CN 117095444 B CN117095444 B CN 117095444B
Authority
CN
China
Prior art keywords
pixel point
image
pixel
gray level
calculating
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
CN202311101271.1A
Other languages
Chinese (zh)
Other versions
CN117095444A (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.)
Guangzhou Xingfeida Electronic Technology Co ltd
Original Assignee
Guangzhou Xingfeida Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Xingfeida Electronic Technology Co ltd filed Critical Guangzhou Xingfeida Electronic Technology Co ltd
Priority to CN202311101271.1A priority Critical patent/CN117095444B/en
Publication of CN117095444A publication Critical patent/CN117095444A/en
Application granted granted Critical
Publication of CN117095444B publication Critical patent/CN117095444B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Medical Informatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to an image recognition method based on artificial intelligence, which comprises the steps of obtaining a corresponding face image in a face image; denoising the gray level image of the face image to obtain a new gray level image, acquiring an actual pixel point association range of each pixel point in the new gray level image, and calculating the importance degree of each pixel point belonging to the five-element pixel point based on the actual pixel point association range; calculating an important index of each gray level according to the importance degree, correcting the accumulated probability distribution of each gray level in the new gray level image according to the important index to obtain new accumulated probability distribution, and carrying out image enhancement on the new gray level image according to the new accumulated probability distribution to obtain an enhanced image; and (3) acquiring an image recognition result corresponding to the enhanced image, and carrying out equalization processing on the face image to different degrees according to the corrected cumulative probability distribution, so that the contrast of the image is greatly enhanced while the detail characteristics of the image are ensured.

Description

Image recognition method based on artificial intelligence
Technical Field
The invention relates to the technical field of image processing, in particular to an image recognition method based on artificial intelligence.
Background
Image recognition is by extracting distinguishing feature information in an image to describe and represent a target or a specific pattern in the image, however, image quality is a key factor that causes image recognition accuracy, and higher image quality can provide more details and features, which helps the recognition algorithm to extract and utilize the information in the image more accurately. And the low-quality image may cause problems such as information loss, noise, distortion, and distortion, thereby reducing the accuracy of image recognition.
In the image acquisition process, the image quality is more or less affected by the acquisition environment, for example, the definition and visibility of the acquired image are reduced due to various environmental influence factors such as illumination conditions, background noise and the like, so that in order to ensure the accuracy of image identification, the acquired image needs to be subjected to enhancement processing.
In the prior art, a histogram equalization method is generally used for enhancing an acquired image so as to improve the definition and visibility of the acquired image, and further, the image after image enhancement is used for image recognition so as to accurately extract and utilize information in the image. However, in the conventional histogram equalization, global processing is performed on the acquired image, and the contrast of the image affected by the environment such as illumination condition is low, so that the detail of the image is easily lost when the image is enhanced by using the conventional histogram equalization, and the accuracy of image identification is reduced.
Therefore, how to improve the definition of an image to improve the accuracy of image recognition is a urgent problem to be solved.
Disclosure of Invention
In view of this, the embodiment of the invention provides an image recognition method based on artificial intelligence, so as to solve the problem of how to improve the definition of an image and improve the accuracy of image recognition.
The embodiment of the invention provides an image recognition method based on artificial intelligence, which comprises the following steps:
acquiring face images of a user based on a preset sampling frequency, performing semantic segmentation on the face images to obtain corresponding face images in the face images, acquiring gray images corresponding to the face images, and performing denoising treatment on the gray images to obtain new gray images;
acquiring gradient amplitude and gradient direction of each pixel point in the new gray image, and calculating the credibility of each pixel point belonging to the five-element edge pixel point in the new gray image according to the gradient amplitude difference and the gradient direction difference between the pixel points;
acquiring an initial pixel point association range according to stored standard face images of all users, calculating an actual pixel point association range of each pixel point in the new gray level image according to the credibility of all pixel points and the initial pixel point association range, and calculating the importance degree of each pixel point belonging to five-element pixel points in the new gray level image based on the actual pixel point association range of all pixel points;
calculating an important index of each gray level in the new gray level image according to the importance degree of all the pixel points, acquiring the accumulated probability distribution of each gray level in the new gray level image, correcting the accumulated probability distribution of each gray level according to the important index of all the gray levels to acquire a new accumulated probability distribution, and carrying out gray value mapping on the pixel points in the new gray level image according to the new accumulated probability distribution of all the gray levels to acquire an enhanced image;
and carrying out image recognition on the enhanced images corresponding to all the face images to obtain corresponding image recognition results.
Preferably, the method for calculating the reliability of each pixel point belonging to the five sense organs edge pixel point in the new gray scale image according to the gradient amplitude difference and the gradient direction difference between the pixel points includes:
obtaining the maximum gradient amplitude according to the gradient amplitude of all pixel points in the new gray level image;
taking any pixel point in the new gray level image as a central pixel point of a preset sliding window, aiming at any non-central pixel point in the preset sliding window, calculating the ratio between the gradient amplitude of the non-central pixel point and the gradient amplitude of the central pixel point, and taking the non-central pixel point as a marked pixel point if the ratio is greater than or equal to a preset ratio threshold;
obtaining all the marked pixel points and the corresponding number of the marked pixel points in the preset sliding window, and respectively calculating the direction similarity between the gradient direction of each marked pixel point and the gradient direction of the central pixel point;
obtaining the total number of pixel points in the preset sliding window, and calculating the reliability of the central pixel point belonging to the five-sense organ edge pixel point according to the maximum gradient amplitude, the number of marked pixel points, the total number of pixel points, the gradient amplitude of the central pixel point and the direction similarity between the gradient direction of each marked pixel point and the gradient direction of the central pixel point.
Preferably, the method for calculating the reliability of the central pixel belonging to the five sense organs edge pixel according to the maximum gradient amplitude, the number of the marked pixels, the total number of the pixels, the gradient amplitude of the central pixel, and the directional similarity between the gradient direction of each marked pixel and the gradient direction of the central pixel includes:
calculating the number ratio between the number of the marked pixel points and the total number of the pixel points, and calculating the gradient ratio between the gradient amplitude of the central pixel point and the maximum gradient amplitude;
calculating a direction similarity mean value according to the direction similarity between the gradient direction of each marked pixel point and the gradient direction of the central pixel point;
taking the product of the number ratio, the gradient ratio and the direction similarity mean value as the credibility that the center pixel belongs to the five-sense organ edge pixel.
Preferably, the method for acquiring the initial pixel point association range according to the stored standard face images of all users includes:
and respectively acquiring the number of the pixels contained in the five-sense organ regions in each standard face image, calculating the average value of the number of the pixels according to the number of the pixels contained in the five-sense organ regions in all the standard face images, and taking the average value of the number of the pixels as an initial pixel association range.
Preferably, the method for calculating the actual pixel association range of each pixel in the new gray image according to the credibility of all the pixels and the initial pixel association range includes:
and aiming at any pixel point in the new gray level image, acquiring a multiplication result between the credibility of the pixel point and the initial pixel point association range, and taking a result obtained by upwardly rounding the multiplication result as an actual pixel point association range of the pixel point.
Preferably, the method for calculating the importance degree of each pixel point belonging to the five-element pixel point in the new gray scale image based on the actual pixel point association ranges of all the pixel points includes:
constructing a correlation range circle of the pixel points in the new gray level image by taking any pixel point in the new gray level image as a circle center according to the actual pixel point correlation range of the pixel points;
constructing an association range circle of each pixel point in the new gray image, respectively counting the number of the association range circles containing each pixel point, and calculating the addition result of the number of the association range circles of all the pixel points;
and obtaining the total number of the pixel points in the new gray level image, taking the product of the number of the associated range circles of the pixel points and the total number of the pixel points as a molecule, taking the addition result as a denominator, and taking the obtained ratio as the importance degree of the pixel points belonging to the five sense organs for any pixel point in the new gray level image.
Preferably, the method for calculating the importance index of each gray level in the new gray level image according to the importance degrees of all the pixel points includes:
and acquiring target pixel points under the gray level according to any gray level in the new gray level image, calculating the average value of the importance degrees of all the target pixel points, and taking the average value as an important index of the gray level.
Preferably, the correcting the cumulative probability distribution of each gray level according to the important indexes of all gray levels to obtain a new cumulative probability distribution includes:
acquiring a first product between the important index of each gray level and the cumulative probability distribution, and calculating the summation result of the important indexes of all gray levels;
for any gray level, calculating a first addition result of all gray levels before the gray level and including a first product between the gray levels, taking the first addition result as a numerator, taking the addition result as a denominator, and taking the obtained ratio as a new cumulative probability distribution of the gray level.
Compared with the prior art, the embodiment of the invention has the beneficial effects that:
according to the invention, the facial image of a user is acquired, the five-sense organ area in the facial image is segmented to obtain the corresponding facial image, then the facial image is subjected to grey treatment and denoising pretreatment to obtain the grey image without noise interference, as the detail characteristics of the areas such as the five-sense organ area and the fetal mark area of the face are relatively large, the gradient amplitude of the corresponding pixel points is relatively large, and the relevance with surrounding pixel points is relatively strong, the reliability of the pixel points corresponding to the five-sense organ edge pixel points is analyzed according to the gradient information of each pixel point in the grey image, the greater the reliability is, the pixel points of the areas such as the five-sense organ area or the fetal mark area are approximately likely to be the higher the reliability of each pixel point, and the importance degree of each pixel point is calculated based on the pixel points and the reliability of the surrounding pixel points, so that the influence of the environment is eliminated, the importance degree of the pixel points on the five-sense organ pixel points is analyzed, and the importance degree of all pixel points is relatively high, and the importance degree of all pixel points is calculated according to the importance degree of all pixel points is more in reality, the grey level is simultaneously, the face image is accurately identified and the image is accurately, the image is accurately identified, and the image is accurately identified according to the face image, and the accuracy is greatly-corrected, and the face image is greatly-distributed according to the importance, and the image is greatly-improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for image recognition based on artificial intelligence according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, 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.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the invention. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
It should be understood that the sequence numbers of the steps in the following embodiments do not mean the order of execution, and the execution order of the processes should be determined by the functions and the internal logic, and should not be construed as limiting the implementation process of the embodiments of the present invention.
In order to illustrate the technical scheme of the invention, the following description is made by specific examples.
The adaptation scene of the invention is: for example, in various scenes related to authentication and identification such as an access control system and a security monitoring system, the embodiment of the invention takes the authentication and identification of the access control system as an example, acquires face images of a user, pre-processes the face images to obtain face images, enhances the face images, and performs image identification on the face images with enhanced images to obtain user identity characteristics, and controls the opening and closing of the access control system according to the user identity characteristics.
Referring to fig. 1, a method flowchart of an image recognition method based on artificial intelligence according to an embodiment of the present invention may include, as shown in fig. 1:
step S101, collecting facial images of users, carrying out semantic segmentation on the facial images to obtain corresponding face images in the facial images, obtaining gray images corresponding to the face images, and carrying out denoising treatment on the gray images to obtain new gray images.
Specifically, video image acquisition is carried out on a user to be authenticated by using image acquisition equipment of the door control system, so as to obtain a facial image of the user. It is worth to say that, when image acquisition is performed, firstly, whether a user appears in the image acquisition range of the access control system is detected, and if the user appears in the image acquisition range, image acquisition is started to the user, so that a face image of the user is obtained.
In order to reduce the interference of environmental factors except the face images, in the embodiment of the invention, the DNN technology is adopted to carry out semantic segmentation on each face image so as to eliminate background interference, thus obtaining the face images after background segmentation, and the DNN technology is adopted to carry out semantic segmentation on any face image, so that the corresponding face image is obtained through the following steps:
(1) And training the DNN network by using the training set to obtain a trained DNN network.
Specifically, the training process of the DNN network is as follows: firstly, collecting face images of a plurality of users with different face shapes and skin colors, then labeling each face image, setting the pixel value of a background pixel point to be 0, setting the pixel value of a pixel point belonging to the five sense organs of the user to be 1, and training a DNN network by using the face images with labels, wherein the task of the DNN network is classification, and the used loss function is cross entropy loss function.
It should be noted that, the training process of the DNN network is the prior art, and will not be repeated here.
(2) And inputting the facial image into a trained DNN network for semantic segmentation to obtain a corresponding facial image.
So far, the N face images can be subjected to semantic segmentation by using the trained DNN network, so that the corresponding face image in each face image is obtained. Then, carrying out graying treatment on the face image to obtain a corresponding gray image, and denoising the gray image by adopting Gaussian filtering to obtain a denoised gray image, namely a new gray image. It should be noted that, the graying processing and the gaussian filtering belong to the prior art, and are not repeated in the embodiment of the present invention.
Step S102, obtaining the gradient amplitude and gradient direction of each pixel point in the new gray image, and calculating the credibility of each pixel point belonging to the five sense organs edge pixel point in the new gray image according to the gradient amplitude difference and gradient direction difference between the pixel points.
Specifically, after a new gray image is obtained, taking more detail features of areas such as facial features and birthmarks of human faces into consideration, the gradient value of corresponding pixel points in the new gray image is larger, the gradient value of the pixel points is larger, the relevance between the pixel points and surrounding pixel points is stronger, the reliability of the corresponding pixel points is larger, and the corresponding pixel points are more likely to be pixel points of the detail parts of the facial features, so that the method adopts a sobel operator to obtain the gradient f of each pixel point in the new gray image in the x direction x And a gradient f in the y-direction y For any pixel point, according to the gradient f of the pixel point x And gradient f y Calculating to obtain the corresponding gradient directionGradient amplitude->
The larger the gradient amplitude of the pixel point is, the more likely the pixel point belongs to the five sense organs edge pixel point is, but the gradient amplitude of the isolated noise point is also larger, if only the gradient amplitude of the pixel point is considered, the interference of the isolated noise point can be greatly caused, and the subsequent enhancement result is also greatly interfered. However, considering that if a pixel belongs to a pixel of the five-sense organ edge detail, a plurality of pixels with larger gradient amplitude exist near the pixel, and the gradient directions of the pixels belonging to the five-sense organ edge are similar because the five-sense organ has stronger edge characteristics, the credibility of each pixel belonging to the five-sense organ edge pixel in the new gray image is calculated according to the gradient amplitude difference and the gradient direction difference between the pixels, and the specific process is as follows:
(1) Obtaining a maximum gradient amplitude f according to the gradient amplitudes of all pixel points in the new gray level image max
(2) And taking any pixel point in the new gray level image as a central pixel point of a preset sliding window, aiming at any non-central pixel point in the preset sliding window, calculating the ratio between the gradient amplitude of the non-central pixel point and the gradient amplitude of the central pixel point, and taking the non-central pixel point as a marked pixel point if the ratio is greater than or equal to a preset ratio threshold.
Specifically, an n×n sliding window is established in the new gray-scale image with any pixel as a center pixel, and n is a checked value, where n=9. Because the gradient amplitude of the pixel points belonging to the edge of the five sense organs is larger, and a plurality of pixel points with larger gradient amplitude exist around the pixel points, the pixel points except the central pixel value in the sliding window are marked according to the gradient amplitude to obtain the pixel points with larger gradient amplitude, and specifically, the ratio between the gradient amplitude of each non-central pixel point and the gradient amplitude of the central pixel point in the sliding window is calculated respectively, and then the ratio formula is:
wherein g i For the credibility of the ith non-center pixel point in the sliding window, f i Gradient magnitude for the ith non-center pixel in the sliding window。
The ratio threshold is set to be 0.35, and the ratio threshold can be adaptively set according to the implementation scene, so that the invention does not need to be used. And comparing the ratio corresponding to the non-central pixel point with a ratio threshold for any non-central pixel point in the sliding window, and taking the non-central pixel point as a marked pixel point if the ratio is greater than or equal to the ratio threshold.
(3) And obtaining all the marked pixel points and the corresponding number of the marked pixel points in the preset sliding window, and respectively calculating the direction similarity between the gradient direction of each marked pixel point and the gradient direction of the central pixel point.
Specifically, all the marked pixel points in the sliding window are obtained by utilizing the step (2), and the number of the marked pixel points is counted. For any marked pixel point, the cosine similarity is used for calculating the direction similarity between the gradient direction of the marked pixel point and the gradient direction of the central pixel point, wherein the cosine similarity is the prior art, and detailed description is not repeated in the embodiment of the invention.
(4) Obtaining the total number of pixel points in the preset sliding window, and calculating the reliability of the central pixel point belonging to the five-sense organ edge pixel point according to the maximum gradient amplitude, the number of marked pixel points, the total number of pixel points, the gradient amplitude of the central pixel point and the direction similarity between the gradient direction of each marked pixel point and the gradient direction of the central pixel point.
Specifically, the total number of pixel points in the sliding window can be determined according to the size of the sliding window, then, the number ratio between the number of marked pixel points and the total number of pixel points is calculated, and the gradient ratio between the gradient amplitude of the central pixel point and the maximum gradient amplitude is calculated; calculating a direction similarity mean value according to the direction similarity between the gradient direction of each marked pixel point and the gradient direction of the central pixel point; taking the product of the number ratio, the gradient ratio and the direction similarity mean value as the credibility of the center pixel belonging to the five sense organs edge pixel, wherein the corresponding calculation expression of the credibility is as follows:
wherein h is z The reliability that the central pixel point z of the sliding window belongs to the five sense organs edge pixel point, n 2 For the total number of pixels in the sliding window, i.e. the area of the sliding window, f z The gradient amplitude, k, of the central pixel point z of the sliding window j And M is the number of the marked pixel points, wherein the similarity is the direction between the gradient direction of the jth marked pixel point and the gradient direction of the central pixel point.
It should be noted that, the larger the duty ratio of the marked pixels in the sliding window, that is, the larger the number M of the marked pixels, the larger the gradient amplitude of the pixels in the region where the sliding window is located, which may be the five-sense organ region, and the larger the reliability that the corresponding center pixels belong to the five-sense organ edge pixels; the more similar the gradient direction of the marked pixel point and the central pixel point of the sliding window is, namely the average value of the direction similarityThe larger the gradient direction characteristics of the pixel points in the sliding window are, the larger the reliability that the corresponding center pixel point belongs to the pixel points at the edge of the five sense organs is, if the gradient direction characteristics of the pixel points in the sliding window accord with the characteristics of the gradient directions of the pixel points in the five sense organs; the larger the gradient amplitude of the central pixel point of the sliding window is, the corresponding gradient ratio is +.>The larger the pixel point at the center of the sliding window is, the more likely the pixel point at the edge of the five sense organs is.
So far, the reliability of each pixel point belonging to the five-sense organ edge pixel point in the new gray level image can be obtained by utilizing the calculation expression of the reliability.
Step S103, obtaining an initial pixel point association range according to the stored standard face images of all users, calculating an actual pixel point association range of each pixel point in the new gray image according to the credibility of all the pixel points and the initial pixel point association range, and calculating the importance degree of each pixel point belonging to the five-element pixel point in the new gray image based on the actual pixel point association range of all the pixel points.
Specifically, the greater the reliability of the pixel point, the more likely the pixel point is a five-sense organ edge pixel point, but under the influence of ambient lighting conditions, the overexposure or underexposure can both lead to the gradient amplitude of the pixel point to be smaller, so that the reliability of the pixel point is changed, namely, the reliability of part of the pixel points is supposed to be larger, but the reliability of the pixel point is smaller due to the influence of ambient lighting, but the pixel points are distributed near the pixel points with larger reliability, so that the importance degree of each pixel point is obtained according to the reliability of the pixel point and the surrounding pixel points, and the specific process is as follows:
(1) And respectively acquiring the number of the pixels contained in the five-sense organ regions in each standard face image, calculating the average value of the number of the pixels according to the number of the pixels contained in the five-sense organ regions in all the standard face images, and taking the average value of the number of the pixels as an initial pixel association range.
Specifically, when the flap valve system is used, a database connected with the flap valve system stores a plurality of facial images of users, semantic segmentation is carried out on each facial image by using a trained DNN network, and the facial image of each facial image is correspondingly obtained, namely, the standard facial image when the user verifies identity.
The number of the pixels or the area of the five sense organs contained in the five sense organs region in each standard face image is counted respectively, the average value of the number of the pixels or the area of the five sense organs region contained in all the standard face images is calculated and used as an initial pixel association range, and it is worth noting that the initial pixel association range refers to the number of surrounding pixels with higher correlation with each pixel in the standard face image, and then the number of the corresponding pixels can be counted according to the size of the area.
(2) And aiming at any pixel point in the new gray level image, acquiring a multiplication result between the credibility of the pixel point and the initial pixel point association range, and taking a result obtained by upwardly rounding the multiplication result as an actual pixel point association range of the pixel point.
Specifically, according to the reliability of each pixel point and the initial pixel point association range, calculating the actual pixel point association range of the corresponding pixel point, and then calculating the actual association pixel point range as follows:
wherein m is r Representing the actual pixel point association range of the (r) th pixel point in the new gray level image, h r The credibility of the r pixel point in the new gray level image is represented, H represents the association range of the initial pixel point,representing a rounding up operation.
The greater the reliability of the pixel point, the greater the pixel association range of the pixel point, which indicates that the pixel point may be a pixel point of the five sense organs region.
(3) Constructing a correlation range circle of the pixel points in the new gray level image by taking any pixel point in the new gray level image as a circle center according to the actual pixel point correlation range of the pixel points; constructing an association range circle of each pixel point in the new gray image, respectively counting the number of the association range circles containing each pixel point, and calculating the addition result of the number of the association range circles of all the pixel points; and obtaining the total number of the pixel points in the new gray level image, taking the product of the number of the associated range circles of the pixel points and the total number of the pixel points as a molecule, taking the addition result as a denominator, and taking the obtained ratio as the importance degree of the pixel points belonging to the five sense organs for any pixel point in the new gray level image.
Specifically, any pixel point in the new gray image is taken as a circle center, an association range circle of the pixel point is established, and the number of the pixel points corresponding to the association range of the actual pixel point, which exactly contains the pixel point, in the association range circle is caused by changing the radius of the association range circle. Similarly, an association range circle of each pixel point in the new gray image is constructed.
Acquiring the coverage times of each pixel point according to the associated range circle of each pixel point, namely the number of the associated range circles containing any pixel point, specifically, aiming at any pixel point in the new gray level image, wherein the coordinates of the pixel point are (x i ,y i ) If the coordinates are (x i ,y i ) If the pixel point of (2) is included in the associated range circle of a certain pixel point, the coordinates are (xi, y) i ) The number of times of coverage of the pixel points is increased by 1, and the associated range circle of all the pixel points is traversed to obtain a coordinate (x) i ,y i ) The number of times of coverage of the pixel points is denoted as s i And similarly, acquiring the coverage times s of all pixel points in the new gray image.
According to the coverage times of all the pixel points in the new gray image, calculating the importance degree of each pixel point belonging to the five-element pixel point, wherein the calculation expression of the importance degree is as follows:
wherein Q is i Representing the coordinates as (x i ,y i ) The pixel points of the (a) belong to the importance degree of the five sense organs pixel points, s i Representing the coordinates as (x i ,y i ) The number of times of coverage of the pixel points, that is, the number of times of coverage including the coordinate (x i ,y i ) T represents the total number of pixel points and s in the new gray image w The number of times of coverage of the w-th pixel point in the new gray image is represented.
The more the number of times of coverage of the pixel points, the more likely the pixel points are to be the pixel points of the five-element detail area, the more important the pixel points belong to the five-element pixel points.
So far, the importance degree of each pixel point belonging to the five-sense organ pixel point in the new gray level image is obtained by utilizing the methods of the steps (1) to (3).
Step S104, calculating the important index of each gray level in the new gray level image according to the importance degree of all the pixel points, obtaining the accumulated probability distribution of each gray level in the new gray level image, correcting the accumulated probability distribution of each gray level according to the important index of all the gray levels, obtaining the new accumulated probability distribution, and carrying out gray value mapping on the pixel points in the new gray level image according to the new accumulated probability distribution of all the gray levels, thus obtaining the enhanced image.
Specifically, after the importance degree that each pixel point belongs to the five-element pixel point in the new gray image is obtained, a gray statistical histogram is built according to the gray value of each pixel point in the new gray image. Then, for any gray level in the new gray level image, acquiring target pixel points under the gray level according to a gray level statistical histogram, calculating an average value of importance degrees of all the target pixel points, taking the average value as an important index of the gray level, and calculating an expression of the important index as follows:
wherein q v Important index representing the v-th gray level, u v Representing the number of target pixel points at the v-th gray level, Q i The importance degree that the ith pixel point belongs to the five sense organs pixel point under the v gray level is represented.
The more pixels the importance of the v-th gray level is, the larger the importance index of the v-th gray level is.
Similarly, the important index of each gray level is obtained using the calculation expression of the important index.
In the conventional histogram equalization, each gray level with the same weight is used for image enhancement, so that the details of the enhanced image are lost, therefore, important indexes of gray levels are obtained according to the importance degree of each pixel point in each gray level, and a gray level with a larger important index is given a larger weight, so that the pixel point corresponding to the gray level is more prominent and highlighted, and the gray level with a lower gray level weight is less affected. Therefore, the embodiment of the present invention acquires the cumulative probability distribution CDF of each gray level in the new gray level image by using conventional histogram equalization, where the method for acquiring the cumulative probability distribution CDF is the same as the related process in the conventional histogram equalization, and the conventional histogram equalization is not described in detail in the embodiment of the present invention.
The important index of each gray level is used as the weight of the corresponding accumulated probability distribution CDF, and the accumulated probability distribution of each gray level is corrected to obtain a new accumulated probability distribution, which is specifically: acquiring a first product between the important index of each gray level and the cumulative probability distribution, and calculating the summation result of the important indexes of all gray levels; for any gray level, calculating a first addition result of all gray levels before the gray level and including a first product between the gray levels, taking the first addition result as a numerator, taking the addition result as a denominator, and taking the obtained ratio as a new cumulative probability distribution of the gray level.
Wherein, the calculation expression of the new cumulative probability distribution is:
wherein ΔCDF i Representing the cumulative probability distribution of the i-th gray level after the weighting adjustment, i.e. the new cumulative probability distribution, q j The weight representing the jth gray level, i.e. the important indicator of the jth gray level, CDF j Representing the cumulative probability distribution, q, of the ith gray level i The weight representing the i-th gray level is an important indicator of the i-th gray level.
So far, a new accumulated probability distribution corresponding to each gray level in the new gray level image is obtained, each gray level in the new gray level image is mapped into a gray level range of 0-255 according to the new accumulated probability distribution of all gray levels, a new gray value is obtained after each pixel point under each gray level is mapped, and an enhanced image is obtained after all pixel points are mapped.
Step S105, image recognition is carried out on the enhanced images corresponding to all the face images, and corresponding image recognition results are obtained.
Specifically, the method from step S102 to step S104 is used to enhance the images of the N face images, so as to obtain enhanced images corresponding to each face image. And performing feature matching on the enhanced image corresponding to any face image and the stored standard face images of all users to obtain a corresponding matching result, namely image recognition.
When the access control system is used for carrying out the identity verification and identification of the user, the user can be further subjected to the identity verification according to the matching result of the enhanced images corresponding to the face images, and then the access control system is controlled according to the identity verification result, and the specific control method is as follows: the preservation of one facial image is preferably performed every a frames from the first frame of the facial image of the user, and in the embodiment of the invention, a takes an empirical value of 10, so that N facial images can be obtained, where N is at least 2. Acquiring enhanced images corresponding to each face image according to the face image of each face image, and if the verification result of the face images with the preset number is passed, controlling the door opening by the door control system, so that the number of the face images successfully matched by the matching result is counted, and if the number exceeds a preset number threshold, passing the authentication of the user; and when the number does not exceed the preset number threshold, the user fails to verify the identity, the user is prompted to repeatedly verify the identity, and if the number of times of the user failed to verify the identity exceeds the preset number of times, alarm processing is performed. Wherein the preset quantity threshold value isIf the preset times are 3, that is, three-quarter face images pass the authentication, the entrance guard system controls the door opening, otherwise, if the authentication fails for more than 3 times, alarm processing is carried out to inform corresponding staff to carry out manual authentication.
In summary, the embodiment of the invention acquires facial images of a plurality of users, segments the five-sense organ area in each facial image to obtain a corresponding facial image, then carries out preprocessing of graying and denoising on the facial image to obtain a noise-free gray image, because the five-sense organ area, the mole mark area and other areas of the face have more detail characteristics, the gradient amplitude of the corresponding pixel point is larger, and the relevance with surrounding pixel points is stronger, the reliability of the corresponding pixel point belonging to the five-sense organ edge pixel point is analyzed according to the gradient information of each pixel point in the gray image, the greater the reliability is, the importance degree of each pixel point possibly is calculated for the five-sense organ area or the mole mark area and other areas, and further the influence of the environment on the reliability of partial pixel points is eliminated, so that the analysis of the importance degree of the pixel point belonging to the five-sense organ pixel point is more strict, the importance degree of each gray level calculated according to the importance degree of all pixel points is more important, and the face image is more accurately identified according to the accumulated image, and the accuracy of the face is greatly improved, and the accuracy of the image is not accurately corrected according to the importance degree of the face distribution is greatly, and the accuracy of the image is improved, and the accuracy of the image is accurately is identified.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (8)

1. An image recognition method based on artificial intelligence, which is characterized by comprising the following steps:
collecting face images of a user, carrying out semantic segmentation on the face images to obtain corresponding face images in the face images, obtaining gray images corresponding to the face images, and carrying out denoising treatment on the gray images to obtain new gray images;
acquiring gradient amplitude and gradient direction of each pixel point in the new gray image, and calculating the credibility of each pixel point belonging to the five-element edge pixel point in the new gray image according to the gradient amplitude difference and the gradient direction difference between the pixel points;
acquiring an initial pixel point association range according to stored standard face images of all users, calculating an actual pixel point association range of each pixel point in the new gray level image according to the credibility of all pixel points and the initial pixel point association range, and calculating the importance degree of each pixel point belonging to five-element pixel points in the new gray level image based on the actual pixel point association range of all pixel points;
calculating an important index of each gray level in the new gray level image according to the importance degree of all the pixel points, acquiring the accumulated probability distribution of each gray level in the new gray level image, correcting the accumulated probability distribution of each gray level according to the important index of all the gray levels to acquire a new accumulated probability distribution, and carrying out gray value mapping on the pixel points in the new gray level image according to the new accumulated probability distribution of all the gray levels to acquire an enhanced image;
and carrying out image recognition on the enhanced image to obtain a corresponding image recognition result.
2. The image recognition method according to claim 1, wherein the method for calculating the reliability of each pixel point belonging to the five-element edge pixel point in the new gray scale image according to the gradient magnitude difference and the gradient direction difference between the pixel points comprises the following steps:
obtaining the maximum gradient amplitude according to the gradient amplitude of all pixel points in the new gray level image;
taking any pixel point in the new gray level image as a central pixel point of a preset sliding window, aiming at any non-central pixel point in the preset sliding window, calculating the ratio between the gradient amplitude of the non-central pixel point and the gradient amplitude of the central pixel point, and taking the non-central pixel point as a marked pixel point if the ratio is greater than or equal to a preset ratio threshold;
obtaining all the marked pixel points and the corresponding number of the marked pixel points in the preset sliding window, and respectively calculating the direction similarity between the gradient direction of each marked pixel point and the gradient direction of the central pixel point;
obtaining the total number of pixel points in the preset sliding window, and calculating the reliability of the central pixel point belonging to the five-sense organ edge pixel point according to the maximum gradient amplitude, the number of marked pixel points, the total number of pixel points, the gradient amplitude of the central pixel point and the direction similarity between the gradient direction of each marked pixel point and the gradient direction of the central pixel point.
3. The image recognition method according to claim 2, wherein the method for calculating the reliability of the center pixel belonging to the five sense organs edge pixels according to the maximum gradient magnitude, the number of the marked pixels, the total number of the pixels, the gradient magnitude of the center pixel, and the directional similarity between the gradient direction of each of the marked pixels and the gradient direction of the center pixel comprises:
calculating the number ratio between the number of the marked pixel points and the total number of the pixel points, and calculating the gradient ratio between the gradient amplitude of the central pixel point and the maximum gradient amplitude;
calculating a direction similarity mean value according to the direction similarity between the gradient direction of each marked pixel point and the gradient direction of the central pixel point;
taking the product of the number ratio, the gradient ratio and the direction similarity mean value as the credibility that the center pixel belongs to the five-sense organ edge pixel.
4. The image recognition method according to claim 1, wherein the method for acquiring the initial pixel association range according to the stored standard face images of all users comprises the following steps:
and respectively acquiring the number of the pixels contained in the five-sense organ regions in each standard face image, calculating the average value of the number of the pixels according to the number of the pixels contained in the five-sense organ regions in all the standard face images, and taking the average value of the number of the pixels as an initial pixel association range.
5. The image recognition method according to claim 1, wherein the method for calculating the actual pixel association range of each pixel in the new gray image according to the credibility of all pixels and the initial pixel association range comprises the following steps:
and aiming at any pixel point in the new gray level image, acquiring a multiplication result between the credibility of the pixel point and the initial pixel point association range, and taking a result obtained by upwardly rounding the multiplication result as an actual pixel point association range of the pixel point.
6. The image recognition method according to claim 1, wherein the method for calculating the importance degree of each pixel belonging to the five-element pixel in the new gray-scale image based on the actual pixel association ranges of all the pixels comprises:
constructing a correlation range circle of the pixel points in the new gray level image by taking any pixel point in the new gray level image as a circle center according to the actual pixel point correlation range of the pixel points;
constructing an association range circle of each pixel point in the new gray image, respectively counting the number of the association range circles containing each pixel point, and calculating the addition result of the number of the association range circles of all the pixel points;
and obtaining the total number of the pixel points in the new gray level image, taking the product of the number of the associated range circles of the pixel points and the total number of the pixel points as a molecule, taking the addition result as a denominator, and taking the obtained ratio as the importance degree of the pixel points belonging to the five sense organs for any pixel point in the new gray level image.
7. The image recognition method according to claim 1, wherein the method for calculating the importance index of each gray level in the new gray image according to the importance degrees of all the pixel points comprises:
and acquiring target pixel points under the gray level according to any gray level in the new gray level image, calculating the average value of the importance degrees of all the target pixel points, and taking the average value as an important index of the gray level.
8. The image recognition method according to claim 1, wherein said correcting the cumulative probability distribution of each gray level according to the importance index of all gray levels to obtain a new cumulative probability distribution comprises:
acquiring a first product between the important index of each gray level and the cumulative probability distribution, and calculating the summation result of the important indexes of all gray levels;
for any gray level, calculating a first addition result of all gray levels before the gray level and including a first product between the gray levels, taking the first addition result as a numerator, taking the addition result as a denominator, and taking the obtained ratio as a new cumulative probability distribution of the gray level.
CN202311101271.1A 2023-08-29 2023-08-29 Image recognition method based on artificial intelligence Active CN117095444B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311101271.1A CN117095444B (en) 2023-08-29 2023-08-29 Image recognition method based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311101271.1A CN117095444B (en) 2023-08-29 2023-08-29 Image recognition method based on artificial intelligence

Publications (2)

Publication Number Publication Date
CN117095444A CN117095444A (en) 2023-11-21
CN117095444B true CN117095444B (en) 2024-02-13

Family

ID=88773110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311101271.1A Active CN117095444B (en) 2023-08-29 2023-08-29 Image recognition method based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN117095444B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016150240A1 (en) * 2015-03-24 2016-09-29 北京天诚盛业科技有限公司 Identity authentication method and apparatus
CN110197345A (en) * 2019-06-17 2019-09-03 国网江苏省电力有限公司宿迁供电分公司 It is a kind of using route as the power distribution network synthesis evaluation method of unit
CN110532880A (en) * 2019-07-29 2019-12-03 深圳大学 Screening sample and expression recognition method, neural network, equipment and storage medium
CN110570387A (en) * 2019-09-16 2019-12-13 江南大学 image fusion method based on feature level Copula model similarity
CN114463814A (en) * 2022-01-26 2022-05-10 上海西虹桥导航技术有限公司 Rapid certificate photo glasses detection method based on image processing
CN114693651A (en) * 2022-03-31 2022-07-01 南通三信塑胶装备科技股份有限公司 Rubber ring flow mark detection method and device based on image processing
CN116309187A (en) * 2023-05-15 2023-06-23 济南科汛智能科技有限公司 Intelligent enhancement method for medical image of children pneumonia
CN116630813A (en) * 2023-07-24 2023-08-22 青岛奥维特智能科技有限公司 Highway road surface construction quality intelligent detection system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016150240A1 (en) * 2015-03-24 2016-09-29 北京天诚盛业科技有限公司 Identity authentication method and apparatus
CN110197345A (en) * 2019-06-17 2019-09-03 国网江苏省电力有限公司宿迁供电分公司 It is a kind of using route as the power distribution network synthesis evaluation method of unit
CN110532880A (en) * 2019-07-29 2019-12-03 深圳大学 Screening sample and expression recognition method, neural network, equipment and storage medium
CN110570387A (en) * 2019-09-16 2019-12-13 江南大学 image fusion method based on feature level Copula model similarity
CN114463814A (en) * 2022-01-26 2022-05-10 上海西虹桥导航技术有限公司 Rapid certificate photo glasses detection method based on image processing
CN114693651A (en) * 2022-03-31 2022-07-01 南通三信塑胶装备科技股份有限公司 Rubber ring flow mark detection method and device based on image processing
CN116309187A (en) * 2023-05-15 2023-06-23 济南科汛智能科技有限公司 Intelligent enhancement method for medical image of children pneumonia
CN116630813A (en) * 2023-07-24 2023-08-22 青岛奥维特智能科技有限公司 Highway road surface construction quality intelligent detection system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Robust Image Watermarking Based on Multiscale Gradient Direction Quantization";Ehsan Nezhadarya等;《IEEE》;20110804;第1200-1213页 *
"基于深度学习的目标识别轻量化模型研究";符惠桐;《中国优秀硕士学位论文全文数据库 信息科技辑》;20230115;第I138-1810页 *
"基于监督学习的Canny图像边缘检测改进算法研究";赵同刚等;《半导体光电》;20161031;第731-741页 *

Also Published As

Publication number Publication date
CN117095444A (en) 2023-11-21

Similar Documents

Publication Publication Date Title
US9633269B2 (en) Image-based liveness detection for ultrasonic fingerprints
Nogueira et al. Evaluating software-based fingerprint liveness detection using convolutional networks and local binary patterns
AU2007223574B2 (en) A standoff iris recognition system
Gottschlich Curved-region-based ridge frequency estimation and curved Gabor filters for fingerprint image enhancement
Ng et al. A review of iris recognition algorithms
CN107293011B (en) Access control system of intelligence house
CN109190544B (en) Human identity recognition method based on sequence depth image
JP2008538425A (en) Distance iris recognition system
Salve et al. Iris recognition using SVM and ANN
CN111553310B (en) Security inspection image acquisition method and system based on millimeter wave radar and security inspection equipment
Ahamed et al. Low complexity iris recognition using curvelet transform
Hilles et al. Latent fingerprint enhancement and segmentation technique based on hybrid edge adaptive dtv model
CN110348289A (en) A kind of finger vein identification method based on binary map
Abidin et al. Iris segmentation analysis using integro-differential and hough transform in biometric system
CN115424093A (en) Method and device for identifying cells in fundus image
Abdullah et al. Fast and accurate method for complete iris segmentation with active contour and morphology
Ng et al. An effective segmentation method for iris recognition system
CN117095444B (en) Image recognition method based on artificial intelligence
Latha et al. A robust person authentication system based on score level fusion of left and right irises and retinal features
Patel et al. Human identification by partial iris segmentation using pupil circle growing based on binary integrated edge intensity curve
Hamd et al. Fourier descriptors for iris recognition
Matveev Iris center location using Hough transform with two-dimensional parameter space
CN110826384A (en) System and method for enhancing iris recognition accuracy
Amjed et al. Noncircular iris segmentation based on weighted adaptive hough transform using smartphone database
Rajput et al. Iris biometric technique for person authentication based on fusion of radon and 2D multi-wavelet transform

Legal Events

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