[go: up one dir, main page]

CN114727017B - ID photo shooting method, device and computer-readable storage medium - Google Patents

ID photo shooting method, device and computer-readable storage medium Download PDF

Info

Publication number
CN114727017B
CN114727017B CN202210326516.XA CN202210326516A CN114727017B CN 114727017 B CN114727017 B CN 114727017B CN 202210326516 A CN202210326516 A CN 202210326516A CN 114727017 B CN114727017 B CN 114727017B
Authority
CN
China
Prior art keywords
face
image
depth
keypoint
posture
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
CN202210326516.XA
Other languages
Chinese (zh)
Other versions
CN114727017A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN202210326516.XA priority Critical patent/CN114727017B/en
Publication of CN114727017A publication Critical patent/CN114727017A/en
Application granted granted Critical
Publication of CN114727017B publication Critical patent/CN114727017B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)
  • Studio Devices (AREA)

Abstract

本发明公开了一种证件照拍摄方法、设备及计算机可读存储介质,其中,该方法包括:获取包含人脸的预览图像,其中,所述预览图像包括深度图像以及所述深度图像对应的彩色图像;根据所述彩色图像进行人脸关键点检测,以及,根据所述深度图像获取所述人脸关键点的深度信息;获取与当前人脸姿态最接近的预置人脸姿态,并基于多视角计算所述当前人脸姿态的调整方式。实现了一种更为人性化的证件照拍摄方案,通过结合深度图像对人脸姿态进行识别和调整,提升了证件照的拍摄效果,增强了用户对于证件照拍摄功能的使用体验。

The present invention discloses a method, device and computer-readable storage medium for taking ID photos, wherein the method comprises: obtaining a preview image containing a face, wherein the preview image comprises a depth image and a color image corresponding to the depth image; performing facial key point detection according to the color image, and obtaining depth information of the facial key points according to the depth image; obtaining a preset facial posture closest to the current facial posture, and calculating the adjustment method of the current facial posture based on multiple perspectives. A more humane ID photo shooting solution is realized, which improves the ID photo shooting effect by identifying and adjusting the facial posture in combination with the depth image, and enhances the user experience of the ID photo shooting function.

Description

Certificate photograph shooting method, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of mobile communications, and in particular, to a method and apparatus for capturing credentials and a computer readable storage medium.
Background
In the prior art, along with the continuous development of intelligent terminal equipment, shooting application functions based on equipment ends are more and more abundant. Particularly, on the basis of the existing camera scheme, the face shooting functions such as certificate shooting and the like are derived. In the conventional credential photographing method, only the conference prompt box is generally used to prompt the photographer to place the face at a specified position on the screen, for example, a middle position, left-right adjustment, etc. In order to obtain a good shooting effect, when a user places a face at a specified position of a picture, the distance between the face and the terminal device, the pose of the face and the like often need to be further adjusted. However, traditional credential photo shooting cannot accurately achieve prompt adjustment based on the human face gesture, so that the final shooting effect of the credential photo is often unsatisfactory, and the shooting experience of a user is still to be improved.
Disclosure of Invention
In order to solve the technical defects in the prior art, the invention provides a certificate photograph shooting method, which comprises the following steps:
And acquiring a preview image containing a human face, wherein the preview image comprises a depth image and a color image corresponding to the depth image.
And detecting the key points of the human face according to the color image, and acquiring the depth information of the key points of the human face according to the depth image.
And acquiring a preset face gesture closest to the current face gesture, and calculating an adjustment mode of the current face gesture based on multiple views.
And generating prompt information of the adjustment mode to assist the user in face gesture adjustment.
Optionally, before the obtaining a preview image including a face, the preview image includes a depth image and a color image corresponding to the depth image includes:
presetting N face gesture lists for certificate photograph Wherein, the method comprises the steps of, wherein,The face pose includes a frontal face pose and a lateral face pose, wherein:
the human face gesture is a 3D human face key point list which comprises a set number M and is ordered according to a set rule; wherein M is a predetermined parameter:
Where x i,yi is the abscissa and ordinate of the keypoint keypoint i in the image, and z i is the depth information of the keypoint keypoint i in the image.
Optionally, the acquiring a preview image including a face, where the preview image includes a depth image and a color image corresponding to the depth image includes:
acquiring preview color images And a depth image pre_imag_d based on the ToF depth camera.
Wherein the depth image pre_imag_d is the preview color imageRegistered depth images.
Optionally, the detecting the face key point according to the color image, and acquiring depth information of the face key point according to the depth image includes:
and detecting the face key points based on the color image to obtain a previewed face key point list:
Wherein X i,yi is the abscissa and ordinate of the key point keypoint i in the image.
Optionally, the detecting the face key point according to the color image, and acquiring depth information of the face key point according to the depth image, further includes:
based on the depth image of the ToF, obtaining depth information corresponding to the face key points in the current face key point list includes:
Acquisition of And resolution of the depth image pre_imag_d:
list of key points for previewing the face Each of the face key points keypoint i, calculating the mapping coordinates of the face key points pre_imag_d in the depth image:
Depth information at a position point mappoint i in the depth image pre_imag_d is acquired as depth information d i of the face key point keypoint i:
optionally, the obtaining the preset face pose closest to the current face pose, and calculating the adjustment mode of the current face pose based on multiple views includes:
In the preset face pose list rec_ Posture, obtaining a preset face pose rec_ posture i closest to the current face pose, which includes:
And acquiring the preset face pose with the minimum average Euclidean distance as a face pose mindiss _rec_ posture closest to the preview face pose.
Optionally, the acquiring the preset face pose closest to the current face pose, and calculating the adjustment mode of the current face pose based on multiple views, further includes:
based on multiple views, for the previewed face key point list pre_ posture, the face pose mindiss _rec_ posture of the recommendation closest to the previewed face key point list, a face adjustment mode is calculated, including:
and performing constraint check on each view VS i in the preset multi-view mul_vs according to the preset priority order, checking whether the next view meets the constraint condition if the current view meets the constraint condition, and prompting a user to adjust the gesture according to the scaling scale i and the rotation angle theta i if the current view does not meet the constraint condition.
Optionally, the performing constraint checking on each view VS i in the preset multi-view mul_vs according to the preset priority order includes:
the current highest priority view vs i and its corresponding scale i and rotation angle θ i are obtained.
Judging whether constraint conditions are met or not according to preset thresholds S_TH and theta_TH, wherein the constraint conditions are as follows:
The invention also proposes a credential photographing device comprising a memory, a processor and a computer program stored on said memory and executable on said processor, said computer program implementing the steps of the credential photographing method as defined in any one of the preceding claims when executed by said processor.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a certificate photograph program, and the certificate photograph program realizes the steps of the certificate photograph method according to any one of the above when being executed by a processor.
The method, the equipment and the computer readable storage medium for shooting the credentials of the invention are implemented by acquiring a preview image containing a human face, wherein the preview image comprises a depth image and a color image corresponding to the depth image; detecting the key points of the human face according to the color image, and acquiring the depth information of the key points of the human face according to the depth image; and acquiring a preset face gesture closest to the current face gesture, and calculating an adjustment mode of the current face gesture based on multiple views. The scheme of more humanized certificate photograph shooting is realized, the facial gestures are identified and adjusted by combining the depth images, the photograph effect of the certificate photograph is improved, and the use experience of a user on the certificate photograph shooting function is enhanced.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of a mobile terminal according to the present invention;
fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention;
FIG. 3 is a flowchart of a first embodiment of the credential photographing method of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a Portable media player (Portable MEDIA PLAYER, PMP), a navigation device, a wearable device, a smart bracelet, a pedometer, and the like, as well as fixed terminals such as a digital TV, a desktop computer, and the like.
The following description will be given taking a mobile terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention, the mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
The radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (GENERAL PACKET Radio Service), CDMA2000 (Code Division Multiple Access, code Division multiple Access 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g. a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. The accelerometer sensor can detect the acceleration in all directions (generally three axes), can detect the gravity and the direction when the accelerometer sensor is static, can be used for identifying the gesture of a mobile phone (such as transverse and vertical screen switching, related games, magnetometer gesture calibration), vibration identification related functions (such as pedometer and knocking), and the like, and can be configured as other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors and the like, which are not repeated herein.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility MANAGEMENT ENTITY ) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (SERVING GATE WAY ) 2034, PGW (PDN GATE WAY, packet data network gateway) 2035, PCRF (Policy AND CHARGING Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and the communication network system, various embodiments of the method of the present invention are provided.
Example 1
FIG. 3 is a flowchart of a first embodiment of the credential photographing method of the present invention. A method of capturing a credential photograph, the method comprising:
s1, acquiring a preview image containing a human face, wherein the preview image comprises a depth image and a color image corresponding to the depth image.
S2, detecting the key points of the human face according to the color image, and acquiring depth information of the key points of the human face according to the depth image.
S3, acquiring a preset face gesture closest to the current face gesture, and calculating an adjustment mode of the current face gesture based on multiple views.
S4, generating prompt information of the adjustment mode to assist the user in face gesture adjustment.
In this embodiment, by presetting a plurality of face poses and estimating the face poses based on the depth image of the ToF depth camera, the photographer is reminded to adjust the face poses when photographing. For example, the user receives a chin or faces to the left, so that the user obtains a guidance similar to a professional photographer and obtains a better photographing effect.
In this embodiment, specifically, first, a preview image including a face is obtained, where the preview image includes a depth image and a color image corresponding to the depth image; then, detecting the key points of the human face according to the color image, and acquiring the depth information of the key points of the human face according to the depth image; finally, the preset face gesture closest to the current face gesture is obtained, the adjustment mode of the current face gesture is calculated based on multiple visual angles, and prompt information of the adjustment mode is generated to assist a user in face gesture adjustment.
The method has the advantages that the preview image containing the face is obtained, wherein the preview image comprises a depth image and a color image corresponding to the depth image; detecting the key points of the human face according to the color image, and acquiring the depth information of the key points of the human face according to the depth image; and acquiring a preset face gesture closest to the current face gesture, and calculating an adjustment mode of the current face gesture based on multiple views. The scheme of more humanized certificate photograph shooting is realized, the facial gestures are identified and adjusted by combining the depth images, the photograph effect of the certificate photograph is improved, and the use experience of a user on the certificate photograph shooting function is enhanced.
Example two
Based on the above embodiment, in the present embodiment, first, N face pose lists rec_ Posture, n≡1, which can be used for credential photo shooting, are preset, where the face poses include, but are not limited to, a front face, a side face, and the like, and the face pose list is expressed as:
in this embodiment, the face pose is a 3D face key point list including a predetermined number M and ordered according to a predetermined rule. Where M is a predetermined parameter, for example, m=128. The face gesture is expressed as:
Where X i,yi is the abscissa and ordinate of the keypoint keypoint i in the image, and z i is the depth information of the keypoint keypoint i in the image.
In the present embodiment, a preview color image is acquiredAnd a ToF-based depth image pre_imag_d; the depth image pre-imag-d must be a pass-through and color imageRegistered depth images; alternatively, the depth image pre_imag_d may be a super-resolution calculated depth image or the like.
In this embodiment, face key point detection is performed based on a color image, and a previewed face key point list is obtained, expressed as:
Wherein X i,yi is the abscissa and ordinate of the key point keypoint i in the image.
In this embodiment, depth information corresponding to a face key point in a current face key point list is obtained based on a ToF depth image, and specifically includes the following three steps:
First, obtain And resolution of the depth image pre_imag_d:
Second, for a list of face key points previewed Each face key point keypoint i, in the depth image calculates its mapping coordinates of pre_imag_d:
Third, depth information at the position point mappoint i in the depth image pre_imag_d is acquired as depth information d i of the face key point keypoint i.
In this embodiment, the face pose list is presetIn the method, the obtaining of the preset face pose rec_ posture i, closest to the current face pose specifically comprises the following six steps:
first, when n= =1 (only 1 recommended face pose is preset), the current preset face pose is directly taken as the preset face pose closest to the preview face pose;
second, when= =2, for the current preview face key point list Calculating a face gesture list of the face gesture list and a preset face gesture listHomography matrix H i of face key point list rec_ posture i of each preset face pose:
Thirdly, selecting M 2 established image calibration key points (such as an image origin, an image center point, an image lower left point, an image lower right point, an image upper right point and the like), wherein M 2 is more than or equal to 2.
Fourth, for the followingEach of the index points keypoint i, in the list of key points according to the preview faceWith a list of preset face posesThe homography matrix H i, of the face key point list rec_ posture i of each preset face gesture obtains the transformed coordinate position:
Wherein:
Fifth, for each of ObtainingAnd (3) withAverage euclidean distance of (c):
Wherein:
sixth, a preset face pose with the smallest average euclidean distance is obtained as a face pose mindiss _rec_ posture closest to the preview face pose.
In this embodiment, for the current preview face poseAnd calculating a face adjustment mode based on multiple views with the closest recommended face pose mindiss _rec_ posture, wherein the face adjustment mode specifically comprises the following four steps:
Firstly, acquiring a preset multi-view mul_vs, wherein the multi-view comprises a plurality of characteristic point pairs, such as (left eye outer corner, right eye outer corner), (forehead midpoint, chin midpoint) and the like; the feature point pairs under different view angles can describe the current face gesture features, and each view angle in the multiple view angles is arranged according to a set priority:
Second, for multiple viewing angles Each view vs i in the list is obtained to preview the human face postureKey points corresponding to the above and corresponding to the recommended mindiss rec posture face pose:
Wherein, Three-bit vector composed of key point pairs) The expression is as follows:
In the same way, the processing method comprises the steps of, Three-bit vector composed of key point pairs) The expression is as follows:
third, calculate the scale
Fourth, the rotation angle θ i is calculated:
In the present embodiment, a predetermined scaling threshold s_th and a rotation angle threshold θ_th are obtained.
In the present embodiment, for multiple views according to a given priority orderEach view angle of (a)The constraint checking method specifically comprises the following two steps:
first, the current highest priority view angle is obtained And its corresponding scaling scaleAnd a rotation angle θ i.
Secondly, judging whether constraint conditions are met or not according to the set threshold values S_TH and theta_TH; the constraint conditions are as follows:
in this embodiment, if the current view angle satisfies the constraint condition, it is checked whether the next view angle satisfies the constraint condition; and if the current visual angle does not meet the constraint condition, prompting a user to adjust the gesture according to the zoom scale and the rotation angle.
The method has the advantages that the preview image containing the face is obtained, wherein the preview image comprises a depth image and a color image corresponding to the depth image; detecting the key points of the human face according to the color image, and acquiring the depth information of the key points of the human face according to the depth image; and acquiring a preset face gesture closest to the current face gesture, and calculating an adjustment mode of the current face gesture based on multiple views. The scheme of more humanized certificate photograph shooting is realized, the facial gestures are identified and adjusted by combining the depth images, the photograph effect of the certificate photograph is improved, and the use experience of a user on the certificate photograph shooting function is enhanced.
Example III
Based on the above embodiments, the present invention also proposes a credential photographing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the credential photographing method as defined in any one of the above.
It should be noted that the above device embodiments and method embodiments belong to the same concept, the specific implementation process of the device embodiments is detailed in the method embodiments, and technical features in the method embodiments are correspondingly applicable to the device embodiments, which are not repeated herein.
Example IV
Based on the above embodiments, the present invention also proposes a computer readable storage medium, on which a document shooting program is stored, which when executed by a processor implements the steps of the document shooting method as described in any one of the above.
It should be noted that the medium embodiment and the method embodiment belong to the same concept, the specific implementation process of the medium embodiment and the method embodiment are detailed, and technical features in the method embodiment are correspondingly applicable in the medium embodiment, which is not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (6)

1. A method of capturing a credential photograph, the method comprising:
Acquiring a preview image containing a human face, wherein the preview image comprises a depth image and a color image corresponding to the depth image;
Detecting the key points of the human face according to the color image, and acquiring the depth information of the key points of the human face according to the depth image;
Acquiring a preset face gesture closest to a current face gesture, and calculating an adjustment mode of the current face gesture based on multiple views;
generating prompt information of the adjustment mode to assist a user in face gesture adjustment;
the obtaining a preview image including a face, wherein before the preview image includes a depth image and a color image corresponding to the depth image, the obtaining includes:
presetting N face pose lists REC_ Posture which can be used for credential photo shooting, wherein N is more than or equal to 1, and the face poses comprise a front face pose and a side face pose, wherein:
REC_Posture={rec_posture1,……,rec_postureN};
The human face gesture is a 3D human face key point list which comprises a set number M and is ordered according to a set rule; wherein M is a predetermined parameter:
rec_posturei={keypoint1,keypoint2,……,keypointM};
keypointi={xi,yi,di};
Wherein x i,yi is the abscissa and ordinate of the key point keypoint i in the image, and z i is the depth information of the key point keypoint i in the image;
The obtaining the preset face gesture closest to the current face gesture, and calculating the adjustment mode of the current face gesture based on multiple views comprises the following steps:
In the preset face pose list rec_ Posture, obtaining a preset face pose rec_ posture i closest to the current face pose, which includes:
acquiring the preset face pose with the minimum average Euclidean distance as a face pose mindiss _rec_ posture closest to the preview face pose;
based on the multiple views, for the previewed face key point list pre_ posture, the face pose mindiss _rec_ posture of the recommendation closest to the previewed face key point list, a face adjustment mode is calculated, including:
Performing constraint checking on each view VS i in the preset multi-view mul_vs according to a preset priority order, checking whether the next view meets constraint conditions if the current view meets the constraint conditions, and prompting a user to adjust the gesture according to a scaling scale i and a rotation angle theta i if the current view does not meet the constraint conditions;
The constraint checking for each view VS i in the preset multi-view mul_vs according to the preset priority order includes:
Acquiring a current highest priority view vs i and a scaling scale i and a rotation angle theta i corresponding to the current highest priority view vs i;
Judging whether constraint conditions are met or not according to preset thresholds S_TH and theta_TH, wherein the constraint conditions are as follows:
scalei≤S_TH;
θi≤θ_TH。
2. The method of claim 1, wherein the obtaining a preview image including a face, wherein the preview image includes a depth image and a color image corresponding to the depth image, comprises:
acquiring a preview color image pre-image-rgb and a depth image pre-imag-d based on a ToF depth camera;
Wherein the depth image pre_imag_d is a depth image registered with the preview color image pre_image_rgb.
3. The method of claim 2, wherein the performing face key point detection according to the color image, and obtaining depth information of the face key point according to the depth image, comprises:
and detecting the face key points based on the color image to obtain a previewed face key point list:
pre_posture={keypoint1,keypoint2,……,keypointM};
keypointi={xi,yi};
where x i,yi is the abscissa and ordinate of the key point keypoint i in the image.
4. The method of claim 3, wherein the detecting the face key point according to the color image, and the obtaining depth information of the face key point according to the depth image, further comprises:
based on the depth image of the ToF, obtaining depth information corresponding to the face key points in the current face key point list includes:
the resolution of the pre_image_rgb and the depth image pre_imag_d is acquired:
shape_rgb={h_rgb,w_rgb};
shape_d={h_d,w_d};
For each of the face keypoints keypoint i in the previewed face keypoint list pre_ posture, calculating its mapping coordinates in the depth image pre_imag_d:
Depth information at a position point mappoint i in the depth image pre_imag_d is acquired as depth information d i of the face key point keypoint i:
keypointi={xi,yi,di};
di=pre_imag_d(mappointi)。
5. A credential photographing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the credential photographing method as claimed in any one of claims 1 to 4.
6. A computer readable storage medium, wherein a document capture program is stored on the computer readable storage medium, which when executed by a processor, implements the steps of the document capture method of any one of claims 1 to 4.
CN202210326516.XA 2022-03-30 2022-03-30 ID photo shooting method, device and computer-readable storage medium Active CN114727017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210326516.XA CN114727017B (en) 2022-03-30 2022-03-30 ID photo shooting method, device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210326516.XA CN114727017B (en) 2022-03-30 2022-03-30 ID photo shooting method, device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN114727017A CN114727017A (en) 2022-07-08
CN114727017B true CN114727017B (en) 2024-11-26

Family

ID=82240512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210326516.XA Active CN114727017B (en) 2022-03-30 2022-03-30 ID photo shooting method, device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN114727017B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105205462A (en) * 2015-09-18 2015-12-30 北京百度网讯科技有限公司 Shooting promoting method and device
CN111093022A (en) * 2018-10-24 2020-05-01 西安中兴新软件有限责任公司 Image shooting method, device, terminal and computer storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131702A (en) * 2019-12-25 2020-05-08 航天信息股份有限公司 Method and device for acquiring image, storage medium and electronic equipment
US11295475B2 (en) * 2020-01-29 2022-04-05 Boston Polarimetrics, Inc. Systems and methods for pose detection and measurement
CN113810588B (en) * 2020-06-11 2022-11-04 青岛海信移动通信技术股份有限公司 Image synthesis method, terminal and storage medium
CN113822256B (en) * 2021-11-24 2022-03-25 北京的卢深视科技有限公司 Face recognition method, electronic device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105205462A (en) * 2015-09-18 2015-12-30 北京百度网讯科技有限公司 Shooting promoting method and device
CN111093022A (en) * 2018-10-24 2020-05-01 西安中兴新软件有限责任公司 Image shooting method, device, terminal and computer storage medium

Also Published As

Publication number Publication date
CN114727017A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN108900790B (en) Video image processing method, mobile terminal and computer readable storage medium
CN110072061B (en) Interactive shooting method, mobile terminal and storage medium
CN110086993B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN108419008B (en) Shooting method, terminal and computer readable storage medium
CN107240072B (en) Screen brightness adjusting method, terminal and computer readable storage medium
CN107566734B (en) Intelligent control method, terminal and computer readable storage medium for portrait photographing
CN107133939A (en) A kind of picture synthesis method, equipment and computer-readable recording medium
CN110099217A (en) A kind of image capturing method based on TOF technology, mobile terminal and computer readable storage medium
CN112866685B (en) Screen projection delay measurement method, mobile terminal and computer readable storage medium
CN111885307B (en) Depth-of-field shooting method and device and computer readable storage medium
CN112367443A (en) Photographing method, mobile terminal and computer-readable storage medium
CN112995467A (en) Image processing method, mobile terminal and storage medium
CN110189368B (en) Image registration method, mobile terminal and computer readable storage medium
CN108184052A (en) A kind of method of video record, mobile terminal and computer readable storage medium
CN109816619B (en) Image fusion method, device, terminal and computer readable storage medium
WO2022266907A1 (en) Processing method, terminal device and storage medium
CN111866388B (en) Multiple exposure shooting method, equipment and computer readable storage medium
CN107896304B (en) Image shooting method and device and computer readable storage medium
CN113301252B (en) Image photographing method, mobile terminal and computer readable storage medium
CN114025099B (en) A method and device for controlling the composition of photographed images and a computer-readable storage medium
CN113301251B (en) Auxiliary shooting method, mobile terminal and computer readable storage medium
CN114727017B (en) ID photo shooting method, device and computer-readable storage medium
CN112532838B (en) Image processing method, mobile terminal and computer storage medium
CN112135047A (en) Image processing method, mobile terminal and computer storage medium
CN108600629B (en) Photographing method, mobile terminal and computer-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