Line feature extraction method, device and electronic equipment

The central line segment of the columnar body is extracted through semantic segmentation and linear regression techniques, and the problem of poor linear feature extraction robustness in the prior art is solved, and stable feature matching is achieved at different angles.

CN113780313BActive Publication Date: 2024-12-24NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111101401.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-18
Publication Date
2024-12-24
Estimated Expiration
2041-09-18

AI Technical Summary

Technical Problem

The linear feature extraction method in the prior art is poorly robust and cannot be effectively applied to subsequent feature matching, especially in the case of different lighting changes and shooting angles, resulting in unstable line segment extraction and matching errors.

Method used

By obtaining the semantic segmentation diagram of the original image, the center segment of the columnar segmentation area is extracted using linear regression and support vector machine technology as feature segments to ensure that the extracted feature segments are unique and unchanged at different angles and avoid matching errors.

Benefits of technology

It improves the robustness of line feature extraction, ensures that feature segments are stable at different angles, avoids matching errors, and enhances the accuracy of feature matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113780313B_ABST
    Figure CN113780313B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for extracting line features, including: obtaining a semantic segmentation map of an original image; performing linear regression on a segmentation area whose category information is a column in the semantic segmentation map to extract a central line segment of the columnar segmentation area; and using the central line segment as a feature line segment of the original image. The feature line segment extracted by the line feature extraction method of the present invention is a central line segment of a column extracted based on semantic segmentation, and has good stability. No matter how the shooting angle changes, the central line segment is unique and unchanged, and no subsequent matching errors will occur. The extracted feature line segment has good robustness, which alleviates the technical problem that the line segments extracted by the existing line feature extraction method have poor robustness and cannot be applied to subsequent feature matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method, device and electronic equipment for extracting line features. Background Art

[0002] In the current visual simultaneous localization and mapping (SLAM) system, technicians usually use the feature matching between the previous and next frame images to estimate the camera motion. In this process, it is necessary to extract the features of the previous and next frame images through an image feature extraction algorithm, and then estimate the camera position and posture by matching the features of the previous and next frame images, so as to incrementally build a map based on the camera position to achieve the purpose of positioning and mapping.

[0003] In the current visual simultaneous positioning and mapping system, for the Manhattan world, the line segments of the image are easier to detect. The line segment features play an important role in improving the robustness of visual SLAM positioning, so it is necessary to extract the features of the line segments. At present, when extracting the features of the line segments, the line segment extraction algorithm based on LSD is often used to extract the line segments from the collected images to obtain the line segments. This method is based on the change of grayscale gradient to achieve line segment extraction. If the change of pixel grayscale gradient is the same on a line, it means that the points composed of these pixels are a line segment. However, when a line segment is affected differently by lighting, the change in the grayscale gradient of the pixels of the line segment may be different. For example, the change in the grayscale gradient of the pixels in one area of ​​the line segment presents one same trend, and the change in the grayscale gradient of the pixels in another area presents another same trend. Then, when extracting line segments, the line that was originally a line segment will be split and extracted into two line segments. In other words, the length of the extracted line segments is very unstable and the accuracy is poor. The edges of the columns based on semantic extraction are relatively stable and not easily affected by lighting. However, when edge extraction is performed on two images of thicker columns taken at different shooting angles, the extracted edges will be identified as the same, but in fact, due to different shooting angles, the extracted edges should be different. For example, a column is photographed on the left side, and then the edge of the photographed image is extracted based on semantics to obtain a first edge. Then, the column is photographed on the right side, and then the edge of the photographed image is extracted based on semantics to obtain a second edge. The first edge and the second edge are actually not the same. However, during subsequent matching, if the backgrounds of the two edges are also the same, the descriptors of the two edges are also the same. When the two edges are matched based on the descriptors, they will be identified as the same edge, resulting in a matching error, that is, it is impossible to achieve effective pairing between the two frames of images. In other words, the columnar edge extracted based on semantics will have a matching error during subsequent matching.

[0004] In summary, the line segments extracted by the existing line feature extraction method have poor robustness and cannot be applied to subsequent feature matching. Summary of the invention

[0005] In view of this, an object of the present invention is to provide a line feature extraction method, device and electronic device to alleviate the technical problem that the line segments extracted by the existing line feature extraction method have poor robustness and cannot be applied to subsequent feature matching.

[0006] In a first aspect, an embodiment of the present invention provides a method for extracting line features, comprising:

[0007] Acquire a semantic segmentation map of the original image, wherein the semantic segmentation map includes at least one segmentation region and category information of each segmentation region;

[0008] Performing linear regression on the segmented area whose category information is a column in the semantic segmentation map to extract the center line segment of the columnar segmented area;

[0009] The central line segment is used as a characteristic line segment of the original image.

[0010] Further, performing linear regression on the segmented area whose category information is a column in the semantic segmentation map includes:

[0011] Support vector machine linear regression is performed on the segmented area whose category information is a column in the semantic segmentation map to extract the center line segment of the columnar segmented area.

[0012] Furthermore, when the original image is a two-dimensional image, obtaining a semantic segmentation map of the original image includes:

[0013] A semantic segmentation model is used to perform semantic segmentation on the two-dimensional image to obtain a semantic segmentation map of the two-dimensional image.

[0014] Furthermore, when the original image is a three-dimensional point cloud image, obtaining a semantic segmentation map of the original image includes:

[0015] Using a semantic segmentation model to perform semantic segmentation on the two-dimensional image corresponding to the three-dimensional point cloud image to obtain a first semantic segmentation map;

[0016] A semantic segmentation map of the three-dimensional point cloud image is determined according to a correspondence between each pixel of the three-dimensional point cloud image and the first semantic segmentation map.

[0017] Further, performing support vector machine linear regression on the segmented area with columnar category information in the semantic segmentation map includes:

[0018] Determine a target line segment in the segmented area of ​​the column so that the sum of distances between pixel points in the segmented area of ​​the column and the target line segment outside a preset zone of the target line segment is minimized;

[0019] The target line segment is used as the center line segment of the columnar segmentation area.

[0020] Furthermore, the method further comprises:

[0021] Determine the feature line segments and descriptors of the feature line segments of two adjacent frames of original images;

[0022] Calculating the distance between the descriptors of the feature line segments of the two adjacent frames of original images;

[0023] If the distance is less than a preset value, determining that the feature line segments corresponding to the descriptors of the feature line segments in the two adjacent frames of original images match;

[0024] If the distance is not less than the preset value, it is determined that the feature line segments corresponding to the descriptors of the feature line segments in the two adjacent frames of original images do not match.

[0025] Furthermore, the semantic segmentation model is a pre-trained model, and when the original image is a two-dimensional image, the feature line segments of the original image are two-dimensional line segments, and when the original image is a three-dimensional point cloud image, the feature line segments of the original image are three-dimensional line segments.

[0026] In a second aspect, an embodiment of the present invention further provides a line feature extraction device, comprising:

[0027] An acquisition unit, configured to acquire a semantic segmentation map of an original image, wherein the semantic segmentation map includes at least one segmentation region and category information of each segmentation region;

[0028] A linear regression unit, used for performing linear regression on the segmented area whose category information is a column in the semantic segmentation map, and extracting a center line segment of the columnar segmented area;

[0029] A setting unit is used to use the central line segment as a characteristic line segment of the original image.

[0030] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0031] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to execute any method described in the first aspect above.

[0032] In an embodiment of the present invention, a method for extracting line features is provided, including: first obtaining a semantic segmentation map of the original image; then, performing linear regression on the segmented area whose category information is a column in the semantic segmentation map, extracting the center line segment of the columnar segmented area; finally, using the center line segment as the feature line segment of the original image. From the above description, it can be seen that the feature line segment extracted by the line feature extraction method of the present invention is the center line segment of the column extracted based on semantic segmentation, and has good stability. No matter how the shooting angle changes, the center line segment is unique and unchanged, and no subsequent matching errors will occur. The extracted feature line segment has good robustness, which alleviates the technical problem that the line segments extracted by the existing line feature extraction method are poorly robust and cannot be applied to subsequent feature matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 A flow chart of a line feature extraction method provided by an embodiment of the present invention;

[0035] Figure 2 A flow chart of a method for performing support vector machine linear regression on a segmented area whose category information is a column in a semantic segmentation graph provided by an embodiment of the present invention;

[0036] Figure 3 A flow chart of a method for obtaining a semantic segmentation map of an original image provided by an embodiment of the present invention;

[0037] Figure 4 A flow chart of a feature matching method provided by an embodiment of the present invention;

[0038] Figure 5 A schematic diagram of a line feature extraction device provided by an embodiment of the present invention;

[0039] Figure 6 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] At present, when the LSD-based line segment extraction algorithm is used to extract line segments from the collected images, the extracted line segments are very unstable in length and have poor accuracy; while the cylindrical edges extracted based on semantics are relatively stable and not easily affected by lighting. However, there are matching errors when the cylindrical edges extracted based on semantics are subsequently matched.

[0042] Based on this, the feature line segments extracted by the line feature extraction method of the present invention are the center line segments of the cylinder extracted based on semantic segmentation, which have good stability. No matter how the shooting angle changes, the center line segment is unique and unchanged, and no matching errors will occur subsequently. The extracted feature line segments have good robustness.

[0043] The embodiments of the present invention are further described below with reference to the accompanying drawings.

[0044] Embodiment 1:

[0045] According to an embodiment of the present invention, an embodiment of a method for extracting line features is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0046] Figure 1 is a flow chart of a method for extracting line features according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0047] Step S102, obtaining a semantic segmentation map of the original image, wherein the semantic segmentation map includes at least one segmentation region and category information of each segmentation region;

[0048] In an embodiment of the present invention, the above-mentioned original image can be a two-dimensional RGB image, which can be obtained by photographing the column with a camera, or it can be a pre-stored RGB image of the column. The above-mentioned original image can also be a three-dimensional point cloud image, which can be obtained by scanning the column with a laser radar, or it can be a pre-stored three-dimensional point cloud image of the column.

[0049] Specifically, when the original image is a two-dimensional image, the semantic segmentation map of the original image is also a two-dimensional segmentation map, and when the original image is a three-dimensional point cloud image, the semantic segmentation map of the original image is also a three-dimensional segmentation map. The above semantic segmentation map includes at least one segmentation area and category information of each segmentation area.

[0050] In addition, the semantic segmentation map is a segmentation map containing at least one segmentation area of ​​the same scale as the original image, that is, each pixel in the semantic segmentation map corresponds one-to-one to the corresponding pixel point in the original image.

[0051] Step S104, performing linear regression on the segmented area whose category information is a column in the semantic segmentation map, and extracting the center line segment of the columnar segmented area;

[0052] The linear regression of the segmented area of ​​the column is to extract the center line segment of the segmented area of ​​the column. In this way, no matter how the shooting angle changes, the center line segment is unique and unchanged. When performing feature matching later, no matching errors will occur, and the robustness is good. In other words, the center line of the column is extracted, which is not sensitive to the instability of the edge pixels of the segmented area of ​​the column.

[0053] Step S106: taking the center line segment as the feature line segment of the original image.

[0054] In an embodiment of the present invention, a method for extracting line features is provided, including: first obtaining a semantic segmentation map of the original image; then, performing linear regression on the segmented area whose category information is a column in the semantic segmentation map, extracting the center line segment of the columnar segmented area; finally, using the center line segment as the feature line segment of the original image. From the above description, it can be seen that the feature line segment extracted by the line feature extraction method of the present invention is the center line segment of the column extracted based on semantic segmentation, and has good stability. No matter how the shooting angle changes, the center line segment is unique and unchanged, and no subsequent matching errors will occur. The extracted feature line segment has good robustness, which alleviates the technical problem that the line segments extracted by the existing line feature extraction method are poorly robust and cannot be applied to subsequent feature matching.

[0055] The above content briefly introduces the line feature extraction method of the present invention, and the specific contents involved therein are described in detail below.

[0056] In an optional embodiment of the present invention, the above step S104, performing linear regression on the segmented area whose category information is a column in the semantic segmentation map, specifically includes: performing support vector machine linear regression on the segmented area whose category information is a column in the semantic segmentation map, and extracting the center line segment of the columnar segmented area.

[0057] In an embodiment of the present invention, support vector machine linear regression (SVR) is used, which can regress and obtain the accurate center line segment of the columnar segmentation area, and is suitable for the data in the segmentation area obtained after semantic segmentation, while the least squares linear regression is suitable for data that obeys the Gaussian normal distribution. Obviously, the data in the columnar segmentation area of ​​the present invention does not obey the Gaussian normal distribution and is suitable for support vector machine linear regression.

[0058] In an alternative embodiment of the present invention, reference Figure 2 , the support vector machine linear regression is performed on the segmented area with the category information of the column in the semantic segmentation map, which specifically includes the following steps:

[0059] Step S201, determining a target line segment in the segmented area of ​​the column, so that the sum of the distances between the pixel points in the segmented area of ​​the column and the target line segment outside the preset zone of the target line segment is minimized;

[0060] The above-mentioned preset zone is obtained by expanding the target line segment to the left and right sides by a preset distance.

[0061] Step S202: taking the target line segment as the center line segment of the columnar segmentation area.

[0062] In an optional embodiment of the present invention, when the original image is a two-dimensional image, obtaining a semantic segmentation map of the original image specifically includes: performing semantic segmentation on the two-dimensional image using a semantic segmentation model to obtain a semantic segmentation map of the two-dimensional image.

[0063] Specifically, by inputting a two-dimensional image into a semantic segmentation model, a semantic segmentation map of the two-dimensional image can be output.

[0064] In an optional embodiment of the present invention, when the original image is a three-dimensional point cloud image, the reference Figure 3 , obtain the semantic segmentation map of the original image, which specifically includes the following steps:

[0065] Step S301, using a semantic segmentation model to perform semantic segmentation on a two-dimensional image corresponding to the three-dimensional point cloud image to obtain a first semantic segmentation map;

[0066] Step S302: determining a semantic segmentation map of the three-dimensional point cloud image according to the correspondence between the three-dimensional point cloud image and each pixel of the first semantic segmentation map.

[0067] Specifically, the first semantic segmentation map contains at least one segmentation area and category information of each segmentation area. Since there is a corresponding relationship between each point of the first semantic segmentation map and the points in the three-dimensional point cloud image, the semantic information of each point in the three-dimensional point cloud image can be determined according to the semantic information of each point in the first semantic segmentation map, and then the semantic segmentation map of the three-dimensional point cloud image can be determined.

[0068] In an alternative embodiment of the present invention, reference Figure 4 , the method further comprises:

[0069] Step S401, determining feature line segments and descriptors of feature line segments of two adjacent frames of original images;

[0070] Specifically, the process of determining the feature line segments of two adjacent frames of original images can refer to the above steps S102 to S106, and the process of determining the descriptor of the feature line segments can refer to the process of determining the descriptor of the feature line segments in the prior art, which will not be repeated here.

[0071] Step S402, calculating the distance between the descriptors of the feature line segments of two adjacent frames of original images;

[0072] Step S403, if the distance is less than a preset value, determining that the feature line segments corresponding to the descriptors of the feature line segments in two adjacent frames of original images match;

[0073] Step S404: if the distance is not less than the preset value, it is determined that the feature line segments corresponding to the descriptors of the feature line segments in two adjacent frames of original images do not match.

[0074] In an optional embodiment of the present invention, the above-mentioned semantic segmentation model is a pre-trained model. When the original image is a two-dimensional image, the feature line segments of the original image are two-dimensional line segments. When the original image is a three-dimensional point cloud image, the feature line segments of the original image are three-dimensional line segments.

[0075] The line feature extraction method of the present invention adopts support vector machine linear regression, which is less sensitive to the instability of edge pixels and can extract the center line with the highest probability. Moreover, the segmented columnar area at different angles will not cause false matching due to the observed edges not being the same edges, thus generating a negative contribution to positioning.

[0076] Embodiment 2:

[0077] The embodiment of the present invention further provides a line feature extraction device, which is mainly used to execute the line feature extraction method provided in the first embodiment of the present invention. The line feature extraction device provided in the embodiment of the present invention is specifically introduced below.

[0078] Figure 5 is a schematic diagram of a line feature extraction device according to an embodiment of the present invention, such as Figure 5 As shown, the device mainly includes: an acquisition unit 10, a linear regression unit 20 and a setting unit 30, wherein:

[0079] An acquisition unit, configured to acquire a semantic segmentation map of the original image, wherein the semantic segmentation map includes at least one segmentation region and category information of each segmentation region;

[0080] A linear regression unit is used to perform linear regression on the segmented area whose category information is a column in the semantic segmentation map, and extract the center line segment of the columnar segmented area;

[0081] A setting unit is used to use the center line segment as a feature line segment of the original image.

[0082] In an embodiment of the present invention, a device for extracting line features is provided, comprising: first obtaining a semantic segmentation map of an original image; then, performing linear regression on the segmented area whose category information is a column in the semantic segmentation map, extracting the center line segment of the columnar segmented area; finally, using the center line segment as the feature line segment of the original image. From the above description, it can be seen that the feature line segment extracted by the line feature extraction device of the present invention is the center line segment of the column extracted based on semantic segmentation, and has good stability. No matter how the shooting angle changes, the center line segment is unique and unchanged, and no subsequent matching errors will occur. The extracted feature line segment has good robustness, which alleviates the technical problem that the line segments extracted by the existing line feature extraction method have poor robustness and cannot be applied to subsequent feature matching.

[0083] Optionally, the linear regression unit is further used to: perform support vector machine linear regression on the segmented area whose category information is a column in the semantic segmentation map, and extract the center line segment of the columnar segmented area.

[0084] Optionally, when the original image is a two-dimensional image, the acquisition unit is further used to: perform semantic segmentation on the two-dimensional image using a semantic segmentation model to obtain a semantic segmentation map of the two-dimensional image.

[0085] Optionally, when the original image is a three-dimensional point cloud image, the acquisition unit is also used to: use a semantic segmentation model to perform semantic segmentation on the two-dimensional image corresponding to the three-dimensional point cloud image to obtain a first semantic segmentation map; determine the semantic segmentation map of the three-dimensional point cloud image based on the correspondence between the three-dimensional point cloud image and each pixel point of the first semantic segmentation map.

[0086] Optionally, the linear regression unit is also used to: determine a target line segment in the segmentation area of ​​the column so that the sum of distances between pixels outside a preset zone of the target line segment and the target line segment in the segmentation area of ​​the column is minimized; and use the target line segment as the center line segment of the segmentation area of ​​the column.

[0087] Optionally, the device is also used to: determine the feature line segments and descriptors of the feature line segments of two adjacent frames of original images; calculate the distance between the descriptors of the feature line segments of two adjacent frames of original images; if the distance is less than a preset value, determine that the feature line segments corresponding to the descriptors of the feature line segments in the two adjacent frames of original images match; if the distance is not less than the preset value, determine that the feature line segments corresponding to the descriptors of the feature line segments in the two adjacent frames of original images do not match.

[0088] Optionally, the semantic segmentation model is a pre-trained model, and when the original image is a two-dimensional image, the feature line segments of the original image are two-dimensional line segments, and when the original image is a three-dimensional point cloud image, the feature line segments of the original image are three-dimensional line segments.

[0089] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0090] like Figure 6 As shown, an electronic device 600 provided in an embodiment of the present application includes: a processor 601, a memory 602 and a bus, wherein the memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 through the bus, and the processor 601 executes the machine-readable instructions to perform the steps of the line feature extraction method as described above.

[0091] Specifically, the memory 602 and the processor 601 can be general-purpose memories and processors, which are not specifically limited here. When the processor 601 runs the computer program stored in the memory 602, the line feature extraction method can be executed.

[0092] The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 601. The above processor 601 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.

[0093] Corresponding to the above-mentioned line feature extraction method, an embodiment of the present application also provides a computer-readable storage medium, which stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the steps of the above-mentioned line feature extraction method.

[0094] The line feature extraction device provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in the embodiment of the present application are the same as those of the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0095] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, 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 communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0096] For another example, the flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes 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 and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0097] 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.

[0098] In addition, each functional unit in the embodiments provided in 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.

[0099] If the function 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 technical solution of the present application can essentially or partly contribute to the prior art or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the vehicle marking method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0100] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0101] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solution of the present application, rather than to limit it. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solution recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiment of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for extracting line features, characterized in that: Applied to a visual synchronous positioning and map building system, the method comprises: Acquire a semantic segmentation map of an original image, wherein the semantic segmentation map includes at least one segmentation region and category information of each segmentation region; the original image is an RGB image of a column or a three-dimensional point cloud image of a column; Performing linear regression on the segmented area whose category information is a column in the semantic segmentation map to extract the center line segment of the columnar segmented area; Taking the center line segment as the characteristic line segment of the original image; The step of performing linear regression on the segmented area whose category information is a column in the semantic segmentation map includes: Support vector machine linear regression is performed on the segmentation area with category information of a column in the semantic segmentation map to extract the center line segment of the columnar segmentation area; the center line segment of the columnar segmentation area is the distance between the pixel points in the segmentation area and the target line segment outside the preset zone and the minimum target line segment, and the preset zone is obtained after the target line segment is expanded to the left and right sides by a preset distance.

2. The method according to claim 1, characterized in that: When the original image is a two-dimensional image, obtaining a semantic segmentation map of the original image includes: A semantic segmentation model is used to perform semantic segmentation on the two-dimensional image to obtain a semantic segmentation map of the two-dimensional image.

3. The method according to claim 1, characterized in that When the original image is a three-dimensional point cloud image, obtaining a semantic segmentation map of the original image includes: Using a semantic segmentation model to perform semantic segmentation on the two-dimensional image corresponding to the three-dimensional point cloud image to obtain a first semantic segmentation map; A semantic segmentation map of the three-dimensional point cloud image is determined according to a correspondence between each pixel of the three-dimensional point cloud image and the first semantic segmentation map.

4. The method according to claim 2 or 3, characterized in that: The semantic segmentation model is a pre-trained model. When the original image is a two-dimensional image, the feature line segments of the original image are two-dimensional line segments. When the original image is a three-dimensional point cloud image, the feature line segments of the original image are three-dimensional line segments.

5. A line feature extraction device, characterized in that: Applied to a visual synchronous positioning and map building system, the device comprises: An acquisition unit, configured to acquire a semantic segmentation map of an original image, wherein the semantic segmentation map includes at least one segmentation region and category information of each segmentation region; the original image is an RGB image of a column or a three-dimensional point cloud image of a column; A linear regression unit, used for performing linear regression on the segmented area whose category information is a column in the semantic segmentation map, and extracting a center line segment of the columnar segmented area; A setting unit, used for taking the center line segment as a characteristic line segment of the original image; The linear regression unit is specifically used for: Support vector machine linear regression is performed on the segmentation area with category information of a column in the semantic segmentation map to extract the center line segment of the columnar segmentation area; the center line segment of the columnar segmentation area is the distance between the pixel points in the segmentation area and the target line segment outside the preset zone and the minimum target line segment, and the preset zone is obtained after the target line segment is expanded to the left and right sides by a preset distance.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to execute the method according to any one of claims 1 to 4.