Image feature point extraction method, target detection method, vehicle and storage medium
By using grayscale distribution data to determine global and local thresholds in the image feature point extraction method, and combining the FAST algorithm to perform two-level feature point extraction, the problem of low accuracy of feature point extraction in the existing technology is solved, and a higher Extraction accuracy and robustness.
Patent Information
- Application Number
- CN202311034035.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-21
AI Technical Summary
The existing feature point extraction methods have low accuracy, especially when there are shadows and illumination unevenness in the image, resulting in missed and erroneous extraction of candidate feature points.
By obtaining the grayscale distribution data of the target image, the global threshold and local threshold are determined, and the two-level feature point extraction is performed in combination with the FAST algorithm, and non-maximum suppression is performed to retain the target feature point.
It improves the accuracy of feature point extraction, reduces the situation of missed extraction and missed extraction, and enhances the robustness and adaptability of the algorithm.
Smart Images

Figure CN119494964A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image feature point extraction method, a target detection method, a vehicle and a storage medium. Background Art
[0002] In the field of digital image processing, feature points are very important local features of an image. They concentrate a lot of shape information in the image, reflecting points with drastic brightness changes on a two-dimensional image or points with maximum curvature on an image edge curve. Image feature detection and feature extraction is one of the basic tasks in today's computer vision technology research, because it is usually the origin of many real-world human-computer technology interactions, including robotics and self-driving cars, satellite and aerial image analysis.
[0003] At present, among the commonly used feature extraction methods, the Scale-Invariant Feature Transformation (SIFT) algorithm and the Speeded Up Robust Features (SURF) algorithm make the feature point extraction process extremely time-consuming due to their computational complexity, and are difficult to be applied in some scenarios where speed is important. The FAST algorithm detects points of interest very quickly, so it is very suitable for application scenarios where speed needs to be prioritized. However, the FAST algorithm also has some defects. Due to factors such as shadows and uneven illumination in the image, the contrast of different parts of the image is different. The use of a fixed threshold will lead to poor algorithm robustness, low stability, and poor adaptability; and because the performance of the pixels near the real feature points is similar to that of the real feature points, these points will be detected as feature points, resulting in multiple feature point blocks in the extraction result, which reduces the application performance of the algorithm. Therefore, an accurate feature point extraction method is urgently needed. Summary of the invention
[0004] The embodiments of the present application provide an image feature point extraction method, a target detection method, a vehicle and a storage medium to solve the problem of low extraction accuracy of existing feature point extraction schemes.
[0005] In a first aspect, an embodiment of the present application provides a method for extracting image feature points, comprising:
[0006] Acquire grayscale distribution data of the target image, and determine a global threshold value according to the grayscale distribution data;
[0007] Extract feature points from the target image based on the FAST algorithm and the global threshold to obtain initial feature points;
[0008] Determine a local threshold value corresponding to each initial feature point according to the grayscale distribution data;
[0009] Extract feature points based on the FAST algorithm and the local threshold to obtain candidate feature points;
[0010] Non-maximum suppression is performed on the neighborhood corresponding to each candidate feature point to retain the target feature point.
[0011] In a possible implementation manner, determining a global threshold according to the grayscale distribution data includes:
[0012] Using a preset threshold t, the grayscale range [0, L-1] in the grayscale distribution data is divided into two sub-ranges: [0, t] and [t+1, L-1];
[0013] Calculate the entropy values for the two subranges separately:
[0014]
[0015]
[0016] Where Q1 is the entropy of the subrange [0, t]; Q2 is the entropy of the subrange [t+1, L-1]; p i is the probability of occurrence of the i-th grayscale value;
[0017] The sum of the entropy values corresponding to the two sub-ranges is the total entropy;
[0018] The preset threshold t corresponding to the maximum sum of total entropy is recorded as t max , the preset threshold t corresponding to the minimum sum of total entropy is recorded as t min ;
[0019] According to t max and t min Calculate the global threshold:
[0020] t1=k×|t max -t min |,
[0021] Among them, t1 is the global threshold; k is the proportional coefficient.
[0022] In a possible implementation, determining the local threshold corresponding to each initial feature point according to the grayscale distribution data includes:
[0023] For each initial feature point, perform the following steps to determine the local threshold:
[0024] Take 16 phase pixels on a circle with a radius of 3 pixels centered on the initial feature point;
[0025] Determine the grayscale value of each pixel, and determine the local threshold corresponding to the initial feature point based on the pixel value of each pixel:
[0026]
[0027] Among them, t2 is the local threshold corresponding to the initial feature point; I i is the gray value of the initial feature point; I max is the maximum gray value among the 16 pixels; I min is the minimum gray value among the 16 pixels; I a is the grayscale average of the remaining 14 pixels; m is an adaptive parameter.
[0028] In a possible implementation, the performing non-maximum suppression on the neighborhood corresponding to each candidate feature point includes:
[0029] Determine the neighborhood range corresponding to each candidate feature point according to the set parameters;
[0030] Within the neighborhood range corresponding to each candidate feature point, the feature point with the highest local threshold within the neighborhood range is retained.
[0031] In a possible implementation, the method further includes adjusting each candidate feature point to determine a neighborhood range according to the number of feature points with the highest local threshold and the set parameters.
[0032] In a second aspect, an embodiment of the present application provides a target detection method, including:
[0033] Acquire a road image collected during vehicle driving, pre-process the road image and determine corresponding grayscale distribution data;
[0034] Extracting image feature points from the road image based on the method described in the first aspect or any possible implementation manner of the first aspect;
[0035] The detection target is determined based on the extracted target feature points.
[0036] In a possible implementation manner, the preprocessing of the road image and determining the corresponding grayscale distribution data includes:
[0037] Extracting a grayscale image corresponding to the road image;
[0038] Processing the grayscale image using a histogram algorithm to obtain a grayscale histogram;
[0039] The grayscale image and the grayscale histogram are used as grayscale distribution data.
[0040] In a third aspect, an embodiment of the present application provides an image feature point extraction device, comprising:
[0041] An acquisition module, used for acquiring grayscale distribution data of a target image;
[0042] An extraction module is used to determine a global threshold according to the grayscale distribution data, extract feature points of the target image based on the FAST algorithm and the global threshold, obtain initial feature points, determine a local threshold corresponding to each initial feature point according to the grayscale distribution data, extract feature points based on the FAST algorithm and the local threshold, obtain candidate feature points, and perform non-maximum suppression on the neighborhood corresponding to each candidate feature point to retain the target feature point.
[0043] In a fourth aspect, an embodiment of the present application provides a vehicle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect or any possible implementation of the first aspect are implemented.
[0044] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method described in the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.
[0045] The embodiments of the present application provide an image feature point extraction method, a target detection method, a vehicle and a storage medium, which obtain grayscale distribution data of a target image, determine a global threshold based on the grayscale distribution data, extract feature points of the target image based on the FAST algorithm and the global threshold, obtain initial feature points, determine a local threshold corresponding to each initial feature point based on the grayscale distribution data, extract feature points based on the FAST algorithm and the local threshold, obtain candidate feature points, and reasonably adjust the global threshold and the local threshold to adapt to the image characteristics. Combined with the global threshold and the local threshold, the image is subjected to two-level extraction processing to obtain candidate feature points, and the missed extraction and erroneous extraction of candidate feature points due to factors such as shadows and uneven illumination in the image are avoided. The non-maximum suppression processing is integrated to reduce the interference of similar feature points and improve the accuracy of feature point extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art 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 labor.
[0047] Figure 1 is a flowchart of an implementation method of an image feature point extraction method provided in an embodiment of the present application;
[0048] Figure 2 This is a schematic diagram of image feature point extraction provided by an embodiment of the present application;
[0049] Figure 3 is a flowchart of an implementation of a target detection method provided by another embodiment of the present application;
[0050] Figure 4 is a structural schematic diagram of an image feature point extraction device provided by another embodiment of the present application;
[0051] Figure 5 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;
[0052] Figure 6 It is a schematic diagram of the structure of a vehicle provided in one embodiment of the present application. DETAILED DESCRIPTION
[0053] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0054] The terms "first", "second", etc. in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present application described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0055] Unless otherwise specified, the term "plurality" means two or more. The character " / " indicates that the objects before and after are in an "or" relationship. For example, A / B means: A or B. The term "and / or" is a description of the association relationship between objects, indicating that there can be three relationships. For example, A and / or B means: A or B, or, A and B.
[0056] The words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include the plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or including (comprising) refer to the existence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or these groups. In the absence of more restrictions, the elements defined by the statement "including one..." do not exclude the existence of other identical elements in the process, method or device including the elements.
[0057] In this application, each embodiment may focus on the differences from other embodiments, and the same or similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts may refer to the description of the method part.
[0058] In order to make the purpose, technical solutions and advantages of the present application clearer, specific embodiments will be described below in conjunction with the accompanying drawings.
[0059] Figure 1 is a flowchart of an implementation method of an image feature point extraction method provided in an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0060] S101, obtaining grayscale distribution data of a target image, and determining a global threshold according to the grayscale distribution data.
[0061] The executor of the image feature point extraction method provided in this embodiment is a computer, an image processing device, or a controller that performs other functions based on the image feature point extraction results, such as a vehicle controller, a drone controller, an intelligent irrigation machine controller, etc.
[0062] The grayscale distribution data includes at least the grayscale value of each pixel of the target image, and also includes the distribution data of the grayscale value of the target image as a whole. Optionally, the distribution data is a grayscale histogram and / or statistical data corresponding to the target image. The grayscale histogram can more intuitively determine the number and proportion of each grayscale value.
[0063] S102, extracting feature points of the target image based on the FAST algorithm and the global threshold to obtain initial feature points.
[0064] In the specific implementation process, the FAST algorithm has enough pixels in the surrounding area of the pixel whose grayscale values are greater or less than the grayscale value of the pixel. Figure 2 The following is an example of pixel p. A circle with a radius of 3 is formed with pixel p as the center. There are 16 pixels on the circle. If there are n adjacent pixels with gray values greater than I (P) +t' or both are less than I (P) -t′,I (P) is the image grayscale value of point p, t' is the threshold, then the central pixel point p of the circle is the FAST feature point.
[0065] Usually n is 12, and a large number of non-feature points can be quickly eliminated through the following FAST algorithm. The first step is to check whether the pixel differences between positions 1 and 9 and point p are greater than or less than the threshold; the second step is to check positions 5 and 13, and filter out points where at least 3 of the above 4 pixel points have a pixel difference with point p that is greater than or less than the threshold; finally, continue to execute according to the above standards to complete the detection of 16 pixel points on the circumference.
[0066] Among them, a global threshold is determined according to the overall distribution of the target image, and preliminary feature point extraction is performed based on the global threshold.
[0067] S103, determining a local threshold corresponding to each initial feature point according to the grayscale distribution data.
[0068] Step S102 is to perform preliminary extraction on the complete image. According to the volume, area, material, etc. of the target in the specific image, some feature points are mis-extracted or missed due to factors such as shadows and uneven illumination, and the processing scope is further narrowed. The local threshold suitable for local feature point processing is determined based on the feature information of the initial feature points.
[0069] S104, extracting feature points based on the FAST algorithm and the local threshold to obtain candidate feature points.
[0070] S105, performing non-maximum suppression on the neighborhood corresponding to each candidate feature point to retain the target feature point.
[0071] After two rounds of extraction processing using global threshold and local threshold, the image obtained candidate feature points. The candidate feature points still appear adjacent to each other and there are multiple repeated feature points in a small area. However, the feature points are the center of the area with large grayscale changes. It is impossible for feature points to be clustered in the same small area. Therefore, non-maximum suppression is used to further filter the candidate feature points and retain the target feature points.
[0072] In this embodiment, by acquiring the grayscale distribution data of the target image and determining the global threshold according to the grayscale distribution data, feature point extraction is performed on the target image based on the FAST algorithm and the global threshold to obtain initial feature points, local thresholds corresponding to each initial feature point are determined according to the grayscale distribution data, feature point extraction is performed based on the FAST algorithm and the local threshold to obtain candidate feature points, and the global threshold and the local threshold are reasonably adjusted to adapt to the image characteristics. The image is subjected to two-level extraction processing in combination with the global threshold and the local threshold to obtain candidate feature points, and the omission and erroneous extraction of candidate feature points caused by factors such as shadows and uneven illumination in the image are avoided. The non-maximum suppression processing is integrated to reduce the interference of similar feature points and improve the accuracy of feature point extraction.
[0073] In a possible implementation, determining a global threshold according to grayscale distribution data includes:
[0074] The grayscale range [0, L-1] in the grayscale distribution data is divided into two sub-ranges: [0, t] and [t+1, L-1] using a preset threshold t;
[0075] Calculate the entropy values for the two subranges separately:
[0076]
[0077]
[0078] Where Q1 is the entropy of the subrange [0, t]; Q2 is the entropy of the subrange [t+1, L-1]; p i is the probability of occurrence of the i-th grayscale value;
[0079] The sum of the entropy values corresponding to the two sub-ranges is the total entropy;
[0080] The preset threshold t corresponding to the maximum sum of total entropy is recorded as t max , the preset threshold t corresponding to the minimum sum of total entropy is recorded as t min ;
[0081] According to t max and t min Calculate the global threshold:
[0082] t1=k×|t max -t min |,
[0083] Among them, t1 is the global threshold; k is the proportional coefficient.
[0084] In this embodiment, the threshold t that maximizes the sum of the total entropy is synthesized. max And the threshold t that minimizes the sum of total entropy minThe global threshold is determined, and the global threshold adaptive adjustment is realized based on the grayscale distribution data of the integrated image.
[0085] In a possible implementation, determining a local threshold corresponding to each initial feature point according to the grayscale distribution data includes:
[0086] For each initial feature point, perform the following steps to determine the local threshold:
[0087] Take 16 phase pixels on a circle with a radius of 3 pixels centered on the initial feature point;
[0088] Determine the grayscale value of each pixel, and determine the local threshold corresponding to the initial feature point based on the pixel value of each pixel:
[0089]
[0090] Among them, t2 is the local threshold corresponding to the initial feature point; I i is the gray value of the initial feature point; I max is the maximum gray value among the 16 pixels; I min is the minimum gray value among the 16 pixels; I a is the grayscale average of the remaining 14 pixels; m is an adaptive parameter.
[0091] In a possible implementation, non-maximum suppression is performed on the neighborhood corresponding to each candidate feature point, including:
[0092] Determine the neighborhood range corresponding to each candidate feature point according to the set parameters;
[0093] Within the neighborhood range corresponding to each candidate feature point, the feature point with the highest local threshold within the neighborhood range is retained.
[0094] In the specific implementation process, after calculating the critical threshold of each candidate feature point, determine whether there are other candidate feature points in the N*N neighborhood around a candidate feature point. Among them, N is a global fixed parameter, that is, the field range is determined for each candidate feature point based on the same setting parameter N. Optionally, N is set to 3 or 5, etc.
[0095] In this embodiment, non-maximum suppression is performed on the neighborhood corresponding to each candidate feature point, that is, only the feature point with the highest critical local threshold is retained in the neighborhood, and the remaining candidate feature points are discarded, so that the feature point extraction algorithm is more stable.
[0096] In a possible implementation, the method further includes adjusting each candidate feature point to determine a neighborhood range according to the number of feature points with the highest local threshold and setting parameters.
[0097] In different embodiments, the density of candidate feature points is different. When the density is high, it is easy to have multiple feature points with the same local threshold and the highest corresponding local threshold in the same neighborhood range. Accordingly, the neighborhood range is appropriately expanded according to the number of feature points with the highest local threshold to select representative feature points to avoid the presence of feature point blocks in the feature point extraction results.
[0098] Optionally, when the ratio of the number of feature points with the highest local threshold to the number of pixels covered in the neighborhood is greater than a set value, the parameter value is increased based on the current set parameter to expand the neighborhood.
[0099] In this embodiment, the setting parameters for determining the neighborhood range are adaptively adjusted based on the number of feature points with the highest local threshold value to avoid the occurrence of feature point blocks and improve the accuracy of feature point extraction.
[0100] The above is an embodiment of the image feature point extraction method of the present application. The feature point extraction method is applicable to image processing in different fields according to specific feature point extraction requirements. It is particularly suitable for fields with high requirements for image processing speed and target recognition accuracy. Specifically, it can be applied to the field of vehicle driving technology for assisted driving, unmanned driving control, etc., which can improve the detection accuracy of the target, effectively avoid the occurrence of safety accidents such as collisions, and improve driving safety.
[0101] For details not described in detail in the target detection method, reference may be made to the above-mentioned corresponding image feature point extraction method embodiment.
[0102] Figure 3 is a flowchart of an implementation of a target detection method provided by an embodiment of the present application, such as Figure 3 As shown, the method comprises the following steps:
[0103] S301, obtaining a road image collected during vehicle driving, preprocessing the road image and determining corresponding grayscale distribution data.
[0104] In this embodiment, the target detection method is executed by the vehicle controller or the assisted driving system controller. During the driving process of the vehicle, the road image obtained by the vehicle camera is acquired in real time, and then the road, traffic lights, pedestrians, surrounding vehicles and other targets are detected, and a prompt signal or driving control instruction is generated based on the target detection result.
[0105] Specifically, the collected road images are often color images. In order to improve the efficiency of feature point extraction of road images, grayscale distribution data corresponding to the color images is obtained.
[0106] S302, obtaining grayscale distribution data of the target image, and determining a global threshold according to the grayscale distribution data.
[0107] During vehicle driving, road images are collected at set time intervals, and feature points are extracted to further complete target detection. This can be performed at a frequency less than or equal to the road image collection frequency, that is, each frame of road image collected during vehicle driving is used as the target image, and feature point extraction and target detection are performed respectively, or part of the collected road images are extracted at set intervals as the target image for feature point extraction and target detection.
[0108] S303, extracting feature points of the target image based on the FAST algorithm and the global threshold to obtain initial feature points.
[0109] S304, determining a local threshold corresponding to each initial feature point according to the grayscale distribution data.
[0110] S305: Extract feature points based on the FAST algorithm and the local threshold to obtain candidate feature points.
[0111] S306: Perform non-maximum suppression on the neighborhood corresponding to each candidate feature point to retain the target feature point.
[0112] Among them, S302 to S306 mainly perform feature point extraction based on the feature point extraction algorithm provided in the above-mentioned embodiment, improve the accuracy of feature point extraction, so as to complete target detection more accurately and effectively identify targets with collision risks.
[0113] S307: Determine the detection target according to the extracted target feature points.
[0114] In the specific implementation process, the comprehensively extracted target feature points are further processed to distinguish the types of corresponding detection targets, for example: the detection target is a target with collision risk such as a person or vehicle, or the detection target is an environmental target such as a street lamp, a bus stop sign, or a guardrail.
[0115] In a possible implementation, preprocessing the road image and determining the corresponding grayscale distribution data includes:
[0116] Extracting the grayscale image corresponding to the road image;
[0117] The grayscale image is processed using a histogram algorithm to obtain a grayscale histogram;
[0118] Grayscale image and grayscale histogram are used as grayscale distribution data.
[0119] Among them, the grayscale image corresponding to the road image is extracted to facilitate determining the local threshold based on the grayscale image, and determining the grayscale histogram to determine the global threshold based on the overall image grayscale information.
[0120] In this embodiment, feature points are extracted after preprocessing the road images collected during vehicle driving. Specifically, the global threshold and local threshold are reasonably adjusted to adapt to the road image features, and the image is subjected to two-level extraction processing in combination with the global threshold and the local threshold to obtain candidate feature points, avoid the omission and misextraction of candidate feature points caused by factors such as shadows and uneven illumination in the image, and perform comprehensive non-maximum suppression processing to reduce the interference of similar feature points and improve the accuracy of feature point extraction. Afterwards, the extracted feature points are fused to complete the detection of targets or environmental targets with collision risks during vehicle driving, which can play a role in assisting risk warnings or assisted driving, thereby improving driving safety.
[0121] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0122] The following is an embodiment of the device of the present application. For details not described in detail, please refer to the corresponding method embodiment described above.
[0123] Figure 4 is a schematic diagram of the structure of an image feature point extraction device provided in an embodiment of the present application. Figure 4 For the sake of convenience, only the parts related to the embodiment of the present application are shown. Figure 4 As shown, the device comprises:
[0124] An acquisition module 401 is used to acquire grayscale distribution data of a target image;
[0125] The extraction module 402 is used to determine the global threshold according to the grayscale distribution data, extract feature points of the target image based on the FAST algorithm and the global threshold, obtain initial feature points, determine the local threshold corresponding to each initial feature point according to the grayscale distribution data, extract feature points based on the FAST algorithm and the local threshold, obtain candidate feature points, and perform non-maximum suppression on the neighborhood corresponding to each candidate feature point to retain the target feature points.
[0126] In this embodiment, by acquiring the grayscale distribution data of the target image and determining the global threshold according to the grayscale distribution data, feature point extraction is performed on the target image based on the FAST algorithm and the global threshold to obtain initial feature points, local thresholds corresponding to each initial feature point are determined according to the grayscale distribution data, feature point extraction is performed based on the FAST algorithm and the local threshold to obtain candidate feature points, and the global threshold and the local threshold are reasonably adjusted to adapt to the image characteristics. The image is subjected to two-level extraction processing in combination with the global threshold and the local threshold to obtain candidate feature points, and the omission and erroneous extraction of candidate feature points caused by factors such as shadows and uneven illumination in the image are avoided. The non-maximum suppression processing is integrated to reduce the interference of similar feature points and improve the accuracy of feature point extraction.
[0127] Figure 5 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the above-mentioned various method embodiments are implemented, for example Figure 1 or Figure 3 Alternatively, when the processor 50 executes the computer program 52, the functions of the modules / units in the above-mentioned device embodiments are realized, for example Figure 4 The functions of each module are shown.
[0128] Exemplarily, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the electronic device 5. For example, the computer program 52 may be divided into Figure 4 The modules shown.
[0129] The electronic device 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0130] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0131] The memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. Further, the memory 51 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the electronic device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0132] The present application also provides a vehicle, such as Figure 6 As shown, the vehicle 6 includes the aforementioned electronic device 5 .
[0133] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0134] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0135] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0136] In the embodiments provided in the present application, it should be understood that the disclosed devices / vehicles and methods can be implemented in other ways. For example, the device / vehicle embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0137] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0138] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0139] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0140] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for extracting image feature points, characterized in that: include: Acquire grayscale distribution data of the target image, and determine a global threshold value according to the grayscale distribution data; Extract feature points from the target image based on the FAST algorithm and the global threshold to obtain initial feature points; Determine a local threshold value corresponding to each initial feature point according to the grayscale distribution data; Extract feature points based on the FAST algorithm and the local threshold to obtain candidate feature points; Non-maximum suppression is performed on the neighborhood corresponding to each candidate feature point to retain the target feature point.
2. The image feature point extraction method according to claim 1, characterized in that: Determining a global threshold according to the grayscale distribution data comprises: Using a preset threshold t, the grayscale range [0, L-1] in the grayscale distribution data is divided into two sub-ranges: [0, t] and [t+1, L-1]; Calculate the entropy values for the two subranges separately: Where Q1 is the entropy of the subrange [0, t]; Q2 is the entropy of the subrange [t+1, L-1]; p i is the probability of occurrence of the i-th grayscale value; The sum of the entropy values corresponding to the two sub-ranges is the total entropy; The preset threshold t corresponding to the maximum sum of total entropy is recorded as t max , the preset threshold t corresponding to the minimum sum of total entropy is recorded as t min ; According to t max and t min Calculate the global threshold: t1=k×|t max -t min |, Among them, t1 is the global threshold; k is the proportional coefficient.
3. The image feature point extraction method according to claim 1, characterized in that: The determining of the local threshold corresponding to each initial feature point according to the grayscale distribution data includes: For each initial feature point, perform the following steps to determine the local threshold: Take 16 phase pixels on a circle with a radius of 3 pixels centered on the initial feature point; Determine the grayscale value of each pixel, and determine the local threshold corresponding to the initial feature point based on the pixel value of each pixel: Among them, t2 is the local threshold corresponding to the initial feature point; I i is the gray value of the initial feature point; I max is the maximum gray value among the 16 pixels; I min is the minimum gray value among the 16 pixels; I a is the grayscale average of the remaining 14 pixels; m is an adaptive parameter.
4. The image feature point extraction method according to claim 1, characterized in that: The non-maximum suppression is performed on the neighborhood corresponding to each candidate feature point, including: Determine the neighborhood range corresponding to each candidate feature point according to the set parameters; Within the neighborhood range corresponding to each candidate feature point, the feature point with the highest local threshold within the neighborhood range is retained.
5. The method for extracting image feature points according to claim 4, characterized in that: The method further includes adjusting each candidate feature point to determine a neighborhood range according to the number of feature points with the highest local threshold and the set parameters.
6. A target detection method, characterized in that: include: Acquire a road image collected during vehicle driving, pre-process the road image and determine corresponding grayscale distribution data; Extracting image feature points from the road image based on the image feature point extraction method according to any one of claims 1 to 5; The detection target is determined based on the extracted target feature points.
7. The target detection method according to claim 6, characterized in that: The preprocessing of the road image and determining the corresponding grayscale distribution data includes: Extracting a grayscale image corresponding to the road image; Processing the grayscale image using a histogram algorithm to obtain a grayscale histogram; The grayscale image and the grayscale histogram are used as grayscale distribution data.
8. An image feature point extraction device, characterized in that: include: An acquisition module, used for acquiring grayscale distribution data of a target image; An extraction module is used to determine a global threshold according to the grayscale distribution data, extract feature points of the target image based on the FAST algorithm and the global threshold, obtain initial feature points, determine a local threshold corresponding to each initial feature point according to the grayscale distribution data, extract feature points based on the FAST algorithm and the local threshold, obtain candidate feature points, and perform non-maximum suppression on the neighborhood corresponding to each candidate feature point to retain the target feature point.
9. A vehicle comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to claim 6 or 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Vehicle steering angle determination method, device and equipment
CN121608808A