CN116092053A - Head recognition method and device, electronic equipment and storage medium - Google Patents
Head recognition method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116092053A CN116092053A CN202310075172.4A CN202310075172A CN116092053A CN 116092053 A CN116092053 A CN 116092053A CN 202310075172 A CN202310075172 A CN 202310075172A CN 116092053 A CN116092053 A CN 116092053A
- Authority
- CN
- China
- Prior art keywords
- image
- road
- curve
- contour
- position information
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/58—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The application relates to a vehicle head identification method, a vehicle head identification device, electronic equipment and a storage medium. The method can obtain the road image firstly; then determining a pavement contour curve corresponding to a pavement in the pavement image; connecting the end points of the boundary line segments in the road profile curve with preset closing points in the road image to obtain a profile closed curve; the juncture line segment is used for representing a line segment of a superposition part of the contour curve of the road surface and the contour curve corresponding to the vehicle head; and finally, judging whether the image corresponding to the contour closed curve is a locomotive image or not according to the position information installed by the shooting device of the road image, and obtaining a judging result. The method and the device can accurately identify and mark the images of the locomotive part in the road image on the premise of not depending on sample data.
Description
Technical Field
The present disclosure relates to the field of map data construction or arrangement, and in particular, to a method and apparatus for identifying a vehicle head, an electronic device, and a storage medium.
Background
In the process of map data production, the production of road elements is an indispensable link. The road element may be a material related to the road, such as a lane, a guideboard, etc.
When creating road elements, it is necessary to identify the road elements included in the road image acquired by the acquisition vehicle. Since the image of the head part is irrelevant to the road element during the shooting process, the position of the head part is identified in the road image after the head part is identified.
In the related art, the image of the head in the road image can be identified through an AI image identification network such as a deep learning model, but this approach is severely dependent on the sample set, and if the coverage of the sample data is low, the image of the head in the road image cannot be correctly identified, and the image of the head cannot be marked in the road image.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a method, a device, electronic equipment and a storage medium for identifying a vehicle head, which can accurately identify and mark images of a vehicle head part in road images on the premise of not depending on sample data.
The first aspect of the present application provides a method for identifying a vehicle head, including:
obtaining a road image;
determining a road profile curve corresponding to a road surface in the road image;
connecting the end points of the boundary line segments in the road profile curve with preset closing points in the road image to obtain a profile closed curve; the juncture line segment is used for representing a line segment of a superposition part of the contour curve of the road surface and the contour curve corresponding to the vehicle head;
and judging whether the image corresponding to the contour closed curve is a locomotive image or not according to the position information installed by the shooting device of the road image, and obtaining a judging result.
Optionally, when the image corresponding to the outline closed curve represented by the judging result is a headstock image, marking the image corresponding to the headstock in the road image based on the outline closed curve.
Optionally, the determining a road surface profile curve corresponding to the road surface in the road image includes:
setting a region of a road surface in the road image to be a first color, and setting a region outside the road surface to be a second color; wherein the second color is black when the first color is white or white when the first color is black;
calculating a first color profile curve corresponding to the area where the first color is located;
and taking the first color profile curve as a pavement profile curve corresponding to the pavement.
Optionally, the determining manner of the preset closing point includes:
acquiring position information of the road image, wherein the position information is installed by a shooting device;
when the position information is in the vehicle, the preset closing point is the left lower corner coordinate of the road image and the right lower corner coordinate of the road image;
and when the position information is a vehicle roof, determining an offset corresponding to the position information, wherein the preset closing point is the sum of the left lower corner coordinate and the offset in the road image and the difference of the right lower corner coordinate and the offset in the road image.
Optionally, the determining the road surface profile curve corresponding to the road surface in the road image is identifying the road surface profile curve corresponding to the road based on an open source computer vision library opencv.
Optionally, the determining whether the image corresponding to the contour closed curve is a head image according to the position information installed by the image capturing device of the road image, to obtain a determination result includes:
acquiring position information of the road image, wherein the position information is installed by a shooting device;
if the position information is in the vehicle, judging whether the image corresponding to the contour closed curve is a vehicle head image or not, and obtaining a judging result comprises: judging a first height in a road image where the contour closed curve is located, and if the first height is smaller than an in-vehicle height threshold value, determining that an image corresponding to the contour closed curve is a vehicle head image;
if the position information is the roof, judging whether the image corresponding to the contour closed curve is a vehicle head image or not, and obtaining a judging result comprises: judging a second height in the road image where the contour closed curve is located, and if the second height is smaller than a roof height threshold value, determining that the image corresponding to the contour closed curve is a vehicle head image.
Optionally, the connecting the end point of the boundary line segment in the road profile curve with the preset closing point in the road image includes:
determining a first pixel point and a second pixel point in the road surface contour curve, wherein the first pixel point is the pixel point with the smallest abscissa value of the contour curve in the road image, and the second pixel point is the pixel point with the largest abscissa value of the contour curve in the road image;
connecting the first pixel point with a first closing point in the preset closing points;
connecting the second pixel point with a second closing point in the preset closing points;
and connecting the first pixel point with the second pixel point.
A second aspect of the present application provides an identification device for a vehicle head, comprising:
the acquisition module is used for acquiring road images;
the determining module is used for determining a pavement contour curve corresponding to the pavement in the pavement image;
the connecting module is used for connecting the end points of the boundary line segments in the road profile curve with preset closing points in the road image to obtain a profile closed curve; the juncture line segment is used for representing a line segment of a superposition part of the contour curve of the road surface and the contour curve corresponding to the vehicle head;
and the detection module is used for judging whether the image corresponding to the contour closed curve is a locomotive image or not according to the position information installed by the shooting device of the road image, and obtaining a judging result.
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 non-transitory machine-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.
The technical scheme provided by the application can obtain the road image firstly; then determining a pavement contour curve corresponding to a pavement in the pavement image; connecting the end points of the boundary line segments in the road profile curve with preset closing points in the road image to obtain a profile closed curve; the juncture line segment is used for representing a line segment of a superposition part of the contour curve of the road surface and the contour curve corresponding to the vehicle head; and judging whether the image corresponding to the contour closed curve is a locomotive image or not according to the position information installed by the shooting device of the road image, so as to obtain a judging result. The method can accurately identify and mark the images of the locomotive parts in the road images on the premise of not depending on sample data.
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 flow chart of a method for identifying a vehicle head according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of determining a road surface profile curve corresponding to a road surface in the road image in the vehicle head recognition method according to the embodiment of the present application.
Fig. 3 is a schematic view of a scenario of a method for identifying a vehicle head according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an identification device for a vehicle head according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Preferred embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present application are shown in the 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 in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present 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 or 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 by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The method and the device are applied to the construction or arrangement technology of map data, and particularly applied to the application scene of road element manufacture. In a scene of road element production, other elements in the road image except for elements required for producing a road need to be removed, wherein the image acquisition device for acquiring the vehicle is usually arranged on the roof or in the vehicle, and the image of the vehicle head part occupies a large proportion in the road image, therefore, the image of the vehicle head part is identified by a machine learning model and the like in the related art, but the mode is seriously dependent on the number and the precision of a sample set.
In view of the above problems, the embodiments of the present application provide a method for identifying a vehicle head, which can accurately mark an image of a vehicle head part in a road image without depending on sample data.
The following describes the technical scheme of the embodiments of the present application in detail with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for identifying a vehicle head according to an embodiment of the present application.
The method for identifying the vehicle head, which is shown in the embodiment of the application, comprises the following steps:
s101, obtaining a road image.
In the embodiment of the application, the road image can be obtained. The road image may be a related image used for creating a road element. The images can be acquired by the acquisition vehicle in real time or can be stored in a database.
It can be understood that, if the image is a real-time collected image, after implementing the embodiment of the application, the road image marked with the headstock can be output. Alternatively, the road images may be circularly acquired, and when the number reaches the preset threshold, the acquisition is stopped, for example, after the number reaches 6000, the embodiment of the present application is started for each road image.
It will be appreciated that, since the embodiments of the present application do not rely on a sample set, the processing device or processing software of the embodiments of the present application may be integrated into the processing device of the collection cart, for example, into the ICU of the collection cart or into the camera of the collection cart. The manufacturing difficulty of the road elements manufactured in the later period can be reduced, the calculation pressure of the processor is reduced, and the map data manufacturing efficiency is improved.
S102, determining a pavement contour curve corresponding to the pavement in the pavement image.
In this embodiment of the present application, after obtaining the road image, because the road image includes elements such as road surface and locomotive, wire pole, trees, dustbin, signboard, so, in order to mark the image of accurate locomotive part, can confirm the road surface contour line that the road surface corresponds first.
It is understood that the road surface contour may be one or more curves corresponding to the road surface.
In the embodiment of the application, determining the road surface contour curve corresponding to the road surface in the road image is identifying the road surface contour curve corresponding to the road based on the open source computer vision library opencv.
It is appreciated that embodiments of the present application may determine the road surface profile based on opencv.
In practical use, the outline contained in the road image can be found out by utilizing a function, and the coordinate values are stored in the array. Each contour is then stored as a point vector. And drawing a pavement profile curve corresponding to the pavement according to parameters indicating the profile to be drawn. The thickness of the contour curve can be set according to actual needs. It will be appreciated that the road image may be converted to a binary image prior to recognition based on opencv.
S103, connecting the end points of the boundary line segments in the road profile curve with preset closing points in the road image to obtain a profile closed curve; and the boundary line segment is used for representing the line segment of the overlapping part of the road surface contour curve and the contour curve corresponding to the vehicle head.
In this embodiment of the present application, the end points of the boundary line segments in the road profile curve are connected by preset closing points in the road image to form the profile closed curve. A contour closed curve is understood to mean a closed curve. The preset closing point may be a closing point preset according to actual needs, or a closing point calibrated in advance according to actual use situations, or a closing point calibrated in advance according to a position where an image capturing device of the capturing vehicle is installed.
The line segment of the road surface contour curve, which coincides with the vehicle head, can be determined as the boundary line segment.
Specifically, the connecting the end point of the boundary line segment in the road profile curve with the preset closing point in the road image includes:
determining a first pixel point and a second pixel point in the road surface contour curve, wherein the first pixel point is the pixel point with the smallest abscissa value of the contour curve in the road image, and the second pixel point is the pixel point with the largest abscissa value of the contour curve in the road image;
connecting the first pixel point with a first closing point in the preset closing points;
connecting the second pixel point with a second closing point in the preset closing points;
and connecting the first pixel point with the second pixel point.
In this embodiment of the present application, in an image coordinate system corresponding to a road image, a pixel with the smallest abscissa may be used as a first pixel, for example, a (0, 0) pixel, and a pixel with the largest abscissa may be used as a second pixel, for example, a (800,0) pixel, for a road profile curve. The two pixel points are two end points of the boundary line segment. The two end points can be respectively connected with a preset first closing point and a preset second closing point, and the two pixel points are connected to obtain a closed curve, namely a contour closed curve. Of course, the abscissa value of the first closing point is smaller than the abscissa value of the second closing point.
In actual use, it may also be determined whether the abscissa value of the first pixel point and the second pixel point is 0, if so, the first closing point is set to be the first pixel point, and the second closing point is set to be the second pixel point, which may be understood as directly connecting the first pixel point and the second pixel point. This may be the way of handling when the vehicle head has road surfaces on both sides. Or by collecting the position set by the photographing device of the car. For example, when the position is at the roof, the first pixel point and the second pixel point may be connected to obtain a contour closed curve.
It will be appreciated that the preset closing points are typically two. If there are multiple road surface contour curves, the step may be performed after combining the multiple road surface contour curves into one road surface contour curve.
And S104, judging whether the image corresponding to the contour closed curve is a locomotive image or not according to the position information of the road image shooting device, and obtaining a judging result.
In the embodiment of the present application, whether the image corresponding to the contour closed curve in the foregoing step is a vehicle head image can be determined according to the position of the capturing device in the collection vehicle, such as the camera, the high-definition camera, etc., which is installed in the collection vehicle, for capturing the road image.
The position information can be calibrated in advance according to the position of the shooting device in the acquisition vehicle, can be obtained directly according to the identification of the acquisition vehicle, and can be calculated according to the position of the road surface profile curve in the road image.
In actual use, if the road surface profile curve comprises a coordinate point with an abscissa of 0, determining the position information as the position information marked by the shooting device in the vehicle roof, otherwise, determining the position information as the position information marked by the shooting device in the vehicle. It is understood that the positional relationship in the vehicle can be further determined, and the positional information can be further refined.
The step of judging whether the image corresponding to the contour closed curve is a headstock image according to the position information installed by the shooting device of the road image to obtain a judging result comprises the following steps:
acquiring position information of the road image, wherein the position information is installed by a shooting device;
if the position information is in the vehicle, judging whether the image corresponding to the contour closed curve is a vehicle head image or not, and obtaining a judging result comprises: judging a first height in a road image where the contour closed curve is located, and if the first height is smaller than an in-vehicle height threshold value, determining that an image corresponding to the contour closed curve is a vehicle head image;
if the position information is the roof, judging whether the image corresponding to the contour closed curve is a vehicle head image or not, and obtaining a judging result comprises: judging a second height in the road image where the contour closed curve is located, and if the second height is smaller than a roof height threshold value, determining that the image corresponding to the contour closed curve is a vehicle head image.
In embodiments of the present application, the in-vehicle height threshold may be fifty percent of the road image height. The roof height threshold may be thirty percent of the road image height. It can be understood that the in-vehicle height threshold and the roof height threshold may also be average values obtained by calculating the results of the front N road images on the front vehicle head, and the in-vehicle height threshold and the roof height threshold may be updated in real time by using the average values. The setting of the inner height threshold and the roof height threshold can be made more accurate.
After the position information is determined, whether the contour closed curve represents the headstock image can be judged according to a calibration table corresponding to the position information. For example, the position information is determined to be the position information calibrated by the camera arranged in the vehicle, the region threshold value calibrated by the position information in the calibration table is searched, for example, fifty percent, and when the region corresponding to the contour closed curve is less than fifty percent in the whole road image, the image corresponding to the contour closed curve is determined to be the vehicle head image. Otherwise, it is discarded. And performs the embodiments of the present application on the next image.
It will be appreciated that, on the basis of the foregoing embodiment, step S104 may be followed by step S105.
And S105, when the judging result represents that the image corresponding to the contour closed curve is a headstock image, marking the image corresponding to the headstock in the road image based on the contour closed curve.
In the embodiment of the application, if the image corresponding to the contour closed curve is a head image, the head should be marked in the road image based on the contour closed curve.
The marking operation may be, for example, filling a region corresponding to the contour closed curve with a preset color, for example, green, or placing coordinates of pixels corresponding to the region into a head array, where the head array is used to determine which pixels are pixels of a head when making a road element. Of course, other ways are possible, and may be set according to the actual marking requirements.
In the embodiment of the application, the road image can be obtained first; then determining a pavement contour curve corresponding to a pavement in the pavement image; connecting the end points of the boundary line segments in the road profile curve with preset closing points in the road image to obtain a profile closed curve; the juncture line segment is used for representing a line segment of a superposition part of the contour curve of the road surface and the contour curve corresponding to the vehicle head; judging whether the image corresponding to the contour closed curve is a locomotive image or not according to the position information installed by the shooting device of the road image, and obtaining a judging result; and finally, when the judging result represents that the image corresponding to the contour closed curve is a headstock image, marking the image corresponding to the headstock in the road image based on the contour closed curve. The method can accurately mark the image of the head part in the road image on the premise of not depending on sample data.
The foregoing embodiments describe a process for determining a road surface profile curve, which may be implemented in a number of ways. Referring to fig. 2, fig. 2 is a schematic flow chart of determining a road surface profile curve corresponding to a road surface in the road image in the vehicle head recognition method shown in the present application.
In this embodiment of the present application, the determining a road surface profile curve corresponding to a road surface in the road image includes:
s201, setting the area of the pavement in the pavement image to be a first color, and setting the area outside the pavement to be a second color; wherein the second color is black when the first color is white or white when the first color is black;
s202, calculating a first color profile curve corresponding to the area where the first color is located;
and S203, taking the first color profile curve as a road surface profile curve corresponding to a road surface.
In this embodiment of the present application, the binarization processing may be performed on the road image first, and the road surface in the road image may be set to a first color, for example, black, and the colors other than the road surface may be set to a second color, for example, white. The binarized picture may be output.
A first color profile in the binarized picture may then be calculated. Wherein the first color profile curve may be a maximum profile peripheral closed curve. The first color profile can be derived, for example, based on opencv.
The embodiment of the application can take the first color profile as a pavement profile.
It is understood that there may be a plurality of second color profile curves, and that the line segment of the curve that interfaces with the first color profile curve should be defined as the interface line segment.
In addition to the foregoing embodiments, in the embodiment of the present application, the determining a road surface profile curve corresponding to a road surface in the road image may also be directly identifying a target element in the road image, and through an identification result of the target element, the identification result may include an element name, such as a tree, a building, and the like, and may also include coordinate information corresponding to the element, and in the embodiment of the present application, the road surface may be found out from the identification result, and the road surface profile curve corresponding to the road surface may be calculated.
It can be seen that the road surface profile curve can be determined first, the road surface profile curve is used as the basis for determining the vehicle head, and a sample of the vehicle head is not needed.
Optionally, the determining manner of the preset closing point includes:
acquiring position information of the road image, wherein the position information is installed by a shooting device;
when the position information is in the vehicle, the preset closing point is the left lower corner coordinate of the road image and the right lower corner coordinate of the road image;
and when the position information is a vehicle roof, determining an offset corresponding to the position information, wherein the preset closing point is the sum of the left lower corner coordinate and the offset in the road image and the difference of the right lower corner coordinate and the offset in the road image.
In this embodiment of the present application, the determination manners of the preset closing point may be multiple. The embodiment of the present application may preferably be determined according to the position information of the photographing device.
The preset closing point may be a pixel point at a position of a lower left corner, e.g., (0, 0), and a pixel point at a position of a lower right corner, e.g., (0, 480), of the road image. This may be the result of a determination when the location information is characterized as in-vehicle.
Of course, an offset may be preset, where the offset may be calibrated in advance according to an actual vehicle model and position information. The position of the preset closing point is obtained by the offset. This may be the result of a determination when the position information is characterized as roof.
By adopting the embodiment of the application, the fluctuation of the recognition rate is small and the recognition rate is not dependent on the head sample.
In practical use, referring to fig. 3, fig. 3 is a schematic view of a scene of a method for identifying a vehicle head according to an embodiment of the present application. In fig. 3, the region 300 formed by ABYX is a contour closed curve of the vehicle head, and the contour closed curve corresponds to the vehicle head.
Corresponding to the embodiment of the application function implementation method, the application also provides a vehicle head identification device, electronic equipment and corresponding embodiments.
Fig. 4 is a schematic structural diagram of an identification device for a vehicle head according to an embodiment of the present application.
Referring to fig. 4, an apparatus for identifying a vehicle head according to an embodiment of the present application includes:
an acquisition module 1 for acquiring a road image;
the determining module 2 is used for determining a pavement contour curve corresponding to the pavement in the pavement image;
the connecting module 3 is used for connecting the end points of the boundary line segments in the road profile curve with preset closing points in the road image to obtain a profile closed curve;
and the detection module 4 is used for judging whether the image corresponding to the contour closed curve is a locomotive image according to the position information installed by the shooting device of the road image, so as to obtain a judging result.
Optionally, the method further comprises:
and the marking module 5 is used for marking the image corresponding to the headstock in the road image based on the contour closed curve when the judging result represents that the image corresponding to the contour closed curve is the headstock image.
Optionally, the determining module is specifically configured to:
setting a region of a road surface in the road image to be a first color, and setting a region outside the road surface to be a second color; wherein the second color is black when the first color is white or white when the first color is black;
calculating a first color profile curve corresponding to the area where the first color is located;
and taking the first color profile curve as a pavement profile curve corresponding to the pavement.
Optionally, the determining module is specifically configured to:
determining a target element in the road image; the target element does not include a headstock;
calculating element profile curves corresponding to the target elements;
and taking the element profile curve with the largest curve length in the element profile curves as a road surface profile curve corresponding to the road surface.
Optionally, the determining manner of the preset closing point includes:
acquiring position information of the road image, wherein the position information is installed by a shooting device;
when the position information is in the vehicle, the preset closing point is the left lower corner coordinate of the road image and the right lower corner coordinate of the road image;
and when the position information is a vehicle roof, determining an offset corresponding to the position information, wherein the preset closing point is the sum of the left lower corner coordinate and the offset in the road image and the difference of the right lower corner coordinate and the offset in the road image.
Optionally, the determining the road surface profile curve corresponding to the road surface in the road image is identifying the road surface profile curve corresponding to the road based on an open source computer vision library opencv.
Optionally, the detection module is specifically configured to:
acquiring position information of the road image, wherein the position information is installed by a shooting device;
if the position information is in the vehicle, judging whether the image corresponding to the contour closed curve is a vehicle head image or not, and obtaining a judging result comprises: judging a first height in a road image where the contour closed curve is located, and if the first height is smaller than an in-vehicle height threshold value, determining that an image corresponding to the contour closed curve is a vehicle head image;
if the position information is the roof, judging whether the image corresponding to the contour closed curve is a vehicle head image or not, and obtaining a judging result comprises: judging a second height in the road image where the contour closed curve is located, and if the second height is smaller than a roof height threshold value, determining that the image corresponding to the contour closed curve is a vehicle head image.
Optionally, the connection module is specifically configured to:
determining a first pixel point and a second pixel point in the road surface contour curve, wherein the first pixel point is the pixel point with the smallest abscissa value of the contour curve in the road image, and the second pixel point is the pixel point with the largest abscissa value of the contour curve in the road image;
connecting the first pixel point with a first closing point in the preset closing points;
connecting the second pixel point with a second closing point in the preset closing points;
and connecting the first pixel point with the second pixel point.
The specific manner in which the respective modules perform the operations in the apparatus of the above embodiments has been described in detail in the embodiments related to the method, and will not be described in detail herein.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Referring to fig. 5, the electronic device 1000 includes a memory 1010 and a processor 1020.
The processor 1020 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 1010 may include various types of storage units, such as system memory, read Only Memory (ROM), and persistent storage. Where the ROM may store static data or instructions that are required by the processor 1020 or other modules of the computer. The persistent storage may be a readable and writable storage. The persistent storage may be a non-volatile memory 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 persistent storage may be a removable storage device (e.g., diskette, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as dynamic random access memory. The system memory may store instructions and data that are required by some or all of the processors at runtime. Furthermore, memory 1010 may comprise any combination of computer-readable storage media including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic disks, and/or optical disks may also be employed. In some implementations, memory 1010 may include readable and/or writable removable storage devices such as Compact Discs (CDs), digital versatile discs (e.g., DVD-ROMs, dual-layer DVD-ROMs), blu-ray discs read only, super-density discs, flash memory cards (e.g., SD cards, min SD cards, micro-SD cards, etc.), magnetic floppy disks, and the like. The computer readable storage medium does not contain a carrier wave or an instantaneous electronic signal transmitted by wireless or wired transmission.
The memory 1010 has stored thereon executable code that, when processed by the processor 1020, can cause the processor 1020 to perform some or all of the methods described above.
The aspects of the present application have been described in detail hereinabove with reference to the accompanying drawings. In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments. Those skilled in the art will also appreciate that the acts and modules referred to in the specification are not necessarily required in the present application. In addition, it can be understood that the steps in the method of the embodiment of the present application may be sequentially adjusted, combined and pruned according to actual needs, and the modules in the apparatus of the embodiment of the present application may be combined, divided and pruned according to actual needs.
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 part or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) that, when executed by a processor of an electronic device (or electronic device, server, etc.), causes the processor to perform some or all of the steps of the above-described methods according to the present application.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the application herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The embodiments of the present application have been described above, the foregoing description is exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (10)
1. A method for identifying a vehicle head, comprising:
obtaining a road image;
determining a road profile curve corresponding to a road surface in the road image;
connecting the end points of the boundary line segments in the road profile curve with preset closing points in the road image to obtain a profile closed curve; the juncture line segment is used for representing a line segment of a superposition part of the contour curve of the road surface and the contour curve corresponding to the vehicle head;
and judging whether the image corresponding to the contour closed curve is a locomotive image or not according to the position information installed by the shooting device of the road image, and obtaining a judging result.
2. The method as recited in claim 1, further comprising:
and when the judging result represents that the image corresponding to the contour closed curve is a headstock image, marking the image corresponding to the headstock in the road image based on the contour closed curve.
3. The method of claim 1, wherein the determining a road surface profile curve corresponding to a road surface in the road image comprises:
setting a region of a road surface in the road image to be a first color, and setting a region outside the road surface to be a second color; wherein the second color is black when the first color is white or white when the first color is black;
calculating a first color profile curve corresponding to the area where the first color is located;
and taking the first color profile curve as a pavement profile curve corresponding to the pavement.
4. The method according to claim 1, wherein the determining of the preset closing point comprises:
acquiring position information of the road image, wherein the position information is installed by a shooting device;
when the position information is in the vehicle, the preset closing point is the left lower corner coordinate of the road image and the right lower corner coordinate of the road image;
and when the position information is a vehicle roof, determining an offset corresponding to the position information, wherein the preset closing point is the sum of the left lower corner coordinate and the offset in the road image and the difference of the right lower corner coordinate and the offset in the road image.
5. The method of claim 1, wherein the determining the road profile corresponding to the road in the road image is identifying the road profile corresponding to the road based on an open source computer vision library opencv.
6. The method according to claim 1, wherein the determining whether the image corresponding to the contour closed curve is a vehicle head image according to the position information installed by the image capturing device of the road image, to obtain a determination result, includes:
acquiring position information of the road image, wherein the position information is installed by a shooting device;
if the position information is in the vehicle, judging whether the image corresponding to the contour closed curve is a vehicle head image or not, and obtaining a judging result comprises: judging a first height in a road image where the contour closed curve is located, and if the first height is smaller than an in-vehicle height threshold value, determining that an image corresponding to the contour closed curve is a vehicle head image;
if the position information is the roof, judging whether the image corresponding to the contour closed curve is a vehicle head image or not, and obtaining a judging result comprises: judging a second height in the road image where the contour closed curve is located, and if the second height is smaller than a roof height threshold value, determining that the image corresponding to the contour closed curve is a vehicle head image.
7. The method of claim 1, wherein connecting the end points of the boundary line segments in the road profile curve with the preset closing points in the road image comprises:
determining a first pixel point and a second pixel point in the road surface contour curve, wherein the first pixel point is the pixel point with the smallest abscissa value of the contour curve in the road image, and the second pixel point is the pixel point with the largest abscissa value of the contour curve in the road image;
connecting the first pixel point with a first closing point in the preset closing points;
connecting the second pixel point with a second closing point in the preset closing points;
and connecting the first pixel point with the second pixel point.
8. A vehicle head identification device, comprising:
the acquisition module is used for acquiring road images;
the determining module is used for determining a pavement contour curve corresponding to the pavement in the pavement image;
the connecting module is used for connecting the end points of the boundary line segments in the road profile curve with preset closing points in the road image to obtain a profile closed curve; the juncture line segment is used for representing a line segment of a superposition part of the contour curve of the road surface and the contour curve corresponding to the vehicle head;
and the detection module is used for judging whether the image corresponding to the contour closed curve is a locomotive image or not according to the position information installed by the shooting device of the road image, and obtaining a judging result.
9. 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 of claims 1-7.
10. A non-transitory machine-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 of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310075172.4A CN116092053A (en) | 2023-01-16 | 2023-01-16 | Head recognition method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310075172.4A CN116092053A (en) | 2023-01-16 | 2023-01-16 | Head recognition method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116092053A true CN116092053A (en) | 2023-05-09 |
Family
ID=86202246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310075172.4A Pending CN116092053A (en) | 2023-01-16 | 2023-01-16 | Head recognition method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116092053A (en) |
-
2023
- 2023-01-16 CN CN202310075172.4A patent/CN116092053A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107463918B (en) | Lane line extraction method based on fusion of laser point cloud and image data | |
CN113160161B (en) | Method and device for detecting defects at edge of target | |
CN103870790A (en) | Recognition method and device of two-dimensional bar code | |
CN107133623B (en) | Pointer position accurate detection method based on background difference and circle center positioning | |
CN113255578B (en) | Traffic identification recognition method and device, electronic equipment and storage medium | |
CN111126393A (en) | Vehicle appearance refitting judgment method and device, computer equipment and storage medium | |
CN112052907A (en) | Target detection method and device based on image edge information and storage medium | |
CN115880683B (en) | Urban waterlogging ponding intelligent water level detection method based on deep learning | |
CN116824516B (en) | Road construction safety monitoring and management system | |
CN113033253B (en) | Camera calibration method and device | |
CN111191482A (en) | Brake lamp identification method and device and electronic equipment | |
CN107301388A (en) | A kind of automatic vehicle identification method and device | |
CN112712495A (en) | Anti-loose piece fracture identification method, system, terminal and storage medium | |
CN111126154A (en) | Method and device for identifying road surface element, unmanned equipment and storage medium | |
CN116092053A (en) | Head recognition method and device, electronic equipment and storage medium | |
CN116563837A (en) | High-precision map guideboard graphic data resolving method, device, equipment and storage medium | |
CN111126286A (en) | Vehicle dynamic detection method and device, computer equipment and storage medium | |
CN110555344A (en) | Lane line recognition method, lane line recognition device, electronic device, and storage medium | |
CN114820748A (en) | Full-view-angle characteristic intelligent evidence obtaining method based on panoramic data | |
CN114724119A (en) | Lane line extraction method, lane line detection apparatus, and storage medium | |
CN111428537B (en) | Method, device and equipment for extracting edges of road diversion belt | |
CN111079713A (en) | Method for extracting pedestrian color features and terminal equipment | |
CN113838149B (en) | Camera internal parameter calibration method, server and system for automatic driving vehicle | |
CN113658268B (en) | Verification method and device for camera calibration result, electronic equipment and storage medium | |
CN114882467A (en) | Ground identification detection method, device, equipment and storage medium 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 |