A smart community management method, system and program product
Through multi-step processing and feature extraction of face images collected by inspection robots, the problem of low efficiency and accuracy of face recognition in the existing technology is solved, and the management quality and safety of smart communities are improved.
Patent Information
- Application Number
- CN202411139828.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Due to poor adaptability to the environment and angle, the existing face collection and recognition technology in smart communities results in insufficient expressiveness of image features, affecting the efficiency and accuracy of personnel detection, thereby affecting the quality of management.
By scaling, cropping, filtering, and grayscale processing the face images collected by the inspection robot, and performing logarithmic transformation, nonlinear transformation, and image fusion, combined with blur enhancement and desharpening mask filtering, the feature vectors are extracted. Perform feature database matching to determine the identity of the person.
It effectively enhances the feature expression of face images, improves the accuracy of face recognition detection, and improves the management quality and security of smart communities.
Smart Images

Figure CN118658194B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of smart communities, and specifically relates to a smart community management method, system and program product. Background Art
[0002] Smart community refers to a model that integrates various existing service resources in the community through the use of various intelligent technologies and methods to provide community residents with a variety of convenient services such as government affairs, business, entertainment, education, medical care, and mutual assistance in life. Smart community management includes personnel management within the smart community. The existing personnel management methods within the smart community include installing networked cameras at fixed points for face collection and detection and recognition, and using patrol robots for mobile face collection and recognition detection. The face collection and detection method at fixed points is easy to be planned and evaded, and the actual effectiveness is not high. The existing robot patrol method for personnel detection and recognition is not well adapted to the face collection environment and angle light differences, resulting in insufficient expression of the extracted image features for face detection and recognition, which in turn leads to low efficiency and accuracy of personnel detection and recognition in some cases, affecting the quality of personnel management in smart communities. Summary of the invention
[0003] The purpose of the present invention is to provide a smart community management method, system and program product to solve the above-mentioned problems existing in the prior art.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] In a first aspect, a smart community management method is provided, comprising:
[0006] Obtain the initial facial image of the target person collected by the inspection robot when inspecting in the smart community;
[0007] Performing image scaling and image cropping processing on the initial face image to obtain a standard face image with a set image resolution, and performing image filtering processing on the standard face image to obtain a denoised face image;
[0008] Performing image grayscale processing on the denoised face image to obtain a face grayscale image, and determining the grayscale value of each pixel in the face grayscale image;
[0009] Performing logarithmic transformation processing on the grayscale image of the face based on the grayscale value of each pixel to obtain a first enhanced image, and performing image nonlinear transformation processing on the grayscale image of the face based on the grayscale value of each pixel to obtain a second enhanced image;
[0010] Performing image fusion processing on the face grayscale image, the first enhanced image, and the second enhanced image to obtain a fused enhanced image;
[0011] Performing fuzzy enhancement processing on the fused enhanced image to obtain a fuzzy enhanced image, and performing unsharp mask filtering processing on the fuzzy enhanced image to obtain an enhanced face image;
[0012] Extracting image feature vectors of the enhanced face image to obtain a first feature vector set of the enhanced face image;
[0013] Importing the first feature vector set of the enhanced face image into a preset first feature library, and performing similarity calculation with the face feature vector sets of each owner pre-stored in the first feature library, to obtain the first feature similarity between the first feature vector set and the face feature vector sets of each owner;
[0014] When a first feature similarity reaches a set similarity threshold, the first greeting message is output; when the first feature similarities do not reach the set similarity threshold, the first feature vector set of the enhanced face image is imported into a preset second feature library, and the similarity is calculated with the face feature vector sets of each owner-associated person pre-stored in the second feature library to obtain the second feature similarities of the first feature vector set and the face feature vector sets of each owner-associated person;
[0015] When the similarity of a second feature reaches the set similarity threshold, the second greeting message is output; when the similarities of each second feature do not reach the set similarity threshold, the registration prompt message is output, and an early warning message is sent to the smart community management backend.
[0016] In a possible design, the grayscale processing of the denoised face image to obtain the face grayscale image includes:
[0017] Determine the RGB three-color channel component value of each pixel in the denoised face image, and substitute the RGB three-color channel component value of each pixel in the denoised face image into a preset grayscale value formula for calculation to obtain the grayscale value of each pixel. The grayscale value formula is:
[0018] I0(x,y)=R(x,y)×ω1+G(x,y)×ω2+B(x,y)×ω3
[0019] Among them, (x, y) represents the pixel coordinates of the corresponding pixel, I0(x, y) represents the grayscale value of the corresponding pixel, R(x, y), G(x, y) and B(x, y) represent the RGB three color channel component values of the corresponding pixel, ω1, ω2 and ω3 are the weights of the set RGB three color channels respectively;
[0020] Construct a grayscale image of the face based on the grayscale value of each pixel.
[0021] In a possible design, performing logarithmic transformation on the face grayscale image based on the grayscale value of each pixel to obtain the first enhanced image includes:
[0022] Substitute the grayscale value of each pixel of the face grayscale image into the preset logarithmic transformation formula for calculation to obtain the first enhanced grayscale value of each pixel. The logarithmic transformation formula is:
[0023] I1(x,y)=lg[1+I0(x,y)]
[0024] Wherein, (x, y) represents the pixel coordinates of the corresponding pixel point, I1(x, y) represents the first enhanced grayscale value of the corresponding pixel point, and I0(x, y) represents the grayscale value of the corresponding pixel point;
[0025] A first enhanced image is constructed based on the first enhanced grayscale value of each pixel.
[0026] In a possible design, performing nonlinear transformation processing on the face grayscale image based on the grayscale value of each pixel to obtain the second enhanced image includes:
[0027] Substitute the grayscale value of each pixel of the face grayscale image into a preset nonlinear transformation formula for calculation to obtain the second enhanced grayscale value of each pixel. The nonlinear transformation formula is:
[0028]
[0029] Among them, (x, y) represents the pixel coordinates of the corresponding pixel point, I2 (x, y) represents the second enhanced grayscale value of the corresponding pixel point, I0 (x, y) represents the grayscale value of the corresponding pixel point, and α is the set adjustment coefficient. Represents the average gray value of all pixels in the grayscale image of the face;
[0030] A second enhanced image is constructed based on the second enhanced grayscale value of each pixel.
[0031] In a possible design, performing image fusion processing on the face grayscale image, the first enhanced image, and the second enhanced image to obtain a fused enhanced image includes:
[0032] Substitute the grayscale value of each pixel of the face grayscale image, the first enhanced grayscale value of each pixel of the first enhanced image, and the second enhanced grayscale value of each pixel of the second enhanced image into the preset image fusion formula for calculation to obtain the fused enhanced grayscale value of each pixel. The image fusion formula is:
[0033] I(x,y)=a×I0(x,y)+b×I1(x,y)+c×I2(x,y)
[0034] Wherein, (x, y) represents the pixel coordinates of the corresponding pixel, I(x, y) represents the fusion enhanced gray value of the corresponding pixel, I0(x, y) represents the gray value of the corresponding pixel in the face gray image, I1(x, y) represents the first enhanced gray value of the corresponding pixel in the first enhanced image, I2(x, y) represents the second enhanced gray value of the corresponding pixel in the second enhanced image, a, b and c are the first setting coefficient, the second setting coefficient and the third setting coefficient respectively;
[0035] A fused enhanced image is constructed based on the fused enhanced gray value of each pixel.
[0036] In a possible design, the fusion enhanced image is subjected to fuzzy enhancement processing to obtain a fuzzy enhanced image, and the fuzzy enhanced image is subjected to unsharp mask filtering processing to obtain an enhanced face image, including:
[0037] Substitute the fusion enhancement gray value of each pixel of the fusion enhancement image into the preset fuzzy enhancement processing formula for calculation to obtain the fuzzy enhancement gray value of each pixel. The fuzzy enhancement processing formula is:
[0038]
[0039] Among them, Q (x, y) represents the fuzzy enhanced gray value of the corresponding pixel, and ε is the set Gaussian parameter;
[0040] Construct a fuzzy enhanced image based on the fuzzy enhanced gray value of each pixel;
[0041] Substitute the fuzzy enhanced grayscale value of each pixel of the fuzzy enhanced image into the preset unsharp mask formula for calculation to obtain the final enhanced grayscale value of each pixel. The unsharp mask formula is:
[0042]
[0043] Among them, Z (x, y) represents the final enhanced grayscale value of the corresponding pixel, and β is the set weight factor.
[0044] In a possible design, the first feature vector set of the enhanced facial image is imported into a preset first feature library, and similarity is calculated with the facial feature vector sets of each owner pre-stored in the first feature library to obtain the first feature similarity between the first feature vector set and the facial feature vector sets of each owner, including:
[0045] The first feature vector set of the enhanced face image is imported into the preset first feature library, and the vector similarity between each first feature vector in the first feature vector set and the corresponding face feature vector in the corresponding owner face feature vector set is calculated using the set vector similarity formula. The vector similarity formula is:
[0046]
[0047] Among them, i represents the vector number, S represents the vector similarity, A represents the first feature vector, B represents the face feature vector, Represents the dot product operation, Characterization norm operations;
[0048] The sum of the similarities of each vector is taken as the first feature similarity between the first feature vector set and the corresponding owner's face feature vector set.
[0049] In a second aspect, a smart community management system is provided, including an image acquisition unit, an image filtering unit, a grayscale processing unit, a first enhancement unit, an image fusion unit, a second enhancement unit, a feature extraction unit, a first matching unit, a second matching unit and an information output unit, wherein:
[0050] An image acquisition unit, used to acquire an initial face image of a target person collected by the inspection robot when inspecting in a smart community;
[0051] An image filtering unit is used to perform image scaling and image cropping processing on the initial face image to obtain a standard face image with a set image resolution, and perform image filtering processing on the standard face image to obtain a denoised face image;
[0052] A grayscale processing unit is used to perform grayscale processing on the denoised face image to obtain a face grayscale image and determine the grayscale value of each pixel in the face grayscale image;
[0053] A first enhancement unit is used to perform logarithmic transformation processing on the face grayscale image based on the grayscale value of each pixel to obtain a first enhanced image, and perform image nonlinear transformation processing on the face grayscale image based on the grayscale value of each pixel to obtain a second enhanced image;
[0054] An image fusion unit, used for performing image fusion processing on the face grayscale image, the first enhanced image and the second enhanced image to obtain a fused enhanced image;
[0055] The second enhancement unit is used to perform fuzzy enhancement processing on the fused enhanced image to obtain a fuzzy enhanced image, and perform unsharp mask filtering processing on the fuzzy enhanced image to obtain an enhanced face image;
[0056] A feature extraction unit, used to extract image feature vectors from the enhanced face image to obtain a first feature vector set of the enhanced face image;
[0057] A first matching unit is used to import the first feature vector set of the enhanced face image into a preset first feature library, and perform similarity calculation with the face feature vector sets of each owner pre-stored in the first feature library to obtain the first feature similarity between the first feature vector set and the face feature vector sets of each owner;
[0058] The second matching unit is used to import the first feature vector set of the enhanced face image into a preset second feature library when the similarities of each first feature do not reach a set similarity threshold, and perform similarity calculation with the face feature vector sets of each owner-associated person pre-stored in the second feature library to obtain the similarities of each second feature between the first feature vector set and the face feature vector sets of each owner-associated person;
[0059] The information output unit is used to output a first greeting message when a first feature similarity reaches a set similarity threshold, output a second greeting message when a second feature similarity reaches a set similarity threshold, output a registration prompt message when the similarities of all second features do not reach the set similarity threshold, and send an early warning message to the smart community management backend.
[0060] In a third aspect, a smart community management system is provided, including:
[0061] A memory for storing instructions;
[0062] A processor is used to read the instructions stored in the memory and execute any one of the methods described in the first aspect according to the instructions.
[0063] In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored on the computer-readable storage medium, and when the instructions are executed on a computer, the computer executes any one of the methods described in the first aspect. In addition, a computer program product is provided, and when the computer program product is executed on a computer, the computer executes any one of the methods described in the first aspect.
[0064] Beneficial effects: The present invention obtains the corresponding facial grayscale image by scaling, cropping, filtering and gray-scaling the facial images collected by the inspection robot during inspection in the smart community, and then transforms the facial grayscale image in two ways, fuses the two enhanced images obtained with the facial grayscale image, and then performs fuzzy enhancement and unsharp mask filtering on the fused image to obtain an enhanced facial image to extract a feature vector set, and finally uses the feature vector set to perform similarity with the facial feature vector set in the corresponding feature library to determine whether the person is the owner, the owner-related person or the unregistered person, and outputs the corresponding information to realize the intelligent inspection management of the smart community. The present invention can effectively enhance the feature expression of the facial images collected by the robot inspection through the corresponding facial image enhancement and feature vector similarity matching process, improve the facial recognition detection effect of the people in the smart community, and then improve the management quality of the people in the smart community and ensure the safety of the smart community. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0066] Figure 1 Schematic diagram of the steps of the method in Example 1 of the present invention;
[0067] Figure 2 This is a schematic diagram of the structure of the system in Example 2 of the present invention;
[0068] Figure 3 This is a schematic diagram of the structure of the system in Example 3 of the present invention. DETAILED DESCRIPTION
[0069] It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. The specific structures and functional details disclosed herein are only used to describe the exemplary embodiments of the present invention. However, the present invention can be embodied in many alternative forms, and it should not be understood that the present invention is limited to the embodiments set forth herein.
[0070] It should be understood that, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments can be understood according to specific circumstances.
[0071] In the following description, certain details are provided to facilitate a complete understanding of the example embodiments. However, it will be appreciated by those of ordinary skill in the art that the example embodiments may be implemented without these certain details. For example, devices may be shown in block diagrams to avoid obscuring the examples with unnecessary details. In other embodiments, well-known processes, structures, and techniques may not be shown in unnecessary detail to avoid obscuring the embodiments.
[0072] Embodiment 1:
[0073] This embodiment provides a smart community management method, which can be applied to a corresponding personnel management terminal. The personnel management terminal can be mounted on a patrol robot in the smart community, such as Figure 1 As shown, the method comprises the following steps:
[0074] S1. Obtain an initial facial image of a target person collected by the inspection robot when inspecting in a smart community.
[0075] In the specific implementation, the inspection robot performs inspection tasks in the smart community. During the inspection process, the inspection robot collects the initial facial image of the target person in the smart community, and the personnel management terminal obtains the initial facial image collected by the inspection robot when patrolling in the smart community.
[0076] S2. Perform image scaling and image cropping processing on the initial face image to obtain a standard face image with a set image resolution, and perform image filtering processing on the standard face image to obtain a denoised face image.
[0077] In a specific implementation, after obtaining an initial face image, the initial face image can be preprocessed accordingly, including image scaling and image cropping to obtain a standard face image with a set image resolution, and then the standard face image is filtered to obtain a denoised face image. When performing image filtering on the standard face image, a median filtering method or a Gaussian filtering method can be used to perform image filtering. Median filtering can effectively eliminate salt and pepper noise in the image, and Gaussian filtering can effectively eliminate Gaussian noise in the image.
[0078] S3. Perform image grayscale processing on the denoised face image to obtain a face grayscale image, and determine the grayscale value of each pixel in the face grayscale image.
[0079] In the specific implementation, the RGB three-color channel component value of each pixel in the denoised face image is first determined, and the RGB three-color channel component value of each pixel in the denoised face image is substituted into the preset gray value formula for calculation to obtain the gray value of each pixel. The gray value formula is I0 (x, y) = R (x, y) × ω1 + G (x, y) × ω2 + B (x, y) × ω3. Among them, (x, y) represents the pixel coordinates of the corresponding pixel, I0 (x, y) represents the gray value of the corresponding pixel, R (x, y), G (x, y) and B (x, y) represent the RGB three-color channel component value of the corresponding pixel, ω1, ω2 and ω3 are the weights of the set RGB three-color channels; then the face gray image is constructed based on the gray value of each pixel.
[0080] S4. Perform logarithmic transformation on the grayscale image of the face based on the grayscale value of each pixel to obtain a first enhanced image, and perform image nonlinear transformation on the grayscale image of the face based on the grayscale value of each pixel to obtain a second enhanced image.
[0081] In specific implementation, the grayscale value of each pixel of the face grayscale image can be substituted into a preset logarithmic transformation formula for calculation to obtain the first enhanced grayscale value of each pixel. The logarithmic transformation formula is:
[0082] I1(x,y)=lg[1+I0(x,y)]
[0083] Among them, (x, y) represents the pixel coordinates of the corresponding pixel point, I1 (x, y) represents the first enhanced grayscale value of the corresponding pixel point, and I0 (x, y) represents the grayscale value of the corresponding pixel point. Then, the first enhanced image is constructed based on the first enhanced grayscale value of each pixel point.
[0084] The grayscale value of each pixel of the face grayscale image can be substituted into a preset nonlinear transformation formula for calculation to obtain the second enhanced grayscale value of each pixel. The nonlinear transformation formula is:
[0085]
[0086] Among them, (x, y) represents the pixel coordinates of the corresponding pixel point, I2 (x, y) represents the second enhanced grayscale value of the corresponding pixel point, I0 (x, y) represents the grayscale value of the corresponding pixel point, and α is the set adjustment coefficient, which can be adjusted according to the actual situation. For example, if it is set to 1, The average grayscale value of all pixels in the face grayscale image is represented. Then, a second enhanced image is constructed based on the second enhanced grayscale value of each pixel.
[0087] S5. Perform image fusion processing on the face grayscale image, the first enhanced image and the second enhanced image to obtain a fused enhanced image.
[0088] In specific implementation, the grayscale value of each pixel of the face grayscale image, the first enhanced grayscale value of each pixel of the first enhanced image, and the second enhanced grayscale value of each pixel of the second enhanced image can be substituted into a preset image fusion formula for calculation to obtain the fused enhanced grayscale value of each pixel. The image fusion formula is:
[0089] I(x,y)=a×I0(x,y)+b×I1(x,y)+c×I2(x,y)
[0090] Among them, (x, y) represents the pixel coordinates of the corresponding pixel, I (x, y) represents the fused enhanced gray value of the corresponding pixel, I0 (x, y) represents the gray value of the corresponding pixel in the face gray image, I1 (x, y) represents the first enhanced gray value of the corresponding pixel in the first enhanced image, I2 (x, y) represents the second enhanced gray value of the corresponding pixel in the second enhanced image, a, b and c are the first setting coefficient, the second setting coefficient and the third setting coefficient respectively, which can be set according to the actual situation, such as a, b, c are set to 0.5, 0.2 and 0.3 respectively. Then, a fused enhanced image is constructed based on the fused enhanced gray value of each pixel.
[0091] S6. Perform fuzzy enhancement processing on the fused enhanced image to obtain a fuzzy enhanced image, and perform unsharp mask filtering processing on the fuzzy enhanced image to obtain an enhanced face image.
[0092] In the specific implementation, the fusion enhancement gray value of each pixel of the fusion enhancement image is substituted into the preset fuzzy enhancement processing formula for calculation to obtain the fuzzy enhancement gray value of each pixel. The fuzzy enhancement processing formula is:
[0093]
[0094] Among them, Q (x, y) represents the fuzzy enhanced gray value of the corresponding pixel point, and ε is the set Gaussian parameter, such as the standard deviation of the Gaussian function;
[0095] Then, a fuzzy enhanced image is constructed based on the fuzzy enhanced grayscale value of each pixel, and the fuzzy enhanced grayscale value of each pixel of the fuzzy enhanced image is substituted into a preset unsharp masking formula for calculation to obtain the final enhanced grayscale value of each pixel. The unsharp masking formula is:
[0096]
[0097] Wherein, Z(x, y) represents the final enhanced grayscale value of the corresponding pixel point, β is a set weight factor, and β can be set to 0.8 by way of example.
[0098] S7. Extract image feature vectors from the enhanced face image to obtain a first feature vector set of the enhanced face image.
[0099] In specific implementation, the SURF (Speeded Up Robust Features) algorithm can be used to extract image feature vectors from the enhanced face image to obtain the first feature vector set of the enhanced face image. The SURF algorithm can detect stable key points in different scale spaces and generate unique and invariant descriptors.
[0100] S8. Import the first feature vector set of the enhanced facial image into a preset first feature library, and perform similarity calculation with the facial feature vector sets of each owner pre-stored in the first feature library to obtain the first feature similarity between the first feature vector set and the facial feature vector sets of each owner.
[0101] In specific implementation, the first feature vector set of the enhanced face image can be imported into a preset first feature library, and the vector similarity between each first feature vector in the first feature vector set and the corresponding face feature vector in the corresponding owner face feature vector set is calculated using a set vector similarity formula. The vector similarity formula is:
[0102]
[0103] Among them, i represents the vector number, S represents the vector similarity, A represents the first feature vector, B represents the face feature vector, Represents the dot product operation, Characterizes norm operations.
[0104] The similarity S of each vector i The sum is used as the first feature similarity between the first feature vector set and the corresponding owner face feature vector set. The owner face feature vector sets pre-stored in the first feature library are obtained by collecting the face images of each owner and processing the face images in the same way as in the above steps and then stored in the first feature library.
[0105] S9. When a first feature similarity reaches a set similarity threshold, a first greeting message is output; when each first feature similarity does not reach the set similarity threshold, the first feature vector set of the enhanced facial image is imported into a preset second feature library, and similarity is calculated with the facial feature vector sets of each owner-associated person pre-stored in the second feature library to obtain the second feature similarities between the first feature vector set and the facial feature vector sets of each owner-associated person.
[0106] In specific implementation, if a first feature similarity reaches the set similarity threshold, it indicates that the owner's facial feature matching is successful, and the target person is an owner in the smart community. At this time, the first greeting information can be output. If the similarities of each first feature do not reach the set similarity threshold, it indicates that the owner's facial feature matching is unsuccessful, and the target person is not an owner in the smart community. At this time, the first feature vector set of the enhanced facial image is imported into the preset second feature library, and the same vector similarity formula is used to calculate the vector similarity between each first feature vector in the first feature vector set and the corresponding facial feature vector in the facial feature vector set of the corresponding owner-associated person, and then the sum of each vector similarity is used as the second feature similarity between the first feature vector set and the corresponding owner-associated person facial feature vector set. The facial feature vector sets of each owner-associated person pre-stored in the second feature library are obtained by collecting the facial images of each owner-associated person and processing the facial images in the same way as the above steps and stored in the second feature library.
[0107] S10. When the similarity of a second feature reaches the set similarity threshold, the second greeting message is output; when the similarities of all second features do not reach the set similarity threshold, the registration prompt message is output, and an early warning message is sent to the smart community management backend.
[0108] In specific implementation, when the similarity of a second feature reaches the set similarity threshold, it indicates that the facial feature match of the owner-related person is successful, and the target person is an owner-related person in the smart community. At this time, the second greeting message can be output. If the similarity of each second feature does not reach the set similarity threshold, it indicates that the facial feature match of the owner-related person is unsuccessful, and the target person is neither an owner in the smart community nor an owner-related person in the smart community. At this time, the registration prompt message is output to guide the target person to go through the registration procedures. At the same time, an early warning message is sent to the smart community management backend to warn the smart community management staff that abnormal personnel have entered, thereby ensuring the safety of the smart community.
[0109] The method of this embodiment can effectively enhance the feature expression of facial images collected by robot inspections through corresponding facial image enhancement and feature vector similarity matching processes, improve the facial recognition detection effect of people in the smart community, and further improve the management quality of people in the smart community and ensure the safety of the smart community.
[0110] Embodiment 2:
[0111] This embodiment provides a smart community management system. Figure 2 As shown, it includes an image acquisition unit, an image filtering unit, a grayscale processing unit, a first enhancement unit, an image fusion unit, a second enhancement unit, a feature extraction unit, a first matching unit, a second matching unit and an information output unit, wherein:
[0112] An image acquisition unit, used to acquire an initial face image of a target person collected by the inspection robot when inspecting in a smart community;
[0113] An image filtering unit is used to perform image scaling and image cropping processing on the initial face image to obtain a standard face image with a set image resolution, and perform image filtering processing on the standard face image to obtain a denoised face image;
[0114] A grayscale processing unit is used to perform grayscale processing on the denoised face image to obtain a face grayscale image and determine the grayscale value of each pixel in the face grayscale image;
[0115] A first enhancement unit is used to perform logarithmic transformation processing on the face grayscale image based on the grayscale value of each pixel to obtain a first enhanced image, and perform image nonlinear transformation processing on the face grayscale image based on the grayscale value of each pixel to obtain a second enhanced image;
[0116] An image fusion unit, used for performing image fusion processing on the face grayscale image, the first enhanced image and the second enhanced image to obtain a fused enhanced image;
[0117] The second enhancement unit is used to perform fuzzy enhancement processing on the fused enhanced image to obtain a fuzzy enhanced image, and perform unsharp mask filtering processing on the fuzzy enhanced image to obtain an enhanced face image;
[0118] A feature extraction unit, used to extract image feature vectors from the enhanced face image to obtain a first feature vector set of the enhanced face image;
[0119] A first matching unit is used to import the first feature vector set of the enhanced face image into a preset first feature library, and perform similarity calculation with the face feature vector sets of each owner pre-stored in the first feature library to obtain the first feature similarity between the first feature vector set and the face feature vector sets of each owner;
[0120] The second matching unit is used to import the first feature vector set of the enhanced face image into a preset second feature library when the similarities of each first feature do not reach a set similarity threshold, and perform similarity calculation with the face feature vector sets of each owner-associated person pre-stored in the second feature library to obtain the similarities of each second feature between the first feature vector set and the face feature vector sets of each owner-associated person;
[0121] The information output unit is used to output a first greeting message when a first feature similarity reaches a set similarity threshold, output a second greeting message when a second feature similarity reaches a set similarity threshold, output a registration prompt message when the similarities of all second features do not reach the set similarity threshold, and send an early warning message to the smart community management backend.
[0122] Embodiment 3:
[0123] This embodiment provides a smart community management system. Figure 3 As shown, at the hardware level, it includes:
[0124] Data interface, used to establish data connection between the processor and the external data terminal;
[0125] A memory for storing instructions;
[0126] A processor is used to read the instructions stored in the memory and execute the smart community management method in Example 1 according to the instructions.
[0127] Optionally, the system further includes an internal bus, through which the processor, the memory and the data interface can be interconnected, and the internal bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0128] The memory may include, but is not limited to, random access memory (RAM), read only memory (ROM), flash memory, first input first output (FIFO) and / or first in last out (FILO), etc. The processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0129] Embodiment 4:
[0130] This embodiment provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the smart community management method in Embodiment 1. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash drive, and / or a memory stick, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0131] This embodiment also provides a computer program product, which, when running on a computer, executes the smart community management method in Embodiment 1. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0132] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A smart community management method, characterized in that: include: Obtain the initial facial image of the target person collected by the inspection robot when inspecting in the smart community; Performing image scaling and image cropping processing on the initial face image to obtain a standard face image with a set image resolution, and performing image filtering processing on the standard face image to obtain a denoised face image; Performing image grayscale processing on the denoised face image to obtain a face grayscale image, and determining the grayscale value of each pixel in the face grayscale image; Performing logarithmic transformation processing on the grayscale image of the face based on the grayscale value of each pixel to obtain a first enhanced image, and performing image nonlinear transformation processing on the grayscale image of the face based on the grayscale value of each pixel to obtain a second enhanced image; The method of performing logarithmic transformation on the grayscale image of the face based on the grayscale value of each pixel to obtain a first enhanced image includes: substituting the grayscale value of each pixel of the grayscale image of the face into a preset logarithmic transformation formula for calculation to obtain a first enhanced grayscale value of each pixel, wherein the logarithmic transformation formula is I1(x, y)=lg[1+I0(x, y)], wherein (x, y) represents the pixel coordinates of the corresponding pixel, I1(x, y) represents the first enhanced grayscale value of the corresponding pixel, and I0(x, y) represents the grayscale value of the corresponding pixel; constructing a first enhanced image based on the first enhanced grayscale value of each pixel; The method performs nonlinear image transformation processing on the grayscale image of the face based on the grayscale value of each pixel to obtain a second enhanced image, including: substituting the grayscale value of each pixel of the grayscale image of the face into a preset nonlinear transformation formula for calculation to obtain a second enhanced grayscale value of each pixel, wherein the nonlinear transformation formula is: Among them, (x, y) represents the pixel coordinates of the corresponding pixel point, I2 (x, y) represents the second enhanced grayscale value of the corresponding pixel point, I0 (x, y) represents the grayscale value of the corresponding pixel point, and α is the set adjustment coefficient. Representing the average grayscale value of all pixels in the face grayscale image; constructing a second enhanced image based on the second enhanced grayscale value of each pixel; Performing image fusion processing on the face grayscale image, the first enhanced image, and the second enhanced image to obtain a fused enhanced image; Performing fuzzy enhancement processing on the fused enhanced image to obtain a fuzzy enhanced image, and performing unsharp mask filtering processing on the fuzzy enhanced image to obtain an enhanced face image; Extracting image feature vectors of the enhanced face image to obtain a first feature vector set of the enhanced face image; Importing the first feature vector set of the enhanced face image into a preset first feature library, and performing similarity calculation with the face feature vector sets of each owner pre-stored in the first feature library, to obtain the first feature similarity between the first feature vector set and the face feature vector sets of each owner; When a first feature similarity reaches a set similarity threshold, the first greeting message is output; when the first feature similarities do not reach the set similarity threshold, the first feature vector set of the enhanced face image is imported into a preset second feature library, and the similarity is calculated with the face feature vector sets of each owner-associated person pre-stored in the second feature library to obtain the second feature similarities of the first feature vector set and the face feature vector sets of each owner-associated person; When the similarity of a second feature reaches the set similarity threshold, the second greeting message is output; when the similarities of each second feature do not reach the set similarity threshold, the registration prompt message is output, and an early warning message is sent to the smart community management backend.
2. A smart community management method according to claim 1, characterized in that: The grayscale processing of the denoised face image to obtain a face grayscale image includes: Determine the RGB three-color channel component value of each pixel in the denoised face image, and substitute the RGB three-color channel component value of each pixel in the denoised face image into a preset grayscale value formula for calculation to obtain the grayscale value of each pixel. The grayscale value formula is: I0(x,y)=R(x,y)×ω1+G(x,y)×ω2+B(x,y)×ω3 Among them, (x, y) represents the pixel coordinates of the corresponding pixel, I0(x, y) represents the grayscale value of the corresponding pixel, R(x, y), G(x, y) and B(x, y) represent the RGB three color channel component values of the corresponding pixel, ω1, ω2 and ω3 are the weights of the set RGB three color channels respectively; Construct a grayscale image of the face based on the grayscale value of each pixel.
3. A smart community management method according to claim 1, characterized in that: The image fusion processing is performed on the face grayscale image, the first enhanced image and the second enhanced image to obtain a fused enhanced image, including: Substitute the grayscale value of each pixel of the face grayscale image, the first enhanced grayscale value of each pixel of the first enhanced image, and the second enhanced grayscale value of each pixel of the second enhanced image into the preset image fusion formula for calculation to obtain the fused enhanced grayscale value of each pixel. The image fusion formula is: I(x,y)=a×I0(x,y)+b×I1(x,y)+c×I2(x,y) Wherein, (x, y) represents the pixel coordinates of the corresponding pixel, I(x, y) represents the fusion enhanced gray value of the corresponding pixel, I0(x, y) represents the gray value of the corresponding pixel in the face gray image, I1(x, y) represents the first enhanced gray value of the corresponding pixel in the first enhanced image, I2(x, y) represents the second enhanced gray value of the corresponding pixel in the second enhanced image, a, b and c are the first setting coefficient, the second setting coefficient and the third setting coefficient respectively; A fused enhanced image is constructed based on the fused enhanced gray value of each pixel.
4. A smart community management method according to claim 3, characterized in that: The fusion enhanced image is subjected to fuzzy enhancement processing to obtain a fuzzy enhanced image, and the fuzzy enhanced image is subjected to unsharp mask filtering processing to obtain an enhanced face image, including: Substitute the fusion enhancement gray value of each pixel of the fusion enhancement image into the preset fuzzy enhancement processing formula for calculation to obtain the fuzzy enhancement gray value of each pixel. The fuzzy enhancement processing formula is: Among them, Q (x, y) represents the fuzzy enhanced gray value of the corresponding pixel, and ε is the set Gaussian parameter; Construct a fuzzy enhanced image based on the fuzzy enhanced gray value of each pixel; Substitute the fuzzy enhanced grayscale value of each pixel of the fuzzy enhanced image into the preset unsharp mask formula for calculation to obtain the final enhanced grayscale value of each pixel. The unsharp mask formula is: Among them, Z (x, y) represents the final enhanced grayscale value of the corresponding pixel, and β is the set weight factor.
5. A smart community management method according to claim 1, characterized in that: The step of importing the first feature vector set of the enhanced facial image into a preset first feature library, performing similarity calculation with the facial feature vector sets of each owner pre-stored in the first feature library, and obtaining the first feature similarity between the first feature vector set and the facial feature vector sets of each owner, comprises: The first feature vector set of the enhanced face image is imported into the preset first feature library, and the vector similarity between each first feature vector in the first feature vector set and the corresponding face feature vector in the corresponding owner face feature vector set is calculated using the set vector similarity formula. The vector similarity formula is: Among them, i represents the vector number, S represents the vector similarity, A represents the first feature vector, B represents the face feature vector, Represents the dot product operation, Characterization norm operations; The sum of the similarities of each vector is taken as the first feature similarity between the first feature vector set and the corresponding owner face feature vector set.
6. A smart community management system, characterized in that: It includes an image acquisition unit, an image filtering unit, a grayscale processing unit, a first enhancement unit, an image fusion unit, a second enhancement unit, a feature extraction unit, a first matching unit, a second matching unit and an information output unit, wherein: An image acquisition unit, used to acquire an initial face image of a target person collected by the inspection robot when inspecting in a smart community; An image filtering unit is used to perform image scaling and image cropping processing on the initial face image to obtain a standard face image with a set image resolution, and perform image filtering processing on the standard face image to obtain a denoised face image; A grayscale processing unit is used to perform grayscale processing on the denoised face image to obtain a face grayscale image and determine the grayscale value of each pixel in the face grayscale image; A first enhancement unit is used to perform logarithmic transformation processing on the face grayscale image based on the grayscale value of each pixel to obtain a first enhanced image, and perform image nonlinear transformation processing on the face grayscale image based on the grayscale value of each pixel to obtain a second enhanced image; The method of performing logarithmic transformation on the grayscale image of the face based on the grayscale value of each pixel to obtain a first enhanced image includes: substituting the grayscale value of each pixel of the grayscale image of the face into a preset logarithmic transformation formula for calculation to obtain a first enhanced grayscale value of each pixel, wherein the logarithmic transformation formula is I1(x, y)=lg[1+I0(x, y)], wherein (x, y) represents the pixel coordinates of the corresponding pixel, I1(x, y) represents the first enhanced grayscale value of the corresponding pixel, and I0(x, y) represents the grayscale value of the corresponding pixel; constructing a first enhanced image based on the first enhanced grayscale value of each pixel; The method performs nonlinear image transformation processing on the grayscale image of the face based on the grayscale value of each pixel to obtain a second enhanced image, including: substituting the grayscale value of each pixel of the grayscale image of the face into a preset nonlinear transformation formula for calculation to obtain a second enhanced grayscale value of each pixel, wherein the nonlinear transformation formula is: Among them, (x, y) represents the pixel coordinates of the corresponding pixel point, I2 (x, y) represents the second enhanced grayscale value of the corresponding pixel point, I0 (x, y) represents the grayscale value of the corresponding pixel point, and α is the set adjustment coefficient. Representing the average grayscale value of all pixels in the face grayscale image; constructing a second enhanced image based on the second enhanced grayscale value of each pixel; An image fusion unit, used for performing image fusion processing on the face grayscale image, the first enhanced image and the second enhanced image to obtain a fused enhanced image; The second enhancement unit is used to perform fuzzy enhancement processing on the fused enhanced image to obtain a fuzzy enhanced image, and perform unsharp mask filtering processing on the fuzzy enhanced image to obtain an enhanced face image; A feature extraction unit, used to extract image feature vectors from the enhanced face image to obtain a first feature vector set of the enhanced face image; A first matching unit is used to import the first feature vector set of the enhanced face image into a preset first feature library, and perform similarity calculation with the face feature vector sets of each owner pre-stored in the first feature library to obtain the first feature similarity between the first feature vector set and the face feature vector sets of each owner; The second matching unit is used to import the first feature vector set of the enhanced face image into a preset second feature library when the similarities of each first feature do not reach a set similarity threshold, and perform similarity calculation with the face feature vector sets of each owner-associated person pre-stored in the second feature library to obtain the similarities of each second feature between the first feature vector set and the face feature vector sets of each owner-associated person; The information output unit is used to output a first greeting message when a first feature similarity reaches a set similarity threshold, output a second greeting message when a second feature similarity reaches a set similarity threshold, output a registration prompt message when the similarities of all second features do not reach the set similarity threshold, and send an early warning message to the smart community management backend.
7. A computer program product, characterized in that When the computer program product runs on a computer, the smart community management method described in any one of claims 1 to 5 is executed.
Citation Information
Patent Citations
Personnel safety management system and method of residential community
CN110491004A
High-efficiency enhancement method for low-illumination image
CN113160066A
