Identity feature acquisition method and device, equipment and storage medium

By displaying the following box in the camera preview screen, following the plane of the body's characteristic area and the distance between the camera, the user is guided to adjust the position, solving the problem of time waste caused by users' blind adjustments, and improving the efficiency and accuracy of identity feature acquisition.

CN120260083APending Publication Date: 2025-07-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410015511.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

When using palm print collection equipment, users often blindly adjust the position of palm prints, resulting in wasted time in the collection process.

Method used

By displaying the following box in the camera preview screen, following the plane of the body feature area and the distance between the camera, the user is guided to adjust the position of the body feature area to meet the acquisition conditions.

Benefits of technology

It improves the efficiency of users to collect identity characteristics, avoids blind adjustments, and ensures the accuracy and efficiency of the collection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120260083A_ABST
    Figure CN120260083A_ABST
Patent Text Reader

Abstract

The invention discloses an identity feature acquisition method and device, equipment and a storage medium, and relates to the technical field of human-computer interaction. The method comprises the following steps: in an identity feature acquisition process, displaying a camera preview picture and an acquisition frame in a first display state; in response to the body feature region recognized in the camera preview picture, displaying a following frame on the body feature region, the display shape of the following frame changing along with the plane where the body feature region is located and the distance between the body feature region and the camera; responding to the condition that the relative position between the following frame and the collection frame in the first display state meets the collection condition, and switching and displaying the collection frame in the first display state into a collection frame in a second display state. According to the method provided by the embodiment of the invention, the user can be guided through the dynamically changing following frame, the user can be prevented from blindly adjusting the position of the target body part, and the efficiency of correctly inputting the identity feature by the user can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of human-computer interaction technology, and particularly relates to a method, device, equipment, and storage medium for collecting identity characteristics. Background Art

[0002] In related technologies, due to the characteristics of biometrics such as stability, uniqueness, and convenience, using the unique biometrics of each user for user identity recognition is beneficial to improving the security and convenience of identity recognition. Related biometrics include face, iris, fingerprint, palmprint, etc.

[0003] For the technology of using palmprint features for identity recognition, it is necessary to use a palmprint acquisition device to acquire the palmprint features of the user. However, when the user uses the palmprint acquisition device to acquire the palmprint, they usually blindly adjust the position of the palmprint, resulting in the user wasting more time for adjustment during the palmprint acquisition process. Summary of the Invention

[0004] Embodiments of this application provide a method, device, equipment, and storage medium for collecting identity characteristics. The technical solution is as follows:

[0005] According to one aspect of this application, a method for collecting identity characteristics is provided. The method includes:

[0006] During the process of collecting identity characteristics, display the camera preview screen and the acquisition frame in the first display state;

[0007] In response to identifying a body feature area in the camera preview screen, display a following frame on the body feature area, and the display shape of the following frame changes according to the plane where the body feature area is located and the distance between the body feature area and the camera;

[0008] In response to the relative position between the following frame and the acquisition frame in the first display state satisfying the acquisition condition, switch the display of the acquisition frame in the first display state to the acquisition frame in the second display state;

[0009] Wherein, the first display state and the second display state are different.

[0010] According to one aspect of this application, an identity characteristic acquisition device is provided. The device includes:

[0011] A display module, configured to display the camera preview screen and the acquisition frame in the first display state during the process of collecting identity characteristics;

[0012] The display module is further configured to, in response to identifying a body feature area in the camera preview screen, display a follow-up frame on the body feature area, where the display shape of the follow-up frame changes following the plane where the body feature area is located and the distance between the body feature area and the camera;

[0013] The display module is further configured to, in response to the relative position between the follow-up frame and the acquisition frame in the first display state satisfying the acquisition condition, switch the display of the acquisition frame in the first display state to the acquisition frame in the second display state;

[0014] Wherein, the first display state and the second display state are different.

[0015] The display module is further configured to, in response to identifying the body feature area, use a reference point on the body feature area as the center point of the follow-up frame and display the follow-up frame.

[0016] The display module is further configured to, in response to the body feature area tilting or translating or rotating (tilting or translating or rotating) following a target body part, update and display the follow-up frame so that the center point of the follow-up frame and the reference point on the body feature area are kept consistent;

[0017] Wherein, the target body part is the body part where the body feature area is located.

[0018] The display module is further configured to, in response to identifying the body feature area, use a target size as the size of the follow-up frame and display the follow-up frame;

[0019] Wherein, the target size is associated with the distance between the body feature area and the camera.

[0020] The target size has a negative correlation with the distance between the body feature area and the camera.

[0021] The acquisition condition includes at least one of the following:

[0022] The shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state;

[0023] The size of the follow-up frame is the same as the size of the acquisition frame in the first display state;

[0024] The ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to a ratio threshold;

[0025] The area where the follow-up frame intersects with the acquisition frame in the first display state is greater than or equal to an area threshold;

[0026] The distance between the center of the following box and the center of the acquisition box in the first display state is less than the distance threshold;

[0027] The difference between the radius of the following box and the radius of the acquisition box in the first display state is less than the length difference threshold.

[0028] The device further includes:

[0029] An acquisition module, configured to obtain an image frame corresponding to the target object in response to identifying the target object in the camera preview screen;

[0030] An extraction module, configured to extract target feature points from the image frame and determine the body feature region based on the target feature points when it is determined that the target object is a target body part.

[0031] The extraction module is further configured to extract the skin region in the image frame and extract the contour of the skin region;

[0032] A determination module, configured to determine that the target object is the target body part when the contour of the skin region corresponds to the contour of the target body part.

[0033] The display module is further configured to display a first prompt message for prompting to adjust the position of the target body part when it is determined that the target object is a target body part and the contour of the target body part is incomplete.

[0034] The display module is further configured to display a second prompt message for prompting to replace the target object when it is determined that the target object is not a target body part.

[0035] The extraction module is further configured to extract the light feature in the image frame;

[0036] The display module is further configured to display a third prompt message for prompting to adjust the light when the light feature indicates that the light in the image frame does not meet the light threshold.

[0037] According to one aspect of the present application, there is provided a computer device, which 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 identity feature acquisition method as described above.

[0038] According to one aspect of the present application, there is provided a computer-readable storage medium, in which at least one program is stored, and the at least one program is used to be executed by a processor to implement the identity feature acquisition method as described above.

[0039] According to one aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes at least one program. 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 identity feature acquisition method as described above.

[0040] The beneficial effects brought by the technical solutions provided in the embodiments of the present application at least include:

[0041] Since the display position of the follow-up frame changes with the plane where the body feature area is located and the distance between the body feature area and the camera, by guiding the user to adjust the follow-up frame, that is, it is possible to guide the user to adjust the plane where the body feature area is located and the distance between the body feature area and the camera. Further, by guiding the user to adjust the relative position between the follow-up frame and the acquisition frame in the first display state to meet the acquisition conditions, it is possible to prevent the user from making adjustments blindly, which is beneficial to improving the efficiency of the user's acquisition of identity features. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0043] Figure 1 Shows a structural block diagram of a computer system provided by an embodiment of the present application;

[0044] Figure 2 Shows an interface diagram of an identity feature acquisition method provided by an embodiment of the present application;

[0045] Figure 3 Shows a schematic diagram of classifying different terminal devices provided by an embodiment of the present application;

[0046] Figure 4 Shows a flowchart of an identity feature acquisition method provided by an embodiment of the present application;

[0047] Figure 5 Shows an interface diagram of an identity feature acquisition method provided by an embodiment of the present application;

[0048] Figure 6 Shows an interface diagram of an identity feature acquisition method provided by an embodiment of the present application;

[0049] Figure 7Shows the interface diagram of the identity feature acquisition method provided by an embodiment of the present application;

[0050] Figure 8 Shows the interface diagram of the identity feature acquisition method provided by an embodiment of the present application;

[0051] Figure 9 Shows the flowchart of the identity feature acquisition method provided by an embodiment of the present application;

[0052] Figure 10 Shows the flowchart of the identity feature acquisition method provided by an embodiment of the present application;

[0053] Figure 11 Shows the flowchart of the identity feature acquisition method provided by an embodiment of the present application;

[0054] Figure 12 Shows the interface diagram of the identity feature acquisition method provided by an embodiment of the present application;

[0055] Figure 13 Shows the flowchart of the identity feature acquisition method provided by an embodiment of the present application;

[0056] Figure 14 Shows the interface diagram of the identity feature acquisition method provided by an embodiment of the present application;

[0057] Figure 15 Shows the flowchart of the identity feature acquisition method provided by an embodiment of the present application;

[0058] Figure 16 Shows the interface diagram of the identity feature acquisition method provided by an embodiment of the present application;

[0059] Figure 17 Shows the flowchart of the identity feature acquisition method provided by an embodiment of the present application;

[0060] Figure 18 Shows the interface diagram of the identity feature acquisition method provided by an embodiment of the present application;

[0061] Figure 19 Shows the interface diagram of the identity feature acquisition method provided by an embodiment of the present application;

[0062] Figure 20 Shows the interface diagram of the identity feature acquisition method provided by an embodiment of the present application;

[0063] Figure 21 Shows the structural block diagram of the identity feature acquisition device provided by an embodiment of the present application;

[0064] Figure 22The block diagram of a computer device provided by an embodiment of the present application is shown. Detailed implementation manners

[0065] To make the objectives, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings. Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0066] The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "the" and "said" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0067] It should be understood that although terms such as first, second, and third may be used in the present application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.

[0068] Figure 1 The block diagram of a computer system 100 provided by an exemplary embodiment of the present application is shown. The computer system 100 includes: a terminal 110 and a server 120.

[0069] The terminal 110 installs and runs a program or a web page that supports the collection of identity features. Optionally, the program that supports the collection of identity features includes at least one of game applications, virtual social applications, interactive entertainment applications, and metaverse applications. Optionally, the program that supports the collection of identity features is an application or applet developed specifically for the identity feature collection function and only used for collecting identity features. Optionally, the program that supports the collection of identity features is an application or applet with the identity feature collection function. In the embodiments of the present application, an example is given where the program that supports the collection of identity features is an application developed specifically for the identity feature collection function and only used for collecting identity features.

[0070] The terminal 110 is the terminal used by the target user, and the target user uses the terminal 110 to collect identity features. Exemplarily, such as Figure 2As shown, take the example where the identity feature collection client 111 that supports collecting identity features is installed and running on the terminal 110. The target user clicks or long-presses to open the identity feature collection client 111 to start collecting identity features. In response to the trigger operation, the identity feature collection client 111 displays the identity feature collection interface 10, on which a camera preview screen 11 and a collection frame 12 in the first display state are shown.

[0071] The camera preview screen 11 is a screen captured in real time based on 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 position in 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.

[0072] The collection frame 12 in the first display state is determined based on the device parameters of the terminal 110 related to collecting identity features. Exemplarily, the device parameters include camera parameters and picture imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle range, distortion, chromatic aberration, and sharpness. The picture imaging parameters are determined by the pictures actually captured by the terminal 110. In some embodiments, as Figure 3 shown, the device parameters of different devices are collected in advance, and then the different devices are classified based on the device parameters, such as being classified into Class A, Class B, Class C, and Class D. Each class corresponds to its own collection frame parameters, and the collection frame parameters include at least one of the display size, display position, and display form used to indicate the display of the collection frame on the identity feature entry interface. The collection frame parameters are stored in the server 120. In some embodiments, when starting to collect identity features, the terminal 110 sends a request to the server 120 to call the collection frame parameters. The server 120 sends the corresponding collection frame parameters to the terminal 110 according to the class to which the terminal 110 belongs. The 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.

[0073] In some embodiments, in response to identifying a body feature area in the camera preview screen 11, a following frame 13 is displayed on the body feature area, and the display position of the following frame 13 changes dynamically following the plane where the body feature area is located and the distance between the body feature area and the camera. The following frame 13 is used to guide the user to adjust the display position of the following frame, so that the relative position between the following frame 13 and the acquisition frame 12 in the first display state can meet the acquisition conditions. When the relative position between the following frame 13 and the acquisition frame 12 in the first display state meets the acquisition conditions, the acquisition frame 12 in the first display state is switched to the acquisition frame 14 in the second display state.

[0074] The terminal 110 is connected to the server 120 through a wireless network or a wired network.

[0075] The server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Exemplarily, the server 120 includes a processor 121 and a memory 122. The memory 122 further includes a receiving module 1221, a display module 1222, and a sending module 1223. The receiving module 1221 is used to receive requests sent by the terminal 110; the display module 1222 is used to display a program page supporting the acquisition of identity features; the sending module 1223 is used to send responses to the terminal 110. The server 120 is used to provide background services for programs or web pages supporting the acquisition of identity features. Optionally, the server 120 undertakes the main computing work, and the terminal 110 undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work, and the terminal 110 undertakes the main computing work; or, the server 120 and the terminal 110 undertake the computing work in a collaborative manner.

[0076] Optionally, the device types of the terminal 110 include at least one of a smart phone, a smart watch, a vehicle-mounted 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 take the terminal 110 including a smart phone as an example for illustration.

[0077] Those skilled in the art can know that the number of the above-mentioned terminals 110 can be more or less. For example, the above-mentioned terminal 110 can be only one, or the above-mentioned terminal 110 can be dozens or hundreds, or more. The embodiments of the present application do not limit the number and device types of the terminal 110.

[0078] In an embodiment of the present application, an identity feature acquisition method is provided, which can guide the user through a dynamically changing follow-up frame, avoid the user from blindly making adjustments, and is beneficial to improving the efficiency of the user in acquiring identity features.

[0079] Figure 4 The flowchart of an identity feature acquisition method provided by an embodiment of the present application is shown. Taking the method as being Figure 1 executed by the terminal 110 shown as an example. The method includes the following steps:

[0080] Step 220: During the identity feature acquisition process, display the camera preview screen and the acquisition frame in the first display state;

[0081] In some embodiments, in response to a trigger operation on the identity feature acquisition client, display the camera preview screen and the acquisition frame in the first display state. The trigger operation includes at least one of single-click, double-click, left and right swipe, up and down swipe, long press, hover, face recognition, and voice recognition. It should be noted that the trigger operation includes but is not limited to the above-mentioned several. Those skilled in the art should be able to know that any operation that can achieve the above functions belongs to the protection scope of the embodiments of the present application.

[0082] In some embodiments, the camera preview screen and the acquisition frame in the first display state are displayed simultaneously. In some embodiments, the camera preview screen and the acquisition frame in the first display state are not displayed simultaneously. Optionally, the acquisition frame in the first display state is displayed after the camera preview screen is displayed. For example, first display the camera preview screen, and then display the acquisition frame in the first display state after the target object is recognized. Optionally, the camera preview screen is displayed after the acquisition frame in the first display state is displayed.

[0083] In some embodiments, the camera preview screen is a screen captured by the camera in real time. Optionally, the camera preview screen is displayed full screen on the terminal screen. Optionally, the camera preview screen is displayed in a target area on the terminal screen. The target area is preset or the target area is dynamically changing. For example, the target area is the middle one-third area of the terminal screen. In the embodiments of the present application, the case where the camera preview screen is displayed full screen on the terminal screen is taken as an example for description.

[0084] In some embodiments, the acquisition frame in the first display state is determined based on device parameters related to the terminal. Exemplarily, the device parameters include camera parameters and picture imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle range, distortion, chromatic aberration, and sharpness. The picture imaging parameters are determined by the pictures actually captured by the terminal. In some embodiments, such as Figure 3As shown, device parameters of different devices are collected in advance, and then the different devices are classified based on the device parameters, such as being classified into Class A, Class B, Class C, and Class D. Each class corresponds to respective collection frame parameters, and the collection frame parameters include at least one of a display size, a display position, and a display form for indicating the collection frame to be displayed on the identity feature entry interface. The collection frame parameters are stored in the server 120. In some embodiments, when the terminal 110 starts identity feature collection, it sends a request to the server 120 to call the collection frame parameters. The server 120 sends the corresponding collection frame parameters to the terminal 110 according to the class to which the terminal 110 belongs. The terminal 110 displays the collection frame in the first display state based on the received collection frame parameters.

[0085] 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 a circle, a square, and a trapezoid. If the preset display shape of the collection frame in the first display state is a circle, the user can also choose to modify the display shape of the collection frame in the first display state to a 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 position of the terminal screen.

[0086] In some embodiments, the first display state is mainly used to distinguish from the second display state, and the first display state is different from the second display state. Optionally, the first display state is a first color, such as black; then 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; then the second display state is a second display entity, or a display entity other than the first display entity, such as a dotted line.

[0087] Exemplarily, as Figure 2 shown, during the identity feature collection process, the camera preview screen 11 and the collection frame 12 in the first display state are displayed.

[0088] Step 240: In response to identifying a body feature area in the camera preview screen, display a follow-up frame on the body feature area;

[0089] In some embodiments, in response to identifying a body feature area in the camera preview screen, a follow-up frame is displayed. The follow-up frame follows the body feature area. It should be understood that the follow-up frame is used to frame the body feature area in the camera preview screen, and the display shape, display size, and display position of the follow-up frame change following the body feature area.

[0090] In some embodiments, the display state of the follow-up frame is preset. Optionally, the display state of the follow-up frame is the first display state, that is, the display state of the follow-up frame is the same as the start display state of the acquisition frame. Optionally, the display state of the follow-up frame is the second display state, that is, the display state of the follow-up frame is the same as the final display state of the acquisition frame. Optionally, the display state of the follow-up 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 follow-up frame is also the same as the first display state. When the relative position between the follow-up frame and the acquisition frame of the first display state meets the acquisition condition, the first display state switches to the second display state. Optionally, the display state of the follow-up frame is the third display state, that is, the display state of the follow-up frame is different from the display state of the acquisition frame. For example, when 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 follow-up frame is yellow.

[0091] In some embodiments, the display state of the follow frame changes dynamically. Optionally, the display state of the follow frame changes with the change of the distance between the body feature area and the camera. 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 follow 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 follow 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 follow frame changes from a color close to red to a color that is significantly different from red (such as yellow).

[0092] 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. Exemplary, as shown in the following Table 1:

[0093] Table 1

[0094] Follow box Follow sound Follow box 1 Follow sound 1 Follow box 2 Follow sound 2 …… ……

[0095] In some embodiments, the following sound changes dynamically. For example, the following sound changes with the change of the following frame. Optionally, the rapidity of the following sound changes with the change of the distance between the body feature area and the camera. The rapidity of the following sound is positively correlated with the distance between the body feature area and the camera. When the body feature area is close to the camera, the following sound becomes more and more rapid; when the body feature area is far from the camera, the following sound becomes more and more gentle. Optionally, the pitch of the following sound changes with the change of the distance between the body feature area and the camera. The pitch of the following sound is positively 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 following sound is higher; when the body feature area is far from the camera, the pitch of the following sound is lower.

[0096] In some embodiments, while the following frame is displayed, a special effect mask layer is displayed. The special effect mask layer is attached to the body feature area. The special effect mask layer is used to prompt the user that the following frame is displayed and can improve the interest in guiding the user through special effects. Optionally, the special effect mask layer is preset. For example, when the body feature area is the palm area, the special effect mask layer is a flower, meaning "a flower blooms in the palm"; when the body feature area is the face area, the feature mask layer is a facial emoji. Optionally, the special effect mask layer changes dynamically. Optionally, the display effect of the special effect mask layer can change with the change of the distance between the body feature area and the camera. For example, when the body feature area is the palm area, the special effect mask layer is a flower. When the palm area is far from the camera, the flower is displayed smaller; when the palm area is close to the camera, the flower is displayed larger.

[0097] It should be noted that the description of the following frame and the following sound in the embodiments of the present application is only an exemplary description, and any other method that can achieve the display of the following frame on the body feature area belongs to the protection scope of the embodiments of the present application. For example, when the body feature area is the palm area, the special effect mask layer can also be a fountain.

[0098] In some embodiments, the display shape of the following frame changes with the plane where the body feature area is located and the distance between the body feature area and the camera.

[0099] In some embodiments, it can also be understood that the following frame is the projection of the feature frame for following the body feature area in the camera preview screen, and the feature frame is used to frame the body feature area on the plane where the body feature area is located.

[0100] In some embodiments, the body feature area is the palm area. In some embodiments, the body feature area is the facial area. In the embodiments of the present application, the palm area is taken as an example of the body feature area for illustration.

[0101] Exemplarily, as shown in Figure x, assuming that the plane where the terminal screen is located is the xoz plane, when the plane where the body feature area is located is parallel to the plane where the terminal screen is located, the follow frame 13 is the feature frame 15, and both the follow frame 13 and the feature frame 15 are circular. When the plane where the body feature area is located intersects with the plane where the terminal screen is located, exemplarily, as Figure 6 shown, when the plane where the body feature area is located is the xoz' plane, the follow frame 13 is the projection of the feature frame 15 on the terminal screen, the feature frame 15 is circular, and the follow frame 13 is an ellipse after the projection of the feature frame 15.

[0102] In some embodiments, the shape of the feature frame is the same as the shape of the acquisition frame in the first display state. For example, if the shape of the acquisition frame in the first display state is circular, then the shape of the feature frame is also circular.

[0103] In some embodiments, in response to recognizing the body feature area, the follow frame is displayed with a reference point on the body feature area as the center point of the follow frame. Optionally, the reference point is the center point on the body feature area, such as the center point of the palm area.

[0104] In some embodiments, in response to recognizing the body feature area, the follow frame is displayed with a target size as the size of the follow frame. Among them, the target size is associated with the distance between the body feature area and the camera. In some embodiments, the target size has a negative correlation 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 target size; the closer the distance between the body feature area and the camera, the larger the target size. Exemplarily, as Figure 5 and Figure 7 shown, 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 frame 13 also shrinks from the first target size to the second target size.

[0105] In some embodiments, in response to the body feature area following the target body part to tilt or translate or rotate at least one of them, the displayed follow frame is updated so that the center point of the follow frame is consistent with the reference point on the body feature area. The center point of the updated follow frame coincides with the reference point of the body feature area. Optionally, in response to the body feature area following the target body part to tilt, the displayed follow frame is updated. Optionally, in response to the body feature area following the target body part to translate, the displayed follow frame is updated. Optionally, in response to the body feature area following the target body part to rotate, the displayed follow frame is updated.

[0106] In some embodiments, the target body part is the body part where the body feature area is located. Optionally, when the body feature area is the palm area, the target body part is the palm. Optionally, when the body feature area is the facial area, the target body part is the head. Optionally, when the body feature area is the fingertip area, the target body part is the finger. In the embodiments of the present application, taking the body feature area being the palm area and the target body part being the palm as an example for illustration.

[0107] Step 260: In response to the relative position between the follow frame and the acquisition frame in the first display state satisfying the acquisition condition, switch the display of the acquisition frame in the first display state to the acquisition frame in the second display state.

[0108] In some embodiments, the acquisition condition includes at least one of the following:

[0109] ·· The shape of the follow frame is the same as the shape of the acquisition frame in the first display state;

[0110] · The size of the follow frame is the same as the size of the acquisition frame in the first display state;

[0111] · The ratio of the area of the follow frame to the area of the acquisition frame in the first display state is greater than or equal to a proportionality threshold;

[0112] · The intersecting area between the follow frame and the acquisition frame in the first display state is greater than or equal to an area threshold;

[0113] · The distance between the center of the follow frame and the center of the acquisition frame in the first display state is less than a distance threshold;

[0114] · The difference between the radius of the follow frame and the radius of the acquisition frame in the first display state is less than a length difference threshold;

[0115] · The angle between the plane where the follow frame is located and the plane where the acquisition frame in the first display state is located is less than an angle difference threshold.

[0116] In some embodiments, in response to the shape of the follow frame being the same as the shape of the acquisition frame in the first display state, switch the display of the acquisition frame in the first display state to the acquisition frame in the second display state. Since the follow frame is the projection of the feature frame in the camera preview screen, when the plane where the body feature area is located is parallel to the plane of the terminal screen, the shape of the follow frame will be the same as the shape of the acquisition frame in the first display state, and at this time, switch the display of the acquisition frame in the first display state to the acquisition frame in the second display state.

[0117] In some embodiments, in response to the size of the follow-up frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the size of the follow-up frame here can be understood as the area size of the follow-up frame, that is, in response to the area size of the follow-up frame being the same as the area size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Alternatively, the size of the follow-up frame here can also be understood as the size when the shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state, that is, in response to the shape of the follow-up frame being the same as the shape of the acquisition frame in the first display state, and the size of the follow-up frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0118] In some embodiments, in response to the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state being greater than or equal to a ratio threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the area of the acquisition frame in the first display state remains unchanged after the acquisition frame in the first display state is displayed. And the area of the follow-up frame changes with the update of the follow-up frame. In some embodiments, the ratio threshold is preset or dynamically changed. For example, if the ratio threshold is four-fifths, then in response to the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state being greater than or equal to four-fifths, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0119] In some embodiments, in response to the area of the intersection between the follow-up frame and the acquisition frame in the first display state being greater than or equal to an area threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition 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 Figure 8 shown, in response to the area of the intersection region 16 between the follow-up frame 13 and the acquisition frame 12 in the first display state being greater than or equal to 2 square centimeters, the acquisition frame 12 in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0120] In some embodiments, in response to the distance between the center of the follow-up frame and the center of the acquisition frame in the first display state being less than a distance threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition 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 Figure 8 shown, in response to the distance 17 between the center of the follow-up frame 13 and the center of the acquisition frame 12 in the first display state being less than 2 centimeters, the acquisition frame 12 in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0121] In some embodiments, when the acquisition frame in the first display state is circular and the follow-up frame is circular, in response to the difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state being less than the length difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. In some embodiments, the length difference threshold is preset or dynamically variable. For example, if the length difference threshold is 1 centimeter, then in response to the difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state being less than 1 centimeter, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. It should be understood that when the acquisition frame in the first display state is circular and the follow-up frame is circular, that is, the shapes of the acquisition frame in the first display state and the follow-up frame are the same, then the plane where the body feature region is located is parallel to the plane where the terminal screen is located.

[0122] In some embodiments, in response to the angle between the plane where the body feature region is located and the plane where the acquisition frame in the first display state is located being less than the angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Or 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 the angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Among them, the follow-up 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 dynamically variable. For example, if the angle difference threshold is 30 degrees, then in response to the angle between the plane where the body feature region is located and the plane where the acquisition frame in the first display state is located being less than 30 degrees, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0123] In some embodiments, the above acquisition conditions can be a combination of the above n conditions, where n is an integer greater than 1. For example, the acquisition condition is that the shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to the ratio threshold. Then in response to the shape of the follow-up frame being the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state being greater than or equal to the ratio threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0124] In summary, the method provided by the embodiments of the present application provides a method for collecting identity features. Since the display position of the follow frame changes with the plane where the body feature area is located and the distance between the body feature area and the camera, by guiding the user to adjust the follow frame, it is possible to guide the user to adjust the plane where the body feature area is located and the distance between the body feature area and the camera. Further, by guiding the user to adjust the relative position between the follow frame and the collection frame in the first display state to meet the collection conditions, it is possible to avoid the user blindly making adjustments, which is beneficial to improving the efficiency of the user collecting identity features.

[0125] The method provided by the embodiments of the present application also displays the follow frame with a reference point on the body feature area as the center point of the follow frame, so that the follow frame always changes based on the change of the body feature area. Therefore, when the body feature area undergoes dynamic changes, the follow frame can be adjusted in a timely manner. For example, when the body feature area follows the target body part and undergoes at least one of tilting, translation, or rotation, the follow frame can be updated in a timely manner, thereby providing real-time guidance for the user.

[0126] The method provided by the embodiments of the present application also displays the follow frame with the target size as the size of the follow frame, so that the size of the follow frame is determined according to the distance between the body feature area and the camera, thereby enabling dynamic adjustment of the size of the follow frame to ensure real-time guidance for the user.

[0127] Figure 9 The flowchart of an identity feature collection method provided by the embodiments of the present application is shown. Taking the method as being Figure 1 executed by the terminal 110 shown as an example. Before the above step 240, the following steps are further included:

[0128] Step 320: In response to identifying a target object in the camera preview screen, obtain an image frame corresponding to the target object;

[0129] In some embodiments, the target object is a target body part or the target object is not a target body part. Optionally, in response to identifying a target body part in the camera preview screen, obtain an image frame corresponding to the target body part. Or, in response to identifying an object other than the target body part in the camera preview screen, obtain an image frame corresponding to the identified object.

[0130] In some embodiments, the image frame is a preprocessed image frame. Optionally, the preprocessing steps include at least one of color space conversion, binarization, filtering, and edge detection. In some embodiments, the image frame is an un-preprocessed image frame. The preprocessing operation is used to help reduce noise and background interference in the image frame, which is beneficial to highlighting the features in the image frame.

[0131] In some embodiments, based on the acquired image frame, it is determined whether the target object is a target body part. Exemplarily, as Figure 10 shown, the above method further includes the following steps:

[0132] Step 331: Extract the skin region in the image frame and extract the contour of the skin region;

[0133] In some embodiments, the skin region in the image frame is extracted based on a color threshold. Optionally, the image frame is converted from a first color space to a second color space, and the amount of color information in the first color space and the second color space is different. Exemplarily, the first color space is the Red Green Blue (RGB) color space, and the second color space is the Hue Saturation Value (HSV) color space.

[0134] Optionally, the color threshold is preset. The color threshold is used to distinguish the skin region and the non-skin region in the image frame. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is obvious, the skin region in the image frame is directly extracted. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is not obvious, the image frame is converted from the first color space to the second color space to highlight the color difference between the skin region and the non-skin region, so as to extract the skin region from the image frame.

[0135] In some embodiments, the contour of the skin region is extracted by an edge detection algorithm. Optionally, the contour of the skin region is extracted by the Canny algorithm. Optionally, the contour of the skin region is extracted by the Sobel algorithm. In some embodiments, the Canny algorithm is a standard algorithm widely used in edge detection, and its goal is to find an optimal edge detection solution or find the position with the strongest change in gray intensity in an image. The optimal edge detection is mainly evaluated by three criteria: low error rate, high localization, and minimum response. In some embodiments, the Sobel algorithm is mainly used for edge detection, and technically, it calculates the approximate value of the gray level of the image brightness function through a set of discrete difference operators.

[0136] In some embodiments, it is determined whether the target object is a target body part according to the contour of the skin region.

[0137] Step 332: When the contour of the skin region corresponds to the contour of the target body part, it is determined that the target object is the target body part;

[0138] In some embodiments, the contour of the skin area is compared with the contour of the target body part. When the contour of the skin area corresponds to the contour of the target body part, it is determined that the target object is the target body part; when the contour of the skin area does not correspond to the contour of the target body part, it is determined that the target object is not the target body part.

[0139] In some embodiments, the contour of the target body part corresponds to features such as shape, area, perimeter, etc. Optionally, by comparing the shape of the contour of the skin area with the shape of the contour of the target body part, it is determined whether the target object is the target body part. Optionally, there is a corresponding relationship between the features of the contour of the target body part. For example, when the area corresponding to the contour of the target body part is 10 square centimeters, the corresponding perimeter is 15 centimeters; when the area corresponding to the contour of the target body part is 20 square centimeters, the corresponding perimeter is 30 centimeters.

[0140] In some embodiments, when it is determined that the target object is the target body part, the following step 340 is continued. When it is determined that the target object is not the target body part, the above steps are repeated until it is determined that the target object is the target body part.

[0141] Step 340: When it is determined that the target object is the target body part, extract target feature points from the image frame, and determine the body feature area based on the target feature points.

[0142] In some embodiments, when it is determined that the target object is the target body part, target feature points are extracted from the image frame. Optionally, the target feature points include the convex hull points and concave points of the target body part.

[0143] In some embodiments, the convex hull points of the target body part refer to the feature points corresponding to the relatively convex positions in the target body part, such as the fingertip positions. The concave points of the target body part refer to the feature points corresponding to the relatively concave positions in the target body part, such as the knuckle positions. Optionally, taking the target body part as the palm, the positions where the convex hull points of the target body part are located include the fingertip positions, the center positions of the finger joints, the center positions of the connections at the finger roots, etc., and the positions where the concave points of the target body part are located include the positions of the finger joints, the finger root positions, and the center position of the palm.

[0144] In some embodiments, the body feature area is determined based on the target feature points. The body feature area is the area in the target body part other than the fingers, or it can be understood that the body feature area is the area including the identity features. Optionally, the boundary line between the fingers and the body feature area is determined based on the target feature points. Based on this boundary line and the contour of the target body part, the body feature area is determined.

[0145] In summary, the method provided by the embodiments of the present application obtains an image frame corresponding to a target object by responding to the recognition of the target object in the camera preview screen; extracts the skin area and the corresponding contour in the image frame, and determines whether the target object is the target body part, so as to implement that the method provided by the embodiments of the present application can accurately collect identity features. In the case where the target object is not the target body part, repeated recognition is required instead of performing an invalid operation of extracting target feature points, which can reduce invalid operations in the case where the target object is not the target body part and is beneficial to improving the accuracy of identity feature collection.

[0146] In some embodiments, during the process of identity feature collection, the terminal will prompt the user through at least one prompt message. Optionally, the prompt message includes at least one of the following:

[0147] · The first prompt message;

[0148] · The second prompt message;

[0149] · The third prompt message.

[0150] In some embodiments, the first prompt message is used to prompt the user to adjust the position of the target body part. Exemplarily, as Figure 11 shown, the above method further includes the following steps:

[0151] Step 420: When it is determined that the target object is the target body part and the contour of the target body part is incomplete, display the first prompt message.

[0152] It should be noted that step 420 is executed after the above step 332, that is, when it is determined that the target object is the target body part, by analyzing the contour of the target body part of the target body part, it is judged whether the contour of the target body part is complete. Optionally, by calculating the ratio of the area to the perimeter of the contour of the target body part, it is judged whether there is an interruption in the contour of the target body part. For example, when there is no interruption in the contour of the target body part, the ratio of the area to the perimeter of the contour of the target body part is 1:1.5; then when the calculated ratio of the area to the perimeter of the contour of the target body part is 1:1, it can be judged that there is an interruption in the contour of the target body part.

[0153] In some embodiments, when the contour of the target body part is incomplete, it may not be possible to accurately identify the body feature area. For example, when the contour of the target body part only includes the contour of a finger, the body feature area cannot be identified. Therefore, when it is determined that the target object is the target body part and the contour of the target body part is incomplete, a first prompt message is displayed. The first prompt message is used to remind the user to adjust the position of the target body part so that a complete contour of the target body part can be identified, thereby ensuring accurate identification of the body feature area.

[0154] Exemplarily, as Figure 12 shown, assuming that the target body part is a palm, when it is determined that the target object is a palm and the palm contour is incomplete, a first prompt message 18 is displayed, and the first prompt message 18 is used to prompt the user that "the palm is incomplete".

[0155] In some embodiments, the second prompt message is used to prompt the user to replace the target object. Exemplarily, as Figure 13 shown, the above method further includes the following steps:

[0156] Step 520: When it is determined that the target object is not the target body part, display a second prompt message.

[0157] In some embodiments, after the above step 331, when it is determined that the target object is not the target body part, a second prompt message is displayed. Or, when it is recognized that the target object is the target object and the target object is not the target body part, a second prompt message is displayed.

[0158] Exemplarily, as Figure 14 shown, assuming that the target body part is a palm, when it is determined that the target 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".

[0159] Optionally, when it is repeatedly determined that the target object is not the target body part, the second prompt message is repeatedly displayed until the user replaces the target object with the target body part.

[0160] In some embodiments, the third prompt message is used to prompt the user to adjust the light. Exemplarily, as Figure 15 shown, the above method further includes the following steps:

[0161] Step 620: Extract the light characteristics in the image frame;

[0162] In some embodiments, after step 320 above, more specifically, after obtaining an image frame of the target object, the light features in the image frame are extracted. In some embodiments, the light features include brightness and chromaticity. Optionally, the light brightness in the image frame is extracted. Optionally, the light chromaticity in the image frame is extracted.

[0163] Step 640: When the light features indicate that the light in the image frame does not meet the light threshold, display a third prompt message.

[0164] In some embodiments, the extracted light features are compared with the light threshold. When the light features indicate that the light in the image frame meets the light threshold, step 331 is continued; when the light features indicate that the light in the image frame does not meet the light threshold, a third prompt message is displayed. Optionally, the light threshold is preset or dynamically adjusted.

[0165] Exemplarily, as Figure 16 shown, when the light features in the image frame do not meet the light threshold, or in other words, 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 dim" or to prompt the user to adjust the light in the current acquisition environment.

[0166] The method provided by the embodiments of the present application prompts the user by displaying at least one prompt message, enabling timely reminder and adjustment by the user according to various situations during the acquisition of identity features, thereby ensuring that the process of acquiring identity features can proceed more smoothly.

[0167] In some embodiments, taking the palmprint acquisition process as an example, the method includes the following steps:

[0168] Step 2020: During the palmprint acquisition process, display the camera preview screen and the acquisition frame in the first display state;

[0169] In some embodiments, in response to a trigger operation on the palmprint acquisition client, the camera preview screen and the acquisition frame in the first display state are displayed. The trigger operation includes at least one of clicking, double-clicking, swiping left and right, swiping up and down, long pressing, hovering, face recognition, and voice recognition. It should be noted that the trigger operation includes but is not limited to the above-mentioned types. Those skilled in the art should be able to know that any operation that can achieve the above functions belongs to the protection scope of the embodiments of the present application.

[0170] In some embodiments, the camera preview screen and the acquisition frame in the first display state are displayed simultaneously. In some embodiments, the camera preview screen and the acquisition frame in the first display state are not displayed simultaneously. Optionally, the acquisition 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 acquisition frame in the first display state is displayed after the target object is recognized. Optionally, the camera preview screen is displayed after the acquisition frame in the first display state is displayed.

[0171] In some embodiments, the camera preview screen is a screen captured by the camera in real time. Optionally, the camera preview screen is displayed full screen on the terminal screen. Optionally, the camera preview screen is displayed within a target area on the terminal screen. The target area is preset or the target area is dynamically changing. For example, the target area is the middle one-third area of the terminal screen. In the embodiments of the present application, the case where the camera preview screen is displayed full screen on the terminal screen is taken as an example for description.

[0172] In some embodiments, the acquisition frame in the first display state is determined based on device parameters related to the terminal. Exemplarily, the device parameters include camera parameters and picture imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle range, distortion, chromatic aberration, and sharpness. The picture imaging parameters are determined by pictures actually captured by the terminal. In some embodiments, as Figure 3 shown, device parameters of different devices are collected in advance, and then the different devices are classified based on the device parameters, such as being classified into Class A, Class B, Class C, and Class D. Each class corresponds to respective acquisition frame parameters, and the acquisition frame parameters include at least one of the display size, display position, and display form for indicating the display of the acquisition frame on the palmprint entry interface. The acquisition frame parameters are stored in the server 120. In some embodiments, when the terminal 110 starts palmprint acquisition, it sends a request to the server 120 to call the acquisition frame parameters. The server 120 sends the corresponding acquisition frame parameters to the terminal 110 according to the class to which the terminal 110 belongs. The terminal 110 displays the acquisition frame in the first display state based on the received acquisition frame parameters.

[0173] Optionally, the display shape of the acquisition frame in the first display state is preset or dynamically changed. For example, at least two display shapes of the acquisition frame in the first display state are provided for selection, including at least two of a circle, a square, and a trapezoid. If the preset display shape of the acquisition frame in the first display state is a circle, the user can also choose to modify the display shape of the acquisition frame in the first display state to a square. Optionally, the display size of the acquisition frame in the first display state is preset or dynamically changed. For example, the display size of the acquisition frame in the first display state is one-third of the terminal screen. Optionally, the display position of the acquisition frame in the first display state is preset or dynamically changed. For example, the acquisition frame in the first display state is displayed at the center of the terminal screen.

[0174] In some embodiments, the first display state is mainly used to distinguish from the second display state, and the first display state is different from the second display state. Optionally, the first display state is a first color, such as black; then 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; then the second display state is a second display entity, or a display entity other than the first display entity, such as a dotted line.

[0175] Exemplarily, as Figure 2 shown, during the palmprint acquisition process, the camera preview screen 11 and the acquisition frame 12 in the first display state are displayed.

[0176] Step 2040: In response to recognizing the palm center area in the camera preview screen, display a follow-up frame on the palm center area;

[0177] In some embodiments, in response to recognizing the palm center area in the camera preview screen, a follow-up frame is displayed. The follow-up frame follows the palm center area. It should be understood that the follow-up frame is used to frame the palm center area in the camera preview screen, and the display shape, display size, and display position of the follow-up frame change following the palm center area.

[0178] In some embodiments, the display state of the follow-up frame is preset. Optionally, the display state of the follow-up frame is the first display state, that is, the display state of the follow-up frame is the same as the start display state of the acquisition frame. Optionally, the display state of the follow-up frame is the second display state, that is, the display state of the follow-up frame is the same as the final display state of the acquisition frame. Optionally, the display state of the follow-up 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 follow-up frame is also the same as the first display state. When the relative position between the follow-up frame and the acquisition frame of the first display state meets the acquisition condition, the first display state switches to the second display state. Optionally, the display state of the follow-up frame is the third display state, that is, the display state of the follow-up frame is different from the display state of the acquisition frame. For example, when 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 follow-up frame is yellow.

[0179] In some embodiments, the display state of the follow frame changes dynamically. Optionally, the display state of the follow frame changes with the change of the distance between the palm area and the camera. 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 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 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 frame changes from a color close to red to a color that is significantly different from red (such as yellow).

[0180] 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.

[0181] In some embodiments, the follow sound changes dynamically. For example, the follow sound changes with the change of the follow frame. Optionally, the urgency of the follow sound changes with the change of the distance between the palm area and the camera. The urgency of the follow sound is positively correlated with the distance between the palm area and the camera. When the palm area is close to the camera, the follow sound becomes more and more urgent; when the palm area is far away from the camera, the follow sound becomes more and more gentle. Optionally, the pitch of the follow sound changes with the change of the distance between the palm area and the camera. The pitch of the follow sound is positively 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 sound is higher; when the palm area is far away from the camera, the pitch of the follow sound is lower.

[0182] In some embodiments, a special effect mask is displayed while displaying a follow frame. The special effect mask is attached to the palm area. The special effect mask is used to prompt the user that a follow frame is displayed, and can improve the fun of guiding the user through special effects. Optionally, the special effect mask is preset. For example, the special effect mask is a flower, which means "blooming in the palm". Optionally, the special effect mask is dynamically changing. Optionally, the display effect of the special effect 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 effect 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.

[0183] 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.

[0184] In some embodiments, it can also be understood that the following frame is used to follow the projection of the feature frame of the palm area in the camera preview screen, and the feature frame is on the plane where the palm area is located and is used to frame the palm area.

[0185] For example, Figure 5 As shown, assuming that the plane where the terminal screen is located is the xoz plane, when the plane where the palm area is located is parallel to the plane where the terminal screen is located, the following frame 13 is the feature frame 15, and both the following frame 13 and the feature frame 15 are circular. When the plane where the palm area is located intersects with the plane where the terminal screen is located, for example, Figure 6 As shown, when the plane where the palm area is located is the xoz' plane, the following frame 13 is the projection of the feature frame 15 on the terminal screen. The feature frame 15 is a circle, and the following frame 13 is an ellipse after the projection of the feature frame 15.

[0186] 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, then the shape of the feature frame is also circular.

[0187] In some embodiments, in response to identifying the palm area, a reference point on the palm area is used as the center point of the follow-up frame and a follow-up frame is displayed. Optionally, the reference point is the center point on the palm area, such as the center point of the palm area.

[0188] In some embodiments, in response to recognizing the palm area, a follow-up frame is displayed with the target size as the size of the follow-up frame. Wherein, the target size is associated with the distance between the palm area and the camera. In some embodiments, the target size has a negative correlation 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 target size; the closer the distance between the palm area and the camera, the larger the target size. Exemplarily, as Figure 5 and Figure 7 shown, 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 the first target size to the second target size.

[0189] In some embodiments, in response to the palm area following the palm and tilting or translating or rotating at least one of them, the displayed follow-up frame is updated so that the center point of the follow-up frame and the reference point on the palm area are kept consistent. The center point of the updated follow-up frame coincides with the reference point of the palm area. Optionally, in response to the palm area following the palm and tilting, the displayed follow-up frame is updated. Optionally, in response to the palm area following the palm and translating, the displayed follow-up frame is updated. Optionally, in response to the palm area following the palm and rotating, the displayed follow-up frame is updated.

[0190] Step 2060: In response to the relative position between the follow-up frame and the acquisition frame in the first display state satisfying the acquisition condition, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0191] In some embodiments, the acquisition conditions include at least one of the following:

[0192] · The shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state;

[0193] · The size of the follow-up frame is the same as the size of the acquisition frame in the first display state;

[0194] · The ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to the ratio threshold;

[0195] · The intersecting area between the follow-up frame and the acquisition frame in the first display state is greater than or equal to the area threshold;

[0196] · The distance between the center of the follow-up frame and the center of the acquisition frame in the first display state is less than the distance threshold;

[0197] · The difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state is less than the length difference threshold;

[0198] · The angle between the plane where the follow-up frame is located and the plane where the acquisition frame in the first display state is located is less than the angle difference threshold.

[0199] In some embodiments, in response to the shape of the follow frame being the same as the shape of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Since the follow frame is the projection of the feature frame in the camera preview screen, when the plane where the palm area is located is parallel to the plane where the terminal screen is located, the shape of the follow frame and the shape of the acquisition frame in the first display state will be the same. At this time, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0200] In some embodiments, in response to the size of the follow frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the size of the follow frame here can be understood as the area size of the follow frame, that is, in response to the area size of the follow frame being the same as the area size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Or, the size of the follow frame here can also be understood as the size in the case where the shape of the follow frame is the same as the shape of the acquisition frame in the first display state, that is, in response to the shape of the follow frame being the same as the shape of the acquisition frame in the first display state, and the size of the follow frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0201] In some embodiments, in response to the ratio of the area of the follow frame to the area of the acquisition frame in the first display state being greater than or equal to a ratio threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the area of the acquisition frame in the first display state remains unchanged after the acquisition frame in the first display state is displayed. And the area of the follow frame changes with the update of the follow frame. In some embodiments, the ratio threshold is preset or dynamically changed. For example, if the ratio threshold is four fifths, then in response to the ratio of the area of the follow frame to the area of the acquisition frame in the first display state being greater than or equal to four fifths, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0202] In some embodiments, in response to the intersecting area between the follow frame and the acquisition frame in the first display state being greater than or equal to an area threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition 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 Figure 8 shown, in response to the area of the intersecting region 16 where the follow frame 13 intersects with the acquisition frame 12 in the first display state being greater than or equal to 2 square centimeters, the acquisition frame 12 in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0203] In some embodiments, in response to the distance between the center of the follow-up frame and the center of the acquisition frame in the first display state being less than a distance threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. In some embodiments, the distance threshold is preset or dynamically variable. For example, the distance threshold is 2 cm. Exemplarily, as Figure 8 shown, in response to the distance 17 between the center of the follow-up frame 13 and the center of the acquisition frame 12 in the first display state being less than 2 cm, the acquisition frame 12 in the first display state is switched to the acquisition frame in the second display state.

[0204] In some embodiments, when the acquisition frame in the first display state is circular and the follow-up frame is circular, in response to the difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state being less than a length difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. In some embodiments, the length difference threshold is preset or dynamically variable. For example, if the length difference threshold is 1 cm, then in response to the difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state being less than 1 cm, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. It should be understood that when the acquisition frame in the first display state is circular and the follow-up frame is circular, that is, the shapes of the acquisition frame in the first display state and the follow-up frame are the same, then the plane where the palm area is located is parallel to the plane where the terminal screen is located.

[0205] In some embodiments, in response to the angle between the plane where the palm area is located and the plane where the acquisition frame in the first display state is located being less than an angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Or 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 the angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Among them, the follow-up 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 dynamically variable. 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 acquisition frame in the first display state is located being less than 30 degrees, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0206] In some embodiments, the above acquisition conditions can be a combination of the above n conditions, where n is an integer greater than 1. For example, the acquisition condition is that the shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to a ratio threshold. Then in response to the shape of the follow-up frame being the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state being greater than or equal to the ratio threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0207] In summary, the method provided by the embodiment of the present application provides a method for collecting palm prints. Since the display position of the follow frame changes with the plane where the palm center area is located and the distance between the palm center area and the camera, by guiding the user to adjust the follow frame, that is, it is possible to guide the user to adjust the plane where the palm center area is located and the distance between the palm center area and the camera. Further, by guiding the user to adjust the relative position between the follow frame and the collection frame in the first display state to meet the collection conditions, it is possible to avoid the user blindly making adjustments, which is beneficial to improving the efficiency of the user collecting palm prints.

[0208] The method provided by the embodiment of the present application also displays the follow frame with a reference point on the palm center area as the center point of the follow frame, so that the follow frame always changes based on the change of the palm center area. Thus, when the palm center area undergoes dynamic changes, the follow frame can be adjusted in a timely manner. For example, when the palm center area follows the palm to tilt or translate or rotate at least one of them, the follow frame can be updated in a timely manner, thereby providing real-time guidance for the user.

[0209] The method provided by the embodiment of the present application also displays the follow frame with a target size as the size of the follow frame, so that the size of the follow frame is determined according to the distance between the palm center area and the camera. Thus, the size of the follow frame can be dynamically adjusted to ensure providing real-time guidance for the user.

[0210] Before the above step 2040, the following steps are further included:

[0211] Step 3020: In response to recognizing a target object in the camera preview screen, obtain an image frame corresponding to the target object;

[0212] In some embodiments, the target object is a palm or the target object is not a palm. Optionally, in response to recognizing a palm in the camera preview screen, obtain an image frame corresponding to the palm. Or, in response to recognizing an object other than a palm in the camera preview screen, obtain an image frame corresponding to the recognized object.

[0213] In some embodiments, the image frame is a preprocessed image frame. Optionally, the preprocessing steps include at least one of color space conversion, binarization, filtering, and edge detection. In some embodiments, the image frame is an un-preprocessed image frame. The preprocessing operation is used to help reduce noise and background interference in the image frame, which is beneficial to highlighting features in the image frame.

[0214] In some embodiments, based on the obtained image frame, determine whether the target object is a palm. Exemplarily, the above method further includes the following steps:

[0215] Step 3031: Extract the skin area in the image frame and extract the contour of the skin area;

[0216] In some embodiments, the skin area in the image frame is extracted based on a color threshold. Optionally, the image frame is converted from a first color space to a second color space, where the amount of color information in the first color space and the second color space is different. Exemplarily, the first color space is the Red Green Blue (RGB) color space, and the second color space is the Hue Saturation Value (HSV) color space.

[0217] Optionally, the color threshold is preset. The color threshold is used to distinguish the skin area and the non-skin area in the image frame. In some embodiments, when the color difference between the skin area and the non-skin area in the image frame is obvious, 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 obvious, the image frame is converted from the first color space to the second color space to highlight the color difference between the skin area and the non-skin area, thereby realizing the extraction of the skin area from the image frame.

[0218] In some embodiments, the contour of the skin area is extracted by an edge detection algorithm. Optionally, the contour of the skin area is extracted by the Canny algorithm. Optionally, the contour of the skin area is extracted by the Sobel algorithm. In some embodiments, the Canny algorithm is a standard algorithm widely used in edge detection, and its goal is to find an optimal edge detection solution or locate the position with the strongest change in gray intensity in an image. The optimal edge detection is mainly evaluated by three criteria: low error rate, high localization, and minimum response. In some embodiments, the Sobel algorithm is mainly used for edge detection, and technically, it operates on the gray approximation value of the image brightness function through a set of discrete difference operators.

[0219] In some embodiments, it is determined whether the target object is a palm according to the contour of the skin area.

[0220] Step 3032: When the contour of the skin area corresponds to the palm contour, it is determined that the target object is a palm;

[0221] In some embodiments, the contour of the skin area is compared with the palm contour. When the contour of the skin area corresponds to the palm contour, it is determined that the target object is a palm; when the contour of the skin area does not correspond to the palm contour, it is determined that the target object is not a palm.

[0222] In some embodiments, the palm contour corresponds to features such as shape, area, perimeter, etc. Optionally, by comparing the shape of the contour of the skin area with the shape of the palm contour, it is determined whether the target object is a palm. Optionally, there is a corresponding relationship between the features of the palm contour. For example, when the area corresponding to the palm contour is 10 square centimeters, the corresponding perimeter is 15 centimeters; when the area corresponding to the palm contour is 20 square centimeters, the corresponding perimeter is 30 centimeters.

[0223] In some embodiments, when it is determined that the target object is a palm, the following step 3040 is continued. When it is determined that the target object is not a palm, the above steps are repeated until it is determined that the target object is a palm.

[0224] Step 3040: When it is determined that the target object is a palm, palm feature points are extracted from the image frame, and the palm center area is determined based on the palm feature points.

[0225] In some embodiments, when it is determined that the target object is a palm, palm feature points are extracted from the image frame. Optionally, the palm feature points include palm convex hull points and palm concave points.

[0226] In some embodiments, the palm convex hull point refers to the feature point corresponding to the relatively convex position in the palm, such as the fingertip position. The palm concave point refers to the feature point corresponding to the relatively concave position in the palm, such as the knuckle position. Optionally, taking the palm as an example, the positions where the palm convex hull points are located include the fingertip position, the center position of the finger joint, the center position of the connection at the finger root, etc., and the positions where the palm concave points are located include the finger joint position, the finger root position, and the center position of the palm.

[0227] In some embodiments, the palm center area is determined based on the palm feature points. The palm center area is the area in the palm excluding the fingers, or it can be understood that the palm center area is the area including the palm print. Optionally, the boundary line between the fingers and the palm center area is determined based on the palm feature points. Based on this boundary line and the palm contour, the palm center area is determined.

[0228] In summary, the method provided by the embodiments of the present application, by responding to the recognition of a target object in the camera preview screen, obtains the image frame corresponding to the target object; extracts the skin area in the image frame and the corresponding contour of the skin area, and determines whether the target object is a palm, so as to realize that the method provided by the embodiments of the present application can accurately collect palm prints. When the target object is not a palm, repeated recognition is required instead of performing invalid operations of extracting palm feature points, which can reduce invalid operations when the target object is not a palm and is beneficial to improving the accuracy of palm print collection.

[0229] In some embodiments, during the process of palmprint acquisition, the terminal will prompt the user through at least one prompt message. Optionally, the prompt message includes at least one of the following:

[0230] · The first prompt message;

[0231] · The second prompt message;

[0232] · The third prompt message.

[0233] In some embodiments, the first prompt message is used to prompt the user to adjust the position of the palm. Exemplarily, the above method further includes the following steps:

[0234] Step 4020: When it is determined that the target object is a palm and the palm contour is incomplete, display the first prompt message.

[0235] It should be noted that step 4020 is executed after the above step 3032, that is, when it is determined that the target object is a palm, by analyzing the palm contour of the palm, it is judged whether the palm contour is complete. Optionally, by calculating the ratio of the area to the perimeter of the palm contour, it is judged whether the palm contour is interrupted. For example, when the palm contour is not interrupted, the ratio of the area to the perimeter of the palm contour is 1:1.5; then when the calculated ratio of the area to the perimeter of the palm contour is 1:1, it can be judged that the palm contour is interrupted.

[0236] In some embodiments, when the palm contour is incomplete, it may not be possible to accurately identify the palm center area. For example, when the palm contour only includes the finger contours, the palm center area cannot be recognized. Therefore, when it is determined that the target object is a palm and the palm contour is incomplete, display the first prompt message. By the first prompt message, the user is reminded to adjust the position of the palm so that a complete palm contour can be recognized, thereby ensuring that the palm center area can be accurately recognized.

[0237] Exemplarily, as Figure 12 shown, when it is determined that the target object is a palm and the palm contour is incomplete, display the first prompt message 18, and the first prompt message 18 is used to prompt the user that "the palm is incomplete".

[0238] In some embodiments, the second prompt message is used to prompt the user to replace the target object. Exemplarily, the above method further includes the following steps:

[0239] Step 5020: When it is determined that the target object is not a palm, display the second prompt message.

[0240] In some embodiments, after step 3031 above, when it is determined that the target object is not a palm, a second prompt message is displayed. Or, in response to the recognized target object being a target object and the target object not being a palm, a second prompt message is displayed.

[0241] Exemplarily, such as Figure 14 As shown, when it is determined that the target 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 "no palm is recognized".

[0242] Optionally, when it is repeatedly determined that the target object is not a palm, the second prompt message is repeatedly displayed until the user replaces the target object with a palm.

[0243] In some embodiments, a third prompt message is used to prompt the user to adjust the light. Exemplarily, the above method further includes the following steps:

[0244] Step 6020: Extract the light characteristics in the image frame;

[0245] In some embodiments, after step 3020 above, more specifically, after obtaining the image frame of the target object, the light characteristics in the image frame are extracted. In some embodiments, the light characteristics include brightness and chromaticity. Optionally, the light brightness in the image frame is extracted. Optionally, the light chromaticity in the image frame is extracted.

[0246] Step 6040: Display a third prompt message when the light characteristics indicate that the light in the image frame does not meet the light threshold.

[0247] In some embodiments, the extracted light characteristics are compared with the light threshold. When the light characteristics indicate that the light in the image frame meets the light threshold, step 3031 is continued; when the light characteristics indicate that the light in the image frame does not meet the light threshold, a third prompt message is displayed. Optionally, the light threshold is preset or dynamically adjusted.

[0248] Exemplarily, such as Figure 16 As shown, when the light characteristics in the image frame do not meet the light threshold, or understood as, when the light in the acquired acquisition image 51 is less or darker, a third prompt message 50 is displayed, and the third prompt message 50 is used to prompt the user that "the light is dim", or to prompt the user to adjust the light in the current acquisition environment.

[0249] The method provided by the embodiments of the present application prompts the user by displaying at least one prompt message, so that during the palmprint acquisition process, the user can be timely reminded to make adjustments according to various situations, thereby ensuring that the palmprint acquisition process can be more smooth.

[0250] In some embodiments, taking the face acquisition process as an example, the method includes the following steps:

[0251] Step 20020: During the face feature acquisition process, display the camera preview screen and the acquisition frame in the first display state;

[0252] In some embodiments, in response to a trigger operation on the face feature acquisition client, display the camera preview screen and the acquisition frame in the first display state. The trigger operation includes at least one of single click, double click, left and right swipe, up and down swipe, long press, hover, face recognition, and voice recognition. It should be noted that the trigger operation includes but is not limited to the above-mentioned ones, and those skilled in the art should be able to know that any operation that can achieve the above functions belongs to the protection scope of the embodiments of the present application.

[0253] In some embodiments, the camera preview screen and the acquisition frame in the first display state are displayed simultaneously. In some embodiments, the camera preview screen and the acquisition frame in the first display state are not displayed simultaneously. Optionally, the acquisition frame in the first display state is displayed after the camera preview screen is displayed. For example, first display the camera preview screen, and then display the acquisition frame in the first display state after the target object is recognized. Optionally, the camera preview screen is displayed after the acquisition frame in the first display state is displayed.

[0254] In some embodiments, the camera preview screen is a live shot taken by the camera. Optionally, the camera preview screen is displayed full screen on the terminal screen. Optionally, the camera preview screen is displayed within a target area on the terminal screen. The target area is preset or the target area is dynamically changing. For example, the target area is the middle one-third area of the terminal screen. In the embodiments of the present application, the case where the camera preview screen is displayed full screen on the terminal screen is taken as an example for description.

[0255] In some embodiments, the acquisition frame in the first display state is determined based on device parameters related to the terminal. Exemplarily, the device parameters include camera parameters and picture imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle range, distortion, chromatic aberration, and sharpness. The picture imaging parameters are determined by the pictures actually taken by the terminal. In some embodiments, such as Figure 3As shown, device parameters of different devices are collected in advance, and then the different devices are classified based on the device parameters, such as being classified into Class A, Class B, Class C, and Class D. Each class corresponds to respective acquisition frame parameters, and the acquisition frame parameters include at least one of a display size, a display position, and a display form for indicating the display of the acquisition frame on the facial feature entry interface. The acquisition frame parameters are stored in the server 120. In some embodiments, when the terminal 110 starts facial feature acquisition, it sends a request to the server 120 to call the acquisition frame parameters. The server 120 sends the corresponding acquisition frame parameters to the terminal 110 according to the class to which the terminal 110 belongs. The terminal 110 displays the acquisition frame in the first display state based on the received acquisition frame parameters.

[0256] Optionally, the display shape of the acquisition frame in the first display state is preset or dynamically changed. For example, at least two display shapes of the acquisition frame in the first display state are provided for selection, including at least two of a circle, a square, and a trapezoid. If the preset display shape of the acquisition frame in the first display state is a circle, the user can also choose to modify the display shape of the acquisition frame in the first display state to a square. Optionally, the display size of the acquisition frame in the first display state is preset or dynamically changed. For example, the display size of the acquisition frame in the first display state is one-third of the terminal screen. Optionally, the display position of the acquisition frame in the first display state is preset or dynamically changed. For example, the acquisition frame in the first display state is displayed at the center position of the terminal screen.

[0257] In some embodiments, the first display state is mainly used to distinguish 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; then 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; then the second display state is a second display entity, or a display entity other than the first display entity, such as a dashed line.

[0258] Exemplarily, as Figure 2 shown, during the facial feature acquisition process, the camera preview screen 11 and the acquisition frame 12 in the first display state are displayed.

[0259] Step 20040: In response to identifying a facial area in the camera preview screen, display a follow-up frame on the facial area;

[0260] In some embodiments, in response to identifying a facial area in the camera preview screen, a follow-up frame is displayed. The follow-up frame follows the facial area. It should be understood that the follow-up frame is used to frame the facial area in the camera preview screen, and the display shape, display size, and display position of the follow-up frame change following the facial area.

[0261] In some embodiments, the display state of the follow-up frame is preset. Optionally, the display state of the follow-up frame is the first display state, that is, the display state of the follow-up frame is the same as the start display state of the acquisition frame. Optionally, the display state of the follow-up frame is the second display state, that is, the display state of the follow-up frame is the same as the final display state of the acquisition frame. Optionally, the display state of the follow-up 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 follow-up frame is also the same as the first display state. When the relative position between the follow-up frame and the acquisition frame of the first display state meets the acquisition condition, the first display state switches to the second display state. Optionally, the display state of the follow-up frame is the third display state, that is, the display state of the follow-up frame is different from the display state of the acquisition frame. For example, when 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 follow-up frame is yellow.

[0262] In some embodiments, the display state of the follow frame changes dynamically. Optionally, the display state of the follow frame changes with the change of the distance between the facial area and the camera. In some embodiments, the greater the distance between the facial area and the camera, the greater the difference between the display state of the follow 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 follow 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 follow frame changes from a color close to red to a color that is significantly different from red (such as yellow).

[0263] 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.

[0264] In some embodiments, the follow sound changes dynamically. For example, the follow sound changes with the change of the follow frame. Optionally, the urgency of the follow sound changes with the change of the distance between the facial area and the camera. The urgency of the follow sound is positively correlated with the distance between the facial area and the camera. When the facial area is close to the camera, the follow sound becomes more and more urgent; when the facial area is far away from the camera, the follow sound becomes more and more gentle. Optionally, the pitch of the follow sound changes with the change of the distance between the facial area and the camera. The pitch of the follow sound is positively 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 sound is higher; when the facial area is far away from the camera, the pitch of the follow sound is lower.

[0265] In some embodiments, a special effect mask is displayed while displaying a follow frame. The special effect mask is attached to the facial area. The special effect mask is used to prompt the user that a follow frame is displayed, and can improve the fun of guiding the user by means of special effects. Optionally, the special effect mask is preset. For example, the feature mask is a facial expression package. Optionally, the special effect mask is dynamically changing. Optionally, the display effect of the special effect mask can change with the change of the distance between the facial area and the camera. For example, the special effect mask is a facial expression package. When the facial area is far away from the camera, the facial expression package is reduced and displayed; when the facial area is close to the camera, the facial expression package is enlarged and displayed.

[0266] In some embodiments, the display shape of the following frame changes according to the plane where the facial region is located and the distance between the facial region and the camera.

[0267] In some embodiments, it can also be understood that the following frame is a projection of a feature frame for following the facial region in the camera preview image, and the feature frame is on the plane where the facial region is located and is used to frame the facial region.

[0268] For example, Figure 5 As shown, assuming that the plane where the terminal screen is located is the xoz plane, when the plane where the face area is located is parallel to the plane where the terminal screen is located, the following frame 13 is the feature frame 15, and both the following frame 13 and the feature frame 15 are circular. When the plane where the face area is located intersects with the plane where the terminal screen is located, for example, Figure 6 As shown, when the plane where the facial area is located is the xoz' plane, the following frame 13 is the projection of the feature frame 15 on the terminal screen. The feature frame 15 is a circle, and the following frame 13 is an ellipse after the projection of the feature frame 15.

[0269] 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, then the shape of the feature frame is also circular.

[0270] In some embodiments, in response to identifying a facial region, a reference point on the facial region is used as a center point of the following frame and a following frame is displayed. Optionally, the reference point is a center point on the facial region, such as a center point of the facial region.

[0271] In some embodiments, in response to identifying a face region, a follow-up frame is displayed with a target size as the size of the follow-up frame. The target size is associated with the distance between the face region and the camera. In some embodiments, the target size has a negative correlation with the distance between the face region and the camera. Optionally, the farther the distance between the face region and the camera, the smaller the target size; the closer the distance between the face region and the camera, the larger the target size. Exemplarily, as Figure 5 and Figure 7 shown, when the face 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 shrinks from the first target size to the second target size.

[0272] In some embodiments, in response to at least one of the face region tilting, translating, or rotating following the head, the displayed follow-up frame is updated so that the center point of the follow-up frame coincides with a reference point on the face region. The center point of the updated follow-up frame coincides with the reference point of the face region. Optionally, in response to the face region tilting following the head, the displayed follow-up frame is updated. Optionally, in response to the face region translating following the head, the displayed follow-up frame is updated. Optionally, in response to the face region rotating following the head, the displayed follow-up frame is updated.

[0273] Step 20060: In response to the relative position between the follow-up frame and the acquisition frame in the first display state satisfying the acquisition condition, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0274] In some embodiments, the acquisition condition includes at least one of the following:

[0275] · The shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state;

[0276] · The size of the follow-up frame is the same as the size of the acquisition frame in the first display state;

[0277] · The ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to a ratio threshold;

[0278] · The intersecting area between the follow-up frame and the acquisition frame in the first display state is greater than or equal to an area threshold;

[0279] · The distance between the center of the follow-up frame and the center of the acquisition frame in the first display state is less than a distance threshold;

[0280] · The difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state is less than a length difference threshold;

[0281] · The angle between the plane where the follow-up frame is located and the plane where the acquisition frame in the first display state is located is less than an angle difference threshold.

[0282] In some embodiments, in response to the shape of the follow frame being the same as the shape of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Since the follow frame is the projection of the feature frame in the camera preview screen, when the plane where the face region is located is parallel to the plane where the terminal screen is located, the shape of the follow frame and the shape of the acquisition frame in the first display state will be the same. At this time, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0283] In some embodiments, in response to the size of the follow frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the size of the follow frame here can be understood as the area size of the follow frame, that is, in response to the area size of the follow frame and the area size of the acquisition frame in the first display state being the same, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Or, the size of the follow frame here can also be understood as the size in the case where the shape of the follow frame is the same as the shape of the acquisition frame in the first display state, that is, in response to the shape of the follow frame being the same as the shape of the acquisition frame in the first display state, and the size of the follow frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0284] In some embodiments, in response to the ratio of the area of the follow frame to the area of the acquisition frame in the first display state being greater than or equal to a ratio threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the area of the acquisition frame in the first display state remains unchanged after the acquisition frame in the first display state is displayed. And the area of the follow frame changes with the update of the follow frame. In some embodiments, the ratio threshold is preset or dynamically changed. For example, if the ratio threshold is four-fifths, then in response to the ratio of the area of the follow frame to the area of the acquisition frame in the first display state being greater than or equal to four-fifths, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0285] In some embodiments, in response to the area of the intersection between the follow frame and the acquisition frame in the first display state being greater than or equal to an area threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition 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 Figure 8 shown, in response to the area of the intersection region 16 between the follow frame 13 and the acquisition frame 12 in the first display state being greater than or equal to 2 square centimeters, the acquisition frame 12 in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0286] In some embodiments, in response to the distance between the center of the follow - up frame and the center of the acquisition frame in the first display state being less than a distance threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. In some embodiments, the distance threshold is preset or dynamically variable. For example, the distance threshold is 2 centimeters. Exemplarily, as Figure 8 shown, in response to the distance 17 between the center of the follow - up frame 13 and the center of the acquisition frame 12 in the first display state being less than 2 centimeters, the acquisition frame 12 in the first display state is switched to the acquisition frame in the second display state.

[0287] In some embodiments, when the acquisition frame in the first display state is circular and the follow - up frame is circular, in response to the difference between the radius of the follow - up frame and the radius of the acquisition frame in the first display state being less than a length - difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. In some embodiments, the length - difference threshold is preset or dynamically variable. For example, if the length - difference threshold is 1 centimeter, then in response to the difference between the radius of the follow - up frame and the radius of the acquisition frame in the first display state being less than 1 centimeter, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. It should be understood that when the acquisition frame in the first display state is circular and the follow - up frame is circular, that is, the shapes of the acquisition frame in the first display state and the follow - up frame are the same, then the plane where the face region is located is parallel to the plane where the terminal screen is located.

[0288] In some embodiments, in response to the angle between the plane where the face region is located and the plane where the acquisition frame in the first display state is located being less than an angle - difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Or 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 the angle - difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Among them, the follow - up 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 dynamically variable. For example, if the angle - difference threshold is 30 degrees, then in response to the angle between the plane where the face region is located and the plane where the acquisition frame in the first display state is located being less than 30 degrees, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0289] In some embodiments, the above - mentioned acquisition conditions can be a combination of the above n conditions, where n is an integer greater than 1. For example, the acquisition condition is that the shape of the follow - up frame is the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow - up frame to the area of the acquisition frame in the first display state is greater than or equal to a ratio threshold. Then, in response to the shape of the follow - up frame being the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow - up frame to the area of the acquisition frame in the first display state being greater than or equal to the ratio threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0290] In summary, the method provided by the embodiments of the present application provides a method for collecting facial features. Since the display position of the follow-up frame changes with the plane where the facial area is located and the distance between the facial area and the camera, by guiding the user to adjust the follow-up frame, that is, it is possible to guide the user to adjust the plane where the facial area is located and the distance between the facial area and the camera. Further, by guiding the user to adjust the relative position between the follow-up frame and the acquisition frame in the first display state to meet the acquisition conditions, it is possible to avoid the user blindly making adjustments, which is beneficial to improving the efficiency of the user in collecting facial features.

[0291] The method provided by the embodiments of the present application also displays the follow-up frame with a reference point on the facial area as the center point of the follow-up frame, so that the follow-up frame always changes based on the change of the facial area. Thus, when the facial area undergoes dynamic changes, the follow-up frame can be adjusted in a timely manner. For example, when the facial area follows the head and undergoes at least one of tilting, translation, or rotation, the follow-up frame can be updated in a timely manner, thereby providing real-time guidance for the user.

[0292] The method provided by the embodiments of the present application also displays the follow-up frame with the target size as the size of the follow-up frame, so that the size of the follow-up frame is determined according to the distance between the facial area and the camera, thereby enabling dynamic adjustment of the size of the follow-up frame to ensure real-time guidance for the user.

[0293] Before the above step 20040, the following steps are further included:

[0294] Step 30020: In response to identifying a target object in the camera preview screen, obtain an image frame corresponding to the target object;

[0295] In some embodiments, the target object is the head or the target object is not the head. Optionally, in response to identifying the head in the camera preview screen, obtain an image frame corresponding to the head. Or, in response to identifying an object other than the head in the camera preview screen, obtain an image frame corresponding to the identified object.

[0296] In some embodiments, the image frame is a preprocessed image frame. Optionally, the preprocessing steps include at least one of color space conversion, binarization, filtering, and edge detection. In some embodiments, the image frame is an un-preprocessed image frame. The preprocessing operation is used to help reduce noise and background interference in the image frame, which is beneficial to highlighting the features in the image frame.

[0297] In some embodiments, based on the obtained image frame, determine whether the target object is the head. Exemplarily, the above method further includes the following steps:

[0298] Step 30031: Extract the skin region in the image frame and extract the contour of the skin region;

[0299] In some embodiments, the skin region in the image frame is extracted based on a color threshold. Optionally, the image frame is converted from a first color space to a second color space, and the amount of color information in the first color space and the second color space is different. Exemplarily, the first color space is the Red Green Blue (RGB) color space, and the second color space is the Hue Saturation Value (HSV) color space.

[0300] Optionally, the color threshold is preset. The color threshold is used to distinguish the skin region and the non-skin region in the image frame. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is obvious, the skin region in the image frame is directly extracted. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is not obvious, the image frame is converted from the first color space to the second color space to highlight the color difference between the skin region and the non-skin region in the image frame, so as to extract the skin region from the image frame.

[0301] In some embodiments, the contour of the skin region is extracted by an edge detection algorithm. Optionally, the contour of the skin region is extracted by the Canny algorithm. Optionally, the contour of the skin region is extracted by the Sobel algorithm. In some embodiments, the Canny algorithm is a standard algorithm widely used in edge detection, and its goal is to find an optimal edge detection solution or find the position where the gray intensity changes most strongly in an image. The optimal edge detection is mainly evaluated by three criteria: low error rate, high positioning accuracy, and minimum response. In some embodiments, the Sobel algorithm is mainly used for edge detection, and technically, it operates on the gray value approximation of the image brightness function through a set of discrete difference operators.

[0302] In some embodiments, it is determined whether the target object is a head according to the contour of the skin region.

[0303] Step 30032: When the contour of the skin region corresponds to the head contour, it is determined that the target object is a head;

[0304] In some embodiments, the contour of the skin region is compared with the head contour. When the contour of the skin region corresponds to the head contour, it is determined that the target object is a head; when the contour of the skin region does not correspond to the head contour, it is determined that the target object is not a head.

[0305] In some embodiments, the head contour corresponds to features such as shape, area, perimeter, etc. Optionally, by comparing the shape of the contour of the skin area with the shape of the head contour, it is determined whether the target object is a head. Optionally, there is a corresponding relationship between the features of the head contour. For example, when the area corresponding to the head contour is 10 square centimeters, the corresponding perimeter is 15 centimeters; when the area corresponding to the head contour is 20 square centimeters, the corresponding perimeter is 30 centimeters.

[0306] In some embodiments, when it is determined that the target object is a head, the following step 30040 is continued. When it is determined that the target object is not a head, the above steps are repeated until it is determined that the target object is a head.

[0307] Step 30040: When it is determined that the target object is a head, extract head feature points from the image frame, and determine the facial area based on the head feature points.

[0308] In some embodiments, when it is determined that the target 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.

[0309] In some embodiments, the head convex hull point refers to the feature point corresponding to the relatively convex position in the head, such as the fingertip position. The head concave point refers to the feature point corresponding to the relatively concave position in the head, such as the knuckle position. Optionally, taking the hand as an example of the head, the positions where the head convex hull points are located include the fingertip position, the center position of the finger joint, the center position of the connection at the finger root, etc., and the positions where the head concave points are located include the finger joint position, the finger root position, and the center position of the palm.

[0310] In some embodiments, the facial area is determined based on the head feature points. The facial area is the area in the head other than the fingers, or it can be understood that the facial area is the area including facial features. Optionally, the boundary line between the fingers and the facial area is determined based on the head feature points. Based on this boundary line and the head contour, the facial area is determined.

[0311] In summary, the method provided by the embodiments of the present application, by responding to the recognition of a target object in the camera preview screen, obtains the image frame corresponding to the target object; extracts the skin area in the image frame and the corresponding contour of the skin area, and determines whether the target object is a head, so as to realize that the method provided by the embodiments of the present application can accurately collect facial features. When the target object is not a head, repeated recognition is required instead of performing ineffective operations of extracting head feature points, which can reduce ineffective operations when the target object is not a head and is beneficial to improving the accuracy of facial feature collection.

[0312] In some embodiments, during the process of facial feature collection, the terminal will prompt the user through at least one prompt message. Optionally, the prompt message includes at least one of the following:

[0313] · The first prompt message;

[0314] · The second prompt message;

[0315] · The third prompt message.

[0316] In some embodiments, the first prompt message is used to prompt the user to adjust the position of the head. Exemplarily, the above method further includes the following steps:

[0317] Step 40020: When it is determined that the target object is the head and the head contour is incomplete, display the first prompt message.

[0318] It should be noted that step 40020 is executed after the above step 30032, that is, when it is determined that the target object is the head, by analyzing the head contour of the head, it is judged whether the head contour is complete. Optionally, by calculating the ratio of the area to the perimeter of the head contour, it is judged whether the head contour is interrupted. For example, when the head contour is not interrupted, the ratio of the area to the perimeter of the head contour is 1:1.5; then when the calculated ratio of the area to the perimeter of the head contour is 1:1, it can be judged that the head contour is interrupted.

[0319] In some embodiments, when the head contour is incomplete, it may not be possible to accurately identify the facial area. For example, when the head contour only includes the finger contour, the facial area cannot be recognized. Therefore, when it is determined that the target object is the head and the head contour is incomplete, display the first prompt message. Remind the user to adjust the position of the head through the first prompt message, so that a complete head contour can be recognized, thereby ensuring that the facial area can be accurately recognized.

[0320] Exemplarily, as Figure 12 shown, when it is determined that the target object is the head and the head contour is incomplete, display the first prompt message 18, and the first prompt message 18 is used to prompt the user that "the head is incomplete".

[0321] In some embodiments, the second prompt message is used to prompt the user to replace the target object. Exemplarily, the above method further includes the following steps:

[0322] Step 50020: When it is determined that the target object is not the head, display the second prompt message.

[0323] In some embodiments, after step 30031 above, when it is determined that the target object is not the head, a second prompt message is displayed. Or, in response to recognizing that the target object is the target object and the target object is not the head, a second prompt message is displayed.

[0324] Exemplarily, as Figure 14 shown, when it is determined that the target object is not the 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".

[0325] Optionally, when it is repeatedly determined that the target object is not the head, the second prompt message is repeatedly displayed until the user replaces the target object with the head.

[0326] In some embodiments, the third prompt message is used to prompt the user to adjust the light. Exemplarily, the above method further includes the following steps:

[0327] Step 60020: Extract the light characteristics in the image frame;

[0328] In some embodiments, after step 30020 above, more specifically, after obtaining the image frame of the target object, the light characteristics in the image frame are extracted. In some embodiments, the light characteristics include brightness and chromaticity. Optionally, the light brightness in the image frame is extracted. Optionally, the light chromaticity in the image frame is extracted.

[0329] Step 60040: Display a third prompt message when the light characteristics indicate that the light in the image frame does not meet the light threshold.

[0330] In some embodiments, the extracted light characteristics are compared with the light threshold. When the light characteristics indicate that the light in the image frame meets the light threshold, step 30031 is continued; when the light characteristics indicate that the light in the image frame does not meet the light threshold, a third prompt message is displayed. Optionally, the light threshold is preset or dynamically adjusted.

[0331] Exemplarily, as Figure 16 shown, when the light characteristics in the image frame do not meet the light threshold, or understood as, when the light in the acquired acquisition image 51 is less or darker, a third prompt message 50 is displayed, and the third prompt message 50 is used to prompt the user that "the light is dim", or to prompt the user to adjust the light in the current acquisition environment.

[0332] The method provided by the embodiments of the present application prompts the user by displaying at least one prompt message, enabling timely reminders to the user for adjustment according to various situations during the facial feature collection process, thereby ensuring that the facial feature collection process can be more smooth.

[0333] In an embodiment of the present application, an identity feature acquisition method is provided, which can intuitively and efficiently guide a user to input a target body part, and can view the current state of the target body part and the best input posture and distance in real time, thereby improving the input success rate. Specifically, as Figure 17 The method includes the following steps:

[0334] Step 20: The user enters an online acquisition process;

[0335] The user clicks or long-presses to open an identity feature acquisition client to start acquiring identity features.

[0336] Step 21: The terminal pulls acquisition frame parameters from the server;

[0337] The acquisition frame parameters include at least one of a display size, a display position, and a display form for indicating the display of the acquisition frame on the identity feature input interface.

[0338] Step 22: The user reads and agrees to the service agreement, and authenticates the identity;

[0339] Exemplarily, as Figure 18 shown, a first control 40 and a second control 41 are displayed. Among them, the first control 40 is used to trigger reading the service agreement, or agreeing to the service agreement or rejecting the service agreement. The second control 41 is used to trigger starting to acquire identity features. In response to the trigger operations on the first control 40 and the second control 41, an identity feature acquisition interface is displayed.

[0340] In some embodiments, in response to the trigger operations on the first control 40 and the second control 41, an identity authentication interface is displayed. Exemplarily, as Figure 19 shown, an identity authentication interface 42 is displayed. Among them, the identity authentication interface 42 includes a password control and / or a password display control. The password control is used to input a password. Optionally, the password control is a numeric password control and / or an alphabetic password control. The password display control is used to display the password input by the user.

[0341] Step 23: The terminal turns on the camera and displays an acquisition frame in a first display state;

[0342] The real-time preview image of the camera is displayed full screen, and the size of a suitable acquisition frame is calculated in combination with device parameters.

[0343] Specifically, turning on the camera to display the camera preview image and displaying an acquisition frame in a first display state are as described in the above step 220.

[0344] Step 24: The terminal displays a prompt message;

[0345] Specifically, for the prompt information, refer to the above-mentioned step 420, step 520, or step 620 and step 640.

[0346] Step 25: The terminal detects the body feature area and displays a follow-up frame.

[0347] The user extends the target body part, which is captured by the camera. The algorithm detects the body feature area and the tilt angle of the target body part in real time, and displays a follow-up frame. The follow-up frame changes as the user's target body part moves, getting larger when closer and smaller when farther away, and tilting as the target body part tilts.

[0348] Specifically, for the display of the follow-up frame, refer to the above-mentioned step 240.

[0349] In some embodiments, the follow-up frame drawing logic:

[0350] Assume that a set of coordinate points representing the body feature area has been obtained: (x1, y1), (x2, y2),..., (x n , y n ).

[0351] Filter the coordinate points: According to information such as the distance and angle between the concave feature points and the convex hull feature points, a set of coordinate points representing the body feature area can be filtered out. For example, select the wood Boao feature point from the feature points as the center of the body feature area, and then select the points within a certain range from the center as the coordinate points of the body feature area.

[0352] Smooth the coordinate points: A smoothing algorithm, such as mean filtering, median filtering, Gaussian filtering, etc., can be used to smooth the coordinate points to reduce the influence of noise. For example, the horizontal coordinate x and the vertical coordinate y of the coordinate points can be filtered separately.

[0353] Fit an ellipse by the least squares method to solve the parameters of the ellipse. The general equation of the ellipse is:

[0354] Ax 2 +Bxy+Cy 2 +Dx+Ey+F = 0

[0355] Among them, 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 through the above-mentioned coordinate points of the body feature area. In some embodiments, during the fitting process, it is also necessary to minimize the error function f:

[0356]

[0357] Take the partial derivative of f and set the partial derivative to zero, and solve the above ellipse equation to obtain the parameters of the fitted follow-up frame.

[0358] Step 26: The terminal responds to the coincidence of the follow-up frame and the acquisition frame in the first display state;

[0359] In some embodiments, in response to the coincidence of the follow-up frame and the acquisition frame in the first display state, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0360] The user cooperates to move the target body part so that the follow-up frame and the acquisition frame in the first display state face it. When aligned, the acquisition frame in the second display state is displayed, indicating that the target body part has reached the optimal input position, and preferably, an identity feature image is acquired.

[0361] Step 27: The terminal acquires an image frame corresponding to the body feature area;

[0362] In some embodiments, the image frame corresponding to the body feature area is an image frame that meets the preferred image quality conditions. In some embodiments, the image frame that meets the preferred image quality conditions can also be understood as an image frame that meets the multi-dimensional thresholds of the image. An identity feature image that meets the multi-dimensional thresholds of the image is acquired, and the multi-dimensional thresholds of the image include at least one of image quality, blur, richness of feature information, and exposure.

[0363] In some embodiments, when it is recognized that the identity feature image meets the multi-dimensional thresholds of the image, there are two strategies for confirmation at this time. Specifically, it is selected according to the product experience requirements.

[0364] Strategy 1: Require the user to place the target body part within the acquisition frame, and then start the preferred image quality. If the preference is successful, freeze and upload. By guiding the user to place the target body part within the acquisition frame, the user's input intention can be further confirmed.

[0365] Strategy 2: Do not require the user to place the target body part within the acquisition frame. As long as the outline of the target body part is recognized as complete and the image meets the multi-dimensional thresholds of the image, it can be input. At this time, even if the target body part is not placed within the acquisition frame, a better-quality identity feature image can still be acquired.

[0366] Step 28: The input is completed;

[0367] In some embodiments, a prompt message indicating successful input is displayed. Exemplarily, as Figure 20 shown, the fourth prompt message 43 is displayed.

[0368] In some embodiments, a fifth prompt message for prompting the user to activate the palm-sweeping service within the target time period is also displayed. Exemplarily, as Figure 20 shown, the fifth prompt message 44 is displayed.

[0369] Step 29: The user performs offline palm-sweeping;

[0370] Step 30: Server retrieval;

[0371] Step 31: Successful activation.

[0372] After the user completes the online entry and swipes their palm on the offline palm-sweeping device, the palm-sweeping device successfully captures clearer and better-quality color and infrared images of the user. Priority is given to retrieving and comparing the identity features in the color image with the online entry database. If a match is found, the user can directly use palm-sweeping, and at the same time, the terminal pushes a prompt to notify the user that the activation is completed.

[0373] Figure 21 The structural block diagram of an identity feature acquisition device provided by an exemplary embodiment of the present application is shown. The device includes:

[0374] A display module 2110, configured to display the camera preview screen and the acquisition frame in the first display state during the identity feature acquisition process.

[0375] In some embodiments, in response to a trigger operation on the identity feature acquisition client, the camera preview screen and the acquisition frame in the first display state are displayed. The trigger operation includes at least one of clicking, double-clicking, swiping left and right, swiping up and down, long-pressing, hovering, face recognition, and voice recognition. It should be noted that the trigger operation includes, but is not limited to, the above-mentioned ones. Those skilled in the art should be able to understand that any operation that can achieve the above functions belongs to the protection scope of the embodiments of the present application.

[0376] In some embodiments, the camera preview screen and the acquisition frame in the first display state are displayed simultaneously. In some embodiments, the camera preview screen and the acquisition frame in the first display state are not displayed simultaneously. Optionally, the acquisition 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 acquisition frame in the first display state is displayed after the target object is recognized. Optionally, the camera preview screen is displayed after the acquisition frame in the first display state is displayed.

[0377] In some embodiments, the camera preview screen is the real-time captured image of the camera. Optionally, the camera preview screen is displayed full-screen on the device screen. Optionally, the camera preview screen is displayed within a target area on the device screen. The target area is preset or the target area is dynamically changing. For example, the target area is the middle one-third area of the device screen. In the embodiments of the present application, the example of the camera preview screen being displayed full-screen on the device screen is used for illustration.

[0378] In some embodiments, the acquisition frame in the first display state is determined based on device parameters related to the device. Exemplarily, the device parameters include camera parameters and picture imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle range, distortion, chromatic aberration, and sharpness. The picture imaging parameters are determined by pictures actually taken by the device. In some embodiments, as Figure 3 shown, device parameters of different devices are collected in advance, and then the different devices are classified based on the device parameters, such as being classified into Class A, Class B, Class C, and Class D. Each class corresponds to respective acquisition frame parameters, and the acquisition frame parameters include at least one of a display size, a display position, and a display form for indicating the display of the acquisition frame on the identity feature entry interface. The acquisition frame parameters are stored in the server 120. In some embodiments, when starting identity feature acquisition, the device 110 sends a request to the server 120 to call the acquisition frame parameters. The server 120 sends the corresponding acquisition frame parameters to the device 110 according to the class to which the device 110 belongs. The device 110 displays the acquisition frame in the first display state based on the received acquisition frame parameters.

[0379] Optionally, the display shape of the acquisition frame in the first display state is preset or dynamically changed. For example, at least two display shapes of the acquisition frame in the first display state are provided for selection, including at least two of a circle, a square, and a trapezoid. If the preset display shape of the acquisition frame in the first display state is a circle, the user can also choose to modify the display shape of the acquisition frame in the first display state to a square. Optionally, the display size of the acquisition frame in the first display state is preset or dynamically changed. For example, the display size of the acquisition frame in the first display state is one-third of the screen of the device. Optionally, the display position of the acquisition frame in the first display state is preset or dynamically changed. For example, the acquisition frame in the first display state is displayed at the center position of the screen of the device.

[0380] In some embodiments, the first display state is mainly used to distinguish from the second display state, and the first display state is different from the second display state. Optionally, the first display state is a first color, such as black; then 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; then the second display state is a second display entity, or a display entity other than the first display entity, such as a dotted line.

[0381] Exemplarily, as Figure 2 shown, during the identity feature acquisition process, the camera preview screen 11 and the acquisition frame 12 in the first display state are displayed.

[0382] The display module 2110 is further configured to, in response to identifying a body feature area in the camera preview screen, display a follow-up frame on the body feature area.

[0383] In some embodiments, in response to identifying a body feature region in the camera preview screen, a follow frame is displayed. The follow frame follows the body feature region. It should be understood that the follow frame is used to frame the body feature region in the camera preview screen, and the display shape, display size, and display position of the follow frame change with the body feature region.

[0384] In some embodiments, the display state of the follow-up frame is preset. Optionally, the display state of the follow-up frame is the first display state, that is, the display state of the follow-up frame is the same as the start display state of the acquisition frame. Optionally, the display state of the follow-up frame is the second display state, that is, the display state of the follow-up frame is the same as the final display state of the acquisition frame. Optionally, the display state of the follow-up 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 follow-up frame is also the same as the first display state. When the relative position between the follow-up frame and the acquisition frame of the first display state meets the acquisition condition, the first display state switches to the second display state. Optionally, the display state of the follow-up frame is the third display state, that is, the display state of the follow-up frame is different from the display state of the acquisition frame. For example, when 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 follow-up frame is yellow.

[0385] In some embodiments, the display state of the follow frame changes dynamically. Optionally, the display state of the follow frame changes with the change of the distance between the body feature area and the camera. 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 follow 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 follow 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 follow frame changes from a color close to red to a color that is significantly different from red (such as yellow).

[0386] 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.

[0387] In some embodiments, the following sound is dynamically changed. For example, the following sound changes with the change of the following frame. Optionally, the rapidity of the following sound changes with the change of the distance between the body feature area and the camera. The rapidity of the following sound is positively correlated with the distance between the body feature area and the camera. When the body feature area is close to the camera, the following sound becomes more and more rapid; when the body feature area is far from the camera, the following sound becomes more and more gentle. Optionally, the pitch of the following sound changes with the change of the distance between the body feature area and the camera. The pitch of the following sound is positively 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 following sound is higher; when the body feature area is far from the camera, the pitch of the following sound is lower.

[0388] In some embodiments, while the following frame is displayed, a special effect mask layer is displayed. The special effect mask layer is attached to the body feature area. The special effect mask layer is used to prompt the user that the following frame is displayed and can improve the interest when guiding the user through special effects. Optionally, the special effect mask layer is preset. For example, when the body feature area is the palm center area, the special effect mask layer is a flower, meaning "flowers blooming in the palm"; when the body feature area is the facial area, the special effect mask layer is a facial emoji. Optionally, the special effect mask layer is dynamically changed. Optionally, the display effect of the special effect mask layer can change with the change of the distance between the body feature area and the camera. For example, when the body feature area is the palm center area and the special effect mask layer is a flower, when the palm center area is far from the camera, the flower is displayed in a reduced size; when the palm center area is close to the camera, the flower is displayed in an enlarged size.

[0389] In some embodiments, the display shape of the following frame changes according to the plane where the body feature area is located and the distance between the body feature area and the camera.

[0390] In some embodiments, it can also be understood that the following frame is the projection of the feature frame for following the body feature area in the camera preview screen, and the feature frame is used to frame the body feature area on the plane where the body feature area is located.

[0391] In some embodiments, the body feature area is the palm center area. In some embodiments, the body feature area is the facial area. In the embodiments of the present application, the palm center area is taken as an example for illustration.

[0392] Exemplarily, such as Figure 5As shown, assuming that the plane where the device screen is located is the xoz plane, when the plane where the body feature area is located is parallel to the plane where the device screen is located, the following box 13 is the feature box 15, and both the following box 13 and the feature box 15 are circular. When the plane where the body feature area is located intersects the plane where the device screen is located, for example, as Figure 6 shown, when the plane where the body feature area is located is the xoz' plane, the following box 13 is the projection of the feature box 15 on the device screen. The feature box 15 is circular, and the following box 13 is an ellipse after the projection of the feature box 15.

[0393] In some embodiments, the shape of the feature box is the same as the shape of the acquisition box in the first display state. For example, if the shape of the acquisition box in the first display state is circular, then the shape of the feature box is also circular.

[0394] In some embodiments, in response to recognizing the body feature area, the following box is displayed with a reference point on the body feature area as the center point of the following box. Optionally, the reference point is the center point on the body feature area, such as the center point of the palm area.

[0395] In some embodiments, in response to recognizing the body feature area, the following box is displayed with a target size as the size of the following box. Wherein, the target size is associated with the distance between the body feature area and the camera. In some embodiments, the target size has a negative correlation 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 target size; the closer the distance between the body feature area and the camera, the larger the target size. For example, as Figure 5 and Figure 7 shown, when the body feature area moves from a position close to the camera to a position far from the camera, the size of the following box 13 also shrinks from the first target size to the second target size.

[0396] In some embodiments, in response to the body feature area following the target body part to tilt or translate or rotate at least one of them, the display of the following box is updated so that the center point of the following box is consistent with the reference point on the body feature area. The center point of the updated following box coincides with the reference point of the body feature area. Optionally, in response to the body feature area following the target body part to tilt, the display of the following box is updated. Optionally, in response to the body feature area following the target body part to translate, the display of the following box is updated. Optionally, in response to the body feature area following the target body part to rotate, the display of the following box is updated.

[0397] In some embodiments, the target body part is the body part where the body feature area is located. Optionally, when the body feature area is the palm area, the target body part is the palm. Optionally, when the body feature area is the facial area, the target body part is the head. Optionally, when the body feature area is the fingertip area, the target body part is the finger. In the embodiments of the present application, taking the body feature area being the palm area and the target body part being the palm as an example for illustration.

[0398] The display module 2110 is further configured to, in response to the relative position between the follow frame and the acquisition frame in the first display state satisfying the acquisition condition, switch the display of the acquisition frame in the first display state to the acquisition frame in the second display state.

[0399] In some embodiments, the acquisition condition includes at least one of the following:

[0400] · The shape of the follow frame is the same as the shape of the acquisition frame in the first display state;

[0401] · The size of the follow frame is the same as the size of the acquisition frame in the first display state;

[0402] · The ratio of the area of the follow frame to the area of the acquisition frame in the first display state is greater than or equal to a ratio threshold;

[0403] · The intersecting area between the follow frame and the acquisition frame in the first display state is greater than or equal to an area threshold;

[0404] · The distance between the center of the follow frame and the center of the acquisition frame in the first display state is less than a distance threshold;

[0405] · The difference between the radius of the follow frame and the radius of the acquisition frame in the first display state is less than a length difference threshold;

[0406] · The angle between the plane where the follow frame is located and the plane where the acquisition frame in the first display state is located is less than an angle difference threshold.

[0407] In some embodiments, in response to the shape of the follow frame being the same as the shape of the acquisition frame in the first display state, the display of the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Since the follow frame is the projection of the feature frame in the camera preview screen, when the plane where the body feature area is located is parallel to the plane where the device screen is located, the shape of the follow frame will be the same as the shape of the acquisition frame in the first display state, and at this time, the display of the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0408] In some embodiments, in response to the size of the follow-up frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the size of the follow-up frame here can be understood as the area size of the follow-up frame, that is, in response to the area size of the follow-up frame being the same as the area size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Or, the size of the follow-up frame here can also be understood as the size in the case where the shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state, that is, in response to the shape of the follow-up frame being the same as the shape of the acquisition frame in the first display state, and the size of the follow-up frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0409] In some embodiments, in response to the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state being greater than or equal to a ratio threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the area of the acquisition frame in the first display state remains unchanged after the acquisition frame in the first display state is displayed. And the area of the follow-up frame changes as the follow-up frame is updated. In some embodiments, the ratio threshold is preset or dynamically changed. For example, if the ratio threshold is four fifths, then in response to the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state being greater than or equal to four fifths, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0410] In some embodiments, in response to the area of the intersection between the follow-up frame and the acquisition frame in the first display state being greater than or equal to an area threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition 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 Figure 8 shown, in response to the area of the intersection region 16 between the follow-up frame 13 and the acquisition frame 12 in the first display state being greater than or equal to 2 square centimeters, the acquisition frame 12 in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0411] In some embodiments, in response to the distance between the center of the follow-up frame and the center of the acquisition frame in the first display state being less than a distance threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition 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 Figure 8 shown, in response to the distance 17 between the center of the follow-up frame 13 and the center of the acquisition frame 12 in the first display state being less than 2 centimeters, the acquisition frame 12 in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0412] In some embodiments, when the acquisition frame in the first display state is circular and the follow-up frame is circular, in response to the difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state being less than the length difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. In some embodiments, the length difference threshold is preset or dynamically variable. For example, if the length difference threshold is 1 centimeter, then in response to the difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state being less than 1 centimeter, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. It should be understood that when the acquisition frame in the first display state is circular and the follow-up frame is circular, that is, the shapes of the acquisition frame in the first display state and the follow-up frame are the same, then the plane where the body feature region is located is parallel to the plane where the device screen is located.

[0413] In some embodiments, in response to the angle between the plane where the body feature region is located and the plane where the acquisition frame in the first display state is located being less than the angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Or it can be understood that in response to the angle between the plane where the feature frame is located and the plane where the device screen is located being less than the angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Among them, the follow-up frame is the projection of the feature frame on the plane where the device screen is located. In some embodiments, the angle difference threshold is preset or dynamically variable. For example, if the angle difference threshold is 30 degrees, then in response to the angle between the plane where the body feature region is located and the plane where the acquisition frame in the first display state is located being less than 30 degrees, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0414] In some embodiments, the above acquisition conditions can be a combination of the above n conditions, where n is an integer greater than 1. For example, the acquisition condition is that the shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to the ratio threshold. Then in response to the shape of the follow-up frame being the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state being greater than or equal to the ratio threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0415] In some embodiments, the device further includes:

[0416] An acquisition module 2120, configured to obtain an image frame corresponding to a target object in response to identifying the target object in the camera preview screen.

[0417] In some embodiments, the target object is the target body part or the target object is not the target body part. Optionally, in response to identifying the target body part in the camera preview screen, an image frame corresponding to the target body part is acquired. Or, in response to identifying an object other than the target body part in the camera preview screen, an image frame corresponding to the identified object is acquired.

[0418] In some embodiments, the image frame is a preprocessed image frame. Optionally, the preprocessing steps include at least one of color space conversion, binarization, filtering, and edge detection. In some embodiments, the image frame is an un-preprocessed image frame. The preprocessing operation is used to help reduce noise and background interference in the image frame, which is beneficial to highlighting features in the image frame.

[0419] In some embodiments, based on the acquired image frame, it is determined whether the target object is the target body part.

[0420] In some embodiments, the device further includes:

[0421] An extraction module 2130, configured to extract the skin region in the image frame and extract the contour of the skin region.

[0422] In some embodiments, the skin region in the image frame is extracted based on a color threshold. Optionally, the image frame is converted from a first color space to a second color space, and the amount of color information in the first color space and the second color space is different. Exemplarily, the first color space is the Red Green Blue (RGB) color space, and the second color space is the Hue Saturation Value (HSV) color space.

[0423] Optionally, the color threshold is preset. The color threshold is used to distinguish the skin region and the non-skin region in the image frame. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is obvious, the skin region in the image frame is directly extracted. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is not obvious, the image frame is converted from the first color space to the second color space to highlight the color difference between the skin region and the non-skin region in the image frame, so as to extract the skin region from the image frame.

[0424] In some embodiments, the contour of the skin area is extracted through an edge detection algorithm. Optionally, the contour of the skin area is extracted through the Canny algorithm. Optionally, the contour of the skin area is extracted through the Sobel algorithm. In some embodiments, the Canny algorithm is a standard algorithm widely used in edge detection, and its goal is to find an optimal edge detection solution or locate the position with the strongest change in gray intensity in an image. The optimal edge detection is mainly evaluated by three criteria: low error rate, high localization, and minimum response. In some embodiments, the Sobel algorithm is mainly used for edge detection and technically approximates the gray value of the image brightness function through a set of discrete difference operators.

[0425] In some embodiments, it is determined whether the target object is the target body part according to the contour of the skin area.

[0426] In some embodiments, the device further includes:

[0427] A determination module 2140, configured to determine that the target object is the target body part when the contour of the skin area corresponds to the contour of the target body part.

[0428] In some embodiments, the contour of the skin area is compared with the contour of the target body part. When the contour of the skin area corresponds to the contour of the target body part, it is determined that the target object is the target body part; when the contour of the skin area does not correspond to the contour of the target body part, it is determined that the target object is not the target body part.

[0429] In some embodiments, the contour of the target body part corresponds to features such as shape, area, and perimeter. Optionally, it is determined whether the target object is the target body part by comparing the shape of the contour of the skin area with the shape of the contour of the target body part. Optionally, there is a corresponding relationship between the features of the contour of the target body part. For example, when the area corresponding to the contour of the target body part is 10 square centimeters, the corresponding perimeter is 15 centimeters; when the area corresponding to the contour of the target body part is 20 square centimeters, the corresponding perimeter is 30 centimeters.

[0430] In some embodiments, when it is determined that the target object is the target body part, target feature points are continuously extracted from the image frame. When it is determined that the target object is not the target body part, the target object is repeatedly recognized until it is determined that the target object is the target body part.

[0431] The extraction module 2130 is further configured to, when it is determined that the target object is the target body part, extract target feature points from the image frame and determine a body feature area based on the target feature points.

[0432] In some embodiments, when it is determined that the target object is the target body part, target feature points are extracted from the image frame. Optionally, the target feature points include convex hull points of the target body part and concave points of the target body part.

[0433] In some embodiments, the convex hull points of the target body part refer to the feature points corresponding to the relatively convex positions in the target body part, such as the fingertip positions. The concave points of the target body part refer to the feature points corresponding to the relatively concave positions in the target body part, such as the knuckle positions. Optionally, taking the palm as the target body part, the positions where the convex hull points of the target body part are located include fingertip positions, the central positions of finger joints, the central positions of the connections at the finger roots, etc., and the positions where the concave points of the target body part are located include the positions of finger joints, the positions of finger roots, and the central position of the palm.

[0434] In some embodiments, a body feature region is determined based on the target feature points. The body feature region is the region of the target body part excluding the fingers, or it can be understood that the body feature region is the region including identity features. Optionally, a boundary line between the fingers and the body feature region is determined based on the target feature points. Based on this boundary line and the contour of the target body part, the body feature region is determined.

[0435] In some embodiments, during the process of identity feature collection, the device will prompt the user through at least one prompt message. Optionally, the prompt message includes at least one of the following:

[0436] · The first prompt message;

[0437] · The second prompt message;

[0438] · The third prompt message.

[0439] In some embodiments, the first prompt message is used to prompt the user to adjust the position of the target body part.

[0440] The display module 2110 is further configured to display the first prompt message when it is determined that the target object is the target body part and the contour of the target body part is incomplete.

[0441] When it is determined that the target object is the target body part, by analyzing the contour of the target body part, it is determined whether the contour of the target body part is complete. Optionally, by calculating the ratio of the area to the perimeter of the contour of the target body part, it is determined whether there is an interruption in the contour of the target body part. For example, when there is no interruption in the contour of the target body part, the ratio of the area to the perimeter of the contour of the target body part is 1:1.5; then when the calculated ratio of the area to the perimeter of the contour of the target body part is 1:1, it can be determined that there is an interruption in the contour of the target body part.

[0442] In some embodiments, when the contour of the target body part is incomplete, it may not be possible to accurately identify the body feature area. For example, when the contour of the target body part only includes the contour of a finger, the body feature area cannot be identified. Therefore, when it is determined that the target object is the target body part and the contour of the target body part is incomplete, a first prompt message is displayed. The first prompt message is used to remind the user to adjust the position of the target body part so that a complete contour of the target body part can be identified, thereby ensuring that the body feature area can be accurately identified.

[0443] Exemplarily, as Figure 12 shown, assuming that the target body part is a palm, when it is determined that the target 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".

[0444] In some embodiments, the second prompt message is used to prompt the user to replace the target object.

[0445] The display module 2110 is further configured to display a second prompt message when it is determined that the target object is not the target body part.

[0446] In some embodiments, a second prompt message is displayed when it is determined that the target object is not the target body part. Or, a second prompt message is displayed when it is determined that the recognized target object is a target object and the target object is not the target body part.

[0447] Exemplarily, as Figure 14 shown, assuming that the target body part is a palm, when it is determined that the target object is not a palm, a second prompt message 19 is displayed. The second prompt message 19 is used to prompt the user that "the palm cannot be recognized".

[0448] Optionally, when it is repeatedly determined that the target object is not the target body part, the second prompt message is repeatedly displayed until the user replaces the target object with the target body part.

[0449] In some embodiments, the third prompt message is used to prompt the user to adjust the light.

[0450] The extraction module 2130 is further configured to extract the light features in the image frame.

[0451] In some embodiments, after obtaining the image frame of the target object, the light features in the image frame are extracted. In some embodiments, the light features include brightness and chromaticity. Optionally, the light brightness in the image frame is extracted. Optionally, the light chromaticity in the image frame is extracted.

[0452] The display module 2110 is further configured to display a third prompt message when the light in the image frame indicated by the light feature does not meet the light threshold.

[0453] In some embodiments, the extracted light feature is compared with the light threshold. When the light in the image frame indicated by the light feature meets the light threshold, the skin area in the image frame and the contour of the skin area are continuously extracted; when the light in the image frame indicated by the light feature does not meet the light threshold, a third prompt message is displayed. Optionally, the light threshold is preset or dynamically adjusted.

[0454] Exemplarily, as Figure 16 shown, when the light feature in the image frame does not meet the light threshold, or in other words, when the light in the acquired capture image 51 is less or dim, a third prompt message 50 is displayed. The third prompt message 50 is used to prompt the user that "the light is dim" or to prompt the user to adjust the light in the current capture environment.

[0455] In some embodiments, taking the palmprint capture process as an example, the device includes:

[0456] A display module, configured to display a camera preview screen and a capture frame in a first display state during the palmprint capture process.

[0457] In some embodiments, in response to a trigger operation on the palmprint capture client, a camera preview screen and a capture frame in a first display state are displayed. The trigger operation includes at least one of clicking, double-clicking, swiping left and right, swiping up and down, long-pressing, hovering, face recognition, and voice recognition. It should be noted that the trigger operation includes but is not limited to the above-mentioned types. Those skilled in the art should be able to understand that any operation that can achieve the above functions falls within the protection scope of the embodiments of the present application.

[0458] 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 first displayed, and the capture frame in the first display state is displayed after the target object is recognized. Optionally, the camera preview screen is displayed after the capture frame in the first display state is displayed.

[0459] In some embodiments, the camera preview screen is the screen captured by the camera in real time. Optionally, the camera preview screen is displayed full screen on the terminal screen. Optionally, the camera preview screen is displayed within a target area on the terminal screen. The target area is preset or the target area changes dynamically. For example, the target area is the middle one-third area of the terminal screen. In the embodiments of the present application, the case where the camera preview screen is displayed full screen on the terminal screen is taken as an example for description.

[0460] In some embodiments, the acquisition frame in the first display state is determined based on device parameters related to the terminal. Exemplarily, the device parameters include camera parameters and picture imaging parameters. The camera parameters include at least one of resolution, focal length, viewing angle range, distortion, chromatic aberration, and sharpness. The picture imaging parameters are determined by pictures actually captured by the terminal. In some embodiments, as Figure 3 shown, device parameters of different devices are collected in advance, and then the different devices are classified based on the device parameters, such as being classified into Class A, Class B, Class C, and Class D. Each class corresponds to its own acquisition frame parameters, and the acquisition frame parameters include at least one of the display size, display position, and display form for indicating the display of the acquisition frame on the palmprint entry interface. The acquisition frame parameters are stored in the server 120. In some embodiments, when the terminal 110 starts palmprint acquisition, it sends a request to the server 120 to call the acquisition frame parameters. The server 120 sends the corresponding acquisition frame parameters to the terminal 110 according to the class to which the terminal 110 belongs. The terminal 110 displays the acquisition frame in the first display state based on the received acquisition frame parameters.

[0461] Optionally, the display shape of the acquisition frame in the first display state is preset or changes dynamically. For example, at least two display shapes of the acquisition frame in the first display state are provided for selection, including at least two of a circle, a square, and a trapezoid. If the preset display shape of the acquisition frame in the first display state is a circle, the user can also choose to modify the display shape of the acquisition frame in the first display state to a square. Optionally, the display size of the acquisition frame in the first display state is preset or changes dynamically. For example, the display size of the acquisition frame in the first display state is one-third of the terminal screen. Optionally, the display position of the acquisition frame in the first display state is preset or changes dynamically. For example, the acquisition frame in the first display state is displayed at the center position of the terminal screen.

[0462] In some embodiments, the first display state is mainly used to distinguish from the second display state, and the first display state is different from the second display state. Optionally, the first display state is a first color, such as black; then 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; then the second display state is a second display entity, or a display entity other than the first display entity, such as a dashed line.

[0463] Exemplarily, as Figure 2 shown, during the palmprint acquisition process, the display shows the camera preview screen 11 and the acquisition frame 12 in the first display state.

[0464] The display module is further configured to, in response to identifying a palm center area in the camera preview screen, display a follow-up frame on the palm center area.

[0465] In some embodiments, in response to identifying a palm center area in the camera preview screen, a follow-up frame is displayed. The follow-up frame follows the palm center area. It should be understood that the follow-up frame is used to frame the palm center area in the camera preview screen, and the display shape, display size, and display position of the follow-up frame change following the palm center area.

[0466] In some embodiments, the display state of the follow-up frame is preset. Optionally, the display state of the follow-up frame is the first display state, that is, the display state of the follow-up frame is the same as the initial display state of the acquisition frame. Optionally, the display state of the follow-up frame is the second display state, that is, the display state of the follow-up frame is the same as the final display state of the acquisition frame. Optionally, the display state of the follow-up 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 follow-up frame is also in the first display state. When the relative position between the follow-up frame and the acquisition frame in the first display state meets the acquisition condition, the first display state switches to display as the second display state. Optionally, the display state of the follow-up frame is a third display state, that is, the display state of the follow-up frame is different from the display state of the acquisition frame. For example, when 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 follow-up frame is yellow.

[0467] In some embodiments, the display state of the follow-up frame changes dynamically. Optionally, the display state of the follow-up frame changes following the change in the distance between the palm center area and the camera. In some embodiments, the greater the distance between the palm center 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 center 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 the first display state of the acquisition frame is red, when the palm center 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 with a larger difference from red (such as yellow).

[0468] 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.

[0469] In some embodiments, the follow sound changes dynamically. For example, the follow sound changes with the change of the follow frame. Optionally, the urgency of the follow sound changes with the change of the distance between the palm area and the camera. The urgency of the follow sound is positively correlated with the distance between the palm area and the camera. When the palm area is close to the camera, the follow sound becomes more and more urgent; when the palm area is far away from the camera, the follow sound becomes more and more gentle. Optionally, the pitch of the follow sound changes with the change of the distance between the palm area and the camera. The pitch of the follow sound is positively 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 sound is higher; when the palm area is far away from the camera, the pitch of the follow sound is lower.

[0470] In some embodiments, a special effect mask is displayed while displaying a follow frame. The special effect mask is attached to the palm area. The special effect mask is used to prompt the user that a follow frame is displayed, and can improve the fun of guiding the user through special effects. Optionally, the special effect mask is preset. For example, the special effect mask is a flower, which means "blooming in the palm". Optionally, the special effect mask is dynamically changing. Optionally, the display effect of the special effect 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 effect 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.

[0471] 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.

[0472] In some embodiments, it can also be understood that the following frame is used to follow the projection of the feature frame of the palm area in the camera preview screen, and the feature frame is on the plane where the palm area is located and is used to frame the palm area.

[0473] For example, Figure 5As shown, assuming that the plane where the terminal screen is located is the xoz plane, when the plane where the palm area is located is parallel to the plane where the terminal screen is located, the following box 13 is the feature box 15, and both the following box 13 and the feature box 15 are circular. When the plane where the palm area is located intersects the plane where the terminal screen is located, for example, as Figure 6 shown, when the plane where the palm area is located is the xoz' plane, the following box 13 is the projection of the feature box 15 on the terminal screen. The feature box 15 is circular, and the following box 13 is an ellipse after the projection of the feature box 15.

[0474] In some embodiments, the shape of the feature box is the same as the shape of the acquisition box in the first display state. For example, if the shape of the acquisition box in the first display state is circular, then the shape of the feature box is also circular.

[0475] In some embodiments, in response to recognizing the palm area, the following box is displayed with a reference point on the palm area as the center point of the following box. Optionally, the reference point is the center point on the palm area, such as the center point of the palm area.

[0476] In some embodiments, in response to recognizing the palm area, the following box is displayed with a target size as the size of the following box. Among them, the target size is associated with the distance between the palm area and the camera. In some embodiments, the target size has a negative correlation 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 target size; the closer the distance between the palm area and the camera, the larger the target size. For example, as Figure 5 and Figure 7 shown, when the palm area moves from a position close to the camera to a position far from the camera, the size of the following box 13 also shrinks from the first target size to the second target size.

[0477] In some embodiments, in response to at least one of the palm area following the palm tilting, translating, or rotating, the displayed following box is updated so that the center point of the following box is consistent with the reference point on the palm area. The center point of the updated following box coincides with the reference point of the palm area. Optionally, in response to the palm area following the palm tilting, the displayed following box is updated. Optionally, in response to the palm area following the palm translating, the displayed following box is updated. Optionally, in response to the palm area following the palm rotating, the displayed following box is updated.

[0478] The display module is further configured to switch the acquisition box in the first display state to the acquisition box in the second display state in response to the relative position between the following box and the acquisition box in the first display state satisfying the acquisition condition.

[0479] In some embodiments, the acquisition condition includes at least one of the following:

[0480] · The shape of the follow-up frame is the same as that of the acquisition frame in the first display state;

[0481] · The size of the follow-up frame is the same as that of the acquisition frame in the first display state;

[0482] · The ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to the ratio threshold;

[0483] · The intersecting area between the follow-up frame and the acquisition frame in the first display state is greater than or equal to the area threshold;

[0484] · The distance between the center of the follow-up frame and the center of the acquisition frame in the first display state is less than the distance threshold;

[0485] · The difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state is less than the length difference threshold;

[0486] · The angle between the plane where the follow-up frame is located and the plane where the acquisition frame in the first display state is located is less than the angle difference threshold.

[0487] In some embodiments, in response to the shape of the follow-up frame being the same as that of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Since this follow-up frame is the projection of the feature frame in the camera preview screen, when the plane where the palm area is located is parallel to the plane where the terminal screen is located, the shape of the follow-up frame will be the same as that of the acquisition frame in the first display state, and at this time, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0488] In some embodiments, in response to the size of the follow-up frame being the same as that of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the size of the follow-up frame here can be understood as the area size of the follow-up frame, that is, in response to the area size of the follow-up frame being the same as the area size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Or, the size of the follow-up frame here can also be understood as the size when the shape of the follow-up frame is the same as that of the acquisition frame in the first display state, that is, in response to the shape of the follow-up frame being the same as that of the acquisition frame in the first display state, and the size of the follow-up frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0489] In some embodiments, in response to the ratio of the area of the follow box to the area of the acquisition box in the first display state being greater than or equal to a ratio threshold, the acquisition box in the first display state is switched to be displayed as the acquisition box in the second display state. It should be understood that the area of the acquisition box in the first display state remains unchanged after the acquisition box in the first display state is displayed. The area of the follow box changes as the follow box is updated. In some embodiments, the ratio threshold is preset or dynamically variable. For example, if the ratio threshold is four fifths, then in response to the ratio of the area of the follow box to the area of the acquisition box in the first display state being greater than or equal to four fifths, the acquisition box in the first display state is switched to be displayed as the acquisition box in the second display state.

[0490] In some embodiments, in response to the area of intersection between the follow box and the acquisition box in the first display state being greater than or equal to an area threshold, the acquisition box in the first display state is switched to be displayed as the acquisition box in the second display state. In some embodiments, the area threshold is preset or dynamically variable. For example, the area threshold is 2 square centimeters. Exemplarily, as Figure 8 shown, in response to the area of the intersection region 16 between the follow box 13 and the acquisition box 12 in the first display state being greater than or equal to 2 square centimeters, the acquisition box 12 in the first display state is switched to be displayed as the acquisition box in the second display state.

[0491] In some embodiments, in response to the distance between the center of the follow box and the center of the acquisition box in the first display state being less than a distance threshold, the acquisition box in the first display state is switched to be displayed as the acquisition box in the second display state. In some embodiments, the distance threshold is preset or dynamically variable. For example, the distance threshold is 2 centimeters. Exemplarily, as Figure 8 shown, in response to the distance 17 between the center of the follow box 13 and the center of the acquisition box 12 in the first display state being less than 2 centimeters, the acquisition box 12 in the first display state is switched to be displayed as the acquisition box in the second display state.

[0492] In some embodiments, when the acquisition box in the first display state is circular and the follow box is circular, in response to the difference between the radius of the follow box and the radius of the acquisition box in the first display state being less than a length difference threshold, the acquisition box in the first display state is switched to be displayed as the acquisition box in the second display state. In some embodiments, the length difference threshold is preset or dynamically variable. For example, if the length difference threshold is 1 centimeter, then in response to the difference between the radius of the follow box and the radius of the acquisition box in the first display state being less than 1 centimeter, the acquisition box in the first display state is switched to be displayed as the acquisition box in the second display state. It should be understood that when the acquisition box in the first display state is circular and the follow box is circular, that is, the shapes of the acquisition box in the first display state and the follow box are the same, then at this time the plane where the palm region is located is parallel to the plane of the terminal screen.

[0493] In some embodiments, in response to the angle between the plane where the palm area is located and the plane where the acquisition frame in the first display state is located being less than the angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Or, it can be understood that in response to the angle between the plane where the feature frame is located and the plane of the terminal screen being less than the angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Among them, the follow-up frame is the projection of the feature frame on the plane of the terminal screen. In some embodiments, the angle difference threshold is preset or dynamically changed. 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 acquisition frame in the first display state is located being less than 30 degrees, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0494] In some embodiments, the above acquisition conditions may be a combination of the above n conditions, where n is an integer greater than 1. For example, the acquisition condition is that the shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to the ratio threshold. Then, in response to the shape of the follow-up frame being the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state being greater than or equal to the ratio threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0495] In some embodiments, the device further includes:

[0496] An acquisition module, configured to obtain an image frame corresponding to the target object in response to identifying the target object in the camera preview screen.

[0497] In some embodiments, the target object is a palm or the target object is not a palm. Optionally, in response to identifying a palm in the camera preview screen, an image frame corresponding to the palm is obtained. Or, in response to identifying an object other than the palm in the camera preview screen, an image frame corresponding to the identified object is obtained.

[0498] In some embodiments, the image frame is a preprocessed image frame. Optionally, the preprocessing steps include at least one of color space conversion, binarization, filtering, and edge detection. In some embodiments, the image frame is an un-preprocessed image frame. The preprocessing operation is used to help reduce noise and background interference in the image frame, which is beneficial to highlighting the features in the image frame.

[0499] In some embodiments, based on the obtained image frame, it is determined whether the target object is a palm.

[0500] In some embodiments, the device further includes:

[0501] An extraction module, configured to extract the skin region in the image frame and extract the contour of the skin region.

[0502] In some embodiments, the skin region in the image frame is extracted based on a color threshold. Optionally, the image frame is converted from a first color space to a second color space, where the amount of color information in the first color space and the second color space is different. Exemplarily, the first color space is the Red Green Blue (RGB) color space, and the second color space is the Hue Saturation Value (HSV) color space.

[0503] Optionally, the color threshold is preset. The color threshold is used to distinguish the skin region and the non-skin region in the image frame. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is obvious, the skin region in the image frame is directly extracted. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is not obvious, the image frame is converted from the first color space to the second color space to highlight the color difference between the skin region and the non-skin region, thereby realizing the extraction of the skin region from the image frame.

[0504] In some embodiments, the contour of the skin region is extracted by an edge detection algorithm. Optionally, the contour of the skin region is extracted by the Canny algorithm. Optionally, the contour of the skin region is extracted by the Sobel algorithm. In some embodiments, the Canny algorithm is a standard algorithm widely used in edge detection, and its goal is to find an optimal edge detection solution or find the position with the strongest change in gray intensity in an image. The optimal edge detection is mainly evaluated by three criteria: low error rate, high localization, and minimum response. In some embodiments, the Sobel algorithm is mainly used for edge detection, and technically, it operates on the approximate value of the gray level of the image brightness function through a set of discrete difference operators.

[0505] In some embodiments, it is determined whether the target object is a palm according to the contour of the skin region.

[0506] In some embodiments, the device further includes:

[0507] A determination module, configured to determine that the target object is a palm when the contour of the skin region corresponds to the palm contour.

[0508] In some embodiments, the contour of the skin region is compared with the palm contour. When the contour of the skin region corresponds to the palm contour, it is determined that the target object is a palm; when the contour of the skin region does not correspond to the palm contour, it is determined that the target object is not a palm.

[0509] In some embodiments, the palm contour corresponds to features such as shape, area, perimeter, etc. Optionally, by comparing the shape of the contour of the skin area with the shape of the palm contour, it is determined whether the target object is a palm. Optionally, there is a corresponding relationship between the features of the palm contour. For example, when the area corresponding to the palm contour is 10 square centimeters, the corresponding perimeter is 15 centimeters; when the area corresponding to the palm contour is 20 square centimeters, the corresponding perimeter is 30 centimeters.

[0510] The extraction module is further configured to, when it is determined that the target object is a palm, extract palm feature points from the image frame and determine the palm center area based on the palm feature points.

[0511] In some embodiments, when it is determined that the target object is a palm, palm feature points are extracted from the image frame. Optionally, the palm feature points include palm convex hull points and palm concave points.

[0512] In some embodiments, the palm convex hull point refers to the feature point corresponding to the relatively convex position in the palm, such as the fingertip position. The palm concave point refers to the feature point corresponding to the relatively concave position in the palm, such as the knuckle position. Optionally, taking a palm as an example, the positions where the palm convex hull points are located include the fingertip position, the center position of the finger joint, the center position of the connection at the finger root, etc., and the positions where the palm concave points are located include the finger joint position, the finger root position, and the center position of the palm.

[0513] In some embodiments, the palm center area is determined based on the palm feature points. The palm center area is the area in the palm except for the fingers, or it can be understood that the palm center area is the area including the palm print. Optionally, the boundary line between the fingers and the palm center area is determined based on the palm feature points. Based on this boundary line and the palm contour, the palm center area is determined.

[0514] In some embodiments, during the process of palm print collection, the terminal will prompt the user through at least one prompt message. Optionally, the prompt message includes at least one of the following:

[0515] · The first prompt message;

[0516] · The second prompt message;

[0517] · The third prompt message.

[0518] In some embodiments, the first prompt message is used to prompt the user to adjust the position of the palm.

[0519] The display module is further configured to display the first prompt message when it is determined that the target object is a palm and the palm contour is incomplete.

[0520] When it is determined that the target object is a palm, the palm contour of the palm is analyzed to determine whether the palm contour is complete. Optionally, by calculating the ratio of the area to the perimeter of the palm contour, it is determined whether the palm contour is interrupted. For example, when the palm contour is not interrupted, the ratio of the area to the perimeter of the palm contour is 1:1.5; then when the calculated ratio of the area to the perimeter of the palm contour is 1:1, it can be determined that the palm contour is interrupted.

[0521] In some embodiments, when the palm contour is incomplete, the palm center area may not be accurately recognized. For example, when the palm contour only includes the finger contours, the palm center area cannot be recognized. Therefore, when it is determined that the target object is a palm and the palm contour is incomplete, a first prompt message is displayed. The first prompt message is used to remind the user to adjust the position of the palm so that a complete palm contour can be recognized, thereby ensuring that the palm center area can be accurately recognized.

[0522] Exemplarily, as Figure 12 shown, when it is determined that the target object is a palm and the palm contour is incomplete, a first prompt message 18 is displayed, and the first prompt message 18 is used to prompt the user that "the palm is incomplete".

[0523] In some embodiments, the second prompt message is used to prompt the user to replace the target object.

[0524] The display module is further configured to display a second prompt message when it is determined that the target object is not a palm.

[0525] In some embodiments, a second prompt message is displayed when it is determined that the target object is not a palm. Or, when it is recognized that the target object is a target object and the target object is not a palm, a second prompt message is displayed.

[0526] Exemplarily, as Figure 14 shown, when it is determined that the target 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".

[0527] Optionally, when it is repeatedly determined that the target object is not a palm, the second prompt message is repeatedly displayed until the user replaces the target object with a palm.

[0528] In some embodiments, the third prompt message is used to prompt the user to adjust the light.

[0529] The extraction module is further configured to extract the light characteristics in the image frame.

[0530] In some embodiments, after obtaining an image frame of a target object, the light features in the image frame are extracted. In some embodiments, the light features include brightness and chromaticity. Optionally, the light brightness in the image frame is extracted. Optionally, the light chromaticity in the image frame is extracted.

[0531] The display module is further configured to display a third prompt message when the light features indicate that the light in the image frame does not meet the light threshold.

[0532] In some embodiments, the extracted light features are compared with the light threshold. When the light features indicate that the light in the image frame does not meet the light threshold, a third prompt message is displayed. Optionally, the light threshold is preset or dynamically adjusted.

[0533] Exemplarily, as Figure 16 shown, when the light features in the image frame do not meet the light threshold, or in other words, when the light in the acquired capture 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 dim" or to prompt the user to adjust the light in the current capture environment.

[0534] In some embodiments, taking the face capture process as an example, the device includes:

[0535] The display module is configured to display the camera preview screen and the capture frame in the first display state during the face feature capture process.

[0536] In some embodiments, in response to a trigger operation on the face feature capture client, the camera preview screen and the capture frame in the first display state are displayed. The trigger operation includes at least one of clicking, double-clicking, swiping left and right, swiping up and down, long-pressing, hovering, face recognition, and voice recognition. It should be noted that the trigger operation includes but is not limited to the above-mentioned ones. Those skilled in the art should be able to know that any operation that can achieve the above functions belongs to the protection scope of the embodiments of the present application.

[0537] 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 target object is recognized. Optionally, the camera preview screen is displayed after the capture frame in the first display state is displayed.

[0538] In some embodiments, the camera preview screen is the image captured by the camera in real time. Optionally, the camera preview screen is displayed full screen on the terminal screen. Optionally, the camera preview screen is displayed within a target area on the terminal screen. The target area is preset or the target area changes dynamically. For example, the target area is the middle one-third area of the terminal screen. In the embodiments of the present application, the case where the camera preview screen is displayed full screen on the terminal screen is taken as an example for description.

[0539] In some embodiments, the acquisition frame in the first display state is determined based on device parameters related to 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 range, distortion, chromatic aberration, and sharpness. The image imaging parameters are determined based on the images actually captured by the terminal. In some embodiments, as Figure 3 shown, the device parameters of different devices are collected in advance, and then the different devices are classified based on the device parameters, such as being classified into Class A, Class B, Class C, and Class D. Each class corresponds to its own acquisition frame parameters, and the acquisition frame parameters include at least one of the display size, display position, and display form for indicating the display of the acquisition frame on the facial feature entry interface. The acquisition frame parameters are stored in the server 120. In some embodiments, when the terminal 110 starts facial feature acquisition, it sends a request to the server 120 to call the acquisition frame parameters. The server 120 sends the corresponding acquisition frame parameters to the terminal 110 according to the class to which the terminal 110 belongs. The terminal 110 displays the acquisition frame in the first display state based on the received acquisition frame parameters.

[0540] Optionally, the display shape of the acquisition frame in the first display state is preset or changes dynamically. For example, at least two display shapes of the acquisition frame in the first display state are provided for selection, including at least two of a circle, a square, and a trapezoid. If the preset display shape of the acquisition frame in the first display state is a circle, the user can also choose to modify the display shape of the acquisition frame in the first display state to a square. Optionally, the display size of the acquisition frame in the first display state is preset or changes dynamically. For example, the display size of the acquisition frame in the first display state is one-third of the terminal screen. Optionally, the display position of the acquisition frame in the first display state is preset or changes dynamically. For example, the acquisition frame in the first display state is displayed at the center position of the terminal screen.

[0541] In some embodiments, the first display state is mainly used to distinguish from the second display state, and the first display state is different from the second display state. Optionally, the first display state is the first color, such as black; then the second display state is the second color, or a color other than the first color, such as green. Optionally, the first display state is the first display entity, such as a solid line; then the second display state is the second display entity, or a display entity other than the first display entity, such as a dashed line.

[0542] Exemplarily, as Figure 2 shown, during the facial feature acquisition process, the display camera preview screen 11 and the acquisition frame 12 in the first display state are displayed.

[0543] The display module is further configured to, in response to identifying a facial area in the camera preview screen, display a follow-up frame on the facial area.

[0544] In some embodiments, in response to identifying a facial area in the camera preview screen, a follow-up frame is displayed. The follow-up frame follows the facial area. It should be understood that the follow-up frame is used to frame the facial area in the camera preview screen, and the display shape, display size, and display position of the follow-up frame change following the facial area.

[0545] In some embodiments, the display state of the follow-up frame is preset. Optionally, the display state of the follow-up frame is the first display state, that is, the display state of the follow-up frame is the same as the initial display state of the acquisition frame. Optionally, the display state of the follow-up frame is the second display state, that is, the display state of the follow-up frame is the same as the final display state of the acquisition frame. Optionally, the display state of the follow-up 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 follow-up frame is also in the first display state. When the relative position between the follow-up frame and the acquisition frame in the first display state meets the acquisition condition, the first display state switches to the second display state. Optionally, the display state of the follow-up frame is the third display state, that is, the display state of the follow-up frame is different from the display state of the acquisition frame. For example, when 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 follow-up frame is yellow.

[0546] In some embodiments, the display state of the follow-up frame changes dynamically. Optionally, the display state of the follow-up frame changes following the change in the distance between the facial area and the camera. In some embodiments, the greater the distance between the facial 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 facial 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 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 follow-up frame changes from a color close to red to a color with a larger difference from red (such as yellow).

[0547] 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.

[0548] In some embodiments, the follow sound changes dynamically. For example, the follow sound changes with the change of the follow frame. Optionally, the urgency of the follow sound changes with the change of the distance between the facial area and the camera. The urgency of the follow sound is positively correlated with the distance between the facial area and the camera. When the facial area is close to the camera, the follow sound becomes more and more urgent; when the facial area is far away from the camera, the follow sound becomes more and more gentle. Optionally, the pitch of the follow sound changes with the change of the distance between the facial area and the camera. The pitch of the follow sound is positively 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 sound is higher; when the facial area is far away from the camera, the pitch of the follow sound is lower.

[0549] In some embodiments, a special effect mask is displayed while displaying a follow frame. The special effect mask is attached to the facial area. The special effect mask is used to prompt the user that a follow frame is displayed, and can improve the fun of guiding the user by means of special effects. Optionally, the special effect mask is preset. For example, the feature mask is a facial expression package. Optionally, the special effect mask is dynamically changing. Optionally, the display effect of the special effect mask can change with the change of the distance between the facial area and the camera. For example, the special effect mask is a facial expression package. When the facial area is far away from the camera, the facial expression package is reduced and displayed; when the facial area is close to the camera, the facial expression package is enlarged and displayed.

[0550] In some embodiments, the display shape of the following frame changes according to the plane where the facial region is located and the distance between the facial region and the camera.

[0551] In some embodiments, it can also be understood that the following frame is a projection of a feature frame for following the facial region in the camera preview image, and the feature frame is on the plane where the facial region is located and is used to frame the facial region.

[0552] For example, Figure 5As shown, assuming that the plane where the terminal screen is located is the xoz plane, when the plane where the face area is located is parallel to the plane where the terminal screen is located, the follow-up frame 13 is the feature frame 15, and both the follow-up frame 13 and the feature frame 15 are circular. When the plane where the face area is located intersects the plane where the terminal screen is located, for example, as Figure 6 shown, when the plane where the face area is located is the xoz' plane, the follow-up frame 13 is the projection of the feature frame 15 on the terminal screen. The feature frame 15 is circular, and the follow-up frame 13 is an ellipse after the projection of the feature frame 15.

[0553] In some embodiments, the shape of the feature frame is the same as the shape of the acquisition frame in the first display state. For example, if the shape of the acquisition frame in the first display state is circular, then the shape of the feature frame is also circular.

[0554] In some embodiments, in response to recognizing the face area, the follow-up frame is displayed with a reference point on the face area as the center point of the follow-up frame. Optionally, the reference point is the center point on the face area, such as the center point of the face area.

[0555] In some embodiments, in response to recognizing the face area, the follow-up frame is displayed with a target size as the size of the follow-up frame. Among them, the target size is associated with the distance between the face area and the camera. In some embodiments, the target size has a negative correlation with the distance between the face area and the camera. Optionally, the farther the distance between the face area and the camera, the smaller the target size; the closer the distance between the face area and the camera, the larger the target size. For example, as Figure 5 and Figure 7 shown, when the face 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 the first target size to the second target size.

[0556] In some embodiments, in response to at least one of the face area tilting, translating, or rotating following the head, the displayed follow-up frame is updated so that the center point of the follow-up frame is consistent with the reference point on the face area. The center point of the updated follow-up frame coincides with the reference point of the face area. Optionally, in response to the face area tilting following the head, the displayed follow-up frame is updated. Optionally, in response to the face area translating following the head, the displayed follow-up frame is updated. Optionally, in response to the face area rotating following the head, the displayed follow-up frame is updated.

[0557] The display module is further configured to switch the display of the acquisition frame in the first display state to the acquisition frame in the second display state in response to the relative position between the follow-up frame and the acquisition frame in the first display state satisfying the acquisition condition.

[0558] In some embodiments, the acquisition condition includes at least one of the following:

[0559] · The shape of the follow-up frame is the same as that of the acquisition frame in the first display state;

[0560] · The size of the follow-up frame is the same as that of the acquisition frame in the first display state;

[0561] · The ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to the ratio threshold;

[0562] · The intersecting area between the follow-up frame and the acquisition frame in the first display state is greater than or equal to the area threshold;

[0563] · The distance between the center of the follow-up frame and the center of the acquisition frame in the first display state is less than the distance threshold;

[0564] · The difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state is less than the length difference threshold;

[0565] · The angle between the plane where the follow-up frame is located and the plane where the acquisition frame in the first display state is located is less than the angle difference threshold.

[0566] In some embodiments, in response to the shape of the follow-up frame being the same as that of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Since this follow-up frame is the projection of the feature frame in the camera preview screen, when the plane where the face area is located is parallel to the plane where the terminal screen is located, the shape of the follow-up frame will be the same as that of the acquisition frame in the first display state. At this time, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0567] In some embodiments, in response to the size of the follow-up frame being the same as that of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the size of the follow-up frame here can be understood as the area size of the follow-up frame, that is, in response to the area size of the follow-up frame being the same as the area size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. Or, the size of the follow-up frame here can also be understood as the size in the case where the shape of the follow-up frame is the same as that of the acquisition frame in the first display state, that is, in response to the shape of the follow-up frame being the same as that of the acquisition frame in the first display state, and the size of the follow-up frame being the same as the size of the acquisition frame in the first display state, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0568] In some embodiments, in response to the ratio of the area of the follow - up frame to the area of the acquisition frame in the first display state being greater than or equal to a ratio threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that the area of the acquisition frame in the first display state remains unchanged after the acquisition frame in the first display state is displayed. The area of the follow - up frame changes as the follow - up frame is updated. In some embodiments, the ratio threshold is preset or dynamically variable. For example, if the ratio threshold is four - fifths, then in response to the ratio of the area of the follow - up frame to the area of the acquisition frame in the first display state being greater than or equal to four - fifths, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0569] In some embodiments, in response to the area of the intersection between the follow - up frame and the acquisition frame in the first display state being greater than or equal to an area threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. In some embodiments, the area threshold is preset or dynamically variable. For example, the area threshold is 2 square centimeters. Exemplarily, as Figure 8 shown, in response to the area of the intersection region 16 between the follow - up frame 13 and the acquisition frame 12 in the first display state being greater than or equal to 2 square centimeters, the acquisition frame 12 in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0570] In some embodiments, in response to the distance between the center of the follow - up frame and the center of the acquisition frame in the first display state being less than a distance threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. In some embodiments, the distance threshold is preset or dynamically variable. For example, the distance threshold is 2 centimeters. Exemplarily, as Figure 8 shown, in response to the distance 17 between the center of the follow - up frame 13 and the center of the acquisition frame 12 in the first display state being less than 2 centimeters, the acquisition frame 12 in the first display state is switched to be displayed as the acquisition frame in the second display state.

[0571] In some embodiments, when the acquisition frame in the first display state is circular and the follow - up frame is circular, in response to the difference between the radius of the follow - up frame and the radius of the acquisition frame in the first display state being less than a length - difference threshold, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. In some embodiments, the length - difference threshold is preset or dynamically variable. For example, if the length - difference threshold is 1 centimeter, then in response to the difference between the radius of the follow - up frame and the radius of the acquisition frame in the first display state being less than 1 centimeter, the acquisition frame in the first display state is switched to be displayed as the acquisition frame in the second display state. It should be understood that when the acquisition frame in the first display state is circular and the follow - up frame is circular, that is, the shapes of the acquisition frame in the first display state and the follow - up frame are the same, then at this time the plane where the facial area is located is parallel to the plane of the terminal screen.

[0572] In some embodiments, in response to the angle between the plane where the face region is located and the plane where the acquisition frame in the first display state is located being less than the angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Or, it can be understood that in response to the angle between the plane where the feature frame is located and the plane of the terminal screen being less than the angle difference threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state. Among them, the follow-up frame is the projection of the feature frame on the plane of the terminal screen. In some embodiments, the angle difference threshold is preset or dynamically variable. For example, if the angle difference threshold is 30 degrees, then in response to the angle between the plane where the face region is located and the plane where the acquisition frame in the first display state is located being less than 30 degrees, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0573] In some embodiments, the above acquisition conditions can be a combination of the above n conditions, where n is an integer greater than 1. For example, the acquisition condition is that the shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state is greater than or equal to the ratio threshold. Then, in response to the shape of the follow-up frame being the same as the shape of the acquisition frame in the first display state, and the ratio of the area of the follow-up frame to the area of the acquisition frame in the first display state being greater than or equal to the ratio threshold, the acquisition frame in the first display state is switched to the acquisition frame in the second display state.

[0574] In some embodiments, the apparatus further includes:

[0575] An acquisition module, configured to acquire an image frame corresponding to a target object in response to identifying the target object in the camera preview screen.

[0576] In some embodiments, the target object is a head or the target object is not a head. Optionally, in response to identifying a head in the camera preview screen, an image frame corresponding to the head is acquired. Or, in response to identifying an object other than the head in the camera preview screen, an image frame corresponding to the identified object is acquired.

[0577] In some embodiments, the image frame is a preprocessed image frame. Optionally, the preprocessing steps include at least one of color space conversion, binarization, filtering, and edge detection. In some embodiments, the image frame is an un-preprocessed image frame. The preprocessing operation is used to help reduce noise and background interference in the image frame, which is beneficial to highlighting features in the image frame.

[0578] In some embodiments, based on the acquired image frame, it is determined whether the target object is a head.

[0579] In some embodiments, the apparatus further includes:

[0580] An extraction module for extracting the skin region in an image frame and extracting the contour of the skin region.

[0581] In some embodiments, the skin region in the image frame is extracted based on a color threshold. Optionally, the image frame is converted from a first color space to a second color space, where the amount of color information in the first and second color spaces is different. Exemplarily, the first color space is the Red Green Blue (RGB) color space, and the second color space is the Hue Saturation Value (HSV) color space.

[0582] Optionally, the color threshold is preset. The color threshold is used to distinguish the skin region and the non-skin region in the image frame. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is obvious, the skin region in the image frame is directly extracted. In some embodiments, when the color difference between the skin region and the non-skin region in the image frame is not obvious, the image frame is converted from the first color space to the second color space to highlight the color difference between the skin region and the non-skin region, thereby realizing the extraction of the skin region from the image frame.

[0583] In some embodiments, the contour of the skin region is extracted by an edge detection algorithm. Optionally, the contour of the skin region is extracted by the Canny algorithm. Optionally, the contour of the skin region is extracted by the Sobel algorithm. In some embodiments, the Canny algorithm is a standard algorithm widely used in edge detection, and its goal is to find an optimal edge detection solution or locate the position with the strongest change in gray intensity in an image. The optimal edge detection is mainly evaluated by three criteria: low error rate, high localization, and minimum response. In some embodiments, the Sobel algorithm is mainly used for edge detection and technically approximates the gray value of the image brightness function through a set of discrete difference operators.

[0584] In some embodiments, it is determined whether the target object is a head according to the contour of the skin region.

[0585] In some embodiments, the device further includes:

[0586] A determination module for determining that the target object is a head when the contour of the skin region corresponds to the head contour.

[0587] In some embodiments, the contour of the skin region is compared with the head contour. When the contour of the skin region corresponds to the head contour, it is determined that the target object is a head; when the contour of the skin region does not correspond to the head contour, it is determined that the target object is not a head.

[0588] In some embodiments, the head contour corresponds to features such as shape, area, perimeter, etc. Optionally, by comparing the shape of the contour of the skin area with the shape of the head contour, it is determined whether the target object is a head. Optionally, there is a corresponding relationship between the features of the head contour. For example, when the area corresponding to the head contour is 10 square centimeters, the corresponding perimeter is 15 centimeters; when the area corresponding to the head contour is 20 square centimeters, the corresponding perimeter is 30 centimeters.

[0589] The extraction module is further configured to, when it is determined that the target object is a head, extract head feature points from the image frame and determine the facial area based on the head feature points.

[0590] In some embodiments, when it is determined that the target 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.

[0591] In some embodiments, the head convex hull point refers to the feature point corresponding to the relatively convex position in the head, such as the fingertip position. The head concave point refers to the feature point corresponding to the relatively concave position in the head, such as the knuckle position. Optionally, taking the hand as an example, the positions where the head convex hull points are located include the fingertip position, the center position of the finger joint, the center position of the connection at the finger root, etc., and the positions where the head concave points are located include the finger joint position, the finger root position, and the center position of the palm.

[0592] In some embodiments, the facial area is determined based on the head feature points. The facial area is the area in the head excluding the fingers, or it can be understood that the facial area is the area including facial features. Optionally, the boundary line between the fingers and the facial area is determined based on the head feature points. Based on this boundary line and the head contour, the facial area is determined.

[0593] In some embodiments, during the process of facial feature collection, the terminal will prompt the user through at least one prompt message. Optionally, the prompt message includes at least one of the following:

[0594] · The first prompt message;

[0595] · The second prompt message;

[0596] · The third prompt message.

[0597] In some embodiments, the first prompt message is used to prompt the user to adjust the position of the head.

[0598] The display module is further configured to display the first prompt message when it is determined that the target object is a head and the head contour is incomplete.

[0599] When it is determined that the target object is the head, analyze the head contour of the head to determine whether the head contour is complete. Optionally, by calculating the ratio of the area to the perimeter of the head contour, determine whether there is an interruption in the head contour. For example, when there is no interruption in the head contour, the ratio of the area to the perimeter of the head contour is 1:1.5; then when the calculated ratio of the area to the perimeter of the head contour is 1:1, it can be determined that there is an interruption in the head contour.

[0600] In some embodiments, when the head contour is incomplete, it may not be possible to accurately identify the facial area. For example, when the head contour only includes the finger contour, the facial area cannot be recognized. Therefore, when it is determined that the target object is the head and the head contour is incomplete, display the first prompt message. Remind the user to adjust the position of the head through the first prompt message so that a complete head contour can be recognized, thereby ensuring that the facial area can be accurately recognized.

[0601] Exemplarily, as Figure 12 shown, when it is determined that the target object is the head and the head contour is incomplete, display the first prompt message 18, and the first prompt message 18 is used to prompt the user that "the head is incomplete".

[0602] In some embodiments, the second prompt message is used to prompt the user to replace the target object.

[0603] The display module is further configured to display the second prompt message when it is determined that the target object is not the head.

[0604] In some embodiments, display the second prompt message when it is determined that the target object is not the head. Or, when it is recognized that the target object is the target object and the target object is not the head, display the second prompt message.

[0605] Exemplarily, as Figure 14 shown, when it is determined that the target object is not the head, display the second prompt message 19, and the second prompt message 19 is used to prompt the user that "the head cannot be recognized".

[0606] Optionally, when it is repeatedly determined that the target object is not the head, repeatedly display the second prompt message until the user replaces the target object with the head.

[0607] In some embodiments, the third prompt message is used to prompt the user to adjust the light.

[0608] The extraction module is further configured to extract the light characteristics in the image frame.

[0609] In some embodiments, after obtaining an image frame of a target object, the light features in the image frame are extracted. In some embodiments, the light features include brightness and chromaticity. Optionally, the light brightness in the image frame is extracted. Optionally, the light chromaticity in the image frame is extracted.

[0610] The display module is further configured to display a third prompt message when the light features indicate that the light in the image frame does not meet the light threshold.

[0611] In some embodiments, the extracted light features are compared with a light threshold. When the light features indicate that the light in the image frame does not meet the light threshold, a third prompt message is displayed. Optionally, the light threshold is preset or dynamically adjusted.

[0612] Exemplarily, as Figure 16 shown, when the light features in the image frame do not meet the light threshold, or equivalently, when the light in the acquired capture image 51 is less or dim, a third prompt message 50 is displayed. The third prompt message 50 is used to prompt the user that "the light is dim" or to prompt the user to adjust the light in the current capture environment.

[0613] Figure 22 FIG. shows a block diagram of a computer device 2200 provided by an exemplary embodiment of the present application. The computer device 2200 may be a portable mobile terminal, such as: a smart phone, a tablet computer, an MP3 player, an MP4 player. The computer device 2200 may also be referred to by other names such as user equipment, portable terminal, etc. Generally, the computer device 2200 includes: a processor 2201 and a memory 2202.

[0614] The processor 2201 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 2201 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), or 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 the wake state, also known as the central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 2201 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2201 may further include an artificial intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning.

[0615] The memory 2202 may include one or more computer-readable storage media, and the computer-readable storage media 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 storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 2202 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 2201 to implement the gift-giving method based on the live broadcast room provided in the embodiments of the present application.

[0616] In some embodiments, the computer device 2200 may further optionally include: a peripheral device interface 2203 and at least one peripheral device. Specifically, the peripheral device includes at least one of: a radio frequency circuit 2204, a touch display screen 2205, a camera 2206, an audio circuit 2207, and a power supply 2208. The peripheral device interface 2203 can be used to connect at least one peripheral device related to input / output (I / O) to the processor 2201 and the memory 2202. In some embodiments, the processor 2201, the memory 2202, and the peripheral device interface 2203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 2201, the memory 2202, and the peripheral device interface 2203 can be implemented on a separate chip or circuit board, and this embodiment does not limit this. The radio frequency circuit 2204 is used to receive and transmit radio frequency (RF) signals, also known as electromagnetic signals. The radio frequency circuit 2204 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 2204 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 2204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, etc. The radio frequency circuit 2204 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a wireless fidelity (Wi-Fi) network. In some embodiments, the radio frequency circuit 2204 may further include a circuit related to near field communication (NFC), and this application does not limit this.

[0617] The touch display screen 2205 is used to display a User Interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. The touch display screen 2205 also has the ability to collect touch signals on or above the surface of the touch display screen 2205. The touch signal can be input as a control signal to the processor 2201 for processing. The touch display screen 2205 is used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one touch display screen 2205, which is provided on the front panel of the computer device 2200; in other embodiments, there may be at least two touch display screens 2205, which are respectively provided on different surfaces of the computer device 2200 or are in a foldable design; in some embodiments, the touch display screen 2205 may be a flexible display screen, which is provided on a curved surface or a folding surface of the computer device 2200. Even further, the touch display screen 2205 can also be set to an irregular non-rectangular shape, that is, a special-shaped screen. The touch display screen 2205 can be prepared using materials such as a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), etc.

[0618] The camera 2206 is used to collect images or videos. Optionally, the camera 2206 includes a front camera and a rear camera. Generally, the front camera is used to implement video calls or selfies, and the rear camera is used to implement photo or video shooting. In some embodiments, there are at least two rear cameras, which are respectively any one of a main camera, a depth-of-field camera, and a wide-angle camera, so as to implement the function of background blurring by fusing the main camera and the depth-of-field camera, and implement panoramic shooting and Virtual Reality (VR) shooting functions by fusing the main camera and the wide-angle camera. In some embodiments, the camera 2206 may also include a flash. The flash can be a single-color-temperature flash or a dual-color-temperature flash. A dual-color-temperature flash refers to a combination of a warm-light flash and a cold-light flash, which can be used for light compensation under different color temperatures.

[0619] The audio circuit 2207 is used to provide an audio interface between the user and the computer device 2200. The audio circuit 2207 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 2201 for processing, or input to the radio frequency circuit 2204 to achieve voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the computer device 2200. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signals from the processor 2201 or the radio frequency circuit 2204 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for uses such as ranging. In some embodiments, the audio circuit 2207 may further include a headphone jack.

[0620] The power supply 2208 is used to supply power to each component in the computer device 2200. The power supply 2208 may be alternating current, direct current, a disposable battery or a rechargeable battery. When the power supply 2208 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0621] In some embodiments, the computer device 2200 further includes one or more sensors 2209. The one or more sensors 2209 include, but are not limited to: an acceleration sensor 2210, a gyroscope sensor 2211, a pressure sensor 2212, an optical sensor 2213, and a proximity sensor 2214. The acceleration sensor 2210 can detect the magnitudes of accelerations on the three coordinate axes of the coordinate system established with the computer device 2200. For example, the acceleration sensor 2210 can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 2201 can control the touch display screen 2205 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 2210. The acceleration sensor 2210 can also be used for collecting game or user motion data. The gyroscope sensor 2211 can detect the body direction and rotation angle of the computer device 2200. The gyroscope sensor 2211 can cooperate with the acceleration sensor 2210 to collect the 3D actions of the user on the computer device 2200. Based on the data collected by the gyroscope sensor 2211, the processor 2201 can implement the following functions: motion sensing (such as changing the UI according to the user's tilting operation), image stabilization during shooting, game control, and inertial navigation. The pressure sensor 2212 can be disposed on the side frame of the computer device 2200 and / or the lower layer of the touch display screen 2205. When the pressure sensor 2212 is disposed on the side frame of the computer device 2200, it can detect the holding signal of the user on the computer device 2200, and perform left / right hand recognition or shortcut operations according to the holding signal. When the pressure sensor 2212 is disposed on the lower layer of the touch display screen 2205, it can control the operable controls on the UI interface according to the pressure operation of the user on the touch display screen 2205. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls. The optical sensor 2213 is used for collecting the ambient light intensity. In one embodiment, the processor 2201 can control the display brightness of the touch display screen 2205 according to the ambient light intensity collected by the optical sensor 2213. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 2205 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 2205 is decreased. In another embodiment, the processor 2201 can also dynamically adjust the shooting parameters of the camera assembly 2206 according to the ambient light intensity collected by the optical sensor 2213. The proximity sensor 2214, also known as a distance sensor, is usually disposed on the front of the computer device 2200. The proximity sensor 2214 is used for collecting the distance between the user and the front of the computer device 2200.In one embodiment, when the proximity sensor 2214 detects that the distance between the user and the front of the computer device 2200 is gradually decreasing, the touch display screen 2205 is controlled by the processor 2201 to switch from the lit state to the off state; when the proximity sensor 2214 detects that the distance between the user and the front of the computer device 2200 is gradually increasing, the touch display screen 2205 is controlled by the processor 2201 to switch from the off state to the lit state.

[0622] Those skilled in the art can understand that Figure 22 the structure shown in does not constitute a limitation on the computer device 2200, and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component layout.

[0623] 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, and the at least one program is loaded and executed by the processor to implement the identity feature acquisition method as described above.

[0624] In an exemplary embodiment, a computer-readable storage medium is further provided. At least one program is stored in the computer-readable storage medium, and when the at least one program is executed by the processor, it is used to implement the identity feature acquisition method as described above. Optionally, the above computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0625] In an exemplary embodiment, a computer program product is further provided. The computer program product includes at least one program, the at least one program is stored in a computer-readable storage medium, the processor reads the at least one program from the computer-readable storage medium, and the processor executes the at least one program to implement the identity feature acquisition method as described above.

[0626] It should be understood that "a plurality" as mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0627] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk, an optical disc, etc.

[0628] The above are only alternative embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. An identity feature acquisition method, characterized in that, The method includes: During the identity feature acquisition process, displaying the camera preview screen and the acquisition frame in the first display state; In response to identifying a body feature area in the camera preview screen, displaying a follow-up frame on the body feature area, where the display shape of the follow-up frame changes according to the plane where the body feature area is located and the distance between the body feature area and the camera; In response to the relative position between the follow-up frame and the acquisition frame in the first display state satisfying the acquisition condition, switching the display of the acquisition frame in the first display state to the acquisition frame in the second display state; Wherein, the first display state is different from the second display state.

2. The method according to claim 1, wherein The step of, in response to identifying a body feature area, displaying a follow-up frame on the body feature area includes: In response to identifying the body feature area, using a reference point on the body feature area as the center point of the follow-up frame and displaying the follow-up frame.

3. The method according to claim 2, wherein The method further includes: In response to the body feature area tilting or translating or rotating or any combination thereof following a target body part, updating the display of the follow-up frame so that the center point of the follow-up frame and the reference point on the body feature area remain consistent; Wherein, the target body part is the body part where the body feature area is located.

4. The method according to claim 1, characterized in that The step of, in response to identifying a body feature area, displaying a follow-up frame on the body feature area includes: In response to identifying the body feature area, using a target size as the size of the follow-up frame and displaying the follow-up frame; Wherein, the target size is associated with the distance between the body feature area and the camera.

5. The method according to claim 4, characterized in that, The target size has a negative correlation with the distance between the body feature area and the camera.

6. The method according to any one of claims 1 to 5, characterized in that, The acquisition condition includes at least one of the following: The shape of the follow-up frame is the same as the shape of the acquisition frame in the first display state; The size of the follow-up frame is the same as the size of the acquisition frame in the first display state; The ratio of the area of the follow-up frame to the area of the acquisition 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 acquisition 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 acquisition frame in the first display state is less than a distance threshold; The difference between the radius of the follow-up frame and the radius of the acquisition frame in the first display state is less than a length difference threshold.

7. The method according to any one of claims 1 to 6, characterized in that, Before, in response to identifying a body feature area in the camera preview screen, displaying a follow-up frame on the body feature area, the method further includes: In response to identifying a target object in the camera preview screen, acquiring an image frame corresponding to the target object; When determining that the target object is a target body part, extracting target feature points from the image frame and determining the body feature area based on the target feature points.

8. The method according to claim 7, characterized in that 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 target body part, determining that the target object is the target body part.

9. The method according to claim 8, wherein The method further includes: When it is determined that the target object is the target body part and the contour of the target body part is incomplete, a first prompt message is displayed, and the first prompt message is used to prompt to adjust the position of the target body part.

10. The method according to claim 8, wherein The method further includes: When it is determined that the target object is not the target body part, a second prompt message is displayed, and the second prompt message is used to prompt to replace the target object.

11. The method according to any one of claims 7 to 10, characterized in that, The method further includes: Extract the light characteristics in the image frame; When the light characteristics indicate that the light in the image frame does not meet the light threshold, a third prompt message is displayed, and the third prompt message is used to prompt to adjust the light.

12. An identity feature acquisition device, characterized in that, The device includes: A display module, configured to display a camera preview screen and a collection frame in a first display state during the identity feature collection process; The display module is further configured to, in response to identifying a body feature area in the camera preview screen, display a follow-up frame on the body feature area, and the display shape of the follow-up frame changes according to the plane where the body feature area is located and the distance between the body feature area and the camera; The display module is further configured to, in response to the relative position between the follow-up frame and the collection frame in the first display state meeting the collection condition, switch the display of the collection frame in the first display state to a collection frame in the second display state; Wherein, the first display state is different from the second display state.

13. A computer device, characterized in that, 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 identity feature collection method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, 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 identity feature collection method according to any one of claims 1 to 11.

15. A computer program product or a computer program, characterized in that, The computer program product or computer program includes at least one program, the at least one program is stored in a computer-readable storage medium, and the processor reads and executes the at least one program from the computer-readable storage medium to implement the identity feature collection method according to any one of claims 1 to 11.