Method and apparatus for determining collection posture, and device and storage medium
By displaying the following box in the camera preview screen and following the posture changes of the body's characteristic area, the time wasted problem caused by users' blind adjustments is solved, and efficient identity feature collection is achieved.
Patent Information
- Application Number
- PCT/CN2024/136013
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-02
- Filing Date
- 2024-12-02
- Publication Date
- 2025-07-10
AI Technical Summary
When using palm print collection equipment, users usually blindly adjust the position of palm prints, resulting in wasted time and inefficient collection efficiency.
By displaying the following box in the camera preview screen and following the posture changes of the body's characteristic area, the user is guided to adjust the posture of the body's characteristic area, so that the following box and the acquisition box meet the matching conditions, thereby determining the acquisition posture.
It improves the efficiency of users to collect identity characteristics, avoids blind adjustments, and ensures that better quality, clear and complete identity characteristics are collected.
Smart Images

Figure CN2024136013_10072025_PF_FP_ABST
Abstract
Description
Method, device, equipment and storage medium for determining acquisition posture
[0001] This application claims priority to Chinese patent application number 202410015511.4, filed on January 2, 2024, entitled “Identity Feature Collection Method, Device, Equipment and Storage Medium”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of human-computer interaction technology, and in particular to a method, device, equipment and storage medium for determining a collection posture. Background Art
[0003] In related technologies, biometrics are stable, unique, and convenient. Therefore, using each user's unique biometrics to identify a user helps improve the security and convenience of identification. Relevant biometrics include face, iris, fingerprint, palm print, etc.
[0004] For the technology of using palm print features for identity recognition, it is necessary to use a palm print collection device to collect the user's palm print features. However, when using the palm print collection device to collect palm prints, users often blindly adjust the position of their palm prints, resulting in users wasting a lot of time in the palm print collection process. Summary of the Invention
[0005] The present application provides a method, apparatus, device, and storage medium for determining a collection posture. The technical solution is as follows:
[0006] According to one aspect of the present application, a method for determining a collection posture is provided, the method comprising:
[0007] During the identity feature collection process, the camera preview image and the collection frame in the first display state are displayed;
[0008] In response to recognizing a body feature region in the camera preview image, displaying a follow frame on an image region corresponding to the body feature region, the follow frame changing in accordance with a posture change of the body feature region in real space;
[0009] In response to a matching condition being satisfied between the following frame and the acquisition frame of the first display state, it is determined that the posture of the body feature region in the real space reaches the acquisition posture.
[0010] In an optional embodiment, determining whether the posture of the body feature area in the real space reaches the collection posture includes: on the camera preview screen, switching the collection frame of the first display state to a collection frame of the second display state, the collection frame of the second display state is used to prompt that the posture of the body feature area in the real space reaches the collection posture, wherein the first display state and the second display state are different.
[0011] In another optional embodiment, determining that the posture of the body feature area in the real space reaches the collection posture includes: displaying a first prompt text on the camera preview screen, wherein the first prompt text is used to prompt that the posture of the body feature area in the real space reaches the collection posture.
[0012] In an optional embodiment, after determining that the posture of the body feature area in the real space reaches the collection posture, the camera preview screen is uploaded to the server. If the server fails to retrieve the camera preview screen from the identity feature library, the server saves the camera preview screen to the identity feature library. The server sends a notification message of the entry to the terminal. After receiving the notification message of the entry, the terminal displays a prompt message of successful entry on the terminal interface. The prompt message is used to prompt the user that the identity feature has been successfully entered.
[0013] Optionally, when the server retrieves the camera preview image from the identity feature library, it sends a duplicate entry notification message to the terminal. After receiving the duplicate entry notification message, the terminal displays a duplicate entry prompt message on the terminal interface, and the prompt message is used to remind the user that there is no need to repeatedly enter the identity feature.
[0014] According to one aspect of the present application, a device for determining a collection posture is provided, the device comprising:
[0015] A display module, used to display the camera preview image and the collection frame in the first display state during the identity feature collection process;
[0016] The display module is further configured to, in response to identifying a body feature region in the camera preview image, display a follow-up frame on an image region corresponding to the body feature region, wherein the follow-up frame changes in accordance with a posture change of the body feature region in real space;
[0017] The determination module is further configured to determine that the posture of the body feature area in the real space reaches the collection posture in response to a matching condition being satisfied between the following frame and the collection frame of the first display state.
[0018] According to one aspect of the present application, a computer device is provided, which includes a memory and a processor; the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the method for determining the acquisition posture as described above.
[0019] According to one aspect of the present application, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is configured to be executed by a processor to implement the method for determining the acquisition posture as described above.
[0020] According to one aspect of the present application, a computer program product or computer program is provided, which includes at least one program, and the at least one program is stored in a computer-readable storage medium. A processor reads and executes the at least one program from the computer-readable storage medium to implement the method for determining the acquisition posture as described above.
[0021] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0022] Because the following frame changes with the posture of the body feature area in real space, guiding the user to adjust the following frame also allows them to adjust the posture of the body feature area in real space. Furthermore, by guiding the user to adjust the following frame until it matches the collection frame in the first display state, the user can avoid blindly adjusting the body feature area, which helps improve the efficiency of collecting identity features. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] FIG1 shows a block diagram of a computer system according to an embodiment of the present invention;
[0024] FIG2 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0025] FIG3 shows a schematic diagram of classifying different terminal devices according to an embodiment of the present application;
[0026] FIG4 shows a flow chart of a method for determining a collection posture according to an embodiment of the present application;
[0027] FIG5 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0028] FIG6 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0029] FIG7 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0030] FIG8 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0031] FIG9 shows a flow chart of a method for determining a collection posture according to an embodiment of the present application;
[0032] FIG10 shows a flow chart of a method for determining a collection posture according to an embodiment of the present application;
[0033] FIG11 shows a flow chart of a method for determining a collection posture according to an embodiment of the present application;
[0034] FIG12 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0035] FIG13 shows a flow chart of a method for determining a collection posture according to an embodiment of the present application;
[0036] FIG14 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0037] FIG15 shows a flowchart of a method for determining a collection posture according to an embodiment of the present application;
[0038] FIG16 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0039] FIG17 shows a flowchart of a method for determining a collection posture according to an embodiment of the present application;
[0040] FIG18 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0041] FIG19 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0042] FIG20 shows an interface diagram of a method for determining a collection posture provided by an embodiment of the present application;
[0043] FIG21 shows a structural block diagram of a device for determining a collection posture according to an embodiment of the present application;
[0044] FIG22 shows a structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0045] First, some terms involved in the embodiments of this application are briefly introduced:
[0046] The first display capture frame refers to the calibration frame during the matching process. The first display capture frame is used to match the follow frame. The first display capture frame guides the user to adjust the follow frame until the follow frame and the first display capture frame meet the matching conditions.
[0047] The following frame is a dynamic frame used during the matching process. It changes as the body feature area changes in real space. Body feature areas are areas on the human body that carry human characteristics, such as the palm, fingertips, and face. When the body feature area changes in real space, the camera on the terminal captures the change in the body feature area's posture, and the following frame displayed on the camera preview screen on the terminal interface also changes accordingly.
[0048] The collection frame in the second display state refers to the result frame in the matching process. If the collection frame in the first display state meets the matching conditions with the follow-up frame, the collection frame in the first display state is switched to the collection frame in the second display state. The first display state and the second display state are different display states.
[0049] FIG1 shows a block diagram of a computer system 100 according to an exemplary embodiment of the present application. The computer system 100 includes a terminal 110 and a server 120 .
[0050] Terminal 110 has installed and runs a program or webpage that supports the collection of identity features. Optionally, the program that supports the collection of identity features includes at least one of a gaming application, a virtual social application, an interactive entertainment application, and a metaverse application. Optionally, the program that supports the collection of identity features is an application or mini-program developed specifically for the identity feature collection function and used solely for collecting identity features. Optionally, the program that supports the collection of identity features is an application or mini-program with the identity feature collection function. In the embodiments of the present application, an example is provided in which the program that supports the collection of identity features is an application developed specifically for the identity feature collection function and used solely for collecting identity features.
[0051] Terminal 110 is used by the target user, who uses terminal 110 to collect identity features. For example, as shown in FIG2 , terminal 110 is installed and running an identity feature collection client 111 that supports identity feature collection. The target user clicks or long-presses to open identity feature collection client 111 and begins collecting identity features. In response to the triggering operation, identity feature collection client 111 displays an identity feature collection interface 10, which includes a camera preview screen 11 and a collection frame 12 in a first display state.
[0052] The camera preview screen 11 is a real-time image captured by the camera of the terminal 110. Optionally, the camera preview screen 11 is displayed full screen on the identity feature collection interface 10. That is, the display size of the camera preview screen 11 is determined based on the display size of the identity feature collection interface 10. For example, when the display size of the identity feature collection interface 10 is equal to the screen size of the terminal 110, the camera preview screen 11 is displayed full screen on the terminal 110. Optionally, the camera preview screen 11 is displayed at a target location on the identity feature collection interface 10. For example, the camera preview screen 11 is displayed within the collection frame 12 in the first display state.
[0053] The collection frame 12 in the first display state is determined based on the device parameters of terminal 110 related to collecting identity features. Exemplarily, these device parameters include camera parameters and image imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle, distortion, color difference, and sharpness. The image imaging parameters are determined based on the image actually captured by terminal 110. In some embodiments, as shown in FIG3 , device parameters for different devices are pre-collected and then categorized based on these parameters, for example, into Class A, Class B, Class C, and Class D. Each category corresponds to its own collection frame parameters, which include at least one of the display size, display position, and display format used to indicate the display of the collection frame on the identity feature entry interface. The collection frame parameters are stored in server 120. In some embodiments, when starting identity feature collection, terminal 110 sends a request to server 120 to retrieve the collection frame parameters. Server 120 sends the corresponding collection frame parameters to terminal 110 based on the category to which terminal 110 belongs. Terminal 110 displays the collection frame 12 in the first display state on the identity feature collection interface 10 based on the received collection frame parameters.
[0054] In some embodiments, in response to identifying a body feature region in the camera preview screen 11, a follow-up frame 13 is displayed in the screen area corresponding to the body feature region. This follow-up frame 13 changes in accordance with the posture changes of the body feature region in real space. This follow-up frame 13 is used to guide the user to adjust the display form of the follow-up frame so that a matching condition is satisfied between the follow-up frame 13 and the collection frame 12 in the first display state. If the matching condition is satisfied between the follow-up frame 13 and the collection frame 12 in the first display state, the collection frame 12 in the first display state is switched to the collection frame 14 in the second display state, indicating that the posture of the target user's body feature region in real space has reached the collection posture.
[0055] The terminal 110 is connected to the server 120 via a wireless network or a wired network.
[0056] Server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Exemplarily, server 120 includes a processor 121 and memory 122. Memory 122 further includes a receiving module 1221, a display module 1222, and a sending module 1223. Receiving module 1221 is configured to receive a request from terminal 110; display module 1222 is configured to display a program page that supports the collection of identity features; and sending module 1223 is configured to send a response to terminal 110. Server 120 provides backend services for programs or web pages that support the collection of identity features. Optionally, server 120 performs primary computing tasks, while terminal 110 performs secondary computing tasks; alternatively, server 120 performs secondary computing tasks, while terminal 110 performs primary computing tasks; or alternatively, server 120 and terminal 110 collaboratively perform computing tasks.
[0057] Optionally, the device type of terminal 110 includes at least one of a smartphone, a smartwatch, an in-vehicle terminal, a wearable device, a smart TV, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer, and a desktop computer. The following embodiments are described using an example in which terminal 110 includes a smartphone.
[0058] Those skilled in the art will appreciate that the number of terminals 110 may be greater or less. For example, there may be only one terminal 110, or there may be dozens, hundreds, or even more terminals 110. The embodiment of the present application does not limit the number or device type of terminals 110.
[0059] In an embodiment of the present application, a method for determining a collection posture is provided, which can guide the user through a dynamically changing follow-up frame, prevent the user from making blind adjustments, and is conducive to improving the efficiency of the user in collecting identity features.
[0060] FIG4 shows a flow chart of a method for determining a collection posture provided by an embodiment of the present application. Taking the method as performed by the terminal 110 shown in FIG1 as an example, the method includes the following steps:
[0061] Step 220: During the identity feature collection process, display the camera preview image and the collection frame in the first display state;
[0062] In some embodiments, in response to a trigger operation on the identity feature collection client, a camera preview image and a collection frame in a first display state are displayed. The trigger operation includes at least one of a single click, a double click, a left-right swipe, an up-down swipe, a long press, a hover, facial recognition, and voice recognition. It is worth noting that the trigger operations include but are not limited to the ones mentioned above. Those skilled in the art should be aware that any operation that can achieve the above functions falls within the scope of protection of the embodiments of this application.
[0063] In some embodiments, the camera preview screen and the capture frame in the first display state are displayed simultaneously. In some embodiments, the camera preview screen and the capture frame in the first display state are not displayed simultaneously. Optionally, the capture frame in the first display state is displayed after the camera preview screen is displayed. For example, the camera preview screen is displayed first, and the capture frame in the first display state is displayed after the detection object is identified. Optionally, the camera preview screen is displayed after the capture frame in the first display state is displayed.
[0064] In some embodiments, the camera preview image is a real-time image captured by the camera. Optionally, the camera preview image is displayed full screen on the terminal screen. Optionally, the camera preview image is displayed within a target area on the terminal screen. The target area is preset or dynamically changes. For example, the target area is the middle third of the terminal screen. In the embodiments of the present application, the camera preview image is displayed full screen on the terminal screen as an example for description.
[0065] In some embodiments, the collection frame in the first display state is determined based on device parameters associated with the terminal. Exemplarily, these device parameters include camera parameters and image imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle, distortion, color aberration, and sharpness. The image imaging parameters are determined based on the image actually captured by the terminal. In some embodiments, as shown in Figure 3, device parameters for different devices are pre-collected and then categorized based on these parameters, for example, into Class A, Class B, Class C, and Class D. Each category corresponds to its own collection frame parameters, which include at least one of the display size, display position, and display format used to indicate the display of the collection frame on the identity feature entry interface. The collection frame parameters are stored in server 120. In some embodiments, when terminal 110 begins identity feature collection, it sends a request to server 120 to retrieve the collection frame parameters. Server 120 sends the corresponding collection frame parameters to terminal 110 based on the category to which terminal 110 belongs. Terminal 110 displays the collection frame in the first display state based on the received collection frame parameters.
[0066] Optionally, the display shape of the collection frame in the first display state is preset or dynamically changed. For example, at least two display shapes of the collection frame in the first display state are provided for selection, including at least two of circle, square, and trapezoid. If the preset display shape of the collection frame in the first display state is circle, the user can also choose to modify the display shape of the collection frame in the first display state to square. Optionally, the display size of the collection frame in the first display state is preset or dynamically changed. For example, the display size of the collection frame in the first display state is one-third of the terminal screen. Optionally, the display position of the collection frame in the first display state is preset or dynamically changed. For example, the collection frame in the first display state is displayed at the center of the terminal screen.
[0067] In some embodiments, the first display state is primarily used to distinguish it from the second display state, and the first display state and the second display state are different. Optionally, the first display state is a first color, such as black; the second display state is a second color, or a color other than the first color, such as green. Optionally, the first display state is a first display entity, such as a solid line; the second display state is a second display entity, or a display entity other than the first display entity, such as a dashed line.
[0068] Exemplarily, as shown in FIG2 , during the identity feature collection process, a camera preview screen 11 and a collection frame 12 in a first display state are displayed.
[0069] Step 240: In response to identifying a body feature region in the camera preview image, displaying a follow frame on an image region corresponding to the body feature region;
[0070] A body feature area refers to an area on the human body that carries a body feature, such as the palm area, fingertip area, facial area, etc. In some embodiments, in response to recognizing a body feature area in the camera preview image, a follow frame is displayed in the image area corresponding to the body feature area. The follow frame follows the body feature area. It should be understood that the follow frame is used to frame the body feature area in the camera preview image, and the display shape, size, and position of the follow frame change with the body feature area.
[0071] In some embodiments, the display state of the following frame is preset. Optionally, the display state of the following frame is a first display state, that is, the display state of the following frame is the same as the initial display state of the acquisition frame. Optionally, the display state of the following frame is a second display state, that is, the display state of the following frame is the same as the final display state of the acquisition frame. Optionally, the display state of the following frame is the same as the display state of the acquisition frame, that is, when the acquisition frame is in the first display state, the following frame is also the same as the first display state. When the relative position between the following frame and the acquisition frame in the first display state meets a matching condition, the first display state switches to the second display state. Optionally, the display state of the following frame is a third display state, that is, the display state of the following frame is different from the display state of the acquisition frame. For example, if the first display state of the acquisition frame is red and the second display state of the acquisition frame is green, the display state of the following frame is yellow.
[0072] In some embodiments, the display state of the following frame changes dynamically. Optionally, the display state of the following frame changes as the distance between the body feature area and the camera changes. In some embodiments, the greater the distance between the body feature area and the camera, the greater the difference between the display state of the following frame and the display state of the acquisition frame; the smaller the distance between the body feature area and the camera, the smaller the difference between the display state of the following frame and the display state of the acquisition frame. For example, assuming that the first display state of the acquisition frame is red, when the body feature area moves away from the camera from a position close to the camera, the display state of the following frame changes from a color close to red to a color that is significantly different from red (such as yellow).
[0073] In some embodiments, the follow-up frame corresponds to a follow-up sound. It is understandable that the follow-up sound and the follow-up frame exist synchronously, and the follow-up sound is played in conjunction with the display of the follow-up frame. Optionally, the follow-up sound is preset. For example, the follow-up sound corresponds to the display state of the follow-up frame. When the display state of the follow-up frame is fixed, the follow-up sound is also fixed. Optionally, there is a one-to-one correspondence between the follow-up sound and the follow-up frame. For example, as shown in Table 1 below:
[0074] Table 1
[0075] In some embodiments, the follow-up sound changes dynamically. For example, the follow-up sound changes with changes in the follow-up frame. Optionally, the urgency of the follow-up sound changes with changes in the distance between the body feature area and the camera. The urgency of the follow-up sound is negatively correlated with the distance between the body feature area and the camera. When the body feature area is close to the camera, the follow-up sound becomes more and more urgent; when the body feature area is far away from the camera, the follow-up sound becomes more and more gentle. Optionally, the pitch of the follow-up sound changes with changes in the distance between the body feature area and the camera. The pitch of the follow-up sound is negatively correlated with the distance between the body feature area and the camera. When the body feature area is close to the camera, the pitch of the follow-up sound is higher; when the body feature area is far away from the camera, the pitch of the follow-up sound is lower.
[0076] In some embodiments, a special effects mask is displayed while displaying the follow frame. The special effects mask is attached to the body feature area. The special effects mask is used to prompt the user that a follow frame is displayed, and can enhance the fun of guiding the user through special effects. Optionally, the special effects mask is preset. For example, when the body feature area is the palm area, the special effects mask is a flower, implying "flower blooming in the palm"; when the body feature area is the facial area, the feature mask is a facial expression package. Optionally, the special effects mask is dynamically changing. Optionally, the display effect of the special effects mask can change with the distance between the body feature area and the camera. For example, when the body feature area is the palm area, the special effects mask is a flower. When the palm area is far away from the camera, the flower is displayed in a reduced size; when the palm area is close to the camera, the flower is displayed in an enlarged size.
[0077] It should be noted that the description of the follow-up frame and follow-up sound in the embodiments of this application is merely exemplary. Any other method that can achieve the display of the follow-up frame on the body feature area falls within the scope of protection of the embodiments of this application. For example, if the body feature area is the palm area, the special effect mask can also be a fountain.
[0078] In some embodiments, the following frame changes according to the posture of the body feature region in real space. In some embodiments, the display shape of the following frame changes according to the plane where the body feature region is located and the distance between the body feature region and the camera.
[0079] In some embodiments, in response to identifying a body feature region in a camera preview image, a following frame is displayed in an image region corresponding to the body feature region, using a first flatness as the flatness of the following frame; wherein the first flatness is associated with an angle between a plane containing the body feature region and a plane containing the terminal screen. Optionally, the first flatness is positively correlated with the angle between the plane containing the body feature region and the plane containing the terminal screen.
[0080] For example, if the angle between the plane of the body feature area and the plane of the terminal screen is zero in real space, a standard tracking frame is displayed. The standard tracking frame is a circular frame. If the angle between the plane of the body feature area and the plane of the terminal screen gradually increases, an elliptical frame is displayed. As the angle increases, the elliptical frame becomes flatter. If the angle between the plane of the body feature area and the plane of the terminal screen gradually decreases, the elliptical frame becomes closer to a circular frame.
[0081] In some embodiments, it can also be understood that the following frame is a projection of a feature frame for following the body feature area in the camera preview screen, and the feature frame is on the plane where the body feature area is located and is used to frame the body feature area.
[0082] In some embodiments, the body feature area is a palm area. In some embodiments, the body feature area is a facial area. In the embodiments of the present application, the body feature area is an example of a palm area.
[0083] For example, as shown in FIG5 , assuming the plane of the terminal screen is the xoz plane, when the plane of the body feature region is parallel to the plane of the terminal screen, following frame 13 is feature frame 15, and both following frame 13 and feature frame 15 are circular. When the plane of the body feature region intersects the plane of the terminal screen, for example, as shown in FIG6 , when the plane of the body feature region is the xoz' plane, following frame 13 is the projection of feature frame 15 on the terminal screen, and feature frame 15 is circular, and following frame 13 is the elliptical shape of the projection of feature frame 15.
[0084] In some embodiments, the shape of the feature frame is the same as the shape of the collection frame in the first display state. For example, if the shape of the collection frame in the first display state is circular, the shape of the feature frame is also circular.
[0085] In some embodiments, in response to identifying a body feature region, a following frame is displayed on the screen area using a reference point on the screen area corresponding to the body feature region as the center point of the following frame. Optionally, the reference point is the center point on the screen area corresponding to the body feature region, such as the center point of the screen area corresponding to the palm region.
[0086] In some embodiments, in response to identifying a body feature area on the camera preview screen, a follow-up frame is displayed on the screen area corresponding to the body feature area with a first size as the follow-up frame size. The first size is associated with the distance between the body feature area and the camera. In some embodiments, the first size is negatively correlated with the distance between the body feature area and the camera. Optionally, the farther the distance between the body feature area and the camera, the smaller the first size; the closer the distance between the body feature area and the camera, the larger the first size. For example, as shown in Figures 5 and 7, when the body feature area moves from a position close to the camera to a position far from the camera, the size of the follow-up frame 13 also shrinks from one first size to another first size.
[0087] In some embodiments, in response to the body feature region tilting, translating, or rotating along with the first body part, the display of the following frame is updated so that the center point of the following frame and the reference point on the image area corresponding to the body feature region are consistent. The center point of the updated following frame and the reference point on the image area corresponding to the body feature region coincide with each other. Optionally, in response to the body feature region tilting along with the first body part, the display of the following frame is updated. Optionally, in response to the body feature region translating along with the first body part, the display of the following frame is updated. Optionally, in response to the body feature region rotating along with the first body part, the display of the following frame is updated.
[0088] In some embodiments, the first body part is the body part where the body feature region is located. Optionally, when the body feature region is the palm region, the first body part is the palm. Optionally, when the body feature region is the face region, the first body part is the head. Optionally, when the body feature region is the fingertip region, the first body part is the finger. In the embodiments of the present application, the body feature region is the palm region and the first body part is the palm as an example for illustration.
[0089] Optionally, the reference point is a specified point on the screen area corresponding to the body feature region. If the body feature region is a palm region, the reference point may be at least one of the center point, upper edge point, lower edge point, left edge point, and right edge point of the screen area corresponding to the palm region. If the body feature region is a fingertip region, the reference point may be at least one of the center point, upper edge point, lower edge point, left edge point, and right edge point of the screen area corresponding to the fingertip region.
[0090] Step 260: In response to a matching condition being satisfied between the following frame and the acquisition frame of the first display state, determining that the posture of the body feature region in the real space reaches the acquisition posture.
[0091] In an embodiment of the present application, a capture frame and a follow frame in a first display state are displayed on the camera preview screen. The follow frame changes as the posture of the user's body feature area in real space changes. During the dynamic change of the follow frame, if the follow frame matches the capture frame in the first display state, it is determined that the posture of the body feature area in real space has reached the capture posture. The capture posture refers to the posture of the body feature area required when collecting the identity characteristics of the body feature area. In the capture posture, the terminal device can collect high-quality, clear and complete identity characteristics.
[0092] In some embodiments, in response to a matching condition being met between the following frame and the collection frame of the first display state, the collection frame of the first display state is switched to be displayed as a collection frame of the second display state, and the collection frame of the second display state is used to prompt that the posture of the body feature area in the real space reaches the collection posture; wherein, the first display state and the second display state are different.
[0093] The second display state capture frame refers to the result frame of the matching process. If the first display state capture frame and the follow frame meet the matching conditions, the first display state capture frame switches to the second display state capture frame. The first and second display states are different display states. The switch from the first display state capture frame to the second display state capture frame indicates that the posture of the current body feature region in real space has reached the capture posture. In other words, the posture of the current body feature region in real space meets the conditions. At this point, feature capture of the body feature region can be performed.
[0094] In some embodiments, the matching condition includes at least one of the following:
[0095] The shape of the follow frame is the same as the shape of the acquisition frame in the first display state;
[0096] The size of the follow frame is the same as the size of the acquisition frame in the first display state;
[0097] The ratio of the area of the following frame to the area of the acquisition frame in the first display state is greater than or equal to a ratio threshold;
[0098] The intersection area between the following frame and the acquisition frame in the first display state is greater than or equal to the area threshold;
[0099] The distance between the center of the following frame and the center of the acquisition frame in the first display state is less than a distance threshold;
[0100] The difference between the radius of the following frame and the radius of the acquisition frame in the first display state is less than the length difference threshold;
[0101] The angle between the plane where the following frame is located and the plane where the acquisition frame in the first display state is located is less than the angle difference threshold.
[0102] In some embodiments, in response to the shape of the following frame being identical to the shape of the capture frame in the first display state, the capture frame in the first display state is switched to the capture frame in the second display state. Because the following frame is a projection of the feature frame on the camera preview screen, when the plane of the body feature area is parallel to the plane of the terminal screen, the shape of the following frame and the shape of the capture frame in the first display state will be identical, and the capture frame in the first display state will be switched to the capture frame in the second display state.
[0103] In some embodiments, in response to the size of the following frame being the same as the size of the collection frame in the first display state, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. It should be understood that the size of the following frame here can be understood as the area size of the following frame, that is, in response to the area size of the following frame being the same as the area size of the collection frame in the first display state, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. Alternatively, the size of the following frame here can also be understood as the size when the shape of the following frame is the same as the shape of the collection frame in the first display state, that is, in response to the shape of the following frame being the same as the shape of the collection frame in the first display state, and the size of the following frame being the same as the size of the collection frame in the first display state, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state.
[0104] In some embodiments, in response to the ratio of the area of the following frame to the area of the collection frame in the first display state being greater than or equal to a ratio threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. It should be understood that the area of the collection frame in the first display state remains unchanged after the collection frame in the first display state is displayed. The area of the following frame changes as the following frame is updated. In some embodiments, the ratio threshold is preset or changes dynamically. For example, if the ratio threshold is four-fifths, then in response to the ratio of the area of the following frame to the area of the collection frame in the first display state being greater than or equal to four-fifths, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state.
[0105] In some embodiments, in response to the area of the intersection between the following frame and the collection frame in the first display state being greater than or equal to an area threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. In some embodiments, the area threshold is preset or dynamically changed. For example, the area threshold is 2 square centimeters. Exemplarily, as shown in FIG8 , in response to the area of the intersection area 16 between the following frame 13 and the collection frame 12 in the first display state being greater than or equal to 2 square centimeters, the collection frame 12 in the first display state is switched to be displayed as the collection frame in the second display state.
[0106] In some embodiments, in response to the distance between the center of the following frame and the center of the collection frame in the first display state being less than a distance threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. In some embodiments, the distance threshold is preset or dynamically changed. For example, the distance threshold is 2 centimeters. Exemplarily, as shown in FIG8 , in response to the distance 17 between the center of the following frame 13 and the center of the collection frame 12 in the first display state being less than 2 centimeters, the collection frame 12 in the first display state is switched to be displayed as the collection frame in the second display state.
[0107] In some embodiments, when the collection frame in the first display state is circular and the following frame is circular, in response to the difference between the radius of the following frame and the radius of the collection frame in the first display state being less than a length difference threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. In some embodiments, the length difference threshold is preset or changes dynamically. For example, if the length difference threshold is 1 cm, then in response to the difference between the radius of the following frame and the radius of the collection frame in the first display state being less than 1 cm, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. It should be understood that when the collection frame in the first display state is circular and the following frame is circular, that is, the shape of the collection frame in the first display state is the same as the shape of the following frame, then the plane where the body feature area is located is parallel to the plane where the terminal screen is located.
[0108] In some embodiments, in response to the angle between the plane where the body feature area is located and the plane where the collection frame of the first display state is located being less than an angle difference threshold, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state. Alternatively, it can be understood that in response to the angle between the plane where the feature frame is located and the plane where the terminal screen is located being less than an angle difference threshold, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state. The following frame is the projection of the feature frame on the plane where the terminal screen is located. In some embodiments, the angle difference threshold is preset or changes dynamically. For example, if the angle difference threshold is 30 degrees, then in response to the angle between the plane where the body feature area is located and the plane where the collection frame of the first display state is located being less than 30 degrees, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state.
[0109] In some embodiments, the matching condition may be a combination of n conditions, where n is an integer greater than 1. For example, the matching condition is that the shape of the following frame is the same as the shape of the collection frame in the first display state, and the ratio of the area of the following frame to the area of the collection frame in the first display state is greater than or equal to a ratio threshold. In response to the shape of the following frame being the same as the shape of the collection frame in the first display state, and the ratio of the area of the following frame to the area of the collection frame in the first display state being greater than or equal to the ratio threshold, the collection frame in the first display state is switched to the collection frame in the second display state.
[0110] In summary, the method provided in the embodiments of the present application provides a method for collecting identity features. Because the following frame follows the posture changes of the body feature area in real space, guiding the user to adjust the following frame can also guide the user to adjust the posture of the body feature area. Furthermore, by guiding the user to adjust the following frame until it matches the collection frame in the first display state, the user can avoid blindly adjusting the frame, which is conducive to improving the efficiency of user identity feature collection.
[0111] The method provided in the embodiment of the present application also displays a following frame by using a reference point on the screen area corresponding to the body feature region as the center point of the following frame, so that the following frame always changes based on changes in the body feature region. This allows the following frame to be adjusted in a timely manner when the body feature region changes dynamically. For example, when the body feature region follows at least one of tilting, translating, or rotating the first body part, the following frame can be updated in a timely manner, thereby providing real-time guidance to the user.
[0112] The method provided in the embodiment of the present application further displays the following frame with a first size as the following frame size, so that the size of the following frame is determined based on the distance between the body feature area and the camera, thereby being able to dynamically adjust the size of the following frame to ensure real-time guidance for the user.
[0113] The method provided in an embodiment of the present application further displays a following frame using a first flatness as the flatness of the following frame, so that the flatness of the following frame is determined based on the angle between the plane where the body feature area is located and the plane where the terminal screen is located, thereby being able to dynamically adjust the flatness of the following frame to ensure real-time guidance for the user.
[0114] FIG9 shows a flow chart of a method for determining a collection posture provided by an embodiment of the present application. Taking the method as performed by the terminal 110 shown in FIG1 as an example, before the above step 240, the following steps are also included:
[0115] Step 320: In response to identifying the detection object in the camera preview image, obtaining an image frame corresponding to the detection object;
[0116] The detection object may optionally be a skin area. In some embodiments, the detection object is a first body part or the detection object is not the first body part. Optionally, in response to recognizing the first body part in the camera preview image, an image frame corresponding to the first body part is acquired. Alternatively, in response to recognizing an object other than the first body part in the camera preview image, an image frame corresponding to the recognized object is acquired.
[0117] In some embodiments, the image frame is a preprocessed image frame. Optionally, the preprocessing step includes at least one of color space conversion, binarization, filtering, and edge detection. In some embodiments, the image frame is an unpreprocessed image frame. The preprocessing operation is used to help reduce noise and background interference in the image frame, thereby facilitating highlighting features in the image frame.
[0118] In some embodiments, based on the acquired image frame, it is determined whether the detected object is the first body part. Exemplarily, as shown in FIG10 , the method further includes the following steps:
[0119] Step 331: extracting a skin area in the image frame and extracting a contour of the skin area;
[0120] In some embodiments, skin regions in an image frame are extracted based on a color threshold. Optionally, the image frame is converted from a first color space to a second color space, where the color information in the first color space and the second color space is different. Exemplarily, the first color space is a red, green, and blue (RGB) color space, and the second color space is a hue, saturation, and value (HSV) color space.
[0121] Optionally, the color threshold is preset. The color threshold is used to distinguish between skin areas and non-skin areas in an image frame. In some embodiments, when the color difference between the skin area and the non-skin area in the image frame is significant, the skin area in the image frame is directly extracted. In some embodiments, when the color difference between the skin area and the non-skin area in the image frame is not significant, the image frame is converted from a first color space to a second color space to highlight the color difference between the skin area and the non-skin area in the image frame, thereby extracting the skin area from the image frame.
[0122] In some embodiments, the contour of the skin area is extracted using an edge detection algorithm. Alternatively, the contour of the skin area is extracted using a Canny algorithm. Alternatively, the contour of the skin area is extracted using a Sobel algorithm. In some embodiments, the Canny algorithm is a standard algorithm widely used for edge detection, whose goal is to find an optimal edge detection solution or the location with the strongest grayscale intensity change in an image. Optimal edge detection is primarily evaluated based on three criteria: low error rate, high localization, and minimum response. In some embodiments, the Sobel algorithm is primarily used for edge detection, technically using a set of discrete difference operators to calculate an approximate grayscale value of the image brightness function.
[0123] In some embodiments, whether the detection object is the first body part is determined based on the contour of the skin area.
[0124] Step 332: if the contour of the skin area corresponds to the contour of the first body part, determining that the detection object is the first body part;
[0125] In some embodiments, the contour of the skin area is compared with the contour of the first body part. If the contour of the skin area corresponds to the contour of the first body part, it is determined that the detection object is the first body part; if the contour of the skin area does not correspond to the contour of the first body part, it is determined that the detection object is not the first body part.
[0126] In some embodiments, the first body part contour corresponds to features such as shape, area, and perimeter. Optionally, determining whether the detected object is the first body part is performed by comparing the shape of the contour of the skin area with the shape of the first body part contour. Optionally, there is a correspondence between the features of the first body part contour. For example, if the area corresponding to the first body part contour is 10 square centimeters, the corresponding perimeter is 15 centimeters; if the area corresponding to the first body part contour is 20 square centimeters, the corresponding perimeter is 30 centimeters.
[0127] In some embodiments, if the detection object is determined to be the first body part, the following step 340 is continued to be executed. If the detection object is determined not to be the first body part, the above steps are repeated until the detection object is determined to be the first body part.
[0128] Step 340: When it is determined that the detection object is the first body part, extract reference feature points from the image frame, and determine a body feature area based on the reference feature points.
[0129] In some embodiments, when the detected object is determined to be a first body part, reference feature points are extracted from the image frame. Optionally, the reference feature points include convex hull points of the first body part and concave points of the first body part.
[0130] In some embodiments, the convex hull point of the first body part refers to a feature point corresponding to a relatively convex position in the first body part, such as a fingertip. The concave point of the first body part refers to a feature point corresponding to a relatively concave position in the first body part, such as a finger joint. Optionally, taking the first body part as a palm as an example, the position of the convex hull point of the first body part includes the position of the fingertip, the center position of the finger joint, the center position of the connection between the base of the finger, etc., and the position of the concave point of the first body part includes the position of the finger joint, the base of the finger, and the center position of the palm.
[0131] In some embodiments, a body feature region is determined based on reference feature points. The body feature region is the area of the first body part excluding the finger, or, understandably, the body feature region is the area including the identity feature. Optionally, a boundary line between the finger and the body feature region is determined based on the reference feature points. The body feature region is determined based on the boundary line and the outline of the first body part.
[0132] In summary, the method provided in the embodiment of the present application, in response to identifying the detection object in the camera preview screen, obtains an image frame corresponding to the detection object; extracts the skin area in the image frame, and the contour corresponding to the skin area, and determines whether the detection object is the first body part, thereby realizing that the method provided in the embodiment of the present application can accurately collect identity features. If the detection object is not the first body part, repeated identification is required instead of performing an invalid operation of extracting reference feature points. This can reduce invalid operations when the detection object is not the first body part, which is conducive to improving the accuracy of identity feature collection.
[0133] In some embodiments, during the identity feature collection process, the terminal may prompt the user through at least one prompt message. Optionally, the prompt message includes at least one of the following:
[0134] First prompt information;
[0135] Second prompt information;
[0136] ·The third prompt information.
[0137] In some embodiments, the first prompt information is used to prompt the user to adjust the position of the first body part. Exemplarily, as shown in FIG11 , the method further includes the following steps:
[0138] Step 420: When it is determined that the detection object is the first body part and the outline of the first body part is incomplete, display a first prompt message.
[0139] It is worth noting that step 420 is performed after step 332 above. That is, if the detection object is determined to be the first body part, the first body part's contour is analyzed to determine whether it is complete. Optionally, the first body part's contour is determined to be discontinuous by calculating the ratio of its area to perimeter. For example, if the first body part's contour is intact, the ratio of its area to perimeter is 1:1.5; then, if the calculated ratio of its area to perimeter is 1:1, it can be determined that the first body part's contour is discontinuous.
[0140] In some embodiments, if the outline of the first body part is incomplete, the body feature area may not be accurately identified. For example, if the outline of the first body part only includes the outline of a finger, the body feature area cannot be identified. Therefore, if it is determined that the detection object is the first body part and the outline of the first body part is incomplete, a first prompt message is displayed. The first prompt message reminds the user to adjust the position of the first body part so that the complete outline of the first body part can be identified, thereby ensuring accurate identification of the body feature area.
[0141] Exemplarily, as shown in FIG12 , assuming that the first body part is a palm, when it is determined that the detection object is a palm and the palm contour is incomplete, a first prompt message 18 is displayed. The first prompt message 18 is used to prompt the user that the “palm is incomplete”.
[0142] In some embodiments, the second prompt information is used to prompt the user to change the detection object. For example, as shown in FIG13 , the method further includes the following steps:
[0143] Step 520: When it is determined that the detected object is not the first body part, display a second prompt message.
[0144] In some embodiments, after step 331, if it is determined that the detected object is not the first body part, the second prompt information is displayed. Alternatively, in response to the detected object being identified as a target object, and the target object is not the first body part, the second prompt information is displayed.
[0145] Exemplarily, as shown in FIG14 , assuming that the first body part is a palm, when it is determined that the detected object is not a palm, a second prompt message 19 is displayed, and the second prompt message 19 is used to prompt the user that “the palm cannot be recognized”.
[0146] Optionally, when it is repeatedly determined that the detection object is not the first body part, the second prompt information is repeatedly displayed until the user changes the detection object to the first body part.
[0147] In some embodiments, the third prompt information is used to prompt the user to adjust the light of the image frame. For example, as shown in FIG15 , the method further includes the following steps:
[0148] Step 620: extracting light features in the image frame;
[0149] In some embodiments, after step 320, more specifically after acquiring an image frame of the detection object, light features in the image frame are extracted. In some embodiments, the light features include brightness and color. Optionally, the brightness of the light in the image frame is extracted. Optionally, the color of the light in the image frame is extracted.
[0150] Step 640: When the light feature does not meet the light feature threshold, display a third prompt message.
[0151] In some embodiments, the extracted light features are compared with a light feature threshold. If the light features meet the light feature threshold, it is determined that the light in the image frame meets the condition, and step 331 is continued. If the light features do not meet the light feature threshold, it is determined that the light in the image frame does not meet the condition, and a third prompt message is displayed. Optionally, the light feature threshold is preset or dynamically adjusted. The third prompt message is used to prompt the user to adjust the light in the image frame.
[0152] Exemplarily, as shown in FIG16 , when the light feature in the image frame does not meet the light feature threshold, or when the light in the acquired acquisition image 51 is less or dimmer, a third prompt message 50 is displayed. The third prompt message 50 is used to prompt the user that “the light is dark”, or to prompt the user to adjust the light in the current acquisition environment.
[0153] The method provided in the embodiment of the present application prompts the user by displaying at least one prompt message, so that during the process of identity feature collection, the user can be reminded to make adjustments in a timely manner according to various situations, thereby ensuring that the process of identity feature collection can be smoother.
[0154] In some embodiments, taking the palm print collection process as an example, the method includes the following steps:
[0155] Step 2020: During the palm print collection process, the camera preview screen and the collection frame in the first display state are displayed;
[0156] In some embodiments, in response to a trigger operation on the palm print collection client, a camera preview screen and a collection frame in a first display state are displayed. The trigger operation includes at least one of a single click, a double click, a left-right swipe, an up-down swipe, a long press, a hover, facial recognition, and voice recognition. It is worth noting that the trigger operation includes but is not limited to the aforementioned ones. Those skilled in the art should be aware that any operation that can achieve the above functions falls within the scope of protection of the embodiments of this application.
[0157] In some embodiments, the camera preview screen and the capture frame in the first display state are displayed simultaneously. In some embodiments, the camera preview screen and the capture frame in the first display state are not displayed simultaneously. Optionally, the capture frame in the first display state is displayed after the camera preview screen is displayed. For example, the camera preview screen is displayed first, and the capture frame in the first display state is displayed after the detection object is identified. Optionally, the camera preview screen is displayed after the capture frame in the first display state is displayed.
[0158] In some embodiments, the camera preview image is a real-time image captured by the camera. Optionally, the camera preview image is displayed full screen on the terminal screen. Optionally, the camera preview image is displayed within a target area on the terminal screen. The target area is preset or dynamically changes. For example, the target area is the middle third of the terminal screen. In the embodiments of the present application, the camera preview image is displayed full screen on the terminal screen as an example for description.
[0159] In some embodiments, the capture frame in the first display state is determined based on device parameters associated with the terminal. Exemplarily, the device parameters include camera parameters and image imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle, distortion, color aberration, and sharpness. The image imaging parameters are determined based on the image actually captured by the terminal. In some embodiments, as shown in FIG3 , device parameters for different devices are pre-collected and then categorized based on the device parameters, for example, into Class A, Class B, Class C, and Class D. Each category corresponds to its own capture frame parameter, which includes at least one of the display size, display position, and display format used to indicate the capture frame on the palmprint entry interface. The capture frame parameters are stored in server 120. In some embodiments, when starting palmprint capture, terminal 110 sends a request to server 120 to retrieve the capture frame parameters. Server 120 sends the corresponding capture frame parameters to terminal 110 based on the category to which terminal 110 belongs. Terminal 110 displays the capture frame in the first display state based on the received capture frame parameters.
[0160] Optionally, the display shape of the collection frame in the first display state is preset or dynamically changed. For example, at least two display shapes of the collection frame in the first display state are provided for selection, including at least two of circle, square, and trapezoid. If the preset display shape of the collection frame in the first display state is circle, the user can also choose to modify the display shape of the collection frame in the first display state to square. Optionally, the display size of the collection frame in the first display state is preset or dynamically changed. For example, the display size of the collection frame in the first display state is one-third of the terminal screen. Optionally, the display position of the collection frame in the first display state is preset or dynamically changed. For example, the collection frame in the first display state is displayed at the center of the terminal screen.
[0161] In some embodiments, the first display state is primarily used to distinguish it from the second display state, and the first display state and the second display state are different. Optionally, the first display state is a first color, such as black; the second display state is a second color, or a color other than the first color, such as green. Optionally, the first display state is a first display entity, such as a solid line; the second display state is a second display entity, or a display entity other than the first display entity, such as a dashed line.
[0162] Exemplarily, as shown in FIG2 , during the palm print collection process, a camera preview screen 11 and a collection frame 12 in a first display state are displayed.
[0163] Step 2040: In response to recognizing the palm area in the camera preview image, displaying a follow frame on the image area corresponding to the palm area;
[0164] In some embodiments, in response to recognizing a palm area in the camera preview image, a follow frame is displayed in the image area corresponding to the palm area. The follow frame follows the palm area. It should be understood that the follow frame is used to frame the palm area in the camera preview image, and the display shape, size, and position of the follow frame change with the palm area.
[0165] In some embodiments, the display state of the following frame is preset. Optionally, the display state of the following frame is a first display state, that is, the display state of the following frame is the same as the initial display state of the acquisition frame. Optionally, the display state of the following frame is a second display state, that is, the display state of the following frame is the same as the final display state of the acquisition frame. Optionally, the display state of the following frame is the same as the display state of the acquisition frame, that is, when the acquisition frame is in the first display state, the following frame is also the same as the first display state. When the relative position between the following frame and the acquisition frame in the first display state meets a matching condition, the first display state switches to the second display state. Optionally, the display state of the following frame is a third display state, that is, the display state of the following frame is different from the display state of the acquisition frame. For example, if the first display state of the acquisition frame is red and the second display state of the acquisition frame is green, the display state of the following frame is yellow.
[0166] In some embodiments, the display state of the follow-up frame changes dynamically. Optionally, the display state of the follow-up frame changes as the distance between the palm area and the camera changes. In some embodiments, the greater the distance between the palm area and the camera, the greater the difference between the display state of the follow-up frame and the display state of the acquisition frame; the smaller the distance between the palm area and the camera, the smaller the difference between the display state of the follow-up frame and the display state of the acquisition frame. For example, assuming that the first display state of the acquisition frame is red, when the palm area moves away from the camera from a position close to the camera, the display state of the follow-up frame changes from a color close to red to a color that is significantly different from red (such as yellow).
[0167] In some embodiments, the follow-up frame corresponds to a follow-up sound. It is understood that the follow-up sound and the follow-up frame exist synchronously, and the follow-up sound is played in conjunction with the display of the follow-up frame. Optionally, the follow-up sound is preset. For example, the follow-up sound corresponds to the display state of the follow-up frame. If the display state of the follow-up frame is fixed, the follow-up sound is also fixed. Optionally, there is a one-to-one correspondence between the follow-up sound and the follow-up frame.
[0168] In some embodiments, the follow-up sound changes dynamically. For example, the follow-up sound changes with changes in the follow-up frame. Optionally, the urgency of the follow-up sound changes with changes in the distance between the palm area and the camera. The urgency of the follow-up sound is negatively correlated with the distance between the palm area and the camera. When the palm area is close to the camera, the follow-up sound becomes more and more urgent; when the palm area is far away from the camera, the follow-up sound becomes more and more gentle. Optionally, the pitch of the follow-up sound changes with changes in the distance between the palm area and the camera. The pitch of the follow-up sound is negatively correlated with the distance between the palm area and the camera. When the palm area is close to the camera, the pitch of the follow-up sound is higher; when the palm area is far away from the camera, the pitch of the follow-up sound is lower.
[0169] In some embodiments, a special effects mask is displayed while displaying the follow frame. The special effects mask is attached to the palm area. The special effects mask is used to prompt the user that a follow frame is displayed, and can increase the fun of guiding the user through special effects. Optionally, the special effects mask is preset. For example, the special effects mask is a flower, which means "flowers blooming in the palm". Optionally, the special effects mask is dynamically changing. Optionally, the display effect of the special effects mask can change with the change of the distance between the palm area and the camera. For example, when the palm area is the palm area, the special effects mask is a flower. When the palm area is far away from the camera, the flower is displayed in a reduced size; when the palm area is close to the camera, the flower is displayed in an enlarged size.
[0170] In some embodiments, the following frame changes according to the posture of the palm area in real space. In some embodiments, the display shape of the following frame changes according to the plane where the palm area is located and the distance between the palm area and the camera.
[0171] In some embodiments, in response to recognizing a palm area in a camera preview image, a following frame is displayed in an image area corresponding to the palm area, using a first flatness as the flatness of the following frame; wherein the first flatness is associated with the angle between the plane in which the palm area resides and the plane in which the terminal screen resides. Optionally, the first flatness is positively correlated with the angle between the plane in which the palm area resides and the plane in which the terminal screen resides.
[0172] For example, if the angle between the plane of the palm area and the plane of the terminal screen is zero in real space, a standard tracking frame is displayed. The standard tracking frame is a circular frame. If the angle between the plane of the palm area and the plane of the terminal screen gradually increases, an elliptical frame is displayed. As the angle increases, the elliptical frame becomes flatter. If the angle between the plane of the body feature area and the plane of the terminal screen gradually decreases, the elliptical frame becomes closer to a circular frame.
[0173] In some embodiments, it can also be understood that the following frame is a projection of a feature frame for following the palm area in the camera preview image. The feature frame is on the plane where the palm area is located and is used to frame the palm area.
[0174] For example, as shown in FIG5 , assuming the terminal screen plane is the xoz plane, when the palm area's plane is parallel to the terminal screen's plane, following frame 13 is characteristic frame 15, and both following frame 13 and characteristic frame 15 are circular. When the palm area's plane intersects the terminal screen's plane, for example, as shown in FIG6 , when the palm area's plane is the xoz' plane, following frame 13 is the projection of characteristic frame 15 onto the terminal screen, and characteristic frame 15 is circular, resulting in following frame 13 being an elliptical projection of characteristic frame 15.
[0175] In some embodiments, the shape of the feature frame is the same as the shape of the collection frame in the first display state. For example, if the shape of the collection frame in the first display state is circular, the shape of the feature frame is also circular.
[0176] In some embodiments, in response to recognizing the palm area, a follow frame is displayed with a reference point on the screen area corresponding to the palm area as the center point of the follow frame. Optionally, the reference point is the center point on the screen area corresponding to the palm area.
[0177] In some embodiments, in response to recognizing a palm area on the camera preview screen, a follow-up frame is displayed on the screen area corresponding to the body feature area with a first size as the follow-up frame size. The first size is associated with the distance between the palm area and the camera. In some embodiments, the first size is negatively correlated with the distance between the palm area and the camera. Optionally, the farther the distance between the palm area and the camera, the smaller the first size; the closer the distance between the palm area and the camera, the larger the first size. For example, as shown in Figures 5 and 7, when the palm area moves from a position close to the camera to a position far from the camera, the size of the follow-up frame 13 also shrinks from one first size to another first size.
[0178] In some embodiments, in response to at least one of the palm area tilting, translating, or rotating in response to the palm, the display of the following frame is updated so that the center point of the following frame is consistent with the reference point on the screen area corresponding to the palm area. The center point of the updated following frame coincides with the reference point on the screen area corresponding to the palm area. Optionally, in response to the palm area tilting in response to the palm, the display of the following frame is updated. Optionally, in response to the palm area translating in response to the palm, the display of the following frame is updated. Optionally, in response to the palm area rotating in response to the palm, the display of the following frame is updated.
[0179] Optionally, the reference point is a designated point on the screen area corresponding to the palm area. For example, the reference point can be at least one of a center point, an upper edge point, a lower edge point, a left edge point, and a right edge point on the screen area corresponding to the palm area.
[0180] Step 2060: In response to the following frame and the collection frame in the first display state satisfying a matching condition, determining that the posture of the palm print area in the real space reaches the collection posture.
[0181] In this embodiment of the present application, a capture frame and a follow frame in the first display state are displayed on the camera preview screen. The follow frame changes as the posture of the user's palm print area in real space changes. During the dynamic change of the follow frame, if the follow frame matches the capture frame in the first display state, it is determined that the posture of the palm print area in real space has reached the capture posture. The capture posture refers to the required posture of the palm print area when collecting identity features of the palm print area. In this capture posture, the terminal device can collect high-quality, clear and complete identity features.
[0182] In some embodiments, in response to a matching condition being met between the following frame and the collection frame of the first display state, the collection frame of the first display state is switched to be displayed as a collection frame of the second display state, and the collection frame of the second display state is used to prompt that the posture of the palm print area in the real space reaches the collection posture; wherein, the first display state and the second display state are different.
[0183] The second display state capture frame refers to the result frame of the matching process. If the first display state capture frame and the follow-up frame meet the matching conditions, the first display state capture frame switches to the second display state capture frame. The first and second display states are different display states. The switch from the first display state capture frame to the second display state capture frame indicates that the current palm print area in real space has reached the capture posture. In other words, the current palm print area in real space has met the conditions. At this point, feature capture of the palm print area can be performed.
[0184] In some embodiments, the matching condition includes at least one of the following:
[0185] The shape of the follow frame is the same as the shape of the acquisition frame in the first display state;
[0186] The size of the follow frame is the same as the size of the acquisition frame in the first display state;
[0187] The ratio of the area of the following frame to the area of the acquisition frame in the first display state is greater than or equal to a ratio threshold;
[0188] The area of intersection between the following frame and the acquisition frame in the first display state is greater than or equal to the area threshold;
[0189] The distance between the center of the following frame and the center of the acquisition frame in the first display state is less than a distance threshold;
[0190] The difference between the radius of the following frame and the radius of the acquisition frame in the first display state is less than the length difference threshold;
[0191] The angle between the plane where the following frame is located and the plane where the acquisition frame in the first display state is located is less than the angle difference threshold.
[0192] In some embodiments, in response to the shape of the following frame being identical to the shape of the capture frame in the first display state, the capture frame in the first display state is switched to the capture frame in the second display state. Because the following frame is a projection of the feature frame on the camera preview screen, when the plane of the palm area is parallel to the plane of the terminal screen, the shape of the following frame and the shape of the capture frame in the first display state will be identical, and the capture frame in the first display state will be switched to the capture frame in the second display state.
[0193] In some embodiments, in response to the size of the following frame being the same as the size of the collection frame in the first display state, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. It should be understood that the size of the following frame here can be understood as the area size of the following frame, that is, in response to the area size of the following frame being the same as the area size of the collection frame in the first display state, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. Alternatively, the size of the following frame here can also be understood as the size when the shape of the following frame is the same as the shape of the collection frame in the first display state, that is, in response to the shape of the following frame being the same as the shape of the collection frame in the first display state, and the size of the following frame being the same as the size of the collection frame in the first display state, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state.
[0194] In some embodiments, in response to the ratio of the area of the following frame to the area of the collection frame in the first display state being greater than or equal to a ratio threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. It should be understood that the area of the collection frame in the first display state remains unchanged after the collection frame in the first display state is displayed. The area of the following frame changes as the following frame is updated. In some embodiments, the ratio threshold is preset or changes dynamically. For example, if the ratio threshold is four-fifths, then in response to the ratio of the area of the following frame to the area of the collection frame in the first display state being greater than or equal to four-fifths, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state.
[0195] In some embodiments, in response to the area of the intersection between the following frame and the collection frame in the first display state being greater than or equal to an area threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. In some embodiments, the area threshold is preset or dynamically changed. For example, the area threshold is 2 square centimeters. Exemplarily, as shown in FIG8 , in response to the area of the intersection area 16 between the following frame 13 and the collection frame 12 in the first display state being greater than or equal to 2 square centimeters, the collection frame 12 in the first display state is switched to be displayed as the collection frame in the second display state.
[0196] In some embodiments, in response to the distance between the center of the following frame and the center of the collection frame in the first display state being less than a distance threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. In some embodiments, the distance threshold is preset or dynamically changed. For example, the distance threshold is 2 centimeters. Exemplarily, as shown in FIG8 , in response to the distance 17 between the center of the following frame 13 and the center of the collection frame 12 in the first display state being less than 2 centimeters, the collection frame 12 in the first display state is switched to be displayed as the collection frame in the second display state.
[0197] In some embodiments, when the collection frame of the first display state is circular and the following frame is circular, in response to the difference between the radius of the following frame and the radius of the collection frame of the first display state being less than a length difference threshold, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state. In some embodiments, the length difference threshold is preset or dynamically changed. For example, if the length difference threshold is 1 cm, then in response to the difference between the radius of the following frame and the radius of the collection frame of the first display state being less than 1 cm, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state. It should be understood that when the collection frame of the first display state is circular and the following frame is circular, that is, the shape of the collection frame of the first display state is the same as the shape of the following frame, then the plane where the palm area is located is parallel to the plane where the terminal screen is located.
[0198] In some embodiments, in response to the angle between the plane where the palm area is located and the plane where the collection frame of the first display state is located being less than an angle difference threshold, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state. Alternatively, it can be understood that in response to the angle between the plane where the feature frame is located and the plane where the terminal screen is located being less than an angle difference threshold, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state. The following frame is the projection of the feature frame on the plane where the terminal screen is located. In some embodiments, the angle difference threshold is preset or changes dynamically. For example, if the angle difference threshold is 30 degrees, then in response to the angle between the plane where the palm area is located and the plane where the collection frame of the first display state is located being less than 30 degrees, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state.
[0199] In some embodiments, the matching condition may be a combination of n conditions, where n is an integer greater than 1. For example, the matching condition is that the shape of the following frame is the same as the shape of the collection frame in the first display state, and the ratio of the area of the following frame to the area of the collection frame in the first display state is greater than or equal to a ratio threshold. In response to the shape of the following frame being the same as the shape of the collection frame in the first display state, and the ratio of the area of the following frame to the area of the collection frame in the first display state being greater than or equal to the ratio threshold, the collection frame in the first display state is switched to the collection frame in the second display state.
[0200] In summary, the method provided in the embodiments of the present application provides a method for palm print collection. Because the following frame follows the posture changes of the palm area in real space, guiding the user to adjust the following frame can also guide the user to adjust the posture of the palm area. Furthermore, by guiding the user to adjust the following frame until it matches the collection frame in the first display state, the user can avoid blind adjustments, which is conducive to improving the efficiency of palm print collection.
[0201] The method provided in the embodiments of the present application further displays a following frame using a reference point on the screen area corresponding to the palm area as the center point of the following frame. This ensures that the following frame always changes based on changes in the palm area. This allows for timely adjustment of the following frame when the palm area dynamically changes. For example, when the palm area tilts, translates, or rotates with the palm, the following frame can be updated in a timely manner, thereby providing real-time guidance to the user.
[0202] The method provided in an embodiment of the present application further displays a follow frame with a first size as the follow frame size, so that the size of the follow frame is determined based on the distance between the palm area and the camera, thereby being able to dynamically adjust the size of the follow frame to ensure real-time guidance for the user.
[0203] The method provided in an embodiment of the present application further displays a following frame using a first flatness as the flatness of the following frame, such that the flatness of the following frame is determined based on the angle between the plane of the palm area and the plane of the terminal screen. This allows the flatness of the following frame to be dynamically adjusted to ensure real-time guidance for the user.
[0204] Before the above step 2040, the following steps are also included:
[0205] Step 3020: In response to identifying a detection object in the camera preview image, acquiring an image frame corresponding to the detection object;
[0206] The detection object may optionally be a skin area. In some embodiments, the detection object is a palm or is not a palm. Optionally, in response to recognizing a palm in the camera preview image, an image frame corresponding to the palm is acquired. Alternatively, in response to recognizing an object other than a palm in the camera preview image, an image frame corresponding to the recognized object is acquired.
[0207] In some embodiments, the image frame is a preprocessed image frame. Optionally, the preprocessing step includes at least one of color space conversion, binarization, filtering, and edge detection. In some embodiments, the image frame is an unpreprocessed image frame. The preprocessing operation is used to help reduce noise and background interference in the image frame, thereby facilitating highlighting features in the image frame.
[0208] In some embodiments, based on the acquired image frame, determining whether the detected object is a palm. Exemplarily, the above method further includes the following steps:
[0209] Step 3031: extracting the skin area in the image frame and extracting the contour of the skin area;
[0210] In some embodiments, skin regions in an image frame are extracted based on a color threshold. Optionally, the image frame is converted from a first color space to a second color space, where the color information in the first color space and the second color space is different. Exemplarily, the first color space is a red, green, and blue (RGB) color space, and the second color space is a hue, saturation, and value (HSV) color space.
[0211] Optionally, the color threshold is preset. The color threshold is used to distinguish between skin areas and non-skin areas in an image frame. In some embodiments, when the color difference between the skin area and the non-skin area in the image frame is significant, the skin area in the image frame is directly extracted. In some embodiments, when the color difference between the skin area and the non-skin area in the image frame is not significant, the image frame is converted from a first color space to a second color space to highlight the color difference between the skin area and the non-skin area in the image frame, thereby extracting the skin area from the image frame.
[0212] In some embodiments, the contour of the skin area is extracted using an edge detection algorithm. Alternatively, the contour of the skin area is extracted using a Canny algorithm. Alternatively, the contour of the skin area is extracted using a Sobel algorithm. In some embodiments, the Canny algorithm is a standard algorithm widely used for edge detection, whose goal is to find an optimal edge detection solution or the location with the strongest grayscale intensity change in an image. Optimal edge detection is primarily evaluated based on three criteria: low error rate, high localization, and minimum response. In some embodiments, the Sobel algorithm is primarily used for edge detection, technically using a set of discrete difference operators to calculate an approximate grayscale value of the image brightness function.
[0213] In some embodiments, whether the detected object is a palm is determined based on the contour of the skin area.
[0214] Step 3032: If the contour of the skin area corresponds to the contour of the palm, determining that the detection object is the palm;
[0215] In some embodiments, the contour of the skin area is compared with the contour of the palm. If the contour of the skin area corresponds to the contour of the palm, it is determined that the detected object is the palm; if the contour of the skin area does not correspond to the contour of the palm, it is determined that the detected object is not the palm.
[0216] In some embodiments, the palm contour corresponds to features such as shape, area, and perimeter. Optionally, the shape of the skin area contour is compared with the shape of the palm contour to determine whether the detected object is a palm. Optionally, there is a correspondence between the features of the palm contour. For example, if the area corresponding to the palm contour is 10 square centimeters, the corresponding perimeter is 15 centimeters; if the area corresponding to the palm contour is 20 square centimeters, the corresponding perimeter is 30 centimeters.
[0217] In some embodiments, if the detected object is determined to be a palm, the following step 3040 is continued to be executed. If the detected object is determined not to be a palm, the above steps are repeated until the detected object is determined to be a palm.
[0218] Step 3040: When it is determined that the detected object is a palm, extract palm feature points from the image frame, and determine the palm center area based on the palm feature points.
[0219] In some embodiments, when the detected object is determined to be a palm, palm feature points are extracted from the image frame. Optionally, the palm feature points include palm convex points and palm concave points.
[0220] In some embodiments, the palm convex point refers to a feature point corresponding to a relatively convex position in the palm, such as a fingertip position. The palm concave point refers to a feature point corresponding to a relatively concave position in the palm, such as a finger joint position. Optionally, taking the palm as an example, the position of the palm convex point includes the fingertip position, the center position of the finger joint, the center position of the finger root connection, etc., and the position of the palm concave point includes the finger joint position, the finger root position, and the center position of the palm.
[0221] In some embodiments, a palm region is determined based on palm feature points. The palm region is the area of the palm excluding the fingers, or, understandably, the area including the palm print. Optionally, a boundary line between the fingers and the palm region is determined based on the palm feature points. The palm region is determined based on the boundary line and the palm contour.
[0222] In summary, the method provided in the embodiment of the present application accurately captures palm prints by, in response to identifying a detection object in a camera preview image, acquiring an image frame corresponding to the detection object; extracting the skin area and the contour corresponding to the skin area in the image frame, and determining whether the detection object is a palm. In the case where the detection object is not a palm, repeated recognition is required rather than performing an ineffective operation of extracting palm feature points. This can reduce ineffective operations when the detection object is not a palm and is conducive to improving the accuracy of palm print capture.
[0223] In some embodiments, during the palm print collection process, the terminal will prompt the user through at least one prompt message. Optionally, the prompt message includes at least one of the following:
[0224] First prompt information;
[0225] Second prompt information;
[0226] ·The third prompt information.
[0227] In some embodiments, the first prompt information is used to prompt the user to adjust the position of the palm. Exemplarily, the above method further includes the following steps:
[0228] Step 4020: When it is determined that the detected object is a palm and the palm outline is incomplete, a first prompt message is displayed.
[0229] It is worth noting that step 4020 is executed after step 3032. Specifically, if the detected object is determined to be a palm, the palm contour is analyzed to determine whether it is complete. Alternatively, the ratio of the palm contour's area to its perimeter can be calculated to determine whether the palm contour has any interruptions. For example, if the palm contour is uninterrupted, the ratio of the palm contour's area to its perimeter is 1:1.5; if the calculated ratio of the palm contour's area to its perimeter is 1:1, then the palm contour can be determined to have any interruptions.
[0230] In some embodiments, if the palm outline is incomplete, the palm area may not be accurately recognized. For example, if the palm outline only includes the finger outlines, the palm area cannot be recognized. Therefore, if the detected object is determined to be a palm and the palm outline is incomplete, a first prompt message is displayed. The first prompt message reminds the user to adjust the position of the palm so that the complete palm outline can be recognized, thereby ensuring accurate recognition of the palm area.
[0231] Exemplarily, as shown in FIG12 , when it is determined that the detected object is a palm and the palm contour is incomplete, a first prompt message 18 is displayed. The first prompt message 18 is used to prompt the user that “the palm is incomplete”.
[0232] In some embodiments, the second prompt information is used to prompt the user to change the detection object. Exemplarily, the above method further includes the following steps:
[0233] Step 5020: When it is determined that the detected object is not a palm, a second prompt message is displayed.
[0234] In some embodiments, after step 3031, if it is determined that the detected object is not a palm, the second prompt information is displayed. Alternatively, in response to the detected object being identified as a target object, and the target object is not a palm, the second prompt information is displayed.
[0235] Exemplarily, as shown in FIG14 , when it is determined that the detected object is not a palm, a second prompt message 19 is displayed, and the second prompt message 19 is used to prompt the user that “the palm cannot be recognized”.
[0236] Optionally, when it is repeatedly determined that the detection object is not a palm, the second prompt information is repeatedly displayed until the user changes the detection object to a palm.
[0237] In some embodiments, the third prompt information is used to prompt the user to adjust the light in the image frame. Exemplarily, the above method further includes the following steps:
[0238] Step 6020: extracting light features in the image frame;
[0239] In some embodiments, after step 3020, more specifically after acquiring an image frame of the detection object, light features in the image frame are extracted. In some embodiments, the light features include brightness and color. Optionally, the brightness of the light in the image frame is extracted. Optionally, the color of the light in the image frame is extracted.
[0240] Step 6040: When the light feature does not meet the light feature threshold, display a third prompt message.
[0241] In some embodiments, the extracted light features are compared with a light feature threshold. If the light features indicate that the light in the image frame meets the light feature threshold, the light in the image frame is determined to meet the condition, and step 3031 is continued. If the light features indicate that the light in the image frame does not meet the light feature threshold, the light in the image frame is determined to not meet the condition, and a third prompt message is displayed. Optionally, the light feature threshold is preset or dynamically adjusted. The third prompt message is used to prompt the user to adjust the light in the image frame.
[0242] Exemplarily, as shown in FIG16 , when the light feature in the image frame does not meet the light feature threshold, or when the light in the acquired acquisition image 51 is less or dimmer, a third prompt message 50 is displayed. The third prompt message 50 is used to prompt the user that “the light is dark”, or to prompt the user to adjust the light in the current acquisition environment.
[0243] The method provided in the embodiment of the present application prompts the user by displaying at least one prompt message, so that during the palm print collection process, the user can be reminded to make adjustments in a timely manner according to various situations, thereby ensuring that the palm print collection process can be smoother.
[0244] In some embodiments, taking the facial collection process as an example, the method includes the following steps:
[0245] Step 20020: During the facial feature acquisition process, display the camera preview image and the acquisition frame in the first display state;
[0246] In some embodiments, in response to a trigger operation on the facial feature collection client, a camera preview image and a collection frame in a first display state are displayed. The trigger operation includes at least one of a single click, a double click, a left-right swipe, an up-down swipe, a long press, a hover, facial recognition, and voice recognition. It is worth noting that the trigger operations include but are not limited to the ones mentioned above. Those skilled in the art should be aware that any operation that can achieve the above functions falls within the scope of protection of the embodiments of this application.
[0247] In some embodiments, the camera preview screen and the capture frame in the first display state are displayed simultaneously. In some embodiments, the camera preview screen and the capture frame in the first display state are not displayed simultaneously. Optionally, the capture frame in the first display state is displayed after the camera preview screen is displayed. For example, the camera preview screen is displayed first, and the capture frame in the first display state is displayed after the detection object is identified. Optionally, the camera preview screen is displayed after the capture frame in the first display state is displayed.
[0248] In some embodiments, the camera preview image is a real-time image captured by the camera. Optionally, the camera preview image is displayed full screen on the terminal screen. Optionally, the camera preview image is displayed within a target area on the terminal screen. The target area is preset or dynamically changes. For example, the target area is the middle third of the terminal screen. In the embodiments of the present application, the camera preview image is displayed full screen on the terminal screen as an example for description.
[0249] In some embodiments, the capture frame in the first display state is determined based on device parameters associated with the terminal. Exemplarily, the device parameters include camera parameters and image imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle, distortion, color aberration, and sharpness. The image imaging parameters are determined based on the image actually captured by the terminal. In some embodiments, as shown in FIG3 , device parameters for different devices are pre-collected and then categorized based on the device parameters, for example, into categories A, B, C, and D. Each category corresponds to its own capture frame parameter, which includes at least one of the display size, display position, and display format used to indicate the capture frame on the facial feature entry interface. The capture frame parameters are stored in server 120. In some embodiments, when terminal 110 begins facial feature acquisition, it sends a request to server 120 to retrieve the capture frame parameters. Server 120 sends the corresponding capture frame parameters to terminal 110 based on the category to which terminal 110 belongs. Terminal 110 displays the capture frame in the first display state based on the received capture frame parameters.
[0250] Optionally, the display shape of the collection frame in the first display state is preset or dynamically changed. For example, at least two display shapes of the collection frame in the first display state are provided for selection, including at least two of circle, square, and trapezoid. If the preset display shape of the collection frame in the first display state is circle, the user can also choose to modify the display shape of the collection frame in the first display state to square. Optionally, the display size of the collection frame in the first display state is preset or dynamically changed. For example, the display size of the collection frame in the first display state is one-third of the terminal screen. Optionally, the display position of the collection frame in the first display state is preset or dynamically changed. For example, the collection frame in the first display state is displayed at the center of the terminal screen.
[0251] In some embodiments, the first display state is primarily used to distinguish it from the second display state, and the first display state and the second display state are different. Optionally, the first display state is a first color, such as black; the second display state is a second color, or a color other than the first color, such as green. Optionally, the first display state is a first display entity, such as a solid line; the second display state is a second display entity, or a display entity other than the first display entity, such as a dashed line.
[0252] Exemplarily, as shown in FIG2 , during the facial feature acquisition process, a camera preview screen 11 and an acquisition frame 12 in a first display state are displayed.
[0253] Step 20040: In response to recognizing a facial region in the camera preview image, displaying a follow-up frame on an image area corresponding to the facial region;
[0254] In some embodiments, in response to recognizing a facial region in the camera preview image, a follow frame is displayed in the image area corresponding to the facial region. The follow frame follows the facial region. It should be understood that the follow frame is used to frame the facial region in the camera preview image, and the display shape, size, and position of the follow frame change with the facial region.
[0255] In some embodiments, the display state of the following frame is preset. Optionally, the display state of the following frame is a first display state, that is, the display state of the following frame is the same as the initial display state of the acquisition frame. Optionally, the display state of the following frame is a second display state, that is, the display state of the following frame is the same as the final display state of the acquisition frame. Optionally, the display state of the following frame is the same as the display state of the acquisition frame, that is, when the acquisition frame is in the first display state, the following frame is also the same as the first display state. When the relative position between the following frame and the acquisition frame in the first display state meets a matching condition, the first display state switches to the second display state. Optionally, the display state of the following frame is a third display state, that is, the display state of the following frame is different from the display state of the acquisition frame. For example, if the first display state of the acquisition frame is red and the second display state of the acquisition frame is green, the display state of the following frame is yellow.
[0256] In some embodiments, the display state of the following frame changes dynamically. Optionally, the display state of the following frame changes as the distance between the facial area and the camera changes. In some embodiments, the greater the distance between the facial area and the camera, the greater the difference between the display state of the following frame and the display state of the acquisition frame; the smaller the distance between the facial area and the camera, the smaller the difference between the display state of the following frame and the display state of the acquisition frame. For example, assuming that the first display state of the acquisition frame is red, when the facial area moves away from the camera from a position close to the camera, the display state of the following frame changes from a color close to red to a color that is significantly different from red (such as yellow).
[0257] In some embodiments, the follow-up frame corresponds to a follow-up sound. It is understood that the follow-up sound and the follow-up frame exist synchronously, and the follow-up sound is played in conjunction with the display of the follow-up frame. Optionally, the follow-up sound is preset. For example, the follow-up sound corresponds to the display state of the follow-up frame. If the display state of the follow-up frame is fixed, the follow-up sound is also fixed. Optionally, there is a one-to-one correspondence between the follow-up sound and the follow-up frame.
[0258] In some embodiments, the follow-up sound changes dynamically. For example, the follow-up sound changes with changes in the follow-up frame. Optionally, the urgency of the follow-up sound changes with changes in the distance between the facial area and the camera. The urgency of the follow-up sound is negatively correlated with the distance between the facial area and the camera. When the facial area is close to the camera, the follow-up sound becomes more urgent; when the facial area is far away from the camera, the follow-up sound becomes more gentle. Optionally, the pitch of the follow-up sound changes with changes in the distance between the facial area and the camera. The pitch of the follow-up sound is negatively correlated with the distance between the facial area and the camera. When the facial area is close to the camera, the pitch of the follow-up sound is higher; when the facial area is far away from the camera, the pitch of the follow-up sound is lower.
[0259] In some embodiments, a special effects mask is displayed while displaying the follow frame. The special effects mask is attached to the facial area. The special effects mask is used to prompt the user that a follow frame is displayed, and can increase the fun of guiding the user through special effects. Optionally, the special effects mask is preset. For example, the feature mask is a facial expression package. Optionally, the special effects mask is dynamically changing. Optionally, the display effect of the special effects mask can change with the change in the distance between the facial area and the camera. For example, the special effects mask is a facial expression package. When the facial area is far away from the camera, the facial expression package is displayed in a reduced size; when the facial area is close to the camera, the facial expression package is displayed in an enlarged size.
[0260] In some embodiments, the following frame changes as the posture of the facial region in real space changes. In some embodiments, the display shape of the following frame changes as the plane where the facial region is located and the distance between the facial region and the camera.
[0261] In some embodiments, in response to recognizing a facial region in a camera preview image, a following frame is displayed in an image region corresponding to the facial region, using a first flattening degree as the flattening degree of the following frame; wherein the first flattening degree is associated with an angle between a plane containing the facial region and a plane containing the terminal screen. Optionally, the first flattening degree is positively correlated with the angle between the plane containing the facial region and the plane containing the terminal screen.
[0262] Illustratively, if the angle between the plane of the facial region and the plane of the terminal screen is zero in real space, a standard follow-up frame is displayed. The standard follow-up frame is a circular frame. If the angle between the plane of the facial region and the plane of the terminal screen gradually increases, an elliptical frame is displayed. As the angle gradually increases, the elliptical frame becomes flatter. If the angle between the plane of the facial region and the plane of the terminal screen gradually decreases, the elliptical frame becomes closer to a circular frame. In some embodiments, it can also be understood that the follow-up frame is a projection of a feature frame for following the facial region in the camera preview image. The feature frame is used to frame the facial region on the plane where the facial region is located.
[0263] In some embodiments, the shape of the feature frame is the same as the shape of the collection frame in the first display state. For example, if the shape of the collection frame in the first display state is circular, the shape of the feature frame is also circular.
[0264] In some embodiments, in response to recognizing a facial region, a following frame is displayed with a reference point on the image region corresponding to the facial region as the center point of the following frame. Optionally, the reference point is the center point of the facial region, such as the center point of the facial region.
[0265] In some embodiments, in response to recognizing a facial region on the camera preview screen, a follow-up frame 13 is displayed in the screen area corresponding to the body feature region, using a first size as the follow-up frame size. The first size is associated with the distance between the facial region and the camera. In some embodiments, the first size is negatively correlated with the distance between the facial region and the camera. Optionally, the farther the distance between the facial region and the camera, the smaller the first size; and the closer the distance between the facial region and the camera, the larger the first size. For example, as shown in Figures 5 and 7, when the facial region moves from a position close to the camera to a position far from the camera, the size of the follow-up frame 13 also decreases from one first size to another first size.
[0266] In some embodiments, in response to at least one of a tilt, translation, or rotation of the facial region following the head, the display of the following frame is updated so that a center point of the following frame is consistent with a reference point on the image area corresponding to the facial region. The center point of the updated following frame coincides with the reference point on the image area corresponding to the facial region. Optionally, in response to a tilt of the facial region following the head, the display of the following frame is updated. Optionally, in response to a translation of the facial region following the head, the display of the following frame is updated. Optionally, in response to a rotation of the facial region following the head, the display of the following frame is updated.
[0267] Optionally, the reference point is a designated point on the image area corresponding to the facial area. Optionally, the reference point may be at least one of a center point, an upper edge point, a lower edge point, a left edge point, and a right edge point on the image area corresponding to the facial area.
[0268] Step 20060: In response to a matching condition being satisfied between the following frame and the acquisition frame of the first display state, determining that the posture of the facial region in the real space reaches the acquisition posture.
[0269] In this embodiment of the present application, a capture frame and a follow frame in a first display state are displayed on the camera preview screen. The follow frame changes as the posture of the user's facial region in real space changes. During the dynamic change of the follow frame, if the follow frame matches the capture frame in the first display state, it is determined that the posture of the facial region in real space has reached the capture posture. The capture posture refers to the posture of the facial region required when collecting the identity features of the facial region. In this capture posture, the terminal device can collect high-quality, clear and complete identity features.
[0270] In some embodiments, in response to a matching condition being met between the following frame and the collection frame of the first display state, the collection frame of the first display state is switched to be displayed as a collection frame of the second display state, and the collection frame of the second display state is used to prompt that the posture of the facial area in the real space reaches the collection posture; wherein, the first display state and the second display state are different.
[0271] The second display state capture frame refers to the result frame of the matching process. If the capture frame in the first display state meets the matching conditions with the follower frame, the capture frame in the first display state switches to the capture frame in the second display state. The first and second display states are different display states. The switch from the first display state capture frame to the second display state indicates that the pose of the current facial region in real space has reached the capture pose. In other words, the pose of the current facial region in real space meets the conditions, and feature capture of the facial region can now be performed.
[0272] In some embodiments, the matching condition includes at least one of the following:
[0273] The shape of the follow frame is the same as the shape of the acquisition frame in the first display state;
[0274] The size of the follow frame is the same as the size of the acquisition frame in the first display state;
[0275] The ratio of the area of the following frame to the area of the acquisition frame in the first display state is greater than or equal to a ratio threshold;
[0276] The intersection area between the following frame and the acquisition frame in the first display state is greater than or equal to the area threshold;
[0277] The distance between the center of the following frame and the center of the acquisition frame in the first display state is less than a distance threshold;
[0278] The difference between the radius of the following frame and the radius of the acquisition frame in the first display state is less than the length difference threshold;
[0279] The angle between the plane where the following frame is located and the plane where the acquisition frame in the first display state is located is less than the angle difference threshold.
[0280] In some embodiments, in response to the shape of the following frame being identical to the shape of the capture frame in the first display state, the capture frame in the first display state is switched to the capture frame in the second display state. Because the following frame is a projection of the feature frame on the camera preview screen, when the plane of the facial region is parallel to the plane of the terminal screen, the shape of the following frame and the shape of the capture frame in the first display state will be identical, and in this case, the capture frame in the first display state is switched to the capture frame in the second display state.
[0281] In some embodiments, in response to the size of the following frame being the same as the size of the collection frame in the first display state, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. It should be understood that the size of the following frame here can be understood as the area size of the following frame, that is, in response to the area size of the following frame being the same as the area size of the collection frame in the first display state, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. Alternatively, the size of the following frame here can also be understood as the size when the shape of the following frame is the same as the shape of the collection frame in the first display state, that is, in response to the shape of the following frame being the same as the shape of the collection frame in the first display state, and the size of the following frame being the same as the size of the collection frame in the first display state, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state.
[0282] In some embodiments, in response to the ratio of the area of the following frame to the area of the collection frame in the first display state being greater than or equal to a ratio threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. It should be understood that the area of the collection frame in the first display state remains unchanged after the collection frame in the first display state is displayed. The area of the following frame changes as the following frame is updated. In some embodiments, the ratio threshold is preset or changes dynamically. For example, if the ratio threshold is four-fifths, then in response to the ratio of the area of the following frame to the area of the collection frame in the first display state being greater than or equal to four-fifths, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state.
[0283] In some embodiments, in response to the area of the intersection between the following frame and the collection frame in the first display state being greater than or equal to an area threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. In some embodiments, the area threshold is preset or dynamically changed. For example, the area threshold is 2 square centimeters. Exemplarily, as shown in FIG8 , in response to the area of the intersection area 16 between the following frame 13 and the collection frame 12 in the first display state being greater than or equal to 2 square centimeters, the collection frame 12 in the first display state is switched to be displayed as the collection frame in the second display state.
[0284] In some embodiments, in response to the distance between the center of the following frame and the center of the collection frame in the first display state being less than a distance threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. In some embodiments, the distance threshold is preset or dynamically changed. For example, the distance threshold is 2 centimeters. Exemplarily, as shown in FIG8 , in response to the distance 17 between the center of the following frame 13 and the center of the collection frame 12 in the first display state being less than 2 centimeters, the collection frame 12 in the first display state is switched to be displayed as the collection frame in the second display state.
[0285] In some embodiments, when the collection frame in the first display state is circular and the following frame is circular, in response to the difference between the radius of the following frame and the radius of the collection frame in the first display state being less than a length difference threshold, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. In some embodiments, the length difference threshold is preset or dynamically changed. For example, if the length difference threshold is 1 cm, then in response to the difference between the radius of the following frame and the radius of the collection frame in the first display state being less than 1 cm, the collection frame in the first display state is switched to be displayed as the collection frame in the second display state. It should be understood that when the collection frame in the first display state is circular and the following frame is circular, that is, the shape of the collection frame in the first display state is the same as the shape of the following frame, then the plane where the facial area is located is parallel to the plane where the terminal screen is located.
[0286] In some embodiments, in response to the angle between the plane where the facial area is located and the plane where the collection frame of the first display state is located being less than an angle difference threshold, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state. Alternatively, it can be understood that in response to the angle between the plane where the feature frame is located and the plane where the terminal screen is located being less than an angle difference threshold, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state. The following frame is the projection of the feature frame on the plane where the terminal screen is located. In some embodiments, the angle difference threshold is preset or changes dynamically. For example, if the angle difference threshold is 30 degrees, then in response to the angle between the plane where the facial area is located and the plane where the collection frame of the first display state is located being less than 30 degrees, the collection frame of the first display state is switched to be displayed as the collection frame of the second display state.
[0287] In some embodiments, the matching condition may be a combination of n conditions, where n is an integer greater than 1. For example, the matching condition is that the shape of the following frame is the same as the shape of the collection frame in the first display state, and the ratio of the area of the following frame to the area of the collection frame in the first display state is greater than or equal to a ratio threshold. In response to the shape of the following frame being the same as the shape of the collection frame in the first display state, and the ratio of the area of the following frame to the area of the collection frame in the first display state being greater than or equal to the ratio threshold, the collection frame in the first display state is switched to the collection frame in the second display state.
[0288] In summary, the method provided by the embodiments of the present application provides a method for capturing facial features. Because the display position of the following frame changes with the posture of the facial region in real space, guiding the user to adjust the following frame can also guide the user to adjust the posture of the facial region. Furthermore, by guiding the user to adjust the following frame to a matching position relative to the capture frame in the first display state, the user can avoid blind adjustments, thereby improving the efficiency of facial feature capture.
[0289] The method provided in an embodiment of the present application further displays a following frame using a reference point on the image area corresponding to the facial area as the center point of the following frame, so that the following frame always changes based on changes in the facial area. This allows the following frame to be adjusted in a timely manner when the facial area changes dynamically. For example, when the facial area tilts, translates, or rotates with the head, the following frame can be updated in a timely manner, thereby providing real-time guidance to the user.
[0290] The method provided in an embodiment of the present application further displays the following frame with a first size as the following frame size, so that the size of the following frame is determined based on the distance between the facial area and the camera, thereby being able to dynamically adjust the size of the following frame to ensure real-time guidance for the user.
[0291] The method provided in an embodiment of the present application further displays a following frame using a first flatness as the flatness of the following frame, so that the flatness of the following frame is determined based on the angle between the plane where the facial area is located and the plane where the terminal screen is located, thereby being able to dynamically adjust the flatness of the following frame to ensure real-time guidance for the user.
[0292] Before the above step 20040, the following steps are also included:
[0293] Step 30020: In response to identifying a detection object in the camera preview image, acquiring an image frame corresponding to the detection object;
[0294] The detection object is optionally a skin area. In some embodiments, the detection object is a head or is not a head. Optionally, in response to recognizing a head in the camera preview image, an image frame corresponding to the head is acquired. Alternatively, in response to recognizing an object other than a head in the camera preview image, an image frame corresponding to the recognized object is acquired.
[0295] In some embodiments, the image frame is a preprocessed image frame. Optionally, the preprocessing step includes at least one of color space conversion, binarization, filtering, and edge detection. In some embodiments, the image frame is an unpreprocessed image frame. The preprocessing operation is used to help reduce noise and background interference in the image frame, thereby facilitating highlighting features in the image frame.
[0296] In some embodiments, based on the acquired image frame, it is determined whether the detected object is a head. Exemplarily, the above method further includes the following steps:
[0297] Step 30031: extracting the skin area in the image frame and extracting the contour of the skin area;
[0298] In some embodiments, skin regions in an image frame are extracted based on a color threshold. Optionally, the image frame is converted from a first color space to a second color space, where the color information in the first color space and the second color space is different. Exemplarily, the first color space is a red, green, and blue (RGB) color space, and the second color space is a hue, saturation, and value (HSV) color space.
[0299] Optionally, the color threshold is preset. The color threshold is used to distinguish between skin areas and non-skin areas in an image frame. In some embodiments, when the color difference between the skin area and the non-skin area in the image frame is significant, the skin area in the image frame is directly extracted. In some embodiments, when the color difference between the skin area and the non-skin area in the image frame is not significant, the image frame is converted from a first color space to a second color space to highlight the color difference between the skin area and the non-skin area in the image frame, thereby extracting the skin area from the image frame.
[0300] In some embodiments, the contour of the skin area is extracted using an edge detection algorithm. Alternatively, the contour of the skin area is extracted using a Canny algorithm. Alternatively, the contour of the skin area is extracted using a Sobel algorithm. In some embodiments, the Canny algorithm is a standard algorithm widely used for edge detection, whose goal is to find an optimal edge detection solution or the location with the strongest grayscale intensity change in an image. Optimal edge detection is primarily evaluated based on three criteria: low error rate, high localization, and minimum response. In some embodiments, the Sobel algorithm is primarily used for edge detection, technically using a set of discrete difference operators to calculate an approximate grayscale value of the image brightness function.
[0301] In some embodiments, whether the detected object is a head is determined based on the contour of the skin area.
[0302] Step 30032: When the contour of the skin area corresponds to the contour of the head, determining that the detection object is the head;
[0303] In some embodiments, the outline of the skin area is compared with the head outline. If the outline of the skin area corresponds to the head outline, it is determined that the detection object is the head; if the outline of the skin area does not correspond to the head outline, it is determined that the detection object is not the head.
[0304] In some embodiments, the head contour corresponds to features such as shape, area, and perimeter. Optionally, the shape of the skin region's contour is compared with the shape of the head contour to determine whether the detected object is a head. Optionally, there is a correspondence between the features of the head contour. For example, if the area corresponding to the head contour is 10 square centimeters, the corresponding perimeter is 15 centimeters; if the area corresponding to the head contour is 20 square centimeters, the corresponding perimeter is 30 centimeters.
[0305] In some embodiments, if it is determined that the detection object is a head, the following step 30040 is continued to be executed. If it is determined that the detection object is not a head, the above steps are repeated until it is determined that the detection object is a head.
[0306] Step 30040: When it is determined that the detection object is a head, extract head feature points from the image frame, and determine the facial area based on the head feature points.
[0307] In some embodiments, when it is determined that the detected object is a head, head feature points are extracted from the image frame. Optionally, the head feature points include head convex hull points and head concave points.
[0308] In some embodiments, the convex hull point of the head refers to a feature point corresponding to a relatively convex position on the head, such as the position of a fingertip. The concave point of the head refers to a feature point corresponding to a relatively concave position on the head, such as the position of a finger joint. Optionally, taking the head as an example, the position of the convex hull point of the head includes the position of the fingertip, the center position of the finger joint, the center position of the connection between the root of the finger, etc., and the position of the concave point of the head includes the position of the finger joint, the base of the finger, and the center position of the palm.
[0309] In some embodiments, a facial region is determined based on head feature points. This facial region is the area of the head excluding the fingers, or, as can be understood, the facial region is the area including the facial features. Optionally, a boundary line between the fingers and the facial region is determined based on the head feature points. The facial region is determined based on this boundary line and the head outline.
[0310] In summary, the method provided in the embodiment of the present application, in response to identifying the detection object in the camera preview screen, obtains the image frame corresponding to the detection object; extracts the skin area in the image frame and the contour corresponding to the skin area, and determines whether the detection object is a head, thereby realizing that the method provided in the embodiment of the present application can accurately capture facial features. In the case where the detection object is not a head, repeated recognition is required instead of performing an invalid operation of extracting head feature points. This can reduce invalid operations when the detection object is not a head, which is conducive to improving the accuracy of facial feature capture.
[0311] In some embodiments, during the facial feature collection process, the terminal prompts the user through at least one prompt message. Optionally, the prompt message includes at least one of the following:
[0312] First prompt information;
[0313] Second prompt information;
[0314] ·The third prompt information.
[0315] In some embodiments, the first prompt information is used to prompt the user to adjust the position of the head. Exemplarily, the above method further includes the following steps:
[0316] Step 40020: When it is determined that the detection object is a head and the head outline is incomplete, a first prompt message is displayed.
[0317] It is worth noting that step 40020 is executed after step 30032. Specifically, if the detected object is determined to be a head, the head contour is analyzed to determine whether it is complete. Alternatively, the head contour can be determined to have interruptions by calculating the ratio of its area to perimeter. For example, if the head contour is uninterrupted and the ratio of its area to perimeter is 1:1.5, then if the calculated ratio is 1:1, the head contour can be determined to have interruptions.
[0318] In some embodiments, if the head outline is incomplete, the facial region may not be accurately recognized. For example, if the head outline only includes the outlines of fingers, the facial region cannot be recognized. Therefore, if it is determined that the detected object is a head and the head outline is incomplete, a first prompt message is displayed. This first prompt message reminds the user to adjust the position of the head so that the complete head outline can be recognized, thereby ensuring accurate recognition of the facial region.
[0319] Exemplarily, as shown in FIG12 , when it is determined that the detected object is a head and the head outline is incomplete, a first prompt message 18 is displayed. The first prompt message 18 is used to prompt the user that “the head is incomplete”.
[0320] In some embodiments, the second prompt information is used to prompt the user to change the detection object. Exemplarily, the above method further includes the following steps:
[0321] Step 50020: When it is determined that the detected object is not a head, a second prompt message is displayed.
[0322] In some embodiments, after step 30031, if it is determined that the detected object is not a head, the second prompt information is displayed. Alternatively, in response to the detected object being identified as a target object, the second prompt information is displayed if the target object is not a head.
[0323] Exemplarily, as shown in FIG14 , when it is determined that the detected object is not a head, a second prompt message 19 is displayed, and the second prompt message 19 is used to prompt the user that “the head cannot be recognized”.
[0324] Optionally, when it is repeatedly determined that the detection object is not the head, the second prompt information is repeatedly displayed until the user changes the detection object to the head.
[0325] In some embodiments, the third prompt information is used to prompt the user to adjust the light of the image frame. Exemplarily, the above method further includes the following steps:
[0326] Step 60020: extracting light features in the image frame;
[0327] In some embodiments, after step 30020, more specifically after acquiring an image frame of the detection object, light features in the image frame are extracted. In some embodiments, the light features include brightness and color. Optionally, the brightness of the light in the image frame is extracted. Optionally, the color of the light in the image frame is extracted.
[0328] Step 60040: When the light feature does not meet the light feature threshold, a third prompt message is displayed.
[0329] In some embodiments, the extracted light features are compared with a light feature threshold. If the light features meet the light feature threshold, it is determined that the light in the image frame meets the condition, and step 30031 is continued. If the light features do not meet the light feature threshold, it is determined that the light in the image frame does not meet the condition, and a third prompt message is displayed. Optionally, the light feature threshold is preset or dynamically adjusted. The third prompt message is used to prompt the user to adjust the light in the image frame.
[0330] Exemplarily, as shown in FIG16 , when the light feature in the image frame does not meet the light feature threshold, or when the light in the acquired acquisition image 51 is less or dimmer, a third prompt message 50 is displayed. The third prompt message 50 is used to prompt the user that “the light is dark”, or to prompt the user to adjust the light in the current acquisition environment.
[0331] The method provided in the embodiment of the present application prompts the user by displaying at least one prompt message, so that during the process of facial feature collection, the user can be reminded to make adjustments in a timely manner according to various situations, thereby ensuring that the process of facial feature collection can be smoother.
[0332] In an embodiment of the present application, a method for determining a collection posture is provided, which can intuitively and efficiently guide the user to enter a first body part, and see the current state of the first body part and the optimal entry posture and distance in real time, thereby improving the success rate of entry. Specifically, as shown in FIG17 , the method includes the following steps:
[0333] Step 20: The user enters the online collection process;
[0334] The user clicks or long presses to open the identity feature collection client to start identity feature collection.
[0335] Step 21: The terminal pulls the collection frame parameters from the server;
[0336] The collection frame parameters include at least one of a display size, a display position, and a display form for indicating that the collection frame is displayed on the identity feature entry interface.
[0337] Step 22: The user reads and agrees to the service agreement and verifies his / her identity;
[0338] For example, as shown in FIG18 , a first control 40 and a second control 41 are displayed. The first control 40 is used to trigger reading the service agreement, agreeing to the service agreement, or rejecting the service agreement. The second control 41 is used to trigger the start of identity feature collection. In response to the triggering operation on the first control 40 or the second control 41, the identity feature collection interface is displayed.
[0339] In some embodiments, in response to a triggering operation on the first control 40 and the second control 41, an identity verification interface is displayed. For example, as shown in FIG19 , an identity verification interface 42 is displayed. Identity verification interface 42 includes a password control and / or a password display control. The password control is used to enter a password. Optionally, the password control is a numeric password control and / or an alphanumeric password control. The password display control is used to display the password entered by the user.
[0340] Step 23: The terminal turns on the camera and displays the acquisition frame in the first display state;
[0341] The terminal displays the real-time preview image of the camera in full screen, and calculates the appropriate acquisition frame size based on the device parameters.
[0342] Specifically, the camera is turned on to display the camera preview screen and the acquisition frame in the first display state, as detailed in the above step 220 .
[0343] Step 24: The terminal displays a prompt message;
[0344] Specifically, the prompt information is detailed in the above step 420 or step 520 or step 620 and step 640.
[0345] Step 25: The terminal detects the body feature area and displays a follow-up frame;
[0346] The user stretches out a first body part, which is captured by the camera. The algorithm detects the body feature area and tilt angle of the first body part in real time and displays a follow frame. The follow frame changes with the movement of the first body part, becoming larger when it is closer and smaller when it is farther away. When the first body part tilts, the follow frame also tilts accordingly.
[0347] Specifically, the display of the follow-up frame is detailed in the above step 240.
[0348] In some embodiments, following box drawing logic:
[0349] Assume that a set of coordinate points representing the body feature area has been obtained: (x1, y1), (x2, y2), ..., (x n ,y n ).
[0350] Filtering coordinate points: You can filter out a set of coordinate points representing the body's characteristic regions based on information such as the distance and angle between the concave feature points and the convex hull feature points. For example, you can filter out a reference feature point from the feature points as the center of the body's characteristic region, and then select points within a certain range of the center as the coordinate points of the body's characteristic region.
[0351] Smoothing coordinate points: You can use smoothing algorithms, such as mean filtering, median filtering, and Gaussian filtering, to smooth coordinate points to reduce the impact of noise. For example, you can filter the horizontal x and vertical y coordinates of a coordinate point separately.
[0352] The ellipse is fitted by the least square method to solve the parameters of the ellipse. The general equation of the ellipse is: Ax 2 +Bxy+Cy 2 +Dx+Ey+F=0;
[0353] Where A, B, C, D, E, and F are the coefficients of any ellipse equation. In this application, the coefficients of the ellipse equation need to be solved using the coordinate points of the above-mentioned body feature areas. In some embodiments, during the fitting process, it is also necessary to minimize the error function f:
[0354] By taking the partial derivative of f and setting it to zero, and solving the above elliptic equation, we can get the parameters of the fitting follower frame.
[0355] Step 26: The terminal response follow frame overlaps with the collection frame of the first display state;
[0356] In some embodiments, in response to the following frame and the collection frame in the first display state overlapping, the terminal switches the collection frame in the first display state to a collection frame in the second display state.
[0357] The user cooperates to move the first body part to align the following frame with the collection frame of the first display state. When aligned, the collection frame of the second display state is displayed, indicating that the first body part has reached the optimal entry position, and the identity feature image is preferably collected.
[0358] Step 27: The terminal obtains an image frame corresponding to the body feature area;
[0359] In some embodiments, the image frame corresponding to the body feature region satisfies a preferred image quality condition. In some embodiments, the image frame satisfying the preferred image quality condition may also be understood as an image frame satisfying a multi-dimensional image threshold. Identity feature images satisfying the multi-dimensional image threshold are collected, where the multi-dimensional image threshold includes at least one of image quality, blur, feature information richness, and exposure.
[0360] In some embodiments, when the identity feature image is identified to meet the image multi-dimensional threshold, there are two strategies for confirmation. Specifically, the selection is based on the product experience requirements.
[0361] Strategy 1: Require the user to place the first body part within the capture frame before starting image quality optimization. Once the optimization is successful, the image is frozen and uploaded. By guiding the user to place the first body part within the capture frame, the user's willingness to enter the image can be further confirmed.
[0362] Strategy 2: The user is not required to place the first body part within the capture frame. As long as the first body part's outline is complete and the image meets the multi-dimensional threshold, it can be captured. In this case, even if the first body part is not placed within the capture frame, a high-quality identity feature image can be captured.
[0363] Step 28: Input completed;
[0364] In some embodiments, a prompt message indicating successful entry is displayed. For example, as shown in FIG20 , a fourth prompt message 43 is displayed.
[0365] In some embodiments, a fifth prompt message is further displayed to prompt the user to activate the palm-swiping service within the target time period. For example, as shown in FIG20 , the fifth prompt message 44 is displayed.
[0366] Step 29: The user scans his palm offline;
[0367] Step 30: Server retrieval;
[0368] Step 31: Activation successful.
[0369] When the user completes the online entry and scans his palm at the offline palm-scanning device, the palm-scanning device successfully collects clearer and higher-quality color and infrared images of the user. The identity features in the color image are preferentially searched and compared with the online entry library. If the identity features are retrieved, the user can directly scan the palm to use it. At the same time, the terminal pushes a prompt to the user to complete the activation.
[0370] FIG21 shows a block diagram of a device for determining a collection posture according to an exemplary embodiment of the present application. The device includes:
[0371] The display module 2110 is used to display the camera preview image and the collection frame in the first display state during the identity feature collection process.
[0372] The display module 2110 is further configured to display a follow frame on the screen area corresponding to the body feature area in response to identifying the body feature area in the camera preview screen, and the follow frame changes with the posture change of the body feature area in the real space.
[0373] The determination module 2120 is configured to determine that the posture of the body feature region in the real space reaches the collection posture in response to a matching condition being satisfied between the following frame and the collection frame in the first display state.
[0374] In some embodiments, the display module 2110 is further configured to, in response to identifying a body feature area in the camera preview image, display a follow frame on the image area with a reference point on the image area corresponding to the body feature area as the center point of the follow frame.
[0375] In some embodiments, the display module 2110 is further used to update the display following frame in response to the body feature area following at least one of tilting, translating, or rotating the first body part, so that the center point of the following frame and the reference point on the screen area corresponding to the body feature area are consistent, wherein the first body part is the body part where the body feature area is located.
[0376] In some embodiments, the display module 2110 is further used to display a follow-up frame on the screen area corresponding to the body feature area in response to identifying the body feature area in the camera preview screen, with a first size as the size of the follow-up frame; wherein the first size is associated with the distance between the body feature area and the camera.
[0377] In some embodiments, the first size is negatively correlated with the distance between the body feature region and the camera.
[0378] In some embodiments, the display module 2110 is also used to display a following frame on the screen area corresponding to the body feature area in response to identifying a body feature area in the camera preview screen, with a first flatness as the flatness of the following frame; wherein the first flatness is associated with the angle between the plane where the body feature area is located and the plane where the terminal screen is located.
[0379] In some embodiments, the first flatness is positively correlated with the angle between the plane where the body feature region is located and the plane where the terminal screen is located.
[0380] In some embodiments, the matching condition includes at least one of the following:
[0381] The shape of the follow frame is the same as the shape of the acquisition frame in the first display state;
[0382] The size of the follow frame is the same as the size of the acquisition frame in the first display state;
[0383] The ratio of the area of the following frame to the area of the acquisition frame in the first display state is greater than or equal to a ratio threshold;
[0384] The intersection area between the following frame and the acquisition frame in the first display state is greater than or equal to the area threshold;
[0385] The distance between the center of the following frame and the center of the acquisition frame in the first display state is less than a distance threshold;
[0386] The difference between the radius of the following frame and the radius of the acquisition frame in the first display state is less than the length difference threshold;
[0387] The angle between the plane where the following frame is located and the plane where the acquisition frame in the first display state is located is less than the angle difference threshold.
[0388] In some embodiments, the apparatus further includes an acquisition module 2130 configured to acquire an image frame corresponding to the detection object in response to identifying the detection object in the camera preview image;
[0389] The determination module 2120 is further configured to, when it is determined that the detection object is the first body part, extract reference feature points from the image frame, and determine a body feature area based on the reference feature points.
[0390] In some embodiments, the apparatus further includes an extraction module 2140, configured to extract a skin area in the image frame and extract a contour of the skin area.
[0391] The determination module 2120 is further configured to determine that the detection object is the first body part when the contour of the skin area corresponds to the contour of the first body part.
[0392] In some embodiments, the display module 2110 is further configured to display a first prompt message when it is determined that the detection object is a first body part and the outline of the skin area is incomplete, and the first prompt message is configured to prompt adjustment of the position of the first body part.
[0393] In some embodiments, the display module 2110 is further configured to display a second prompt message when it is determined that the detection object is not the first body part, and the second prompt message is configured to prompt a change of the detection object.
[0394] In some embodiments, the extraction module 2140 is further used to extract light features in the image frame; the display module 2110 is further used to display a third prompt message when the light features do not meet the light feature threshold, and the third prompt message is used to prompt the adjustment of the light of the image frame.
[0395] In some embodiments, the determination module 2120 is further configured to, in response to a matching condition being satisfied between the following frame and the collection frame in the first display state, switch the collection frame in the first display state to a collection frame in a second display state, wherein the collection frame in the second display state is configured to indicate that the posture of the body feature region in the real space reaches the collection posture;
[0396] The first display state and the second display state are different.
[0397] In summary, since the following frame changes with the posture of the body feature area in real space, guiding the user to adjust the following frame can also guide the user to adjust the posture of the body feature area in real space. Furthermore, by guiding the user to adjust the following frame to match the collection frame in the first display state, the user can avoid blindly adjusting the body feature area, which helps improve the efficiency of user identity feature collection.
[0398] Figure 22 shows a block diagram of a computer device 2200 provided in accordance with an exemplary embodiment of the present application. Computer device 2200 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player, or MP4 player. Computer device 2200 may also be referred to as user equipment, portable terminal, or other similar names. Generally, computer device 2200 includes a processor 2201 and a memory 2202.
[0399] The processor 2201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 2201 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 2201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 2201 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2201 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0400] The memory 2202 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 2202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 2202 is used to store at least one instruction, which is used to be executed by the processor 2201 to implement the method for determining the collection posture provided in the embodiments of the present application.
[0401] In some embodiments, computer device 2200 may optionally include a peripheral device interface 2203 and at least one peripheral device. Specifically, the peripheral device may include at least one of a radio frequency circuit, a touch screen display, a camera, an audio circuit, and a power supply. Those skilled in the art will appreciate that the structure shown in FIG. 22 does not limit computer device 2200 , and may include more or fewer components than shown, combine certain components, or employ a different component arrangement.
[0402] In an exemplary embodiment, a computer device is further provided. The computer device includes: a processor and a memory. The memory stores at least one program. The at least one program is loaded and executed by the processor to implement the above-mentioned method for determining the acquisition posture.
[0403] In an exemplary embodiment, a computer-readable storage medium is also provided, storing at least one program. When executed by a processor, the at least one program is used to implement the above-described method for determining the acquisition posture. Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, or an optical data storage device.
[0404] In an exemplary embodiment, a computer program product is also provided, which includes at least one program segment, the at least one program segment is stored in a computer-readable storage medium, a processor reads the at least one program segment from the computer-readable storage medium, and the processor executes the at least one program segment to implement the method for determining the acquisition posture as described above.
Claims
1. A method for determining a collection posture, the method comprising: During the process of collecting identity features, displaying a camera preview screen and a collection frame in a first display state; In response to identifying a body feature area in the camera preview screen, displaying a follow-up frame in the picture area corresponding to the body feature area, and the follow-up frame changes following the posture change of the body feature area in the real space; In response to the follow-up frame and the collection frame in the first display state satisfying a matching condition, determining that the posture of the body feature area in the real space reaches the collection posture.
2. The method according to claim 1, wherein The step of, in response to identifying a body feature area in the camera preview screen, displaying a follow-up frame in the picture area corresponding to the body feature area, includes: In response to identifying the body feature area in the camera preview screen, using a reference point in the picture area corresponding to the body feature area as the center point of the follow-up frame, and displaying the follow-up frame in the picture area.
3. The method according to claim 2, wherein, The method further includes: In response to the body feature area tilting or translating or rotating following at least one of a first body part, updating and displaying the follow-up frame so that the center point of the follow-up frame and the reference point in the picture area corresponding to the body feature area remain consistent; Wherein, the first body part is the body part where the body feature area is located.
4. According to the method of any one of claims 1 to 3, wherein The step of, in response to identifying a body feature area in the camera preview screen, displaying a follow-up frame in the picture area corresponding to the body feature area, includes: In response to identifying the body feature area in the camera preview screen, using a first size as the size of the follow-up frame, and displaying the follow-up frame in the picture area corresponding to the body feature area; Wherein, the first size is associated with the distance between the body feature area and the camera.
5. The method according to claim 4, wherein, The first size has a negative correlation with the distance between the body feature area and the camera.
6. According to the method of any one of claims 1 to 3, wherein, The step of, in response to identifying a body feature area in the camera preview screen, displaying a follow-up frame in the picture area corresponding to the body feature area, includes: In response to identifying the body feature area in the camera preview screen, using a first flatness as the flatness of the follow-up frame, and displaying the follow-up frame in the picture area corresponding to the body feature area; Wherein, the first flatness is associated with the angle between the plane where the body feature area is located and the plane where the terminal screen is located.
7. The method according to claim 6, wherein, The first flatness has a positive correlation with the angle between the plane where the body feature area is located and the plane where the terminal screen is located.
8. According to the method of any one of claims 1 to 7, wherein The matching condition includes at least one of the following: The shape of the follow-up frame is the same as the shape of the collection frame in the first display state; The size of the follow-up frame is the same as the size of the collection frame in the first display state; The ratio of the area of the follow-up frame to the area of the collection frame in the first display state is greater than or equal to a ratio threshold; The intersecting area between the follow-up frame and the collection frame in the first display state is greater than or equal to an area threshold; The distance between the center of the follow-up frame and the center of the collection frame in the first display state is less than a distance threshold; The difference between the radius of the following frame and the radius of the acquisition frame in the first display state is less than the length difference threshold.
9. The method according to any one of claims 1 to 8, wherein, Before displaying the following frame on the picture area corresponding to the body feature area in response to identifying the body feature area in the camera preview picture, the method further includes: In response to identifying a detection object in the camera preview picture, obtaining an image frame corresponding to the detection object; When it is determined that the detection object is the first body part, extracting reference feature points from the image frame and determining the body feature area based on the reference feature points.
10. The method according to claim 9, wherein, The method further includes: Extracting the skin area in the image frame and extracting the contour of the skin area; When the contour of the skin area corresponds to the contour of the first body part, determining that the detection object is the first body part.
11. The method according to claim 10, wherein, The method further includes: When it is determined that the detection object is the first body part and the contour of the first body part is incomplete, displaying a first prompt message for prompting to adjust the position of the first body part.
12. The method according to claim 10, wherein, The method further includes: When it is determined that the detection object is not the first body part, displaying a second prompt message for prompting to replace the detection object.
13. The method according to any one of claims 9 to 12, wherein, The method further includes: Extracting the light feature in the image frame; When the light feature does not meet the light feature threshold, displaying a third prompt message for prompting to adjust the light of the image frame.
14. The method according to any one of claims 1 to 13, wherein, The determining that the posture of the body feature area in the real space reaches the acquisition posture in response to the following frame and the acquisition frame in the first display state satisfying the matching condition includes: In response to the following frame and the acquisition frame in the first display state satisfying the matching condition, switching the display of the acquisition frame in the first display state to the acquisition frame in the second display state, where the acquisition frame in the second display state is used to prompt that the posture of the body feature area in the real space reaches the acquisition posture; Wherein, the first display state is different from the second display state.
15. A device for determining an acquisition posture, the device includes: A display module for displaying the camera preview picture and the acquisition frame in the first display state during the identity feature acquisition process; The display module is further configured to, in response to identifying a body feature area in the camera preview picture, display a following frame on the picture area corresponding to the body feature area, where the following frame changes with the change of the posture of the body feature area in the real space; A determination module for determining that the posture of the body feature area in the real space reaches the acquisition posture in response to the following frame and the acquisition frame in the first display state satisfying the matching condition.
16. The device according to claim 15, wherein, The display module is further configured to, in response to identifying the body feature area in the camera preview picture, use the reference point on the picture area corresponding to the body feature area as the center point of the following frame and display the following frame on the picture area.
17. The apparatus according to claim 16, wherein the display module is further configured to update the display of the following frame in response to at least one of tilting, translating, or rotating of the body feature area following the first body part, so that the center point of the following frame is consistent with the reference point on the picture area corresponding to the body feature area; wherein the first body part is the body part where the body feature area is located.
18. A computer device, wherein, The computer device includes a memory and a processor; at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the method for determining the acquisition posture according to any one of claims 1 to 14.
19. A computer-readable storage medium, wherein, At least one program is stored in the computer storage medium, and the at least one program is used to be executed by a processor to implement the method for determining the acquisition posture according to any one of claims 1 to 14.
20. A computer program product, wherein, The computer program product includes at least one program, the at least one program is stored in a computer-readable storage medium, and a processor reads and executes the at least one program from the computer-readable storage medium to implement the method for determining the acquisition posture according to any one of claims 1 to 14.
Citation Information
Patent Citations
Method and device of human-face recognition, mobile terminal and storage medium
CN108229357A
Man-computer interaction method and device based on iris recognition and electronic equipment
CN112764523A
Data information acquisition method
CN114332964A
Target detection method and device
CN116310301A
Method for recognizing recognition target person
US20220108104A1