An image processing method and apparatus
By determining the correlation between images in image processing and comparing similarity, low-quality images are matched with high-quality image bases, the problem of low-quality images is solved, and the file integrity and file gathering rate are improved.
Patent Information
- Application Number
- CN202111669865.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In the prior art, due to the uncontrollability of the captured scene, the quality of the captured pictures is low, which affects the integrity of the archives. How to improve the utilization rate of low-quality pictures has become an urgent problem.
By determining the association relationship between the first image information and the second image information, high-quality image information with an association relationship with the low-quality image is obtained, and similarity comparison is performed, and the low-quality image is added to the most matching image base.
It improves the utilization rate of low-quality images, reduces the number of file trajectories lost, increases the file gathering rate, and provides favorable data support for subsequent intelligent applications.
Smart Images

Figure CN114372167B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly relates to an image processing method and apparatus. Background Art
[0002] Due to the uncontrollability of the capture scene, some low-quality images are often captured. For example, weather factors can cause differences in the brightness of the captured images, and even under-exposure or over-exposure of parameters may occur; at night, due to severe lack of light, serious image noise will be generated; when a person is in a moving state, the captured person will be seriously blurred.
[0003] In the portrait clustering solution, usually low-quality images are directly discarded to reduce the amount of stored data and the overhead of computing resources. However, if a file lacks the relevant data of these low-quality images, the file is incomplete and may affect subsequent applications.
[0004] Based on this, how to improve the utilization rate of low-quality images to make the file more complete is a technical problem that needs to be solved. Summary of the Invention
[0005] This application provides an image processing method and apparatus to improve the utilization rate of low-quality images and make the file more complete.
[0006] To achieve the above object, an embodiment of this application discloses an image processing method, which includes:
[0007] Determine the association relationship between the first image information and the second image information;
[0008] For the low-quality first image information, based on the determined association relationship between the first image information and the second image information, obtain the target high-quality second image information that has an association relationship with the low-quality first image information;
[0009] Determine the target second image file where the target high-quality second image information is located;
[0010] Based on the pre-determined association relationship between the first image file and the second image file, obtain the target first image file that has an association relationship with the target second image file;
[0011] Compare the similarity between the low-quality first image information and the target first image file, and when the similarity is greater than or equal to the set threshold, add the low-quality first image information to the target first image file.
[0012] In one example, the first image is a face image and the second image is a human body image; or, the first image is a human body image and the second image is a face image; wherein, one face image information is associated with at least one human body image information, and one human body image information is associated with one face image information.
[0013] In one example, when the first image is a face image and the second image is a human body image, before adding the low-quality first image information to the target first image profile, it further includes:
[0014] For the low-quality face image information, based on the determined association relationship between the face image information and the human body image information, obtain the target low-quality human body image associated with the low-quality face image;
[0015] Compare the similarity between the target low-quality human body image and the target human body profile, and determine that the similarity is greater than or equal to the set threshold.
[0016] In one example, it further includes:
[0017] When the similarity between the target low-quality human body image and the target human body profile is greater than or equal to the set threshold, add the low-quality human body image information to the target human body image profile.
[0018] In one example, determining the association relationship between the first image information and the second image information includes:
[0019] Extract a set of image information, and any set of image information includes one face image information and at least one human body image information;
[0020] Mark an association identifier for the face image information and the human body image information, and the association identifier is used to associate the face image information and the human body image information in the same set of image information.
[0021] In one example, comparing the similarity between the low-quality first image information and the target first image profile includes:
[0022] Compare the similarity between the low-quality first image information and the mean centroid and / or at least one recommended centroid of the target first image profile.
[0023] The embodiments of the present application disclose an image processing device, and the device includes:
[0024] An association module, configured to determine the association relationship between the first image information and the second image information;
[0025] An acquisition module, configured to obtain, for low-quality first image information, target high-quality second image information having an association relationship with the low-quality first image information based on the determined association relationship between the first image information and the second image information; determine a target second image file where the target high-quality second image information is located; and obtain a target first image file having an association relationship with the target second image file based on the pre-determined association relationship between the first image file and the second image file.
[0026] A comparison module, configured to compare the similarity between the low-quality first image information and the target first image file, and add the low-quality first image information to the target first image file when the similarity is greater than or equal to a set threshold.
[0027] In one example, the first image is a face image and the second image is a human body image; or, the first image is a human body image and the second image is a face image; wherein, one face image information is associated with at least one human body image information, and one human body image information is associated with one face image information.
[0028] In one example, the acquisition module is further configured to obtain, for low-quality face image information, a target low-quality human body image having an association relationship with the low-quality face image based on the determined association relationship between the face image information and the human body image information.
[0029] The comparison module is further configured to compare the similarity between the target low-quality human body image and the target human body file, and add the low-quality face image information to the target face image file when the similarity is greater than or equal to a set threshold.
[0030] In one example, the comparison module is further configured to add the low-quality human body image information to the target human body image file when the similarity between the target low-quality human body image and the target human body file is greater than or equal to a set threshold.
[0031] In one example, the association module is specifically configured to: extract a set of image information, where any set of image information includes one face image information and at least one human body image information; and mark an association identifier for the face image information and the human body image information, where the association identifier is used to associate the face image information and the human body image information in the same set of image information.
[0032] In one example, the comparison module is specifically configured to compare the similarity between the low-quality first image information and the mean centroid and / or at least one recommended centroid of the target first image file.
[0033] This application discloses an image processing device, including a processor and a memory;
[0034] The memory is used to store computer programs or instructions;
[0035] The processor is used to execute part or all of the computer programs or instructions in the memory. When the part or all of the computer programs or instructions are executed, it is used to implement the image processing method as described above.
[0036] This application embodiment discloses a computer-readable storage medium for storing a computer program, and the computer program includes instructions for implementing the image processing method as described above.
[0037] This application embodiment discloses a computer program product, and the computer program product includes: computer program code. When the computer program code runs on a computer, it causes the computer to execute the image processing method as described above.
[0038] This application utilizes the correlation relationship between the first image and the second image, compares the similarity between the low-quality first image / second image and the valid first image / second image file with a correlation relationship, recalls the low-quality images that meet the requirements, and clusters them into the most matching file. At the same time, since the clustering of the files does not use low-quality images, the recall of low-quality images does not affect the centroid of the files. This application pulls low-quality images through high-quality images. Through this solution, the utilization rate of low-quality images can be effectively improved, the number of lost file trajectories can be reduced, the filing rate can be increased, which is very beneficial for improving the subsequent intelligent application effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0040] Figure 1 It is a schematic diagram of an image processing process provided by this application;
[0041] Figure 2 It is a schematic diagram of an image processing process provided by this application;
[0042] Figure 3 It is a schematic diagram of an image processing process provided by this application;
[0043] Figure 4 It is a schematic diagram of an image processing process provided by this application;
[0044] Figure 5 Structural diagram of an image processing device provided for this application;
[0045] Figure 6 Structural diagram of an image processing device provided for this application. Specific implementation manners
[0046] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of this application.
[0047] Figure 1 Schematic diagram of an image processing process provided for this application. The execution device of this process can be any electronic device. This process at least includes the following steps:
[0048] Step 101: Determine the association relationship between the first image information and the second image information.
[0049] In one example, the first image is a face image and the second image is a human body image.
[0050] In another example, the first image is a human body image and the second image is a face image.
[0051] One face image information is associated with at least one human body image information, and one human body image information is associated with one face image information.
[0052] In yet another example, the first image is a face image and the second image is a license plate image. Or the first image is a license plate image and the second image is a face image.
[0053] The image information may include the feature vector of the image, and the feature vector is used to represent the image. Optionally, the image information may further include the relevant information of the image. The relevant information of the image includes, but is not limited to, one or more of the following: acquisition time, longitude and latitude information, scene information, coordinate information (for example, the coordinates of the face / human body / license plate in the image), image clarity, image width, image confidence, and device identifier for acquiring the image. Among them, image clarity, image width, image coordinates, etc. can be called the attribute information of the image. Among them, acquisition time, longitude and latitude information, scene information (such as school, village, hospital, bank, etc.) can be used to determine the trajectory of a person.
[0054] Step 102: For the low-quality first image information, based on the determined correlation relationship between the first image information and the second image information, obtain the target high-quality second image information that has a correlation relationship with the low-quality first image information.
[0055] Step 103: Determine the target second image file where the target high-quality second image information is located.
[0056] Step 104: Based on the pre-determined correlation relationship between the first image file and the second image file, obtain the target first image file that has a correlation relationship with the target second image file.
[0057] Step 105: Compare the similarity between the low-quality first image information and the target first image file. When the similarity is greater than or equal to the set threshold, add the low-quality first image information to the target first image file.
[0058] This application utilizes the correlation relationship between the first image and the second image, compares the similarity between the low-quality first image / second image and the effective first image / second image file with a correlation relationship, recalls the low-quality images that meet the requirements, and clusters them into the most matching file. At the same time, since the clustering of the files does not use low-quality images, the recall of low-quality images does not affect the centroid of the file (the reference image corresponding to the file, i.e., the representative image). This application uses high-quality images to pull low-quality images. Through this solution, the utilization rate of low-quality images can be effectively improved, the number of lost file trajectories can be reduced, the filing rate can be increased, which is very beneficial for improving the subsequent intelligent application effect.
[0059] Taking the first image as a human body image and the second image as a face image as an example for introduction:
[0060] This step 102 means that for the low-quality human body image, based on the determined correlation relationship between the face image information and the human body image information, obtain the target high-quality face image information that has a correlation with the low-quality human body image information.
[0061] Step 103 means determining the target face file where the target high-quality face image information is located.
[0062] Step 104 means that based on the pre-determined correlation relationship between the face file and the human body file, obtain the target human body file that has a correlation with the target face file.
[0063] Step 105 means comparing the similarity between the low-quality human body image information and the target human body file. When the similarity is greater than or equal to the set threshold, add the low-quality human body image information to the target human body file.
[0064] For example, there is an association relationship between a face image A and body images B, C, and D. The body image B is a low-quality image, while the face image A, body images C, and D are all high-quality images. Based on the association relationship between the face image and the body image, the high-quality face image A can be found through the low-quality body image B, and the bottom file where the high-quality face image A is located is the target face bottom file. Additionally, there is an association relationship between the body bottom file and the face bottom file of the same person. The corresponding target body bottom file can be found through the target face bottom file, and the similarity between the low-quality body image B and the target body bottom file is compared. When the similarity is greater than or equal to the set threshold, the information of the low-quality body image B is added to the target body bottom file.
[0065] Taking the first image as a face image and the second image as a body image as an example for introduction:
[0066] This step 102 means that for a low-quality face image, based on the determined association relationship between the face image information and the body image information, the target high-quality body image information associated with the low-quality face image information is obtained.
[0067] Step 103 means determining the target body bottom file where the target high-quality body image information is located.
[0068] Step 104 means obtaining the target face bottom file associated with the target body bottom file based on the pre-determined association relationship between the face bottom file and the body bottom file.
[0069] Step 105 means comparing the similarity between the low-quality face image information and the target face bottom file, and when the similarity is greater than or equal to the set threshold, adding the low-quality face image information to the target face bottom file.
[0070] For example, there is an association relationship between a face image A and body images B, C, and D. The face image A and the body image B are low-quality images, while the body images C and D are high-quality images. Based on the association relationship between the face image and the body image, the high-quality body images C and D can be found through the low-quality face image A, and the bottom files where the high-quality body images C and D are located are the target body bottom files. Additionally, there is an association relationship between the body bottom file and the face bottom file of the same person. The corresponding target face bottom file can be found through the target body bottom file. The similarity between the low-quality face image A and the target face bottom file is compared. When the similarity is greater than or equal to the set threshold, the low-quality face image A is added to the target face bottom file.
[0071] This application utilizes the correlation between a human face and a human body to compare the similarity between a low-quality face / human body and an effective face / human body profile with a correlation, recall low-quality images that meet the requirements, and cluster them into the most matching profile. At the same time, since the clustering of profiles does not use low-quality images, the recall of low-quality images does not affect the centroid of the profiles. This application pulls low-quality images with high-quality images. Through this solution, the utilization rate of low-quality images can be effectively improved, the number of lost file trajectories can be reduced, the filing rate can be increased, which is very beneficial for improving the subsequent intelligent application effect.
[0072] In an alternative example, when the first image is a face image and the second image is a human body image, before adding the low-quality first image information to the target first image profile, for the low-quality face image information, based on the determined correlation between the face image information and the human body image information, a target low-quality human body image associated with the low-quality face image can be obtained; the similarity between the target low-quality human body image and the target human body profile is compared, and it is determined that the similarity is greater than or equal to a set threshold.
[0073] For example, face image A is associated with human body images B, C, and D. Face image A and human body image B are low-quality images, and human body images C and D are high-quality images. It was previously introduced that the similarity between the low-quality face image A and the target face profile is compared. On this basis, the similarity between the low-quality human body image B and the target human body profile can also be compared. Only when both similarities are greater than or equal to the set threshold, the low-quality face image A is added to the face profile.
[0074] That is to say, for a low-quality face image, to determine whether the low-quality face image can be added to the face profile, not only the similarity between the low-quality face image and the face profile needs to be compared, but also the similarity between the low-quality human body image associated with the low-quality face image and the human body profile needs to be compared. Only when both similarities are greater than or equal to the similarity threshold, the low-quality face image can be added to the face profile. This can improve the recall accuracy of low-quality images to avoid adding low-quality face images that do not meet the requirements to the face profile.
[0075] In an alternative example, when the first image is a face image and the second image is a human body image, when the similarity between the target low-quality human body image and the target human body profile is greater than or equal to the set threshold, the low-quality human body image information is added to the target human body image profile.
[0076] For example, there is an association relationship between the face image A and the human body images B, C, and D. The face image A and the human body image B are low-quality images, and the human body images C and D are high-quality images. As introduced above, the low-quality human body image B is compared with the target human body profile for similarity. When the similarity is greater than or equal to the set threshold, the low-quality human body image B can be added to the target human body profile.
[0077] In an optional example, when the first image is a face image and the second image is a human body image, when comparing the low-quality face image information with the target face profile for similarity, if the similarity is less than or equal to the set threshold, the low-quality face image information may not be added to the target face profile. If the similarity between the target low-quality human body image and the target human body profile is greater than or equal to the set threshold, the low-quality human body image information can be added to the target human body image profile. That is to say, when the comparison similarity between the low-quality face image A and the face profile does not meet the requirements and the low-quality face image A is not added to the face profile, as long as the comparison similarity between the low-quality human body image B and the human body profile meets the requirements, the low-quality human body image B can also be added to the human body profile.
[0078] When comparing the similarity between the low-quality image and the target profile as introduced in this application, the low-quality image can be compared with the mean centroid and / or at least one recommended centroid of the target profile for similarity. For example, when comparing the low-quality first image information with the target first image profile for similarity, it includes: comparing the low-quality first image information with the mean centroid and / or at least one recommended centroid of the target first image profile for similarity.
[0079] The following introduces the process of determining the association relationship between the first image information and the second image information:
[0080] Extract a set of image information. Any set of image information includes one face image information and at least one human body image information, and mark an association identifier for the face image information and the human body image information. The association identifier is used to associate the face image information and the human body image information in the same set of image information.
[0081] For example, there is an association relationship between the face image A and the human body images B, C, and D. The association identifier is, for example, that the image information corresponding to the human body image B includes the identifier of the face image A, the image information corresponding to the human body image C includes the identifier of the face image A, and the image information corresponding to the human body image D includes the identifier of the face image A. The image information of the face image A also includes the identifier of the face image A.
[0082] Next, in combination with Figure 2Introduce the acquisition process of low-quality face images and low-quality human body images.
[0083] Step 201: Add a face-body association relationship field in the pre-parsing stage.
[0084] For example, various capture devices collect data, such as collecting picture, video, audio and other data. The picture data collected by the capture device can be used as the image to be adopted in this application. It is also possible to optimize video frames to obtain the image to be adopted in this application. The images to be adopted in this application include faces and / or human bodies. The extraction of face features (feature vectors of faces) and the extraction of human body features (feature vectors of human bodies) in the image are separated. There is an association relationship between the face and the human body belonging to the same person in this image, and the association relationship between the face and the human body can be stored. Subsequently, the recall rate of low-quality images can be improved by using the association relationship between the face and the human body.
[0085] It should be noted that the association relationship between the face image and the human body image in this application can be 1:1 or 1:N, where N is an integer greater than or equal to 1. For example, all 3 frames of images include: the face image and the human body image of Xiao Li. The face image in the second frame is the clearest. The face image extracted from the second frame and the human body images extracted from the 3 frames can be associated. In this case, the association relationship between the face image and the human body image is 1:3, and these 4 images can be determined as a group of images.
[0086] In this way, multiple groups of images can be extracted. These multiple groups of images can be of the same person, such as all of Xiao Li's; or they can be of multiple people, such as Xiao Li's and Xiao Wang's. It should be noted that a group of images belongs to the same person, and a person can have multiple groups of images.
[0087] After the parsing and recognition in step 201, the relevant information of the image can be pushed to the message queue. The relevant information of the image includes the feature vector of the image and the relevant information of the image. The relevant information has been introduced above and will not be repeated. In this application, an association field is set in the face image information and the human body image information with an association relationship. The association field includes an association identifier, and the face image and the human body image are related through the association identifier. For example, face image A has an association relationship with human body images B, C, and D. The association identifier is, for example, the identifier of face image A is included in the image information corresponding to human body image B, the identifier of face image A is included in the image information corresponding to human body image C, and the identifier of face image A is included in the image information corresponding to human body image D. The image information of face image A also includes the identifier of face image A.
[0088] Step 202: Divide the multiple images into first (e.g., low) quality images and second (e.g., high) quality images.
[0089] It should be noted that the first quality and the second quality mentioned in this application are used for the comparison of image quality, and the second quality is better than the first quality. "First" and "second" can also be replaced by other words that can represent image quality. For example, "first" can be replaced by "low" or "medium-low", and "second" can be replaced by "high" or "medium-high". For the convenience of understanding, the following takes the first quality as low quality and the second quality as high quality as an example for introduction.
[0090] This process can occur in the portrait clustering and fusion stage. After receiving the message in step 201, low-quality face images (i.e., face waste images) and low-quality body images (i.e., body waste images) can be filtered according to different strategies (such as adding judgments, models, etc.). Cluster the high-quality images. For example, face clustering is the process of grouping face pictures in a set according to identity. Body clustering is the process of grouping body pictures in a set according to identity.
[0091] For example, when distinguishing images of different qualities, the multiple images can be divided into low-quality images and high-quality images based on partial relevant information of the images and the thresholds corresponding to the partial relevant information. For example, based on partial relevant information of the images and the thresholds corresponding to the partial relevant information, the face image information is divided into high-quality face image information and low-quality face image information, and the body image information is divided into high-quality body image information and low-quality body image information; wherein, the partial relevant information includes one or more of the following: clarity, width, confidence.
[0092] Step 203: Screen the face waste images and body waste images with an associated relationship.
[0093] For the low-quality face image information (face waste images) and low-quality body image information (body waste images) filtered in step 202, check whether these low-quality image information includes an association identifier. If so (i.e., includes), retain it. If not (i.e., does not include), filter it out.
[0094] Optionally, step 204: Associate the waste face and body according to the associated relationship.
[0095] After the optimization in step 201, there will be a situation where one face image corresponds to N body images. In a group of information, it is possible that the face image is filtered into a waste image, or the body image is filtered into a waste image, or both are filtered into waste images. If all the images in a group of images are waste images, there is no need to perform subsequent similarity comparison operations. This application is directed to a group of pictures in which at least one image is a high-quality image.
[0096] In any set of images, when the face image is a waste image (i.e., a low-quality image) and the corresponding partial body image is a valid image (i.e., a high-quality image not regarded as a waste image), the face waste image and the body waste image can be associated with each other (here, the association can be understood as assembling the image information of the body waste image and the face waste image) for subsequent comparison with the valid face profile and body profile.
[0097] In any set of images, when the face image is a valid image and the body image is a waste image, the waste body can be associated with the valid face for subsequent comparison with the valid body profile.
[0098] As Figure 3 shown, the process of obtaining the valid face profile and the valid body profile is introduced.
[0099] Optionally, step 301: Obtain the face profile and the body profile within a preset time.
[0100] The profile is a set of archival data that has been continuously accumulated through clustering within a certain time range. An archive refers to the set generated by clustering, which identifies a set of virtual people.
[0101] For the face profile, the clustered archival data retained for 1 year, 6 months, or other time periods can be found first. For the body profile, the clustered archival data retained for 1 year, 6 months, or other time periods can be found first.
[0102] The subsequent step 302 and step 303 are both operated based on the acquisition results of step 301. It is also possible not to execute step 301 and directly execute step 302 and step 303.
[0103] Step 302: Obtain the valid face profile (i.e., the target face profile) and the valid body profile (i.e., the target body profile) in the case of a waste face (low-quality face image information) and a valid body (high-quality body image information).
[0104] Through the discarded face image (part or all of the body image corresponding to the discarded face image is valid), obtain the discarded body image and the valid body profile. The purpose is to cluster the valid body profile and the discarded body image information through the same face. It has been introduced before and will not be repeated here.
[0105] Through the discarded face image, obtain the valid face profile. The purpose is to cluster the valid face profile and the discarded face image information through the same face. It has been introduced before and will not be repeated here.
[0106] Step 303: Obtain the valid body profile in the case of a waste body and a valid face.
[0107] Through the valid face image, the valid human background file is obtained. The purpose is to cluster the valid human background file and the discarded human image information through the same face. This has been introduced in the previous article and will not be repeated.
[0108] The order of step 302 and step 303 is not limited.
[0109] like Figure 4 As shown, a process of adding low-quality images to an archive of high-quality images through similarity comparison is introduced.
[0110] Step 401: Compare the similarity between the waste face and the valid face background.
[0111] The cosine similarity comparison is performed on the mean centroid of the waste film face and the valid face background file, and at least one recommended centroid. The waste film that meets the minimum threshold is retained, and further judgment is made in step 403.
[0112] Step 402: Compare the waste human body with the valid human body background for similarity.
[0113] The mean centroids of the waste film human body and the valid human body background file and at least one recommended centroid are compared for cosine similarity, and the waste film that meets the minimum threshold is retained, and further judgment is made in step 403.
[0114] Step 403: Add the waste face and body films that meet the threshold to the corresponding base files.
[0115] For the cases of valid faces and waste bodies, it is possible to determine whether the weighted value of the similarity between the waste body and multiple centroids (such as mean centroid, recommended centroid) of the valid body background file meets the threshold. If so, the waste body is added to the corresponding valid body background file.
[0116] For the case of waste faces and valid bodies, we can first determine whether the weighted value of the similarity between the waste body and multiple centroids (such as mean centroids, recommended centroids) of the valid body background file meets the threshold. If so, determine whether the valid body background file has a relationship with other face background files. If so, compare the waste face with the valid face background file for similarity. If the weighted value of the similarity between the waste face and multiple centroids (such as mean centroids, recommended centroids) of the valid face background file meets the threshold, add the waste body to the corresponding valid body background file, and add the waste face to the corresponding valid face background file. Otherwise, only add the waste body to the corresponding valid body background file.
[0117] like Figure 5 As shown, an image processing device is provided, the device comprising:
[0118] An association module 501, configured to determine an association relationship between first image information and second image information;
[0119] An acquisition module 502, configured to, for low-quality first image information, based on the determined association relationship between the first image information and the second image information, acquire target high-quality second image information that has an association relationship with the low-quality first image information; determine a target second image file where the target high-quality second image information is located; based on a pre-determined association relationship between a first image file and a second image file, acquire a target first image file that has an association relationship with the target second image file;
[0120] A comparison module 503, configured to compare the similarity between the low-quality first image information and the target first image file, and add the low-quality first image information to the target first image file when the similarity is greater than or equal to a set threshold.
[0121] In one example, the first image is a face image and the second image is a human body image; or, the first image is a human body image and the second image is a face image; wherein, one face image information is associated with at least one human body image information, and one human body image information is associated with one face image information.
[0122] In one example, the acquisition module 502 is further configured to, for low-quality face image information, based on the determined association relationship between the face image information and the human body image information, acquire a target low-quality human body image that has an association relationship with the low-quality face image;
[0123] The comparison module 503 is further configured to compare the similarity between the target low-quality human body image and the target human body file, and add the low-quality face image information to the target face image file when it is determined that the similarity is greater than or equal to the set threshold.
[0124] In one example, the comparison module 503 is further configured to add the low-quality human body image information to the target human body image file when the similarity between the target low-quality human body image and the target human body file is greater than or equal to the set threshold.
[0125] In one example, the association module 501 is specifically configured to: extract a set of image information, where any set of image information includes one face image information and at least one human body image information; mark an association identifier for the face image information and the human body image information, and the association identifier is used to associate the face image information and the human body image information in the same set of image information.
[0126] In one example, the comparison module 503 is specifically configured to compare the similarity between the low-quality first image information and the mean centroid and / or at least one recommended centroid of the target first image base file.
[0127] As Figure 6 shown, the present application provides an image processing device, including a processor 601 and a memory 602;
[0128] The memory 602 is used to store computer programs or instructions;
[0129] The processor 601 is configured to execute some or all of the computer programs or instructions in the memory. When the some or all of the computer programs or instructions are executed, it is used to implement the image processing method introduced above.
[0130] For example, the processor 601 is configured to determine the association relationship between the first image information and the second image information; for the low-quality first image information, based on the determined association relationship between the first image information and the second image information, obtain the target high-quality second image information associated with the low-quality first image information; determine the target second image base file where the target high-quality second image information is located; based on the pre-determined association relationship between the first image base file and the second image base file, obtain the target first image base file associated with the target second image base file; compare the similarity between the low-quality first image information and the target first image base file, and when the similarity is greater than or equal to a set threshold, add the low-quality first image information to the target first image base file.
[0131] When the first image is a face image and the second image is a human body image, for example, before adding the low-quality first image information to the target first image base file, the processor 601 is further configured to, for the low-quality face image information, based on the determined association relationship between the face image information and the human body image information, obtain the target low-quality human body image associated with the low-quality face image; compare the similarity between the target low-quality human body image and the target human body base file, and determine that the similarity is greater than or equal to the set threshold.
[0132] The processor 601 is further configured to, when the similarity between the target low-quality human body image and the target human body base file is greater than or equal to the set threshold, add the low-quality human body image information to the target human body image base file.
[0133] The processor 601 is used to determine the association relationship between the first image information and the second image information, specifically for: extracting a set of image information, where any set of image information includes a face image information and at least one body image information; marking an association identifier for the face image information and the body image information, and the association identifier is used to associate the face image information and the body image information in the same set of image information.
[0134] The processor 601 is used to compare the similarity between the low-quality first image information and the target first image base file, specifically for: comparing the similarity between the low-quality first image information and the mean centroid and / or at least one recommended centroid of the target first image base file.
[0135] An embodiment of the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, it can cause the computer to execute the above-mentioned method for image processing. Or rather: the computer program includes instructions for implementing the above-mentioned method for image processing.
[0136] An embodiment of the present application also provides a computer program product, including: computer program code, and when the computer program code runs on a computer, it enables the computer to execute the above-provided method for image processing.
[0137] In addition, the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), a baseband processor, the baseband processor and the CPU may be integrated or separated, and may also be a network processor (NP) or a combination of the CPU and the NP. The processor may further include a hardware chip or other general-purpose processor. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) and other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. or any combination thereof. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0138] The memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM). It should be noted that the memory described in the present application is intended to include but not limited to these and any other suitable types of memory.
[0139] The transceiver mentioned in the embodiments of the present application may include a separate transmitter, and / or a separate receiver, or may be an integrated transmitter and receiver. The transceiver may operate under the instruction of the corresponding processor. Optionally, the transmitter may correspond to the transmitter in the physical device, and the receiver may correspond to the receiver in the physical device.
[0140] Those of ordinary skill in the art can realize that, in combination with the method steps and units described in the embodiments disclosed herein, they can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the steps and components of the embodiments have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0141] In several embodiments provided by 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 merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices, or units, and can also be in the form of electrical, mechanical, or other connections.
[0142] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
[0143] In addition, the functional units in each embodiment of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0144] If the above-mentioned 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, in essence, 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. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0145] The "and / or" in this application describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The plurality involved in this application means two or more. In addition, it should be understood that in the description of this application, terms such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0146] Although the preferred embodiments of this application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of this application.
[0147] Obviously, those skilled in the art can make various changes and modifications to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Thus, if these modifications and variations of the embodiments of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications.
Claims
1. An image processing method, characterized in that, The method includes: Determining the association relationship between the first image information and the second image information; For the low-quality first image information, based on the determined association relationship between the first image information and the second image information, obtaining the target high-quality second image information associated with the low-quality first image information; Determining the target second image base file where the target high-quality second image information is located; Based on the pre-determined association relationship between the first image base file and the second image base file, obtaining the target first image base file associated with the target second image base file; Comparing the similarity between the low-quality first image information and the target first image base file, and when the similarity is greater than or equal to the set threshold, adding the low-quality first image information to the target first image base file; When the first image is a face image and the second image is a human body image, before adding the low-quality first image information to the target first image base file, it further includes: For the low-quality face image information, based on the determined association relationship between the face image information and the human body image information, obtaining the target low-quality human body image associated with the low-quality face image; Comparing the similarity between the target low-quality human body image and the target human body base file, and determining that the similarity is greater than or equal to the set threshold, where the target human body base file is the human body base file where the target high-quality human body image information is located, and the target high-quality human body image information is the high-quality human body image information associated with the low-quality face image information based on the determined association relationship between the face image information and the human body image information.
2. The method according to claim 1, wherein The first image is a face image and the second image is a human body image; or, the first image is a human body image and the second image is a face image; wherein, one face image information is associated with at least one human body image information, and one human body image information is associated with one face image information.
3. The method according to claim 1, characterized in that, It further includes: When the similarity between the target low-quality human body image and the target human body base file is greater than or equal to the set threshold, adding the low-quality human body image information to the target human body base file.
4. The method according to claim 1, wherein Determining the association relationship between the first image information and the second image information includes: Extracting a set of image information, and any set of image information includes one face image information and at least one human body image information; Marking an association identifier for the face image information and the human body image information, and the association identifier is used to associate the face image information and the human body image information in the same set of image information.
5. The method according to claim 1, wherein Comparing the similarity between the low-quality first image information and the target first image base file includes: Comparing the similarity between the low-quality first image information and the mean centroid and / or at least one recommended centroid of the target first image base file.
6. An image processing apparatus, characterized in that, The device includes: An association module, configured to determine the association relationship between the first image information and the second image information; An acquisition module, configured to, for low-quality first image information, based on the determined association relationship between the first image information and the second image information, acquire target high-quality second image information that has an association relationship with the low-quality first image information; determine the target second image file where the target high-quality second image information is located; based on the pre-determined association relationship between the first image file and the second image file, acquire a target first image file that has an association relationship with the target second image file; A comparison module, configured to compare the similarity between the low-quality first image information and the target first image file, and in the case where the similarity is greater than or equal to a set threshold, add the low-quality first image information to the target first image file; The acquisition module is further configured to, for low-quality face image information, based on the determined association relationship between the face image information and the human body image information, acquire a target low-quality human body image that has an association relationship with the low-quality face image; The comparison module is further configured to compare the similarity between the target low-quality human body image and the target human body file, and in the case where the similarity is greater than or equal to the set threshold, add the low-quality face image information to the target face file, where the target human body file is the human body file where the target high-quality human body image information is located, where the target high-quality human body image information is high-quality human body image information that has an association with the low-quality face image based on the determined association relationship between the face image information and the human body image information; where the target face file is the face file where the target high-quality face image information is located, where the target high-quality face image information is target high-quality face image information that has an association with the low-quality human body image information based on the determined association relationship between the face image information and the human body image information.
7. The device according to claim 6, characterized in that, The first image is a face image and the second image is a human body image; or, the first image is a human body image and the second image is a face image; where one face image information is associated with at least one human body image information, and one human body image information is associated with one face image information.
8. The device according to claim 6, characterized in that, The comparison module is further configured to, in the case where the similarity between the target low-quality human body image and the target human body file is greater than or equal to the set threshold, add the low-quality human body image information to the target human body file.
9. The device according to claim 6, characterized in that, The association module is specifically configured to: extract a set of image information, where any set of image information includes one face image information and at least one human body image information; mark an association identifier for the face image information and the human body image information, and the association identifier is used to associate the face image information and the human body image information in the same set of image information.
10. The device according to claim 6, wherein The comparison module is specifically configured to compare the similarity between the low-quality first image information and the mean centroid and / or at least one recommended centroid of the target first image file.
11. An image processing apparatus, characterized in that, It includes a processor and a memory; The memory is used to store computer programs or instructions; The processor is configured to execute some or all of the computer programs or instructions in the memory, and when the some or all of the computer programs or instructions are executed, to implement the method according to any one of claims 1-5.
12. A computer-readable storage medium, characterized in that, For storing a computer program, the computer program including instructions for implementing the method according to any one of claims 1-5.
13. A computer program product, characterized in that, The computer program product includes: computer program code, which when run on a computer, causes the computer to execute the method according to any one of claims 1-5.
Citation Information
Patent Citations
Face feature extracting method based on survival exponential entropy
CN102147862A
Image synthesis display device, image synthesis display method and photographing device
CN102790852A