CN116012814A - Signal lamp identification method, signal lamp identification device, electronic equipment and computer readable storage medium - Google Patents

Signal lamp identification method, signal lamp identification device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN116012814A
CN116012814A CN202310011185.5A CN202310011185A CN116012814A CN 116012814 A CN116012814 A CN 116012814A CN 202310011185 A CN202310011185 A CN 202310011185A CN 116012814 A CN116012814 A CN 116012814A
Authority
CN
China
Prior art keywords
identified
signal lamp
area
image
determining
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
CN202310011185.5A
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 CN202310011185.5A priority Critical patent/CN116012814A/en
Publication of CN116012814A publication Critical patent/CN116012814A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Image Analysis (AREA)

Abstract

The application relates to a signal lamp identification method, a signal lamp identification device, electronic equipment and a computer readable storage medium. Acquiring an image to be identified, determining a target area in the image to be identified, and performing edge detection on a signal lamp to be identified in the target area by adopting a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified; and determining target intersection points among a plurality of boundary lines, and determining a polygon area formed by the target intersection points as a signal lamp area in the image to be identified, wherein the polygon formed by the target intersection points meets a preset side length proportion. The signal lamp identification method and the signal lamp identification device can accurately identify the signal lamp without a large amount of training data, and are high in signal lamp identification precision aiming at different weather and different cities.

Description

Signal lamp identification method, signal lamp identification device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of image recognition technologies, and in particular, to a signal lamp recognition method, a signal lamp recognition device, an electronic device, and a computer readable storage medium.
Background
With the increasing maturity of automatic driving technology and navigation technology, and the complexity of urban roads, it has become a driving habit of drivers to navigate in driving vehicles by using navigation tools.
In the vehicle navigation process, the vehicle sometimes needs to automatically identify the signal lamp so as to be convenient for adjusting the vehicle navigation, in the related technical scheme, the method of identifying the signal lamp in the picture by the neural network is generally adopted to obtain the corner point where the signal lamp is positioned in the picture, but the neural network has great requirements on training data, when the training data and the predicted data are distributed differently, the prediction effect is poor, for example, the city is changed, or the recognition effect is poor when the weather is changed, the problems of incomplete recognition, too large recognition and recognition omission are caused, and improvement is needed.
Disclosure of Invention
In order to solve or partially solve the problems existing in the related art, the application provides a signal lamp identification method, a signal lamp identification device, an electronic device and a computer readable storage medium, which can accurately identify a signal lamp under different conditions.
The first aspect of the application provides a signal lamp identification method, which comprises the following steps:
acquiring an image to be identified, wherein the image to be identified is an image at least comprising one signal lamp to be identified;
determining a target area in the image to be identified, wherein the target area has only one signal lamp to be identified;
performing edge detection on the signal lamp to be identified in the target area by adopting a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified;
and determining target intersection points among the plurality of boundary lines, and determining a polygonal area formed by the target intersection points as a signal lamp area in the image to be identified, wherein a rectangle formed by the target intersection points meets a preset side length proportion.
As a possible implementation manner of the present application, in this implementation manner, the determining a target area in the image to be identified, where there is and only one signal lamp to be identified in the target area includes:
extracting pixels of each signal lamp to be identified in the image to be identified by adopting a preset pixel extraction model, and determining pixel areas of each signal lamp to be identified in the image to be identified;
and carrying out circumscribed rectangle on each pixel area, and determining the target area of each signal lamp to be identified.
As a possible implementation manner of the present application, in this implementation manner, the determining, by performing circumscribed rectangles on each pixel area, a target area of each signal lamp to be identified includes:
carrying out circumscribed rectangle based on each pixel area to obtain a rectangular area;
judging whether the aspect ratio of the rectangular area meets a preset proportion threshold value, and taking the rectangular area as a target area when the aspect ratio of the rectangular area meets the preset proportion threshold value;
and when the aspect ratio of the rectangular area does not meet the preset proportion threshold value, performing expansion processing on the rectangular area, and taking the expanded area as a target area.
As a possible implementation manner of the present application, in this implementation manner, the performing edge detection on the signal lamp to be identified in the target area by using a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified includes:
converting the image to be identified into a gray level image, and identifying edge lines of the target area in the gray level image by adopting a preset edge detection algorithm;
and detecting the straight line of the edge line, and determining a plurality of boundary lines of the signal lamp to be identified.
As a possible embodiment of the present application, in this embodiment, the determining the target intersection point between the plurality of boundary lines, determining the polygon area formed by the target intersection point as the signal light area in the image to be identified, determining the 4 target intersection points between the plurality of boundary lines, and determining the rectangle area formed by the 4 target intersection points as the signal light area in the image to be identified includes:
determining intersection points among the plurality of boundary lines, and determining a target rectangle in rectangles formed by the intersection points, wherein the aspect ratio of the target rectangle meets the requirement of a preset proportion threshold;
and determining the target rectangle as a signal lamp area in the image to be identified.
A second aspect of the present application provides a signal lamp recognition apparatus, comprising:
the image acquisition module is used for acquiring an image to be identified, wherein the image to be identified is an image at least comprising one signal lamp to be identified;
the target area determining module is used for determining a target area in the image to be identified, wherein the target area is provided with only one signal lamp to be identified;
the boundary line detection module is used for carrying out edge detection on the signal lamp to be identified in the target area by adopting a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified;
and the signal lamp identification module is used for determining target intersection points among the plurality of boundary lines, and determining a polygonal area formed by the target intersection points as a signal lamp area in the image to be identified, wherein a rectangle formed by the target intersection points meets a preset side length proportion.
As a possible embodiment of the present application, in this embodiment, the target area determining module includes:
the pixel region determining unit is used for extracting pixels of each signal lamp to be identified in the image to be identified by adopting a preset pixel extraction model and determining pixel regions of each signal lamp to be identified in the image to be identified;
and the circumscribed rectangle unit is used for circumscribing each pixel area and determining the target area of each signal lamp to be identified.
As a possible embodiment of the present application, in this embodiment, the signal lamp identification module includes:
an intersection point determining unit, configured to determine an intersection point between the plurality of boundary lines, and determine a target rectangle in rectangles formed by the intersection points, where an aspect ratio of the target rectangle meets a preset ratio threshold requirement;
and the signal lamp determining unit is used for determining the target rectangle as a signal lamp area in the image to be identified.
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 a method as described above.
According to the method and the device for identifying the signal lamp, the target area in the image to be identified is identified, then the boundary line of the signal lamp to be identified in the target area is determined by adopting the edge detection algorithm, the target intersection point among a plurality of boundary lines is determined based on the preset length-width ratio example, and then the signal lamp area to be identified is determined, so that the signal lamp can be accurately identified, a large amount of training data is not needed, and the signal lamp identification precision for different weather and different cities is high.
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 of a signal lamp identification method according to an embodiment of the present application;
FIG. 2 is a flow chart of a target area determination method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a signal pixel area according to an embodiment of the present application;
FIG. 4 is a schematic view of an circumscribed rectangle shown in an embodiment of the present application;
fig. 5 is a schematic flow chart of determining a target area based on corner points according to an embodiment of the present application;
fig. 6 is a flowchart of a boundary line determination method according to an embodiment of the present application;
FIG. 7 is a schematic mileage diagram of a method for identifying an area by using a signal lamp according to an embodiment of the present application;
fig. 8 is a schematic structural view of a signal lamp recognition device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
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 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.
With the increasing maturity of automatic driving technology and navigation technology, and the complexity of urban roads, it has become a driving habit of drivers to navigate in driving vehicles by using navigation tools. In the vehicle navigation process, the vehicle sometimes needs to automatically identify the signal lamp so as to be convenient for adjusting the vehicle navigation, in the related technical scheme, the method of identifying the signal lamp in the picture by the neural network is generally adopted to obtain the corner point where the signal lamp is positioned in the picture, but the neural network has great requirements on training data, when the training data and the predicted data are distributed differently, the prediction effect is poor, for example, the city is changed, or the recognition effect is poor when the weather is changed, the problems of incomplete recognition, too large recognition and recognition omission are caused, and improvement is needed.
Aiming at the problems, the embodiment of the application provides a signal lamp identification method which can accurately identify a signal lamp under different conditions.
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 schematic flow chart of a signal lamp identification method according to an embodiment of the present application.
Referring to fig. 1, the signal lamp identification method provided in the embodiment of the present application includes:
step S101, an image to be identified is obtained, wherein the image to be identified is an image at least comprising one signal lamp to be identified.
In this embodiment of the present application, the image to be identified may be a push direction required to be identified, which is acquired by a vehicle, for example, a vehicle driving on a road, where a signal lamp in front of the road needs to be identified, and the push direction of the signal lamp in front of the vehicle may be acquired by a vehicle-mounted image acquisition device, and the image to be identified is used as the image to be identified, where the image to be identified at least includes one signal lamp to be identified.
Step S102, determining a target area in the image to be identified, where there is only one signal lamp to be identified in the target area.
In this embodiment of the present application, the target area in the image to be identified refers to an area containing the signal lamp to be identified in the image to be identified, where there may be multiple target areas for the same image to be identified, but there should be only one complete signal lamp to be identified in one target area.
As a possible implementation manner of the present application, in this implementation manner, as shown in fig. 2, the determining a target area in the image to be identified, where there is and only one signal lamp to be identified in the target area includes:
step S201, extracting pixels of each signal lamp to be identified in the image to be identified by adopting a preset pixel extraction model, and determining pixel areas of each signal lamp to be identified in the image to be identified.
In the embodiment of the application, after the image to be identified is obtained, based on the fact that pixels of signal lamps to be identified in the image to be identified are different from pixels of other areas in the image to be identified, a preset pixel extraction model is adopted to extract the pixels of the signal lamps to be identified in the image to be identified, and based on the areas where the pixels of the signal lamps to be identified are located, the pixel areas of the signal lamps to be identified in the image to be identified are determined.
As a possible implementation manner of the present application, in this implementation manner, when extracting pixels of signal lamps to be identified in an image to be identified, network models such as hret, unet, etc. may be used to determine pixel points of all signal lamps in the image to be identified, and then determine pixel areas of each signal lamp based on positions of the pixel points. Specifically, as shown in fig. 3, for an image to be identified, after identifying the pixels used for identifying signals and the like in the image to be identified, based on the position distribution of the pixels, it can be determined that two signal lamps exist in the image to be identified, and then the signal lamp pixel area 1 and the signal lamp pixel area 2 can be distinguished. Of course, there are several signal lamps in one image to be identified, and the position distribution of the signal lamps is determined according to the actual situation, which is not limited in this application.
Step S202, performing circumscribed rectangle on each pixel area, and determining a target area of each signal lamp to be identified.
In the embodiment of the application, after determining the signal lamp pixel areas in the image to be identified, performing circumscribed rectangle operation based on each pixel area to obtain target areas of each signal to be identified and the like. In this embodiment of the present application, for convenience of explanation, in a specific embodiment, as shown in fig. 4, there is a signal lamp pixel area in an image to be identified, and an external rectangle operation is performed on the signal lamp pixel area, so that a rectangle may be obtained, and then the rectangle may be initially used as a target area of the signal lamp to be identified in the image to be identified.
As a possible implementation manner of the present application, specifically, as shown in fig. 5, the determining, by circumscribing each pixel area, a target area of each signal lamp to be identified includes:
in step S501, circumscribed rectangles are performed based on the pixel regions, and rectangular regions are obtained.
In the embodiment of the application, when the circumscribed rectangle operation is performed, four corner points of each pixel area need to be determined first, wherein the corner points refer to pixel points with great difference between pixel values of the image and pixel values of peripheral pixel points, and the pixel points can be approximately regarded as four vertexes of the signal lamp image. In the embodiment of the application, taking a target area of a signal lamp to be identified in an image as an example, four corner points of a pixel area in the target area are determined, and then circumscribed rectangles are performed based on the four corner points, so that a rectangular area is obtained.
Step S502, judging whether the aspect ratio of the rectangular area meets a preset proportion threshold value, and taking the rectangular area as a target area when the aspect ratio of the rectangular area meets the preset proportion threshold value.
In the embodiment of the application, after determining the rectangular area of the signal lamp to be identified, whether the rectangular area can be used as the target area is determined based on the relation between the aspect ratio of the rectangular area and the preset proportional threshold. In the embodiment of the present application, the preset aspect ratio threshold is 3 to 1, and when the aspect ratio of the rectangular area of the identified signal lamp to be identified is approximately equal to 3 to 1, the identification result of the rectangular area is accurate, and the rectangular area is taken as the target area. In the embodiment of the present application, the ratio of 3 to 1 may be equal to 2.9 to 1,3.1 to 1, and the specific ratio may be limited by practical situations, which is not limited in this application.
And step S503, when the aspect ratio of the rectangular area does not meet the preset proportion threshold, performing expansion processing on the rectangular area until the expanded area contains the complete pixel area of the signal lamp to be identified, and taking the expanded area as a target area.
In this embodiment of the present application, when the aspect ratio of the rectangular area of the identified signal lamp to be identified does not meet the preset aspect ratio threshold, it indicates that the identification is inaccurate, and the rectangular area needs to be enlarged, where the enlarged area may be obtained by enlarging the rectangular area in proportion or not, and the enlarged area is taken as the target area, where it should be ensured that the enlarged area includes the complete pixel area of the signal lamp to be identified.
And step S103, performing edge detection on the signal lamp to be identified in the target area by adopting a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified.
In the embodiment of the application, after the target area is determined, edge detection needs to be performed on the target area to further determine the area of the signal lamp to be identified. In this embodiment of the present application, when an edge detection algorithm is used to identify a plurality of boundary lines in a target area, as shown in fig. 6, the step of performing edge detection on a signal lamp to be identified in the target area by using a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified includes:
step S601, converting the image to be identified into a gray scale image, and identifying an edge line of the target area in the gray scale image by adopting a preset edge detection algorithm.
In the embodiment of the application, an image to be identified is converted into a gray level image, and then, based on the converted gray level image, an edge line of a target area in the gray level image is identified by adopting a preset edge detection algorithm, wherein the edge detection algorithm can adopt a canndy algorithm to detect the edge line of the target area in the image to be identified.
And step S602, detecting the straight line of the edge line, and determining a plurality of boundary lines of the signal lamp to be identified.
In this embodiment of the present application, after determining the boundary line of the target area, since the boundary line is a non-smooth curve with a high probability, it is necessary to perform line detection on the edge lines, determine the lines corresponding to each edge line, and then use the lines as a plurality of boundary lines of the signal lamp to be identified, for example, perform line detection on the edge lines by using hough transform, to obtain a plurality of boundary lines of the signal lamp to be identified.
Step S104, determining 4 target intersection points among the plurality of boundary lines, and determining a rectangular area formed by the 4 target intersection points as a signal lamp area in the image to be identified, wherein the rectangle formed by the 4 target intersection points meets a preset aspect ratio.
In the embodiment of the present application, after determining a plurality of boundary lines of the signal lamp to be identified, the signal lamp area in the image to be identified is determined based on a rectangle composed of the boundary lines, where an aspect ratio of the rectangle should satisfy a preset requirement, such as approximately 3 to 1.
As a possible implementation manner of the present application, as shown in fig. 7, the determining 4 target intersection points between the multiple boundary lines, determining a rectangular area formed by the 4 target intersection points as a signal lamp area in the image to be identified includes:
step S701, determining intersection points among the plurality of boundary lines due to the existence of intersection points of every two adjacent boundary lines or extension lines thereof, and determining a target rectangle in rectangles formed by the intersection points, wherein the aspect ratio of the target rectangle meets the preset ratio threshold requirement;
step S702, determining the target rectangle as a signal lamp area in the image to be identified.
In this embodiment of the present application, for convenience of explanation, taking a specific embodiment as an example, when determining the intersection points between the multiple boundary lines, more than four intersection points may need to be found out, where the intersection points may represent four vertices of the signal lamp to be identified, optionally, the aspect ratio of the rectangle formed by the four intersection points may be compared with a preset aspect ratio threshold, and when the aspect ratio of the rectangular area of the signal lamp to be identified is about equal to 3 to 1, it means that the four points may be used to identify the four vertices of the signal lamp to be identified. In the embodiment of the present application, the ratio of 3 to 1 may be equal to 2.9 to 1,3.1 to 1, and the specific ratio may be limited by practical situations, which is not limited in this application.
According to the method and the device for identifying the signal lamp, the target area in the image to be identified is identified, then the boundary line of the signal lamp to be identified in the target area is determined by adopting the edge detection algorithm, the target intersection point among a plurality of boundary lines is determined based on the preset length-width ratio example, and then the signal lamp area to be identified is determined, so that the signal lamp can be accurately identified, a large amount of training data is not needed, and the signal lamp identification precision for different weather and different cities is high.
Corresponding to the embodiment of the application function implementation method, the application further provides a signal lamp identification device, electronic equipment and corresponding embodiments.
Fig. 8 is a schematic structural view of a signal lamp recognition device according to an embodiment of the present application.
Referring to fig. 8, the signal lamp recognition device 80 provided in the embodiment of the present application includes an image acquisition module 810, a target area determination module 820, a boundary line detection module 830, and a signal lamp recognition module 840, wherein:
the image obtaining module 810 is configured to obtain an image to be identified, where the image to be identified is an image at least including one signal lamp to be identified;
a target area determining module 820, configured to determine a target area in the image to be identified, where there is and only one signal lamp to be identified in the target area;
the border line detection module 830 is configured to perform edge detection on the signal lamp to be identified in the target area by using a preset edge detection algorithm, so as to obtain a plurality of border lines of the signal lamp to be identified;
and the signal lamp identification module 840 is configured to determine 4 target intersection points between the multiple boundary lines, and determine a rectangular area formed by the 4 target intersection points as a signal lamp area in the image to be identified, where the rectangle formed by the 4 target intersection points meets a preset aspect ratio.
As a possible embodiment of the present application, in this embodiment, the target area determining module includes:
the pixel region determining unit is used for extracting pixels of each signal lamp to be identified in the image to be identified by adopting a preset pixel extraction model and determining pixel regions of each signal lamp to be identified in the image to be identified;
and the circumscribed rectangle unit is used for circumscribing each pixel area and determining the target area of each signal lamp to be identified.
As a possible embodiment of the present application, in this embodiment, the signal lamp identification module includes:
an intersection point determining unit, configured to determine an intersection point between the plurality of boundary lines, and determine a target rectangle in rectangles formed by the intersection points, where an aspect ratio of the target rectangle meets a preset ratio threshold requirement;
and the signal lamp identification unit is used for determining the target rectangle as a signal lamp area in the image to be identified.
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.
According to the method and the device for identifying the signal lamp, the target area in the image to be identified is identified, then the boundary line of the signal lamp to be identified in the target area is determined by adopting the edge detection algorithm, the target intersection point among a plurality of boundary lines is determined based on the preset length-width ratio example, and then the signal lamp area to be identified is determined, so that the signal lamp can be accurately identified, a large amount of training data is not needed, and the signal lamp identification precision for different weather and different cities is high.
Referring now to fig. 9, a schematic diagram of an electronic device 900 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 9 is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
An electronic device includes: a memory and a processor, where the processor may be referred to as a processing device 901 described below, the memory may include at least one of a Read Only Memory (ROM) 902, a Random Access Memory (RAM) 903, and a storage device 908 described below, as follows:
as shown in fig. 9, the electronic device 900 may include a processing means (e.g., a central processor, a graphics processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
In general, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication means 909 may allow the electronic device 900 to communicate wirelessly or by wire with other devices to exchange data. While fig. 9 shows an electronic device 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When executed by the processing device 901, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an image to be identified, wherein the image to be identified is an image at least comprising one signal lamp to be identified; determining a target area in the image to be identified, wherein the target area has only one signal lamp to be identified; performing edge detection on the signal lamp to be identified in the target area by adopting a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified; and determining 4 target intersection points among the plurality of boundary lines, and determining a rectangular area formed by the 4 target intersection points as a signal lamp area in the image to be identified, wherein the rectangle formed by the 4 target intersection points meets a preset aspect ratio.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. 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 modules or units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Where the name of a module or unit does not in some cases constitute a limitation of the unit itself.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (10)

1. A signal lamp identification method, comprising:
acquiring an image to be identified, wherein the image to be identified is an image at least comprising one signal lamp to be identified;
determining a target area in the image to be identified, wherein the target area has only one signal lamp to be identified;
performing edge detection on the signal lamp to be identified in the target area by adopting a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified;
and determining target intersection points among the plurality of boundary lines, and determining a polygon area formed by the target intersection points as a signal lamp area in the image to be identified, wherein the polygon formed by the target intersection points meets a preset side length proportion.
2. The signal lamp identification method according to claim 1, wherein the determining a target area in the image to be identified, wherein there is and only one signal lamp to be identified in the target area, comprises:
extracting pixels of each signal lamp to be identified in the image to be identified by adopting a preset pixel extraction model, and determining pixel areas of each signal lamp to be identified in the image to be identified;
and carrying out circumscribed rectangle on each pixel area, and determining the target area of each signal lamp to be identified.
3. The signal lamp identification method according to claim 2, wherein the determining the target area of each signal lamp to be identified by circumscribing each pixel area includes:
carrying out circumscribed rectangle based on each pixel area to obtain a rectangular area;
judging whether the aspect ratio of the rectangular area meets a preset proportion threshold value, and taking the rectangular area as a target area when the aspect ratio of the rectangular area meets the preset proportion threshold value;
and when the aspect ratio of the rectangular area does not meet the preset proportion threshold value, performing expansion processing on the rectangular area, and taking the expanded area as a target area.
4. The signal lamp identification method according to claim 1, wherein the performing edge detection on the signal lamp to be identified in the target area by using a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified comprises:
converting the image to be identified into a gray level image, and identifying edge lines of the target area in the gray level image by adopting a preset edge detection algorithm;
and detecting the straight line of the edge line, and determining a plurality of boundary lines of the signal lamp to be identified.
5. The traffic light recognition method according to claim 4, wherein the determining the target intersection points between the plurality of boundary lines, determining a polygonal area constituted by the target intersection points as the traffic light area in the image to be recognized, and determining the rectangular area constituted by the 4 target intersection points as the traffic light area in the image to be recognized for determining the 4 target intersection points between the plurality of boundary lines, comprises:
determining intersection points among the plurality of boundary lines, and determining a target rectangle in rectangles formed by the intersection points, wherein the aspect ratio of the target rectangle meets the requirement of a preset proportion threshold;
and determining the target rectangle as a signal lamp area in the image to be identified.
6. A signal lamp identification device, comprising:
the image acquisition module is used for acquiring an image to be identified, wherein the image to be identified is an image at least comprising one signal lamp to be identified;
the target area determining module is used for determining a target area in the image to be identified, wherein the target area is provided with only one signal lamp to be identified;
the boundary line detection module is used for carrying out edge detection on the signal lamp to be identified in the target area by adopting a preset edge detection algorithm to obtain a plurality of boundary lines of the signal lamp to be identified;
and the signal lamp identification module is used for determining target intersection points among the plurality of boundary lines, and determining a polygonal area formed by the target intersection points as a signal lamp area in the image to be identified, wherein a rectangle formed by the target intersection points meets a preset side length proportion.
7. The signal lamp identification device of claim 6, wherein the target area determination module comprises:
the pixel region determining unit is used for extracting pixels of each signal lamp to be identified in the image to be identified by adopting a preset pixel extraction model and determining pixel regions of each signal lamp to be identified in the image to be identified;
and the circumscribed rectangle unit is used for circumscribing each pixel area and determining the target area of each signal lamp to be identified.
8. The signal lamp identification device of claim 7, wherein the signal lamp identification module comprises:
an intersection point determining unit, configured to determine an intersection point between the plurality of boundary lines, and determine a target rectangle in rectangles formed by the intersection points, where an aspect ratio of the target rectangle meets a preset ratio threshold requirement;
and the signal lamp identification unit is used for determining the target rectangle as a signal lamp area in the image to be identified.
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-5.
10. 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 of claims 1-5.
CN202310011185.5A 2023-01-05 2023-01-05 Signal lamp identification method, signal lamp identification device, electronic equipment and computer readable storage medium Pending CN116012814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310011185.5A CN116012814A (en) 2023-01-05 2023-01-05 Signal lamp identification method, signal lamp identification device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310011185.5A CN116012814A (en) 2023-01-05 2023-01-05 Signal lamp identification method, signal lamp identification device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116012814A true CN116012814A (en) 2023-04-25

Family

ID=86029749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310011185.5A Pending CN116012814A (en) 2023-01-05 2023-01-05 Signal lamp identification method, signal lamp identification device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116012814A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118229171A (en) * 2024-05-11 2024-06-21 北京国网信通埃森哲信息技术有限公司 Power equipment storage area information display method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118229171A (en) * 2024-05-11 2024-06-21 北京国网信通埃森哲信息技术有限公司 Power equipment storage area information display method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN111626208B (en) Method and device for detecting small objects
CN112598762A (en) Three-dimensional lane line information generation method, device, electronic device, and medium
CN110852258A (en) Object detection method, device, equipment and storage medium
CN111222509B (en) Target detection method and device and electronic equipment
CN111310770A (en) Target detection method and device
CN113808112B (en) Track fastener detection method, electronic device and computer readable medium
CN112712036A (en) Traffic sign recognition method and device, electronic equipment and computer storage medium
CN116012814A (en) Signal lamp identification method, signal lamp identification device, electronic equipment and computer readable storage medium
CN111382695A (en) Method and apparatus for detecting boundary points of object
CN110866524A (en) License plate detection method, device, equipment and storage medium
CN115546769B (en) Road image recognition method, device, equipment and computer readable medium
CN115565158B (en) Parking space detection method, device, electronic equipment and computer readable medium
CN113409393B (en) Method and device for identifying traffic sign
CN115512336B (en) Vehicle positioning method and device based on street lamp light source and electronic equipment
CN116923372A (en) Driving control method, device, equipment and medium
CN111383337B (en) Method and device for identifying objects
CN110796144B (en) License plate detection method, device, equipment and storage medium
CN117824678A (en) Landmark drawing method, landmark drawing device, electronic equipment and computer readable storage medium
CN114359673B (en) Small sample smoke detection method, device and equipment based on metric learning
CN116012816A (en) Traffic light identification method and device, electronic equipment and computer readable storage medium
CN116012818A (en) Pavement marker recognition method and device, electronic equipment and storage medium
CN116503839A (en) Pavement arrow identification method and device, electronic equipment and computer readable storage medium
CN115984821A (en) Traffic light identification method and device, electronic equipment and computer readable storage medium
CN116778452A (en) Target detection method, device, equipment and storage medium
CN115631478A (en) Road image detection method, device, equipment and computer readable medium

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