A method for constructing image feature descriptors based on discrete cosine transform

Through the DCT-based feature descriptor construction method, the problems of insufficient robustness and high computational complexity of existing feature descriptors under photometric and geometric transformations are solved, and more efficient feature matching and lower computational volume are achieved.

CN119229139BActive Publication Date: 2025-03-21NORTHWESTERN POLYTECHNICAL UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411780799.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-21
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

Existing feature descriptors are not robust enough in the face of common photometric and geometric transformations, have high computational complexity, and have low matching efficiency.

Method used

Using a discrete cosine transform (DCT)-based image feature descriptor construction method, compact feature vectors are generated by DCT transformation, Z-shaped scanning, filtering and normalization of image blocks.

Benefits of technology

It improves the robustness and matching efficiency of feature descriptors, reduces the dimension and calculation amount, and makes feature descriptors have better anti-interference ability for photometric and geometric transformations, and is suitable for image feature matching in high-precision and high-speed scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229139B_ABST
    Figure CN119229139B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing technology, and in particular to a method for constructing an image feature descriptor based on discrete cosine transform, the method comprising: using a feature point detection algorithm to detect feature points of a target image, and determining feature points in the target image; traversing each feature point, mapping the image information of the current feature point and its neighborhood to a standard image block of a preset size, and intercepting and rounding according to a scale factor of a preset ratio to obtain image blocks of different sizes; performing DCT transformation on each image block to generate a DCT coefficient matrix; traversing each image block, scanning the DCT coefficient matrix of the current image block, and scanning out the DCT coefficients; screening the energy values ​​of each retained DCT coefficient to form a feature vector of the current image block; cascading the feature vectors of each image block together to obtain the IDCTF feature descriptor of the current feature point. The method effectively improves the performance and matching efficiency of the feature descriptor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a method for constructing an image feature descriptor based on discrete cosine transform. Background Art

[0002] Local image feature description and matching are key to computer vision applications. This type of task mainly includes three steps: feature detection, feature description, and feature matching. For the feature detection step, a reliable feature detector is required to accurately extract consistent feature points (i.e., key points) for the same image scene with different photometric or geometric transformations. The feature description step is to complete the description of the feature points by mapping the local image information of the neighborhood of the image feature point into a high-dimensional feature vector (usually called a feature descriptor). Feature descriptors are as important as feature detectors. They need to be robust to common photometric transformations (such as illumination, noise, compression, and blur transformations) and geometric transformations (such as scaling, rotation, translation, and affine transformations) to ensure the uniqueness of the feature descriptors so that the same feature points can be found in the final step of feature matching.

[0003] As the basis of computer vision applications, domestic and foreign research teams have proposed a large number of feature detectors and feature descriptors. As one of the best-performing feature detection algorithms, the SIFT algorithm (Scale Invariant Feature Transform) can make image features invariant to scale transformations by searching for stable features in all possible scale spaces. It is precisely because of the need to search the scale space of the image that the SIFT algorithm faces the problem of high computational complexity. The SURF algorithm (Speeded Up Robust Features) can achieve higher computing power. The algorithm can greatly improve computational efficiency by using integral images and box filters to approximate the second-order partial derivatives of Gaussian convolution, but the accuracy of the SURF algorithm is reduced. In order to further improve computational efficiency, a large number of fast detectors and feature descriptors have been proposed, including but not limited to the FREAK algorithm (Fast Retina Keypoint), the BRIEF algorithm (Binary Robust Independent Elementary Features), the ORB algorithm (Oriented fast and Rotated Brief), and the BRISK algorithm (Binary Robust Invariant Scalable Keypoints). These algorithms use binary descriptors to describe local features of images, but these algorithms are at the expense of reducing matching accuracy in exchange for higher computing power. With the rapid development of artificial intelligence technology, deep learning-based solutions have made great progress in feature description and matching. However, this type of method is plagued by generalization-related problems and requires a long learning and training process, making it unsuitable for some real-time systems. In summary, the performance of the feature detection algorithms proposed so far is already good and trustworthy, but the performance of their feature descriptors often does not match the performance of feature detectors. Summary of the invention

[0004] In order to solve the above technical problems, an embodiment of the present application proposes a method for constructing an image feature descriptor based on discrete cosine transform, aiming to improve the performance of the feature descriptor so that it has better robustness to common photometric transformations and geometric transformations, while improving the matching efficiency of the feature descriptor so that it has lower dimension and higher execution speed.

[0005] In order to achieve the above-mentioned purpose, the embodiment of the present application proposes a method for constructing an image feature descriptor based on discrete cosine transform, and the method comprises the following steps: using a preset feature point detection algorithm to perform feature point detection on a target image to determine the feature points in the target image; traversing each feature point, mapping the image information of the current feature point and its neighborhood to a standard image block of a preset size, and intercepting and rounding the standard image block according to a scale factor of a preset ratio to obtain a number of nested image blocks of different sizes centered on the current feature point; performing DCT (Discrete Cosine Transform) on each image block respectively. Transform, discrete cosine transform), generates a DCT coefficient matrix based on the DCT coefficients of each image block; traverses each image block, uses a zigzag scanning method to scan the DCT coefficient matrix of the current image block from the upper left corner, obtains the scanned DCT coefficient, and removes the DC term coefficient; determines a screening ratio based on the size of the current image block, screens the retained DCT coefficients according to the screening ratio, obtains the screened DCT coefficients, and performs normalization processing to form a feature vector of the current image block; cascades the feature vectors of each image block to obtain an IDCTF (Improved Discrete Cosine Transform Features) feature descriptor of the current feature point, and then obtains the IDCTF feature descriptor of each feature point in the target image.

[0006] In order to achieve the above-mentioned purpose, the embodiment of the present application also provides a system for constructing an image feature descriptor based on discrete cosine transform, and the system includes: a feature point detection unit, which is used to use a preset feature point detection algorithm to perform feature point detection on a target image and determine the feature points in the target image; a mapping unit, which is used to traverse each feature point, map the image information of the current feature point and its neighborhood to a standard image block of a preset size, and cut and round the standard image block according to a scale factor of a preset ratio to obtain five nested image blocks of different sizes centered on the current feature point; a DCT transformation unit, which is used to perform DCT transformation on each image block respectively, based on the DC of each image block T coefficient generates a DCT coefficient matrix; a scanning unit is used to traverse each image block, and adopts a zigzag scanning method to scan the DCT coefficient matrix of the current image block from the upper left corner to obtain the scanned DCT coefficient, and eliminate the DC term coefficient; a feature vector construction unit is used to determine the screening ratio based on the size of the current image block, screen the retained DCT coefficients according to the screening ratio, obtain the screened DCT coefficients, and perform normalization processing to form a feature vector of the current image block; a feature descriptor construction unit is used to cascade the feature vectors of each image block to obtain the IDCTF feature descriptor of the current feature point, and then obtain the IDCTF feature descriptor of each feature point in the target image.

[0007] In order to achieve the above-mentioned purpose, an embodiment of the present application also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method for constructing an image feature descriptor based on discrete cosine transform as described above.

[0008] In order to achieve the above-mentioned purpose, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement a method for constructing an image feature descriptor based on discrete cosine transform as described above.

[0009] The embodiment of the present application proposes a method for constructing an image feature descriptor based on discrete cosine transform, which utilizes the compression property of DCT transform on information, retains more useful main information in the frequency domain, and forms a compact feature vector as an IDCTF feature descriptor. The feature descriptor is very compact and has a small dimension, which is almost only half of the SIFT feature descriptor. Therefore, it has a small amount of calculation and a very high efficiency. The feature descriptor can be used in conjunction with any feature detector to complete image feature matching, and has strong versatility and universality. The performance of the feature descriptor is stable, and the normalization process in the process of constructing the feature descriptor can well eliminate the influence of illumination differences, so that the constructed feature descriptor has better robustness for common photometric transformations and geometric transformations. The use of the IDCTF feature descriptor can perform high-precision image feature matching, which can well meet the image feature matching requirements in high-precision and high-speed scenarios.

[0010] In some optional embodiments, the size of the standard image block is 32×32, the preset scale factor is 1.5, the standard image block is cut and rounded according to the scale factor of the preset ratio, and a plurality of nested image blocks of different sizes centered on the current feature point are obtained, including: the standard image block is cut and rounded according to the scale factor of one, two, three, and four times, respectively, to obtain five nested image blocks of different sizes centered on the current feature point, and the five nested image blocks of different sizes include a first image block of 32×32, a second image block of 21×21, a third image block of 14×14, a fourth image block of 9×9, and a fifth image block of 6×6. The design of five image blocks can well balance the speed of constructing the IDCTF feature descriptor and the performance of the constructed IDCTF feature descriptor.

[0011] In some optional embodiments, the screening ratio is determined based on the size of the current image block, and the retained DCT coefficients are screened according to the screening ratio to obtain the screened DCT coefficients, including: determining the screening ratio based on the size of the current image block, and determining the number of screening coefficients based on the screening ratio and the number of DCT coefficients in the DCT coefficient matrix of the current image block. , ; Sort the retained DCT coefficients in the order of zigzag scanning to obtain the sequence to be screened of the current image block, and screen out the first DCT coefficients are used as the screened DCT coefficients; among them, the screening ratio corresponding to the first image block is 2%, the screening ratio corresponding to the second image block is 4.5%, the screening ratio corresponding to the third image block is 7%, the screening ratio corresponding to the fourth image block is 17%, and the screening ratio corresponding to the fifth image block is 25%. In the process of constructing the IDCTF feature descriptor, the contribution of different image blocks to the construction of the feature descriptor is fully considered, and the DCT matrix coefficients of image blocks of different sizes are screened in different proportions. The number of screened DCT coefficients is considered based on the energy of each image block, which is more unique.

[0012] In some optional embodiments, normalization processing is performed to form a feature vector of the current image block, including: normalizing the screened DCT coefficients based on the maximum value of the modulus value in the screened DCT coefficients, and forming the feature vector of the current image block in the screening order.

[0013] In some optional embodiments, the feature vectors of each image block are concatenated together to obtain the IDCTF feature descriptor of the current feature point, which is implemented by the following formula:

[0014] ;

[0015] ;

[0016] ;

[0017] ;

[0018] in, Indicates The feature point image blocks, Represents the total number of feature points, Indicates The feature point The DCT matrix of an image block is Indicates zigzag scanning, Represents a filtering operation. represents the normalization operation, Indicates The feature point The feature vector of the image block, Indicates IDCTF feature descriptor of feature points.

[0019] In some optional embodiments, DCT transformation is performed on each image block respectively, and a DCT coefficient matrix is ​​generated based on the DCT coefficients of each image block, which is implemented by the following formula:

[0020] ;

[0021] ;

[0022] in, and Respectively The feature point The width and height of the image block, Indicates The feature point The midpoint of the image block The gray value of and is the normalization coefficient, Indicates The feature point The DCT coefficient matrix of the image block Line DCT coefficients of the column.

[0023] In some optional embodiments, a reference image and an image to be matched are obtained, and feature point detection is performed on the reference image and the image to be matched using a preset feature point detection algorithm to determine reference feature points in the reference image and feature points to be matched in the image to be matched; an IDCTF feature descriptor of each reference feature point in the reference image and an IDCTF feature descriptor of each feature point to be matched in the image to be matched are respectively constructed; each reference feature point in the reference image is traversed to calculate the L2 norm feature descriptor between the IDCTF feature descriptor of the current reference feature point and the IDCTF feature descriptor of each feature point to be matched in the image to be matched. feature distance; the minimum value and the second minimum value in each L2 norm feature distance are determined as the nearest neighbor feature distance and the second nearest neighbor feature distance, respectively, and the IDCTF feature descriptors of the feature points to be matched corresponding to the nearest neighbor feature distance and the second nearest neighbor feature distance are determined as the nearest neighbor feature descriptor and the second nearest neighbor feature descriptor, respectively; the ratio between the nearest neighbor feature distance and the second nearest neighbor feature distance is determined as the similarity metric corresponding to the nearest neighbor feature descriptor, and it is determined whether the similarity metric is less than the preset metric threshold. If it is determined that the similarity metric is less than the preset metric threshold, the nearest neighbor feature descriptor is determined as the best match. The use of IDCTF feature descriptors and similarity metrics has greatly improved the accuracy and stability of image feature matching, and provided a reliable basic technical means for the field of computer vision technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 is a flowchart of a method for constructing an image feature descriptor based on discrete cosine transform provided in an embodiment of the present application;

[0026] Figure 2 is a schematic diagram of five image blocks corresponding to a feature point provided in an embodiment of the present application;

[0027] Figure 3 is a schematic diagram of a Z-shaped scanning process provided in one embodiment of the present application;

[0028] Figure 4 is a schematic diagram of the values ​​of scanned DCT coefficients provided in one embodiment of the present application;

[0029] Figure 5 is a flowchart of image feature matching provided in one embodiment of the present application;

[0030] Figure 6 is a structural schematic diagram of a system for constructing an image feature descriptor based on discrete cosine transform provided in another embodiment of the present application;

[0031] Figure 7 It is a structural schematic diagram of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0032] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.

[0033] An embodiment of the present application proposes a method for constructing an image feature descriptor based on discrete cosine transform, which is applied to a server. The implementation details of the method for constructing an image feature descriptor based on discrete cosine transform proposed in this embodiment are specifically described below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for the implementation of this solution.

[0034] The specific process of the method for constructing an image feature descriptor based on discrete cosine transform proposed in this embodiment can be as follows: Figure 1 As shown, including:

[0035] Step 101: Use a preset feature point detection algorithm to perform feature point detection on a target image to determine feature points in the target image.

[0036] In the specific implementation, the server first needs to use a preset feature point detection algorithm to detect and extract feature points of the target image to determine the position of each feature point in the target image, such as using the SURF algorithm to detect and extract feature points of the target image. The specific feature point detection algorithm selected can be set according to actual needs.

[0037] Step 102, traverse each feature point, map the image information of the current feature point and its neighborhood to a standard image block of a preset size, and cut and round the standard image block according to a scale factor of a preset ratio to obtain a plurality of nested image blocks of different sizes centered on the current feature point.

[0038] In a specific implementation, after extracting each feature point in the target image, the server needs to traverse each feature point, map the image information of the current feature point and its neighborhood to a standard image block of a preset size, and intercept and round the standard image block according to a scale factor of a preset ratio to obtain a number of image blocks of different sizes nested (nested in a U-shaped pattern) with the current feature point as the center. The preset size and the scale factor of the preset ratio can be set by a person skilled in the art according to actual needs.

[0039] In one example, the size of the standard image block is set to 32×32 (in px, omitted below), and the server needs to map the current feature point to the standard image block of size 32×32. The current feature point is located at the center of the standard image block, and the standard image block is recorded as the first image block of full size. The scale factor is set to 1.5, and the server needs to cut and round the standard image block according to the scale factors of one, two, three, and four times, that is, the standard image block is cut and rounded according to the size of the standard image block reduced by 1.5 times, 3 times, 4.5 times, and 6 times, and finally five nested image blocks of different sizes centered on the current feature point are obtained. The five nested image blocks of different sizes include a first image block of size 32×32, a second image block of size 21×21, a third image block of size 14×14, a fourth image block of size 9×9, and a fifth image block of size 6×6. Such a design can highlight the role of the central area information of the feature point neighborhood in feature description, making the feature descriptor robust to affine transformation.

[0040] It is worth noting that the design of five image blocks can well balance the speed of IDCTF feature descriptor construction and the performance of the constructed IDCTF feature descriptor. If there is a special need, the server can also obtain four or six image blocks for feature descriptor construction.

[0041] In an example, the five image blocks corresponding to a feature point can be as follows Figure 2 shown.

[0042] Step 103: Perform DCT transformation on each image block respectively, and generate a DCT coefficient matrix based on the DCT coefficients of each image block.

[0043] In a specific implementation, after the server obtains each image block of the current feature point, it needs to perform DCT transformation on each image block and generate a DCT coefficient matrix based on the DCT coefficient of each image block. DCT coefficients are DCT transformation coefficients, hereinafter referred to as DCT coefficients.

[0044] Discrete cosine transform is widely used in the field of image and video processing. Discrete cosine transform represents a finite sequence of data points by the sum of cosine functions at different oscillation frequencies, thereby mapping the signal from the spatial domain to the frequency domain. Discrete cosine transform has a strong energy compression characteristic, and most of the signal's energy is concentrated in a few low-frequency components of the DCT transform matrix. Using this energy compression property, the main information of the image in the frequency domain can be extracted to construct a feature descriptor.

[0045] In one example, the server performs DCT transformation on each image block respectively, and generates a DCT coefficient matrix based on the DCT coefficients of each image block, which can be achieved by the following formula:

[0046] ;

[0047] ;

[0048] in, and Respectively The feature point The width and height of the image block, Indicates The feature point The midpoint of the image block The gray value of and is the normalization coefficient, Indicates The feature point The DCT coefficient matrix of the image block Line DCT coefficients of the column.

[0049] It is worth noting that in this embodiment, each image block is set to be a square, so .

[0050] Step 104, traverse each image block, scan the DCT coefficient matrix of the current image block from the upper left corner using a zigzag scanning method, obtain the scanned DCT coefficients, and remove the DC term coefficients.

[0051] In a specific implementation, after the server completes the construction of the DCT coefficient matrix of each image block, it can traverse each image block and use a Z-shaped scanning method to scan the DCT coefficient matrix of the current image block starting from the upper left corner of the DCT coefficient matrix to obtain the scanned DCT coefficients and eliminate the DC term coefficients.

[0052] The DCT transform can concentrate the energy in the upper left corner of the DCT coefficient matrix, so the small amount of DCT coefficients in the upper left corner of the DCT coefficient matrix can be fully utilized to represent the image.

[0053] The coefficient located in the upper left corner of the DCT coefficient matrix , or , corresponds to the DC component, also known as the DC term coefficient, and the remaining DCT coefficients represent the AC component, also known as the AC term coefficient. The DC term coefficient can be interpreted as the average grayscale value of each pixel in the image. The DC term coefficient is not helpful for the construction of feature descriptors, so it is necessary to remove the DC term coefficient after scanning.

[0054] In one example, the zigzag scanning process can be as follows: Figure 3 As shown, the value of the DCT coefficient finally scanned can be Figure 4 shown.

[0055] Step 105, determining a screening ratio based on the size of the current image block, screening the retained DCT coefficients according to the screening ratio, obtaining screened DCT coefficients, and performing normalization processing to form a feature vector of the current image block.

[0056] In a specific implementation, after the server obtains the scanned DCT coefficients and removes the DC term coefficients, it can determine the screening ratio based on the size of the current image block, and screen the retained DCT coefficients according to the screening ratio to obtain the screened DCT coefficients.

[0057] Generally speaking, zigzag scanning needs to scan from the upper left corner to the lower right corner of the DCT coefficient matrix, but in fact the DCT transform concentrates the energy in the upper left corner of the DCT coefficient matrix, and the lower right half does not contribute much to the construction of feature descriptors, so the zigzag scanning only scans half of the DCT coefficient matrix. However, even if only half of the DCT coefficient matrix is ​​scanned, there are still many DCT coefficients that are not needed, so further screening is required.

[0058] In one example, for five image blocks, the server needs to determine the screening ratio based on the size of the current image block, and determine the number of screening based on the screening ratio and the number of DCT coefficients in the DCT coefficient matrix of the current image block. , Then, the retained DCT coefficients are sorted in the order of zigzag scanning to obtain the sequence to be screened of the current image block, and the first DCT coefficients are used as the screened DCT coefficients. In the process of constructing the IDCTF feature descriptor, the contribution of different image blocks to the construction of the feature descriptor is fully considered, and the DCT matrix coefficients of image blocks of different sizes are screened in different proportions. The number of screened DCT coefficients is considered based on the energy of each image block, which is more unique.

[0059] It is understandable that the information of the image blocks close to the feature points is more representative of the features, and different screening ratios are used for the five image blocks. For the DCT coefficient matrix of the fifth image block with a size of 6×6, it mainly describes the information around the feature points, so more DCT coefficients can be used to describe the image block. For the first image block with a size of 32×32, it contains all the information of the image block. Considering the computational efficiency and the contribution of the image block to the feature description, fewer DCT coefficients need to be screened to describe the image block.

[0060] The screening ratio corresponding to the first image block is 2%, and 20 DCT coefficients need to be screened after rounding. The screening ratio corresponding to the second image block is 4.5%, and 20 DCT coefficients need to be screened after rounding. The screening ratio corresponding to the third image block is 7%, and 14 DCT coefficients need to be screened after rounding. The screening ratio corresponding to the fourth image block is 17%, and 14 DCT coefficients need to be screened after rounding. The screening ratio corresponding to the fifth image block is 25%, and 9 DCT coefficients need to be screened after rounding.

[0061] In one example, the server needs to normalize the selected DCT coefficients based on the maximum value of the modulus value in the selected DCT coefficients, and compose a feature vector of the current image block in the order of selection, so as to eliminate the influence of illumination difference.

[0062] In one example, 20 DCT coefficients are screened out in the first image block, and the corresponding feature vector is 20 dimensions. 20 DCT coefficients are screened out in the second image block, and the corresponding feature vector is 20 dimensions. 14 DCT coefficients are screened out in the third image block, and the corresponding feature vector is 14 dimensions. 14 DCT coefficients are screened out in the fourth image block, and the corresponding feature vector is 14 dimensions. 9 DCT coefficients are screened out in the fifth image block, and the corresponding feature vector is 9 dimensions.

[0063] Step 106 , concatenate the feature vectors of each image block together to obtain the IDCTF feature descriptor of the current feature point, and then obtain the IDCTF feature descriptor of each feature point in the target image.

[0064] In the specific implementation, after the server obtains the feature vectors of each image block, it needs to cascade the feature vectors of each image block together to obtain the IDCTF feature descriptor of the current feature point. After completing the traversal of all feature points, the IDCTF feature descriptor of each feature point in the target image can be obtained.

[0065] In one example, the feature vectors of each image block are concatenated together to obtain the IDCTF feature descriptor of the current feature point, which is implemented by the following formula:

[0066] ;

[0067] ;

[0068] ;

[0069] ;

[0070] in, Indicates The feature point image blocks, Represents the total number of feature points, Indicates The feature point The DCT matrix of an image block is Indicates zigzag scanning, Represents a filtering operation. represents the normalization operation, Indicates The feature point The feature vector of the image block, Indicates IDCTF feature descriptor of feature points.

[0071] In an example, for the case of five image blocks, the feature vectors corresponding to the five image blocks are 20 dimensions, 20 dimensions, 14 dimensions, 14 dimensions and 9 dimensions respectively. By concatenating these five feature vectors together, a 77-dimensional IDCTF feature descriptor of the current feature point can be obtained. Compared with the 128-dimensional SIFT feature descriptor, the dimension is almost reduced by half.

[0072] This embodiment utilizes the compression property of DCT transform on information, retains more useful main information in the frequency domain, and forms a compact feature vector as an IDCTF feature descriptor. The feature descriptor is very compact and has a small dimension, which is almost only half of the SIFT feature descriptor. Therefore, the amount of calculation is small and the calculation efficiency is very high. The feature descriptor can be used in conjunction with any feature detector to complete image feature matching, and has strong versatility and universality. The performance of the feature descriptor is stable, and the normalization process in the process of constructing the feature descriptor can well eliminate the influence of illumination differences, so that the constructed feature descriptor has better robustness for common photometric transformations and geometric transformations. The use of the IDCTF feature descriptor can perform high-precision image feature matching, which can well meet the image feature matching requirements in high-precision and high-speed scenes.

[0073] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this application.

[0074] In one embodiment, the server may Figure 5 The steps shown in the figure perform image feature matching based on the constructed IDCTF feature descriptor, specifically including:

[0075] Step 201 , obtaining a reference image and an image to be matched, performing feature point detection on the reference image and the image to be matched using a preset feature point detection algorithm, and determining reference feature points in the reference image and feature points to be matched in the image to be matched.

[0076] In a specific implementation, the server can obtain the input reference image and the image to be matched, use a preset feature point detection algorithm (such as the SURF algorithm) to perform feature point detection on the reference image and the image to be matched, and determine the reference feature points in the reference image and the feature points to be matched in the image to be matched.

[0077] Step 202 : constructing an IDCTF feature descriptor for each reference feature point in the reference image and an IDCTF feature descriptor for each to-be-matched feature point in the to-be-matched image.

[0078] In a specific implementation, after determining each reference feature point in the reference image and each feature point to be matched in the image to be matched, the server can respectively construct an IDCTF feature descriptor for each reference feature point in the reference image and an IDCTF feature descriptor for each feature point to be matched in the image to be matched.

[0079] Step 203 , traverse each reference feature point in the reference image, and calculate the L2 norm feature distance between the IDCTF feature descriptor of the current reference feature point and the IDCTF feature descriptors of each to-be-matched feature point in the to-be-matched image.

[0080] Step 204, the minimum value and the second minimum value of each L2 norm feature distance are respectively determined as the nearest neighbor feature distance and the second nearest neighbor feature distance, and the IDCTF feature descriptors of the feature points to be matched corresponding to the nearest neighbor feature distance and the second nearest neighbor feature distance are respectively determined as the nearest neighbor feature descriptor and the second nearest neighbor feature descriptor.

[0081] In the specific implementation, the server needs to traverse each reference feature point in the reference image and calculate the L2 norm feature distance between the IDCTF feature descriptor of the current reference feature point and the IDCTF feature descriptor of each feature point to be matched in the image to be matched. Compare each L2 norm feature distance, find the minimum and second minimum values ​​of each L2 norm feature distance, and determine them as the nearest neighbor feature distance (denoted as ) and the next nearest neighbor feature distance (denoted as ), and the IDCTF feature descriptors of the feature points to be matched corresponding to the nearest neighbor feature distance and the next nearest neighbor feature distance are respectively determined as the nearest neighbor feature descriptors (denoted as ) and the next nearest neighbor feature descriptor (denoted as ).

[0082] Step 205, determine the ratio between the nearest neighbor feature distance and the next nearest neighbor feature distance as the similarity metric corresponding to the nearest neighbor feature descriptor, and determine whether the similarity metric is less than a preset metric threshold. If it is determined that the similarity metric is less than the preset metric threshold, the nearest neighbor feature descriptor is determined as the best match.

[0083] In the specific implementation, the server determines the nearest neighbor feature distance and the next nearest neighbor feature distance , and the nearest neighbor feature descriptor and next nearest neighbor feature descriptor After that, the nearest neighbor feature distance needs to be calculated and the next nearest neighbor feature distance The ratio between , . Determine the similarity metric corresponding to the nearest neighbor feature descriptor, and judge whether the similarity metric is less than the preset metric threshold (the preset metric threshold is generally set to 0.5). If the similarity metric is less than the preset metric threshold, the nearest neighbor feature descriptor is Determined as the best match.

[0084] It is worth noting that the use of IDCTF feature descriptors and similarity metrics has greatly improved the accuracy and stability of image feature matching, providing a reliable basic technical means for the field of computer vision technology.

[0085] Another embodiment of the present application proposes a system for constructing an image feature descriptor based on discrete cosine transform. The details of the system for constructing an image feature descriptor based on discrete cosine transform proposed in this embodiment are described in detail below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for implementing this embodiment. Figure 6It is a structural schematic diagram of a system for constructing an image feature descriptor based on discrete cosine transform proposed in this embodiment, including: a feature point detection unit 301, a mapping unit 302, a DCT transformation unit 303, a scanning unit 304, a feature vector construction unit 305 and a feature descriptor construction unit 306.

[0086] The feature point detection unit 301 is used to perform feature point detection on the target image using a preset feature point detection algorithm to determine feature points in the target image.

[0087] The mapping unit 302 is used to traverse each feature point, map the image information of the current feature point and its neighborhood to a standard image block of a preset size, and cut and round the standard image block according to a scale factor of a preset ratio to obtain five nested image blocks of different sizes centered on the current feature point.

[0088] The DCT transform unit 303 is used to perform DCT transform on each image block respectively, and generate a DCT coefficient matrix based on the DCT coefficients of each image block.

[0089] The scanning unit 304 is used to traverse each image block, scan the DCT coefficient matrix of the current image block from the upper left corner in a zigzag scanning manner, obtain the scanned DCT coefficients, and remove the DC term coefficients.

[0090] The feature vector construction unit 305 is used to determine the screening ratio based on the size of the current image block, screen the retained DCT coefficients according to the screening ratio, obtain the screened DCT coefficients, and perform normalization processing to form the feature vector of the current image block.

[0091] The feature descriptor construction unit 306 is used to concatenate the feature vectors of each image block to obtain the IDCTF feature descriptor of the current feature point, and further obtain the IDCTF feature descriptors of each feature point in the target image.

[0092] It is not difficult to find that this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details and technical effects mentioned in the above method embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above method embodiment.

[0093] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.

[0094] Another embodiment of the present application provides an electronic device, whose specific structure can be as follows: Figure 7 As shown, it includes: at least one processor 401; and a memory 402 that is communicatively connected to the at least one processor 401; wherein the memory 402 stores instructions that can be executed by the at least one processor 401, and the instructions are executed by the at least one processor 401 so that the at least one processor 401 can execute a method for constructing an image feature descriptor based on discrete cosine transform as described in the above-mentioned method embodiments.

[0095] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage regulators and power management circuits together, which are all well known in the art, so this article will not describe them further. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor.

[0096] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0097] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement a method for constructing an image feature descriptor based on discrete cosine transform as described in the above method embodiments.

[0098] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM (Read-Only Memory), RAM (Random Access Memory), disk or optical disk and other media that can store program codes.

[0099] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.

Claims

1. A method for constructing an image feature descriptor based on discrete cosine transform, characterized in that: include: Use a preset feature point detection algorithm to perform feature point detection on the target image to determine the feature points in the target image; Traverse each feature point, map the image information of the current feature point and its neighborhood to a standard image block of a preset size, and cut and round the standard image block according to a scale factor of a preset ratio to obtain a number of nested image blocks of different sizes centered on the current feature point; Performing DCT transformation on each image block respectively, and generating a DCT coefficient matrix based on the DCT coefficients of each image block; Traverse each image block, scan the DCT coefficient matrix of the current image block from the upper left corner using a zigzag scanning method, obtain the scanned DCT coefficients, and remove the DC term coefficients; Determine a screening ratio based on the size of the current image block, screen the retained DCT coefficients according to the screening ratio, obtain the screened DCT coefficients, and perform normalization processing to form a feature vector of the current image block; The feature vectors of each image block are concatenated together to obtain the IDCTF feature descriptor of the current feature point, and then the IDCTF feature descriptor of each feature point in the target image is obtained; Acquire a reference image and an image to be matched, perform feature point detection on the reference image and the image to be matched using a preset feature point detection algorithm, and determine reference feature points in the reference image and feature points to be matched in the image to be matched; Constructing the IDCTF feature descriptor of each reference feature point in the reference image and the IDCTF feature descriptor of each feature point to be matched in the image to be matched respectively; Traversing each reference feature point in the reference image, calculating the L2 norm feature distance between the IDCTF feature descriptor of the current reference feature point and the IDCTF feature descriptor of each feature point to be matched in the image to be matched; The minimum value and the second minimum value of each L2 norm feature distance are respectively determined as the nearest neighbor feature distance and the second nearest neighbor feature distance, and the IDCTF feature descriptors of the feature points to be matched corresponding to the nearest neighbor feature distance and the second nearest neighbor feature distance are respectively determined as the nearest neighbor feature descriptor and the second nearest neighbor feature descriptor; The ratio between the nearest neighbor feature distance and the next nearest neighbor feature distance is determined as the similarity metric corresponding to the nearest neighbor feature descriptor, and it is determined whether the similarity metric is less than a preset metric threshold. If the similarity metric is determined to be less than the preset metric threshold, the nearest neighbor feature descriptor is determined as the best match.

2. The method for constructing an image feature descriptor based on discrete cosine transform according to claim 1, characterized in that: The size of the standard image block is 32×32, and the preset scale factor is 1.

5. The standard image block is cut and rounded according to the preset scale factor to obtain a number of nested image blocks of different sizes centered on the current feature point, including: The standard image block is truncated and rounded according to scale factors of one, two, three, and four times, respectively, to obtain five nested image blocks of different sizes centered on the current feature point. The five nested image blocks of different sizes include a first image block with a size of 32×32, a second image block with a size of 21×21, a third image block with a size of 14×14, a fourth image block with a size of 9×9, and a fifth image block with a size of 6×6.

3. The method for constructing an image feature descriptor based on discrete cosine transform according to claim 2, characterized in that: The screening ratio is determined based on the size of the current image block, and the retained DCT coefficients are screened according to the screening ratio to obtain the screened DCT coefficients, including: Determine the screening ratio based on the size of the current image block, and determine the screening number based on the screening ratio and the number of DCT coefficients in the DCT coefficient matrix of the current image block , ; The retained DCT coefficients are sorted in the order of zigzag scanning to obtain the sequence to be screened of the current image block, and the first DCT coefficients in the sequence to be screened of the current image block are screened. DCT coefficients are used as the screened DCT coefficients; Among them, the screening ratio corresponding to the first image block is 2%, the screening ratio corresponding to the second image block is 4.5%, the screening ratio corresponding to the third image block is 7%, the screening ratio corresponding to the fourth image block is 17%, and the screening ratio corresponding to the fifth image block is 25%.

4. The method for constructing an image feature descriptor based on discrete cosine transform according to claim 3, characterized in that: Normalization is performed to form the feature vector of the current image block, including: The screened DCT coefficients are normalized based on the maximum value of the modulus value among the screened DCT coefficients, and the feature vector of the current image block is formed according to the screening order.

5. The method for constructing an image feature descriptor based on discrete cosine transform according to claim 4, characterized in that: The feature vectors of each image block are concatenated together to obtain the IDCTF feature descriptor of the current feature point, which is implemented by the following formula: ; ; ; ; in, Indicates The feature point image blocks, Represents the total number of feature points, Indicates The feature point The DCT matrix of an image block is Indicates zigzag scanning, Represents a filtering operation. represents the normalization operation, Indicates The feature point The feature vector of the image block, Indicates IDCTF feature descriptor of feature points.

6. A method for constructing an image feature descriptor based on discrete cosine transform according to any one of claims 1 to 5, characterized in that: Perform DCT transformation on each image block separately, and generate DCT coefficient matrix based on DCT coefficient of each image block, which is realized by the following formula: ; ; in, and Respectively The feature point The width and height of the image block, Indicates The feature point The midpoint of the image block The gray value of and is the normalization coefficient, Indicates The feature point The DCT coefficient matrix of the image block Line DCT coefficients of the column.

7. A system for constructing image feature descriptors based on discrete cosine transform, characterized in that: include: A feature point detection unit, used to perform feature point detection on a target image using a preset feature point detection algorithm to determine feature points in the target image; A mapping unit is used to traverse each feature point, map the image information of the current feature point and its neighborhood to a standard image block of a preset size, and intercept and round the standard image block according to a scale factor of a preset ratio to obtain five nested image blocks of different sizes centered on the current feature point; A DCT transform unit, used for performing DCT transform on each image block respectively, and generating a DCT coefficient matrix based on the DCT coefficients of each image block; A scanning unit, used for traversing each image block, scanning the DCT coefficient matrix of the current image block from the upper left corner in a zigzag scanning manner, obtaining the scanned DCT coefficients, and removing the DC term coefficients; A feature vector construction unit, used to determine a screening ratio based on the size of the current image block, screen the retained DCT coefficients according to the screening ratio, obtain the screened DCT coefficients, and perform normalization processing to form a feature vector of the current image block; A feature descriptor construction unit is used to concatenate the feature vectors of each image block to obtain the IDCTF feature descriptor of the current feature point, and then obtain the IDCTF feature descriptor of each feature point in the target image; Acquire a reference image and an image to be matched, perform feature point detection on the reference image and the image to be matched using a preset feature point detection algorithm, and determine reference feature points in the reference image and feature points to be matched in the image to be matched; Constructing the IDCTF feature descriptor of each reference feature point in the reference image and the IDCTF feature descriptor of each feature point to be matched in the image to be matched respectively; Traversing each reference feature point in the reference image, calculating the L2 norm feature distance between the IDCTF feature descriptor of the current reference feature point and the IDCTF feature descriptor of each feature point to be matched in the image to be matched; The minimum value and the second minimum value of each L2 norm feature distance are respectively determined as the nearest neighbor feature distance and the second nearest neighbor feature distance, and the IDCTF feature descriptors of the feature points to be matched corresponding to the nearest neighbor feature distance and the second nearest neighbor feature distance are respectively determined as the nearest neighbor feature descriptor and the second nearest neighbor feature descriptor; The ratio between the nearest neighbor feature distance and the next nearest neighbor feature distance is determined as the similarity metric corresponding to the nearest neighbor feature descriptor, and it is determined whether the similarity metric is less than a preset metric threshold. If the similarity metric is determined to be less than the preset metric threshold, the nearest neighbor feature descriptor is determined as the best match.

8. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method for constructing an image feature descriptor based on discrete cosine transform as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it can implement a method for constructing an image feature descriptor based on discrete cosine transform as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Partial characteristic description method

    CN102842133A