Sample image enhancement method and device, electronic equipment and computer readable storage medium

By adding simulated lane lines to the lane lines generated by the code, the model error caused by differences in lane line images was resolved, improving the realism of lane line sample images and the accuracy of camera calibration.

CN115375580BActive Publication Date: 2026-06-26ZHIDAO NETWORK TECH (BEIJING) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHIDAO NETWORK TECH (BEIJING) CO LTD
Filing Date
2022-09-05
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

The discrepancy between the lane line images generated by the code and the real lane line images increases the model error of autonomous driving and navigation, affecting safety and accuracy.

Method used

By randomly selecting lane segments of random length from the lane lines generated by the code and adding simulated lane lines of preset width to their edges, an enhanced lane line sample image is generated, making it closer to the real situation of lane lines in the actual scene.

Benefits of technology

It improves the realism and accuracy of lane line sample images and enhances the accuracy of camera calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115375580B_ABST
    Figure CN115375580B_ABST
Patent Text Reader

Abstract

The application relates to a sample image enhancement method and device, an electronic device and a computer readable storage medium. The method comprises the following steps: acquiring a to-be-processed sample image comprising at least a group of lane lines; on the lane lines, at least one lane line segment is randomly selected to be determined as a to-be-processed lane line segment; a preset width of a simulation lane line is added to the edge of the to-be-processed lane line segment along the lane line direction, and an enhanced lane line sample image is generated. According to the application, a lane line with a random length is randomly selected as a to-be-processed lane line on a lane line generated by code, a simulation lane line with a preset random width is added to the edge of the to-be-processed lane line along the lane line direction, and an enhanced lane line sample image is generated. The lane line in the lane line sample image is closer to the real situation of an actual lane line image, the authenticity and accuracy of the lane line sample image are improved, and the accuracy of camera calibration is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image data processing technology, and in particular to sample image enhancement methods, apparatus, electronic devices, and computer-readable storage media. Background Technology

[0002] With the development of computer technology, vehicle-assisted autonomous driving and navigation technologies are also advancing rapidly. Both autonomous driving and navigation require onboard cameras. Before use, onboard cameras need to be calibrated and their poses calculated. When using code-generated mask images to train the camera model, the difference between the code-generated lane line images and real lane line images can lead to increased model errors, which in turn affects the safety of autonomous driving and the accuracy of navigation. Therefore, how to obtain accurate lane line sample images is a technical problem that needs to be solved. Summary of the Invention

[0003] To address or partially address the problems existing in related technologies, this application provides a sample image enhancement method, apparatus, electronic device, and computer-readable storage medium, which can enhance lane line sample images generated by code to make them more consistent with real lane line images, thereby reducing model errors.

[0004] The first aspect of this application provides a sample image enhancement method, the method comprising:

[0005] Acquire a sample image to be processed, wherein the sample image to be processed includes at least one set of lane lines;

[0006] On the lane line, at least one lane line segment is randomly selected as the lane line segment to be processed;

[0007] The lane line segment to be processed is enhanced to change its shape, thereby generating an enhanced lane line sample image.

[0008] In one possible implementation of this application, the enhancement processing of the lane segment to be processed to change the shape of the lane segment to be processed includes:

[0009] A simulated lane line of a preset width is added along the direction of the lane line to be processed at the edge of the lane line to be processed.

[0010] In one possible implementation of this application, the enhancement processing of the lane segment to be processed to change the shape of the lane segment to be processed includes: taking at least one pixel in the lane segment to be processed as the center point, randomly selecting a value as the radius within a preset range, and generating a sample enhancement region, wherein the color of the sample enhancement region is consistent with the road color where the lane line is located in the sample image.

[0011] In one possible implementation of this application, the enhancement processing of the lane segment to be processed to change the shape of the lane segment to be processed includes:

[0012] The starting and / or ending positions of the lane line segment to be processed are offset in a direction away from the lane lines. As a possible implementation of this application, in this implementation, the acquisition of the sample image to be processed includes at least one set of lane lines, including:

[0013] A road scene image is acquired, and a sample image to be processed is generated based on the number and position of lane lines in the road scene image. The number of lane lines in the sample image to be processed is the same as the number of lane lines in the road scene image, and the position of lane lines in the sample image to be processed is the same as the position of lane lines in the road scene image.

[0014] As one possible implementation of this application, in this implementation, randomly selecting at least one lane segment as the lane segment to be processed on the lane line includes:

[0015] On the lane lines, at least one lane line of random length that is not repeated is randomly selected and determined as the lane line segment to be processed.

[0016] As one possible implementation of this application, in this implementation, the step of randomly selecting at least one lane line of random length without repetition as the lane line segment to be processed includes:

[0017] At least one starting point is randomly selected on at least one lane line. Starting from the starting point, a lane line of random length is selected along the same direction within a preset length range on the lane line where the starting point is located as the lane line to be processed. The lane lines to be processed are not repeated.

[0018] As one possible implementation of this application, in this implementation, adding a simulated lane line of a preset width along the lane line direction at the edge of the lane line segment to be processed includes:

[0019] Determine the grayscale values ​​of the lane line region and the non-lane line region in the sample image to be processed;

[0020] The grayscale value of the area with a preset width at the edge of the lane segment to be processed is adjusted to the grayscale value of the lane line area to generate a simulated lane segment.

[0021] A second aspect of this application provides a sample image enhancement apparatus, the sample image enhancement apparatus comprising:

[0022] An image acquisition module is used to acquire a sample image to be processed, wherein the sample image to be processed includes at least one set of lane lines;

[0023] The lane segment determination module is used to randomly select at least one lane segment on the lane line and determine it as the lane segment to be processed.

[0024] An enhancement module is used to enhance the lane line segment to be processed, thereby changing the shape of the lane line segment and generating an enhanced lane line sample image.

[0025] A third aspect of this application provides an electronic device, comprising:

[0026] Processor; and

[0027] A memory that stores executable code, which, when executed by the processor, causes the processor to perform the method described above.

[0028] A fourth aspect of this application provides a computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method described above.

[0029] In this embodiment of the application, when processing lane line sample images of real-world roads, a lane line of random length is randomly selected as the lane line to be processed from the lane lines generated by the code. Simulated lane lines of preset random width are added to the edge of the lane line to be processed along the lane line direction to generate an enhanced lane line sample image. This results in burrs in the lane lines in the lane line sample image, which is closer to the real situation of the real-world lane line image, improving the realism and accuracy of the lane line sample image and improving the accuracy of camera calibration.

[0030] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0031] The above and other objects, features and advantages of this application will become more apparent from the more detailed description of exemplary embodiments thereof in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments thereof.

[0032] Figure 1 This is a schematic flowchart illustrating the sample image enhancement method in an embodiment of this application;

[0033] Figure 2 This is a schematic diagram of the sample image to be processed shown in the embodiments of this application;

[0034] Figure 3 This is a schematic diagram of lane lines shown in an embodiment of this application;

[0035] Figure 4 This is a schematic diagram of the starting point shown in the embodiments of this application;

[0036] Figure 5 This is a schematic diagram of the lane segment to be processed shown in the embodiments of this application;

[0037] Figure 6 This is a schematic flowchart of a method for enhancing lane segments to be processed, provided in an embodiment of this application.

[0038] Figure 7 This is a schematic diagram of an enhanced sample image provided in an embodiment of this application;

[0039] Figure 8 This is a schematic diagram of the structure of a sample image enhancement device provided in an embodiment of this application;

[0040] Figure 9 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application. Detailed Implementation

[0041] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to make this application more thorough and complete, and to fully convey the scope of this application to those skilled in the art.

[0042] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0043] It should be understood that although the terms "first," "second," "third," etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0044] With the development of computer technology, vehicle-assisted autonomous driving and navigation technologies are also advancing rapidly. Both autonomous driving and navigation require onboard cameras. Before use, these cameras need calibration and pose calculation. When training camera models using code-generated mask images, the differences between the code-generated lane line images and real lane line images can lead to increased model errors, thus affecting the safety of autonomous driving and the accuracy of navigation. Therefore, obtaining accurate lane line sample images is a technical problem that needs to be solved.

[0045] To address the aforementioned issues, this application provides a sample image enhancement method. When processing lane line sample images of real-world roads, a lane line of random length is randomly selected from the lane lines generated by code as the lane line to be processed. A simulated lane line of preset random width is added along the lane line direction at the edge of the lane line to be processed, generating an enhanced lane line sample image. This makes the lanes in the lane line sample image closer to the real-world lane line image, improving the realism and accuracy of the lane line sample image and enhancing the accuracy of camera calibration.

[0046] The technical solutions of the embodiments of this application are described in detail below with reference to the accompanying drawings.

[0047] Figure 1 This is a schematic flowchart illustrating the sample image enhancement method in an embodiment of this application.

[0048] See Figure 1 The sample image enhancement method provided in this application includes:

[0049] Step S101: Obtain a sample image to be processed, wherein the sample image to be processed includes at least one set of lane lines.

[0050] In this embodiment, the sample image to be processed refers to an image generated from real-world road lane lines that includes at least one set of lane lines. This sample image can be used for camera calibration. Optionally, the sample image to be processed may include two, three, four, or more lane lines; this application does not limit this. In this embodiment, the sample image to be processed can be generated using preset code. Optionally, when generating the sample image to be processed using code, such as... Figure 2 As shown, based on the real-world road conditions, the road surface color can be set to black and the lane lines to white for easy differentiation. Simultaneously, the distance, length, and direction of the lane lines in the sample image to be processed are determined based on the distance, length, and direction of the lane lines in the real-world road image. In this embodiment, when generating the sample image to be processed, the viewpoint of the sample image can be the viewpoint of the camera on the vehicle when capturing the real-world road. It can be imagined that the sample image to be processed is captured by a virtual camera, and the height of the virtual camera above the road and the shooting angle of the virtual camera can be the height and shooting angle of the camera on the vehicle above the road.

[0051] As one possible implementation of this application, for ease of explanation, a specific embodiment is used as an example, such as... Figure 3 As shown, the sample image to be processed includes a set of lane lines, namely the left lane line and the right lane line. Each lane line consists of discontinuous line segments on the same straight line. For ease of explanation, as shown... Figure 3 As shown, each lane line displays only a complete lane line segment. Of course, in this embodiment, whether the lane lines in the sample image to be processed are continuous, whether they are on the same straight line, or whether they are straight lines can be selected according to the actual situation, and this application does not impose any restrictions on this.

[0052] Step S102: On the lane line, at least one lane line segment is randomly selected and determined as the lane line segment to be processed.

[0053] In the embodiments of this application, when processing the sample image to be processed, at least one lane line segment is randomly selected from the lane lines of the sample image to be processed as the lane line segment to be processed. It is possible to select at least one lane line segment to be processed on only one lane line, or at least one lane line segment to be processed on multiple lane lines, or at least one lane line segment to be processed on each lane line. This application does not limit this.

[0054] As one possible implementation of this application, for ease of explanation, following the foregoing embodiments, such as Figure 4As shown, when randomly selecting lane segments to be processed, at least one starting point can be randomly selected on each lane line, and based on each starting point, a lane line of random length can be selected as the lane segment to be processed according to the lane line direction. In this embodiment, the length of the lane segment to be processed should be within a controllable range, theoretically not exceeding the length of the lane line. To achieve better simulation results, the length of the lane segment to be processed should not exceed 10cm. In this embodiment, as... Figure 4 As shown, starting points a and b are randomly selected on the left lane line, and starting points c, d, and e are randomly selected on the right lane line. The directions of the two lane lines are ab and cde, respectively. When selecting the lane line segments to be processed, starting from a, b, c, d, and e, a lane line segment of random length is selected according to the direction of the lane line to be processed. There are no duplicate lane lines between each lane line segment to be processed.

[0055] Step S103: Enhance the lane line segment to be processed to change the shape of the lane line segment to be processed, and generate an enhanced lane line sample image.

[0056] In this embodiment, after determining the lane segment to be processed, enhancement processing is performed on the lane segment to change its shape, thereby enhancing the sample image. In this embodiment, the enhancement processing of the lane segment to be processed includes:

[0057] Add a simulated lane line of a preset width along the lane line direction at the edge of the lane line to be processed; and / or

[0058] Using at least one pixel in the lane segment to be processed as the center point, a value is randomly selected within a preset range as the radius to generate a sample enhancement region, wherein the color of the sample enhancement region is consistent with the road color where the lane line is located in the sample image; and / or

[0059] The starting and / or ending positions of the vehicle guide segment to be processed are shifted in a direction away from the lane line.

[0060] In this embodiment, the simulated lane line refers to the simulated lane line burrs added to the edge of the lane line segment to be processed, wherein the simulated lane line has the same color as the lane line in the sample image to be processed. In this embodiment, the edge of the lane line segment to be processed refers to the left and right edges of the lane line, specifically, the areas where the left and right sides of the lane line contact the road surface. The preset width refers to the width starting from the edge of the lane line and perpendicular to the direction of the lane line. Optionally, this width can be between 1 and 10 cm. Of course, this application does not limit the specific value of the width.

[0061] As one possible implementation of this application, for ease of explanation, taking the aforementioned embodiment as an example, after determining the lane segment to be processed, a simulated lane line of a preset width is added to the edge of each lane segment to be processed, such as... Figure 5 As shown, optionally, when adding simulated lane lines to the edge of the lane segment to be processed, it can be at the left edge or the right edge of the lane segment to be processed. This application does not limit this.

[0062] In this embodiment of the application, the enhancement processing of the lane line segment to be processed can also be achieved by selecting at least one pixel on the lane line to be processed. Taking one pixel as an example, a circular enhancement area is determined with the pixel as the center and a randomly selected value as the radius. The randomly selected value is within a preset range. The color of the enhancement area is adjusted to match the color of the road surface where the lane line is located in the sample image, so that it appears as if a small part of the lane line is missing, which is more in line with the actual usage of lane lines.

[0063] In this embodiment, the enhancement processing of the lane segment to be processed can also involve offsetting the starting and / or ending positions of the lane segment by a small distance, causing the starting and / or ending ends of the lane segment to shift in a direction away from the direction in which the lane line is located. The offset distance should not be too large, and should ensure that the entire lane line appears to be in a straight line. The specific offset distance can be determined according to the actual situation, and this application does not impose any restrictions.

[0064] In this embodiment, the sample image to be processed, after being enhanced by the image enhancement method provided in this application, can be used as input to a neural network. The neural network predicts camera extrinsic parameters. The sample image enhanced by the sample enhancement method provided in this application can greatly improve the accuracy of the neural network in predicting extrinsic parameters. The neural network can be an HNet neural network; optionally, the specific choice of the neural network can be determined according to the actual situation, and this application does not impose any restrictions.

[0065] In this embodiment of the application, when processing lane line sample images of real-world roads, a lane line of random length is randomly selected as the lane line to be processed from the lane lines generated by the code. Simulated lane lines of preset random width are added to the edge of the lane line to be processed along the lane line direction to generate an enhanced lane line sample image. This results in burrs in the lane lines in the lane line sample image, which is closer to the real situation of the real-world lane line image, improving the realism and accuracy of the lane line sample image and improving the accuracy of camera calibration.

[0066] In one possible implementation of this application, the step of acquiring the sample image to be processed, wherein the sample image to be processed includes at least one set of lane lines, includes:

[0067] A road scene image is acquired, and a sample image to be processed is generated based on the number and position of lane lines in the road scene image. The number of lane lines in the sample image to be processed is the same as the number of lane lines in the road scene image, and the position of lane lines in the sample image to be processed is the same as the position of lane lines in the road scene image.

[0068] In this embodiment, to better reproduce the distribution of lane lines in the real-world road image when generating the sample image to be processed, the sample image can be generated based on the distribution of lane lines in the real-world road image. Optionally, when generating the sample image to be processed, the number of lane lines and the position of each lane line in the real-world road image are first determined to ensure that the number of lane lines in the sample image to be processed is consistent with the number of lane lines in the real-world road image, and the position of the lane lines in the sample image to be processed is consistent with the position of the lane lines in the real-world road image. The distance, length, and direction between lane lines in the sample image to be processed are determined based on the distance, length, and direction between lane lines in the real-world road image. In this embodiment, when generating the sample image to be processed, the viewpoint of the sample image to be processed can be the viewpoint of the camera on the vehicle when shooting the real-world road. It can be imagined that the sample image to be processed is taken by a virtual camera, and the height of the virtual camera above the road and the shooting angle of the virtual camera can be the height of the camera on the vehicle above the road and the shooting angle.

[0069] This application embodiment generates a sample image to be processed based on a real-world road image, ensuring the correlation between the sample image to be processed and the real-world road image, and ensuring the accuracy of the sample image to be processed.

[0070] As one possible implementation of this application, in this implementation, randomly selecting at least one lane segment as the lane segment to be processed on the lane line includes:

[0071] On the lane lines, at least one lane line of random length that is not repeated is randomly selected and determined as the lane line segment to be processed.

[0072] In this embodiment, when determining the lane segments to be processed on the lane lines in the sample image to be processed, at least one lane segment is randomly selected from the lane lines in the sample image to be processed. This selection can be made on only one lane line, on multiple lane lines, or on every lane line; this application does not impose any restrictions on this. In this embodiment, there are no duplicate lane lines among the lane segments to be processed on each lane line.

[0073] As one possible implementation of this application, for ease of explanation, a specific embodiment is used as an example. When determining the lane segment to be processed in the sample image to be processed, at least one lane segment to be processed is randomly selected on each lane line. The length of each lane segment to be processed is randomly selected, and each lane segment to be processed is unique.

[0074] This application embodiment identifies at least one non-repeating lane segment of random length as the lane segment to be processed, which facilitates subsequent processing and enhances the realism of the sample image to be processed.

[0075] As one possible implementation of this application, in this implementation, the step of randomly selecting at least one lane line of random length without repetition as the lane line segment to be processed includes:

[0076] At least one starting point is randomly selected on at least one lane line. Starting from the starting point, a lane line of random length is selected along the same direction within a preset length range on the lane line where the starting point is located as the lane line to be processed. The lane lines to be processed are not repeated.

[0077] In the embodiments of this application, such as Figure 4 As shown, when randomly selecting lane segments to be processed, at least one starting point can be randomly selected on each lane line, and based on each starting point, a lane line of random length can be selected as the lane segment to be processed according to the lane line direction. In this embodiment, the length of the lane segment to be processed should be within a controllable range, theoretically not exceeding the length of the lane line. To achieve better simulation results, the length of the lane segment to be processed should not exceed 10cm. In this embodiment, as... Figure 4 As shown, starting points a and b are randomly selected on the left lane line, and starting points c, d, and e are randomly selected on the right lane line. The directions of the two lane lines are ab and cde, respectively. When selecting the lane line segments to be processed, starting from a, b, c, d, and e, a lane line segment of random length is selected according to the direction of the lane line to be processed. There are no duplicate lane lines between each lane line segment to be processed.

[0078] This application embodiment ensures that each lane segment to be processed is unique by randomly selecting a starting point on the lane line and determining the lane line segment to be processed based on the starting point, thus ensuring the accuracy of the sample image to be processed.

[0079] As one possible implementation of this application, in this implementation, such as Figure 6 As shown, adding a simulated lane line of a preset width along the lane line direction at the edge of the lane segment to be processed includes:

[0080] Step S601: Determine the grayscale values ​​of the lane line region and the non-lane line region in the sample image to be processed.

[0081] In this embodiment, the sample image to be processed includes lane line areas and non-lane line areas. When processing the lane line segments to be processed, the grayscale values ​​of the lane line areas and non-lane line areas in the sample image to be processed are first determined. As a possible implementation of this application, following the aforementioned embodiment, the lane line areas in the sample image to be processed are white, and the non-lane line areas are black, and the grayscale values ​​of the lane line areas and non-lane line areas in the sample image to be processed are determined respectively. As a possible implementation of this application, the colors of the lane line areas and non-lane line areas can be selected according to actual conditions, and this application does not impose any restrictions on this.

[0082] Step S602: Adjust the grayscale value of the area with a preset width at the edge of the lane segment to be processed to the grayscale value of the lane line area to generate a simulated lane segment.

[0083] In this embodiment, after determining the gray values ​​of the lane line region and the non-lane line region in the sample image to be processed, the gray values ​​of the lane line segments to be processed determined in the aforementioned embodiment are adjusted to the gray values ​​of the lane line region in the sample image to be processed, ensuring that the gray values ​​of the lane line segments to be processed are consistent with the gray values ​​of the lane line region in the sample image to be processed, thereby generating simulated lane line segments.

[0084] As one possible implementation of this application, for ease of explanation, a specific embodiment is used as an example, such as... Figure 7 As shown, in the sample image to be processed, the grayscale value of the lane line area is 255, and the grayscale value of the non-lane line area is 0. The grayscale value of the lane line segment to be processed determined in the previous embodiment is adjusted to 255 to form a simulated lane line segment. Optionally, the grayscale values ​​of the lane line area and the non-lane line area in the sample image to be processed can be selected according to the actual situation, and this application does not impose any restrictions on this.

[0085] This application embodiment adjusts the grayscale value of the lane line segment to be processed so that the grayscale value of the lane line segment is the same as the grayscale value of the lane line area in the sample image to be processed, thereby generating a simulated lane line segment, enhancing the sample image to be processed, improving the realism of the sample image to be processed, and ensuring the accuracy of camera calibration.

[0086] In this embodiment of the application, when processing lane line sample images of real-world roads, a lane line of random length is randomly selected as the lane line to be processed from the lane lines generated by the code. Simulated lane lines of preset random width are added to the edge of the lane line to be processed along the lane line direction to generate an enhanced lane line sample image. This results in burrs in the lane lines in the lane line sample image, which is closer to the real situation of the real-world lane line image, improving the realism and accuracy of the lane line sample image and improving the accuracy of camera calibration.

[0087] Corresponding to the aforementioned application function implementation method embodiments, this application also provides a sample image enhancement device, an electronic device, and corresponding embodiments.

[0088] Figure 8 This is a schematic diagram of the structure of the sample image enhancement device shown in the embodiments of this application.

[0089] See Figure 8 The sample image enhancement device 80 provided in this application embodiment includes: an image acquisition module 810, a lane segment determination module 820, and an enhancement module 830, wherein:

[0090] Image acquisition module 810 is used to acquire a sample image to be processed, wherein the sample image to be processed includes at least one set of lane lines;

[0091] The lane segment determination module 820 is used to randomly select at least one lane segment on the lane line and determine it as the lane segment to be processed.

[0092] The enhancement module 830 is used to enhance the lane line segment to be processed, thereby changing the shape of the lane line segment to be processed and generating an enhanced lane line sample image.

[0093] In one possible implementation of this application, the lane segment determination module 820 includes:

[0094] The lane line determination unit is used to randomly select at least one starting point on at least one lane line, and select a lane line of random length within a preset length range along the same direction on the lane line where the starting point is located as the lane line to be processed, wherein the lane lines to be processed are not repeated.

[0095] In one possible implementation of this application, the enhancement module 830 includes:

[0096] Gray value determination unit 830 is used to determine the gray value of the lane line region and the gray value of the non-lane line region in the sample image to be processed;

[0097] Grayscale adjustment unit 830 is used to adjust the grayscale value of the area of ​​the edge of the lane segment to be processed to the grayscale value of the lane line area, thereby generating a simulated lane segment.

[0098] In one possible implementation of this application, when the image acquisition module 810 acquires a sample image to be processed, wherein the sample image to be processed includes at least one set of lane lines, it can be used to:

[0099] A road scene image is acquired, and a sample image to be processed is generated based on the number and position of lane lines in the road scene image. The number of lane lines in the sample image to be processed is the same as the number of lane lines in the road scene image, and the position of the lane lines in the sample image to be processed is the same as the position of the lane lines in the road scene image.

[0100] In one possible implementation of this application, when the lane segment determination module 820 randomly selects at least one lane segment on the lane line and determines it as the lane segment to be processed, it is used to:

[0101] On the lane lines, at least one lane line of random length that is not repeated is randomly selected and determined as the lane line segment to be processed.

[0102] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated further here.

[0103] In this embodiment of the application, when processing lane line sample images of real-world roads, a lane line of random length is randomly selected as the lane line to be processed from the lane lines generated by the code. Simulated lane lines of preset random width are added to the edge of the lane line to be processed along the lane line direction to generate an enhanced lane line sample image. This results in burrs in the lane lines in the lane line sample image, which is closer to the real situation of the real-world lane line image, improving the realism and accuracy of the lane line sample image and improving the accuracy of camera calibration.

[0104] Figure 9 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application.

[0105] See Figure 9The electronic device 90 includes a memory 910 and a processor 920.

[0106] The processor 920 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0107] Memory 910 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. ROM may store static data or instructions required by the processor 920 or other modules of the computer. Permanent storage devices may be read-write storage devices. Permanent storage devices may be non-volatile storage devices that retain stored instructions and data even when the computer is powered off. In some embodiments, permanent storage devices use mass storage devices (e.g., magnetic or optical disks, flash memory) as permanent storage devices. In other embodiments, permanent storage devices may be removable storage devices (e.g., floppy disks, optical drives). System memory may be a read-write storage device or a volatile read-write storage device, such as dynamic random access memory. System memory may store some or all of the instructions and data required by the processor during operation. Furthermore, memory 910 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 910 may include a removable storage device that is readable and / or writable, such as a laser disc (CD), a read-only digital multifunction optical disc (e.g., DVD-ROM, dual-layer DVD-ROM), a read-only Blu-ray disc, an ultra-high-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not contain carrier waves or transient electronic signals transmitted wirelessly or via wired connections.

[0108] The memory 910 stores executable code, which, when processed by the processor 920, can cause the processor 920 to execute part or all of the methods described above.

[0109] Furthermore, the method according to this application can also be implemented as a computer program or computer program product, which includes computer program code instructions for performing some or all of the steps in the method described above.

[0110] Alternatively, this application may be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium) storing executable code (or computer program or computer instruction code) thereon, which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the steps of the methods described above according to this application.

[0111] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A sample image enhancement method, characterized in that, The method includes: Acquire a sample image to be processed, wherein the sample image to be processed includes at least one set of lane lines; On the lane line, at least one lane line segment is randomly selected as the lane line segment to be processed; the lane line segment to be processed is obtained by randomly selecting at least one starting point and selecting a random length on the lane line segment according to each starting point in the direction of the lane line; The lane segment to be processed is enhanced to change its shape and generate an enhanced lane line sample image; including adding a simulated lane line of a preset width along the lane line direction at the edge of the lane line to be processed.

2. The sample image enhancement method according to claim 1, characterized in that, The enhancement process for the lane segment to be processed, in order to change the shape of the lane segment to be processed, includes: taking at least one pixel in the lane segment to be processed as the center point, randomly selecting a value as the radius within a preset range, and generating a sample enhancement region, wherein the color of the sample enhancement region is consistent with the road color where the lane line is located in the sample image.

3. The sample image enhancement method according to claim 1, characterized in that, The enhancement process for the lane segment to be processed, to change the shape of the lane segment to be processed, includes: The start and / or end positions of the lane segment to be processed are shifted in a direction away from the lane line.

4. The sample image enhancement method according to claim 1, characterized in that, The process of acquiring the sample image to be processed, wherein the sample image to be processed includes at least one set of lane lines, including: A road scene image is acquired, and a sample image to be processed is generated based on the number and position of lane lines in the road scene image. The number of lane lines in the sample image to be processed is the same as the number of lane lines in the road scene image, and the position of the lane lines in the sample image to be processed is the same as the position of the lane lines in the road scene image.

5. The sample image enhancement method according to claim 1, characterized in that, The step of randomly selecting at least one lane segment as the lane segment to be processed on the lane line includes: On the lane lines, at least one lane line of random length that is not repeated is randomly selected and determined as the lane line segment to be processed.

6. The sample image enhancement method according to claim 5, characterized in that, The process of randomly selecting at least one lane line of random length without repetition as the lane line segment to be processed includes: At least one starting point is randomly selected on at least one lane line. Starting from the starting point, a lane line of random length is selected along the same direction within a preset length range on the lane line where the starting point is located as the lane line to be processed. The lane lines to be processed are not repeated.

7. The sample image enhancement method according to claim 1, characterized in that, Adding a simulated lane line of a preset width along the lane line direction at the edge of the lane segment to be processed includes: Determine the grayscale values ​​of the lane line region and the non-lane line region in the sample image to be processed; The grayscale value of the area with a preset width at the edge of the lane segment to be processed is adjusted to the grayscale value of the lane line area to generate a simulated lane segment.

8. A sample image enhancement device, characterized in that, The sample image enhancement device includes: An image acquisition module is used to acquire a sample image to be processed, wherein the sample image to be processed includes at least one set of lane lines; The lane segment determination module is used to randomly select at least one lane segment on the lane line and determine it as the lane segment to be processed; the lane segment to be processed is obtained by randomly selecting at least one starting point and selecting a random length on the lane segment according to the lane line direction based on each starting point; An enhancement module is used to enhance the lane line segment to be processed, thereby changing the shape of the lane line segment and generating an enhanced lane line sample image; including adding a simulated lane line of a preset width along the lane line direction at the edge of the lane line to be processed.

9. An electronic device, characterized in that, include: processor; as well as A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method as described in any one of claims 1-7.