An image processing method and related device based on image filing
By obtaining the brightness and chromaticity information of the monitoring image, adaptively determine the gathering threshold, solving the problems of low recall and high error rate of pedestrian images in the monitoring scene, achieving more efficient gathering of images.
Patent Information
- Application Number
- CN202110977263.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-24
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2041-08-24
AI Technical Summary
In monitoring scenarios, due to the complex environment and large lighting changes, it is difficult for the existing technology to effectively collect pedestrian images, resulting in low recall and high error rates.
By obtaining the brightness information and chromaticity information of the target image area, weighted fusion is combined with saturation and contrast, the trench threshold is adaptively determined for image trench.
It improves the recall rate of image gathering, reduces the error rate, enhances the robustness of image gathering, and can effectively deal with interference from complex environments.
Smart Images

Figure CN113868457B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to an image processing method and related device based on image clustering. Background Art
[0002] Person re-identification is widely used in surveillance, which can assist public security criminal investigation in solving cases and finding missing persons. When performing image clustering, based on a pre-set similarity threshold, if it is higher than this threshold, they are clustered into the same file, and if it is lower than this threshold, they cannot be clustered into the same file. However, in the surveillance scenario, the environment is complex, the light changes greatly, the camera resolution is low, and the pedestrian images under different cameras often vary greatly, such as the different human body resolutions and large changes in light, etc., which bring great challenges to human body clustering and result in the inability to distinguish pedestrians well. Summary of the Invention
[0003] The main technical problem to be solved by the present invention is to provide an image processing method and related device based on image clustering, which can adaptively determine the clustering threshold and improve the clustering recall rate.
[0004] To solve the above technical problem, a technical solution adopted by the present invention is: to provide an image threshold generation method based on image clustering, and the image processing method based on image clustering includes: obtaining a to-be-clustered image including a target image area; obtaining the brightness information and chromaticity information of the target image area; combining the brightness information and chromaticity information of the target image area to determine the clustering threshold of the to-be-clustered image; wherein, the clustering threshold is used to perform image clustering on the to-be-clustered image.
[0005] Wherein, combining the brightness information and chromaticity information of the target image area to determine the clustering threshold of the to-be-clustered image includes: obtaining the saturation and contrast of the target image area; performing weighted fusion on the saturation and contrast of the target image area to obtain a threshold parameter; using the functional relationship between the threshold parameter and the clustering threshold to obtain the clustering threshold.
[0006] Wherein, combining the brightness information and chromaticity information of the target image area to determine the clustering threshold of the to-be-clustered image includes: obtaining the brightness value of the to-be-clustered image, and obtaining at least one of the saturation and contrast of the target image area as reference information; performing weighted fusion on the brightness value of the to-be-clustered image and the reference information to obtain a threshold parameter; using the functional relationship between the threshold parameter and the clustering threshold to obtain the clustering threshold.
[0007] Among them, obtaining the saturation of the target image region includes: obtaining the pixel saturation of each pixel point in the target image region; adding up the pixel saturations to obtain the saturation of the target image region; the pixel saturation is the sum of the weighted result of the three-channel pixel values of each pixel point in the target image region and 128, where the weight of the R-channel pixel value is 0.5, the weight of the G-channel pixel value is -0.4187, and the weight of the B-channel pixel value is -0.0813.
[0008] Among them, obtaining the contrast of the target image region includes: obtaining the pixel contrast of each pixel point in the target image region; adding up the pixel contrasts to obtain the contrast of the target image region; the pixel contrast is the sum of the squares of the differences between the pixel gray values of each pixel point in the target image region and the pixel gray values of the adjacent pixel points of the pixel points.
[0009] Among them, calculating the brightness value of the image to be grouped includes: obtaining the pixel brightness value of each pixel point in the image to be grouped; adding up the pixel brightness values to obtain the brightness value of the image to be grouped; the pixel brightness value is the weighted result of the three-channel pixel values of each pixel point in the image to be grouped, where the weight of the R-channel pixel value is 0.299, the weight of the G-channel pixel value is 0.587, and the weight of the B-channel pixel value is 0.114.
[0010] Among them, after determining the grouping threshold of the image to be grouped by combining the brightness information and chromaticity information of the target image region, it further includes: determining the image similarity between the image to be grouped and each archived image; based on the determined image similarities and the grouping threshold, performing image grouping on the image to be grouped.
[0011] Among them, determining the image similarity between the image to be grouped and each archived image includes: determining the first eigenvalue of the image to be grouped and the second eigenvalues of each archived image; based on the similarity between the first eigenvalue and each second eigenvalue, determining each image similarity; based on the determined image similarities and the grouping threshold, performing image grouping on the image to be grouped includes: determining the maximum value among the image similarities; in response to the maximum value being greater than the grouping threshold, grouping the image to be grouped and the archived image corresponding to the maximum value into one category.
[0012] To solve the above technical problems, another technical solution adopted by the present invention is: providing an image processing device based on image grouping, and the image processing device based on image grouping includes a processor, and the processor is used to execute to implement the above-mentioned image processing method based on image grouping.
[0013] To solve the above technical problems, another technical solution adopted by the present invention is: providing a computer-readable storage medium, and the computer-readable storage medium is used to store instructions / program data, and the instructions / program data can be executed to implement the above-mentioned image processing method based on image grouping.
[0014] The beneficial effects of the present invention are as follows: Different from the prior art, the present invention determines a clustering threshold for each image to be clustered by using the luminance information and chrominance information of the image to be clustered, especially the luminance information and chrominance information of the target image region, so as to perform image clustering on the image to be clustered. This method can adaptively adjust the generated clustering threshold instead of setting it in advance, which can effectively cope with complex environmental interference, improve the clustering recall rate, and reduce the error rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a schematic flowchart of an image processing method based on image clustering in an embodiment of the present application;
[0016] Figure 2 is a schematic flowchart of a method for obtaining a clustering threshold in an embodiment of the present application;
[0017] Figure 3 is a schematic flowchart of another method for obtaining a clustering threshold in an embodiment of the present application;
[0018] Figure 4 is a schematic flowchart of yet another method for obtaining a clustering threshold in an embodiment of the present application;
[0019] Figure 5 is a schematic flowchart of another image processing method based on image clustering in an embodiment of the present application;
[0020] Figure 6 is a schematic structural diagram of an image processing device based on image clustering in an embodiment of the present application;
[0021] Figure 7 is a schematic structural diagram of an image processing device based on image clustering in an embodiment of the present application;
[0022] Figure 8 is a schematic structural diagram of a computer-readable storage medium in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] To make the objectives, technical solutions and effects of the present invention clearer and more definite, the following further describes the present invention in detail with reference to the accompanying drawings and by way of examples.
[0024] The present application provides an image processing method based on image clustering. By using the luminance information and chrominance information of the image to be clustered, especially the luminance information and chrominance information of the target image region, a clustering threshold is determined for each image to be clustered, so as to perform image clustering on the image to be clustered. This method can adaptively adjust the generated clustering threshold instead of setting it in advance, which can effectively cope with complex environmental interference, improve the clustering recall rate, and reduce the error rate.
[0025] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an image processing method based on image archiving in an embodiment of the present application. It should be noted that if there are substantially the same results, this embodiment is not limited to Figure 1 the process sequence shown Figure 1 . As shown
[0026] S110: Obtain the image to be archived including the target image area.
[0027] In the embodiment of the present application, an image can be obtained by using a monitoring video captured by a monitoring camera, or an image can be obtained locally. When obtaining an image by using a monitoring video captured by a monitoring camera, first obtain the monitoring video captured by the monitoring camera, and perform frame extraction on the video to obtain the image to be archived.
[0028] By obtaining the image to be archived through the above method, the target image area is a small image in the image to be archived that contains the target area to be archived. When performing specific image similarity comparison, the target image area is used. In an application scenario, it can be applied to human body recognition, and the small image of the target area to be archived can be an area with a human body image.
[0029] S130: Obtain the brightness information and chromaticity information of the target image area.
[0030] During the image processing process, the main information of the image includes brightness information, chromaticity information, etc. The image brightness information is used to represent the brightness degree of the image, and the image chromaticity information is used to represent the color information of the image. By extracting the brightness information and chromaticity information from the target image area, the characteristics of the target image area can be understood.
[0031] S150: Combine the brightness information and chromaticity information of the target image area to determine the archiving threshold of the image to be archived.
[0032] In the embodiment of the present application, different images to be archived may have different archiving thresholds, and the archiving threshold of the image to be archived can be directly determined by using the brightness information and chromaticity information of the target image area, or the brightness information and chromaticity information can be calculated first to obtain more in-depth relevant information of the target image area, and then the archiving threshold of the image to be archived can be further determined. Among them, the archiving threshold is used to archive the image to be archived. By combining the actual image information of the image to be archived and setting different archiving thresholds according to the specific shooting environment, the influence of factors such as the environment on the image can be reduced.
[0033] In an embodiment of the present application, obtaining the luminance information and chrominance information of the target image region may specifically be obtaining the basic information related to luminance and chrominance of the target image region, such as contrast, saturation, etc. At the same time, on the basis of obtaining the basic information related to luminance and chrominance of the target image region, the basic information of the image to be grouped can be further obtained to facilitate the determination of the subsequent grouping threshold.
[0034] In one embodiment, only the saturation and contrast of the target image region are obtained. Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a method for obtaining a grouping threshold in an embodiment of the present application. It should be noted that if there are substantially the same results, this embodiment is not limited to Figure 2 the process sequence shown. As Figure 2 shown, this embodiment includes:
[0035] S210: Obtain the image to be grouped including the target image region.
[0036] S230: Obtain the saturation and contrast of the target image region.
[0037] The saturation of the target image region is the sum of the saturations of each pixel point in the image. The target image region has w1×h1 pixel points, where w1 represents the width of the target image region and h1 represents the height of the target image region. First, obtain the pixel saturation of each pixel point in the target image region. The pixel saturation is the sum of the weighted result of the three-channel pixel values of the corresponding pixel point in the target image region and 128. R, G, and B respectively represent the pixel values of the three channels of the image. Among them, the weight of the R-channel pixel value is 0.5, the weight of the G-channel pixel value is -0.4187, and the weight of the B-channel pixel value is -0.0813. That is: pixel saturation = 0.5×R - 0.4187×G - 0.0813×B + 128. Add the pixel saturations to obtain the saturation of the target image region. The specific calculation method is as follows:
[0038]
[0039] Among them, f1(x) represents the saturation of the target image region, and i and j represent the pixel point at the i-th column and j-th row in the target image region.
[0040] Similarly, the contrast of the target image region is the sum of the contrasts of each pixel point in the image. First, obtain the pixel grayscale values of each pixel point in the target image region and the pixel grayscale values of the adjacent pixel points of the pixel point. The adjacent pixel points are at least one pixel point adjacent to the current pixel point position. In one embodiment, the adjacent pixel points are the four pixel points in the left, right, upper, and lower positions of the current pixel point. In another embodiment, the adjacent pixel points are the eight pixel points in the left, right, upper, lower, upper left, lower left, upper right, and lower right positions of the current pixel point. The pixel contrast is the sum of the squares of the differences between the pixel grayscale value of the corresponding pixel point in the target image region and the pixel grayscale values of the adjacent pixel points of the pixel point. Add up the pixel contrasts to obtain the contrast of the target image region. The specific calculation method is as follows:
[0041]
[0042] Among them, f2(x) represents the contrast of the target image region, i, j represent the pixel point at the i-th column and the j-th row in the target image region. N(i,j) represents the pixel points adjacent to the pixel point at the i-th column and the j-th row.
[0043] S250: Perform weighted fusion on the saturation and contrast of the target image region to obtain a threshold parameter.
[0044] According to the actual image situation of the target image region, assign fusion weights to the saturation and contrast of the target image region. In one specific embodiment, the sum of the two fusion weights is one. Use the fusion weights to perform weighted fusion on the saturation and contrast of the target image region to obtain a threshold parameter. The specific calculation method is as follows:
[0045] t = w1×f1(x) + w2×f2(x),
[0046] Among them, t is the threshold parameter, w1 is the fusion weight of the saturation of the target image region, and w2 is the fusion weight of the contrast of the target image region. Among them, both w1 and w2 are greater than zero. In one specific embodiment, w1 + w2 = 1.
[0047] S270: Use the functional relationship between the threshold parameter and the clustering threshold to obtain the clustering threshold.
[0048] Establish a functional relationship between the threshold parameter and the clustering threshold so that the clustering threshold can be obtained using the threshold parameter to cluster the image to be clustered. Specifically, this functional relationship can be a mapping function. The specific calculation method is as follows:
[0049] T(x) = f(t) = f(w1×f1(x) + w2×f2(x)),
[0050] Among them, f represents the mapping function of the clustering threshold, and T(x) represents the clustering threshold between the image to be clustered and the archival image.
[0051] In this embodiment, by using the saturation and contrast of the target image region, a clustering threshold is determined for each image to be clustered, and image clustering is performed by comparing the similarity with the clustering threshold. This method can automatically generate the clustering threshold without prior setting, effectively cope with complex environmental interference, improve the clustering recall rate, and reduce the error rate.
[0052] In the embodiments of the present application, at least one of the saturation and contrast of the target image region can be obtained as reference information, and while obtaining the reference information of the target image region, the brightness information of the image to be clustered is obtained. In one embodiment, one piece of information of the target image region is obtained as reference information. Please refer to Figure 3 , Figure 3 is a schematic flowchart of another method for obtaining the clustering threshold in the embodiments of the present application. It should be noted that if there are substantially the same results, this embodiment is not limited to Figure 3 the process sequence shown. As Figure 3 shown, this embodiment includes:
[0053] S310: Obtain the image to be clustered including the target image region.
[0054] S330: Obtain the brightness value of the image to be clustered.
[0055] The brightness value of the image to be clustered is the sum of the brightness values of each pixel point in the image. The image to be clustered has w2×h2 pixel points, where w2 represents the width of the image to be clustered and h2 represents the height of the image to be clustered. First, obtain the pixel brightness value of each pixel point in the image to be clustered. The pixel brightness value is the weighted result of the three-channel pixel values of the corresponding pixel point in the image to be clustered. R, G, and B respectively represent the pixel values of the three channels of the image. Among them, the weight of the R-channel pixel value is 0.299, the weight of the G-channel pixel value is 0.587, and the weight of the B-channel pixel value is 0.114. That is: pixel saturation = 0.299×R + 0.587×G + 0.114×B. Add up the pixel brightness values to obtain the brightness value of the image to be clustered. The specific calculation method is as follows:
[0056]
[0057] Among them, f2(y) represents the brightness value of the image to be clustered, and i and j represent the pixel point at the i-th column and the j-th row in the image to be clustered.
[0058] S350: Obtain the saturation or contrast of the target image region as reference information.
[0059] Obtain the saturation or contrast of the target image area using the same method as above.
[0060] S370: Perform weighted fusion on the brightness value of the image to be grouped and the reference information of the target image area to obtain a threshold parameter.
[0061] In one embodiment, obtain the brightness value of the image to be grouped and the saturation of the target image area respectively. According to the actual image situation of the target image area, assign fusion weights to the brightness value of the image to be grouped and the saturation of the target image area. In a specific embodiment, the sum of the two fusion weights is one. Use the fusion weights to perform weighted fusion on the brightness value of the image to be grouped and the saturation of the target image area to obtain a threshold parameter. The specific calculation method is as follows:
[0062] t = w1 × f1(x) + w3 × f3(y),
[0063] where t is the threshold parameter, w1 is the fusion weight of the saturation of the target image area, and w3 is the fusion weight of the brightness value of the image to be grouped. Among them, both w1 and w3 are greater than zero. In a specific embodiment, w1 + w3 = 1.
[0064] In another embodiment, obtain the brightness value of the image to be grouped and the contrast of the target image area respectively. According to the actual image situation of the target image area, assign fusion weights to the brightness value of the image to be grouped and the contrast of the target image area. In a specific embodiment, the sum of the two fusion weights is one. Use the fusion weights to perform weighted fusion on the brightness value of the image to be grouped and the contrast of the target image area to obtain a threshold parameter. The specific calculation method is as follows:
[0065] t = w2 × f2(x) + w3 × f3(y),
[0066] where t is the threshold parameter, w2 is the fusion weight of the contrast of the target image area, and w3 is the fusion weight of the brightness value of the image to be grouped. Among them, both w2 and w3 are greater than zero. In a specific embodiment, w2 + w3 = 1.
[0067] S390: Use the functional relationship between the threshold parameter and the grouping threshold to obtain the grouping threshold.
[0068] Establish a functional relationship between the threshold parameter and the grouping threshold so that the grouping threshold can be obtained using the threshold parameter to group the image to be grouped. Specifically, this functional relationship can be a mapping function, and the specific calculation method is as follows:
[0069] T(x) = f(t) = f(w2 × f2(x) + w3 × f3(y)),
[0070] Among them, f represents the mapping function of the clustering threshold, and T(x) represents the clustering threshold of the image to be clustered and the archived image.
[0071] In this embodiment, by using the brightness value of the image to be clustered and the saturation or contrast of the target image area, a clustering threshold is determined for each image to be clustered, and image clustering is performed according to the comparison between the similarity and the clustering threshold. This method can automatically generate the clustering threshold without prior setting, can effectively cope with complex environmental interference, improve the clustering recall rate, and reduce the error rate. At the same time, by combining the dual information of the image to be clustered and the target image area to generate the clustering threshold, the robustness of image clustering is further increased.
[0072] In another embodiment, both the saturation and contrast of the target image area are obtained as reference information. Please refer to Figure 4 , Figure 4 is a schematic flowchart of another method for obtaining the clustering threshold in the embodiments of the present application. It should be noted that if there are substantially the same results, this embodiment is not limited to the Figure 4 shown process sequence. As Figure 4 shown, this embodiment includes:
[0073] S410: Obtain the image to be clustered including the target image area.
[0074] S430: Obtain the brightness value of the image to be clustered.
[0075] The brightness value of the image to be clustered is obtained by using the same method as the above method.
[0076] S450: Obtain the saturation and contrast of the target image area as reference information.
[0077] The saturation and contrast of the target image area are obtained by using the same method as the above method.
[0078] S470: Perform weighted fusion on the brightness value of the image to be clustered and the reference information of the target image area to obtain a threshold parameter.
[0079] The brightness value of the image to be clustered and the saturation and contrast of the target image area are obtained respectively. According to the actual image situation of the target image area, fusion weights are assigned to the brightness value of the image to be clustered and the saturation and contrast of the target image area. In a specific embodiment, the sum of the two fusion weights is one. The brightness value of the image to be clustered and the saturation and contrast of the target image area are weighted and fused by using the fusion weights to obtain a threshold parameter. The specific calculation method is as follows:
[0080] t = w1×f1(x) + w2×f2(x) + w3×f3(y),
[0081] Among them, t is the threshold parameter, w1 is the fusion weight of the saturation of the target image region, w2 is the fusion weight of the contrast of the target image region, and w3 is the fusion weight of the brightness value of the image to be archived. Among them, w1, w2, and w3 are all greater than zero. In a specific embodiment, w1 + w2 + w3 = 1.
[0082] S490: Obtain the archiving threshold by using the functional relationship between the threshold parameter and the archiving threshold.
[0083] Establish a functional relationship between the threshold parameter and the archiving threshold, so that the archiving threshold can be obtained by using the threshold parameter, and the image to be archived can be archived by using the archiving threshold. Specifically, this functional relationship can be a mapping function, and the specific calculation method is as follows:
[0084] T(x) = f(t) = f(w1 × f1(x) + w2 × f2(x) + w3 × f3(y)),
[0085] Among them, f represents the mapping function of the archiving threshold, and T(x) represents the archiving threshold of the image to be archived and the archived image.
[0086] In this embodiment, by using the brightness value of the image to be archived and the saturation and contrast of the target image region, an archiving threshold is determined for each image to be archived, and image archiving is performed according to the comparison between the similarity and the archiving threshold. This method can automatically generate the archiving threshold without prior setting, can effectively cope with complex environmental interference, improve the archiving recall rate, and reduce the error rate. At the same time, by combining the dual information of the image to be archived and the target image region to generate the archiving threshold, the robustness of image archiving is further increased.
[0087] Please refer to Figure 5 , Figure 5 which is a schematic flowchart of another image processing method based on image archiving in the embodiments of the present application. It should be noted that if there are substantially the same results, this embodiment is not limited to the Figure 5 shown process sequence. As Figure 5 shown, this embodiment includes:
[0088] S510: Obtain the image to be archived including the target image region.
[0089] S520: Obtain the brightness value of the image to be archived, and obtain the saturation and contrast of the target image region.
[0090] S530: Determine the archiving threshold of the image to be archived by combining the brightness value of the image to be archived and the saturation and contrast of the target image region.
[0091] S540: Obtain the feature values of the image to be archived and the archived image.
[0092] When performing image filing, first obtain the feature values of the image to be filed and the archival images. Among them, the archival images are the images stored in the archive library and have clear identity information. Calculate the feature values of the image to be filed and the feature values of each archival image respectively, and determine the first feature value of the image to be filed and the second feature values of each archival image.
[0093] S550: Obtain the maximum value of the similarity between the feature value of the image to be filed and the feature value of the archival image.
[0094] Based on the similarity between the first feature value and each of the second feature values, determine the image similarity between the image to be filed and each image, and determine the maximum value from each image similarity.
[0095] S560: In response to the maximum value being greater than the filing threshold, file the image to be filed and the archival image corresponding to the maximum value into one category.
[0096] Compare the filing threshold with the maximum value. In response to the maximum value being greater than the filing threshold, file the image to be filed and the archival image corresponding to the maximum value into one category.
[0097] Please refer to Figure 6 , Figure 6 FIG. is a schematic structural diagram of an image processing device based on image filing in an embodiment of the present application. In this embodiment, the image processing device based on image filing includes a first acquisition module 61, a second acquisition module 62, and a filing module 63.
[0098] Among them, the first acquisition module 61 is used to acquire the image to be filed including the target image area; the second acquisition module 62 is used to acquire the brightness information and chromaticity information of the target image area; the filing module 63 is used to combine the brightness information and chromaticity information of the target image area to determine the filing threshold of the image to be filed. The image processing device based on image filing is used to determine a filing threshold for each image to be filed by using the brightness information and chromaticity information of the image to be filed, so as to perform image filing on the image to be filed. This method can automatically generate the filing threshold without prior setting, can effectively cope with complex environmental interference, improve the filing recall rate, and reduce the error rate.
[0099] Please refer to Figure 7 , Figure 7 FIG. is a schematic structural diagram of an image processing device based on image filing in an embodiment of the present application. In this embodiment, the image processing device 71 based on image filing includes a processor 72.
[0100] The processor 72 may also be referred to as a CPU (Central Processing Unit). The processor 72 may be an integrated circuit chip with the ability to process signals. The processor 72 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor 72 may also be any conventional processor, etc.
[0101] The image processing device 71 based on image filing may further include a memory (not shown in the figure) for storing instructions and data required for the operation of the processor 72.
[0102] The processor 72 is used to execute instructions to implement the method provided by any embodiment and any non-conflicting combination of the above-described image processing method based on image filing of the present application.
[0103] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of a computer-readable storage medium in an embodiment of the present application. The computer-readable storage medium 81 of the embodiment of the present application stores instructions / program data 82, and when the instructions / program data 82 are executed, the method provided by any embodiment and any non-conflicting combination of the image processing method based on image filing of the present application is implemented. Among them, the instructions / program data 82 may form a program file and be stored in the above storage medium 81 in the form of a software product, so that a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor can execute all or part of the steps of the methods of various embodiments of the present application. The foregoing storage medium 81 includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes, or a computer, a server, a mobile phone, a tablet, or other terminal devices.
[0104] 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 units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other may be through some interfaces, and the indirect couplings or communication connections of devices or units may be in electrical, mechanical, or other forms.
[0105] In addition, each functional unit in various embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, 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 a software functional unit.
[0106] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. An image processing method based on image filing, characterized in that The method includes: Obtaining an image to be grouped that includes a target image area; Obtaining the brightness information and chromaticity information of the target image area; Combining the brightness information and chromaticity information of the target image area to determine a grouping threshold for the image to be grouped; wherein, the grouping threshold is used to perform image grouping on the image to be grouped; The combining the brightness information and chromaticity information of the target image area to determine the grouping threshold for the image to be grouped includes: Obtaining the saturation and contrast of the target image area; Performing weighted fusion on the saturation and contrast of the target image area to obtain a threshold parameter; Using the functional relationship between the threshold parameter and the grouping threshold to obtain the grouping threshold.
2. The image processing method based on image archiving according to claim 1, wherein The combining the brightness information and chromaticity information of the target image area to determine the grouping threshold for the image to be grouped includes: Obtaining the brightness value of the image to be grouped, and obtaining at least one of the saturation and contrast of the target image area as reference information; Performing weighted fusion on the brightness value of the image to be grouped and the reference information to obtain a threshold parameter; Using the functional relationship between the threshold parameter and the grouping threshold to obtain the grouping threshold.
3. The image processing method based on image filing according to claim 1, wherein The obtaining the saturation of the target image area includes: Obtaining the pixel saturation of each pixel point in the target image area; Adding up the pixel saturations to obtain the saturation of the target image area; The pixel saturation is the sum of the weighted result of the three-channel pixel values of each pixel point in the target image area and 128, wherein the weight of the R-channel pixel value is 0.5, the weight of the G-channel pixel value is -0.4187, and the weight of the B-channel pixel value is -0.0813.
4. The image processing method based on image filing according to claim 1, wherein The obtaining the contrast of the target image area includes: Obtaining the pixel contrast of each pixel point in the target image area; Adding up the pixel contrasts to obtain the contrast of the target image area; The pixel contrast is the sum of the squares of the differences between the pixel gray values of each pixel point in the target image area and the pixel gray values of the adjacent pixel points of each pixel point.
5. The image processing method based on image filing according to claim 2, wherein, The obtaining the brightness value of the image to be grouped includes: Obtaining the pixel brightness value of each pixel point in the image to be grouped; Adding up the pixel brightness values to obtain the brightness value of the image to be grouped; The pixel brightness value is the weighted result of the three-channel pixel values of each pixel point in the image to be grouped, wherein the weight of the R-channel pixel value is 0.299, the weight of the G-channel pixel value is 0.587, and the weight of the B-channel pixel value is 0.
114.
6. The image processing method based on image filing according to claim 1, characterized in that After combining the brightness information and chromaticity information of the target image area to determine the grouping threshold for the image to be grouped, it further includes: Determining the image similarity between the image to be grouped and each archival image; Based on the determined image similarities and the grouping threshold, performing image grouping on the image to be grouped.
7. The image processing method based on image filing according to claim 6, wherein The determining the image similarity between the image to be grouped and each archival image includes: Determining a first eigenvalue of the image to be grouped and second eigenvalues of each archival image; Determine the respective image similarities based on the similarity between the first eigenvalue and each of the second eigenvalues; The image clustering of the images to be clustered based on the determined respective image similarities and the clustering threshold includes: Determine the maximum value among the respective image similarities; In response to the maximum value being greater than the clustering threshold, cluster the images to be clustered and the archive image corresponding to the maximum value into one category.
8. An image processing device based on image filing, characterized in that, Includes a processor, and the processor is configured to execute instructions to implement the image processing method based on image clustering according to any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store instructions / program data, and the instructions / program data can be executed to implement the image processing method based on image clustering according to any one of claims 1-7.
Citation Information
Patent Citations
Image processing method and image processing apparatus
CN103544684A
Picture processing method, picture processing device, and terminal device
CN108898587A