Image recognition method, related device, electronic equipment and storage medium
By generating a composite image of multi-frame palm images, the problems of increasing size and reducing aesthetics of palm brushing equipment are solved, and close-range palm brushing recognition is realized, reducing the difficulty and cost of camera design.
Patent Information
- Application Number
- CN202310512853.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2024-11-08
AI Technical Summary
The sinking camera in existing palm brushing equipment leads to an increase in the size of the equipment and reduces the aesthetics. The further the camera is from the glass cover, the larger the aperture, which increases the design difficulty and cost.
The camera collects multi-frame palm images and generates a composite image, including the palm pattern texture of the multi-frame palm images, realizes close-range palm brush recognition, avoiding the use of sinking cameras, thus not increasing the device size and maintaining aesthetics.
It realizes close-range palm brush recognition without increasing the size of the equipment and maintaining aesthetics, enriches the palm pattern texture, and reduces the difficulty and cost of camera design.
Smart Images

Figure CN118918615A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image recognition method, related devices, electronic equipment and storage medium. Background Art
[0002] With the development of artificial intelligence (AI) and computer technology, identity authentication technology based on biometrics has been widely used in recent years. Taking palm print recognition technology as an example, the palm print or palm vein features of the palm sample can be extracted by analyzing and comparing it with the stored feature template to identify the user's identity.
[0003] In the palm recognition process, it is necessary to collect images of the inner surface of the palm and the gaps between the fingers, and the image size should be greater than 10 cm * 10 cm. Figure 1 The camera shown in Figure (A) is lowered, and thus, the following Figure 1 The method shown in the middle (B) figure captures a complete image of the palm texture. That is, close-range palm scanning is achieved by lowering the height of the camera.
[0004] The inventors found that the current solution has at least the following problems: on the one hand, sinking the camera will cause the size of the palm brushing device to become thicker and the volume to increase, which not only increases the manufacturing cost of the device, but also occupies a larger space. On the other hand, the farther the camera is from the glass cover, the larger the aperture is, which makes the palm brushing device less beautiful. Summary of the invention
[0005] The embodiments of the present application provide an image recognition method, related apparatus, electronic device, and storage medium, which can not only avoid increasing the size of the palm brush device, but also maintain the original aesthetics of the palm brush device.
[0006] In view of this, the present application provides, on one hand, a method for image recognition, comprising:
[0007] Collecting a first palm image corresponding to a first distance through a camera, wherein the first palm image includes X palm prints of a target palm, the first distance represents a distance between the target palm and the camera at a first moment, and X is an integer greater than or equal to 1;
[0008] The second palm image corresponding to the second distance is collected by the camera, wherein the second palm image includes Y palm prints of the target palm, the second distance represents the distance between the target palm and the camera at a second moment, the second moment is a moment after the first moment, and Y is an integer greater than or equal to 1;
[0009] Generate a first composite image according to the first palm image and the second palm image, wherein the first composite image includes a union of the X palm prints and the Y palm prints;
[0010] If the first composite image satisfies the image recognition condition, extracting features from the first composite image to obtain a first biological feature;
[0011] Based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature, the first biometric feature is identified and processed to obtain an image recognition result.
[0012] Another aspect of the present application provides an image recognition device, comprising:
[0013] an acquisition module, configured to acquire a first palm image corresponding to a first distance through a camera, wherein the first palm image includes X palm prints of a target palm, the first distance represents a distance between the target palm and the camera at a first moment, and X is an integer greater than or equal to 1;
[0014] The acquisition module is further used to collect a second palm image corresponding to a second distance through a camera, wherein the second palm image includes Y palm prints of the target palm, the second distance represents the distance between the target palm and the camera at a second moment, the second moment is a moment after the first moment, and Y is an integer greater than or equal to 1;
[0015] A generating module, configured to generate a first composite image according to the first palm image and the second palm image, wherein the first composite image includes a union of the X palm prints and the Y palm prints;
[0016] A processing module, configured to extract features from the first synthetic image to obtain a first biometric feature if the first synthetic image satisfies an image recognition condition;
[0017] The processing module is further used to perform recognition processing on the first biometric feature based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature to obtain an image recognition result.
[0018] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first distance is greater than the second distance;
[0019] A generating module, specifically used to scale up the first palm image based on the scale corresponding to the second palm image, to obtain a first image to be fused, wherein the palm prints in the first image to be fused have a matching relationship with the palm prints in the second palm image;
[0020] Using the second palm image as the second image to be fused;
[0021] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0022] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first distance is greater than the second distance;
[0023] A generating module, specifically configured to use the first palm image as the first image to be fused;
[0024] Based on the scale corresponding to the first palm image, the second palm image is scaled down to obtain a second image to be fused, wherein the palm prints in the second image to be fused have a matching relationship with the palm prints in the first palm image;
[0025] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0026] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first distance is greater than the second distance;
[0027] A generating module, specifically used to perform a size scaling process on the first palm image based on a preset image scale to obtain a first image to be fused;
[0028] Based on a preset image scale, scaling the second palm image to obtain a second image to be fused;
[0029] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0030] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first distance is smaller than the second distance;
[0031] A generating module, specifically configured to use the first palm image as the first image to be fused;
[0032] Based on the scale corresponding to the first palm image, the second palm image is scaled up to obtain a second image to be fused, wherein the palm prints in the second image to be fused have a matching relationship with the palm prints in the first palm image;
[0033] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0034] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first distance is smaller than the second distance;
[0035] A generating module, specifically used to perform a scale reduction process on the first palm image based on the scale corresponding to the second palm image, to obtain a first image to be fused, wherein the palm prints in the first image to be fused have a matching relationship with the palm prints in the second palm image;
[0036] Using the second palm image as the second image to be fused;
[0037] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0038] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first distance is smaller than the second distance;
[0039] A generating module, specifically used to perform a size scaling process on the first palm image based on a preset image scale to obtain a first image to be fused;
[0040] Based on a preset image scale, scaling the second palm image to obtain a second image to be fused;
[0041] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0042] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0043] A generating module, specifically used to obtain a first grayscale image corresponding to the first image to be fused;
[0044] Obtaining a second grayscale image corresponding to the second image to be fused;
[0045] Averaging the grayscale values of the same pixel position in the first grayscale image and the second grayscale image to obtain the grayscale average value corresponding to each pixel position;
[0046] A first composite image is generated according to the grayscale average value corresponding to each pixel position.
[0047] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0048] A generating module, specifically used to obtain a first grayscale image corresponding to the first image to be fused;
[0049] Obtaining a second grayscale image corresponding to the second image to be fused;
[0050] The maximum grayscale value of the same pixel position in the first grayscale image and the second grayscale image is calculated to obtain the maximum grayscale value corresponding to each pixel position;
[0051] A first composite image is generated according to the maximum grayscale value corresponding to each pixel position.
[0052] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first distance is equal to the second distance;
[0053] A generating module, specifically used to obtain each pixel point where the first palm image overlaps with the second palm image;
[0054] The overlapping pixels are merged, and the non-overlapping pixels in the first palm image and the second palm image are kept to obtain a first composite image.
[0055] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0056] A processing module, specifically used to send the first composite image to the server, so that the server extracts features from the first composite image to obtain a first biometric feature;
[0057] Receive target identity information corresponding to the first biometric feature sent by the server, wherein the target identity information is obtained after the server performs identification processing on the first biometric feature based on multiple stored preset biometric features and identity information corresponding to each preset biometric feature.
[0058] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0059] A processing module, specifically used to perform noise reduction and white balance processing on the first composite image to obtain a processed image;
[0060] Performing encoding processing on the processed image to obtain an encoded image;
[0061] The encoded image is sent to the server so that the server decodes the encoded image to obtain a processed image, and extracts features from the processed image to obtain a first biometric feature.
[0062] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0063] The acquisition module is further used for, after generating the first composite image according to the first palm image and the second palm image, if the first composite image does not meet the image recognition condition, collecting a third palm image corresponding to a third distance through the camera, wherein the third palm image includes Z palm prints of the target palm, the third distance represents the distance between the target palm and the camera at a third moment, the third moment is the next moment of the second moment, and Z is an integer greater than or equal to 1;
[0064] The generating module is further used to generate a second synthesized image according to the first synthesized image and the third palm image, wherein the second synthesized image includes a union of X palm prints, Y palm prints and Z palm prints;
[0065] The processing module is further configured to extract features from the second synthetic image to obtain a second biological feature if the second synthetic image satisfies the image recognition condition;
[0066] The processing module is also used to perform recognition processing on the second biometric feature based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature to obtain an image recognition result.
[0067] In one possible design, in another implementation of another aspect of the embodiment of the present application, the image recognition device further includes a determination module;
[0068] The acquisition module is further used to acquire a target grayscale image corresponding to the first composite image after generating the first composite image according to the first palm image and the second palm image;
[0069] The acquisition module is also used to obtain the grayscale value corresponding to each pixel point in the target grayscale image;
[0070] A determination module is used to determine the grayscale average value of the target grayscale image according to the grayscale value corresponding to each pixel point;
[0071] The determination module is also used to calculate the grayscale variance according to the grayscale value corresponding to each pixel point and the grayscale average value;
[0072] The determination module is further configured to determine that the first synthesized image satisfies an image recognition condition if the grayscale variance is greater than or equal to a grayscale variance threshold.
[0073] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0074] The acquisition module is further used to acquire a target grayscale image corresponding to the first composite image after generating the first composite image according to the first palm image and the second palm image;
[0075] The acquisition module is also used to obtain the grayscale value corresponding to each pixel point in the target grayscale image;
[0076] The determination module is also used to determine the grayscale average value of the target grayscale image according to the grayscale value corresponding to each pixel point;
[0077] The determination module is also used to calculate the grayscale variance according to the grayscale value corresponding to each pixel point and the grayscale average value;
[0078] The determination module is further configured to determine that the first composite image meets the image recognition condition if the grayscale variance is greater than or equal to the grayscale variance threshold and the main palm print and the finger joint positioning point in the first composite image are detected.
[0079] In one possible design, in another implementation of another aspect of the embodiment of the present application, the image recognition device further includes a playback module;
[0080] A playing module, used for playing a first prompt message if the first composite image meets the image recognition condition, wherein the first prompt message is used to prompt that the image recognition condition is met;
[0081] The playing module is further used to play a second prompt message if the first composite image does not meet the image recognition condition, wherein the second prompt message is used to prompt that the image recognition condition is not met.
[0082] On the other hand, the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned methods when executing the computer program.
[0083] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned methods are implemented.
[0084] Another aspect of the present application provides a computer program product, including a computer program, which implements the above-mentioned methods when executed by a processor.
[0085] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0086] In an embodiment of the present application, a method for image recognition is provided. First, a first palm image corresponding to a first distance is collected by a camera, and the first palm image includes X palm prints of a target palm. Then, a second palm image corresponding to a second distance is collected by a camera, wherein the second palm image includes Y palm prints of a target palm. Based on this, a first composite image is generated according to the first palm image and the second palm image, and the first composite image includes the union of X palm prints and Y palm prints. If the first composite image meets the image recognition condition, feature extraction is performed on the first composite image to obtain a first biometric feature. Finally, based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature, the first biometric feature is identified and processed to obtain an image recognition result. In the above manner, the collected multiple frames of palm images are synthesized into a fused image, so that the fused image includes palm prints derived from multiple frames of palm images, thereby achieving the effect of enriching the palm print texture. Thus, close-range palm recognition can be achieved without sinking the camera. It can be seen that the solution provided by the present application can not only avoid increasing the size of the palm brushing device, but also maintain the original aesthetics of the palm brushing device. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 A schematic diagram of the existing solution of using a sinking camera to achieve close-range palm scanning;
[0088] Figure 2 A schematic diagram of an implementation environment of the image recognition method in the embodiment of the present application;
[0089] Figure 3 A schematic diagram of a flow chart of an image recognition method in an embodiment of the present application;
[0090] Figure 4 A schematic diagram of collecting palm images from far to near in an embodiment of the present application;
[0091] Figure 5 A schematic diagram of generating a first composite image in an embodiment of the present application;
[0092] Figure 6 Another schematic diagram of generating a first composite image in an embodiment of the present application;
[0093] Figure 7 Another schematic diagram of generating a first composite image in an embodiment of the present application;
[0094] Figure 8 A schematic diagram of collecting palm images from near to far in an embodiment of the present application;
[0095] Fig. 9 Another schematic diagram of generating a first composite image in an embodiment of the present application;
[0096] Fig.10 Another schematic diagram of generating a first composite image in an embodiment of the present application;
[0097] Fig.11 Another schematic diagram of generating a first composite image in an embodiment of the present application;
[0098] Fig.12 Another schematic diagram of generating a first composite image in an embodiment of the present application;
[0099] Fig.13 A schematic diagram of a process for implementing image recognition based on continuously collected palm images in an embodiment of the present application;
[0100] Fig.14 A schematic diagram of an image recognition device in an embodiment of the present application;
[0101] Fig.15 It is a structural schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0102] The embodiments of the present application provide an image recognition method, related apparatus, electronic device, and storage medium, which can not only avoid increasing the size of the palm brush device, but also maintain the original aesthetics of the palm brush device.
[0103] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0104] Palm recognition is a biometric technology that recognizes the palm prints on the surface of the user's palm. The palm recognition device can capture the palm image through a camera and recognize the palm image. The present application may specifically involve palm print recognition and palm vein recognition, that is, a method of identifying an individual's identity using palm features as an individual biometric feature, by analyzing and extracting one or both of the palm print and palm vein features of the palm sample, and comparing them with the stored feature template to identify the user's identity.
[0105] At present, the field of view (FOV) of the camera used in most palm-brushing devices cannot capture the entire palm in one image. If the FOV needs to be increased, factors such as distortion, resolution, and relative illumination (RI) of palm-brushing recognition need to be considered, which results in high difficulty in designing palm-brushing devices, high difficulty in manufacturing, and high price. Based on this, in an embodiment of the present application, a method for image recognition is provided, which captures multiple frames of images to synthesize an image that meets the requirements of close-range palm-brushing recognition. It is understandable that the close distance in the present application can refer to less than or equal to 3 cm.
[0106] The method provided in this application can be applied to Figure 2 The implementation environment shown in the figure includes a terminal 110 and a server 120, and the terminal 110 and the server 120 can communicate with each other through a communication network 130. The communication network 130 uses standard communication technology and / or protocols, usually the Internet, but can also be any network, including but not limited to Bluetooth, local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, dedicated network or any combination of virtual private networks. In some embodiments, customized or dedicated data communication technology can be used to replace or supplement the above data communication technology.
[0107] The terminal 110 involved in this application includes but is not limited to palm-swiping devices, payment interaction devices, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. It should be noted that this application uses the palm-swiping device as an example for explanation, but it should not be understood as a limitation on this application. The server 120 involved in this application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence (AI) platforms.
[0108] In combination with the above implementation environment, the terminal 110 collects multiple frames of palm images through a camera. A composite image is obtained based on the fusion of multiple frames of palm images. The terminal 110 sends the composite image to the server 120 through the communication network 130. If the composite image meets the image recognition condition, the server 120 extracts features from the composite image to obtain biometric features. Thus, the server 120 performs recognition processing on the biometric features based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature to obtain an image recognition result.
[0109] In combination with the above introduction, the image recognition method in this application will be introduced below. Figure 3 The image recognition method in the embodiment of the present application can be completed independently by the terminal, independently by the server, or by the terminal and the server in cooperation. The method provided by the present application includes:
[0110] 210. Collecting a first palm image corresponding to a first distance through a camera, wherein the first palm image includes X palm prints of a target palm, the first distance represents a distance between the target palm and the camera at a first moment, and X is an integer greater than or equal to 1;
[0111] In one or more embodiments, a terminal (e.g., a palm scanning device or a payment interaction device) captures a target palm at a first distance through a camera, thereby obtaining a first palm image corresponding to the first distance, wherein the first palm image includes X palm prints of the target palm, where X is an integer greater than or equal to 1.
[0112] 220. Collecting a second palm image corresponding to a second distance through a camera, wherein the second palm image includes Y palm prints of the target palm, the second distance represents the distance between the target palm and the camera at a second moment, the second moment is a moment after the first moment, and Y is an integer greater than or equal to 1;
[0113] In one or more embodiments, the terminal (e.g., palm scanning device or payment interaction device) continues to capture the target palm at the second distance through the camera, thereby obtaining a second palm image corresponding to the second distance. The second palm image includes Y palm prints of the target palm, where Y is an integer greater than or equal to 1.
[0114] It is understandable that, in one case, the first distance is equal to the second distance, that is, different palm images are collected during the translation of the target palm. In another case, the first distance is not equal to the second distance, that is, different palm images are collected during the forward and backward movement of the target palm.
[0115] 230. Generate a first composite image according to the first palm image and the second palm image, wherein the first composite image includes a union of the X palm prints and the Y palm prints;
[0116] In one or more embodiments, after obtaining the first palm image and the second palm image, a first composite image may be generated, wherein the first composite image includes the union of X palm prints and Y palm prints, that is, the first composite image includes both X palm prints from the first palm image and Y palm prints from the second palm image, and there may be repeated palm prints between the X palm prints and the Y palm prints.
[0117] Specifically, before fusing the first palm image and the second palm image, image preprocessing such as point-to-point image correction, noise reduction and registration is usually required to improve the image fusion effect. The present application can use pixel-level image fusion method, feature-level image fusion or decision-level image fusion to achieve image fusion.
[0118] The pixel-level image fusion method is to fuse directly on the original data layer. The fusion accuracy of this level is the highest. Compared with the image fusion at other levels, the image fusion at this level has more accurate, richer and more reliable detail information, which is conducive to further understanding and analysis of the image. Exemplarily, the pixel-level image fusion method includes the principal component analysis (PCA) fusion method, the pulse coupled neural network (PCNN) based fusion method and the convolutional neural network based fusion method.
[0119] The feature-level image fusion method refers to the process of extracting features from multi-source information (including shape, edge, area, contour, texture, angle, etc.), and then comprehensively analyzing and processing multiple feature information. Feature-level image fusion belongs to the middle level, preparing for decision-level image fusion. It not only retains important information, but also compresses the information for real-time processing. Exemplarily, feature-level image fusion methods include fuzzy clustering method, support vector clustering method, etc.
[0120] The image fusion method at the decision level refers to the classification and recognition of the feature information of each image to form the corresponding results, and then further fusion process is carried out. The final decision result is the global optimal decision. Decision-level image fusion is a higher level of information fusion, and its results will provide a basis for various controls or decisions.
[0121] 240. If the first composite image satisfies the image recognition condition, extract features from the first composite image to obtain a first biometric feature;
[0122] In one or more embodiments, if the first composite image satisfies the image recognition condition, the recognition process can continue. In one case, the terminal can directly extract features from the first composite image to obtain the first biometric feature. In another case, the terminal can send the first composite image to the server, and the server can extract features from the first composite image to obtain the first biometric feature.
[0123] 250. Based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature, perform recognition processing on the first biometric feature to obtain an image recognition result.
[0124] In one or more embodiments, the device (terminal or server) stores a mapping relationship between multiple preset biometric features and identity information. Based on this, the first biometric feature is matched with each preset biometric feature, that is, the similarity between the first biometric feature and each preset biometric feature is calculated. Assuming that the similarity between the preset biometric feature A and the first biometric feature is the largest, and the similarity is greater than or equal to the similarity threshold, then the image recognition result is determined to be a successful recognition, and the identity information corresponding to the preset biometric feature A is used as the identified target identity information. Assuming that the similarity between the preset biometric feature A and the first biometric feature is the largest, but the similarity is less than the similarity threshold, then the image recognition result is determined to be a failed recognition.
[0125] In an embodiment of the present application, a method for image recognition is provided. In the above manner, the collected multiple frames of palm images are synthesized into a fused image, so that the fused image includes palm prints from multiple frames of palm images, thereby achieving the effect of enriching the palm print texture. Thus, close-range palm recognition can be achieved without sinking the camera. It can be seen that the solution provided by the present application can not only avoid increasing the size of the palm brushing device, but also maintain the original aesthetics of the palm brushing device.
[0126] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first distance is greater than the second distance;
[0127] Generating a first composite image according to the first palm image and the second palm image may specifically include:
[0128] Based on the scale corresponding to the second palm image, the first palm image is scaled up to obtain a first image to be fused, wherein the palm prints in the first image to be fused are matched with the palm prints in the second palm image;
[0129] Using the second palm image as the second image to be fused;
[0130] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0131] In one or more embodiments, a method for synthesizing palm images collected from far to near is introduced. As can be seen from the aforementioned embodiments, the first distance is greater than the second distance. It can be seen that when the user swipes his palm, the target palm continues to approach the camera of the terminal. Based on this, when the target palm continues to approach, the camera will continue to take pictures of the target palm approaching, and then perform image processing, merge multiple palm images into a composite image through an image fusion algorithm, and output it to the algorithm for recognition.
[0132] Specifically, for ease of understanding, see Figure 4 , Figure 4 FIG. 1 is a schematic diagram of collecting palm images from far to near in an embodiment of the present application. Figure 4 As shown in the middle (A) figure, when the target palm is far away from the camera (for example, 10 to 20 cm), long-distance imaging can be achieved. Due to the insufficient image resolution of long-distance imaging, only the palm print or palm vein can be distinguished, but clear palm prints and palm veins cannot be obtained. Figure 4 As shown in the middle (B) figure, when the target palm is close to the camera, close-range imaging can be achieved. Since the image resolution of the distance imaging is large enough, clear palm prints or palm veins can be obtained. However, the arrangement of the palm prints or palm veins in the palm image cannot be obtained.
[0133] Based on this, the present application can use the full palm image (i.e., the image including the complete target palm) captured from a distance as the base map of the image, and the palm image is recorded as "palm image F". As the target palm continues to move toward the camera, "palm image N1", "palm image N2", and "palm image N3" can be obtained in turn. Among them, the field of view of "palm image F" is larger than that of "palm image N". Exemplarily, the image feature extraction of the main texture of the palm print is performed for "palm image F", and the three main lines are taken as the most critical main lines. And the main palm print line features of "palm image N1" are extracted and matched with the main palm print lines in "palm image F". Since the shooting distance of "palm image F" is far, the texture is generally not particularly clear. Therefore, when the match is successful, the secondary lines and smaller line features in "palm image N1" are supplemented and updated to replace the features in "palm image F". Next, the “palm image N2” and the “palm image N3” are merged in sequence until a “palm image P” with a complete and rich texture is obtained.
[0134] For easier understanding, see Figure 5 , Figure 5This is a schematic diagram of generating a first composite image in an embodiment of the present application. As shown in the figure, it is assumed that the first palm image is "palm image F" and the second palm image is "palm image N1". Since the field of view of the second palm image is larger and smaller than that of the first palm image, the second palm image may only have part of the main palmprint lines. Therefore, based on the scale corresponding to the second palm image, the first palm image is scaled up so that the first palm image has the same scale as the second palm image, and the feature points corresponding to the palmprints in the two palm images have a matching relationship, thereby obtaining the first image to be fused corresponding to the first palm image. In addition, the second palm image is also required to be used as the second image to be fused. Therefore, the palmprint features of the second image to be fused are supplemented and updated to replace the palmprint features in the first image to be fused to obtain the first composite image.
[0135] Understandably, Figure 5 The thicker lines in the middle can be understood as the main texture of the palm print. Figure 5 The thinner lines in the middle can be understood as the secondary texture of the palm lines.
[0136] Secondly, in an embodiment of the present application, a method for synthesizing palm images collected from far to near is provided. In the above method, the palm image collected in the next frame is used as the basis, and the two frames of palm images before and after are processed at a unified scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the first image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the difficulty of camera design.
[0137] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first distance is greater than the second distance;
[0138] Generating a first composite image according to the first palm image and the second palm image may specifically include:
[0139] Using the first palm image as the first image to be fused;
[0140] Based on the scale corresponding to the first palm image, the second palm image is scaled down to obtain a second image to be fused, wherein the palm prints in the second image to be fused have a matching relationship with the palm prints in the first palm image;
[0141] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0142] In one or more embodiments, another method of synthesizing palm images collected from far to near is introduced. As can be seen from the aforementioned embodiments, the first distance is greater than the second distance. It can be seen that when the user swipes his palm, the target palm continues to approach the camera of the terminal. Based on this, when the target palm continues to approach, the camera will continue to take pictures of the target palm approaching, and then perform image processing, merge multiple palm images into a synthetic image through an image fusion algorithm, and output it to the algorithm for recognition.
[0143] Specifically, for ease of understanding, see Figure 6 , Figure 6 This is another schematic diagram of generating the first composite image in an embodiment of the present application. As shown in the figure, it is assumed that the first palm image is "palm image F" and the second palm image is "palm image N1". Since the field of view of the second palm image is larger and smaller than that of the first palm image, the second palm image may only have part of the main palmprint lines. Therefore, based on the scale corresponding to the first palm image, the second palm image is scaled down so that the second palm image has the same scale as the first palm image, and the feature points corresponding to the palmprints in the two palm images have a matching relationship, thereby obtaining the second image to be fused corresponding to the second palm image. In addition, the first palm image is also required to be used as the first image to be fused. Therefore, the palmprint features of the second image to be fused are supplemented and updated to replace the palmprint features in the first image to be fused to obtain the first composite image.
[0144] Understandably, Figure 6 The thicker lines in the middle can be understood as the main texture of the palm print. Figure 6 The thinner lines in the middle can be understood as the secondary texture of the palm lines.
[0145] Secondly, in the embodiment of the present application, another method for synthesizing palm images collected from far to near is provided. In the above method, the palm image collected in the previous frame is used as the basis, and the two frames of palm images before and after are processed at a unified scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the first image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0146] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first distance is greater than the second distance;
[0147] Generating a first composite image according to the first palm image and the second palm image may specifically include:
[0148] Based on a preset image scale, the first palm image is resized to obtain a first image to be fused;
[0149] Based on a preset image scale, scaling the second palm image to obtain a second image to be fused;
[0150] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0151] In one or more embodiments, another method of synthesizing palm images collected from far to near is introduced. As can be seen from the aforementioned embodiments, the first distance is greater than the second distance. It can be seen that when the user swipes his palm, the target palm continues to approach the camera of the terminal. Based on this, when the target palm continues to approach, the camera will continue to take pictures of the target palm approaching, and then perform image processing, merge multiple palm images into a synthetic image through an image fusion algorithm, and output it to the algorithm for recognition.
[0152] Specifically, for ease of understanding, see Figure 7 , Figure 7 This is another schematic diagram of generating the first composite image in an embodiment of the present application. As shown in the figure, it is assumed that the first palm image is "palm image F" and the second palm image is "palm image N1". Since the field of view of the second palm image is larger and smaller than that of the first palm image, the second palm image may only have part of the main palmprint lines. Therefore, based on the preset image scale, the first palm image and the second palm image are scaled (for example, enlarged or reduced) so that the first palm image has the same preset image scale as the second palm image, and the feature points corresponding to the palmprints in the two palm images have a matching relationship. Thus, the first image to be fused corresponding to the first palm image and the second image to be fused corresponding to the second palm image are obtained. Therefore, the palmprint features of the second image to be fused are supplemented and updated to replace the palmprint features in the first image to be fused to obtain the first composite image.
[0153] Understandably, Figure 7 The thicker lines in the middle can be understood as the main texture of the palm print. Figure 7 The thinner lines in the middle can be understood as the secondary texture of the palm lines.
[0154] Secondly, in the embodiment of the present application, another method of synthesizing palm images collected from far to near is provided. Through the above method, the two frames of palm images are processed at a unified scale based on the preset image scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the first image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0155] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first distance is smaller than the second distance;
[0156] Generating a first composite image according to the first palm image and the second palm image may specifically include:
[0157] Using the first palm image as the first image to be fused;
[0158] Based on the scale corresponding to the first palm image, the second palm image is scaled up to obtain a second image to be fused, wherein the palm prints in the second image to be fused have a matching relationship with the palm prints in the first palm image;
[0159] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0160] In one or more embodiments, a method for synthesizing palm images collected from near to far is introduced. As can be seen from the aforementioned embodiments, the first distance is less than the second distance. It can be seen that when the user swipes his palm, the target palm continues to move away from the camera of the terminal. Based on this, when the target palm continues to move away, the camera will continue to take pictures of the target palm moving away, and then perform image processing, merge multiple palm images into a synthetic image through an image fusion algorithm, and output it to the algorithm for recognition.
[0161] Specifically, for ease of understanding, see Figure 8 , Figure 8 FIG. 1 is a schematic diagram of collecting palm images from near to far in an embodiment of the present application. Figure 8 As shown in the middle (A), when the target palm is close to the camera, close-range imaging can be achieved. Since the image resolution of the distance imaging is large enough, it is possible to obtain clear palm prints or palm veins. However, it is impossible to obtain the arrangement of palm prints or palm veins in the palm image. Figure 8 As shown in the middle (B) figure, when the target palm is far away from the camera, long-distance imaging can be achieved. Due to the insufficient image resolution of long-distance imaging, only palm prints or palm veins can be distinguished, but clear palm prints and palm veins cannot be obtained.
[0162] Based on this, the present application can record the palm image captured nearby as "palm image F". As the target palm continues to move away from the camera, "palm image N1", "palm image N2" and "palm image N3" can be obtained in turn. Among them, the field of view of "palm image F" is smaller than that of "palm image N". Exemplarily, the image feature extraction of the main texture of the palm print is performed on "palm image F", and the three main lines are taken as the most critical main lines. And the main palm print line features of "palm image N1" are extracted and matched with the main palm print lines in "palm image F". Since the shooting distance of "palm image N1" is far, the texture is generally not very clear. Therefore, when the match is successful, the secondary lines and smaller line features in "palm image F" can be supplemented, updated and replaced with the features in "palm image N1". Next, "palm image N2" and "palm image N3" are merged in turn until a complete and texture-rich "palm image P" is obtained.
[0163] For easier understanding, see Fig. 9 , Fig. 9 Another schematic diagram for generating the first composite image in the embodiment of the present application is shown in the figure, assuming that the first palm image is "palm image F" and the second palm image is "palm image N1". Since the field of view of the second palm image is smaller in scale and larger in field of view than the first palm image, the first palm image may only have part of the main palmprint lines. Therefore, based on the scale corresponding to the first palm image, the second palm image is scaled up so that the second palm image has the same scale as the first palm image, and the feature points corresponding to the palmprints in the two palm images have a matching relationship, thereby obtaining the second image to be fused corresponding to the second palm image. In addition, the first palm image is also required to be used as the first image to be fused. Therefore, the palmprint features of the first image to be fused are supplemented and updated to replace the palmprint features in the second image to be fused to obtain the first composite image.
[0164] Understandably, Fig. 9 The thicker lines in the middle can be understood as the main texture of the palm print. Fig. 9 The thinner lines in the middle can be understood as the secondary texture of the palm lines.
[0165] Secondly, in an embodiment of the present application, a method for synthesizing palm images collected from near to far is provided. In the above method, the palm image collected in the previous frame is used as the basis, and the two frames of palm images before and after are processed at a unified scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the second image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0166] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first distance is smaller than the second distance;
[0167] Generating a first composite image according to the first palm image and the second palm image may specifically include:
[0168] Based on the scale corresponding to the second palm image, the first palm image is scaled down to obtain a first image to be fused, wherein the palm prints in the first image to be fused are matched with the palm prints in the second palm image;
[0169] Using the second palm image as the second image to be fused;
[0170] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0171] In one or more embodiments, another method of synthesizing palm images collected from near to far is introduced. As can be seen from the aforementioned embodiments, the first distance is less than the second distance. It can be seen that when the user swipes his palm, the target palm continues to move away from the camera of the terminal. Based on this, when the target palm continues to move away, the camera will continue to take pictures of the target palm moving away, and then perform image processing, merge multiple palm images into a synthetic image through an image fusion algorithm, and output it to the algorithm for recognition.
[0172] Specifically, for ease of understanding, see Fig.10 , Fig.10 This is another schematic diagram of generating the first composite image in the embodiment of the present application. As shown in the figure, it is assumed that the first palm image is "palm image F" and the second palm image is "palm image N1". Since the field of view of the second palm image is smaller in scale and larger in field of view than the first palm image, the first palm image may only have part of the main palmprint lines. Therefore, based on the scale corresponding to the second palm image, the second palm image is scaled down so that the second palm image has the same scale as the first palm image, and the feature points corresponding to the palmprints in the two palm images have a matching relationship, thereby obtaining the first image to be fused corresponding to the first palm image. In addition, the second palm image is also required to be used as the second image to be fused. Therefore, the palmprint features of the first image to be fused are supplemented and updated to replace the palmprint features in the second image to be fused to obtain the first composite image.
[0173] Understandably, Fig.10 The thicker lines in the middle can be understood as the main texture of the palm print. Fig.10 The thinner lines in the middle can be understood as the secondary texture of the palm lines.
[0174] Secondly, in the embodiment of the present application, another method of synthesizing palm images collected from near to far is provided. In the above method, the palm image collected in the next frame is used as the basis, and the two frames of palm images before and after are processed at a unified scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the second image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0175] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first distance is smaller than the second distance;
[0176] Generating a first composite image according to the first palm image and the second palm image may specifically include:
[0177] Based on a preset image scale, the first palm image is resized to obtain a first image to be fused;
[0178] Based on a preset image scale, scaling the second palm image to obtain a second image to be fused;
[0179] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0180] In one or more embodiments, another method of synthesizing palm images collected from near to far is introduced. As can be seen from the aforementioned embodiments, the first distance is less than the second distance. It can be seen that when the user swipes his palm, the target palm continues to move away from the camera of the terminal. Based on this, when the target palm continues to move away, the camera will continue to take pictures of the target palm moving away, and then perform image processing, merge multiple palm images into a synthetic image through an image fusion algorithm, and output it to the algorithm for recognition.
[0181] Specifically, for ease of understanding, see Fig.11 , Fig.11This is another schematic diagram of generating the first composite image in an embodiment of the present application. As shown in the figure, it is assumed that the first palm image is "palm image F" and the second palm image is "palm image N1". Since the field of view of the second palm image is smaller in scale and larger in field of view than the first palm image, the first palm image may only have part of the main palmprint lines. Therefore, based on the preset image scale, the first palm image and the second palm image are scaled (for example, enlarged or reduced) so that the first palm image has the same preset image scale as the second palm image, and the feature points corresponding to the palmprints in the two palm images have a matching relationship. Thus, the first image to be fused corresponding to the first palm image and the second image to be fused corresponding to the second palm image are obtained. Therefore, the palmprint features of the first image to be fused are supplemented and updated to replace the palmprint features in the second image to be fused to obtain the first composite image.
[0182] Understandably, Fig.11 The thicker lines in the middle can be understood as the main texture of the palm print. Fig.11 The thinner lines in the middle can be understood as the secondary texture of the palm lines.
[0183] Secondly, in the embodiment of the present application, another method of synthesizing palm images collected from near to far is provided. Through the above method, the two frames of palm images are processed at a unified scale based on the preset image scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the second image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0184] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, fusing the first image to be fused and the second image to be fused to obtain a first composite image may specifically include:
[0185] Obtaining a first grayscale image corresponding to the first image to be fused;
[0186] Obtaining a second grayscale image corresponding to the second image to be fused;
[0187] Averaging the grayscale values of the same pixel position in the first grayscale image and the second grayscale image to obtain the grayscale average value corresponding to each pixel position;
[0188] A first composite image is generated according to the grayscale average value corresponding to each pixel position.
[0189] In one or more embodiments, a method for implementing image fusion is introduced. It can be seen from the above embodiments that after obtaining the first image to be fused and the second image to be fused, the two images need to be fused to obtain a first composite image.
[0190] Specifically, a first grayscale image corresponding to the first image to be fused and a second grayscale image corresponding to the second image to be fused are obtained respectively. If the first image to be fused and the second image to be fused are both images in the red green blue (RGB) color mode, they need to be converted into corresponding grayscale images respectively. Among them, the present application can use any of the following image grayscale algorithms to calculate the grayscale value of each pixel.
[0191] Method 1:
[0192] Directly take the value corresponding to the largest component among the three components of red, green and blue in the image as the grayscale value. Among them, the minimum value is 0 and the maximum value is 255. Assuming that the red component value of a pixel in the first image to be fused is 60, the green component value is 100, and the blue component value is 20, then the grayscale value of the pixel is 100.
[0193] Method 2:
[0194] The average of the values of the three components of red, green and blue in the image is taken as the gray value. Assuming that the red component value of a pixel in the first image to be fused is 60, the green component value is 100, and the blue component value is 20, then the gray value of the pixel is 60.
[0195] Method 3:
[0196] According to the sensitivity of the human eye to the three colors of red, green and blue, the gray value is obtained by weighted average according to a certain weight. The gray value of each pixel can be calculated as follows:
[0197] I(x,y)=0.3*I R (x,y)+0.59*I G (x,y)+0.11*I B (x,y); formula (1)
[0198] Where I(x,y) represents the grayscale value of the pixel at the xth row and yth column in the image. R (x,y) represents the red component value of the pixel at the xth row and yth column in the image. G (x,y) represents the green component value of the pixel at the xth row and yth column in the image. B (x,y) represents the blue component value of the pixel at the xth row and yth column in the image.
[0199] Based on this, after obtaining the first grayscale image and the second grayscale image, the grayscale values at the same pixel position are averaged. For example, the grayscale value of each pixel in the composite image can be calculated in the following manner:
[0200] I R (x,y)=(I A (x,y)+I B (x,y)) / 2; formula (2)
[0201] Among them, I R (x, y) represents the grayscale value of the pixel at the xth row and the yth column in the first synthetic image (i.e., the grayscale average value of the pixel). A (x, y) represents the grayscale value of the pixel at the xth row and yth column in the first grayscale image. B (x,y) represents the grayscale value of the pixel at the xth row and yth column in the second grayscale image.
[0202] Again, in the embodiment of the present application, a method for realizing image fusion is provided. In the above method, the grayscale values of the pixels are averaged to obtain the grayscale average value of each pixel. Thus, as a means of fusing two images, the feasibility and operability of the scheme are improved. In addition, the method is also capable of improving the signal-to-noise ratio of the fused image.
[0203] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, fusing the first image to be fused and the second image to be fused to obtain a first composite image may specifically include:
[0204] Obtaining a first grayscale image corresponding to the first image to be fused;
[0205] Obtaining a second grayscale image corresponding to the second image to be fused;
[0206] The maximum grayscale value of the same pixel position in the first grayscale image and the second grayscale image is calculated to obtain the maximum grayscale value corresponding to each pixel position;
[0207] A first composite image is generated according to the maximum grayscale value corresponding to each pixel position.
[0208] In one or more embodiments, another method for realizing image fusion is introduced. It can be seen from the above embodiments that after obtaining the first image to be fused and the second image to be fused, the two images need to be fused to obtain a first composite image.
[0209] Specifically, a first grayscale image corresponding to the first image to be fused and a second grayscale image corresponding to the second image to be fused are obtained respectively. If the first image to be fused and the second image to be fused are both images in the RGB color mode, they need to be converted into corresponding grayscale images respectively. It should be noted that the method of converting the first image to be fused into the first grayscale image and converting the second image to be fused into the second grayscale image can be referred to the aforementioned embodiment, which will not be described in detail here.
[0210] Based on this, after obtaining the first grayscale image and the second grayscale image, the grayscale value at the same pixel position is calculated to find the maximum value. For example, the grayscale value of each pixel in the composite image can be calculated in the following manner:
[0211] I R (x,y)=max(I A (x,y),I B (x,y)); formula (3)
[0212] Among them, I R (x, y) represents the grayscale value of the pixel at the xth row and yth column in the first synthetic image (i.e., the maximum grayscale value of the pixel). A (x, y) represents the grayscale value of the pixel at the xth row and yth column in the first grayscale image. B (x,y) represents the grayscale value of the pixel at the xth row and yth column in the second grayscale image. max() represents the maximum value calculation.
[0213] Again, in the embodiment of the present application, another method for realizing image fusion is provided. In the above method, the grayscale value of the pixel is screened for the maximum value to obtain the maximum grayscale value of each pixel. Thus, as a means of fusing two images, the feasibility and operability of the scheme are improved.
[0214] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first distance is equal to the second distance;
[0215] Generating a first composite image according to the first palm image and the second palm image may specifically include:
[0216] Acquire each pixel point where the first palm image overlaps with the second palm image;
[0217] The overlapping pixels are merged, and the non-overlapping pixels in the first palm image and the second palm image are kept to obtain a first composite image.
[0218] In one or more embodiments, a method of collecting palm images at equal distances is introduced. As can be seen from the aforementioned embodiments, the terminal calls the camera to collect multiple consecutive frames of palm images, which can be collected when the target palm gradually approaches the camera, or when the target palm gradually moves away from the camera, or when the target palm performs a translational motion in front of the camera.
[0219] Specifically, for ease of understanding, see Fig.12 , Fig.12 This is another schematic diagram of generating the first composite image in an embodiment of the present application. As shown in the figure, the first palm image and the second palm image are two frames of images collected at two consecutive moments, and the first palm image and the second palm image have the same scale and field of view. Based on this, each pixel point where the first palm image and the second palm image overlap can be regarded as a region obtained by common shooting. Thus, by merging the pixel values of the overlapping parts of the first palm image and the second palm image, and maintaining the pixel values of the non-overlapping parts, an image of a larger canvas can be generated, that is, the first composite image is obtained.
[0220] It is understandable that, in actual applications, a portion of the palm image may be collected while the target palm gradually approaches the camera, and another portion of the palm image may be collected while the target palm performs translational motion in front of the camera. Alternatively, a portion of the palm image may be collected while the target palm gradually moves away from the camera, and another portion of the palm image may be collected while the target palm performs translational motion in front of the camera.
[0221] Secondly, in the embodiment of the present application, a method of collecting palm images at equal distances is provided. Through the above method, multiple frames of palm images can be obtained during the translation of the target palm. Based on this, these palm images can be spliced to obtain a composite image that meets the recognition conditions. Thus, the diversity of the scheme is improved.
[0222] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, feature extraction is performed on the first synthetic image to obtain the first biometric feature, which may specifically include:
[0223] Sending the first composite image to a server, so that the server extracts features from the first composite image to obtain a first biometric feature;
[0224] Based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature, the first biometric feature is identified and processed to obtain an image recognition result, which may specifically include:
[0225] Receive target identity information corresponding to the first biometric feature sent by the server, wherein the target identity information is obtained after the server performs identification processing on the first biometric feature based on multiple stored preset biometric features and identity information corresponding to each preset biometric feature.
[0226] In one or more embodiments, a processing method is introduced when the image recognition condition is met. It can be seen from the above embodiments that if the first composite image meets the image recognition condition, the first composite image needs to be recognized.
[0227] Specifically, the terminal can send the first composite image to the server, and the server extracts features from the first composite image to obtain the first biometric feature. The first biometric feature can be one or both of a palm print feature and a palm vein feature, which is not limited here. Based on this, the server matches the first biometric feature with a plurality of stored preset biometric features to determine the preset biometric feature with the greatest similarity to the first biometric feature. If the similarity is greater than or equal to the similarity threshold, the identity information corresponding to the preset biometric feature is used as the target identity information corresponding to the first biometric feature. Thus, the terminal can perform corresponding processing according to the target identity information fed back by the server, such as consumption payment, passing access control, etc.
[0228] Secondly, in the embodiment of the present application, a processing method is provided when the image recognition conditions are met. Through the above method, multiple images of the same palm are processed to extract the beneficial information (e.g., pixels or features, etc.) in each image to the maximum extent, so as to improve the utilization rate of image information, improve the accuracy and reliability of computer interpretation, and thus help generate a composite image that meets the image recognition conditions.
[0229] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, sending the first synthetic image to the server so that the server extracts features from the first synthetic image to obtain the first biometric feature may specifically include:
[0230] Performing noise reduction and white balance processing on the first composite image to obtain a processed image;
[0231] Performing encoding processing on the processed image to obtain an encoded image;
[0232] The encoded image is sent to the server so that the server decodes the encoded image to obtain a processed image, and extracts features from the processed image to obtain a first biometric feature.
[0233] In one or more embodiments, a method for processing a composite image is introduced. It can be seen from the above embodiments that in one case, after obtaining a palm image, image signal processing (ISP) is first performed on the palm image, and then noise reduction processing, white balance processing and encoding processing are performed. Then it is transmitted to a server via a universal serial bus (USB). The server decodes it to obtain a processed image, and then performs algorithm processing such as distortion correction, alignment, optimization, synthesis and feature extraction, thereby obtaining a biometric feature (for example, a first biometric feature). In another case, after obtaining a first composite image, ISP is first performed on the first composite image, and then noise reduction processing, white balance processing and encoding processing are performed. Then it is transmitted to a server via USB for processing. The server decodes it to obtain a processed image, and then performs algorithm processing such as distortion correction, alignment, optimization and feature extraction, thereby obtaining a biometric feature (for example, a first biometric feature).
[0234] Specifically, image noise reduction refers to the process of reducing noise in digital images. The noise reduction methods that can be used include but are not limited to using a mean filter, an adaptive Wiener filter, a median filter, etc. Image white balance processing refers to a calculation method for digital image color processing that restores the color of white objects to accurately restore the colors of other objects. White balance processing is used to improve the color of the image, making the color of the image look more natural and realistic.
[0235] Again, in the embodiment of the present application, a method for processing a composite image is provided. Through the above method, the composite image can be preprocessed, thereby eliminating irrelevant information in the composite image, restoring useful real information, enhancing the detectability of relevant information and simplifying data to the maximum extent, thereby improving the reliability of image recognition.
[0236] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after generating the first composite image according to the first palm image and the second palm image, the following steps may also be included:
[0237] If the first composite image does not meet the image recognition condition, a third palm image corresponding to a third distance is collected by the camera, wherein the third palm image includes Z palm prints of the target palm, the third distance represents the distance between the target palm and the camera at a third moment, the third moment is the next moment of the second moment, and Z is an integer greater than or equal to 1;
[0238] generating a second composite image according to the first composite image and the third palm image, wherein the second composite image includes a union of X palm prints, Y palm prints, and Z palm prints;
[0239] If the second synthetic image satisfies the image recognition condition, feature extraction is performed on the second synthetic image to obtain a second biometric feature;
[0240] Based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature, the second biometric feature is identified and processed to obtain an image recognition result.
[0241] In one or more embodiments, a processing method is introduced when the image recognition condition is not met. It can be seen from the above embodiments that if the first synthesized image does not meet the image recognition condition, then the third palm image collected at the third moment can be further synthesized, that is, the first synthesized image and the third palm image are synthesized to obtain a second synthesized image. It can be understood that the image synthesis method can refer to the above embodiments and will not be described in detail here.
[0242] Specifically, the third palm image corresponding to the third distance is collected by the camera, wherein the third distance represents the distance between the target palm and the camera at the third moment. The second moment is a moment occurring before the third moment. Assuming that the first distance is less than the second distance, the second distance may be less than the third distance, that is, at this time, the target palm gradually moves away from the camera. Assuming that the first distance is greater than the second distance, the second distance may be greater than the third distance, that is, at this time, the target palm gradually approaches the camera. Assuming that the first distance is equal to the second distance, the second distance may also be equal to the third distance, that is, at this time, the target palm translates in front of the camera.
[0243] It should be noted that, since the third palm image includes Z palm prints of the target palm, the first composite image includes the union of X palm prints and Y palm prints of the target palm. Based on this, the second composite image includes the union of X palm prints, Y palm prints and Z palm prints. If the second composite image meets the image recognition condition, feature extraction is performed on the second composite image to obtain a second biometric feature (for example, one or both of a palm print feature and a palm vein feature). The terminal or server matches the second biometric feature with each preset biometric feature, that is, calculates the similarity between the second biometric feature and each preset biometric feature. Assuming that the similarity between the preset biometric feature A and the second biometric feature is the largest, and the similarity is greater than or equal to the similarity threshold, then the image recognition result is determined to be a successful recognition, and the identity information corresponding to the preset biometric feature A is used as the identified target identity information.
[0244] For easier understanding, see Fig.13 , Fig.13This is a flow chart of implementing image recognition based on continuously collected palm images in an embodiment of the present application, specifically:
[0245] In step S1, the user's target palm enters the field of view.
[0246] In step S2, the distance sensor of the terminal senses that an object is approaching. The terminal may be a palm scanning device or a payment interaction device, etc., which is not limited here.
[0247] In step S3, the terminal uses a camera to capture a palm image including the target palm.
[0248] In step S4, the sensor continuously outputs the palm image, for example, outputs 10 frames of palm images per second.
[0249] In step S5, the palm image is preprocessed, for example, noise reduction processing, white balance processing, etc.
[0250] In step S6, if the processed image meets the image recognition condition, the processed image is sent to the server for algorithm recognition. If the processed image does not meet the image recognition condition, step S7 is continued.
[0251] In step S7, the user's target palm continues to approach the camera. It is understandable that in actual applications, the user's target palm may continue to move away from the camera, or move horizontally, etc. Here, the target palm continues to approach the camera as an example for illustration, but it should not be understood as a limitation of the present application.
[0252] In step S8, the terminal calls the camera to continue to shoot a palm image including the target palm.
[0253] In step S9, the palm image is preprocessed, for example, noise reduction processing, white balance processing, etc.
[0254] In step S10, if the processed image meets the image recognition condition, the processed image is sent to the server for algorithm recognition. If the processed image does not meet the image recognition condition, step S7 is performed again.
[0255] In step S11, a biometric feature is extracted based on a composite image obtained by fusing multiple frames of palm images, and then the biometric feature is compared with a pre-stored biometric feature to find the identity of the corresponding object when it was registered from the database, thereby outputting the target identity information.
[0256] Secondly, in the embodiment of the present application, a processing method is provided when the image recognition condition is not met. In the above method, if the synthesized image does not meet the image recognition condition, then image synthesis can be performed until a synthesized image that meets the image recognition condition is obtained. Thus, the feasibility and operability of the solution are improved.
[0257] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after generating the first composite image according to the first palm image and the second palm image, the following steps may also be included:
[0258] Obtaining a target grayscale image corresponding to the first synthetic image;
[0259] Get the grayscale value corresponding to each pixel in the target grayscale image;
[0260] According to the grayscale values corresponding to each pixel point, the grayscale average value of the target grayscale image is determined;
[0261] The grayscale variance is calculated based on the grayscale value corresponding to each pixel and the grayscale average value;
[0262] If the grayscale variance is greater than or equal to the grayscale variance threshold, it is determined that the first synthesized image meets the image recognition condition.
[0263] In one or more embodiments, a method for determining whether a composite image meets an image recognition condition based on a clarity score is introduced. As can be seen from the above embodiments, after generating a first composite image, it is necessary to determine whether the first composite image meets the image recognition condition. If the image recognition condition is met, subsequent identity recognition can be performed. On the contrary, if the image recognition condition is not met, a new composite image is generated.
[0264] Specifically, the target grayscale image corresponding to the first composite image is obtained. If the first composite image is an image in RGB color mode, it also needs to be converted into a corresponding grayscale image. It should be noted that the conversion of the first composite image into a target grayscale image can refer to the aforementioned embodiment, which will not be described in detail here. After obtaining the target grayscale image, the grayscale values corresponding to each pixel point in the target grayscale image are obtained. Based on this, the grayscale variance can be calculated in the following manner:
[0265]
[0266]
[0267] in, Represents the grayscale average value of the target grayscale image. N x Indicates the width of the target grayscale image. N yIndicates the height of the target grayscale image. f(x,y) indicates the grayscale value of the target grayscale image at the pixel point (x,y). s indicates the grayscale variance.
[0268] It can be understood that the grayscale variance indicates the average degree of grayscale change of the image. The greater the average degree of grayscale change, the clearer the image. Conversely, the smaller the average degree of grayscale change, the blurrier the image. Therefore, if the grayscale variance corresponding to the first composite image is greater than or equal to the grayscale variance threshold, it means that the first composite image is clear enough, that is, it is determined that the first composite image meets the image recognition condition.
[0269] Secondly, in the embodiment of the present application, a method is provided to determine whether a composite image meets the image recognition conditions based on the clarity score. In this way, composite images with higher clarity can continue to be recognized, while composite images with lower clarity will not be used for identity recognition. In this way, on the one hand, the accuracy of recognition can be improved, and on the other hand, the resources of image recognition can be saved and the success rate of recognition can be improved.
[0270] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after generating the first composite image according to the first palm image and the second palm image, the following steps may also be included:
[0271] Obtaining a target grayscale image corresponding to the first synthetic image;
[0272] Get the grayscale value corresponding to each pixel in the target grayscale image;
[0273] According to the grayscale values corresponding to each pixel point, the grayscale average value of the target grayscale image is determined;
[0274] The grayscale variance is calculated based on the grayscale value corresponding to each pixel and the grayscale average value;
[0275] If the grayscale variance is greater than or equal to the grayscale variance threshold, and the main palm print and the finger joint positioning points in the first composite image are detected, it is determined that the first composite image meets the image recognition condition.
[0276] In one or more embodiments, a method is introduced to determine whether a composite image meets the image recognition condition based on the clarity score and the palm print condition.
[0277] Specifically, obtain the target grayscale image corresponding to the first composite image. If the first composite image is an image in RGB color mode, it also needs to be converted into a corresponding grayscale image. It should be noted that the conversion of the first composite image into a target grayscale image can refer to the aforementioned embodiment and will not be described in detail here. After obtaining the target grayscale image, the grayscale variance corresponding to the first composite image can be calculated based on formula (4) and formula (5). In addition, it is also necessary to detect whether the first composite image includes the main palm print and the finger joint positioning points, wherein the main palm print includes the three most obvious palm prints, namely, Figure 4 The middle (A) figure shows three palm lines when imaging at a long distance. The finger joint positioning points include three finger joint points at the base of the fingers, namely, the finger joint point between the index finger and the middle finger, the finger joint point between the middle finger and the ring finger, and the finger joint point between the ring finger and the little finger.
[0278] Based on this, if the grayscale variance corresponding to the first composite image is greater than or equal to the grayscale variance threshold, and the main palm print and fingertip positioning points in the first composite image are detected, it means that the first composite image is clear enough and contains enough palmprint information for identification, that is, it is determined that the first composite image meets the image recognition conditions.
[0279] Secondly, in the embodiment of the present application, a method is provided to determine whether a composite image meets the image recognition conditions based on the clarity score and the palm print condition. Through the above method, composite images with high clarity and key palm print information can continue to be recognized, while composite images with low clarity or missing key palm print information will not be used for identity recognition. Therefore, on the one hand, the accuracy of recognition can be improved, and on the other hand, the resources of image recognition can be saved and the success rate of recognition can be improved.
[0280] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, another optional embodiment provided by the embodiment of the present application may further include:
[0281] If the first composite image meets the image recognition condition, a first prompt message is played, wherein the first prompt message is used to prompt that the image recognition condition is met;
[0282] If the first composite image does not meet the image recognition condition, a second prompt message is played, wherein the second prompt message is used to prompt that the image recognition condition is not met.
[0283] In one or more embodiments, a method of prompting based on whether an image recognition condition is satisfied is introduced. As can be seen from the above embodiments, after a composite image is obtained by fusion, it is determined whether the composite image satisfies the image recognition condition. If the image recognition condition is satisfied, subsequent recognition is performed directly. Otherwise, the palm image of the target palm will continue to be collected, and image fusion will continue.
[0284] Exemplarily, if it is detected that the first composite image meets the image recognition condition, the terminal may play a first prompt message. Specifically, the first prompt message may be "capture completed." Based on this, the user does not need to continue to place the target palm in front of the camera.
[0285] For example, if it is detected that the first composite image does not meet the image recognition condition, the terminal may play a second prompt message. Specifically, the second prompt message may be "Please continue to place your palm". Based on this, the user needs to continue to place the target palm in front of the camera.
[0286] Secondly, in the embodiment of the present application, a method of prompting based on whether the image recognition condition is met is provided. Through the above method, the user can be guided whether to continue palm swiping, thereby improving the palm swiping experience.
[0287] The image recognition device in this application is described in detail below. Fig.14 , Fig.14 This is a schematic diagram of an embodiment of an image recognition device in an embodiment of the present application. The image recognition device 30 includes:
[0288] An acquisition module 310 is configured to acquire a first palm image corresponding to a first distance through a camera, wherein the first palm image includes X palm prints of a target palm, and the first distance represents a distance between the target palm and the camera at a first moment, where X is an integer greater than or equal to 1;
[0289] The acquisition module 310 is further configured to collect a second palm image corresponding to a second distance through a camera, wherein the second palm image includes Y palm prints of the target palm, and the second distance represents the distance between the target palm and the camera at a second moment, the second moment being a moment after the first moment, and Y being an integer greater than or equal to 1;
[0290] A generating module 320, configured to generate a first composite image according to the first palm image and the second palm image, wherein the first composite image includes a union of the X palm prints and the Y palm prints;
[0291] The processing module 330 is used to extract features from the first synthetic image to obtain a first biometric feature if the first synthetic image meets the image recognition condition;
[0292] The processing module 330 is further configured to perform recognition processing on the first biometric feature based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature to obtain an image recognition result.
[0293] In an embodiment of the present application, an image recognition device is provided. Using the above device, multiple frames of palm images collected are synthesized into a fused image, so that the fused image includes palm prints from multiple frames of palm images, thereby achieving the effect of enriching the palm print texture. As a result, close-range palm recognition can be achieved without sinking the camera. It can be seen that the solution provided by the present application can not only avoid increasing the size of the palm brushing device, but also maintain the original aesthetics of the palm brushing device.
[0294] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application, the first distance is greater than the second distance;
[0295] The generating module 320 is specifically configured to perform a scale enlargement process on the first palm image based on the scale corresponding to the second palm image to obtain a first image to be fused, wherein the palm prints in the first image to be fused have a matching relationship with the palm prints in the second palm image;
[0296] Using the second palm image as the second image to be fused;
[0297] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0298] In an embodiment of the present application, an image recognition device is provided. With the above device, the palm image collected in the next frame is used as the basis, and the two frames of palm images are processed at a unified scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the first image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0299] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application, the first distance is greater than the second distance;
[0300] A generating module 320, specifically configured to use the first palm image as a first image to be fused;
[0301] Based on the scale corresponding to the first palm image, the second palm image is scaled down to obtain a second image to be fused, wherein the palm prints in the second image to be fused have a matching relationship with the palm prints in the first palm image;
[0302] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0303] In an embodiment of the present application, an image recognition device is provided. With the above device, the palm image collected in the previous frame is used as the basis, and the two frames of palm images before and after are processed at a unified scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the first image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0304] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application, the first distance is greater than the second distance;
[0305] A generating module 320 is specifically configured to perform a size scaling process on the first palm image based on a preset image scale to obtain a first image to be fused;
[0306] Based on a preset image scale, scaling the second palm image to obtain a second image to be fused;
[0307] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0308] In an embodiment of the present application, an image recognition device is provided. The above device is used to process the two frames of palm images in a unified scale based on a preset image scale to further achieve image fusion. Thus, the image quality of the local area on the base map (for example, the first image to be fused) is updated according to the matching of the local features of the image, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0309] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application, the first distance is smaller than the second distance;
[0310] A generating module 320, specifically configured to use the first palm image as a first image to be fused;
[0311] Based on the scale corresponding to the first palm image, the second palm image is scaled up to obtain a second image to be fused, wherein the palm prints in the second image to be fused have a matching relationship with the palm prints in the first palm image;
[0312] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0313] In an embodiment of the present application, an image recognition device is provided. With the above device, the palm image collected in the previous frame is used as the basis, and the two frames of palm images before and after are processed with a unified scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the second image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0314] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application, the first distance is smaller than the second distance;
[0315] The generating module 320 is specifically configured to perform a scale reduction process on the first palm image based on the scale corresponding to the second palm image to obtain a first image to be fused, wherein the palm prints in the first image to be fused have a matching relationship with the palm prints in the second palm image;
[0316] Using the second palm image as the second image to be fused;
[0317] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0318] In an embodiment of the present application, an image recognition device is provided. With the above device, the palm image collected in the next frame is used as the basis, and the two frames of palm images are processed at a unified scale to further achieve image fusion. Thus, according to the matching of local features of the image, the image quality of the local area on the base map (for example, the second image to be fused) is updated, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0319] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application, the first distance is smaller than the second distance;
[0320] A generating module 320 is specifically configured to perform a size scaling process on the first palm image based on a preset image scale to obtain a first image to be fused;
[0321] Based on a preset image scale, scaling the second palm image to obtain a second image to be fused;
[0322] The first image to be fused and the second image to be fused are fused to obtain a first composite image.
[0323] In an embodiment of the present application, an image recognition device is provided. The above device is used to process the two frames of palm images in a unified scale based on a preset image scale to further achieve image fusion. Thus, the image quality of the local area on the base map (for example, the second image to be fused) is updated according to the matching of the local features of the image, so that the terminal can obtain an image that meets the recognition requirements when using a small FOV, reducing the design difficulty of the camera.
[0324] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application,
[0325] The generating module 320 is specifically used to obtain a first grayscale image corresponding to the first image to be fused;
[0326] Obtaining a second grayscale image corresponding to the second image to be fused;
[0327] Averaging the grayscale values of the same pixel position in the first grayscale image and the second grayscale image to obtain the grayscale average value corresponding to each pixel position;
[0328] A first composite image is generated according to the grayscale average value corresponding to each pixel position.
[0329] In an embodiment of the present application, an image recognition device is provided. The above device is used to average the grayscale values of the pixels to obtain the grayscale average value of each pixel. Thus, as a means of fusing two images, the feasibility and operability of the scheme are improved. In addition, the method is also capable of improving the signal-to-noise ratio of the fused image.
[0330] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application,
[0331] The generating module 320 is specifically used to obtain a first grayscale image corresponding to the first image to be fused;
[0332] Obtaining a second grayscale image corresponding to the second image to be fused;
[0333] The maximum grayscale value of the same pixel position in the first grayscale image and the second grayscale image is calculated to obtain the maximum grayscale value corresponding to each pixel position;
[0334] A first composite image is generated according to the maximum grayscale value corresponding to each pixel position.
[0335] In an embodiment of the present application, an image recognition device is provided. The above device is used to screen the grayscale values of pixels to obtain the maximum grayscale value of each pixel. Thus, as a means of fusing two images, the feasibility and operability of the solution are improved.
[0336] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application, the first distance is equal to the second distance;
[0337] A generating module 320 is specifically used to obtain each pixel point where the first palm image overlaps with the second palm image;
[0338] The overlapping pixels are merged, and the non-overlapping pixels in the first palm image and the second palm image are kept to obtain a first composite image.
[0339] In an embodiment of the present application, an image recognition device is provided. With the above device, multiple frames of palm images can be obtained during the translation of the target palm. Based on this, these palm images can be spliced to obtain a composite image that meets the recognition conditions. Thus, the diversity of the solution is improved.
[0340] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application,
[0341] The processing module 330 is specifically configured to send the first composite image to the server, so that the server extracts features from the first composite image to obtain a first biometric feature;
[0342] Receive target identity information corresponding to the first biometric feature sent by the server, wherein the target identity information is obtained after the server performs identification processing on the first biometric feature based on multiple stored preset biometric features and identity information corresponding to each preset biometric feature.
[0343] In an embodiment of the present application, an image recognition device is provided. Using the above device, multiple images of the same palm are processed to extract the useful information (e.g., pixels or features, etc.) in each image to the maximum extent, so as to improve the utilization rate of image information, improve the accuracy and reliability of computer interpretation, and thus help generate a composite image that meets the image recognition conditions.
[0344] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application,
[0345] The processing module 330 is specifically used to perform noise reduction and white balance processing on the first composite image to obtain a processed image;
[0346] Performing encoding processing on the processed image to obtain an encoded image;
[0347] The encoded image is sent to the server so that the server decodes the encoded image to obtain a processed image, and extracts features from the processed image to obtain a first biometric feature.
[0348] In an embodiment of the present application, an image recognition device is provided. By using the above device, the composite image can be preprocessed, thereby eliminating irrelevant information in the composite image, restoring useful real information, enhancing the detectability of relevant information and simplifying data to the maximum extent, thereby improving the reliability of image recognition.
[0349] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application,
[0350] The acquisition module 310 is further configured to, after generating the first composite image according to the first palm image and the second palm image, if the first composite image does not meet the image recognition condition, collect a third palm image corresponding to a third distance through the camera, wherein the third palm image includes Z palm prints of the target palm, the third distance represents the distance between the target palm and the camera at a third moment, the third moment is the next moment of the second moment, and Z is an integer greater than or equal to 1;
[0351] The generating module 320 is further configured to generate a second synthesized image according to the first synthesized image and the third palm image, wherein the second synthesized image includes a union of the X palm prints, the Y palm prints, and the Z palm prints;
[0352] The processing module 330 is further configured to extract features from the second synthetic image to obtain a second biometric feature if the second synthetic image satisfies the image recognition condition;
[0353] The processing module 330 is further configured to perform recognition processing on the second biometric feature based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature to obtain an image recognition result.
[0354] In an embodiment of the present application, an image recognition device is provided. With the above device, if the synthesized image does not meet the image recognition condition, image synthesis can be performed until a synthesized image that meets the image recognition condition is obtained, thereby improving the feasibility and operability of the solution.
[0355] Optionally, in the above Fig.14On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application, the image recognition device 30 further includes a determination module 340;
[0356] The acquisition module 310 is further configured to acquire a target grayscale image corresponding to the first composite image after generating the first composite image according to the first palm image and the second palm image;
[0357] The acquisition module 310 is also used to obtain the grayscale value corresponding to each pixel point in the target grayscale image;
[0358] A determination module 340 is used to determine the grayscale average value of the target grayscale image according to the grayscale value corresponding to each pixel point;
[0359] The determination module 340 is further used to calculate the grayscale variance according to the grayscale value corresponding to each pixel point and the grayscale average value;
[0360] The determination module 340 is further configured to determine that the first synthesized image satisfies an image recognition condition if the grayscale variance is greater than or equal to a grayscale variance threshold.
[0361] In an embodiment of the present application, an image recognition device is provided. With the above device, a composite image with higher definition can continue to be subsequently recognized, while a composite image with lower definition will not be used for identity recognition. Thus, on the one hand, the accuracy of recognition can be improved, and on the other hand, the resources of image recognition can be saved and the success rate of recognition can be improved.
[0362] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application,
[0363] The acquisition module 310 is further configured to acquire a target grayscale image corresponding to the first composite image after generating the first composite image according to the first palm image and the second palm image;
[0364] The acquisition module 310 is also used to obtain the grayscale value corresponding to each pixel point in the target grayscale image;
[0365] The determination module 340 is further used to determine the grayscale average value of the target grayscale image according to the grayscale value corresponding to each pixel point;
[0366] The determination module 340 is further used to calculate the grayscale variance according to the grayscale value corresponding to each pixel point and the grayscale average value;
[0367] The determination module 340 is further configured to determine that the first composite image meets the image recognition condition if the grayscale variance is greater than or equal to the grayscale variance threshold and the main palm print and the finger joint positioning points in the first composite image are detected.
[0368] In the embodiment of the present application, an image recognition device is provided. With the above device, a composite image with high definition and key palmprint information can continue to be subsequently recognized, while a composite image with low definition or missing key palmprint information will not be used for identity recognition. Thus, on the one hand, the accuracy of recognition can be improved, and on the other hand, the resources of image recognition can be saved and the success rate of recognition can be improved.
[0369] Optionally, in the above Fig.14 On the basis of the corresponding embodiment, in another embodiment of the image recognition device 30 provided in the embodiment of the present application, the image recognition device 30 further includes a playback module 350;
[0370] The playing module 350 is used to play a first prompt message if the first composite image meets the image recognition condition, wherein the first prompt message is used to prompt that the image recognition condition is met;
[0371] The playing module 350 is further configured to play a second prompt message if the first composite image does not satisfy the image recognition condition, wherein the second prompt message is configured to prompt that the image recognition condition is not satisfied.
[0372] In an embodiment of the present application, an image recognition device is provided. The above device can guide the user whether to continue palm swiping, thereby improving the palm swiping experience.
[0373] The present application also provides an electronic device, such as Fig.15 For the sake of convenience, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. In the embodiments of the present application, the electronic device is taken as an example to illustrate:
[0374] Fig.15 FIG. 1 is a block diagram showing a partial structure of a palm brushing device related to an electronic device provided in an embodiment of the present application. Fig.15 The palm brushing device includes: a radio frequency (RF) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor 480, and a power supply 490. Those skilled in the art will understand that Fig.15The palm brushing device structure shown in the figure does not constitute a limitation of the palm brushing device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0375] Combine the following Fig.15 A detailed introduction to the various components of the palm brushing device:
[0376] The RF circuit 410 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 480 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 410 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 410 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.
[0377] The memory 420 can be used to store software programs and modules. The processor 480 executes various functional applications and data processing of the palm-brushing device by running the software programs and modules stored in the memory 420. The memory 420 can mainly include a program storage area and a data storage area. The program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the palm-brushing device (such as audio data, a phone book, etc.), etc. In addition, the memory 420 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0378] The input unit 430 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the palm brushing device. Specifically, the input unit 430 may include a touch panel 431 and other input devices 432. The touch panel 431, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 431 or near the touch panel 431 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 431 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 480, and can receive and execute the command sent by the processor 480. In addition, the touch panel 431 can be implemented in various types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch panel 431, the input unit 430 may further include other input devices 432. Specifically, the other input devices 432 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a mouse, a joystick, etc.
[0379] The display unit 440 can be used to display information input by the user or information provided to the user and various menus of the palm-swiping device. The display unit 440 may include a display panel 441. Optionally, the display panel 441 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 431 may cover the display panel 441. When the touch panel 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of touch event. Subsequently, the processor 480 provides a corresponding visual output on the display panel 441 according to the type of touch event. Although in Fig.15 In the embodiment, the touch panel 431 and the display panel 441 are two independent components to realize the input and output functions of the palm brushing device, but in some embodiments, the touch panel 431 and the display panel 441 can be integrated to realize the input and output functions of the palm brushing device.
[0380] The palm brushing device may also include at least one sensor 450, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 441 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 441 and / or the backlight when the palm brushing device is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the palm brushing device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the palm brushing device, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0381] The audio circuit 460, the speaker 461, and the microphone 462 can provide an audio interface between the user and the palm brushing device. The audio circuit 460 can transmit the received audio data to the speaker 461 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is received by the audio circuit 460 and converted into audio data, and then the audio data is processed by the output processor 480, and then sent to, for example, another palm brushing device through the RF circuit 410, or the audio data is output to the memory 420 for further processing.
[0382] WiFi is a short-range wireless transmission technology. The palm-swipe device can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 470. It provides users with wireless broadband Internet access. Fig.15 A WiFi module 470 is shown, but it is understandable that it is not a necessary component of the palm-brushing device and can be omitted as needed without changing the essence of the invention.
[0383] The processor 480 is the control center of the palm-brushing device. It uses various interfaces and lines to connect various parts of the entire palm-brushing device. It executes various functions of the palm-brushing device and processes data by running or executing software programs and / or modules stored in the memory 420, and calling data stored in the memory 420. Optionally, the processor 480 may include one or more processing units; optionally, the processor 480 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 480.
[0384] The palm-brushing device also includes a power source 490 (such as a battery) for supplying power to various components. Optionally, the power source can be logically connected to the processor 480 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0385] Although not shown, the palm-swiping device may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0386] The steps performed by the electronic device in the above embodiments can be based on the Fig.15 The electronic device structure shown.
[0387] A computer-readable storage medium is also provided in an embodiment of the present application, on which a computer program is stored. When the computer program is executed by a processor, the steps of the methods described in the above embodiments are implemented.
[0388] A computer program product is also provided in an embodiment of the present application, including a computer program, which, when executed by a processor, implements the steps of the methods described in the above embodiments.
[0389] It is understandable that in the specific implementation of the present application, related data such as user information and palm print images are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0390] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0391] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0392] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0393] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0394] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a server or terminal device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store computer programs.
[0395] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for image recognition, characterized in that: include: Collecting a first palm image corresponding to a first distance through a camera, wherein the first palm image includes X palm prints of a target palm, the first distance represents a distance between the target palm and the camera at a first moment, and X is an integer greater than or equal to 1; Collecting a second palm image corresponding to a second distance through the camera, wherein the second palm image includes Y palm prints of the target palm, the second distance represents the distance between the target palm and the camera at a second moment, the second moment is a moment after the first moment, and Y is an integer greater than or equal to 1; generating a first composite image according to the first palm image and the second palm image, wherein the first composite image includes a union of the X palm prints and the Y palm prints; If the first synthetic image satisfies the image recognition condition, extracting features from the first synthetic image to obtain a first biological feature; Based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature, the first biometric feature is identified and processed to obtain an image recognition result.
2. The method according to claim 1, characterized in that: The first distance is greater than the second distance; The step of generating a first composite image according to the first palm image and the second palm image includes: Based on the scale corresponding to the second palm image, the first palm image is scaled up to obtain a first image to be fused, wherein the palm prints in the first image to be fused are matched with the palm prints in the second palm image; Using the second palm image as the second image to be fused; The first image to be fused and the second image to be fused are fused to obtain the first composite image.
3. The method according to claim 1, characterized in that The first distance is greater than the second distance; The step of generating a first composite image according to the first palm image and the second palm image includes: Using the first palm image as a first image to be fused; Based on the scale corresponding to the first palm image, the second palm image is scaled down to obtain a second image to be fused, wherein the palm prints in the second image to be fused are matched with the palm prints in the first palm image; The first image to be fused and the second image to be fused are fused to obtain the first composite image.
4. The method according to claim 1, characterized in that: The first distance is greater than the second distance; The step of generating a first composite image according to the first palm image and the second palm image includes: Based on a preset image scale, scaling the first palm image to obtain a first image to be fused; Based on the preset image scale, scaling the second palm image to obtain a second image to be fused; The first image to be fused and the second image to be fused are fused to obtain the first composite image.
5. The method according to claim 1, characterized in that The first distance is smaller than the second distance; The step of generating a first composite image according to the first palm image and the second palm image includes: Using the first palm image as a first image to be fused; Based on the scale corresponding to the first palm image, the second palm image is scaled up to obtain a second image to be fused, wherein the palm prints in the second image to be fused are matched with the palm prints in the first palm image; The first image to be fused and the second image to be fused are fused to obtain the first composite image.
6. The method according to claim 1, characterized in that The first distance is smaller than the second distance; The step of generating a first composite image according to the first palm image and the second palm image includes: Based on the scale corresponding to the second palm image, the first palm image is scaled down to obtain a first image to be fused, wherein the palm prints in the first image to be fused are matched with the palm prints in the second palm image; Using the second palm image as the second image to be fused; The first image to be fused and the second image to be fused are fused to obtain the first composite image.
7. The method according to claim 1, characterized in that The first distance is smaller than the second distance; The step of generating a first composite image according to the first palm image and the second palm image includes: Based on a preset image scale, scaling the first palm image to obtain a first image to be fused; Based on the preset image scale, scaling the second palm image to obtain a second image to be fused; The first image to be fused and the second image to be fused are fused to obtain the first composite image.
8. The method according to any one of claims 2 to 7, characterized in that The fusing the first image to be fused and the second image to be fused to obtain the first composite image includes: Acquire a first grayscale image corresponding to the first image to be fused; Acquire a second grayscale image corresponding to the second image to be fused; Averaging the grayscale values of the same pixel position in the first grayscale image and the second grayscale image to obtain a grayscale average value corresponding to each pixel position; The first composite image is generated according to the grayscale average value corresponding to each pixel position.
9. The method according to any one of claims 2 to 7, characterized in that The fusing the first image to be fused and the second image to be fused to obtain the first composite image includes: Acquire a first grayscale image corresponding to the first image to be fused; Acquire a second grayscale image corresponding to the second image to be fused; Calculate the maximum value of the grayscale value at the same pixel position in the first grayscale image and the second grayscale image to obtain the maximum grayscale value corresponding to each pixel position; The first composite image is generated according to the maximum grayscale value corresponding to each pixel position.
10. The method according to claim 1, characterized in that The first distance is equal to the second distance; The step of generating a first composite image according to the first palm image and the second palm image includes: Acquire each pixel point where the first palm image overlaps with the second palm image; The overlapping pixels are merged, and non-overlapping pixels in the first palm image and the second palm image are kept to obtain the first composite image.
11. The method according to claim 1, characterized in that: The extracting features from the first synthetic image to obtain a first biological feature includes: Sending the first composite image to a server, so that the server extracts features from the first composite image to obtain the first biometric feature; The step of performing recognition processing on the first biometric feature based on the stored plurality of preset biometric features and the identity information corresponding to each preset biometric feature to obtain an image recognition result includes: Receive the target identity information corresponding to the first biometric feature sent by the server, wherein the target identity information is obtained after the server performs identification processing on the first biometric feature based on a plurality of stored preset biometric features and the identity information corresponding to each preset biometric feature.
12. The method according to claim 11, characterized in that The sending the first composite image to the server so that the server extracts features from the first composite image to obtain the first biometric feature includes: Performing noise reduction and white balance processing on the first composite image to obtain a processed image; Performing encoding processing on the processed image to obtain an encoded image; The encoded image is sent to the server so that the server decodes the encoded image to obtain the processed image, and extracts features from the processed image to obtain the first biometric feature.
13. The method according to claim 1, characterized in that After generating the first composite image according to the first palm image and the second palm image, the method further includes: If the first composite image does not meet the image recognition condition, a third palm image corresponding to a third distance is collected by the camera, wherein the third palm image includes Z palm prints of the target palm, the third distance represents the distance between the target palm and the camera at a third moment, the third moment is a moment next to the second moment, and Z is an integer greater than or equal to 1; generating a second composite image according to the first composite image and the third palm image, wherein the second composite image includes a union of the X palm prints, the Y palm prints, and the Z palm prints; If the second synthetic image satisfies the image recognition condition, extracting features from the second synthetic image to obtain a second biometric feature; Based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature, the second biometric feature is identified and processed to obtain an image recognition result.
14. The method according to claim 1, characterized in that After generating the first composite image according to the first palm image and the second palm image, the method further includes: Acquire a target grayscale image corresponding to the first synthetic image; Obtaining the grayscale value corresponding to each pixel in the target grayscale image; Determine the grayscale average value of the target grayscale image according to the grayscale values corresponding to the respective pixel points; Calculate the grayscale variance according to the grayscale value corresponding to each pixel point and the grayscale average value; If the grayscale variance is greater than or equal to the grayscale variance threshold, it is determined that the first synthetic image meets the image recognition condition.
15. The method according to claim 1, characterized in that After generating the first composite image according to the first palm image and the second palm image, the method further includes: Acquire a target grayscale image corresponding to the first synthetic image; Obtaining the grayscale value corresponding to each pixel in the target grayscale image; Determine the grayscale average value of the target grayscale image according to the grayscale values corresponding to the respective pixel points; Calculate the grayscale variance according to the grayscale value corresponding to each pixel point and the grayscale average value; If the grayscale variance is greater than or equal to the grayscale variance threshold, and the main palm print and the finger joint positioning points in the first synthetic image are detected, it is determined that the first synthetic image meets the image recognition condition.
16. The method according to claim 1, characterized in that The method further comprises: If the first composite image satisfies the image recognition condition, a first prompt message is played, wherein the first prompt message is used to prompt that the image recognition condition is satisfied; If the first composite image does not satisfy the image recognition condition, a second prompt message is played, wherein the second prompt message is used to prompt that the image recognition condition is not satisfied.
17. An image recognition device, characterized in that: include: an acquisition module, configured to acquire a first palm image corresponding to a first distance through a camera, wherein the first palm image includes X palm prints of a target palm, the first distance represents a distance between the target palm and the camera at a first moment, and X is an integer greater than or equal to 1; The acquisition module is further used to collect a second palm image corresponding to a second distance through the camera, wherein the second palm image includes Y palm prints of the target palm, the second distance represents the distance between the target palm and the camera at a second moment, the second moment is a moment after the first moment, and Y is an integer greater than or equal to 1; a generating module, configured to generate a first composite image according to the first palm image and the second palm image, wherein the first composite image includes a union of the X palm prints and the Y palm prints; a processing module, configured to extract features from the first synthetic image to obtain a first biometric feature if the first synthetic image satisfies an image recognition condition; The processing module is further used to perform recognition processing on the first biometric feature based on the stored multiple preset biometric features and the identity information corresponding to each preset biometric feature to obtain an image recognition result.
18. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 16 are implemented.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.
