A low-quality image retrieval method
By performing Fourier transform and enhancement processing on low-quality image databases, high-frequency and enhanced features are extracted, similarity measurement is measured in combination with the reference feature library, and weight dynamically adjusting, the inaccurate feature description and static weight in low-quality image retrieval are solved. The problem of image matching accuracy and retrieval accuracy are improved.
Patent Information
- Application Number
- CN202411138975.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-19
AI Technical Summary
The low-quality image retrieval methods in the prior art have problems with inaccurate feature description and static feature weights, resulting in a decrease in recognition accuracy.
By performing Fourier transformation and enhancement processing on the original low-quality image database, a high-frequency image database and an enhanced image database are established, the high-frequency and enhanced features of the images to be retrieved are extracted, and similarity measurement calculations are performed in combination with the reference feature library, and the characteristics are dynamically adjusted. Weights to optimize search results.
The image matching accuracy and description accuracy are improved, the search accuracy is optimized, and the single feature weight is dynamically updated with the image to be retrieved through adaptive weights, which improves the objectivity and accuracy of the search results.
Smart Images

Figure CN118656512B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image retrieval, and in particular to a low-quality image retrieval method. Background Art
[0002] In the related art, CN113157962A relates to an image retrieval method, an electronic device and a storage medium, which obtains feature points of an image to be retrieved and multiple images to be matched and the categories to which the feature points belong; performs feature matching on the feature points of the image to be matched and the feature points of the image to be retrieved in each category to obtain matching feature point pairs; determines the number of matching feature point pairs of each image to be matched and the image to be retrieved; determines the image to be matched with the largest number of matching feature point pairs as the retrieval result of the image to be retrieved, thereby solving the problem of low image retrieval quality in the related art and improving the quality of image retrieval.
[0003] CN105005565A discloses a method for retrieving shoe sole trace pattern images on site, the method comprising: processing the shoe sole trace pattern images collected on site to obtain a binary image, extracting the spectrum characteristics of the binary image; obtaining the spectrum characteristics of the binary images of all pre-stored shoe sole trace pattern images in a sample image library; calculating the similarity score between the spectrum characteristics of the binary image of the shoe sole trace pattern images collected on site and the spectrum characteristics of the binary image of each pre-stored shoe sole trace pattern image in the sample image library; sorting the similarity scores according to a predetermined rule and outputting the pre-stored shoe sole trace pattern images in the sample image library according to the sorting method. According to this scheme, low-quality shoe sole trace pattern images collected on site can be retrieved, and the retrieval method is simple, fast, and the results are relatively accurate and comprehensive.
[0004] Therefore, although the performance of low-quality image retrieval has been improved in the related technology, the image feature description of the related technology is inaccurate and the performance differences between different features are not considered, resulting in the contribution of important features being underestimated and the impact of secondary features being overestimated, causing the applicability of the related technology to be reduced, thereby causing a decrease in recognition accuracy.
[0005] The information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to those skilled in the art. Summary of the invention
[0006] The present invention provides a low-quality image retrieval method, which can solve the technical problems of inaccuracy of feature description and static nature of feature weights.
[0007] According to the present invention, a low-quality image retrieval method is provided, comprising: obtaining an original low-quality image database; performing Fourier transform and enhancement on the original low-quality image database to obtain a high-frequency image database and an enhanced image database, wherein the capacity of the original low-quality image database, the high-frequency image database and the enhanced image database are all ,and is a positive integer; according to the original low-quality image database, the high-frequency image database and the enhanced image database, a benchmark low-quality feature library, a benchmark high-frequency feature library and a benchmark enhanced feature library are established; when a user inputs an image to be retrieved, the image to be retrieved is Fourier transformed and enhanced respectively to obtain a high-frequency image and an enhanced image, wherein the image to be retrieved is a low-quality image; the features of the image to be retrieved, the features of the high-frequency image and the enhanced image are obtained; according to the features of the image to be retrieved, the features of the high-frequency image, the features of the enhanced image, the benchmark low-quality feature library, the benchmark high-frequency feature library and the benchmark enhanced feature library, a similarity measure is determined; according to the similarity measure, an adaptive weight is determined; according to the adaptive weight and the similarity measure, a comprehensive similarity measure is determined; the comprehensive similarity measure is sorted and a retrieval result is output.
[0008] According to the present invention, when a user inputs an image to be retrieved, the image to be retrieved is Fourier transformed and enhanced respectively to obtain a high-frequency image and an enhanced image, including: obtaining grayscale values of multiple pixels in the image to be retrieved; performing Fourier transform on the image to be retrieved according to the grayscale values to obtain a spectrum corresponding to the grayscale values; performing high-pass filtering after centering the spectrum, and then performing inverse Fourier transform after de-centering to determine the grayscale values of multiple pixels in the high-frequency image; obtaining the component values of the three channels of R, G, and B, the brightness score, and the contrast score of each point in the image to be retrieved; performing Gaussian filtering on the image to be retrieved to obtain a Gaussian filtered image; determining a contrast enhancement result according to the component values of the three channels of R, G, and B, the brightness score, the contrast score, and the Gaussian filtered image; and obtaining an enhanced image according to the contrast enhancement result.
[0009] According to the present invention, the spectrum is centered, high-pass filtered, and then decentralized, and then inverse Fourier transformed to determine the grayscale values of multiple pixels in the high-frequency image, including: according to the formula Determine the grayscale value of the pixel in the mth row and nth column of the high-frequency image ,in, is the spectrum corresponding to the u-th row and v-th column in the frequency domain, m is the row number of the high-frequency image, n is the column number of the high-frequency image, u is the row number of the spectrum corresponding to the m-th row of the high-frequency image, v is the column number of the spectrum corresponding to the n-th column of the high-frequency image, M is the number of rows, N is the number of columns, m≤M, n≤N, u≤M, v≤N, and n, m, v, u, M and N are all non-negative integers, i is an imaginary unit, and e is a natural constant.
[0010] According to the present invention, the contrast enhancement result is determined according to the component values of the three channels of R, G, and B, the brightness score, the contrast score, and the Gaussian filtered image, including: according to the formula , , , , , determine the contrast enhancement result of the pixel at row x and column y ,in, is the component value of the R channel, is the component value of the G channel, is the component value of the B channel, is the brightness value of the image to be retrieved, is the normalized brightness, For images with enhanced brightness, is the Gaussian filtered image, is the contrast enhancement index, Z is the brightness score, and P is the contrast score.
[0011] According to the present invention, determining a similarity measure based on the image features to be retrieved, the high-frequency image features, the enhanced image features, the benchmark low-quality feature library, the benchmark high-frequency feature library and the benchmark enhanced feature library includes: according to the formula , , , , determine the similarity measure D, where ED is the similarity measure between the enhanced image and the enhanced image database, The enhanced image and the enhanced image database The similarity of images, , , , …, They are the 1st, 2nd, 3rd, ..., images, q is the image to be retrieved, To enhance the image database The baseline enhancement features of the image, To enhance image features, LD is the similarity measure between the image to be retrieved and the original low-quality image database. The image to be retrieved and the original low-quality image database The similarity of images, The first The baseline low-quality features of the images, is the feature of the image to be retrieved, HD is the similarity measure between the high-frequency image and the high-frequency image database, is the high frequency image and the The similarity of images, The high-frequency image database The baseline high-frequency features of an image, is the high-frequency image feature, is the capacity of the original low-quality image database, high-frequency image database, and enhanced image database, and Is a positive integer.
[0012] According to the present invention, based on the similarity metric, determining the adaptive weight includes: based on the similarity metric, averaging the similarity metric between the enhanced image and the enhanced image database, the similarity metric between the image to be retrieved and the original low-quality image database, and the similarity metric between the high-frequency image and the high-frequency image database to obtain a comprehensive similarity metric 1; sorting the comprehensive similarity metric 1 to obtain a maximum difference map, wherein the maximum difference map is the image with the greatest difference from the image to be retrieved; using the maximum difference map as a new image to be retrieved, obtaining new image features to be retrieved, new high-frequency image features and new enhanced image features; based on the new image to be retrieved Features, the new high-frequency image features, the new enhanced image features, the baseline low-quality feature library, the baseline high-frequency feature library and the baseline enhanced feature library, determine a new similarity measure; set a pending adaptive weight; multiply the new similarity measure by the pending adaptive weight to obtain a new comprehensive similarity measure; multiply the similarity measure by the pending adaptive weight to obtain a comprehensive similarity measure 2; determine the constraints and objective function of the adaptive weight model based on the new comprehensive similarity measure and the comprehensive similarity measure 2; solve the adaptive weight model based on the constraints and the objective function to obtain the adaptive weight.
[0013] According to the present invention, based on the new comprehensive similarity metric and the comprehensive similarity metric 2, the constraints and the objective function of the adaptive weight model are determined, including: according to the formula , , , , , determine the constraints and objective function J of the adaptive weight model, where EW is the undetermined adaptive weight of the similarity measurement between the enhanced image and the enhanced image database, LW is the undetermined adaptive weight of the similarity measurement between the image to be retrieved and the original low-quality image database, and HW is the undetermined adaptive weight of the similarity measurement between the high-frequency image and the high-frequency image database. is the similarity measure of the i-th image in the comprehensive similarity measure 2, is the similarity measure of the i-th image in the new comprehensive similarity measure, max is the maximum value function, min is the minimum value function, is the capacity of the original low-quality image database, high-frequency image database and enhanced image database, i≤ , and i and All are positive integers.
[0014] According to the present invention, determining a comprehensive similarity measure based on the adaptive weight and the similarity measure includes: according to the formula Determining the composite similarity measure ,in, is the adaptive weight, D is the similarity measure, is the solution value of EW, is the solution value of LW, is the solved value of HW.
[0015] Technical effect: According to the present invention, by performing Fourier transform and enhancement processing on the original low-quality image database, a feature library is established, which can improve the matching accuracy of the image to be retrieved. The features of the image to be retrieved, the high-frequency image and the enhanced image are extracted, and multi-feature fusion is performed, thereby improving the description accuracy and optimizing the retrieval accuracy. The adaptive weight allows the single feature weight to be dynamically updated with the image to be retrieved, thereby optimizing the retrieval result. When determining the grayscale values of multiple pixels in the high-frequency image, the high-frequency information of the image to be retrieved can be extracted from the frequency domain angle, and then the spectrum data is converted back to the image domain to determine the grayscale value of each pixel in the high-frequency image, thereby quantitatively describing the high-frequency information of the image to be retrieved, which is helpful for extracting high-frequency image features. When determining the contrast enhancement result, the contrast enhancement result can be determined by performing brightness enhancement and contrast enhancement on the image to be retrieved, thereby quantitatively describing the enhanced information of the image to be retrieved, which is helpful for extracting enhanced image features. When determining the similarity measure, the similarity measure can be determined by calculating the Euclidean distance between the features. The similarity measure can find the image most similar to the image to be retrieved in the image retrieval task, thereby achieving efficient image retrieval and matching. When determining the constraints and objective function of the adaptive weight model, the constraints and objective function of the adaptive weight model can be determined by the range of the adaptive weight, the deviation between the comprehensive similarity measure 2 and the new comprehensive similarity measure, and the respective deviations, so as to solve the adaptive weight model and obtain the adaptive weight, so that the single feature weight can be dynamically updated with the query image, which is helpful to optimize the retrieval results. When determining the comprehensive similarity measure, the comprehensive similarity measure can be determined based on the multiplication of the adaptive weight and the similarity measure, which can objectively and accurately reflect the overall similarity between the image to be retrieved and the original low-quality image in the database.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present invention. Other features and aspects of the present invention will become more apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can be obtained based on these drawings without creative work.
[0018] Figure 1 A schematic diagram of a process flow of a low-quality image retrieval method according to an embodiment of the present invention is exemplarily shown;
[0019] Figure 2The following is an exemplary flowchart of high-frequency image calculation according to an embodiment of the present invention;
[0020] Figure 3 The enhanced image calculation flow chart according to an embodiment of the present invention is exemplarily shown;
[0021] Figure 4 An exemplary flowchart of an adaptive weight strategy according to an embodiment of the present invention is shown;
[0022] Figure 5 The basic framework of low-quality image retrieval according to an embodiment of the present invention is exemplarily shown. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0025] Figure 1 The flowchart of the low-quality image retrieval method according to an embodiment of the present invention is exemplarily shown, and the method comprises: step S101, obtaining an original low-quality image database; step S102, performing Fourier transform and enhancement on the original low-quality image database respectively to obtain a high-frequency image database and an enhanced image database, wherein the capacity of the original low-quality image database, the high-frequency image database and the enhanced image database are all ,and is a positive integer; step S103, establishing a benchmark low-quality feature library, a benchmark high-frequency feature library and a benchmark enhanced feature library according to the original low-quality image database, the high-frequency image database and the enhanced image database; step S104, when the user inputs the image to be retrieved, the image to be retrieved is Fourier transformed and enhanced respectively to obtain a high-frequency image and an enhanced image, wherein the image to be retrieved is a low-quality image; step S105, obtaining the image features to be retrieved, the high-frequency image features and the enhanced image features; step S106, determining a similarity measure according to the image features to be retrieved, the high-frequency image features, the enhanced image features, the benchmark low-quality feature library, the benchmark high-frequency feature library and the benchmark enhanced feature library; step S107, determining an adaptive weight according to the similarity measure; step S108, determining a comprehensive similarity measure according to the adaptive weight and the similarity measure; step S109, sorting the comprehensive similarity measure and outputting the retrieval result.
[0026] According to the low-quality image retrieval method of the embodiment of the present invention, by performing Fourier transformation and enhancement processing on the original low-quality image database, a feature library is established, which can improve the matching accuracy of the image to be retrieved. The features of the image to be retrieved, the high-frequency image and the enhanced image are extracted, and multi-feature fusion is performed to improve the description accuracy and optimize the retrieval accuracy. The adaptive weight allows the single feature weight to be dynamically updated with the image to be retrieved, thereby optimizing the retrieval results.
[0027] According to one embodiment of the present invention, in step S101, an original low-quality image database suitable for retrieval tasks is created, which needs to be effectively managed and maintained, including backup, update, indexing and other operations, so that subsequent image processing and analysis work can proceed smoothly.
[0028] According to one embodiment of the present invention, in step S102, Fourier transform is performed on each image in the original low-quality image database in turn, and the image is converted to the frequency domain. Fourier transform can represent an image as a complex function in the frequency domain, which contains the high-frequency and low-frequency information of the image. In the frequency domain, high frequency represents the fast-changing details in the image, while low frequency represents the slowly changing overall structure in the image. Each image in the original low-quality image database is enhanced in turn, and various image enhancement techniques can be used, such as contrast enhancement, sharpening, noise reduction, etc., to improve the quality and characteristics of the image. The image after Fourier transform is called a high-frequency image, and the image after enhancement processing is called an enhanced image, which are stored in the high-frequency image database and the enhanced image database respectively.
[0029] According to one embodiment of the present invention, in step S103, features are extracted from the original low-quality image database, the high-frequency image database and the enhanced image database. The features include color features, texture features, shape features, etc. of the image, which are used to describe the key information of the image. The features extracted from the original low-quality image database are composed into a benchmark low-quality feature library, which represents the low-quality features of the original image. The features extracted from the high-frequency image database are composed into a benchmark high-frequency feature library, which represents the features of the original image in the frequency domain. The features extracted from the enhanced image database are composed into a benchmark enhanced feature library, which represents the features of the original image after enhancement processing. The benchmark feature library will serve as the basis for subsequent image similarity measurement and retrieval.
[0030] According to an embodiment of the present invention, in step S104, the image to be retrieved input by the user is subjected to Fourier transformation, and the image to be retrieved is converted into the frequency domain to obtain a high-frequency image. The image to be retrieved is enhanced to obtain an enhanced image.
[0031] According to one embodiment of the present invention, step S104 includes: obtaining grayscale values of multiple pixels in the image to be retrieved; performing Fourier transform on the image to be retrieved according to the grayscale values to obtain a spectrum corresponding to the grayscale values; after centering the spectrum, high-pass filtering is performed, and after de-centering, inverse Fourier transform is performed to determine the grayscale values of multiple pixels in the high-frequency image; obtaining the component values of the three channels of R, G, and B, the brightness score, and the contrast score of each point in the image to be retrieved; performing Gaussian filtering on the image to be retrieved to obtain a Gaussian filtered image; determining a contrast enhancement result according to the component values of the three channels of R, G, and B, the brightness score, the contrast score, and the Gaussian filtered image; and obtaining an enhanced image according to the contrast enhancement result.
[0032] According to one embodiment of the present invention, Figure 2 The high-frequency image calculation flow chart according to an embodiment of the present invention is exemplarily shown, in which the image to be retrieved, i.e., the low-quality image, is subjected to Fourier transform to obtain a spectrum image, the spectrum image is centered (the zero-frequency domain portion is moved to the center of the spectrum), and then high-pass filtered through a Gaussian high-pass filter, and the zero-frequency domain portion is moved back to the original position (i.e., decentralized), and the decentralized spectrum image is subjected to inverse Fourier transform to obtain a high-frequency image.
[0033] According to one embodiment of the present invention, Figure 3 The enhanced image calculation flow chart according to an embodiment of the present invention is exemplarily shown, in which the image to be retrieved, i.e., the low-quality image, is subjected to brightness enhancement to obtain a brightness image, and then the brightness image is subjected to contrast enhancement to obtain an enhanced image.
[0034] According to an embodiment of the present invention, the spectrum is centered, high-pass filtered, and then decentralized, and then inverse Fourier transformed to determine the grayscale values of multiple pixels in the high-frequency image, including: determining the grayscale value of the pixel in the mth row and nth column in the high-frequency image according to formula (1): , (1)
[0035] in, is the spectrum corresponding to the u-th row and v-th column in the frequency domain, m is the row number of the high-frequency image, n is the column number of the high-frequency image, u is the row number of the spectrum corresponding to the m-th row of the high-frequency image, v is the column number of the spectrum corresponding to the n-th column of the high-frequency image, M is the number of rows, N is the number of columns, m≤M, n≤N, u≤M, v≤N, and n, m, v, u, M and N are all non-negative integers, i is an imaginary unit, and e is a natural constant.
[0036] According to one embodiment of the present invention, in formula (1), It is a two-dimensional inverse discrete Fourier transform, which represents the conversion from the frequency domain (i.e., the spectrum after various processing such as centering, high-pass filtering, and de-centering) back to the spatial domain (image domain), thereby obtaining the pixel grayscale value of the high-frequency image.
[0037] In this way, the high-frequency information of the image to be retrieved can be extracted from the frequency domain perspective, and then the spectrum data can be converted back to the image domain to determine the grayscale value of each pixel in the high-frequency image, thereby quantitatively describing the high-frequency information of the image to be retrieved, which helps to extract high-frequency image features.
[0038] According to an embodiment of the present invention, the contrast enhancement result is determined according to the component values of the three channels of R, G, and B, the brightness score, the contrast score, and the Gaussian filtered image, including: determining the contrast enhancement result of the pixel point at the xth row and the yth column according to formulas (2), (3), (4), (5), and (6): ,
[0039] (2)
[0040] (3)
[0041] (4)
[0042] (5)
[0043] (6)
[0044] in, is the component value of the R channel, is the component value of the G channel, is the component value of the B channel, is the brightness value of the image to be retrieved, is the normalized brightness, For images with enhanced brightness, is the Gaussian filtered image, is the contrast enhancement index, Z is the brightness score, and P is the contrast score.
[0045] According to one embodiment of the present invention, in formula (2), represents the result of weighted summation of the component values of the three channels R, G, and B, which is used as the brightness value of the image to be retrieved. In formula (3), represents the result of normalizing the brightness value of the image to be retrieved, and the result is used as the normalized brightness. In formula (4), is the result of enhancing the image based on the brightness score, which can represent a brightness-enhanced image. In formula (5), The ratio between the Gaussian filter image and the image to be retrieved is exponentially calculated, that is, the value of the ratio is raised to the Pth power to obtain the contrast enhancement index. Different contrast enhancement effects can be achieved by adjusting the contrast score. In formula (6), It means that the brightness enhanced image is subjected to exponential operation and multiplied by the scale factor 255. The result can be used as the contrast enhancement result. The exponential operation can further adjust the brightness value of the pixel, and multiplying by 255 can convert the result back to the original brightness value range, thereby obtaining the brightness value of the pixel after contrast enhancement.
[0046] In this way, the contrast enhancement result can be determined by performing brightness enhancement and contrast enhancement on the image to be retrieved, thereby quantitatively describing the enhanced information of the image to be retrieved, which is helpful for extracting enhanced image features.
[0047] According to one embodiment of the present invention, in step S105, a feature extraction operation is performed on the image to be retrieved to obtain the features of the image to be retrieved. The features include color features, texture features, shape features, etc. of the image, which are used to describe the key information of the image. Similarly, feature extraction is performed on the image to be retrieved (high-frequency image) after Fourier transform processing to obtain high-frequency image features. Feature extraction is performed on the image to be retrieved (enhanced image) after enhancement processing to obtain enhanced image features. By obtaining the features of the image to be retrieved, the high-frequency image features and the enhanced image features, image feature representations of different aspects and levels can be obtained, which provides richer information and possibilities for subsequent image similarity measurement and retrieval work.
[0048] According to one embodiment of the present invention, in step S106, by comparing the features of the image to be retrieved with the features in the benchmark low-quality feature library, the similarity measure between the image to be retrieved and the images in the original low-quality image database is calculated. By comparing the features of the high-frequency image with the features in the benchmark high-frequency feature library, the similarity measure between the high-frequency image and the images in the high-frequency image database is calculated. By comparing the features of the enhanced image with the features in the benchmark enhanced feature library, the similarity measure between the enhanced image and the images in the enhanced image database is calculated. The similarity measure results obtained by the above calculations can be combined into a similarity measure to comprehensively evaluate the similarity between the image to be retrieved and the images in the original low-quality image database.
[0049] According to an embodiment of the present invention, determining a similarity measure based on the image features to be retrieved, the high-frequency image features, the enhanced image features, the baseline low-quality feature library, the baseline high-frequency feature library, and the baseline enhanced feature library includes: determining a similarity measure D according to formulas (7), (8), (9), and (10),
[0050] (7)
[0051] (8)
[0052] (9)
[0053] (10)
[0054] Among them, ED is the similarity measure between the enhanced image and the enhanced image database, The enhanced image and the enhanced image database The similarity of images, , , , …, They are the 1st, 2nd, 3rd, ..., images, q is the image to be retrieved, To enhance the image database The baseline enhancement features of the image, To enhance image features, LD is the similarity measure between the image to be retrieved and the original low-quality image database. The image to be retrieved and the original low-quality image database The similarity of images, The first The baseline low-quality features of the images, is the feature of the image to be retrieved, HD is the similarity measure between the high-frequency image and the high-frequency image database, is the high frequency image and the The similarity of images, The high-frequency image database The baseline high-frequency features of an image, is the high-frequency image feature, is the capacity of the original low-quality image database, high-frequency image database, and enhanced image database, and Is a positive integer.
[0055] According to one embodiment of the present invention, in formula (7), To enhance the image database The Euclidean distance between the baseline enhanced features of an image and the enhanced image features represents the straight-line distance between the enhanced features in the multidimensional space. The smaller the distance, the more similar the two images are. Similarly, the Euclidean distance between the enhanced image and each image in the enhanced image database can be obtained, that is, the similarity measure between the enhanced image and the enhanced image database. Based on the same calculation method, in formula (8), the similarity measure between the image to be retrieved and the original low-quality image database can be obtained, and in formula (9), the similarity measure between the high-frequency image and the high-frequency image database can be obtained. In formula (10), the above three similarity measures are combined to obtain the similarity measure.
[0056] In this way, a similarity measure can be determined by calculating the Euclidean distance between features. This similarity measure can be used to find the image most similar to the image to be retrieved in the image retrieval task, thereby achieving efficient image retrieval and matching.
[0057] According to an embodiment of the present invention, in step S107, the adaptive weight varies with different images to be retrieved, and the feature weight is dynamically adjusted. In the subsequent image similarity measurement and comparison process, the importance of each feature is more accurately comprehensively considered.
[0058] According to one embodiment of the present invention, step S107 includes: according to the similarity measurement, averaging the similarity measurement between the enhanced image and the enhanced image database, the similarity measurement between the image to be retrieved and the original low-quality image database, and the similarity measurement between the high-frequency image and the high-frequency image database to obtain a comprehensive similarity measurement 1; sorting the comprehensive similarity measurement 1 to obtain a maximum difference map, wherein the maximum difference map is the image with the largest difference from the image to be retrieved; using the maximum difference map as a new image to be retrieved, obtaining new image features to be retrieved, new high-frequency image features and new enhanced image features; according to the new image features to be retrieved, The new high-frequency image features, the new enhanced image features, the baseline low-quality feature library, the baseline high-frequency feature library and the baseline enhanced feature library are used to determine a new similarity measure; a pending adaptive weight is set; the new similarity measure is multiplied by the pending adaptive weight to obtain a new comprehensive similarity measure; the similarity measure is multiplied by the pending adaptive weight to obtain a comprehensive similarity measure 2; based on the new comprehensive similarity measure and the comprehensive similarity measure 2, the constraints and objective function of the adaptive weight model are determined; based on the constraints and the objective function, the adaptive weight model is solved to obtain the adaptive weight.
[0059] According to one embodiment of the present invention, Figure 4 The flowchart of the adaptive weight strategy according to an embodiment of the present invention is exemplarily shown. Based on the similarity metric, the comprehensive similarity metric 1 and the comprehensive similarity metric 2 can be obtained. Based on the comprehensive similarity metric 1, the maximum difference map is found, and the new comprehensive similarity metric is obtained by calculating the similarity between the maximum difference map and each image in the database. By combining the comprehensive similarity metric 2 and the new comprehensive similarity metric, an objective function is established, and the adaptive weight can be solved.
[0060] According to one embodiment of the present invention, the constraints and objective function of the adaptive weight model are determined according to the new comprehensive similarity metric and the comprehensive similarity metric 2, including: determining the constraints and objective function J of the adaptive weight model according to formulas (11), (12), (13), (14) and (15),
[0061] (11)
[0062] (12)
[0063] (13)
[0064] (14)
[0065] (15)
[0066] Among them, EW is the undetermined adaptive weight of the similarity measurement between the enhanced image and the enhanced image database, LW is the undetermined adaptive weight of the similarity measurement between the image to be retrieved and the original low-quality image database, HW is the undetermined adaptive weight of the similarity measurement between the high-frequency image and the high-frequency image database, is the similarity measure of the i-th image in the comprehensive similarity measure 2, is the similarity measure of the i-th image in the new comprehensive similarity measure, max is the maximum value function, min is the minimum value function, is the capacity of the original low-quality image database, high-frequency image database and enhanced image database, i≤ , and i and All are positive integers.
[0067] According to one embodiment of the present invention, in formula (11), Indicates that the sum of the three pending adaptive weights is 1. In formula (12), The range of the undetermined adaptive weight representing the similarity measure between the enhanced image and the enhanced image database is between greater than or equal to 0 and less than or equal to 1. In formula (13), The range of the undetermined adaptive weight representing the similarity measure between the image to be retrieved and the original low-quality image database is between greater than or equal to 0 and less than or equal to 1. In formula (14), The undetermined adaptive weight representing the similarity measure between the high-frequency image and the high-frequency image database is between greater than or equal to 0 and less than or equal to 1. The above four formulas are the constraints of the adaptive weight model.
[0068] According to one embodiment of the present invention, in formula (15), is the square root of the sum of the square differences between the comprehensive similarity measure 2 and the new comprehensive similarity measure, indicating the degree of deviation between the comprehensive similarity measure 2 and the new comprehensive similarity measure. represents the degree of deviation of the comprehensive similarity measure 2 of all images in the database, Represents the degree of deviation of the new comprehensive similarity measure for all images in the database.
[0069] In this way, the constraints and objective function of the adaptive weight model can be determined through the range of the adaptive weight, the deviation between the comprehensive similarity measure 2 and the new comprehensive similarity measure and their respective deviations, so that the adaptive weight model can be solved to obtain the adaptive weight, so that the single feature weight can be dynamically updated with the query image, which helps to optimize the retrieval results.
[0070] According to one embodiment of the present invention, in step S108, the adaptive weight is combined with the similarity metric to calculate the comprehensive similarity metric between the image to be retrieved and the original low-quality image database. The comprehensive similarity metric can reflect the overall similarity between the image to be retrieved and the images in the original low-quality image database, and comprehensively considers the importance of the features of the image to be retrieved processed in different ways, providing an important reference for subsequent image retrieval.
[0071] According to an embodiment of the present invention, determining a comprehensive similarity metric based on the adaptive weight and the similarity metric includes: determining the comprehensive similarity metric based on formula (16): , (16)
[0072] in, is the adaptive weight, D is the similarity measure, is the solution value of EW, is the solution value of LW, is the solved value of HW.
[0073] According to one embodiment of the present invention, in formula (16), The result obtained by multiplying the adaptive weight and the similarity measure is used as the comprehensive similarity measure. The adaptive weight reflects the importance of different features in the similarity measure. The adaptive weight can better reflect the similarity between the image to be retrieved and the image in the database. By comparing the comprehensive similarity measure, the image in the original low-quality image database that is most similar to the image to be retrieved can be found.
[0074] In this way, a comprehensive similarity measure can be determined based on the multiplication of the adaptive weight and the similarity measure, which can objectively and accurately reflect the overall similarity between the image to be retrieved and the original low-quality image in the database.
[0075] According to an embodiment of the present invention, in step S109, the comprehensive similarity metrics are sorted, and the higher the comprehensive similarity metric value, the higher the similarity between the image to be retrieved and each image in the original low-quality image database, so the comprehensive similarity metric values are arranged from high to low during sorting. The sorted image list is output as the retrieval result.
[0076] According to the low-quality image retrieval method of the embodiment of the present invention, by performing Fourier transformation and enhancement processing on the original low-quality image database, a feature library is established, which can improve the matching accuracy of the image to be retrieved. The features of the image to be retrieved, the high-frequency image and the enhanced image are extracted, and multi-feature fusion is performed, thereby improving the description accuracy and optimizing the retrieval precision. The adaptive weight allows the single feature weight to be dynamically updated with the image to be retrieved, thereby optimizing the retrieval result. When determining the grayscale values of multiple pixels in the high-frequency image, the high-frequency information of the image to be retrieved can be extracted from the frequency domain angle, and then the spectrum data is converted back to the image domain to determine the grayscale value of each pixel in the high-frequency image, thereby quantitatively describing the high-frequency information of the image to be retrieved, which is helpful to extract the high-frequency image features. When determining the contrast enhancement result, the contrast enhancement result can be determined by performing brightness enhancement and contrast enhancement on the image to be retrieved, thereby quantitatively describing the enhanced information of the image to be retrieved, which is helpful to extract the enhanced image features. When determining the similarity measure, the similarity measure can be determined by calculating the Euclidean distance between the features. The similarity measure can find the image most similar to the image to be retrieved in the image retrieval task, thereby achieving efficient image retrieval and matching. When determining the constraints and objective function of the adaptive weight model, the constraints and objective function of the adaptive weight model can be determined by the range of the adaptive weight, the deviation between the comprehensive similarity measure 2 and the new comprehensive similarity measure, and the respective deviations, so as to solve the adaptive weight model and obtain the adaptive weight, so that the single feature weight can be dynamically updated with the query image, which is helpful to optimize the retrieval results. When determining the comprehensive similarity measure, the comprehensive similarity measure can be determined based on the multiplication of the adaptive weight and the similarity measure, which can objectively and accurately reflect the overall similarity between the image to be retrieved and the original low-quality image in the database.
[0077] Figure 5 The basic framework of low-quality image retrieval according to an embodiment of the present invention is exemplarily shown. In the database creation stage, Fourier transform is used to obtain a high-frequency image database, and an enhancement algorithm is used to obtain an enhanced image database. The features of the original low-quality image database are extracted to establish a baseline low-quality feature library, and the features of the enhanced image database are extracted to establish a baseline enhanced feature library. The features of the high-frequency image database are extracted to establish a baseline high-frequency feature library. In the image search stage, when the user inputs an image, the image is Fourier transformed and enhanced to obtain a high-frequency image and an enhanced image, and the features of the original image, high-frequency image, and enhanced image are extracted. The similarity between the query image and the database image is calculated based on each feature, and the weight of each feature in this retrieval is obtained based on several similarities. By weighting multiple metrics, a comprehensive similarity metric is obtained, and the retrieval results are output on this basis.
[0078] It should be understood by those skilled in the art that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments, and the embodiments of the present invention may be deformed or modified in any way without departing from the principles.
Claims
1. A low-quality image retrieval method, characterized in that: include: Obtain the original low-quality image database; Fourier transform and enhancement are performed on the images in the original low-quality image database to obtain a high-frequency image database and an enhanced image database, wherein the capacity of the original low-quality image database, the high-frequency image database and the enhanced image database are all K1, and K1 is a positive integer; according to the original low-quality image database, the high-frequency image database and the enhanced image database, a baseline low-quality feature library, a baseline high-frequency feature library and a baseline enhanced feature library are established; when a user inputs an image to be retrieved, Fourier transform and enhancement are performed on the image to be retrieved to obtain a high-frequency image and an enhanced image, wherein the image to be retrieved is a low-quality image; the feature library of the image to be retrieved is obtained. According to the features of the image to be retrieved, the high-frequency image features, the enhanced image features, the benchmark low-quality feature library, the benchmark high-frequency feature library and the benchmark enhanced feature library, a similarity metric is determined; according to the similarity metric, an adaptive weight is determined; according to the adaptive weight and the similarity metric, a comprehensive similarity metric is determined; the comprehensive similarity metric is sorted and the retrieval result is output; according to the similarity metric, an adaptive weight is determined, including: according to the similarity metric, a similarity metric between the enhanced image and the enhanced image database, a similarity metric between the image to be retrieved and the original low-quality image database, The method comprises the following steps: obtaining a comprehensive similarity measure 1 by averaging the similarity measures of the high-frequency image and the high-frequency image database; sorting the comprehensive similarity measure 1 to obtain a maximum difference map, wherein the maximum difference map is an image with the largest difference from the image to be retrieved; taking the maximum difference map as a new image to be retrieved, obtaining new image features to be retrieved, new high-frequency image features and new enhanced image features; determining a new similarity measure based on the new image features to be retrieved, the new high-frequency image features, the new enhanced image features, the benchmark low-quality feature library, the benchmark high-frequency feature library and the benchmark enhanced feature library; setting a pending adaptive weight; and averaging the new similarity measure 1. The method comprises the steps of: multiplying the similarity metric by the undetermined adaptive weight to obtain a new comprehensive similarity metric; multiplying the similarity metric by the undetermined adaptive weight to obtain a comprehensive similarity metric 2; determining the constraints and objective function of the adaptive weight model according to the new comprehensive similarity metric and the comprehensive similarity metric 2; solving the adaptive weight model according to the constraints and the objective function to obtain an adaptive weight; determining the constraints and objective function of the adaptive weight model according to the new comprehensive similarity metric and the comprehensive similarity metric 2, including: according to the formula EW+LW+HW=1, 0≤EW≤1, 0≤LW≤1, 0≤HW≤1, Determine the constraints and objective function J of the adaptive weight model, where EW is the undetermined adaptive weight of the similarity measurement between the enhanced image and the enhanced image database, LW is the undetermined adaptive weight of the similarity measurement between the image to be retrieved and the original low-quality image database, HW is the undetermined adaptive weight of the similarity measurement between the high-frequency image and the high-frequency image database, and D i is the similarity measure of the i-th image in the comprehensive similarity measure 2, S i is the similarity measure of the i-th image in the new comprehensive similarity measure, max is the maximum value function, min is the minimum value function, K1 is the capacity of the original low-quality image database, high-frequency image database and enhanced image database, i≤K1, and i and K1 are both positive integers; according to the adaptive weight and the similarity measure, determine the comprehensive similarity measure, including: according to the formula Determine the comprehensive similarity measure DD(q), where W F is the adaptive weight, D is the similarity measure, EW F is the solution value of EW, LW F is the solution value of LW, HW F is the solved value of HW.
2. The low-quality image retrieval method according to claim 1, characterized in that: When the user inputs an image to be retrieved, the image to be retrieved is respectively Fourier transformed and enhanced to obtain a high-frequency image and an enhanced image, including: obtaining the grayscale values of multiple pixels in the image to be retrieved; performing Fourier transform on the image to be retrieved according to the grayscale values to obtain a spectrum corresponding to the grayscale values; performing high-pass filtering after centering the spectrum, and then performing inverse Fourier transform after de-centering to determine the grayscale values of multiple pixels in the high-frequency image; obtaining the component values of the three channels of R, G, and B, the brightness score, and the contrast score of each point in the image to be retrieved; performing Gaussian filtering on the image to be retrieved to obtain a Gaussian filtered image; determining a contrast enhancement result according to the component values of the three channels of R, G, and B, the brightness score, the contrast score, and the Gaussian filtered image; and obtaining an enhanced image according to the contrast enhancement result.
3. The low-quality image retrieval method according to claim 2, characterized in that: After the spectrum is centered, a high-pass filter is performed, and after de-centering, an inverse Fourier transform is performed to determine the grayscale values of multiple pixels in the high-frequency image, including: according to the formula Determine the grayscale value f(m, n) of the pixel in the mth row and nth column of the high-frequency image, where F(u, v) is the frequency spectrum corresponding to the uth row and vth column in the frequency domain, m is the row number of the high-frequency image, n is the column number of the high-frequency image, u is the row number of the frequency spectrum corresponding to the mth row of the high-frequency image, v is the column number of the frequency spectrum corresponding to the nth column of the high-frequency image, M is the number of rows, N is the number of columns, m≤M, n≤N, u≤M, v≤N, and n, m, v, u, M and N are all non-negative integers, i is an imaginary unit, and e is a natural constant.
4. The low-quality image retrieval method according to claim 2, characterized in that: Determine the contrast enhancement result according to the component values of the three channels R, G, and B, the brightness score, the contrast score, and the Gaussian filtered image, including: according to the formula S(x,y)=255I n ′(x,y) E(x,y) , determine the contrast enhancement result S(x, y) of the pixel point in the xth row and the yth column, where I R (x, y) is the component value of the R channel, I G (x, y) is the component value of the G channel, I B (x, y) is the component value of the B channel, I(x, y) is the brightness value of the image to be retrieved, and I n (x, y) is the normalized brightness, I n ′(x, y) is the brightness enhanced image, I g (x, y) is the Gaussian filtered image, E(x, y) is the contrast enhancement index, Z is the brightness score, and P is the contrast score.
5. The low-quality image retrieval method according to claim 1, characterized in that: Determining a similarity measure according to the image features to be retrieved, the high-frequency image features, the enhanced image features, the benchmark low-quality feature library, the benchmark high-frequency feature library, and the benchmark enhanced feature library includes: determining a similarity measure according to the formula D = (ED, LD, HD), determine the similarity measure D, where ED To measure the similarity between the enhanced image and the enhanced image database, To determine the similarity between the enhanced image and the K1th image in the enhanced image database, are the 1st, 2nd, 3rd, …, K1th images in the original low-quality image database, q is the image to be retrieved, To enhance the baseline enhancement features of the K1th image in the image database, EF q To enhance image features, LD is the similarity measure between the image to be retrieved and the original low-quality image database. is the similarity between the image to be retrieved and the K1th image in the original low-quality image database, is the baseline low-quality feature of the K1th image in the original low-quality image database, LF q is the feature of the image to be retrieved, HD is the similarity measure between the high-frequency image and the high-frequency image database, is the similarity between the high-frequency image and the K1th image in the high-frequency image database, is the benchmark high-frequency feature of the K1th image in the high-frequency image database, HF q is the high-frequency image feature, K1 is the capacity of the original low-quality image database, the high-frequency image database and the enhanced image database, and K1 is a positive integer.
Citation Information
Patent Citations
Onsite sole trace pattern image retrieval method
CN105005565A
Image retrieval method, electronic device and storage medium
CN113157962A
Representation method of low-quality shoeprint image and shoeprint image retrieval method
CN113672755A
Low-illumination image enhancement method and device
CN117274085A
Image retrieval method based on keyword extraction and multi-modal feature fusion
CN117332103A
