+

CN112084902A - Face image acquisition method and device, electronic equipment and storage medium - Google Patents

Face image acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112084902A
CN112084902A CN202010871517.3A CN202010871517A CN112084902A CN 112084902 A CN112084902 A CN 112084902A CN 202010871517 A CN202010871517 A CN 202010871517A CN 112084902 A CN112084902 A CN 112084902A
Authority
CN
China
Prior art keywords
face
face image
current
image
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010871517.3A
Other languages
Chinese (zh)
Other versions
CN112084902B (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.)
Routon Electronic Co ltd
Wuhan Precision Business Machine Co ltd
Original Assignee
Routon Electronic Co ltd
Wuhan Precision Business Machine 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 Routon Electronic Co ltd, Wuhan Precision Business Machine Co ltd filed Critical Routon Electronic Co ltd
Priority to CN202010871517.3A priority Critical patent/CN112084902B/en
Publication of CN112084902A publication Critical patent/CN112084902A/en
Application granted granted Critical
Publication of CN112084902B publication Critical patent/CN112084902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Landscapes

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

Abstract

The embodiment of the invention provides a face image acquisition method, a face image acquisition device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a current face image of a video stream; detecting face image related parameters in a current face image; determining the current face type of the current face image based on the face image related parameters; determining a target face image based on the current face category; the face categories comprise a normal face, a side face, a low head face, a head-up face and a shielding face; the face image related parameters comprise face image confidence, face size, angle, brightness and definition; the embodiment of the invention overcomes the defect that the prior method only focuses on a certain type of snapshot result, can pertinently acquire the required face image according to different target focus points and different requirements of different application scenes on the face types, and can adapt to different snapshot scenes for snapshotting different types of face targets.

Description

Face image acquisition method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for obtaining a face image, an electronic device, and a storage medium.
Background
In practical application of the face snapshot technology, the face snapshot images required by different scenes are greatly different; for example, in attendance checking of a human face, a front and clear human face is required, but in some special fields, abnormal human faces such as intentionally shielding human faces need to be acquired in real time or acquired from a monitoring video.
The existing face snapshot method is generally single in adaptive scene, only specific fixed scenes can be selected, the face snapshot function is single, if only a front face can be snapshot, some abnormal faces are ignored, and if the abnormal faces such as a face and a low-head face are shielded intentionally, the face snapshot method is simple in structure, and the face snapshot function is simple.
Therefore, how to provide a method for acquiring a face image that can adapt to multiple scenes becomes a problem that needs to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides a face image acquisition method, a face image acquisition device, electronic equipment and a storage medium, which are used for solving the defect of single face snapshot function in the prior art and realizing the face image acquisition which can adapt to multiple scenes.
In a first aspect, an embodiment of the present invention provides a method for obtaining a face image, including:
acquiring a current face image of a video stream;
detecting face image related parameters in the current face image;
determining the current face type of the current face image based on the face image related parameters;
determining a target face image based on the current face category;
the human face categories comprise a normal human face, a side face human face, a head-lowering human face, a head-raising human face and a shielding human face;
the face image related parameters comprise face image confidence, face size, face angle, face brightness and face definition.
According to the face image obtaining method of an embodiment of the present invention, the determining a target face image based on the current face category includes:
determining a target face type corresponding to the target face image;
and after the current face type is determined to be the target face type, determining the current face image to be the target face image.
According to the face image acquisition method of one embodiment of the invention, each face type corresponds to a parameter preset range;
determining the current face type of the current face image based on the face image related parameters, specifically comprising:
determining the current face category as: and the human face category corresponds to the parameter preset range to which the human face image related parameters belong.
According to a face image obtaining method of an embodiment of the present invention, the obtaining of a current face image of a video stream includes:
determining an acquisition mode corresponding to the target face image; the acquisition mode comprises the steps of acquiring when a target face enters, acquiring when the target face leaves, normally acquiring the target face and continuously acquiring the target face;
and acquiring the current face image of the video stream in an acquisition mode corresponding to the target face image based on the coordinate information of the face in the video stream.
According to the face image obtaining method of one embodiment of the present invention, before obtaining a current face image of a video stream, the method further includes:
acquiring preset optimal image quality parameters corresponding to the scene where the current face image is located;
and adjusting the current face image based on the preset optimal image quality parameter.
According to the face image obtaining method of an embodiment of the present invention, obtaining the preset optimal image quality parameter corresponding to the scene where the current face image is located includes:
acquiring an initial face image, and determining a preset optimal image quality parameter corresponding to a scene where the acquired face image is located based on an image quality parameter of the initial face image;
and the initial face image and the current face image are in the same scene.
According to the face image acquisition method of an embodiment of the invention, the method further comprises the following steps:
determining the relevant parameters of the acquired video stream where the face image is located;
configuring a device based on the device-related parameters.
In a second aspect, an embodiment of the present invention provides a face image acquiring apparatus, including:
the acquisition module is used for acquiring a current face image of the video stream;
the detection module is used for detecting face image related parameters in the current face image;
the class determination module is used for determining the current face class of the current face image based on the face image related parameters;
the target image determining module is used for determining a target face image based on the current face category;
the human face categories comprise a normal human face, a side face human face, a head-lowering human face, a head-raising human face and a shielding human face;
the face image related parameters comprise face image confidence, face size, face angle, face brightness and face definition.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the face image obtaining method according to the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the face image acquisition method as provided in the first aspect.
According to the face image acquisition method, the face image acquisition device, the electronic equipment and the storage medium provided by the embodiment of the invention, the current face type of the current face image is determined by detecting the face image related parameters in the current face image, and the required target face image is determined by determining the current face type of the current face image, including a normal face, a side face, a low-head face, a head-up face and a shielding face.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a face image obtaining method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a face image acquisition apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a face image obtaining method according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step 100, acquiring a current face image of a video stream;
specifically, when the face image is obtained, the image source may be a real-time video stream, such as a real-time monitoring video or a video shot by a camera in real time; the image source can also be an existing video stream, such as a historical surveillance video or a video stored after being shot by a camera.
In this embodiment, to acquire a target face image required by a current application scene, a current face image of a video stream may be acquired based on a video timing sequence or based on an order of video image frames.
Step 110, detecting face image related parameters in the current face image;
specifically, after a current face image is obtained, face image related parameters in the current face image can be detected;
in this embodiment, the parameters related to the face image include a confidence level of the face image, a size, an angle, brightness and a definition of the face;
specifically, when detecting the parameters related to the face image, the confidence of the current face image can be obtained based on a face image confidence model, and the face image confidence model is obtained through machine learning training. In this embodiment, when training a face image confidence level model, a training sample, that is, a sample with a label, is first obtained, where the training sample specifically includes a normal face image with no face occlusion and an abnormal face image with face occlusion, then, according to an existing face detection model, face key point coordinate information, such as eyes, a nose, and a mouth, is obtained, and is matched with a pre-trained face key point model to obtain occlusion confidence levels of different key point positions, and finally, a face image confidence level model is obtained through training based on all samples and confidence levels of the samples at different key points, so that it is possible to judge whether a current face image is an occluded face.
It can be understood that the confidence of the face image is mainly used for representing whether the face has occlusion.
Specifically, when detecting the relevant parameters of the face image, the face can be detected according to the existing face detection model to obtain face coordinates and angles, the face size can be obtained through calculation of the face coordinates, the average change condition of the gray value of the face region can also be calculated, namely the brightness value, the change condition of the gray value among different spaced pixels of the face region is calculated, namely the sharpness value, and information such as the face size, the angles, the brightness, the sharpness and the like is obtained.
It can be understood that the information of the size, angle, brightness, definition, etc. of the human face is mainly used for representing that the human face is a front face, a side face, an upward view or a low head.
It can be understood that, if the type of the face to be acquired is intentionally shielding the face, the face image may be further screened based on not only the confidence of the face image but also parameters such as the size, angle, brightness, or definition of the face.
Step 120, determining the current face type of the current face image based on the face image related parameters;
specifically, after detecting face image related parameters in the current face image, the current face category may be determined based on the parameters;
in this embodiment, the face categories include a normal face, a side face, a low head face, a face with a head facing upward, and a blocking face; it can be understood that, in this embodiment, it may be determined that the current face image is a normal face, a side face, a low head face, a face facing upward or an occluded face according to the face image related parameters.
Step 130, determining a target face image based on the current face category;
specifically, after the current face class is obtained, whether the face class in the current face image is the face class required by the current application scene can be judged according to the current face class, and if yes, the current face class is the target face image; if not, continuing to judge the next face image/frame.
For example, if the current application scene is face attendance, a normal face image is required, so that whether the face type in the current face image is a normal face can be judged, and if so, the current face image is determined to be the target face image.
In the embodiment, according to different attention points when the human face is captured and different requirements for the human face types under different application scenes, the human face image types are judged based on the human face image related parameters, so that human face targets of different types can be captured adaptively, and the defect that only one capturing result is emphasized in the prior art is overcome. According to the face image acquisition method provided by the embodiment of the invention, the current face type of the current face image is determined by detecting the face image related parameters in the current face image, wherein the face type comprises a normal face, a side face, a low-head face, a head-up face and a shielding face, so that the required target face image is determined.
Optionally, on the basis of the foregoing embodiments, the determining a target face image based on the current face category includes:
determining a target face type corresponding to the target face image;
and after the current face type is determined to be the target face type, determining the current face image to be the target face image.
Specifically, in this embodiment, if it is required to determine whether the face type in the current face image is the face type required by the current application scene, a target face type corresponding to the target face image may be first obtained, and it can be understood that the target face type is the face type required by the current application scene.
Specifically, after the target face type is determined, whether the current face type is the target face type or not can be judged, if yes, the current face image is determined to be the target face image, and if not, the next/frame face image is continuously judged.
For example, if the current application scene is police investigation, the target face type is a low head face or an intentionally shielded face, and therefore, whether the current face type is a low head face or an intentionally shielded face can be determined, and if so, the current face image is determined to be the target face image.
Optionally, on the basis of the above embodiments, each face category corresponds to a parameter preset range;
determining the current face type of the current face image based on the face image related parameters, specifically comprising:
determining the current face category as: and the human face category corresponds to the parameter preset range to which the human face image related parameters belong.
Specifically, different face categories have different corresponding face image related parameters, and in this embodiment, a parameter preset range corresponding to each face category may be preset. For example, the value ranges of the confidence degrees of the face images of normal faces, the value ranges of the face sizes, the value ranges of the face angles, the value ranges of the face brightness and the value ranges of the face definition are preset.
Specifically, when determining the current face type, it may be determined whether the face image confidence, the face size, the angle, the brightness, and the sharpness of the current face image all belong to the value ranges corresponding to the parameters of a certain type, and if it is determined, the current face type is considered as the type. For example, only when it is determined that the face image confidence, the face size, the angle, the brightness and the definition of the current face image are all within the preset value range of the corresponding parameters of the normal face, the current face class can be considered as the normal face. And the other face classes are analogized in the same way.
In the embodiment, according to the application scene requirements, flexible face image related parameters are configured, different types of face images can be effectively distinguished, and the requirements of different application scenes, such as face attendance, personnel monitoring, abnormal face alarming and the like, are met.
Optionally, on the basis of the foregoing embodiments, the acquiring a current face image of a video stream includes:
determining an acquisition mode corresponding to the target face image; the acquisition mode comprises the steps of acquiring when a target face enters, acquiring when the target face leaves, normally acquiring the target face and continuously acquiring the target face;
and acquiring the current face image of the video stream in an acquisition mode corresponding to the target face image based on the coordinate information of the face in the video stream.
Specifically, in this embodiment, different image acquisition modes can be set according to different application scene requirements, for example, when a target face enters, when the target face leaves, the target face is acquired, the target face is normally acquired, or the target face is continuously acquired;
for example, when a target face enters, that is, when the face just appears in a video stream, a face image is obtained as a current face image, and whether the current face image is the target face image is judged, if yes, the face image is not obtained, and if not, the next frame/piece of face image of the image is obtained and judged until the target face image of the face is obtained.
For example, the target face continuous acquisition may be to acquire target face images of the face in 2 frames continuously, or to acquire target face images with a preset time interval or a preset number of frames, for example, to acquire face images with 5 frames in the middle interval as the target face images.
According to the embodiment, different snapshot strategies, namely image acquisition modes, can be configured according to different application scene requirements, so that the effectiveness of face image acquisition is improved.
Optionally, on the basis of the foregoing embodiments, before acquiring the current face image of the video stream, the method further includes:
acquiring preset optimal image quality parameters corresponding to the scene where the current face image is located;
and adjusting the current face image based on the preset optimal image quality parameter.
Specifically, in this embodiment, optimal image quality parameters corresponding to different shooting scenes may be preset according to characteristics of the shooting scenes, such as characteristics of scenes of indoor normal light, dim light, backlight, outdoor normal light, dim light, backlight, and the like, and before a current face image of a video stream is obtained, the preset optimal image quality parameters of the scene where the current face image is located may be obtained first.
It can be understood that, after the preset optimal image quality parameter is obtained, the current face image can be adjusted based on the preset optimal image quality parameter, so that the current face image reaches an optimal state.
In the embodiment, the image quality parameters such as brightness, contrast, sharpness and the like can be adaptively adjusted according to different scene environments, so that the shooting environment is adapted to the maximum extent, the basic requirements of face image acquisition are met, and the defects that the traditional method can only adapt to a single scene and the image quality is unstable are overcome.
Optionally, on the basis of the foregoing embodiments, the obtaining of the preset optimal image quality parameter corresponding to the scene where the current face image is located includes:
acquiring an initial face image, and determining a preset optimal image quality parameter corresponding to a scene where the acquired face image is located based on an image quality parameter of the initial face image;
and the initial face image and the current face image are in the same scene.
Specifically, in this embodiment, the initial face image may be used as a reference standard, that is, the preset optimal image quality parameter of the initial face image is obtained, and since the initial face image and the current face image are in the same scene, the preset optimal image quality parameter of the initial face image may be used as the preset optimal image quality parameter of the current face image.
Specifically, when the optimal image quality parameter is preset based on the initial face image, the initial face image can be manually preliminarily judged in the scene, the matched image quality parameter can be manually configured, and then the optimal image quality parameter closest to the manually set matched image quality parameter can be further obtained, namely the optimal image quality parameter corresponding to the scene in which the initial face image is located; and presetting the optimal image quality parameters for the current face image.
In the embodiment, the initial face image is used as a reference standard to test the snapshot quality of the initial face image, the established face quality models corresponding to different shooting scenes are used for comparison, and then the image quality parameters such as brightness, contrast, sharpness and the like are automatically adjusted to adapt to the scenes to the maximum extent, so that the basic requirements of face snapshot are met.
It can be understood that the face quality model mentioned in this embodiment stores preset optimal image quality parameters corresponding to different scenes.
In this embodiment, the initial face image may be a preset-length image during real-time monitoring, or may be a preset-length image of a segment of historical video stream, and as long as the requirement that the initial face image and the face image of the current face image are in the same scene is met, both the initial face image and the face image may be used as the initial face image. The embodiment dynamically adjusts the quality parameters of the snapshot picture by taking the snapshot face tested on site as a support so as to adapt to the characteristics of the scene, and can quickly match various scenes for image acquisition without excessive intervention.
Optionally, on the basis of the foregoing embodiments, the method further includes:
determining the relevant parameters of the acquired video stream where the face image is located;
configuring a device based on the device-related parameters.
Specifically, in order to solve the problem that the universality of the image acquisition method is not sufficient due to the fact that different video sources cannot be compatible in all directions in the prior art, the embodiment configures corresponding device-related parameters according to the characteristics of different video streams, including a network camera, a USB (Universal Serial Bus) camera, and a local video, and only needs to determine the device-related parameters of the video stream where the face image is located during access, the device can be automatically configured based on the device-related parameters, so that the face image acquisition is realized.
For example, the IP (Internet Protocol Address), the user name, the password, and the port of the network camera are stored in advance, corresponding device-related parameters are configured, and when an image from the network camera is obtained, the corresponding device-related parameters are input, so that the video stream can be accessed based on the IP, the user name, the password, and the port of the network camera.
For example, a USB camera drive index is pre-stored, corresponding device-related parameters are configured, and when an image from a USB camera is obtained, the corresponding device-related parameters are input, so that access to a video stream based on the USB camera drive index can be achieved.
For example, the local video path is pre-stored, the corresponding device-related parameters are configured, and when an image from the local video is acquired, the corresponding device-related parameters are input, so that the video stream can be accessed based on the local video path.
It can be understood that the source of the video stream where the face image is located is not limited in this embodiment, but the source device or path or protocol of the video stream or other relevant configuration information may be pre-stored in this embodiment.
The embodiment integrates different access modes of Video streams, including an RTSP (Real Time Streaming Protocol) Protocol, an onvif (open Network Video Interface form) Protocol, a GB/T28181 Protocol, an SDK (Software Development Kit) of a main stream camera manufacturer, and a local Video, and enhances the Video stream access universality of the image acquisition method, thereby avoiding the problem that too many Video stream access problems need to be considered when the snapshot method is called.
According to the embodiment, the network cameras of different manufacturers can be quickly accessed and other video streams can be quickly accessed through simple configuration of relevant parameters of the equipment, the problem of compatibility of access of different cameras is solved, and different application scenes are met.
The embodiment of the invention describes a self-adaptive multi-scene multifunctional face image acquisition method, which can be quickly compatible with the access of different video streams, can adaptively adjust the picture quality according to different scene environments on the basis of the traditional face snapshot, and can select the face image type and set different image acquisition modes according to different face attention points of different application scenes, so that the face image can be effectively self-adaptive to multiple scenes, and the snapshot function is enriched.
According to the face image acquisition method provided by the embodiment of the invention, the current face type of the current face image is determined by detecting the face image related parameters in the current face image, wherein the face type comprises a normal face, a side face, a low-head face, a head-up face and a shielding face, so that the required target face image is determined.
The following describes the face image acquisition device provided by the embodiment of the present invention, and the face image acquisition device described below and the face image acquisition method described above may be referred to in correspondence with each other.
Fig. 2 is a schematic structural diagram of a face image acquiring apparatus according to an embodiment of the present invention, and as shown in fig. 2, the apparatus includes: an acquisition module 210, a detection module 220, a category determination module 230, and a target image determination module 240. Wherein:
the obtaining module 210 is configured to obtain a current face image of the video stream;
the detection module 220 is configured to detect a face image related parameter in the current face image;
the category determining module 230 is configured to determine a current face category of the current face image based on the face image related parameter;
the target image determining module 240 is configured to determine a target face image based on the current face category;
the human face categories comprise a normal human face, a side face human face, a head-lowering human face, a head-raising human face and a shielding human face;
the face image related parameters comprise face image confidence, face size, face angle, face brightness and face definition.
Specifically, the face image obtaining device obtains a current face image of the video stream through the obtaining module 210; then, detecting face image related parameters, such as face image confidence, face size, angle, brightness, definition, and the like, in the current face image by using a detection module 220; then, the category determination module 230 determines that the current face category of the current face image is a normal face, a side face, a low head face, a face facing upward or an occluded face based on the face image related parameters; finally, the target face image is determined by the target image determination module 240 based on the current face class.
The face image acquisition device provided by the embodiment of the invention determines the current face type of the current face image by detecting the face image related parameters in the current face image, wherein the face type comprises a normal face, a side face, a low-head face, a head-up face and a shielding face, so as to determine the required target face image.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 3, the electronic device may include: a processor (processor)310, a communication Interface (communication Interface)320, a memory (memory)330 and a communication bus 340, wherein the processor 310, the communication Interface 320 and the memory 330 communicate with each other via the communication bus 340. The processor 310 may invoke logic instructions in the memory 330 to perform a method of facial image acquisition, the method comprising:
acquiring a current face image of a video stream;
detecting face image related parameters in the current face image;
determining the current face type of the current face image based on the face image related parameters;
determining a target face image based on the current face category;
the human face categories comprise a normal human face, a side face human face, a head-lowering human face, a head-raising human face and a shielding human face;
the face image related parameters comprise face image confidence, face size, face angle, face brightness and face definition.
In addition, the logic instructions in the memory 330 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, an embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the face image acquisition method provided by the above-mentioned method embodiments, where the method includes:
acquiring a current face image of a video stream;
detecting face image related parameters in the current face image;
determining the current face type of the current face image based on the face image related parameters;
determining a target face image based on the current face category;
the human face categories comprise a normal human face, a side face human face, a head-lowering human face, a head-raising human face and a shielding human face;
the face image related parameters comprise face image confidence, face size, face angle, face brightness and face definition.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to execute the face image acquisition method provided in the foregoing embodiments, and the method includes:
acquiring a current face image of a video stream;
detecting face image related parameters in the current face image;
determining the current face type of the current face image based on the face image related parameters;
determining a target face image based on the current face category;
the human face categories comprise a normal human face, a side face human face, a head-lowering human face, a head-raising human face and a shielding human face;
the face image related parameters comprise face image confidence, face size, face angle, face brightness and face definition.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A face image acquisition method is characterized by comprising the following steps:
acquiring a current face image of a video stream;
detecting face image related parameters in the current face image;
determining the current face type of the current face image based on the face image related parameters;
determining a target face image based on the current face category;
the human face categories comprise a normal human face, a side face human face, a head-lowering human face, a head-raising human face and a shielding human face;
the face image related parameters comprise face image confidence, face size, face angle, face brightness and face definition.
2. The method for acquiring a face image according to claim 1, wherein the determining a target face image based on the current face class comprises:
determining a target face type corresponding to the target face image;
and after the current face type is determined to be the target face type, determining the current face image to be the target face image.
3. The method for acquiring the face image according to claim 2, wherein each face category corresponds to a preset range of parameters;
determining the current face type of the current face image based on the face image related parameters, specifically comprising:
determining the current face category as: and the human face category corresponds to the parameter preset range to which the human face image related parameters belong.
4. The method for acquiring a face image according to claim 1, wherein the acquiring a current face image of a video stream comprises:
determining an acquisition mode corresponding to the target face image; the acquisition mode comprises the steps of acquiring when a target face enters, acquiring when the target face leaves, normally acquiring the target face and continuously acquiring the target face;
and acquiring the current face image of the video stream in an acquisition mode corresponding to the target face image based on the coordinate information of the face in the video stream.
5. The method of claim 1, wherein before the current face image of the video stream is acquired, the method further comprises:
acquiring preset optimal image quality parameters corresponding to the scene where the current face image is located;
and adjusting the current face image based on the preset optimal image quality parameter.
6. The method for acquiring the face image according to claim 5, wherein the acquiring of the preset optimal image quality parameter corresponding to the scene where the current face image is located comprises:
acquiring an initial face image, and determining a preset optimal image quality parameter corresponding to a scene where the acquired face image is located based on an image quality parameter of the initial face image;
and the initial face image and the current face image are in the same scene.
7. The method for acquiring a human face image according to claim 1, further comprising:
determining the relevant parameters of the acquired video stream where the face image is located;
configuring a device based on the device-related parameters.
8. A face image acquisition apparatus, comprising:
the acquisition module is used for acquiring a current face image of the video stream;
the detection module is used for detecting face image related parameters in the current face image;
the class determination module is used for determining the current face class of the current face image based on the face image related parameters;
the target image determining module is used for determining a target face image based on the current face category;
the human face categories comprise a normal human face, a side face human face, a head-lowering human face, a head-raising human face and a shielding human face;
the face image related parameters comprise face image confidence, face size, face angle, face brightness and face definition.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the face image acquisition method according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps of the face image acquisition method according to any one of claims 1 to 7.
CN202010871517.3A 2020-08-26 2020-08-26 Face image acquisition method and device, electronic equipment and storage medium Active CN112084902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010871517.3A CN112084902B (en) 2020-08-26 2020-08-26 Face image acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010871517.3A CN112084902B (en) 2020-08-26 2020-08-26 Face image acquisition method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112084902A true CN112084902A (en) 2020-12-15
CN112084902B CN112084902B (en) 2024-05-14

Family

ID=73729630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010871517.3A Active CN112084902B (en) 2020-08-26 2020-08-26 Face image acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112084902B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108197250A (en) * 2017-12-29 2018-06-22 深圳云天励飞技术有限公司 Picture retrieval method, electronic equipment and storage medium
CN108205661A (en) * 2017-12-27 2018-06-26 浩云科技股份有限公司 A kind of ATM abnormal human face detection based on deep learning
CN109711357A (en) * 2018-12-28 2019-05-03 北京旷视科技有限公司 A kind of face identification method and device
CN110162462A (en) * 2019-04-16 2019-08-23 深圳壹账通智能科技有限公司 Test method, system and the computer equipment of face identification system based on scene
WO2020015477A1 (en) * 2018-07-16 2020-01-23 阿里巴巴集团控股有限公司 Face recognition method and terminal device
CN111163259A (en) * 2018-11-07 2020-05-15 杭州海康威视数字技术股份有限公司 Image capturing method, monitoring camera and monitoring system
CN111339811A (en) * 2019-08-27 2020-06-26 杭州海康威视系统技术有限公司 Image processing method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108205661A (en) * 2017-12-27 2018-06-26 浩云科技股份有限公司 A kind of ATM abnormal human face detection based on deep learning
CN108197250A (en) * 2017-12-29 2018-06-22 深圳云天励飞技术有限公司 Picture retrieval method, electronic equipment and storage medium
WO2020015477A1 (en) * 2018-07-16 2020-01-23 阿里巴巴集团控股有限公司 Face recognition method and terminal device
CN111163259A (en) * 2018-11-07 2020-05-15 杭州海康威视数字技术股份有限公司 Image capturing method, monitoring camera and monitoring system
CN109711357A (en) * 2018-12-28 2019-05-03 北京旷视科技有限公司 A kind of face identification method and device
CN110162462A (en) * 2019-04-16 2019-08-23 深圳壹账通智能科技有限公司 Test method, system and the computer equipment of face identification system based on scene
CN111339811A (en) * 2019-08-27 2020-06-26 杭州海康威视系统技术有限公司 Image processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112084902B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
Nemoto et al. Visual attention in LDR and HDR images
US7652695B2 (en) System and a method for improving the captured images of digital still cameras
CN112019739A (en) Shooting control method and device, electronic equipment and storage medium
CN106165391B (en) Enhanced Image Capture
CN108337447A (en) High dynamic range image exposure compensation value acquisition method, device, equipment and medium
CN113192468B (en) Display adjustment method, device, equipment and storage medium
US20140281974A1 (en) System and method of audio information display on video playback timeline
CN107566643B (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN111222419A (en) Object identification method, robot and computer readable storage medium
CN107968919A (en) Method and apparatus for inverse tone mapping
US11886107B2 (en) Projection method and projection device
CN111836002B (en) Video polling method, device and server
TWI552602B (en) Blur detection method of images, monitoring device, and monitoring system
CN119964252A (en) A method for detecting hidden camera shots in surveillance screen areas based on real-time visual recognition
CN105049714B (en) A method and device for previewing a character image
CN105007415A (en) Method and device for previewing image
CN112084902B (en) Face image acquisition method and device, electronic equipment and storage medium
CN111767829B (en) Living body detection method, device, system and storage medium
CN113572968A (en) Image fusion method and device, camera equipment and storage medium
CN114979594B (en) Intelligent ground color adjusting system of monolithic liquid crystal projector
CN105007481A (en) Method and device for generating test card
US11589021B1 (en) Color correction for video communications using display content color information
CN104994308B (en) A kind of fish eye images image pickup method and device
US20110249124A1 (en) Monitoring system and method
US12198394B2 (en) Object recognition method and apparatus, electronic device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载