Tunnel entrance detection method and detection device, storage medium, and equipment

By performing color removal and shape recognition processing on the real-time image in front of the vehicle, the convolution kernel and the Hough detection algorithm are used to detect the tunnel entrance, the problem of quickly identifying the tunnel entrance is solved, and the driving lights are turned on in a timely manner to improve driving safety.

CN111753800BActive Publication Date: 2025-02-25SHENZHEN MEITONG VIDEO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010636138.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-03
Publication Date
2025-02-25
Estimated Expiration
2040-07-03

AI Technical Summary

Technical Problem

How to quickly identify whether there is a tunnel entrance in front of the vehicle so that the lights can be turned on in time and improve driving safety.

Method used

By obtaining the real-time image of the vehicle ahead of the driving, removing the natural color components, performing shape recognition processing, and using the convolution kernel and the Hough detection algorithm to detect whether there is a semicircular figure to determine the existence of the tunnel entrance.

Benefits of technology

It realizes rapid and accurate detection of tunnel entrances, reduces the calculation amount and operation complexity, turns on the lights in a timely manner, and improves driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111753800B_ABST
    Figure CN111753800B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for detecting a tunnel entrance, a computer-readable storage medium, and a computer device. The detection method comprises: acquiring a real-time image in front of a vehicle; removing part of the color components in the real-time image to generate an initial image; performing shape recognition processing on the initial image to detect whether there is a preset shape graphic in the initial image; if there is a preset shape graphic in the initial image, it is determined that there is a tunnel entrance in front of the vehicle. By removing the natural color components in the real-time image in front of the vehicle, the subsequent calculation amount and operation complexity are reduced, which is conducive to faster detection of graphics. Furthermore, by using an angled convolution kernel for filtering processing, irrelevant shapes can be filtered out, further reducing the amount of calculation, so as to more quickly determine whether there is a tunnel entrance, so as to turn on the car lights in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and in particular, relates to a tunnel entrance detection method and detection device, a computer-readable storage medium, and a computer device. Background Art

[0002] When a vehicle is driving and suddenly enters a tunnel from a bright place, the light turns dark too quickly, which causes the driver's eyes to not have time to adapt, thus creating a safety hazard. If the driver turns on the headlights manually after entering the tunnel, on the one hand, it will take a long time for the driver to adapt, and on the other hand, the vehicle speed is also relatively high. If the headlights are not turned on in time, it will bring more dangers. Therefore, if the headlights can be automatically turned on before the vehicle enters the tunnel, and the light brightness can be automatically adjusted to illuminate the road ahead, this can improve driving safety.

[0003] Since vehicles generally travel at a fast speed, how to more quickly identify the tunnel entrance in front of the vehicle and turn on the lights in advance is also a technical problem that needs to be solved urgently in practical applications. Summary of the invention

[0004] (I) Technical Problems to be Solved by the Present Invention

[0005] The technical problem solved by the present invention is: how to provide a method for more quickly identifying whether there is a tunnel entrance in an image in front of a vehicle.

[0006] (II) Technical solution adopted by the present invention

[0007] A method for detecting a tunnel entrance, the method comprising:

[0008] Obtain real-time images of the vehicle ahead;

[0009] Removing part of the color components in the real-time image to generate an initial image;

[0010] Performing shape recognition processing on the initial image to detect whether there is a preset shape graphic in the initial image;

[0011] If the initial image contains a preset shape graphic, it is determined that there is a tunnel entrance in front of the vehicle.

[0012] Preferably, the method of removing part of the color components in the real-time image to generate an initial image includes:

[0013] Calculating the green component value and the blue component value of each pixel of the real-time image in sequence;

[0014] Remove the green component of the pixel whose green component value meets the first predetermined condition;

[0015] The blue components of pixels whose blue component values ​​satisfy the second predetermined condition are removed.

[0016] Preferably, the first predetermined condition is:

[0017] G>B*(1+Tr) and G>R*(1+Tr)

[0018] Wherein, R, G, and B represent the red component value, green component value, and blue component value of each pixel respectively, and Tr represents the first threshold value.

[0019] Preferably, the second predetermined condition is:

[0020] B>R*(1+Tb) and B>G*(1+Tb)

[0021] Wherein, R, G, and B represent the red component value, green component value, and blue component value of each pixel respectively, and Tb represents the second threshold value.

[0022] Preferably, the specific method of performing shape recognition processing on the initial image to detect whether there is a preset shape graphic in the initial image includes:

[0023] Performing a convolution operation on the initial image to obtain edge maps in several different directions;

[0024] Performing fusion processing on the edge images in different directions to generate a multi-angle edge image;

[0025] A Hough detection algorithm is used to detect whether there is a semicircular figure in the multi-angle edge image.

[0026] Preferably, the specific method of performing a convolution operation on the initial image to obtain edge maps in several different directions includes:

[0027] Performing a convolution operation on the initial image using a first angle convolution kernel and a second angle convolution kernel to generate a first left edge map and a second left edge map, wherein an inclination angle of a tangent line of the arc-shaped contour in the first left edge map is greater than an inclination angle of a tangent line of the arc-shaped contour in the second left edge map;

[0028] The initial image is convolved using a third angle convolution kernel and a fourth angle convolution kernel to generate a first right edge map and a second right edge map, wherein the inclination angle of the tangent of the arc contour in the first right edge map is greater than the inclination angle of the tangent of the arc contour in the second right edge map.

[0029] Preferably, the method of fusing the edge images in different directions to generate a multi-angle edge image specifically includes:

[0030] Perform non-maximum suppression on edge images in all directions;

[0031] Perform double threshold detection on the edge map after non-maximum suppression processing to obtain a candidate edge position map;

[0032] A multi-angle edge map is generated according to the candidate edge position map.

[0033] The present invention also discloses a tunnel entrance detection device, the detection device comprising:

[0034] An image acquisition module is used to acquire a real-time image of the vehicle ahead;

[0035] A color suppression module, used for removing part of the color components in the real-time image to generate an initial image;

[0036] A shape recognition module, used for performing shape recognition processing on the initial image to detect whether there is a preset shape graphic in the initial image;

[0037] The determination module is used to determine that there is a tunnel entrance in front of the vehicle when the edge image has a preset shape graphic.

[0038] The present invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a tunnel entrance detection program, and when the tunnel entrance detection program is executed by a processor, the above-mentioned tunnel entrance detection method is implemented.

[0039] The present invention also discloses a computer device, which includes a computer-readable storage medium, a processor, and a tunnel entrance detection program stored in the computer-readable storage medium. When the tunnel entrance detection program is executed by the processor, the above-mentioned tunnel entrance detection method is implemented.

[0040] (III) Beneficial effects

[0041] The present invention discloses a method and device for detecting and predicting a tunnel entrance. The method removes the natural color component in the real-time image in front of the vehicle to reduce the subsequent calculation amount and operation complexity, which is conducive to faster detection of graphics. Furthermore, by using an angled convolution kernel for filtering, irrelevant shapes can be filtered out, further reducing the amount of calculation, so as to more quickly determine whether there is a tunnel entrance, so as to turn on the car lights in time. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A flow chart of a method for detecting a tunnel entrance according to an embodiment of the present invention;

[0043] Figure 2 A flowchart of an image shape recognition process according to an embodiment of the present invention;

[0044] Figure 3 is a schematic diagram of an initial image of an embodiment of the present invention;

[0045] Figure 4 is a flow chart of the fusion process of an embodiment of the present invention;

[0046] Figure 5 A schematic diagram of a detection device for a tunnel entrance according to an embodiment of the present invention;

[0047] Figure 6 A functional block diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0049] Before describing the technical solution of the present application in detail, the inventive concept of the present application is briefly described first: when a car is driving, the images taken contain many natural colors, such as the color of the sky, the color of trees and other irrelevant colors. If the real-time images are directly recognized, the amount of calculation is large. Therefore, the present application removes some color components in the real-time images to reduce the amount of calculation, so as to more quickly recognize the shapes in the image and detect whether there is a tunnel entrance.

[0050] Specifically, if Figure 1 As shown, the tunnel entrance detection method of the embodiment of the present application includes the following steps:

[0051] Step S10: Acquire a real-time image of the front of the vehicle.

[0052] Specifically, a camera is installed on the vehicle, and the camera is used to capture real-time images in front of the vehicle. The real-time image obtained by the camera is in RGB format. In order to facilitate image processing, the real-time image in RGB format is converted into a real-time image in YUV format. The conversion relationship between RGB format and YUV format is as follows:

[0053] Y=0.299*R+0.587*G+0.114*B

[0054] U=-0.169*R-0.331*G+0.5*B

[0055] V=0.5*R-0.419*G-0.081*B

[0056] Among them, Y represents brightness, U and V represent chromaticity, and R, G, and B represent the red component value, green component value, and blue component value of each pixel respectively.

[0057] Step S20: removing part of the color components in the real-time image to generate an initial image.

[0058] Specifically, for tunnel scenes, according to a large amount of statistical image data, in most cases, there are a large number of natural colors in the image, mainly green and blue. Therefore, these components can be suppressed by setting a threshold to reduce the complexity of subsequent processing and reduce misjudgment.

[0059] Further, step S20 includes: sequentially calculating the green component value and the blue component value of each pixel of the real-time image, removing the green component of the pixel whose green component value meets the first predetermined condition; and removing the blue component of the pixel whose blue component value meets the second predetermined condition.

[0060] For a certain pixel, if the green component value satisfies the following conditions, the first predetermined condition is met:

[0061] G>B*(1+Tr) and G>R*(1+Tr)

[0062] Among them, R, G, and B represent the red component value, green component value, and blue component value of each pixel respectively, and Tr represents the first threshold value. The specific value of Tr needs to be adjusted according to the camera module used in the actual product. When the green component value meets the above conditions, it means that the pixel is mainly green, representing the color of nature, and therefore needs to be suppressed.

[0063] If the blue component value satisfies the following conditions, the second predetermined condition is met:

[0064] B>R*(1+Tb) and B>G*(1+Tb)

[0065] Among them, R, G, and B represent the red component value, green component value, and blue component value of each pixel respectively, and Tb represents the second threshold value. The specific value of Tb needs to be adjusted according to the camera module used in the actual product. When the blue component value meets the above conditions, it means that the pixel is mainly blue, representing the color of nature, and therefore needs to be suppressed.

[0066] Step S30: performing shape recognition processing on the initial image to detect whether there is a preset shape graphic in the initial image.

[0067] Specifically, if Figure 2 As shown, step S30 includes the following:

[0068] Step S31: performing a convolution operation on the initial image to obtain edge maps in several different directions.

[0069] Since the tunnel entrance is generally designed to be approximately semicircular, i.e., arched, there may be many irrelevant shapes in the initial image. In order to further reduce the amount of calculation, a convolution operation is performed on the initial image to implement filtering processing. On the basis of retaining the arc contour of the tunnel entrance, irrelevant shapes are removed as much as possible to avoid the complexity of the subsequent circle finding process. As a preferred embodiment, four convolution kernels with different angles are used to perform convolution operations on the initial image respectively, and four edge maps in different directions are obtained respectively.

[0070] Specifically, a convolution operation is performed on the initial image using a first angle convolution kernel and a second angle convolution kernel to generate a first left edge map and a second left edge map, wherein the inclination angle of the tangent of the arc-shaped contour in the first left edge map is greater than the inclination angle of the tangent of the arc-shaped contour in the second left edge map. A convolution operation is performed on the initial image using a third angle convolution kernel and a fourth angle convolution kernel to generate a first right edge map and a second right edge map, wherein the inclination angle of the tangent of the arc-shaped contour in the first right edge map is greater than the inclination angle of the tangent of the arc-shaped contour in the second right edge map.

[0071] Among them, the first angle convolution kernel K0 is specifically:

[0072]

[0073] When the convolution operation is performed with the first angle convolution kernel K0 and the initial image, a first left edge map is obtained, wherein the inclination angle of the tangent of the arc contour in the first left edge map is within a first range, that is, exemplarily, Figure 3 As shown, the initial image is divided into four regions. When the convolution is performed using the first angle convolution kernel K0, the arc contour located in the first region I and whose tangent angle is within the first range can be identified, so that irrelevant shapes can be ignored, reducing the subsequent amount of calculation and computational complexity.

[0074] Furthermore, the first angle convolution kernel K1 is specifically:

[0075]

[0076] When the second angle convolution kernel K1 is used to perform a convolution operation with the initial image, a second left edge map is obtained, wherein the inclination angle of the tangent of the arc contour in the second left edge map is within a second range, that is, exemplarily, as Figure 3 As shown, when the convolution is performed using the second angle convolution kernel K1, the arc contour located in the second area II and whose tangent angle is within the second range can be identified, so that irrelevant shapes can be ignored, reducing subsequent calculations and computational complexity.

[0077] Furthermore, the third angle convolution kernel K2 is specifically:

[0078]

[0079] When the third angle convolution kernel K2 is used to perform a convolution operation with the initial image, a first right edge map is obtained, wherein the inclination angle of the tangent of the arc contour in the first right edge map is within a third range, that is, exemplarily, as Figure 3 As shown, when the third angle convolution kernel K2 performs convolution, the arc contour located in the third area III and the inclination angle of the tangent of the contour is within the third range can be identified, so that irrelevant shapes can be ignored, reducing the subsequent amount of calculation and computational complexity.

[0080] Furthermore, the fourth angle convolution kernel K3 is specifically:

[0081]

[0082] When the fourth angle convolution kernel K3 is used to perform a convolution operation with the initial image, a second right edge map is obtained, wherein the inclination angle of the tangent of the arc contour in the second right edge map is within the fourth range, that is, exemplarily, as Figure 3 As shown, when the fourth angle convolution kernel K3 performs convolution, the arc contour located in the fourth area IV and the inclination angle of the tangent of the contour is within the fourth range can be identified, so that irrelevant shapes can be ignored, reducing the subsequent amount of calculation and computational complexity.

[0083] Step S32: performing fusion processing on the edge images in different directions to generate a multi-angle edge image.

[0084] Specifically, if Figure 4 As shown, step S32 includes the following steps:

[0085] Step S321: performing non-maximum suppression processing on edge images in each direction.

[0086] Specifically, the gradient magnitude and gradient direction of each pixel point of the first left edge map, the second left edge map, the first right edge map, and the second right edge map are calculated respectively, and a neighborhood block of a certain size is selected in each edge map, and the gradient of the center point in the neighborhood block is compared to determine whether the center point is a major edge point. Exemplarily, a 3×3 neighborhood block is selected in the first left edge map, and the gradient magnitude of the center point of the neighborhood block is compared with the gradient magnitude of a pair of adjacent pixels along the gradient direction. If the gradient magnitude is the largest, it remains unchanged and the point is considered to be a major edge point, otherwise it is defined as 0 and the point is considered to be a non-edge pixel point.

[0087] Step S322: performing double threshold detection on the edge map after the non-maximum suppression process to obtain a candidate edge position map.

[0088] Specifically, a high threshold T1 and a low threshold T2 are set, and each pixel is classified according to the following conditions. The specific classification conditions are as follows:

[0089] Condition 1: If the gradient amplitude V of a pixel point is greater than the high threshold T1, the pixel point is regarded as a strong edge point.

[0090] Condition 2: If the gradient amplitude V of a pixel point is less than the upper threshold T1 and greater than the lower threshold T2, the pixel point is regarded as a weak edge point.

[0091] Condition three: If the gradient amplitude V of a pixel point is less than the lower threshold T2, the pixel point is regarded as a non-edge pixel point.

[0092] Furthermore, the gradient amplitude of the pixel points at the same position of each edge map is compared with the high threshold T1 and the low threshold T2. If there is at least one strong edge point at a certain position, the position is used as a candidate edge position. Exemplarily, the same position A is selected from the first left edge map, the second left edge map, the first right edge map, and the second right edge map. The gradient amplitudes of the pixel points at position A of each edge map are V0, V1, V2, and V3, respectively. The gradient amplitudes are compared with T1 and T2, respectively. If at least one of V0, V1, V2, and V3 meets condition one, that is, there is at least one strong edge point, the position A is used as a candidate edge position. If none of the four gradient amplitudes meet condition 1, then continue to determine whether condition 2 is met. If at least one of V0, V1, V2, and V3 meets condition 2, that is, there is at least one weak edge point, further determine whether there are other strong edge points in the neighborhood pixels of each weak edge point. If so, the weak edge point is considered a strong edge point, and position A is used as a candidate edge position; if not, the weak edge point is considered a non-edge pixel point, and position A is considered a non-edge position. If V0, V1, V2, and V3 all meet condition 3, position A is directly considered a non-edge position.

[0093] The above method is used to identify various candidate edge positions and non-edge positions, and generate a candidate edge position map.

[0094] Step S323: Generate a multi-angle edge map according to the candidate edge position map.

[0095] Specifically, the grayscale values ​​of the candidate edge positions in the candidate edge position map are set to 1, and the grayscale values ​​of the non-edge positions in the candidate edge position map are set to 0, thereby obtaining a multi-angle edge map, which can further remove redundant pixels and only retain the pixels at the candidate edge positions, reducing the amount of calculation.

[0096] Step S33: using the Hough detection algorithm to detect whether there is a semicircular figure in the multi-angle edge image.

[0097] The Hough detection algorithm is used to detect whether there is a semicircular figure in the multi-angle edge image. The Hough detection algorithm is a prior art and will not be described in detail here.

[0098] Step S40: If the initial image contains a preset shape graphic, it is determined that there is a tunnel entrance in front of the vehicle.

[0099] If a semicircular figure is detected in the multi-angle edge image using the Hough detection algorithm, it is determined that there is a tunnel entrance in front of the vehicle. If no semicircular figure is detected, it is determined that there is no tunnel entrance in front of the vehicle, and steps S10 to S40 are repeated to continue to detect whether there is a semicircular figure in subsequent images.

[0100] When a semicircular figure is detected, the radius of the semicircular figure is further calculated, and the distance between the camera and the tunnel entrance is calculated based on the screen ratio occupied by the semicircular figure, the lane line width, the lens internal parameters and other data, and the distance is used to determine whether the lights need to be turned on immediately. The distance for turning on the lights can be set by yourself, for example, 100 meters. When a semicircular figure is detected, if the distance between the vehicle and the tunnel entrance is greater than 100 meters, the lights do not need to be turned on immediately. When the distance between the vehicle and the tunnel entrance is less than or equal to 100 meters, the lights are turned on.

[0101] The embodiment of the present application discloses a method for detecting a tunnel entrance, which removes the natural color component in the real-time image in front of the vehicle to reduce the subsequent calculation amount and operation complexity, which is conducive to faster detection of graphics. Furthermore, by using an angled convolution kernel for filtering, irrelevant shapes can be filtered out, further reducing the amount of calculation, so as to more quickly determine whether there is a tunnel entrance, so as to turn on the car lights in time.

[0102] like Figure 5 As shown, the present application also discloses a detection device for a tunnel entrance, which includes: an image acquisition module 100, a color suppression module 200, a shape recognition module 300 and a determination module 400. The image acquisition module 100 is used to acquire a real-time image in front of the vehicle; the color suppression module 200 is used to remove part of the color components in the real-time image to generate an initial image; the shape recognition module 300 is used to perform shape recognition processing on the initial image to detect whether there is a preset shape graphic in the initial image; the determination module 400 is used to determine that there is a tunnel entrance in front of the vehicle when there is a preset shape graphic in the edge image.

[0103] Specifically, the color suppression module 200 is used to sequentially calculate the green component value and the blue component value of each pixel of the real-time image; and remove the green component of the pixel whose green component value meets the first predetermined condition; and remove the blue component of the pixel whose blue component value meets the second predetermined condition.

[0104] The shape recognition module 300 is used to perform a convolution operation on the initial image to obtain edge maps in several different directions; perform fusion processing on the edge maps in several different directions to generate a multi-angle edge map; and use the Hough detection algorithm to detect whether there is a semicircular figure in the multi-angle edge map.

[0105] Furthermore, the shape recognition module 300 is also used to perform a convolution operation on the initial image using a first angle convolution kernel and a second angle convolution kernel to generate a first left edge map and a second left edge map, wherein the inclination angle of the tangent of the arc contour in the first left edge map is greater than the inclination angle of the tangent of the arc contour in the second left edge map; and to perform a convolution operation on the initial image using a third angle convolution kernel and a fourth angle convolution kernel to generate a first right edge map and a second right edge map, wherein the inclination angle of the tangent of the arc contour in the first right edge map is greater than the inclination angle of the tangent of the arc contour in the second right edge map.

[0106] The present application also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a tunnel entrance detection program, and when the tunnel entrance detection program is executed by a processor, the above-mentioned tunnel entrance detection method is implemented.

[0107] The present application also discloses a computer device, at the hardware level, such as Figure 6 As shown, the terminal includes a processor 12, an internal bus 13, a network interface 14, and a computer-readable storage medium 11. The processor 12 reads the corresponding computer program from the computer-readable storage medium and then runs it, forming a request processing device at the logical level. Of course, in addition to software implementations, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logical unit, but can also be hardware or logic devices. The computer-readable storage medium 11 stores a tunnel entrance detection program, and when the tunnel entrance detection program is executed by the processor, the above-mentioned tunnel entrance detection method is implemented.

[0108] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0109] The specific implementation methods of the present invention are described in detail above. Although some embodiments have been shown and described, those skilled in the art should understand that these embodiments can be modified and improved without departing from the principles and spirit of the present invention, the scope of which is defined by the claims and their equivalents. These modifications and improvements should also be within the scope of protection of the present invention.

Claims

1. A method for detecting a tunnel entrance, characterized in that: The detection method comprises: Obtain real-time images of the vehicle ahead; Removing part of the color components in the real-time image to generate an initial image; Performing shape recognition processing on the initial image to detect whether there is a preset shape graphic in the initial image; If the initial image contains a preset shape graphic, it is determined that there is a tunnel entrance in front of the vehicle; The method of removing part of the color components in the real-time image to generate an initial image includes: Calculating the green component value and the blue component value of each pixel of the real-time image in sequence; The green component of the pixel whose green component value meets the first predetermined condition is removed, and the first predetermined condition is: ,in, Respectively represent the red component value, green component value, and blue component value of each pixel. represents the first threshold; The blue component of the pixel whose blue component value meets the second predetermined condition is removed, and the second predetermined condition is: ,in, Respectively represent the red component value, green component value, and blue component value of each pixel. Indicates the second threshold.

2. The method for detecting a tunnel entrance according to claim 1, characterized in that: The specific method of performing shape recognition processing on the initial image to detect whether there is a preset shape graphic in the initial image includes: Performing a convolution operation on the initial image to obtain edge maps in several different directions; Performing fusion processing on the edge images in different directions to generate a multi-angle edge image; A Hough detection algorithm is used to detect whether there is a semicircular figure in the multi-angle edge image.

3. The method for detecting a tunnel entrance according to claim 2, characterized in that: The specific method of performing a convolution operation on the initial image to obtain edge maps in several different directions includes: Performing a convolution operation on the initial image using a first angle convolution kernel and a second angle convolution kernel to generate a first left edge map and a second left edge map, wherein an inclination angle of a tangent line of the arc-shaped contour in the first left edge map is greater than an inclination angle of a tangent line of the arc-shaped contour in the second left edge map; The initial image is convolved using a third angle convolution kernel and a fourth angle convolution kernel to generate a first right edge map and a second right edge map, wherein the inclination angle of the tangent of the arc contour in the first right edge map is greater than the inclination angle of the tangent of the arc contour in the second right edge map.

4. The method for detecting a tunnel entrance according to claim 3, characterized in that: The method of fusing the edge images in different directions to generate a multi-angle edge image specifically includes: Perform non-maximum suppression on edge images in all directions; Perform double threshold detection on the edge map after non-maximum suppression processing to obtain a candidate edge position map; A multi-angle edge map is generated according to the candidate edge position map.

5. A tunnel entrance detection device, characterized in that: The detection device comprises: An image acquisition module is used to acquire a real-time image of the vehicle ahead; A color suppression module, used for removing part of the color components in the real-time image to generate an initial image; A shape recognition module, used for performing shape recognition processing on the initial image to detect whether there is a preset shape graphic in the initial image; A determination module, configured to determine that there is a tunnel entrance in front of the vehicle when the initial image contains a preset shape graphic; The method of removing part of the color components in the real-time image to generate an initial image includes: Calculating the green component value and the blue component value of each pixel of the real-time image in sequence; The green component of the pixel whose green component value meets the first predetermined condition is removed, and the first predetermined condition is: ,in, Respectively represent the red component value, green component value, and blue component value of each pixel. represents the first threshold; The blue component of the pixel whose blue component value meets the second predetermined condition is removed, and the second predetermined condition is: ,in, Respectively represent the red component value, green component value, and blue component value of each pixel. Indicates the second threshold.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a tunnel entrance detection program, and when the tunnel entrance detection program is executed by a processor, a tunnel entrance detection method according to any one of claims 1 to 4 is implemented.

7. A computer device, characterized in that: The computer device includes a computer-readable storage medium, a processor, and a tunnel entrance detection program stored in the computer-readable storage medium. When the tunnel entrance detection program is executed by the processor, a tunnel entrance detection method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Method for automatically turning on or turning off lamp of vehicle at tunnel entrance based on image identification

    CN108372825A

  • File processing device and method, and graphical user interface

    WO2018120238A1