CN115375580A - Sample image enhancement method and device, electronic equipment and computer-readable storage medium - Google Patents

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

Info

Publication number
CN115375580A
CN115375580A CN202211076406.9A CN202211076406A CN115375580A CN 115375580 A CN115375580 A CN 115375580A CN 202211076406 A CN202211076406 A CN 202211076406A CN 115375580 A CN115375580 A CN 115375580A
Authority
CN
China
Prior art keywords
lane line
processed
lane
sample image
segment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211076406.9A
Other languages
Chinese (zh)
Inventor
李耀萍
贾双成
朱磊
单国航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhidao Network Technology Beijing Co Ltd
Original Assignee
Zhidao Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhidao Network Technology Beijing Co Ltd filed Critical Zhidao Network Technology Beijing Co Ltd
Priority to CN202211076406.9A priority Critical patent/CN115375580A/en
Publication of CN115375580A publication Critical patent/CN115375580A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • G06T2207/30256Lane; Road marking

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The application relates to a sample image enhancement method and device. Electronic device and computer readable storage medium. The method comprises the following steps: acquiring a to-be-processed sample image at least comprising a group of lane lines; on a lane line, randomly selecting at least one lane line segment to determine as a lane line segment to be processed; and adding a simulation lane line with a preset width at the edge of the lane line segment to be processed along the direction of the lane line to generate an enhanced lane line sample image. According to the method and the device, the lane line with random length is randomly selected as the lane line to be processed on the lane line generated through the codes, the simulation lane line with preset random width is added to the edge of the lane line to be processed along the direction of the lane line, and the enhanced lane line sample image is generated, so that the lane line in the lane line sample image is closer to the real situation of the live-action lane line image, the authenticity and the accuracy of the lane line sample image are improved, and the accuracy of camera calibration is improved.

Description

Sample image enhancement method and device, electronic equipment and computer-readable storage medium
Technical Field
The present application relates to the field of image data processing technologies, and in particular, to a sample image enhancement method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of computer technology, the technology of auxiliary automatic driving and navigation of vehicles are also gradually improved, automatic driving and navigation both need to use a vehicle-mounted camera, the vehicle-mounted camera needs to be calibrated and pose calculated before being used, and when a camera model is trained by using a mask picture generated by codes, because the difference between a lane line picture generated by the codes and a real lane line picture can cause the increase of model errors, so that the safety of automatic driving and the accuracy of navigation are influenced, therefore, the method for obtaining an accurate lane line sample image is a technical problem to be solved.
Disclosure of Invention
In order to solve or partially solve the problems in the related art, the present application provides a sample image enhancement method, apparatus, electronic device, and computer-readable storage medium, which can enhance a lane line sample image generated by a code so that the lane line sample image is more consistent with a real lane line image, thereby reducing a model error.
The application provides a sample image enhancement method in a first aspect, which includes:
acquiring a sample image to be processed, wherein the sample image to be processed at least comprises a group of lane lines;
randomly selecting at least one lane line segment on the lane line to determine the lane line segment to be processed;
and performing enhancement processing on 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.
As one possible embodiment of the present application, in this embodiment, the performing an enhancement process on the lane segment to be processed to change the shape of the lane segment to be processed includes:
and adding a simulation lane line with a preset width at the edge of the lane line to be processed along the direction of the lane line.
As one possible embodiment of the present application, in this embodiment, the performing an enhancement process on the lane segment to be processed to change the shape of the lane segment to be processed includes: and taking at least one pixel point in the lane line segment to be processed as a central point, randomly selecting a value in a preset value range as a radius, and generating a sample enhancement area, wherein the color of the sample enhancement area is consistent with the color of the road where the lane line is located in the sample image.
As one possible embodiment of the present application, in this embodiment, the performing an enhancement process on the lane segment to be processed to change the shape of the lane segment to be processed includes:
and shifting the starting position and/or the ending position of the vehicle conductor segment to be processed to the direction deviating from the lane line. As a possible embodiment of the present application, in this embodiment, the acquiring a to-be-processed sample image, where the to-be-processed sample image includes at least one set of lane lines, includes:
acquiring a road live-action image, and generating the sample image to be processed based on the number and the position of lane lines in the road live-action image, wherein the number in the sample image to be processed is consistent with the number of lane lines in the road live-action image, and the position of the lane line in the sample image to be processed is consistent with the position of the lane line in the road live-action image.
As a possible embodiment of the present application, in this embodiment, the randomly selecting at least one lane line segment on the lane line to be determined as the lane line segment to be processed includes:
and randomly selecting at least one non-repeating lane line with random length on the lane line to determine the lane line as the lane line segment to be processed.
As a possible embodiment of the present application, in this embodiment, the randomly selecting at least one non-repeating lane line with a random length to determine as the lane line segment to be processed includes:
at least one starting point is randomly selected on at least one lane line, the starting points are respectively used as the starting points, and lane lines with random lengths are selected as lane lines to be processed in a preset length range along the same direction on the lane line where the starting points are located, wherein the lane lines to be processed are not repeated.
As a possible embodiment of the present application, in this embodiment, the adding a simulated lane line with a preset width along the lane line direction at the edge of the lane line segment to be processed includes:
determining the gray value of a lane line region and the gray value of a non-lane line region in the sample image to be processed;
and adjusting the gray value of the area with the preset width at the edge of the lane line segment to be processed into the gray value of the lane line area to generate a simulated lane line segment.
A second aspect of the present application provides a sample image enhancement apparatus, including:
the system comprises an image acquisition module, a processing module and a processing module, wherein the image acquisition module is used for acquiring a sample image to be processed, and the sample image to be processed at least comprises a group of lane lines;
the lane line segment to be processed determining module is used for randomly selecting at least one lane line segment on the lane line and determining the lane line segment to be processed;
and the enhancement module is used for carrying out enhancement processing on the lane line segment to be processed so as to change the shape of the lane line segment to be processed, generate an enhanced lane line sample image and generate an enhanced lane line sample image.
A third aspect of the present application provides an electronic device comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method as described above.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon executable code, which, when executed by a processor of an electronic device, causes the processor to perform the method as described above.
When the lane line sample image of the live-action road is processed, the lane line with random length is randomly selected as the lane line to be processed on the lane line generated by the code, the simulation lane line with preset random width is added at the edge of the lane line to be processed along the direction of the lane line, and the enhanced lane line sample image is generated, so that burrs exist in the lane line sample image and are closer to the real situation of the live-action lane line image, the authenticity and the accuracy of the lane line sample image are improved, and the accuracy of camera calibration is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The foregoing and other objects, features and advantages of the application will be apparent from the following more particular descriptions of exemplary embodiments of the application as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the application.
FIG. 1 is a schematic flow chart diagram illustrating a sample image enhancement method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an image of a sample to be processed according to an embodiment of the present application;
FIG. 3 is a schematic view of a lane line shown in an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a starting point according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a lane segment to be processed according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a to-be-processed lane segment enhancement method according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of an enhanced sample image according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a sample image enhancement device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device shown in an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While embodiments of the present application are illustrated in the accompanying drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
With the development of computer technology, the vehicle auxiliary automatic driving technology and navigation technology are also gradually improved, a vehicle-mounted camera is required for automatic driving and navigation, the vehicle-mounted camera needs to be calibrated and pose calculated before being used, when a camera model is trained by using a mask picture generated by codes, model errors are increased due to the fact that the lane line picture generated by the codes is different from a real lane line picture, and the safety of automatic driving and the accuracy of navigation are further influenced, so that the technical problem to be solved is how to obtain an accurate lane line sample image
In order to solve the above problems, an embodiment of the present application provides a sample image enhancement method, which can randomly select a lane line with a random length as a lane line to be processed on a lane line generated by a code when a lane line sample image of a real scene road is processed, add a simulation lane line with a preset random width along a lane line direction at an edge of the lane line to be processed, and generate an enhanced lane line sample image, so that a lane in the lane line sample image is closer to a real situation of the real scene lane line image, authenticity and accuracy of the lane line sample image are improved, and accuracy of camera calibration is improved.
The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a sample image enhancement method according to an embodiment of the present application.
Referring to fig. 1, a sample image enhancement method provided in an embodiment of the present application includes:
step S101, obtaining a sample image to be processed, wherein the sample image to be processed at least comprises a group of lane lines.
In the embodiment of the present application, the sample image to be processed refers to an image generated for a lane line of a real-scene road and including at least one group of lane lines, and the sample image may be used to calibrate a camera. Optionally, the sample image to be processed may include two lane lines, three lane lines, four lane lines, or more lane lines, which is not limited in this application. In this embodiment of the application, the sample image to be processed may be generated by a preset code, optionally, when the sample image to be processed is generated by the code, as shown in fig. 2, the color of the road surface may be set to black and the color of the lane line may be set to white based on the real-scene road condition, so as to be convenient for distinguishing, and meanwhile, the distance, the length, and the direction between the lane lines in the sample image to be processed are determined according to the distance, the length, and the direction between the lane lines in the real-scene road image. In the embodiment of the present application, when generating the sample image to be processed, the angle of view of the sample image to be processed may be the angle of view of a camera on the vehicle when shooting a real road, and it is conceivable that the sample image to be processed is shot by a virtual camera, and the height of the virtual camera from the road and the shooting angle of the virtual camera may be the height of the camera on the vehicle from the road and the shooting angle.
As a possible implementation manner of the present application, for convenience of description, taking a specific example as an example, as shown in fig. 3, the sample image to be processed includes a set of lane lines, which are a left lane line and a right lane line, respectively, where each lane line is composed of discontinuous line segments on the same straight line, and for convenience of description, as shown in fig. 3, each lane line only displays a complete lane line segment. Of course, in the embodiment of the present application, whether the lane lines in the sample image to be processed are continuous, are in the same straight line, and are straight lines may be selected according to actual situations, which is not limited in the present application.
And S102, randomly selecting at least one lane line segment on the lane line to determine the lane line segment to be processed.
In the embodiment of the application, when the sample image to be processed is processed, at least one lane line segment is randomly selected from lane lines of the sample image to be processed and determined as the lane line segment to be processed, wherein at least one lane line segment to be processed may be selected from only one lane line, at least one lane line segment to be processed may be selected from a plurality of lane lines, or at least one lane line segment to be processed may be selected from each lane line, which is not limited in the application.
As a possible implementation manner of the present application, for convenience of description, in following the foregoing embodiments, as shown in fig. 4, when a lane segment to be processed is randomly selected, at least one starting point may be randomly selected on a lane line, and a lane line with a random length may be selected as the lane segment to be processed according to a lane line direction and according to each starting point. In the embodiment of the application, the length of the lane segment to be processed should be within a controllable range, and theoretically, the length of the lane segment to be processed cannot exceed the length of the lane line, and in order to obtain a better simulation effect, the length of the lane segment to be processed should not exceed 10cm. In the embodiment of the application, as shown in fig. 4, starting points a and b are randomly selected on a left lane line, and starting points c, d, and e are randomly selected on a right lane line, where the directions of the two lane lines are a-b and c-d-e, respectively, when a lane line segment to be processed is selected, the lane line segment with a random length is selected as the lane line segment to be processed according to the direction of the lane line where the lane line segment to be processed is located, and no repeated lane line exists between each lane line segment to be processed.
Step S103, performing enhancement processing on the lane line segment to be processed to change the shape of the lane line segment to be processed, generating an enhanced lane line sample image, and generating an enhanced lane line sample image.
In the embodiment of the application, after the lane line segment to be processed is determined, the lane line segment to be processed is subjected to enhancement processing, the shape of the lane line segment to be processed is changed, and the enhancement of the sample image is realized. In the embodiment of the application, the enhancement processing of the lane segment to be processed comprises the following steps:
adding a simulation lane line with a preset width along the direction of the lane line at the edge of the lane line to be processed; and/or
Taking at least one pixel point in the lane line segment to be processed as a central point, randomly selecting a value in a preset value range as a radius, and generating a sample enhancement area, wherein the color of the sample enhancement area is consistent with the color of a road where the lane line is located in the sample image; and/or
And shifting the starting position and/or the ending position of the vehicle conductor segment to be processed to the direction deviating from the lane line.
In the embodiment of the present application, the simulated lane line refers to a portion of the simulated lane line burr added at the edge of the lane line segment to be processed, where the simulated lane line has the same color as the lane line in the sample image to be processed. In the embodiment of the present application, the edge of the lane line segment to be processed refers to the left and right edges of the lane line, and specifically, may be the area where the left and right sides of the lane line contact the road surface. The preset width refers to a width from the edge of the lane line in a direction perpendicular to the running direction of the lane line, and optionally, the width may be between 1 cm and 10cm, and of course, the specific value of the width is not limited in the present application.
As a possible implementation manner of the present application, for convenience of description, taking the foregoing example as an example, after determining the lane segments to be processed, adding a simulated lane line with a preset width at the edge of each lane segment to be processed, as shown in fig. 5, optionally, when adding a simulated lane line at the edge of a lane segment to be processed, the simulated lane line may be at the left edge of the lane segment to be processed, or may be at the right edge of the lane segment to be processed, and the present application is not limited thereto.
In this embodiment, the enhancement processing of the lane line segment to be processed may further be performed by selecting at least one pixel point on the lane line to be processed, taking one of the pixel points as an example, taking the pixel point as a center, and taking a randomly selected value as a radius to determine a circular enhancement region, where the randomly selected value is a value in a preset range class, and adjusting the color of the enhancement region to be consistent with the color of the road surface of the road where the lane line is located in the sample image, so that the lane line is visually missing a small block, which more conforms to the usage of the lane line in actual situations.
In the embodiment of the present application, the enhancement processing of the lane segment to be processed may also be to shift the start position and/or the end position of the lane segment to be processed by a small distance, so that the start end and/or the end of the lane segment to be processed is shifted to a direction deviating from the direction of the lane line. The offset distance is not too large, the whole lane line is ensured to be on the same straight line on the whole sense organ, the specific offset distance can be determined according to the actual condition, and the method is not limited.
In the embodiment of the application, the sample image to be processed can be used as the input of the neural network after being enhanced by the image enhancement method provided by the application, the external reference of the camera is predicted through the neural network, and the accuracy of the neural network on the prediction of the external reference can be greatly improved through the sample image enhanced by the sample enhancement method provided by the application. The neural network may be a hnet neural network, optionally, the specific selection of the optic neural network may be determined according to actual conditions, and the application is not limited.
When the lane line sample image of the live-action road is processed, the lane line with random length is randomly selected as the lane line to be processed on the lane line generated by the code, the simulation lane line with preset random width is added at the edge of the lane line to be processed along the direction of the lane line, and the enhanced lane line sample image is generated, so that burrs exist in the lane line sample image and are closer to the real situation of the live-action lane line image, the authenticity and the accuracy of the lane line sample image are improved, and the accuracy of camera calibration is improved.
As a possible embodiment of the present application, in this embodiment, the acquiring a to-be-processed sample image, where the to-be-processed sample image includes at least one set of lane lines, includes:
acquiring a road live-action image, and generating the sample image to be processed based on the number and the positions of lane lines in the road live-action image, wherein the number in the sample image to be processed is consistent with the number of the lane lines in the road live-action image, and the positions of the lane lines in the sample image to be processed are consistent with the positions of the lane lines in the road live-action image.
In the embodiment of the application, when the sample image to be processed is generated, in order to better restore the distribution situation of the lane lines in the real-scene road, the sample image to be processed may be generated according to the distribution situation of the lane lines in the real-scene image of the road. Optionally, when the sample image to be processed is generated, the number of lane lines in the road live-action image and the position of each lane line are determined first, so that the number of lane lines in the sample image to be processed is ensured to be consistent with the number of lane lines in the road live-action image, and the position of a lane line in the sample image to be processed is consistent with the position of a lane line in the road live-action image. And determining the distance, the length and the trend among the lane lines in the sample image to be processed according to the distance, the length and the trend among the lane lines in the live-action road picture. In the embodiment of the present application, when generating the sample image to be processed, the angle of view of the sample image to be processed may be the angle of view of a camera on the vehicle when shooting a real road, and it is conceivable that the sample image to be processed is shot by a virtual camera, and the height of the virtual camera from the road and the shooting angle of the virtual camera may be the height of the camera on the vehicle from the road and the shooting angle.
According to the embodiment of the application, the sample image to be processed is generated according to the road live-action image, the relevance between the sample image to be processed and the road live-action image is ensured, and the accuracy of the sample image to be processed is ensured.
As a possible embodiment of the present application, in this embodiment, the randomly selecting at least one lane segment on the lane line to be determined as the lane segment to be processed includes:
and randomly selecting at least one non-repeating lane line with random length on the lane line to determine the lane line as the lane line segment to be processed.
In the embodiment of the application, when the lane segment to be processed on the lane line in the sample image to be processed is determined, at least one lane segment is randomly selected on the lane line of the sample image to be processed and determined as the lane segment to be processed, wherein at least one lane segment to be processed can be selected only on one lane line, at least one lane segment to be processed can be selected on multiple lane lines, or at least one lane segment to be processed can be selected on each lane line, and the application is not limited thereto. In the embodiment of the application, the lane line segment to be processed on each lane line does not have repeated lane lines.
As a possible implementation manner of the present application, for convenience of description, taking a specific example as an example, when determining lane segments to be processed in a sample image to be processed, at least one segment of lane segments to be processed is randomly selected on each lane line, where the length of each lane segment to be processed is randomly selected, and each lane segment to be processed is not repeated.
The embodiment of the application determines at least one non-repeating lane line segment with random length as the lane line segment to be processed on the lane line, so that the subsequent processing is facilitated, and the authenticity of the sample image to be processed is enhanced.
As a possible embodiment of the present application, in this embodiment, the randomly selecting at least one non-repeating lane line with a random length to determine as the lane line segment to be processed includes:
at least one starting point is randomly selected on at least one lane line, the starting points are respectively used as the starting points, and lane lines with random lengths are selected as lane lines to be processed in a preset length range along the same direction on the lane line where the starting points are located, wherein the lane lines to be processed are not repeated.
In the embodiment of the present application, as shown in fig. 4, when a lane segment to be processed is randomly selected, at least one starting point may be randomly selected on a lane line, and according to each starting point, a lane line with a random length is selected as the lane segment to be processed according to the lane line direction. In the embodiment of the application, the length of the lane segment to be processed should be within a controllable range, and theoretically, the length of the lane segment to be processed cannot exceed the length of the lane line, and in order to obtain a better simulation effect, the length of the lane segment to be processed should not exceed 10cm. In the embodiment of the application, as shown in fig. 4, starting points a and b are randomly selected on a left lane, starting points c, d and e are randomly selected on a right lane, wherein the directions of the two lane are a-b and c-d-e, respectively, when a to-be-processed lane is selected, the lane segments with random lengths are selected to be determined as the to-be-processed lane segments according to the directions of the lane lines where the to-be-processed lane is located by taking the a, b, c, d and e as the starting points, respectively, and no repeated lane exists between each to-be-processed lane segment.
According to the method and the device, the starting point is randomly selected on the lane line, the lane line segments to be processed are determined based on the starting point, the fact that the lane line segments to be processed are not repeated is guaranteed, and the accuracy of the sample image to be processed is guaranteed.
As a possible embodiment of the present application, in this embodiment, as shown in fig. 6, the adding a simulated lane line with a preset width along the lane line direction at the edge of the lane line segment to be processed includes:
step S601, determining 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.
In the embodiment of the application, the to-be-processed sample image comprises a lane line region and a non-lane line region, and when a lane line segment to be processed is processed, the gray values of the lane line region and the non-lane line region in the to-be-processed sample image are determined. As a possible implementation manner of the present application, following the foregoing embodiment, the lane line area in the sample image to be processed is white, and the non-lane line area is black, and the gray values of the lane line area and the non-lane line area in the sample image to be processed are respectively determined. As a possible implementation manner of the present application, the colors of the lane line region and the non-lane line region may be selected according to actual situations, and the present application is not limited thereto.
Step S602, adjusting the gray value of the area with the preset width at the edge of the lane line segment to be processed to the gray value of the lane line area, and generating a simulated lane line segment.
In the embodiment of the application, after 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 are determined, the gray value of the lane line segment to be processed determined in the previous embodiment is adjusted to the gray value of the lane line region in the sample image to be processed, the gray value of the lane line segment to be processed is ensured to be consistent with the gray value of the lane line region in the sample image to be processed, and the simulated lane line segment is generated.
As a possible implementation manner of the present application, for convenience of description, taking a specific example as an example, as shown in fig. 7, in the sample image to be processed, the grayscale value of the lane line region is 255, the grayscale value of the non-lane line region is 0, and the grayscale value of the lane line segment to be processed determined in the foregoing example is adjusted to 255 to form a simulated lane line segment. Optionally, 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 may be selected according to an actual situation, which is not limited in the present application.
According to the embodiment of the application, the gray value of the lane line segment to be processed is adjusted to enable the gray value of the lane line segment to be processed to be the same as the gray value of the lane line region in the sample image to be processed, the simulated lane line segment is generated, the sample image to be processed is enhanced, the authenticity of the sample image to be processed is improved, and the accuracy of camera calibration is guaranteed.
When the lane line sample image of the live-action road is processed, the lane line with random length is randomly selected as the lane line to be processed on the lane line generated through the codes, the simulation lane line with preset random width is added to the edge of the lane line to be processed along the direction of the lane line, and the enhanced lane line sample image is generated, so that burrs exist in the lane line sample image and are closer to the real situation of the live-action lane line image, the authenticity and the accuracy of the lane line sample image are improved, and the accuracy of camera calibration is improved.
Corresponding to the embodiment of the application function implementation method, the application also provides a sample image enhancement device, electronic equipment and a corresponding embodiment.
Fig. 8 is a schematic structural diagram of a sample image enhancement device according to an embodiment of the present application.
Referring to fig. 8, a sample image enhancement device 80 provided in an embodiment of the present application includes: an image acquisition module 810, a to-be-processed lane segment determination module 820, and an enhancement module 830, wherein:
the image obtaining module 810 is configured to obtain a sample image to be processed, where the sample image to be processed at least includes a set of lane lines;
a to-be-processed lane segment determining module 820, configured to randomly select at least one lane segment on the lane line and determine the lane segment to be processed;
the enhancing module 830 is configured to perform enhancement processing on the lane segment to be processed to change the shape of the lane segment to be processed, generate an enhanced lane line sample image, and generate an enhanced lane line sample image.
As a possible implementation manner of the present application, in this implementation manner, the to-be-processed lane segment determining module 820 includes:
the lane line determining unit is used for randomly selecting at least one starting point on at least one lane line, and selecting lane lines with random lengths as lane lines to be processed in a preset length range along the same direction on the lane line where the starting point is located by taking the starting point as the starting point, wherein the lane lines to be processed are not repeated.
As a possible embodiment of the present application, in this embodiment, the enhancing module 830 includes:
a gray value determining unit 830, configured to determine a gray value of a lane line region and a gray value of a non-lane line region in the sample image to be processed;
a gray value adjusting unit 830, configured to adjust the gray value of the area with the preset width at the edge of the lane segment to be processed to the gray value of the lane segment area, so as to generate a simulated lane segment
As a possible embodiment of the present application, in this embodiment, when the image obtaining module 810 obtains a sample image to be processed, where the sample image to be processed includes at least one set of lane lines, it may be configured to:
acquiring a road live-action image, and generating the sample image to be processed based on the number and the positions of lane lines in the road live-action image, wherein the number of the lane lines in the sample image to be processed is consistent with the number of the lane lines in the road live-action image, and the positions of the lane lines in the sample image to be processed are consistent with the positions of the lane lines in the road live-action image.
As a possible embodiment of the present application, in this embodiment, when at least one lane line segment is randomly selected from the lane lines and determined as the lane line segment to be processed, the module 820 for determining a lane line segment to be processed is configured to:
and randomly selecting at least one non-repeating lane line with random length on the lane line to determine the lane line as the lane line segment to be processed.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
When the lane line sample image of the live-action road is processed, the lane line with random length is randomly selected as the lane line to be processed on the lane line generated by the code, the simulation lane line with preset random width is added at the edge of the lane line to be processed along the direction of the lane line, and the enhanced lane line sample image is generated, so that burrs exist in the lane line sample image and are closer to the real situation of the live-action lane line image, the authenticity and the accuracy of the lane line sample image are improved, and the accuracy of camera calibration is improved.
Fig. 9 is a schematic structural diagram of an electronic device shown in an embodiment of the present application.
Referring to fig. 9, the electronic device 90 includes a memory 910 and a processor 920.
Processor 920 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 910 may include various types of storage units, such as system memory, read Only Memory (ROM), and permanent storage. Wherein the ROM may store static data or instructions for the processor 920 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered down. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. In addition, the 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), magnetic and/or optical disks, as well. In some embodiments, memory 910 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, dual layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, min SD card, micro-SD card, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 910 has stored thereon executable code that, when processed by the processor 920, may cause the processor 920 to perform some or all of the methods described above.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing some or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) having executable code (or a computer program or computer instruction code) stored 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 above-described methods according to the present application.
Having described embodiments of the present application, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (11)

1. A method for enhancing a sample image, the method comprising:
acquiring a sample image to be processed, wherein the sample image to be processed at least comprises a group of lane lines;
randomly selecting at least one lane line segment on the lane line to determine the lane line segment to be processed;
and performing enhancement processing on 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.
2. The sample image enhancement method of claim 1, wherein the enhancing the lane segment to be processed to change the shape of the lane segment to be processed comprises:
and adding a simulation lane line with a preset width at the edge of the lane line to be processed along the direction of the lane line.
3. The sample image enhancement method according to claim 1, wherein the enhancing the lane line segment to be processed to change the shape of the lane line segment to be processed comprises: and taking at least one pixel point in the lane line segment to be processed as a central point, randomly selecting a value in a preset value range as a radius, and generating a sample enhancement area, wherein the color of the sample enhancement area is consistent with the color of the road where the lane line is located in the sample image.
4. The sample image enhancement method of claim 1, wherein the enhancing the lane segment to be processed to change the shape of the lane segment to be processed comprises:
and shifting the starting position and/or the ending position of the vehicle conductor segment to be processed to the direction deviating from the lane line.
5. The method according to claim 1, wherein the obtaining of the to-be-processed sample image, which includes at least one set of lane lines, comprises:
acquiring a road live-action image, and generating the sample image to be processed based on the number and the position of lane lines in the road live-action image, wherein the number of lane lines in the sample image to be processed is consistent with the number of lane lines in the road live-action image, and the position of the lane line in the sample image to be processed is consistent with the position of the lane line in the road live-action image.
6. The sample image enhancement method according to claim 1, wherein the randomly selecting at least one lane line segment on the lane line to be determined as a lane line segment to be processed comprises:
and randomly selecting at least one non-repeating lane line with random length on the lane line to determine the lane line as the lane line segment to be processed.
7. The sample image enhancement method of claim 6, wherein the randomly selecting at least one non-repeating lane line with a random length to be determined as the lane line segment to be processed comprises:
at least one starting point is randomly selected on at least one lane line, the starting points are respectively used as the starting points, and lane lines with random lengths are selected as lane lines to be processed in a preset length range along the same direction on the lane line where the starting points are located, wherein the lane lines to be processed are not repeated.
8. The sample image enhancement method according to claim 2, wherein the adding of a simulated lane line of a preset width in the lane line direction at the edge of the lane line segment to be processed comprises:
determining the gray value of a lane line region and the gray value of a non-lane line region in the sample image to be processed;
and adjusting the gray value of the area with the preset width at the edge of the lane line segment to be processed into the gray value of the lane line area to generate a simulated lane line segment.
9. A sample image enhancement apparatus, characterized in that the sample image enhancement apparatus comprises:
the image acquisition module is used for acquiring a sample image to be processed, wherein the sample image to be processed at least comprises a group of lane lines;
the lane line segment to be processed determining module is used for randomly selecting at least one lane line segment on the lane line and determining the lane line segment to be processed;
and the enhancement module is used for enhancing the lane line segment to be processed so as to change the shape of the lane line segment to be processed, generate an enhanced lane line sample image and generate an enhanced lane line sample image.
10. An electronic device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any one of claims 1-8.
11. A computer-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method of any one of claims 1-8.
CN202211076406.9A 2022-09-05 2022-09-05 Sample image enhancement method and device, electronic equipment and computer-readable storage medium Pending CN115375580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211076406.9A CN115375580A (en) 2022-09-05 2022-09-05 Sample image enhancement method and device, electronic equipment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211076406.9A CN115375580A (en) 2022-09-05 2022-09-05 Sample image enhancement method and device, electronic equipment and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN115375580A true CN115375580A (en) 2022-11-22

Family

ID=84068950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211076406.9A Pending CN115375580A (en) 2022-09-05 2022-09-05 Sample image enhancement method and device, electronic equipment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN115375580A (en)

Similar Documents

Publication Publication Date Title
CN114170582A (en) Guideboard angular point identification method, device, equipment and storage medium
CN115375580A (en) Sample image enhancement method and device, electronic equipment and computer-readable storage medium
CN116052117A (en) Pose-based traffic element matching method, equipment and computer storage medium
CN115235484A (en) Method and device for generating high-precision map stop line
CN113240775B (en) Correction method of guide arrow map mark and related device
CN114152262B (en) Method, device and equipment for generating guide belt
CN113888671B (en) Map road rendering method, device, equipment and storage medium
CN116005583A (en) Zebra stripes generation method, device, electronic equipment and storage medium
CN115345948A (en) Camera calibration method and device, electronic equipment and computer readable storage medium
CN116245993A (en) Vertex data processing method and device in high-precision map and electronic equipment
CN113254563B (en) Road number generation method and related device
CN116242399A (en) Lane line precision verification method and device, electronic equipment and storage medium
CN117824677A (en) Lane line generation method and device, electronic equipment and storage medium
CN116089560B (en) Trace point assignment method, device, equipment and storage medium
CN116092039B (en) Display control method and device of automatic driving simulation system
CN114018215B (en) Monocular distance measuring method, device, equipment and storage medium based on semantic segmentation
CN113763483B (en) Method and device for calibrating pitch angle of automobile data recorder
CN116758184A (en) Zebra crossing generating method and device, electronic equipment and storage medium
US20240227847A1 (en) Method for identifying traffic signs, system, and vehicle
CN115311370A (en) Camera external parameter calibration and evaluation method and device, electronic equipment and storage medium
CN116630664A (en) Object matching method, device, electronic equipment and storage medium
CN116052107A (en) Method, device, electronic equipment and storage medium for lane line data grouping
CN116311126A (en) Model training method, traffic marking recognition method, device, equipment and medium
CN116310344A (en) Image semantic segmentation method, device, equipment and storage medium
CN117824698A (en) Road pavement generation method and device for high-precision map

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination