Electronic fence generation method and device for autonomous vehicle, equipment and medium

Through the automated electronic fence generation method, using map data preprocessing and contour analysis, the problem of time-consuming and inaccurate demarcation of electronic fences is solved, and more efficient and accurate electronic fence construction is achieved, and the safety of autonomous driving is improved.

CN119762517AActive Publication Date: 2025-04-04WOHANG TECH (NANJING) CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411995733.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-04
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The generation of existing electronic fences mainly relies on manual demarcation, which is time-consuming and labor-intensive and vulnerable to the subjective judgment and skill level of the operator, resulting in inaccurate fence boundary setting.

Method used

By obtaining the map data of the environment, pre-processing, denoising and filling, determining the maximum outline of the target map image, and traversing the map data to determine the number of segments of the contour within the maximum outline, and finally building an electronic fence based on the number of segments of the contour.

Benefits of technology

The accurate division of electronic fences is achieved, reducing the time and errors of manual operation, and improving the safety of autonomous vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762517A_ABST
    Figure CN119762517A_ABST
Patent Text Reader

Abstract

The invention provides an electronic fence generation method, device and equipment for an automatic driving vehicle and a medium, and relates to the technical field of electronic fences, and the method comprises the steps: obtaining map data of an environment; preprocessing the map data to obtain an initial map image; denoising and filling the initial map image to obtain a target map image; determining the maximum contour of the target map image based on a preset algorithm; traversing map data to determine the number of sections of the inner contour of the maximum contour; and constructing the electronic fence based on the section number of the contour. In the mode, the electronic fence is accurately divided, time and labor are saved, and the automatic driving safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic fences, and in particular to a method, device, equipment and medium for generating an electronic fence for an autonomous driving vehicle. Background Art

[0002] The application of electronic fence technology in the field of autonomous vehicles is mainly focused on demarcating key areas such as vehicle routes, parking lots, and work surfaces. Through the preset electronic fence, the system can monitor the vehicle's position in real time to ensure that the vehicle is driving within the designated area. Once the vehicle exceeds the preset area, the system will automatically issue an alarm, perform an emergency stop or other safety measures to prevent potential safety risks.

[0003] Currently, the generation of electronic fences mainly relies on manual demarcation of ranges on maps. This method is not only time-consuming and labor-intensive, but also easily affected by the operator's subjective judgment and skill level, resulting in inaccurate fence boundary settings and human errors. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a method, device, equipment and medium for generating an electronic fence for an autonomous driving vehicle, by determining magnetic shielding to reduce the loss generated by the copper busbar.

[0005] In a first aspect, an embodiment of the present invention provides a method for generating an electronic fence for an autonomous driving vehicle, comprising: acquiring map data of an environment; preprocessing the map data to obtain an initial map image; denoising and padding the initial map image to obtain a target map image; determining a maximum contour of the target map image based on a preset algorithm; traversing the map data to determine the number of contour segments within the maximum contour; and constructing an electronic fence based on the number of contour segments.

[0006] In a preferred embodiment of the present invention, the above-mentioned preprocessing of map data to obtain an initial map image includes: converting the map data into a matrix form to obtain a map data matrix; binarizing the image intensity represented by pixels in the map data matrix to obtain the initial map image.

[0007] In a preferred embodiment of the present invention, the above-mentioned denoising and padding of the initial map image to obtain the target map image includes: performing morphological operations and foreground area extraction on the initial map image to denoise the initial map image; performing image enhancement and hole filling on the initial map image to fill the initial map image; the denoised and padded initial map image is the target map image.

[0008] In a preferred embodiment of the present invention, the above-mentioned morphological operation and foreground area extraction on the initial map image include: defining a first structure element; the first structure element defines the neighborhood shape and size of the morphological operation; sliding the first structure element on the initial map image to position the first structure element in the minimum area in the foreground area; if non-foreground pixels are included under the first structure element, the pixels at the corresponding position are set as the background to reduce the boundary of the foreground area to complete denoising.

[0009] In a preferred embodiment of the present invention, the above-mentioned image enhancement and hole filling of the initial map image to fill the initial map image includes: defining a second structure element; sliding the second structure element on the initial map image, and calculating the local maximum value in the coverage area of ​​the structure element at each position to achieve hole filling.

[0010] In a preferred embodiment of the present invention, the above-mentioned construction of an electronic fence based on the number of segments of a contour includes: determining the size relationship between the number of segments of a current contour and the number of segments of a previous contour; if the size relationship is that the number of segments of the current contour is greater than the number of segments of the previous contour, generating two new areas; if the size relationship is that the number of segments of the current contour is less than the number of segments of the previous contour, generating a new area; and constructing an electronic fence through the new area.

[0011] In a preferred embodiment of the present invention, traversing the map data to determine the number of segments of the contour within the maximum contour includes: traversing the map data from top to bottom and from left to right; and determining the number of segments of the contour within each column of the maximum contour.

[0012] In a second aspect, an embodiment of the present invention also provides an electronic fence generation device for an autonomous driving vehicle, comprising: a map data acquisition module for acquiring map data of an environment; a map data preprocessing module for preprocessing the map data to obtain an initial map image; a denoising and padding module for denoising and padding the initial map image to obtain a target map image; a maximum contour determination module for determining the maximum contour of the target map image based on a preset algorithm; a map data traversal module for traversing the map data to determine the number of contour segments within the maximum contour; and an electronic fence construction module for constructing an electronic fence based on the number of contour segments.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the electronic fence generation method for an autonomous driving vehicle of the first aspect mentioned above.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the electronic fence generation method for an autonomous driving vehicle according to the first aspect above.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] The embodiment of the present invention provides an electronic fence generation method, device, equipment and medium for an autonomous driving vehicle, which can obtain map data of the environment; preprocess the map data to obtain an initial map image; denoise and fill the initial map image to obtain a target map image; determine the maximum contour of the target map image based on a preset algorithm; traverse the map data to determine the number of contour segments within the maximum contour; and construct an electronic fence based on the number of contour segments. In this method, the electronic fence is accurately divided, which saves time and effort and improves the safety of autonomous driving.

[0017] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0018] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 A flowchart of a method for generating an electronic fence for an autonomous driving vehicle provided in an embodiment of the present invention;

[0021] Figure 2 A flowchart of another method for generating an electronic fence for an autonomous driving vehicle provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of the structure of an electronic fence generating device for an autonomous driving vehicle provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not 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.

[0025] The application of electronic fence technology in the field of autonomous vehicles is mainly focused on demarcating key areas such as vehicle routes, parking lots, and work surfaces. Through the preset electronic fence, the system can monitor the vehicle's position in real time to ensure that the vehicle is driving within the designated area. Once the vehicle exceeds the preset area, the system will automatically issue an alarm, perform an emergency stop or other safety measures to prevent potential safety risks.

[0026] Currently, the generation of electronic fences mainly relies on manual demarcation of ranges on maps. This method is not only time-consuming and labor-intensive, but also easily affected by the operator's subjective judgment and skill level, resulting in inaccurate fence boundary settings and human errors.

[0027] Based on this, the embodiment of the present invention provides an electronic fence generation method, device, equipment and medium for an autonomous driving vehicle, which can obtain map data of the environment; preprocess the map data to obtain an initial map image; denoise and fill the initial map image to obtain a target map image; determine the maximum contour of the target map image based on a pre-set algorithm; traverse the map data to determine the number of contour segments within the maximum contour; and construct an electronic fence based on the number of contour segments. In this way, the electronic fence is accurately divided, which saves time and effort and improves the safety of autonomous driving.

[0028] To facilitate understanding of this embodiment, a method for generating an electronic fence for an autonomous driving vehicle disclosed in an embodiment of the present invention is first introduced in detail.

[0029] Example 1

[0030] The embodiment of the present invention provides a method for generating an electronic fence of an autonomous driving vehicle. Figure 1 The present invention provides a flowchart of a method for generating an electronic fence for an autonomous driving vehicle. Figure 1 As shown, the method for generating an electronic fence of an autonomous driving vehicle may include the following steps:

[0031] Step S101, obtaining map data of the environment.

[0032] Among them, map data of the environment is obtained through various sensors (such as cameras, radars, etc.).

[0033] Step S102: preprocessing the map data to obtain an initial map image.

[0034] Specifically, preprocessing the map data to obtain the initial map image may include: converting the map data into a matrix form to obtain a map data matrix; binarizing the image intensity represented by pixels in the map data matrix to obtain the initial map image.

[0035] Each pixel represents the image intensity at that location.

[0036] Specifically, the matrix I of the map data obtained by the sensor, where each pixel I(x, y) represents the image intensity at that location, is binarized:

[0037] Step S103, denoising and padding the initial map image to obtain a target map image.

[0038] Among them, denoising can be achieved by reducing the boundary of the foreground object to remove small objects or noise points in the image.

[0039] Among them, the bright parts of the image can be enhanced by expanding the highlighted areas outward and connecting them with the surrounding darker areas, while filling some small holes or gaps to achieve filling.

[0040] Step S104, determining the maximum contour of the target map image based on a preset algorithm.

[0041] Among them, some edge detection algorithms are used to find the edges in the image, find the starting point of the contour based on the edge information, and traverse the entire contour according to certain rules (clockwise or counterclockwise). The points on the contour are stored, and the adjacent contour points are connected into a complete contour. The found contour is stored in a data structure. At the same time, the hierarchical information of the contour is also stored to facilitate understanding the relationship between the contours, sorting by contour size, finding the largest contour, and finding all contours within the largest contour according to the stored hierarchical relationship.

[0042] Specifically, the edge detection algorithm is used to find the edge E in the image, E(x, y) = Edge(I dilated (x,y)). Use the edge image E to find all contours {C i} and its hierarchical relationship H i :findContours(E)→({C i},{H i}); Sort the contours according to their area and find the largest contour: C max =max(area(C i )); Find all sub-contours within the larger contour based on the hierarchical relationship.

[0043] Step S105, traversing the map data to determine the number of segments of the contour within the maximum contour.

[0044] Specifically, traversing the map data to determine the number of segments of the contour within the maximum contour may include: traversing the map data from top to bottom and from left to right in sequence; and determining the number of segments of the contour within each column of the maximum contour.

[0045] Step S106: constructing an electronic fence based on the number of segments of the outline.

[0046] Specifically, constructing an electronic fence based on the number of segments of a contour may include: determining the size relationship between the number of segments of a current contour and the number of segments of a previous contour; if the size relationship is that the number of segments of the current contour is greater than the number of segments of the previous contour, generating two new areas; if the size relationship is that the number of segments of the current contour is less than the number of segments of the previous contour, generating a new area; and constructing an electronic fence using the new area.

[0047] Among them, the map data I is traversed, and the number of segments n(x) that each column is divided into by the contour within the largest contour is calculated. The corresponding logic is triggered according to the number of segments in the previous and next two columns. If the current number of segments is more than the previous number of segments, the current area is closed and two new areas are generated. If the current number of segments is less than the previous number of segments, the two areas are closed and a new area is generated. Furthermore, an electronic fence composed of multiple areas can be obtained.

[0048] Furthermore, the vehicle is accurately modeled and a coverage grid template is generated. The coverage grid templates in various directions are generated by rotating around the vehicle origin at equal intervals. Each template is used to simulate the space occupied by the vehicle in different directions and postures. These templates are used for subsequent collision detection and cross-boundary judgment to ensure the safe driving of the vehicle in complex environments.

[0049] Among them, create a vehicle coverage grid template T, rotate 0° to 360° around the vehicle origin at equal intervals, and obtain the coverage grid template {T θ θ∈[0,360]}, T θ =rotate(T,θ).

[0050] Furthermore, the vehicle's own position and posture are obtained in real time through sensors, and the created vehicle collision detection template is used to superimpose its own real-time position and posture. Through a multi-level detection mechanism, different safety distance thresholds are set. On the basis of judging whether the vehicle has crossed the boundary, an early warning function for the vehicle approaching the fence boundary is added. When the vehicle approaches the fence boundary, a warning signal is issued, prompting the automatic driving system to take measures such as deceleration to avoid crossing the boundary. This function ensures that the vehicle takes appropriate safety measures when approaching the electronic fence, thereby improving driving safety.

[0051] Among them, the position information of the autonomous driving vehicle is obtained in real time through sensors, and the current real-time position data is superimposed using the created vehicle collision detection template. The system adopts a multi-level detection mechanism and sets different safety distance thresholds to achieve accurate cross-border judgment and warning functions. When the vehicle approaches the boundary of the electronic fence, the system triggers corresponding warning and control measures based on the following thresholds. When the distance between the vehicle and the electronic fence is less than twice the safety distance (set to 1.2 times the length of the vehicle), the system sends a warning signal to alert the autonomous driving system to potential dangers. When the distance between the vehicle and the electronic fence is less than 1.5 times the safety distance, the system instructs the autonomous driving system to slow down to reduce the potential risk of collision. When the distance between the vehicle and the electronic fence is less than the safety distance, the system immediately triggers emergency stop measures to ensure that the vehicle does not cross the set electronic fence boundary.

[0052] The electronic fence generation method for an autonomous driving vehicle provided in an embodiment of the present invention can obtain map data of the environment; preprocess the map data to obtain an initial map image; denoise and fill the initial map image to obtain a target map image; determine the maximum contour of the target map image based on a preset algorithm; traverse the map data to determine the number of segments of the contour within the maximum contour; and construct an electronic fence based on the number of segments of the contour. In this method, the electronic fence is accurately divided, which saves time and effort and improves the safety of autonomous driving.

[0053] Example 2

[0054] An embodiment of the present invention also provides another method for generating an electronic fence for an autonomous driving vehicle; this method is implemented on the basis of the method in the above-mentioned embodiment; this method focuses on describing a specific implementation method for denoising and padding an initial map image to obtain a target map image.

[0055] Figure 2 A flowchart of another method for generating an electronic fence for an autonomous driving vehicle provided in an embodiment of the present invention is shown in FIG. Figure 2 As shown, the denoising and padding of the initial map image to obtain the target map image may include the following steps:

[0056] Step S201 , performing morphological operations and foreground area extraction on the initial map image to denoise the initial map image.

[0057] Specifically, morphological operations and foreground area extraction are performed on the initial map image, including: defining a first structure element; the first structure element defines the neighborhood shape and size of the morphological operation; the first structure element is positioned in the minimum area in the foreground area by sliding the first structure element on the initial map image; if non-foreground pixels are included under the first structure element, the pixels at the corresponding position are set as the background to reduce the boundary of the foreground area to complete denoising.

[0058] The first structural element is defined, which defines the neighborhood shape and size of morphological operations (such as corrosion, dilation, etc.), by sliding the structural element on the image and retaining the minimum area where the structural element is completely in the foreground area (usually white or highlighted). If any pixel under the structural element is not a foreground pixel, the pixel at that position is set to the background (usually black or low brightness). This process shrinks the boundaries of the foreground object and is used to remove small objects or noise points in the image.

[0059] Among them, the first structural element S is defined erosion , by sliding the structural element over the image, a morphological erosion operation is performed:

[0060] Among them, S erosion For a circle with a diameter of 8, the min operation retains the minimum value whose structure element is completely in the foreground area (white area).

[0061] Step S202: performing image enhancement and hole filling on the initial map image to fill the initial map image.

[0062] Specifically, image enhancement and hole filling are performed on the initial map image to fill the initial map image, including: defining a second structure element; sliding the second structure element on the initial map image, and calculating the local maximum value in the coverage area of ​​the structure element at each position to achieve hole filling.

[0063] In which, another structural element S is defined dilation , based on step 2, the structural element is slid on the image to perform a morphological dilation operation:

[0064] Among them, S dilation For a circle with a diameter of 5, the max operation computes the local maximum within the area covered by the structure element.

[0065] Step S203: the initial map image after denoising and padding is the target map image.

[0066] Example 3

[0067] Corresponding to the above method embodiment, the embodiment of the present invention provides an electronic fence generation device for an autonomous driving vehicle, Figure 3 A schematic diagram of the structure of an electronic fence generating device for an autonomous driving vehicle provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the electronic fence generating device of the autonomous driving vehicle may include:

[0068] The map data acquisition module 301 is used to acquire map data of the environment.

[0069] The map data preprocessing module 302 is used to preprocess the map data to obtain an initial map image.

[0070] The denoising and padding module 303 is used to denoise and pad the initial map image to obtain a target map image.

[0071] The maximum contour determining module 304 is used to determine the maximum contour of the target map image based on a preset algorithm.

[0072] The map data traversal module 305 is used to traverse the map data to determine the number of segments of the contour within the maximum contour.

[0073] The electronic fence construction module 306 is used to construct an electronic fence based on the number of segments of the outline.

[0074] The electronic fence generation device for an autonomous driving vehicle provided by an embodiment of the present invention can obtain map data of the environment; preprocess the map data to obtain an initial map image; denoise and fill the initial map image to obtain a target map image; determine the maximum contour of the target map image based on a preset algorithm; traverse the map data to determine the number of segments of the contour within the maximum contour; and construct an electronic fence based on the number of segments of the contour. In this way, the electronic fence is accurately divided, which saves time and effort and improves the safety of autonomous driving.

[0075] In some embodiments, the map data preprocessing module is further used to convert the map data into a matrix form to obtain a map data matrix; and to perform binarization processing on the image intensity represented by the pixels in the map data matrix to obtain an initial map image.

[0076] In some embodiments, the denoising and filling module is also used to perform morphological operations and foreground area extraction on the initial map image to denoise the initial map image; perform image enhancement and hole filling on the initial map image to fill the initial map image; the initial map image after denoising and filling is the target map image.

[0077] In some embodiments, the denoising and padding module is also used to define a first structure element; the first structure element defines the neighborhood shape and size of the morphological operation; the first structure element is positioned in the minimum area in the foreground area by sliding the first structure element on the initial map image; if the first structure element contains non-foreground pixels, the pixels at the corresponding position are set as the background to reduce the boundary of the foreground area to complete the denoising.

[0078] In some embodiments, the denoising and filling module is further used to define a second structure element; the second structure element is slid on the initial map image, and the local maximum value in the coverage area of ​​the structure element is calculated at each position to achieve hole filling.

[0079] In some embodiments, the electronic fence construction module is also used to determine the size relationship between the number of segments of the current contour and the number of segments of the previous contour; if the size relationship is that the number of segments of the current contour is greater than the number of segments of the previous contour, two new areas are generated; if the size relationship is that the number of segments of the current contour is less than the number of segments of the previous contour, a new area is generated; and the electronic fence is constructed through the new area.

[0080] In some embodiments, the map data traversal module is further used to traverse the map data from top to bottom and from left to right in sequence; and determine the number of segments of the contour within each column of the largest contour.

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

[0082] Example 4

[0083] The embodiment of the present invention also provides an electronic device for running the above-mentioned method for generating an electronic fence for an autonomous driving vehicle; see Figure 4 A structural schematic diagram of an electronic device is shown, which includes a memory 400 and a processor 401, wherein the memory 400 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 401 to implement the above-mentioned electronic fence generation method for the autonomous driving vehicle.

[0084] Further, Figure 4 The electronic device shown further includes a bus 402 and a communication interface 403 , and the processor 401 , the communication interface 403 and the memory 400 are connected via the bus 402 .

[0085] The memory 400 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 402 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0086] The processor 401 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 401. The above processor 401 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 invention 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 embodiment of the present invention 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 400, and the processor 401 reads the information in the memory 400 and completes the steps of the method of the above embodiment in combination with its hardware.

[0087] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned method for generating an electronic fence for an autonomous driving vehicle. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0088] The computer program product for the method of generating an electronic fence for an autonomous driving vehicle provided in an embodiment of the present invention includes a computer-readable storage medium storing a non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0089] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0090] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only 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 devices or units can be electrical, mechanical or other forms.

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

[0092] In addition, each functional unit in each embodiment of the present invention 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.

[0093] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the 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 several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0094] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed by the present invention, 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 solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for generating an electronic fence for an autonomous driving vehicle, characterized in that: The method comprises: Get map data of the environment; Preprocessing the map data to obtain an initial map image; Denoising and padding the initial map image to obtain a target map image; Determine the maximum contour of the target map image based on a preset algorithm; Traversing the map data to determine the number of segments of the contour within the maximum contour; An electric fence is constructed based on the number of segments of the outline.

2. The method according to claim 1, characterized in that The preprocessing of the map data to obtain an initial map image comprises: Converting the map data into a matrix form to obtain a map data matrix; The image intensity represented by the pixels in the map data matrix is ​​binarized to obtain the initial map image.

3. The method according to claim 2, characterized in that The step of denoising and padding the initial map image to obtain a target map image includes: Performing morphological operations and foreground area extraction on the initial map image to denoise the initial map image; Performing image enhancement and hole filling on the initial map image to fill the initial map image; The initial map image after denoising and padding is the target map image.

4. The method according to claim 3, characterized in that The performing morphological operations and foreground area extraction on the initial map image comprises: Defining a first structure element; the first structure element defines the neighborhood shape and size of the morphological operation; Positioning the first structural element in the minimum area in the foreground area by sliding the first structural element on the initial map image; If the first structure element contains non-foreground pixels, the pixels at the corresponding position are set as the background to reduce the boundary of the foreground area and complete the denoising.

5. The method according to claim 3, characterized in that: The performing image enhancement and hole filling on the initial map image to fill the initial map image includes: defining a second structural element; The second structure element is slid on the initial map image, and the local maximum value in the coverage area of ​​the structure element is calculated at each position to achieve hole filling.

6. The method according to claim 1, characterized in that The step of constructing an electronic fence based on the number of segments of the contour comprises: Determine the relationship between the number of segments of the current contour and the number of segments of the previous contour; If the size relationship is that the number of segments of the current contour is greater than the number of segments of the previous contour, two new areas are generated; If the size relationship is that the number of segments of the current contour is less than the number of segments of the previous contour, a new area is generated; An electric fence is constructed through the new area.

7. The method according to claim 1, characterized in that Traversing the map data to determine the number of segments of the contour within the maximum contour includes: Traverse the map data from top to bottom and from left to right; Determine the number of segments of the contour within the largest contour in each column.

8. An electronic fence generation device for an autonomous driving vehicle, characterized in that: The device comprises: A map data acquisition module, used to acquire map data of the environment; A map data preprocessing module, used for preprocessing the map data to obtain an initial map image; A denoising and padding module, used for denoising and padding the initial map image to obtain a target map image; A maximum contour determination module, used to determine the maximum contour of the target map image based on a preset algorithm; A map data traversal module, used for traversing the map data to determine the number of segments of the inner contour of the maximum contour; The electronic fence construction module is used to construct the electronic fence based on the number of segments of the outline.

9. An electronic device, characterized in that: It includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the electronic fence generation method for an autonomous driving vehicle as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the electronic fence generation method for an autonomous driving vehicle as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Electronic fence generation method and device, medium and electronic device

    CN110659340A

  • Video-based real-time electronic fence generation method

    CN112562238A

  • Electronic fence generation method and device and storage medium

    CN113781646A

  • Map fence generation method and device, equipment and storage medium

    CN114443797A

  • Vehicle early warning method and device of electronic fence, electronic equipment and storage medium

    CN115311840A