Image update method, device, equipment and storage medium
By automatically detecting user face images in the image recognition system and updating the database, the problem of low manual update efficiency is solved, and a convenient image update process is realized.
Patent Information
- Application Number
- CN202210327089.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-03-30
AI Technical Summary
In the prior art, the method of manually updating images is inefficient and inconvenient to operate. Especially when image recognition technology is applied to attendance scenes, managers need to manually replace images in the database, wasting time.
By detecting the user in the preset shooting area, displaying the current user's face image and determining whether the update conditions are met, displaying the preset photography frame to obtain the latest user's face image, automatically update the image database, and avoiding manual intervention.
It realizes that no manual update is required for managers, automatically obtaining user face images and updating the database, improving update efficiency and more convenient operation.
Smart Images

Figure CN114898422B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technologies, and in particular, to an image update method, apparatus, device, and storage medium. Background Art
[0002] With the wide application of image recognition technologies, during the image recognition process, it is usually necessary to obtain the currently input image and compare the input image with the images stored in the database. If the two images are relatively consistent, it can be determined that the input image verification is successful.
[0003] Taking the application of image recognition technology in the attendance machine scenario as an example, the management staff pre-stores the images of users in the database. When performing a face swiping operation, the current image of the user is obtained and compared with the images in the database. If the images are similar, the user is allowed to open the door or punch the card. If the user needs to replace the image stored in the database, they can contact the management staff, and the management staff will replace the image in the database.
[0004] However, the current method of manually updating images based on humans not only has low efficiency, but also wastes time and is not convenient enough in operation. Summary of the Invention
[0005] This application provides an image update method, apparatus, device, and storage medium to solve the problem that the existing method of manually updating images based on humans is not convenient enough in operation.
[0006] In a first aspect, this application provides an image update method, including:
[0007] Determine whether a user is detected within a preset shooting area range;
[0008] If so, display the current user's face image on the display interface, and determine whether the current user's face image meets a preset image update condition;
[0009] If so, display a preset photo frame on the display interface;
[0010] Detect whether a user's face is recognized within the preset photo frame;
[0011] If so, obtain the latest user's face image captured, and update a preset image database according to the latest user's face image.
[0012] In a second aspect, this application provides an image update apparatus, including:
[0013] A determination unit, configured to determine whether a user is detected within a preset shooting area range;
[0014] A determination unit is further configured to, if so, display the current user's face image on the display interface and determine whether the user meets a preset image update condition based on the current user's face image;
[0015] A display unit is configured to, if so, display a preset photo frame on the display interface;
[0016] A detection unit is configured to detect whether a user's face is recognized within the preset photo frame;
[0017] An image update unit is configured to, if so, obtain the latest user's face image taken and update a preset image database according to the latest user's face image.
[0018] In a third aspect, the present invention provides an electronic device, including: a processor, a memory, a shooting module, and a display module;
[0019] The processor, the memory, the shooting module, and the display module are interconnected by circuits;
[0020] The shooting module is configured to shoot images;
[0021] The display module is configured to display images and a preset photo frame;
[0022] The memory stores computer-executable instructions;
[0023] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method described in the first aspect.
[0024] In a fourth aspect, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0025] An image update method, device, equipment, and storage medium provided in this application determine whether a user is detected within a preset shooting area; if so, display the current user's face image on the display interface and determine whether the current user's face image meets a preset image update condition; if so, display a preset photo frame on the display interface; detect whether a user's face is recognized within the preset photo frame; if so, obtain the latest user's face image taken and update a preset image database according to the latest user's face image, without manual update by management personnel, automatically obtaining the user's face image and updating the database, effectively improving the update efficiency and making the operation more convenient. Description of the Drawings
[0026] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0027] Figure 1 It is a schematic diagram of an application scenario of the image update method provided by the present invention;
[0028] Figure 2 It is a schematic flowchart of the image update method provided in the first embodiment of the present invention;
[0029] Figure 3 It is a schematic flowchart of the image update method provided in the second embodiment of the present invention;
[0030] Figure 4 It is a schematic flowchart of the image update method provided in the fifth embodiment of the present invention;
[0031] Figure 5 It is a schematic diagram of the range of the circular ring area of the image update method provided in an embodiment of the present invention;
[0032] Figure 6 It is the range of the image update recognition area of the image update method provided in an embodiment of the present invention;
[0033] Figure 7 It is a schematic flowchart of the image update method provided in the eighth embodiment of the present invention;
[0034] Figure 8 It is a schematic structural diagram of an image update device provided in an embodiment of the present invention;
[0035] Figure 9 It is the first block diagram of an electronic device for implementing the image update method of the embodiment of the present invention;
[0036] Figure 10 It is the second block diagram of an electronic device for implementing the image update method of the embodiment of the present invention.
[0037] Through the above-mentioned drawings, the specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed Embodiments
[0038] 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 embodiments described in the following exemplary embodiments do not represent all embodiments 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.
[0039] To clearly understand the technical solution of the present application, the solutions of the prior art will be introduced in detail first.
[0040] With the wide application of image recognition technology, during the image recognition process, usually the current input image is obtained and compared with the images stored in the database. If the two images are relatively consistent, it can be determined that the input image verification is successful. Taking the application of image recognition technology in the attendance machine scenario as an example, the management personnel pre-store the user's image in the database. When performing the face swiping operation, the current user's image is obtained and compared with the image in the database. If the images are similar, the user is allowed to open the door or punch the card. For example, if a user wants to replace the face image stored in the database, they send the face image to the management personnel for contact, and the management personnel replace the image in the database to update the face image.
[0041] However, the current method of manually updating images not only has low efficiency, but also wastes time and is not convenient enough to operate.
[0042] Therefore, aiming at the problem that the operation of the method of manually updating images in the prior art is not convenient enough, the inventor found in the research that a method for automatically updating images is provided. Specifically, it is determined whether a user is detected within a preset shooting area; if so, the current user's face image is displayed on the display interface, and it is judged whether the current user's face image meets the preset image update condition; if so, a preset photo frame is displayed on the display interface; it is detected whether the user's face is recognized within the preset photo frame; if so, the latest user's face image taken is obtained, and the preset image database is updated according to the latest user's face image. There is no need for the management personnel to update manually, the user's face image is automatically obtained and the database is updated, effectively improving the update efficiency and making the operation more convenient.
[0043] Therefore, based on the above creative discovery, the inventor proposed the technical solution of the embodiment of the present invention. The application scenario of the image update method provided by the embodiment of the present invention will be introduced below.
[0044] As Figure 1 shown, the electronic device 1 includes a display screen 2 and a camera 3. The camera 3 photographs the user within the preset area range, and the electronic device 1 determines whether a user is detected within the preset shooting area; if so, the current user's face image is displayed on the display screen 2, and it is judged whether the current user's face image meets the preset image update condition; if so, a preset photo frame is displayed on the display interface. For example, Figure 1 the dotted line shown in
[0045] The embodiments of the present invention will be specifically described below with reference to the accompanying drawings.
[0046] Embodiment 1
[0047] Figure 2 is a schematic flowchart of the image update method provided in Embodiment 1 of the present invention. As Figure 2 shown, the execution subject of the image update method provided in this embodiment is an image update device, and the image update device is located in an electronic device. Then, the image update method provided in this embodiment includes the following steps:
[0048] Step 101, determine whether a user is detected within a preset shooting area range.
[0049] In this embodiment, the image update device is provided with a shooting device, and the shooting device has a corresponding preset shooting area range. The image update device determines whether a user is detected within the preset shooting area range to determine whether the user is within the shooting area range.
[0050] Step 102, if so, display the current user's face image on the display interface, and determine whether the current user's face image meets the preset image update condition.
[0051] In this embodiment, if a user is detected within the preset shooting area range and the current user's face image is displayed on the display interface of the image update device, it indicates that the user may want to update the face image pre-stored in the image database. Further determine whether the current user's face image meets the preset image update condition. Among them, the pre-stored face image may be an ID photo, or because the image quality is not high and it is not easy to recognize, so the pre-stored face image needs to be replaced, that is, the background image is replaced.
[0052] Step 103, if so, display a preset photo frame on the display interface.
[0053] In this embodiment, if the current user's face image meets the preset image update condition, it indicates that the user can replace the background image. A preset photo frame is displayed on the display interface of the image update device. Among them, the preset photo frame can be set at the middle position of the display interface, and the middle position generally has a better imaging effect. While displaying the preset photo frame, a prompt message for moving the face into the preset photo frame is also displayed on the display interface, and the user moves the face into the preset photo frame after seeing the prompt message.
[0054] Step 104, detect whether the user's face is recognized within the preset photo frame.
[0055] In this embodiment, it is detected whether a human face is recognized within a preset photographing frame. If a user is recognized within the preset photographing frame, it means the user has moved their face into the preset photographing frame, and then a photograph can be taken to update the base map in the database. If no user is recognized within the preset photographing frame, it means the user has not moved their face into the preset photographing frame, and the user will continue to be prompted to move their face into the preset photographing frame.
[0056] Step 105: If so, obtain the latest user face image taken and update the preset image database according to the latest user face image.
[0057] In this embodiment, if it is detected that a user's face is recognized within the preset photographing frame, the user is photographed to obtain the latest user face image taken, and then the preset image database is further updated according to the latest user face image.
[0058] In this embodiment, it is determined whether a user is recognized within the preset shooting area. If a user is recognized within the preset shooting area, the current user face image is displayed on the display interface. Further, it is determined whether the current user face image meets the preset image update condition. If it meets the condition, a preset photographing frame is displayed on the display interface, and it is detected whether a user's face is recognized within the preset photographing frame. If so, obtain the latest user face image taken and update the preset image data according to the latest user face image. There is no need for a management staff to manually update. The user face image is automatically obtained and the database is updated, effectively improving the update efficiency and making the operation more convenient.
[0059] Embodiment 2
[0060] Figure 3 It is a schematic flowchart of the image update method provided by Embodiment 2 of the present invention. As Figure 3 shown, on the basis of the image update method provided by Embodiment 1 of the present invention, step 101 is further refined, and specifically includes the following steps:
[0061] Step 1011: Obtain the residence time of the user recognized within the preset shooting area range and the preset residence time.
[0062] In this embodiment, the residence time of the user recognized within the preset shooting area range and the preset residence time are obtained. The residence time is the time of staying within the preset shooting area range. According to the residence time, it can be determined whether the user is passing through the shooting area, and according to the residence time, the intention of the user can be determined.
[0063] Step 1012: Compare the residence time of the user with the preset residence time, and determine whether a user is detected within the preset shooting area range according to the comparison result of the residence time.
[0064] In this embodiment, the residence time of the user recognized within the preset shooting area is compared with the preset residence time, and it is determined whether the user is detected within the preset shooting area according to the comparison result of the residence time. If the residence time of the user is relatively short, it can be considered that the user is just passing by the shooting area. If the residence time of the user is relatively long, it is determined that the user is detected within the preset shooting area.
[0065] Embodiment III
[0066] Based on the image update method provided in Embodiment II of the present invention, step 1012 is further refined, specifically including the following steps:
[0067] For step 1012a, if the residence time of the user is greater than the preset residence time, it is determined that the user is detected within the preset shooting area.
[0068] In this embodiment, if the residence time of the user recognized within the preset shooting area is greater than the preset residence time, it indicates that the user is not just passing by, and it is determined that the user is detected within the preset shooting area.
[0069] For step 1012b, if the residence time of the user is less than or equal to the preset residence time, it is determined that the user is not detected within the preset shooting area.
[0070] In this embodiment, if the residence time of the user recognized within the preset shooting area is less than or equal to the preset residence time, it indicates that the user is just passing by, and it is determined that the user is not detected within the preset shooting area.
[0071] Embodiment IV
[0072] Based on the image update method provided in Embodiment I of the present invention, whether the current user face image meets the preset image update condition in step 102 is further refined, specifically including the following steps:
[0073] Step 1021, determine the image update recognition area corresponding to the user according to the current user face image, and display the image update recognition area on the display interface.
[0074] In this embodiment, the image update recognition area corresponding to the user is determined according to the current user face image. Specifically, the center point of the user face is determined according to the current user face image, and the image update recognition area is determined according to the center point of the user face and the distance from the center point of the user face to the boundary of the user face.
[0075] Step 1022, detect whether a user face is recognized within the image update recognition area; if so, execute step 1023; if not, execute step 1024.
[0076] In this embodiment, it is detected whether a user face is recognized within the image update recognition area, and according to the detection result, it is determined whether the user meets the preset image update condition.
[0077] Step 1023: Determine that the user meets the preset image update condition.
[0078] In this embodiment, if it is detected that a user face is recognized within the image update recognition area, it indicates that the user has moved the face into the image update recognition area, and then it is determined that the user meets the preset image update condition.
[0079] Step 1024: Determine that the user does not meet the preset image update condition.
[0080] In this embodiment, if it is detected that no user face is recognized within the image update recognition area, it indicates that the user has not moved the face into the image update recognition area, and then it is determined that the user does not meet the preset image update condition.
[0081] Embodiment Five
[0082] Figure 4 is a flowchart of the image update method provided in Embodiment Five of the present invention. As Figure 4 shown, on the basis of the image update method provided in Embodiment Four of the present invention, step 1021 is further refined, and specifically includes the following steps:
[0083] Step 1021A: Determine the corresponding user face center point according to the current user face image, and obtain the distance from the user face center point to the user face boundary.
[0084] In this embodiment, the corresponding user face center point is determined according to the current user face image. Among them, the face center point is preset, and the preset face center point can be the nose or the center of the two eyes or other positions on the face. If the preset face center point is the nose, the position of the nose is determined according to the current user face image. The face boundary is preset, and the face boundary includes the left face boundary, the right face boundary, the upper face boundary and the lower face boundary of the face. If the preset face boundary is the upper face boundary of the face, for example, the distance from the nose to the upper face boundary is obtained.
[0085] Step 1021B: Determine the corresponding image update recognition area range according to the face center point and the distance from the user face center point to the user face boundary. The image update recognition area range includes at least one image update recognition area.
[0086] In this embodiment, the range of the image update recognition area of the user is determined according to the center point of the human face and the distance from the center point of the user to the boundary of the user's human face. For example, the range of the image update recognition area of the user can be determined according to the user's nose and the distance from the nose to the upper boundary of the human face. The range of the image update recognition area includes at least one image update recognition area.
[0087] Step 1021C, select an image update recognition area from the corresponding range of the image update recognition area at will, and determine the selected image update recognition area as the image update recognition area corresponding to the user.
[0088] In this embodiment, an image update recognition area is selected at will from the range of the image update recognition area including at least one image update recognition area, and the image update recognition area is determined as the image update recognition area corresponding to the user. Any one of the image update recognition areas in the range of the image update recognition area can be used as the image update recognition area corresponding to the user.
[0089] Embodiment Six
[0090] Based on the image update method provided in Embodiment Five of the present invention, step 1021A is further refined, and specifically includes the following steps:
[0091] Step 1021A1, determine the distance from the center point of the user's human face to the boundary of the user's human face as the first distance, and determine the second distance and the third distance according to the first distance.
[0092] See Figure 5 , the center point of the user's human face is the nose, the boundary of the user's human face is the upper boundary, the distance from the center point of the user's human face to the boundary of the user's human face is determined as the first distance. In Figure 5 , the first distance is r1, the second distance is determined according to the first distance, the second distance is three times the first distance, and the second distance is r2; the third distance is determined according to the first distance, the third distance is five times the first distance, and the third distance is r3.
[0093] Step 1021A2, determine the first ring with the center point of the human face as the center and the second distance as the radius, and determine the second ring with the center point of the human face as the center and the third distance as the radius. The second ring and the first ring are concentric circles.
[0094] See Figure 5 , determine the first ring with the center of the human face as the origin and the second distance as the radius. Specifically, draw a ring with the center of the human face as the origin and the second distance as the radius, that is, the first ring. Determine the second ring with the center point of the human face as the center and the third distance as the radius. Specifically, draw a ring with the center of the human face as the origin and the third distance as the radius, that is, the second ring. The second ring is a concentric circle with the third ring.
[0095] Step 1021A3: Determine the area between the first ring and the second ring as the ring area range, and determine at least one third ring within the ring area range. The third ring is a ring with the first distance as the radius and is arranged circumferentially within the ring area range.
[0096] In this embodiment, refer to Figure 5 , determine the area between the first ring and the second ring as the ring area range, draw at least one third ring within the ring area range. The third ring is a ring drawn with the first distance as the radius, and the third ring is arranged circumferentially within the ring area range. Refer to Figure 6 , draw multiple third rings within the ring area range.
[0097] Step 1021A4: Determine the overlapping area between the ring area range and the display area range of the display interface as the corresponding image update recognition area range.
[0098] In this embodiment, Figure 5 The solid line width in represents the display area of the display interface. Determine the overlapping area between the ring area range and the display area range of the display interface as the image update recognition area range.
[0099] Embodiment Seven
[0100] Based on the image update method provided in Embodiment Six of the present invention, step 1021C is further refined, specifically including the following steps:
[0101] 1021C1: Determine the multiple third rings in the image update recognition area range as the corresponding multiple image update recognition areas, and select any one image update recognition area from the multiple image update recognition areas.
[0102] In this embodiment, the third ring is a ring with the first distance as the radius and is arranged circumferentially within the ring area range. Refer to Figure 6 , 8 third rings are drawn in the image update recognition area range, and the 8 third rings are symmetrically arranged. Among them, the third ring numbered 6, the third ring numbered 7, and the third ring numbered 8 exceed the display area of the display interface and do not belong to the overlapping area between the ring area range and the display area range of the display interface. The third ring numbered 1, the third ring numbered 2, the third ring numbered 3, the third ring numbered 4, and the third ring numbered 5 are located within the display area of the display interface and belong to the overlapping area between the ring area range and the display area range of the display interface. Determine the third rings located within the display area of the display interface as the corresponding multiple image update recognition areas, and select any one image update recognition area from the multiple image update recognition areas. For example, determine the third ring numbered 1 as the image update recognition area.
[0103] Example Eight
[0104] Figure 7 is a schematic flowchart of the image update method provided in Example Eight of the present invention. As Figure 7 shown, based on the image update method provided in Example One of the present invention, step 105 is further refined, and specifically includes the following steps:
[0105] Step 1051, determine the corresponding user identity type according to the latest user face image.
[0106] In this embodiment, the user identity type of the user is determined according to the latest user face image. Among them, the user identity type includes in-storage users and to-be-in-storage users. In-storage users refer to a type of users verified by the management staff, and to-be-in-storage users refer to a type of users not yet verified by the management staff.
[0107] Step 1052, if the user identity type is an in-storage user, update the face image of the user pre-stored in the preset image database with the latest user face image.
[0108] In this embodiment, if the user identity type is an in-storage user, it means that the user has been verified by the management staff, and the face image of the user has been stored in the database. Update the face image of the user pre-stored in the preset database with the latest user face image.
[0109] Step 1053, if the user identity type is a to-be-in-storage user, send the latest user face image to the corresponding management terminal to obtain the user identity information feedback by the management terminal, and store the feedback user identity information and the corresponding user face image in the preset image database in an associated manner.
[0110] In this embodiment, if the user identity is a to-be-in-storage user, it means that the user has not been verified by the management staff, and the face image of the user is not stored in the database. Send the latest user face image to the management terminal of the corresponding management staff for the management terminal to feedback the user identity information of the user, obtain the user identity information feedback by the management terminal, and store the user identity information and the user face image in the preset image database for management.
[0111] Example Nine
[0112] Based on the image update method provided in Example Eight of the present invention, step 1051 is further refined, and specifically includes the following steps:
[0113] For step 1051a, compare the latest user face image with the face images in the preset image database to obtain multiple corresponding image similarity values.
[0114] In this embodiment, the latest user face image is compared with multiple face images in the preset image database to obtain multiple corresponding image similarity values, a preset similarity value is obtained, and the user identity type is determined according to the comparison result between the similarity value and the preset similarity value.
[0115] For step 1051b, if the maximum value of the image similarity is greater than the preset similarity value, the user identity type is determined as an in-storage user.
[0116] In this embodiment, the maximum value of the image similarity is obtained from the multiple corresponding image similarities. If the maximum value of the image similarity is greater than the preset similarity value, it indicates that the user face image matches the face image in the preset image database relatively well, and the user identity type is determined as an in-storage user.
[0117] For step 1051c, if the maximum value of the image similarity is less than or equal to the preset similarity value, the user identity type is determined as a to-be-in-storage user.
[0118] In this embodiment, the maximum value of the image similarity is obtained from the multiple corresponding image similarities. If the maximum value of the image similarity is less than or equal to the preset similarity value, it indicates that the user face image does not match the face image in the preset image database, and the user identity type is determined as a to-be-in-storage user.
[0119] Embodiment Ten
[0120] Based on the image update method provided in Embodiment Nine of the present invention, step 1052 is further refined, which specifically includes the following steps:
[0121] Step 1052a, updating the face image of the user corresponding to the maximum value of the image similarity in the preset image database with the latest user face image.
[0122] In this embodiment, the face image corresponding to the user with the maximum value of the image similarity is updated, and the latest user face image is used to replace the face image of the user with the maximum value of the image similarity in the preset image database to complete the update of the base map.
[0123] Embodiment Eleven
[0124] Based on the image update method provided in Embodiment One of the present invention, before obtaining the latest user face image captured in step 105, the following steps are further included:
[0125] Step 105a, scoring the user face state recognized within the preset photo frame to obtain the corresponding state score.
[0126] In this embodiment, the state of the user's face recognized within the preset photo frame is scored to obtain the corresponding state score. The state score is displayed on the display interface to prompt the user to adjust the posture, and an enlarged face image is also displayed on the display interface for the user to understand their face state.
[0127] Step 105b: If the state score is greater than the preset score, capture the face image, and determine the captured face image as the latest user face image.
[0128] In this embodiment, obtain the preset score, compare the preset score with the state score. If the state score is greater than the preset score, it indicates that the current user face image is relatively clear. Then capture the face image and determine the captured face image as the latest user face image.
[0129] Step 105c: If the state score is less than or equal to the preset score, display the state score and the prompt information corresponding to moving the face on the display interface, and execute the step of scoring the state of the user's face recognized within the preset photo frame until the state score is greater than the preset score.
[0130] In this embodiment, if the state score is less than or equal to the preset score, display the state score and the prompt information for moving the face on the display interface to prompt the user to adjust the posture. Score the state of the user's face recognized within the preset photo frame until the state score is greater than the preset score, then capture the face image and determine the captured face image as the latest user face image.
[0131] Figure 8 It is a schematic structural diagram of an image update device according to an embodiment of the present invention. As Figure 8 shown, the image update device 200 provided in this embodiment includes a determination unit 201, a display unit 202, a detection unit 203, and an image update unit 204.
[0132] Among them, the determination unit 201 is used to determine whether a user is detected within the preset shooting area. The determination unit 201 is also used to, if so, display the current user face image on the display interface and determine whether the user meets the preset image update condition based on the current user face image. The display unit 202 is used to, if so, display the preset photo frame on the display interface. The detection unit 203 is used to detect whether a user's face is recognized within the preset photo frame. The image update unit 204 is used to, if so, obtain the captured latest user face image and update the preset image database according to the latest user face image.
[0133] Optionally, the determining unit is further configured to obtain the residence time of the user recognized within the preset shooting area range and the preset residence time; compare the residence time of the user with the preset residence time, and determine whether the user is detected within the preset shooting area range according to the comparison result of the residence time.
[0134] Optionally, the determining unit is further configured to, if the residence time of the user is greater than the preset residence time, determine that the user is detected within the preset shooting area range; if the residence time of the user is less than or equal to the preset residence time, determine that the user is not detected within the preset shooting area range.
[0135] Optionally, the determining unit is further configured to determine the image update recognition area corresponding to the user according to the current user face image, and display the image update recognition area on the display interface; detect whether a user face is recognized within the image update recognition area; if so, determine that the user meets the preset image update condition; if not, determine that the user does not meet the preset image update condition.
[0136] Optionally, the determining unit is further configured to determine the corresponding user face center point according to the current user face image, and obtain the distance from the user face center point to the user face boundary; determine the corresponding image update recognition area range according to the face center point and the distance from the user face center point to the user face boundary, and the image update recognition area range includes at least one image update recognition area; select an image update recognition area arbitrarily from the corresponding image update recognition area range, and determine the selected image update recognition area as the image update recognition area corresponding to the user.
[0137] Optionally, the determining unit is further configured to determine the distance from the user face center point to the user face boundary as the first distance, and determine the second distance and the third distance according to the first distance; determine a first ring with the face center point as the center and the second distance as the radius, and determine a second ring with the face center point as the center and the third distance as the radius, and the second ring and the first ring are concentric circles; determine the area between the first ring and the second ring as the ring area range, and determine at least one third ring within the ring area range, and the third ring is a ring with the first distance as the radius and is arranged circumferentially along the ring area range; determine the overlapping area between the ring area range and the display area range of the display interface as the corresponding image update recognition area range.
[0138] Optionally, the determining unit is further configured to determine the multiple third rings within the image update recognition area range as the corresponding multiple image update recognition areas, and select an image update recognition area arbitrarily from the multiple image update recognition areas.
[0139] Optionally, the image update unit is further configured to determine the corresponding user identity type according to the latest user face image; if the user identity type is a user in the database, the latest user face image is used to update the face image of the user stored in the preset image database; if the user identity type is a user to be stored in the database, the latest user face image is sent to the corresponding management terminal to obtain the user identity information fed back by the management terminal, and the fed-back user identity information is associated with the corresponding user face image and stored in the preset image database.
[0140] Optionally, the image update unit is further configured to compare the latest user face image with the face images in the preset image database to obtain multiple corresponding image similarity values; if the maximum image similarity value is greater than the preset similarity value, it is determined that the user identity type is a user in the database; if the maximum image similarity value is less than or equal to the preset similarity value, it is determined that the user identity type is a user to be stored in the database.
[0141] Optionally, the image update unit is further configured to use the latest user face image to update the face image of the user corresponding to the maximum image similarity value in the preset image database.
[0142] Optionally, the image update device further includes: a scoring unit.
[0143] Wherein, the scoring unit is configured to score the user face state recognized in the preset photographing frame to obtain the corresponding state score; if the state score is greater than the preset score, the face image is photographed, and the photographed face image is determined as the latest user face image; if the state score is less than or equal to the preset score, the state score and the prompt information corresponding to the moving face are displayed on the display interface, and the step of scoring the user face state recognized in the preset photographing frame is executed until the state score is greater than the preset score.
[0144] Figure 9 is the first block diagram of the electronic device for implementing the image update method of the embodiment of the present invention, as Figure 9 shown, the electronic device 300 includes: a memory 301, a processor 302, a photographing module 303 and a display module 304.
[0145] The memory 301, the processor 302, the photographing module 303 and the display module 304 are interconnected by circuits;
[0146] The photographing module 303 is configured to photograph images;
[0147] The display module 304 is configured to display images and the preset photographing frame;
[0148] The memory 301 stores computer execution instructions;
[0149] The processor 302 executes the computer-executable instructions stored in the memory 301, enabling the processor to execute the methods provided in any of the above embodiments.
[0150] Figure 10 FIG. 4 is a second block diagram of an electronic device for implementing the image update method according to an embodiment of the present invention. As Figure 10 shown, the electronic device may be a computer, a digital broadcast terminal, a messaging device, a tablet device, a personal digital assistant, a server, a server cluster, etc.
[0151] The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0152] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0153] The memory 804 is configured to store various types of data to support the operation of the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0154] The power component 806 provides power to various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
[0155] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of the touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operations. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0156] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.
[0157] The I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power button, and a lock button.
[0158] The sensor component 814 includes one or more sensors for providing status assessments of various aspects of the electronic device 800. For example, the sensor component 814 can detect the on / off state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor component 814 can also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor component 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 814 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0159] The communication component 816 is configured to facilitate communication, either wired or wirelessly, between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0160] In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described method.
[0161] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions that can be executed by a processor 820 of the electronic device 800 to complete the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0162] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the terminal device to execute the image update method of the above-described electronic device.
[0163] In an exemplary embodiment, a computer program product is also provided, including a computer program that is executed by a processor to perform the method of any of the above embodiments.
[0164] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and embodiments are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0165] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image update method, characterized in that, The method includes: Determine whether a user is detected within a preset shooting area; If so, display the current user's face image on the display interface, determine the image update recognition area corresponding to the user according to the current user's face image, and display the image update recognition area on the display interface; Detect whether a user's face is recognized within the image update recognition area; If a user's face is recognized, determine that the user meets the preset image update condition; If a user's face is not recognized, determine that the user does not meet the preset image update condition; If the preset image update condition is met, display a preset photo frame on the display interface; Detect whether a user's face is recognized within the preset photo frame; If a user's face is recognized within the preset photo frame, obtain the latest user's face image captured, and update the preset image database according to the latest user's face image.
2. The method according to claim 1, characterized in that The determining whether a user is detected within a preset shooting area includes: Obtain the staying time of the user recognized within the preset shooting area and a preset staying time; Compare the staying time of the user with the preset staying time, and determine whether a user is detected within the preset shooting area according to the result of the staying time comparison.
3. The method according to claim 2, wherein The determining whether a user is detected within a preset shooting area according to the result of the staying time comparison includes: If the staying time of the user is greater than the preset staying time, determine that a user is detected within the preset shooting area; If the staying time of the user is less than or equal to the preset staying time, determine that no user is detected within the preset shooting area.
4. The method according to claim 1, wherein The determining the image update recognition area corresponding to the user according to the current user's face image includes: Determine the corresponding user face center point according to the current user's face image, and obtain the distance from the user face center point to the user face boundary; Determine the corresponding image update recognition area range according to the face center point and the distance from the user face center point to the user face boundary, and the image update recognition area range includes at least one image update recognition area; Select an image update recognition area arbitrarily from the corresponding image update recognition area range, and determine the selected image update recognition area as the image update recognition area corresponding to the user.
5. The method according to claim 4, wherein The determining the corresponding image update recognition area range according to the face center point and the distance from the user face center point to the user face boundary includes: Determine the distance from the user face center point to the user face boundary as the first distance, and determine the second distance and the third distance according to the first distance; Determine a first ring with the face center point as the center and the second distance as the radius, and determine a second ring with the face center point as the center and the third distance as the radius, and the second ring and the first ring are concentric circles; Determine the area between the first ring and the second ring as the ring area range, and determine at least one third ring within the ring area range, and the third ring is a ring with the first distance as the radius and is arranged circumferentially within the ring area range; Determine the overlapping area between the ring area range and the display area range of the display interface as the corresponding image update recognition area range.
6. The method according to claim 5, wherein Selecting an image update recognition area from within the corresponding image update recognition range includes: Determining multiple third circular rings within the image update recognition range as corresponding multiple image update recognition areas, and selecting an image update recognition area from the multiple image update recognition areas.
7. The method according to claim 1, characterized in that, Updating the preset image database according to the latest user face image includes: Determining the corresponding user identity type according to the latest user face image; If the user identity type is an in-storage user, updating the face image of this user pre-stored in the preset image database with the latest user face image; If the user identity type is a to-be-in-storage user, sending the latest user face image to the corresponding management terminal to obtain the user identity information feedback by the management terminal, and associating and storing the feedback user identity information with the corresponding user face image in the preset image database.
8. The method according to claim 7, wherein Determining the corresponding user identity type according to the latest user face image includes: Comparing the latest user face image with the face images in the preset image database to obtain multiple corresponding image similarity values; If the maximum value of the image similarity is greater than the preset similarity value, determining the user identity type as an in-storage user; If the maximum value of the image similarity is less than or equal to the preset similarity value, determining the user identity type as a to-be-in-storage user.
9. The method according to claim 8, wherein Updating the face image of this user pre-stored in the preset image database with the latest user face image includes: Updating the face image of the user corresponding to the maximum value of the image similarity in the preset image database with the latest user face image.
10. The method according to claim 1, wherein Before obtaining the latest user face image taken, it further includes: Scoring the user face state recognized within the preset photo frame to obtain the corresponding state score; If the state score is greater than the preset score, taking a photo of the face image and determining the taken face image as the latest user face image; If the state score is less than or equal to the preset score, displaying the state score and the prompt information corresponding to the moving face on the display interface, and performing the step of scoring the user face state recognized within the preset photo frame until the state score is greater than the preset score.
11. An image update device, characterized in that, The device includes: A determination unit, configured to determine whether a user is detected within the preset shooting area range; The determination unit is further configured to, if so, display the current user face image on the display interface, and determine whether the user meets the preset image update condition based on the current user face image; A display unit, configured to, if the preset image update condition is met, display a preset photo frame on the display interface; A detection unit, configured to detect whether a user face is recognized within the preset photo frame; An image update unit, configured to, if a user face is recognized within the preset photo frame, obtain the latest user face image taken, and update the preset image database according to the latest user face image; The determination unit is specifically configured to determine the corresponding image update recognition area of the user according to the current user face image, and display the image update recognition area on the display interface; Detect whether a user face is recognized within the image update recognition area; If a user face is recognized, determine that the user meets the preset image update condition; If the user's face is not recognized, it is determined that the user does not meet the preset image update condition.
12. An electronic device, comprising: A processor, a memory, a shooting module, and a display module; The processor, the memory, the shooting module, and the display module are interconnected by circuits; The shooting module is used for shooting images; The display module is used for displaying images and a preset photo frame; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, Computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by the processor, they are used to implement the method according to any one of claims 1 to 10.
14. A computer program product, comprising a computer program, characterized in that, The computer program, when executed by the processor, is used to implement the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Self-improvement method of FaceID database based on face recognition technology and self-improvement system thereof
CN107563343A
Human face picture storage system and method
CN107590212A