A multi-scale similar image matching retrieval method

Through the multi-scale similar image matching search method, multi-scale analysis and matching similarity measurements are used to solve the problems of time-consuming and labor-intensive and inaccurate results in traditional image search methods, and more efficient and accurate image retrieval is achieved.

CN119322862BActive Publication Date: 2025-03-11HUNAN SHANXI CULTURE CO LTD

Patent Information

Application Number
CN202411861545.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-03-11
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

Traditional image retrieval methods rely on text labels or metadata, which makes them time-consuming and error-prone, and the subjectivity and inconsistency of text descriptions often lead to inaccurate search results.

Method used

Multi-scale similar image matching search method is used to capture features of different levels in the image through multi-scale analysis, and search using matching similarity metrics to improve the accuracy of the search. The specific steps include preprocessing the image to be retrieved, extracting multi-scale feature vectors, and performing similarity measurements through the nearest neighbor search method of feature fusion.

Benefits of technology

It improves the accuracy of image matching retrieval, reduces the need for manual annotation, reduces the subjectivity and inconsistency of search results, and improves the efficiency of image data management and retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322862B_ABST
    Figure CN119322862B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image matching and retrieval, and discloses a multi-scale similar image matching and retrieval method, the method comprising: preprocessing an image to be retrieved; performing multi-scale feature extraction on the preprocessed image to be retrieved to obtain a multi-scale feature vector of the image to be retrieved; performing similarity measurement between the multi-scale feature vector of the image to be retrieved and the multi-scale feature vector of the matching image; and taking the matching image with the highest similarity as the retrieval result of the image to be retrieved. The present invention selects a pixel value with a larger amount of information and a smaller difference from other pixel values ​​as the central pixel value, performs spatial filtering and pixel filtering processing on the image to be retrieved, retains the edge information of the image and removes random noise, improves the accuracy of image matching and retrieval, extracts feature information of the preprocessed image in light and dark scales and multiple directional scales, constructs a multi-scale feature vector and performs matching retrieval, and realizes image search and matching processing under multi-scale features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image matching and retrieval, and in particular to a multi-scale similar image matching and retrieval method. Background Art

[0002] With the rapid development of information technology, the number of digital images generated and stored has increased dramatically. According to statistics, the number of images generated worldwide each year is growing exponentially. Especially with the popularity of social media, smart phones and various camera devices, the management and retrieval of image data has become particularly important. Traditional image retrieval methods mainly rely on text tags or metadata and perform retrieval through keyword matching. This method requires manual annotation of each image, which is time-consuming, labor-intensive and error-prone. In addition, the subjectivity and inconsistency of text descriptions often lead to inaccurate retrieval results. Summary of the invention

[0003] In view of this, the present invention provides a multi-scale similar image matching retrieval method, which captures features of different levels in an image through multi-scale analysis, uses matching similarity measurement to perform retrieval, and improves the accuracy of retrieval.

[0004] To achieve the above object, the present invention provides a multi-scale similar image matching retrieval method, comprising the following steps:

[0005] S1: preprocessing the image to be retrieved to obtain a preprocessed image to be retrieved, wherein the image preprocessing adopts a pixel filtering method based on image grayscale distribution;

[0006] S2: extract multi-scale features from the preprocessed image to be retrieved to obtain a multi-scale feature vector of the image to be retrieved;

[0007] S3: Perform similarity measurement on the multi-scale feature vector of the image to be retrieved and the multi-scale feature vector of the matching image to obtain the similarity of the matching images, wherein the similarity measurement adopts the nearest neighbor search method of feature fusion;

[0008] S4: The matching image with the highest similarity is used as the retrieval result of the image to be retrieved.

[0009] As a further improvement method of the present invention:

[0010] Optionally, preprocessing the image to be retrieved in step S1 includes:

[0011] Get the image I to be retrieved:

[0012] ;

[0013] ;

[0014] in:

[0015] Represents the pixel in the xth row and yth column of the image I to be retrieved The pixel value of , X represents the number of pixel rows of image I, and Y represents the number of pixel columns of image I;

[0016] In order, it represents pixels exist Color values ​​of color channels;

[0017] Indicates selection The maximum value in ;

[0018] Calculate the information content of different pixel values, select the pixel value with the largest information content as the central pixel value Q of the image I to be retrieved, and randomly select the central pixel with the central pixel value Q in the image I to be retrieved. .

[0019] Optionally, the central pixel-based The image I to be retrieved is preprocessed, including:

[0020] S11: Based on center pixel The image I to be retrieved is spatially filtered to obtain the spatial filtering values ​​of the pixels in the image I to be retrieved, where the pixels The spatial filtering value is :

[0021] ;

[0022] in:

[0023] Indicates scale information; in the embodiment of the present invention, b is set to 1;

[0024] represents an exponential function with a natural constant as base;

[0025] represents the spatial filter coefficient; in the embodiment of the present invention, Set to 2;

[0026] represents the L1 norm;

[0027] S12: Based on center pixel The central pixel value of the image to be retrieved is used to perform pixel filtering to obtain the pixel filtering value of the pixel in the image to be retrieved I, where the pixel The pixel filter value is :

[0028] ;

[0029] in:

[0030] represents the pixel filter coefficient; in the embodiment of the present invention, Set to 1;

[0031] S13: Combining the spatial filtering value and the pixel filtering value of the pixel to obtain the filtered pixel value, and the filtered pixel value constitutes the pre-processed image to be retrieved :

[0032] ;

[0033] ;

[0034] in:

[0035] Represents the preprocessed image to be retrieved The pixel value of the pixel at row x and column y in , .

[0036] Optionally, in step S2, multi-scale feature extraction is performed on the preprocessed image to be retrieved, including:

[0037] S21: Calculate the pre-processed image to be retrieved The window size of pixels is , where the image to be retrieved The window size of the pixel in row x and column y is Pixels;

[0038] S22: Based on the calculated window scale, a window centered on the pixel is generated, and the light and dark thresholds in eight directions centered on the pixel in the window are calculated, where the image to be retrieved The light and dark thresholds of the pixel in the xth row and yth column in 8 directions are :

[0039] ;

[0040] ;

[0041] ;

[0042] in:

[0043] Indicates the image to be retrieved The light and dark threshold of the pixel in the xth row and yth column in the hth direction, represents the dark threshold, Indicates light threshold; the 1st to 8th directions are 0 degree, 45 degree, 90 degree, 135 degree, 180 degree, 225 degree, 270 degree and 315 degree respectively;

[0044] It means that the window size is centered on the pixel in the xth row and yth column. In the pixel window, starting from the pixel in the xth row and yth column and with the pixel value in the hth direction lower than The mean of all pixel values;

[0045] It means that the window size is centered on the pixel in the xth row and yth column. In the pixel window, starting from the pixel in the xth row and yth column and in the hth direction, the pixel value is higher than The mean of all pixel values;

[0046] S23: Taking the light and dark thresholds in eight directions centered on the pixel as the characteristic threshold of the pixel, the characteristic value of the pixel is calculated, where the image to be retrieved The characteristic value of the pixel in the xth row and yth column is :

[0047] ;

[0048] ;

[0049] ;

[0050] in:

[0051] Indicates the image to be retrieved The pixel value of the nearest pixel in the xth row and yth column in the hth direction;

[0052] Indicates the image to be retrieved The darkness judgment result of the pixel in the xth row and yth column in the hth direction is: Indicates the image to be retrieved The photometric discrimination result of the pixel in the xth row and yth column in the hth direction;

[0053] S24: Convert the pixel feature value into a feature matrix, and construct the feature matrix of all pixels into a preprocessed image to be retrieved The multi-scale feature vector of .

[0054] Optionally, the pre-processed image to be retrieved is calculated in step S21 The window size of pixels is , where the image to be retrieved The calculation process of the window scale of the pixel in the xth row and yth column is:

[0055] S211: Initialize the generated window size Pixels, where ;

[0056] S212: Set the current iteration number of the window scale to t, the initial value of t is 0, then the window scale obtained in the tth iteration is pixels, the maximum window size is Pixels;

[0057] S213: Calculate the window size with the pixel in the xth row and the yth column as the center The mean pixel value of all pixels within the pixel window and standard deviation ;

[0058] like If it is greater than the preset threshold, , terminate the iteration of window scale;

[0059] Otherwise, , calculate the window size centered on the pixel in the xth row and yth column The mean pixel value of all pixels within the pixel window and standard deviation ;

[0060] like If it is greater than the preset threshold, , terminate the iteration of window scale;

[0061] S214: If , then set t=t+1 and return to step S213, otherwise set , terminate the iteration of window scale.

[0062] Optionally, in step S24, the characteristic values ​​of the pixels are converted into a characteristic matrix, and the characteristic matrices of all pixels constitute the preprocessed image to be retrieved. The multi-scale feature vector of ,include:

[0063] S241: Convert the eigenvalue of the pixel into a eigenmatrix, where the eigenvalue The corresponding feature matrix is :

[0064] ;

[0065] ;

[0066] ;

[0067] ;

[0068] in:

[0069] represents the characteristic coefficient, Set to 2;

[0070] Represents the feature matrix The characteristic element value in ;

[0071] S242: Constructing the preprocessed image to be retrieved by using the feature matrix of all pixels The multi-scale feature vector of :

[0072] ;

[0073] in:

[0074] Indicates the image to be retrieved The feature matrix of the pixel in row x and column y, .

[0075] Optionally, in step S3, similarity measurement is performed on the multi-scale feature vector of the image to be retrieved and the multi-scale feature vector of the matching image, including:

[0076] Collect U groups of matching images to form a retrieval image library, and perform preprocessing from steps S1 to S2 and multi-scale feature extraction on the collected matching images to obtain a multi-scale feature vector of the matching image, where the multi-scale feature vector of the u-th group of matching images in the retrieval image library is :

[0077] ;

[0078] in:

[0079] Represents the feature matrix of the pixel in the xth row and yth column of the uth group of matching images, , X represents the number of pixel rows of the matching image, and Y represents the number of pixel columns of the matching image. ; The image size of the matching image is consistent with that of the image to be retrieved;

[0080] The multi-scale feature vector of the image to be retrieved Multi-scale feature vectors of matching images Perform similarity measurement, where the process of similarity measurement is:

[0081] S31: Calculate multi-scale feature vectors With multi-scale feature vector The distance between the feature matrices of pixels at the same position in With the feature matrix The distance between :

[0082] ;

[0083] ;

[0084] ;

[0085] in:

[0086] represents the L2 norm;

[0087] Represents the mean of the feature matrix of U groups of matching images in the retrieval image library;

[0088] T stands for transpose;

[0089] Represents the covariance matrix of the feature matrix of U groups of matching images in the retrieved image library;

[0090] S32: Convert the distance between feature matrices into multi-scale feature vectors With multi-scale feature vector Distance between:

[0091] ;

[0092] ;

[0093] in:

[0094] Represents multi-scale feature vector With multi-scale feature vector The distance between

[0095] Indicates distance The weight coefficient of

[0096] Represents the feature matrix and The distance between

[0097] Represents the feature matrix and The distance between

[0098] Indicates selection The minimum value in ;

[0099] Indicates scale information; in the embodiment of the present invention, b is set to 1;

[0100] S33: Multi-scale feature vectors With multi-scale feature vector The distance between them is normalized to obtain the similarity between the u-th group of matching images and the image to be retrieved:

[0101] ;

[0102] in:

[0103] Indicates the similarity between the u-th group of matching images and the image to be retrieved.

[0104] Optionally, the calculation formula of the central pixel value Q is:

[0105] ;

[0106] in:

[0107] represents the set of pixel values ​​in the image I to be retrieved, , Representing a collection For any pixel value in , Representing a collection Any pixel value in ;

[0108] Representing a collection The total number of pixel values ​​in ;

[0109] Indicates that the pixel value is The frequency of two pixels appearing in the form of a pixel pair in the image I to be retrieved; in the embodiment of the present invention, the pixel pair form indicates that the two pixels are adjacent in the row direction or in the column direction;

[0110] Indicates that the pixel value is The frequency of the pixel appearing in the image I to be retrieved; Indicates that the pixel value is The frequency of the pixel appearing in the image I to be retrieved;

[0111] Represents the amount of information of pixel value q;

[0112] Indicates that the selection makes The maximum pixel value q is taken as the central pixel value Q.

[0113] In order to solve the above problem, the present invention provides an electronic device, the electronic device comprising:

[0114] A memory storing at least one instruction;

[0115] Communication interface, enabling electronic equipment to communicate; and

[0116] The processor executes the instructions stored in the memory to implement the multi-scale similar image matching and retrieval method described above.

[0117] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the multi-scale similar image matching retrieval method described above.

[0118] Compared with the prior art, the present invention proposes a multi-scale similar image matching retrieval method, which has the following advantages:

[0119] First, this scheme proposes an image preprocessing method, which calculates the information content of the pixel value based on the frequency of occurrence of the pixel value in the image, and calculates the difference between the pixel value and other pixel values ​​based on the co-occurrence frequency of the pixel value and other pixel values, optimizes and adjusts the information content, selects the pixel value with the larger information content and the smaller difference as the central pixel value, uses the central pixel value and the pixel coordinates corresponding to the central pixel value, performs spatial filtering and pixel filtering on the image to be retrieved, uses the spatial filtering method to retain the edge information of the image, and uses the pixel filtering method to remove random noise in the image, thereby improving the accuracy of image matching retrieval.

[0120] At the same time, this scheme proposes a multi-scale feature extraction method, which uses a multi-scale feature extraction method to extract the feature information of the preprocessed image in the light and dark scale and multiple directional scales, constitute the feature value of the pixel in the image, and perform convolution processing on the eigenvalue in the row and column directions to obtain a feature matrix that represents the multiple scale features of the pixel. By calculating the feature matrix distance between the pixel in the image to be retrieved and the pixel at the same position in the matching image, and converting the distance between the feature matrices into the neighborhood distance, the neighborhood distance is used to calculate the weight coefficient of the distance between the feature matrices, and the distance between the feature matrices is weighted to obtain the similarity between the matching image and the image to be retrieved, thereby realizing image search and matching processing of neighbor search under multi-scale features. BRIEF DESCRIPTION OF THE DRAWINGS

[0121] Figure 1A schematic diagram of a flow chart of a multi-scale similar image matching and retrieval method provided by an embodiment of the present invention;

[0122] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0123] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0124] The embodiment of the present application provides a multi-scale similar image matching retrieval method. The execution subject of the multi-scale similar image matching retrieval method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the multi-scale similar image matching retrieval method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0125] A multi-scale similar image matching retrieval method comprises the following steps:

[0126] S1: Preprocess the image to be retrieved to obtain the preprocessed image to be retrieved.

[0127] In step S1, the image to be retrieved is preprocessed, including:

[0128] Get the image I to be retrieved:

[0129] ;

[0130] ;

[0131] in:

[0132] Represents the pixel in the xth row and yth column of the image I to be retrieved The pixel value of , X represents the number of pixel rows of image I, and Y represents the number of pixel columns of image I;

[0133] In order, it represents pixels exist Color values ​​of color channels;

[0134] Indicates selection The maximum value in ;

[0135] Calculate the information content of different pixel values, select the pixel value with the largest information content as the central pixel value Q of the image I to be retrieved, and randomly select the central pixel with the central pixel value Q in the image I to be retrieved. .

[0136] Based on the center pixel The image I to be retrieved is preprocessed, including:

[0137] S11: Based on center pixel The image I to be retrieved is spatially filtered to obtain the spatial filtering values ​​of the pixels in the image I to be retrieved, where the pixels The spatial filtering value is :

[0138] ;

[0139] in:

[0140] Indicates scale information; in the embodiment of the present invention, b is set to 1;

[0141] represents an exponential function with a natural constant as base;

[0142] represents the spatial filter coefficient; in the embodiment of the present invention, Set to 2;

[0143] represents the L1 norm;

[0144] S12: Based on center pixel The central pixel value of the image to be retrieved is used to perform pixel filtering to obtain the pixel filtering value of the pixel in the image to be retrieved I, where the pixel The pixel filter value is :

[0145] ;

[0146] in:

[0147] represents the pixel filter coefficient; in the embodiment of the present invention, Set to 1;

[0148] S13: Combining the spatial filtering value and the pixel filtering value of the pixel to obtain the filtered pixel value, and the filtered pixel value constitutes the pre-processed image to be retrieved :

[0149] ;

[0150] ;

[0151] in:

[0152] Represents the preprocessed image to be retrieved The pixel value of the pixel at row x and column y in , .

[0153] S2: Perform multi-scale feature extraction on the preprocessed image to be retrieved to obtain a multi-scale feature vector of the image to be retrieved.

[0154] In the step S2, multi-scale feature extraction is performed on the pre-processed image to be retrieved, including:

[0155] S21: Calculate the pre-processed image to be retrieved The window size of pixels is , where the image to be retrieved The window size of the pixel in row x and column y is Pixels;

[0156] S22: Based on the calculated window scale, a window centered on the pixel is generated, and the light and dark thresholds in eight directions centered on the pixel in the window are calculated, where the image to be retrieved The light and dark thresholds of the pixel in the xth row and yth column in 8 directions are :

[0157] ;

[0158] ;

[0159] ;

[0160] in:

[0161] Indicates the image to be retrieved The light and dark threshold of the pixel in the xth row and yth column in the hth direction, represents the dark threshold, Indicates light threshold; the 1st to 8th directions are 0 degree, 45 degree, 90 degree, 135 degree, 180 degree, 225 degree, 270 degree and 315 degree respectively;

[0162] It means that the window size is centered on the pixel in the xth row and yth column. In the pixel window, starting from the pixel in the xth row and yth column and with the pixel value in the hth direction lower than The mean of all pixel values;

[0163] It means that the window size is centered on the pixel in the xth row and yth column. In the pixel window, starting from the pixel in the xth row and yth column and in the hth direction, the pixel value is higher than The mean of all pixel values;

[0164] S23: Taking the light and dark thresholds in eight directions centered on the pixel as the characteristic threshold of the pixel, the characteristic value of the pixel is calculated, where the image to be retrieved The characteristic value of the pixel in the xth row and yth column is :

[0165] ;

[0166] ;

[0167] ;

[0168] in:

[0169] Indicates the image to be retrieved The pixel value of the nearest pixel in the xth row and yth column in the hth direction;

[0170] Indicates the image to be retrieved The darkness judgment result of the pixel in the xth row and yth column in the hth direction is: Indicates the image to be retrieved The photometric discrimination result of the pixel in the xth row and yth column in the hth direction;

[0171] S24: Convert the pixel feature value into a feature matrix, and construct the feature matrix of all pixels into a preprocessed image to be retrieved The multi-scale feature vector of .

[0172] The pre-processed image to be retrieved is calculated in step S21 The window size of pixels is , where the image to be retrieved The calculation process of the window scale of the pixel in the xth row and yth column is:

[0173] S211: Initialize the generated window size Pixels, where ;

[0174] S212: Set the current iteration number of the window scale to t, the initial value of t is 0, then the window scale obtained in the tth iteration is pixels, the maximum window size is Pixels;

[0175] S213: Calculate the window size with the pixel in the xth row and the yth column as the center The mean pixel value of all pixels within the pixel window and standard deviation ;

[0176] like If it is greater than the preset threshold, , terminate the iteration of window scale;

[0177] Otherwise, , calculate the window size centered on the pixel in the xth row and yth column The mean pixel value of all pixels within the pixel window and standard deviation ;

[0178] like If it is greater than the preset threshold, , terminate the iteration of window scale;

[0179] S214: If , then set t=t+1 and return to step S213, otherwise set , terminate the iteration of window scale.

[0180] In the step S24, the characteristic values ​​of the pixels are converted into a characteristic matrix, and the characteristic matrices of all pixels constitute the preprocessed image to be retrieved. The multi-scale feature vector of ,include:

[0181] S241: Convert the eigenvalue of the pixel into a eigenmatrix, where the eigenvalue The corresponding feature matrix is :

[0182] ;

[0183] ;

[0184] ;

[0185] ;

[0186] in:

[0187] represents the characteristic coefficient, Set to 2;

[0188] Represents the feature matrix The characteristic element value in ;

[0189] S242: Constructing the preprocessed image to be retrieved by using the feature matrix of all pixels The multi-scale feature vector of :

[0190] ;

[0191] in:

[0192] Indicates the image to be retrieved The feature matrix of the pixel in row x and column y, .

[0193] S3: Perform similarity measurement on the multi-scale feature vector of the image to be retrieved and the multi-scale feature vector of the matching image to obtain the similarity of the matching images.

[0194] In the step S3, similarity measurement is performed between the multi-scale feature vector of the image to be retrieved and the multi-scale feature vector of the matching image, including:

[0195] Collect U groups of matching images to form a retrieval image library, and perform preprocessing from steps S1 to S2 and multi-scale feature extraction on the collected matching images to obtain a multi-scale feature vector of the matching image, where the multi-scale feature vector of the u-th group of matching images in the retrieval image library is :

[0196] ;

[0197] in:

[0198] Represents the feature matrix of the pixel in the xth row and yth column of the uth group of matching images, , X represents the number of pixel rows of the matching image, and Y represents the number of pixel columns of the matching image. ; The image size of the matching image is consistent with that of the image to be retrieved;

[0199] The multi-scale feature vector of the image to be retrieved Multi-scale feature vectors of matching images Perform similarity measurement, where the process of similarity measurement is:

[0200] S31: Calculate multi-scale feature vectors With multi-scale feature vector The distance between the feature matrices of pixels at the same position in With the feature matrix The distance between :

[0201] ;

[0202] ;

[0203] ;

[0204] in:

[0205] represents the L2 norm;

[0206] Represents the mean of the feature matrix of U groups of matching images in the retrieval image library;

[0207] T stands for transpose;

[0208] Represents the covariance matrix of the feature matrix of U groups of matching images in the retrieved image library;

[0209] S32: Convert the distance between feature matrices into multi-scale feature vectors With multi-scale feature vector Distance between:

[0210] ;

[0211] ;

[0212] in:

[0213] Represents multi-scale feature vector With multi-scale feature vector The distance between

[0214] Indicates distance The weight coefficient of

[0215] Represents the feature matrix and The distance between

[0216] Represents the feature matrix and The distance between

[0217] Indicates selection The minimum value in ;

[0218] Indicates scale information; in the embodiment of the present invention, b is set to 1;

[0219] S33: Multi-scale feature vectors With multi-scale feature vector The distance between them is normalized to obtain the similarity between the u-th group of matching images and the image to be retrieved:

[0220] ;

[0221] in:

[0222] Indicates the similarity between the u-th group of matching images and the image to be retrieved.

[0223] S4: The matching image with the highest similarity is used as the retrieval result of the image to be retrieved.

[0224] The similarities between the U groups of matching images and the image to be retrieved are compared, and the matching image with the highest similarity is used as the retrieval result of the image to be retrieved. The retrieval page is returned, and the retrieval result is output on the retrieval page.

[0225] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0226] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0227] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0228] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A multi-scale similar image matching retrieval method, characterized in that: The method comprises: S1: preprocessing the image to be retrieved to obtain the preprocessed image to be retrieved; S2: extract multi-scale features from the preprocessed image to be retrieved to obtain a multi-scale feature vector of the image to be retrieved; S3: perform similarity measurement on the multi-scale feature vector of the image to be retrieved and the multi-scale feature vector of the matching image to obtain the similarity of the matching images; The S3 step includes: Collect U groups of matching images to form a retrieval image library, and perform preprocessing from steps S1 to S2 and multi-scale feature extraction on the collected matching images to obtain a multi-scale feature vector of the matching image, where the multi-scale feature vector of the u-th group of matching images in the retrieval image library is : ; in: Represents the feature matrix of the pixel in the xth row and yth column of the uth group of matching images, , X represents the number of pixel rows of the matching image, and Y represents the number of pixel columns of the matching image. ; The image size of the matching image is consistent with that of the image to be retrieved; The multi-scale feature vector of the image to be retrieved Multi-scale feature vectors of matching images Perform similarity measurement, where the process of similarity measurement is: S31: Compute multi-scale feature vectors With multi-scale feature vector The distance between the feature matrices of pixels at the same position in With the feature matrix The distance between : ; ; ; in: represents the L2 norm; Represents the mean of the feature matrix of U groups of matching images in the retrieval image library; T stands for transpose; Represents the covariance matrix of the feature matrix of U groups of matching images in the retrieved image library; S32: Convert the distance between feature matrices into multi-scale feature vectors With multi-scale feature vector Distance between: ; ; in: Represents multi-scale feature vector With multi-scale feature vector The distance between Indicates distance The weight coefficient of Represents the feature matrix and The distance between Represents the feature matrix and The distance between Indicates selection The minimum value in ; Represents scale information; S33: Multi-scale feature vectors With multi-scale feature vector The distance between them is normalized to obtain the similarity between the u-th group of matching images and the image to be retrieved: ; in: Indicates the similarity between the u-th group of matching images and the image to be retrieved; S4: The matching image with the highest similarity is used as the retrieval result of the image to be retrieved.

2. A multi-scale similar image matching retrieval method as claimed in claim 1, characterized in that: The S1 step includes: Get the image I to be retrieved: ; ; in: Represents the pixel in the xth row and yth column of the image I to be retrieved The pixel value of , X represents the number of pixel rows of image I, and Y represents the number of pixel columns of image I; In order, it represents pixels exist Color values ​​of color channels; Indicates selection The maximum value in ; Calculate the information content of different pixel values, select the pixel value with the largest information content as the central pixel value Q of the image I to be retrieved, and randomly select the central pixel with the central pixel value Q in the image I to be retrieved. .

3. A multi-scale similar image matching retrieval method as claimed in claim 2, characterized in that: The image I to be retrieved is preprocessed, including: S11: Based on center pixel Perform spatial filtering on the image I to be retrieved to obtain spatial filtering values ​​of pixels in the image I to be retrieved; S12: Based on center pixel Perform pixel filtering on the image I to be retrieved based on the central pixel value of to obtain the pixel filtering value of the pixel in the image I to be retrieved; S13: Combining the spatial filtering value and the pixel filtering value of the pixel to obtain the filtered pixel value, and the filtered pixel value constitutes the pre-processed image to be retrieved .

4. A multi-scale similar image matching retrieval method as claimed in claim 3, characterized in that: The S2 step includes: S21: Calculate the pre-processed image to be retrieved The window size of pixels is , where the image to be retrieved The window size of the pixel in row x and column y is Pixels; S22: Based on the calculated window scale, a window centered on the pixel is generated, and light and dark thresholds in eight directions centered on the pixel in the window are calculated; S23: taking the light and dark thresholds in eight directions centered on the pixel as the characteristic thresholds of the pixel, and calculating the characteristic value of the pixel; S24: Convert the pixel feature value into a feature matrix, and construct the feature matrix of all pixels into a preprocessed image to be retrieved The multi-scale feature vector of .

5. A multi-scale similar image matching retrieval method as claimed in claim 4, characterized in that: The pre-processed image to be retrieved is calculated in step S21 The window size of pixels is , where the image to be retrieved The calculation process of the window scale of the pixel in the xth row and yth column is: S211: Initialize the generated window size Pixels, where ; S212: Set the current iteration number of the window scale to t, the initial value of t is 0, then the window scale obtained in the tth iteration is pixels, the maximum window size is Pixels; S213: Calculate the window size with the pixel in the xth row and the yth column as the center The mean pixel value of all pixels within the pixel window and standard deviation ; like If it is greater than the preset threshold, , terminate the iteration of window scale; Otherwise, , calculate the window size centered on the pixel in the xth row and yth column The mean pixel value of all pixels within the pixel window and standard deviation ; like If it is greater than the preset threshold, , terminate the iteration of window scale; S214: If , then set t=t+1 and return to step S213, otherwise set , terminate the iteration of window scale.

6. A multi-scale similar image matching retrieval method as claimed in claim 4, characterized in that: In the step S24, the characteristic values ​​of the pixels are converted into a characteristic matrix, and the characteristic matrices of all pixels constitute the preprocessed image to be retrieved. The multi-scale feature vector of ,include: S241: Convert the eigenvalue of the pixel into a eigenmatrix; S242: Constructing the preprocessed image to be retrieved by using the feature matrix of all pixels The multi-scale feature vector of : ; in: Indicates the image to be retrieved The feature matrix of the pixel in row x and column y, .

7. A multi-scale similar image matching retrieval method as claimed in claim 2, characterized in that: The calculation formula of the central pixel value Q is: ; in: represents the set of pixel values ​​in the image I to be retrieved, , Representing a collection For any pixel value in , Representing a collection Any pixel value in ; Representing a collection The total number of pixel values ​​in ; Indicates that the pixel value is The frequency of the two pixels appearing in the form of pixel pairs in the image I to be retrieved; Indicates that the pixel value is The frequency of the pixel appearing in the image I to be retrieved; Indicates that the pixel value is The frequency of the pixel appearing in the image I to be retrieved; Represents the amount of information of pixel value q; Indicates that the selection makes The maximum pixel value q is taken as the central pixel value Q.

Citation Information

Patent Citations

  • Trademark image retrieval method

    CN108804499A

  • Space image retrieval system and method based on multi-source feature fusion

    CN118708751A

Cited By

  • A Deep Learning-Based Image Similarity Retrieval System and Method for Crafts

    CN122574439A

  • Artware image similarity retrieval system and method based on deep learning

    CN122574439B