Image feature extraction method, system, electronic device and storage medium
By normalizing the brightness of the color image pyramid and determining the direction angles of the corner points, combined with BRIEF and rotation robust binary descriptors, the problem of insufficient adaptability of ORB features under lighting changes is solved, and fast and robust image feature point extraction is achieved.
Patent Information
- Application Number
- CN202211049068.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-08-30
AI Technical Summary
The existing ORB features have limited adaptability under illumination changes, and their rotation invariance is slightly redundant for ground mobile robots, which increases the probability of mismatching and makes image feature extraction less robust.
By obtaining the color image pyramid, performing brightness normalization, extracting corner points, determining the direction angles of the corner points, and combining the BRIEF descriptor and the rotation robust binary descriptor, the image features are obtained.
It achieves fast and robust image feature point extraction, reduces the impact of illumination changes on feature point extraction and matching, and reduces the probability of mismatching.
Smart Images

Figure CN115409994B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image feature extraction method, system, electronic device and storage medium. Background Art
[0002] With the development of autonomous driving, SLAM (Simultaneous Localization and Mapping) technology is gradually entering a product transition phase. SLAM technology involves both mapping and localization. Typically, a visual odometry (i.e., the front end) estimates rough camera motion based on information from adjacent images, providing a good initial value for the back end (which optimizes and fuses the rough camera motion estimates from adjacent image information). Visual odometry algorithms are primarily categorized as feature point methods and direct methods. Feature point-based front ends offer advantages such as stability and insensitivity to lighting and dynamic objects, making them a more mature solution.
[0003] Currently, there are numerous types of feature points in the field of computer vision, such as SIFT, SURE, and ORB. ORB features take rotation and scaling into account, maintaining good performance under translation, rotation, and scaling transformations. However, ORB features have limited adaptability to lighting changes, and while their rotation invariance is significant for drones, it is redundant for ground-based mobile robots and increases the probability of mismatches.
[0004] In summary, there is an urgent need for an image feature extraction method that can quickly and robustly extract image feature points. Summary of the Invention
[0005] In view of the above-mentioned shortcomings of the prior art, the present invention provides an image feature extraction method, system, electronic device and storage medium to quickly and robustly extract image feature points.
[0006] The present application provides an image feature extraction method, wherein the image feature extraction method includes:
[0007] Get the color image pyramid;
[0008] Performing brightness normalization processing on each layer of the color image in the color image pyramid to obtain a brightness-normalized color image, wherein the color image includes a plurality of pixels;
[0009] Extracting corner points of each layer of color image after brightness normalization;
[0010] Determining the direction angle of the corner point according to the corner point;
[0011] Determining a BRIEF descriptor and a rotation robust binary descriptor according to the direction angle;
[0012] The BRIEF descriptor and the rotation robust binary descriptor are combined to obtain the image feature.
[0013] In an exemplary embodiment of the present application, brightness normalization processing is performed on each layer of the color image in the color image pyramid, including:
[0014] If the brightness modulus of a pixel in the color image is greater than or equal to a preset brightness modulus threshold, determining a ratio of the brightness of the pixel to the brightness modulus as the normalized brightness of the pixel;
[0015] If the brightness of a pixel in the color image is less than a preset brightness modulus threshold, the ratio of the brightness of the pixel to the preset brightness modulus threshold is determined as the normalized brightness of the pixel.
[0016] In an exemplary embodiment of the present application, extracting corner points of each layer of the color image after brightness normalization includes:
[0017] Acquire a plurality of pixel points in different image channels of the brightness-normalized color image, wherein all the pixel points are located on the same circumference formed by a certain pixel in the brightness-normalized color image as the center and a first preset radius;
[0018] If the brightness modulus of several consecutive pixel points on the same circle are all greater than the sum of the brightness modulus of the pixel and a preset brightness modulus threshold or are all less than the difference between the brightness modulus of the pixel and the preset brightness modulus threshold, the pixel is determined to be a feature point and the corner point is obtained.
[0019] In an exemplary embodiment of the present application, the image feature extraction method further includes:
[0020] If the number of feature points in the preset area is greater than 1, compare the brightness characteristics of each feature point to obtain a comparison result;
[0021] According to the comparison result, it is determined that the feature point with the most significant brightness feature is the corner point.
[0022] In an exemplary embodiment of the present application, determining the direction angle of the corner point according to the corner point includes:
[0023] Determining image moments of different color channels of the corner points according to the corner points;
[0024] Determining the centroids and centers of different color channels of the corner points according to the image moments;
[0025] According to the centroid and the center, the direction angles of the different color channels of the corner point are determined.
[0026] In an exemplary embodiment of the present application, determining a BRIEF descriptor according to the direction angle includes:
[0027] Determine the integer index of the corner point according to the direction angle and a preset BRIEF descriptor binary length;
[0028] The BRIEF descriptor is determined according to the integer index and a binary descriptor corresponding to a preset 0° direction angle.
[0029] In an exemplary embodiment of the present application, determining a rotation robust binary descriptor according to the direction angle includes:
[0030] Constructing a two-dimensional coordinate system according to the corner points and the centroid;
[0031] In the two-dimensional coordinate system, a plurality of point pairs are selected within an area formed by a second preset radius with the corner point as the center of the circle;
[0032] Obtaining the grayscale value of each point in each point pair;
[0033] Determine the operation result of each point pair according to the grayscale value and preset operation rules;
[0034] The operation results of each point pair are combined to obtain the rotation robust binary descriptor.
[0035] In a second aspect, the present application provides an image feature extraction system, characterized by comprising:
[0036] Color image pyramid building module, used to obtain color image pyramid;
[0037] a normalization processing module, configured to perform brightness normalization processing on each layer of the color image in the color image pyramid to obtain a color image after brightness normalization, wherein the color image includes a plurality of pixels;
[0038] A corner point extraction module, used to extract the corner points of each layer of the color image after brightness normalization;
[0039] A direction angle determination module, configured to determine the direction angle of the corner point based on the corner point;
[0040] A descriptor determination module, configured to determine a BRIEF descriptor and a rotation robust binary descriptor according to the direction angle;
[0041] The image feature determination module is used to combine the BRIEF descriptor and the rotation robust binary descriptor to obtain the image feature.
[0042] In another aspect, the present application further provides an electronic device, comprising:
[0043] one or more processors;
[0044] The storage device is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements the image feature extraction method as described above.
[0045] In another aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of a computer, the computer performs the image feature extraction method as described above.
[0046] Beneficial effects of the present invention:
[0047] The method of the present application can extract image feature points quickly and robustly.
[0048] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:
[0050] Figure 1 This is a flowchart of an image feature extraction method shown in an exemplary embodiment of the present application;
[0051] Figure 2 for Figure 1 The flowchart of step S120 in the illustrated embodiment in an exemplary embodiment;
[0052] Figure 3 for Figure 1 The flowchart of step S130 in the illustrated embodiment in an exemplary embodiment;
[0053] Figure 4 A flowchart of an image feature extraction method shown as another exemplary embodiment of the present application;
[0054] Figure 5 for Figure 1 The flowchart of step S140 in the illustrated embodiment in an exemplary embodiment;
[0055] Figure 6 for Figure 1A flowchart of determining a BRIEF descriptor according to the direction angle in step S150 in an exemplary embodiment is shown;
[0056] Figure 7 for Figure 1 A flowchart of determining a rotation robust binary descriptor according to the direction angle in step S150 in an exemplary embodiment is shown;
[0057] Figure 8 This is a flowchart of an image feature extraction method according to a specific embodiment of the present application;
[0058] Figure 9 A block diagram of an image feature extraction system shown as an exemplary embodiment of the present application;
[0059] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0060] The following describes the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art will readily appreciate the other advantages and benefits of the present invention from the disclosure herein. The present invention may also be implemented or applied through various other specific embodiments, and the various details in this specification may be modified or altered based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are intended only to illustrate the present invention and are not intended to limit the scope of protection of the present invention.
[0061] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.
[0062] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention.
[0063] See also Figure 1 , Figure 1 The flowchart of the image feature extraction method is shown as an exemplary embodiment of the present application.
[0064] like Figure 1As shown, in an exemplary embodiment of the present application, the image feature extraction method includes at least step S110, step S120, step S130, step S140 and step S150, which are described in detail as follows:
[0065] Step S110. Obtain a color image pyramid;
[0066] Step S120: performing brightness normalization processing on each layer of the color image in the color image pyramid to obtain a brightness normalized color image, where the color image includes a plurality of pixels;
[0067] Step S130: extracting corner points of each layer of color image after brightness normalization;
[0068] Step S140: Determine the direction angle of the corner point according to the corner point;
[0069] Step S150. Determine a BRIEF descriptor and a rotation robust binary descriptor according to the direction angle;
[0070] It should be noted that the full name of the BRIEF descriptor in English is Binary Robust Independent Elementary Features, which means binary robust independent basic features. The BRIEF descriptor is a binary-coded descriptor. It takes the key point as the center, takes a window of fixed size, and randomly selects a pair of points (x0, y0) (x1, y1) in the window. If the grayscale value of (x0, y0) is greater than or equal to (x1, y1), it is recorded as 0, and if it is less than, it is recorded as 1. If 256 pairs of points are selected, a 256-dimensional binary descriptor can be obtained. To compare whether the key points of the two images are the same point, just compare the Hamming distance of the descriptors. Step S160. Combine the BRIEF descriptor and the rotation robust binary descriptor to obtain image features.
[0071] Related technologies use ORB features for computer vision recognition. After researching related technologies, the inventors discovered that ORB features have limited adaptability to changes in illumination. While their rotational invariance is crucial for drones, it is redundant for ground-based mobile robots and increases the probability of mismatches. Therefore, the inventors considered adding a brightness normalization step to the image feature extraction process to reduce the impact of illumination on feature point extraction and matching. Furthermore, they added an angle binary descriptor (i.e., a BIEF descriptor) to the rotation-invariant binary descriptor to reduce mismatches.
[0072] See also Figure 2 , Figure 2 for Figure 1 The illustrated embodiment is a flow chart of step S120 in an exemplary embodiment.
[0073] like Figure 2 As shown, in an exemplary embodiment of the present application, the process of performing brightness normalization processing on each layer of the color image in the color image pyramid includes steps S210 and S220, which are described in detail as follows:
[0074] Step S210: If the brightness modulus of a pixel in the color image is greater than or equal to a preset brightness modulus threshold, the ratio of the brightness of the pixel to the brightness modulus is determined as the normalized brightness of the pixel;
[0075] Specifically, pixels are selected based on experience or statistical results. For example, based on visual observation, pixels with a large brightness difference from their surrounding areas are selected.
[0076] It should be noted that the preset brightness modulus threshold is greater than 0, and the preset brightness modulus threshold can be set voluntarily, which will not be described in detail here.
[0077] Step S220: If the brightness of a pixel in the color image is less than the preset brightness modulus threshold, the ratio of the brightness of the pixel to the preset brightness modulus threshold is determined as the normalized brightness of the pixel.
[0078] Exemplarily, a method of performing brightness normalization processing on each layer of the color image in the color image pyramid includes:
[0079]
[0080] Among them, I 归一化 is the brightness after normalization, Ip is the brightness of the pixel before normalization (three-dimensional vector), I T is the preset brightness modulus threshold, |I p | is the brightness modulus of the pixel before normalization.
[0081] Specifically, the brightness of a pixel can be obtained by obtaining the brightness of the three color channels of the image through an image acquisition device, and then the brightness of the three channels is combined together according to a preset RGB method or other encoding method to obtain a vector, which is the brightness of the pixel.
[0082] See also Figure 3 , Figure 3 for Figure 1 The illustrated embodiment is a flow chart of step S130 in an exemplary embodiment.
[0083] like Figure 3 As shown, in an exemplary embodiment of the present application, Figure 1 In the illustrated embodiment, the process of extracting the corner points of each layer of the color image after brightness normalization in step S130 includes steps S310 and S320, which are described in detail as follows:
[0084] Step S310: Acquire a plurality of pixels in different image channels of the brightness-normalized color image, wherein all pixels are located on a same circle formed by a first preset radius and a certain pixel in the brightness-normalized color image as the center.
[0085] It should be noted that the first preset radius can be set by yourself and will not be described in detail here.
[0086] Step S320: If the luminance modulus of several consecutive pixels on the same circle are all greater than the sum of the luminance modulus of the pixel and a preset luminance modulus threshold or are all less than the difference between the luminance modulus of the pixel and the preset luminance modulus threshold, the pixel is determined to be a feature point and a corner point is obtained.
[0087] See also Figure 4 , Figure 4 This is a flowchart of an image feature extraction method shown in another exemplary embodiment of the present application.
[0088] like Figure 4 As shown, in another exemplary embodiment of the present application, the image feature extraction method further includes steps S410 and S420, which are described in detail as follows:
[0089] Step S410: If the number of feature points in the preset area is greater than 1, compare the brightness characteristics of each feature point to obtain a comparison result;
[0090] It should be noted that the preset area can be set by yourself and will not be described in detail here.
[0091] Step S420: According to the comparison result, confirm that the feature point with the most significant brightness feature is a corner point.
[0092] It should be noted that the brightness feature includes the average variance of the difference between the brightness modulus of each consecutive pixel point and the brightness modulus of the corner point, or the number of consecutive pixels. For example, the feature point with the largest average variance of the difference between the brightness modulus of each consecutive pixel point and the brightness modulus of the corner point is determined as the corner point, or the feature point with the largest number of consecutive pixels is determined as the corner point.
[0093] Continuous pixels refer to specific pixels whose luminance modulus is greater than the sum of the luminance modulus of the pixel and a preset luminance modulus threshold or specific pixels whose luminance modulus is less than the difference between the luminance modulus of the pixel and the preset luminance modulus threshold.
[0094] See also Figure 5 , Figure 5 for Figure 1 The illustrated embodiment is a flow chart of step S140 in an exemplary embodiment.
[0095] like Figure 5 As shown, in an exemplary embodiment of the present application, Figure 1In the illustrated embodiment, the process of determining the direction angle of the corner point according to the corner point in step S140 includes steps S510, S520, and S530, which are described in detail as follows:
[0096] Step S510. Determine the image moments of different color channels of the corner points according to the corner points;
[0097] For example, the image moments of different color channels of the corner points are determined as follows:
[0098]
[0099] Among them, m pq is the image moment, I(x, y) is the normalized brightness modulus of each pixel in the circular area formed with the corner point as the center and the second preset radius, B is the interval range formed by the horizontal and vertical boundary values corresponding to the circular area formed with the corner point as the center and the second preset radius, x and y are the horizontal and vertical coordinates of each pixel, respectively, which are the horizontal and vertical coordinates corresponding to each pixel in the two-dimensional coordinate system constructed according to the corner point and the centroid, and p and q can both take the value of 0 or 1.
[0100] It should be noted that the two-dimensional plane rectangular coordinate system constructed based on the corner point and the center of mass is specifically: a two-dimensional plane rectangular coordinate system with the corner point as the origin and the line connecting the origin and the center of mass as the X-axis (the direction close to the center of mass is the positive direction of the X-axis), wherein the unit horizontal coordinate and the unit vertical coordinate length are both in units of single pixels.
[0101] Step S520. Determine the centroid and center of different color channels of the corner point based on the image moment;
[0102] For example, the centroid of the corner points is determined according to the image moment as follows:
[0103]
[0104] Among them, C is the centroid of the corner point, m 10 is the image moment corresponding to when p is 1 and q is 0, m 00 is the image moment corresponding to when p is 0 and q is 0, m 01 It is the image moment corresponding to when p is 0 and q is 1.
[0105] For example, the center of the corner point is determined according to the image moment as follows:
[0106]
[0107] Where O is the center of the corner point, and are the horizontal and vertical coordinates corresponding to the corner point in the two-dimensional coordinate system constructed based on the corner point and the centroid, that is, the horizontal and vertical coordinates of the origin (0, 0).
[0108] Step S530: Determine the direction angles of different color channels of the corner points based on the centroid and the center.
[0109] For example, the direction angles of different color channels of the corner points are determined according to the centroid and the center as follows:
[0110]
[0111] Where θ is the direction angle, m 10 is the image moment corresponding to when p is 1 and q is 0, m 00 is the image moment corresponding to when p is 0 and q is 0, m 01 It is the image moment corresponding to when p is 0 and q is 1; and are the horizontal and vertical coordinates corresponding to the corner point in the two-dimensional coordinate system constructed based on the corner point and the centroid, that is, the horizontal and vertical coordinates of the origin (0, 0).
[0112] See also Figure 6 , Figure 6 for Figure 1 The illustrated embodiment is a flowchart of determining a BRIEF descriptor according to the direction angle in step S150 in an exemplary embodiment.
[0113] like Figure 6 As shown, in an exemplary embodiment of the present application, Figure 1 In the illustrated embodiment, the process of determining the BRIEF descriptor according to the direction angle in step S150 includes steps S610 and S620, which are described in detail as follows:
[0114] Step S610: Determine the integer index of the corner point according to the direction angle and the preset BRIEF descriptor binary length;
[0115] For example, the integer index of the corner point is determined according to the direction angle and the preset BRIEF descriptor binary length as follows:
[0116] l=round(L θ ·θ / 180),
[0117] Where l is an integer index, l∈[-L θ ,L θ ]; θ is the direction angle, L θ The preset BRIEF descriptor binary length, where round means rounding the result to an integer.
[0118] Step S620: Determine a BRIEF descriptor according to the integer index and the binary descriptor corresponding to the preset 0° direction angle.
[0119] Exemplarily, the method of determining the BRIEF descriptor according to the integer index and the binary descriptor corresponding to the preset 0° direction angle includes:
[0120] D θ =shift(D θ=0 ,l),
[0121] Among them, D θ is the BRIEF descriptor; shift means shift, D θ=0 It is the binary descriptor corresponding to the preset 0° direction angle, l is an integer index, and l represents left shift and right shift when it is positive or negative, respectively.
[0122] See also Figure 7 , Figure 7 for Figure 1 The illustrated embodiment is a flowchart of determining a rotation robust binary descriptor according to the direction angle in step S150 in an exemplary embodiment.
[0123] like Figure 7 As shown, in an exemplary embodiment of the present application, Figure 1 In the illustrated embodiment, the process of determining the rotation robust binary descriptor according to the direction angle in step S150 includes steps S710, S720, S730, S740, and S750, which are described in detail as follows:
[0124] Step S710. Construct a two-dimensional coordinate system based on the corner points and the centroid;
[0125] The specific method of constructing a two-dimensional coordinate system based on corner points and centroids is as described above and will not be repeated here.
[0126] Step S720. In the two-dimensional coordinate system, select multiple point pairs within a circular area formed with a second preset radius and a corner point as the center;
[0127] Specifically, the point pairs are selected according to a preset rule or pattern. The preset rule or pattern can be set by oneself and will not be described in detail here.
[0128] Step S730. Obtain the grayscale value of each point in each point pair;
[0129] Step S740. Determine the operation result of each point pair according to the gray value and the preset operation rules;
[0130] The preset operation rules can be set by yourself. For example, the preset T operation rules can be:
[0131]
[0132] Among them, T(P(A, B)) is the operation result, I A and I B are the grayscale values of the first and second points in a selected point pair respectively.
[0133] Grayscale values can be obtained through image acquisition equipment.
[0134] Step S750: Combine the T operation results of each point pair to obtain a rotation robust binary descriptor.
[0135] Specifically, the T operation results of each point pair are combined according to the arrangement order of the point pairs to obtain the rotation robust binary descriptor.
[0136] like Figure 8 As shown, in a specific embodiment, the steps of the image feature extraction method are as follows:
[0137] 1. Obtain a color image pyramid;
[0138] Second, perform brightness normalization on each layer of the color image in the color image pyramid to obtain a color image after brightness normalization. The color image includes multiple pixels, and the normalization method is as follows:
[0139]
[0140] Among them, I 归一化 is the brightness after normalization, Ip is the brightness of the pixel before normalization (three-dimensional vector), I T is the preset brightness modulus threshold, |I p | is the brightness modulus of the pixel before normalization.
[0141] 3. Extract the corner points of each layer of color image after brightness normalization, specifically:
[0142] Acquire a plurality of pixel points in different image channels of the brightness-normalized color image, wherein all the pixel points are located on the same circumference formed by a certain pixel in the brightness-normalized color image as the center and a first preset radius;
[0143] If the brightness modulus of several consecutive pixels on the same circumference are all greater than the sum of the brightness modulus of the pixel and the preset brightness modulus threshold, or are all less than the difference between the brightness modulus of the pixel and the preset brightness modulus threshold, the pixel is determined to be a feature point and a corner point is obtained.
[0144] If the number of feature points in the preset area is greater than 1, the number of consecutive pixels of each feature point (specific pixels whose luminance modulus is greater than the sum of the luminance modulus of the pixel and the preset luminance modulus threshold or specific pixels whose luminance modulus is less than the difference between the luminance modulus of the pixel and the preset luminance modulus threshold) is compared to obtain a comparison result;
[0145] According to the comparison results, the corresponding feature point with the largest number of consecutive pixels is confirmed to be the corner point.
[0146] 4. Determine the direction angle of the corner point based on the corner point. The specific steps are as follows:
[0147] First, based on the corner points, the image moments of different color channels of the corner points are determined as follows:
[0148]
[0149] Among them, m pq is the image moment, I(x, y) is the brightness modulus of each pixel in the circular area formed by the second preset radius with the corner point as the center, B is the interval range formed by the horizontal coordinate boundary value and the vertical coordinate boundary value of the circular area formed by the second preset radius with the corner point as the center, x and y are the horizontal coordinate and vertical coordinate of each pixel respectively, and the horizontal coordinate and vertical coordinate are the horizontal coordinate and vertical coordinate corresponding to each pixel in the two-dimensional coordinate system constructed according to the corner point and the centroid, and both p and q can take the value of 0 or 1.
[0150] It should be noted that the two-dimensional coordinate system constructed based on the corner point and the center of mass is specifically: a two-dimensional plane rectangular coordinate system with the corner point as the origin and the line connecting the origin and the center of mass as the X-axis (the direction close to the center of mass is the positive direction of the X-axis), wherein the unit horizontal coordinate and the unit vertical coordinate length are both in units of single pixels.
[0151] Then, according to the image moment, the corner points and the center line are determined as follows:
[0152]
[0153]
[0154] Among them, C is the centroid of the corner point, m 10 The image moment corresponding to when p is 1 and q is 0, m 00 The image moment corresponding to when p is 0 and q is 0, m 01 is the image moment corresponding to when p is 0 and q is 1; O is the center of the corner point, and are the horizontal and vertical coordinates corresponding to the corner point in the two-dimensional coordinate system constructed based on the corner point and the centroid, that is, the horizontal and vertical coordinates of the origin (0, 0).
[0155] Next, based on the centroid and center, determine the direction angles of different color channels of the corner points. The specific method is:
[0156]
[0157] Where θ is the direction angle, m 10 The image moment corresponding to when p is 1 and q is 0, m 00 The image moment corresponding to when p is 0 and q is 0, m 01 The image moment corresponding to when p is 0 and q is 1; and are the horizontal and vertical coordinates corresponding to the corner point in the two-dimensional coordinate system constructed based on the corner point and the centroid, that is, the horizontal and vertical coordinates of the origin (0, 0).
[0158] Subsequently, the BRIEF descriptor and the rotation robust binary descriptor are determined according to the direction angle. Specifically, the steps for determining the BRIEF descriptor are as follows:
[0159] According to the direction angle and the preset BRIEF descriptor binary length, the integer index of the corner point is determined as follows:
[0160] l=round(L θ ·θ / 180),
[0161] Where l is an integer index, l∈[-L θ ,L θ ]; θ is the direction angle, L θ The preset BRIEF descriptor binary length, where round means rounding the result to an integer.
[0162] Determine the BRIEF descriptor based on the integer index and the binary descriptor corresponding to the preset 0° direction angle, specifically:
[0163] D θ =shift(d θ=0 ,l),
[0164] Among them, D θ is the BRIEF descriptor; shift means shift, D θ=0 It is the binary descriptor corresponding to the preset 0° direction angle, l is an integer index, and l represents left shift and right shift when it is positive or negative, respectively.
[0165] The steps to determine the rotation robust binary descriptor are:
[0166] According to the corner points and the centroid, a two-dimensional coordinate system is constructed. The specific method of constructing the two-dimensional coordinate system is as described above and will not be repeated here.
[0167] In the two-dimensional coordinate system, multiple point pairs are selected within a circular area formed by a second preset radius with the corner point as the center;
[0168] Get the grayscale value of each point in each point pair;
[0169] The operation result of each point pair is determined according to the grayscale value and the preset operation rules. The preset operation rules can be:
[0170]
[0171] Among them, T(P(A, B)) is the operation result, I A and I B are the grayscale values of the first and second points in a selected point pair respectively.
[0172] The operation results of each point pair are combined to obtain a rotation robust binary descriptor.
[0173] 6. Combine the BRIEF descriptors of different color channels of the corner points with the rotation robust binary descriptors to obtain image features, that is, combine the rotation robust binary descriptors of the three color channels with the BRIEF descriptor to obtain image features.
[0174] See also Figure 9 , an embodiment of the present application also provides an image feature extraction system 900.
[0175] like Figure 9 As shown, the image feature extraction system 900 of the embodiment of the present application includes:
[0176] A color image pyramid building module 910 is used to obtain a color image pyramid;
[0177] A normalization processing module 920 is configured to perform brightness normalization processing on each layer of the color image in the color image pyramid to obtain a brightness normalized color image, where the color image includes a plurality of pixels.
[0178] Corner point extraction module 930, used to extract corner points of each layer of color image after brightness normalization;
[0179] A direction angle determination module 940 is used to determine the direction angle of the corner point based on the corner point;
[0180] A descriptor determination module 950 is configured to determine a BRIEF descriptor and a rotation robust binary descriptor according to the direction angle;
[0181] The image feature determination module 960 is used to combine the BRIEF descriptor and the rotation robust binary descriptor to obtain image features.
[0182] It should be noted that the image feature extraction system provided in the above embodiment and the image feature extraction method provided in the above embodiment are based on the same concept. The specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here. In actual applications, the image feature extraction system provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above. This is not limited here.
[0183] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the image feature extraction method provided in the above-mentioned embodiments.
[0184] Figure 10 The following is a schematic diagram showing the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application. Figure 10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0185] like Figure 10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage portion to the random access memory (RAM) 1003, such as executing the method described in the above embodiment. Various programs and data required for system operation are also stored in the RAM 1003. The CPU 1001, ROM 1002 and RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0186] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section including a hard disk; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. Removable media 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1010 as needed, so that computer programs read therefrom can be installed in the storage section as needed.
[0187] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1009, and / or installed from a removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the various functions defined in the system of the present application are executed.
[0188] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0189] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0190] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.
[0191] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When executed by a computer processor, the computer program causes the computer to perform the image feature extraction method described above. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device.
[0192] Another aspect of the present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the image feature extraction method provided in each of the above embodiments.
[0193] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, any equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.
Claims
1. A method for extracting image features, characterized in that: The image feature extraction includes: Get the color image pyramid; Performing brightness normalization processing on different color channels in each layer of the color image in the color image pyramid to obtain a color image after brightness normalization, wherein the color image includes multiple pixels, and a vector obtained by combining the brightness of different color channels is the brightness of the pixel; performing brightness normalization processing on different color channels in each layer of the color image in the color image pyramid, including: if the brightness modulus of a pixel in the color image is greater than or equal to a preset brightness modulus threshold, determining the ratio of the brightness of the pixel to the brightness modulus as the normalized brightness of the pixel; if the brightness of a pixel in the color image is less than the preset brightness modulus threshold, determining the ratio of the brightness of the pixel to the preset brightness modulus threshold as the normalized brightness of the pixel; Obtaining a plurality of pixel points in different color channels of each layer of the color image after brightness normalization to obtain corner points; Determining, according to the corner point, direction angles of different color channels of the corner point; Determining a BRIEF descriptor and a rotation robust binary descriptor according to the direction angle; The BRIEF descriptors and rotation robust binary descriptors of different color channels are combined to obtain the image features.
2. The image feature extraction method according to claim 1, wherein: Extracting corner points of each layer of the color image after brightness normalization, including: Acquire a plurality of pixel points in different color channels of the brightness-normalized color image, wherein all of the pixel points are located on the same circumference formed by a certain pixel in the brightness-normalized color image as the center and a first preset radius; If the brightness modulus of several consecutive pixel points on the same circle are all greater than the sum of the brightness modulus of the pixel and a preset brightness modulus threshold or are all less than the difference between the brightness modulus of the pixel and the preset brightness modulus threshold, the pixel is determined to be a feature point and the corner point is obtained.
3. The image feature extraction method according to claim 2, characterized in that: Also includes: If the number of feature points in the preset area is greater than 1, compare the brightness characteristics of each feature point to obtain a comparison result; According to the comparison result, it is determined that the feature point with the most significant brightness feature is the corner point.
4. The image feature extraction method according to claim 1, wherein: Determining the direction angle of the corner point according to the corner point includes: Determining image moments of different color channels of the corner points according to the corner points; Determining the centroids and centers of different color channels of the corner points according to the image moments; According to the centroid and the center, the direction angles of the different color channels of the corner point are determined.
5. The image feature extraction method according to claim 1, wherein: Determine a BRIEF descriptor according to the direction angle, including: Determine the integer index of the corner point according to the direction angle and a preset BRIEF descriptor binary length; The BRIEF descriptor is determined according to the integer index and a binary descriptor corresponding to a preset 0° direction angle.
6. The image feature extraction method according to claim 4, characterized in that: Determining a rotation robust binary descriptor according to the direction angle includes: Constructing a two-dimensional coordinate system according to the corner points and the centroid; In the two-dimensional coordinate system, a plurality of point pairs are selected within a circular area formed with the corner point as the center and a second preset radius; Obtaining the grayscale value of each point in each point pair; Determine the operation result of each point pair according to the grayscale value and preset operation rules; The operation results of each point pair are combined to obtain the rotation robust binary descriptor.
7. An image feature extraction system, characterized in that: include: Color image pyramid building module, used to obtain color image pyramid; a normalization processing module, configured to perform brightness normalization processing on different color channels in each layer of the color image in the color image pyramid to obtain a color image after brightness normalization, wherein the color image includes a plurality of pixels, and a vector obtained by combining the brightness of different color channels is the brightness of the pixel; Performing brightness normalization processing on different color channels in each layer of the color image in the color image pyramid, including: if the brightness modulus of a pixel in the color image is greater than or equal to a preset brightness modulus threshold, determining the ratio of the brightness of the pixel to the brightness modulus as the normalized brightness of the pixel; if the brightness of a pixel in the color image is less than the preset brightness modulus threshold, determining the ratio of the brightness of the pixel to the preset brightness modulus threshold as the normalized brightness of the pixel; A corner point extraction module is used to obtain a number of pixel points in different color channels of each layer of the color image after brightness normalization to obtain corner points; A direction angle determination module, configured to determine the direction angles of different color channels of the corner point according to the corner point; A descriptor determination module, configured to determine a BRIEF descriptor and a rotation robust binary descriptor according to the direction angle; The image feature determination module is used to combine the BRIEF descriptors and rotation robust binary descriptors of different color channels to obtain the image features.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the image feature extraction method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to perform the image feature extraction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Characteristic point extraction and matching method and system based on color image, and medium
CN113011498A
Method for influencing virtual objects of augmented reality
US20200372723A1