TW201527156A - Lane recognition method and electronic device using the same - Google Patents

Lane recognition method and electronic device using the same Download PDF

Info

Publication number
TW201527156A
TW201527156A TW103100209A TW103100209A TW201527156A TW 201527156 A TW201527156 A TW 201527156A TW 103100209 A TW103100209 A TW 103100209A TW 103100209 A TW103100209 A TW 103100209A TW 201527156 A TW201527156 A TW 201527156A
Authority
TW
Taiwan
Prior art keywords
lane
image
vehicle
license plate
line
Prior art date
Application number
TW103100209A
Other languages
Chinese (zh)
Other versions
TWI561419B (en
Inventor
Yu-Chee Tseng
Ju-Yi Lin
Shui-Wang Tsai
Chih-Yu Lin
Original Assignee
Univ Nat Chiao Tung
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 Univ Nat Chiao Tung filed Critical Univ Nat Chiao Tung
Priority to TW103100209A priority Critical patent/TWI561419B/en
Publication of TW201527156A publication Critical patent/TW201527156A/en
Application granted granted Critical
Publication of TWI561419B publication Critical patent/TWI561419B/en

Links

Landscapes

  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

A lane recognition method and an electronic device using the same are provided. The lane recognition method includes following steps. At least one lane image in front of a car is obtained by an image capturing unit. A lane detecting procedure is executed based on the lane image. If a current driving lane can not be obtained through the lane detecting procedure, a reference license plate in the lane image is recognized. Lane sharing information transmitted by another car is received through a communication unit, and the lane sharing information and the reference license plate are compared with each other so as to obtain the current driving lane.

Description

車道辨識方法與使用該方法的電子裝置 Lane identification method and electronic device using the same

本發明是有關於一種車道辨識方法,且特別是有關於一種基於協同式車間通訊的車道辨識方法與使用該方法的電子裝置。 The present invention relates to a lane recognition method, and more particularly to a lane recognition method based on collaborative workshop communication and an electronic device using the same.

隨著科技的進步,交通工具成為近代發展中重要發明之一。然而,由於城市的迅速發展,道路的連接愈趨複雜。因此,導航系統,例如全球定位系統(Global Position System,GPS)導航系統、交通資訊頻道(Traffic Message Channel,TMC),的出現則為人類帶來莫大的便利性。目前常見的車用導航裝置不僅可提供道路、景點等導引服務,讓駕駛人能夠瞭解目前的行車狀況,更可定位追蹤駕駛人的位置、方向、速度等。 With the advancement of technology, transportation has become one of the important inventions in modern development. However, due to the rapid development of the city, the connection of roads has become more complicated. Therefore, the emergence of navigation systems, such as the Global Position System (GPS) navigation system and the Traffic Message Channel (TMC), brings great convenience to human beings. At present, the common car navigation device not only provides guidance services such as roads and scenic spots, but also enables the driver to understand the current driving situation, and can also locate and track the driver's position, direction and speed.

然而,目前大部分的車輛導航僅透過單純的GPS和道路等級的地圖資訊,因此無法明確的依據當前行駛車道而即時的告知駕駛人需切換至那一車道,導致駕駛人容易在不熟悉或複雜的 路口錯失切換車道的時機。舉例來說,倘若駕駛者並未即時發現目前行駛車道並非可以轉彎的車道時,往往容易錯過目的地。 However, most of the current vehicle navigation only uses the GPS and road level map information, so it is impossible to tell the driver to switch to that lane based on the current driving lane, which makes the driver easy to be unfamiliar or complicated. of The intersection missed the opportunity to switch lanes. For example, if the driver does not immediately find out that the current driving lane is not a lane that can be turned, it is often easy to miss the destination.

若單純藉由影像來辨識車輛的車道位置,將受限於環境因素而無法進行精確的車道辨識。舉例來說,當車輛處於交通壅塞或有遮蔽物遮蔽車道線的處境中,將無法透過影像來辨識當前行駛車掉。另外,雖然高精密定位系統,例如DGPS,可降低定位誤差而獲取當前行駛車道,但高精密定位系統的製造成本高且易受天候的影響。因此,如何提供一種完善且兼具低成本的車道辨識定位系統實為本領域技術人員所關心的議題之一。 If the vehicle's lane position is simply identified by the image, it will be limited by environmental factors and accurate lane recognition cannot be performed. For example, when the vehicle is in a traffic jam or a shelter obstructing the lane line, it will not be possible to identify the current vehicle passing through the image. In addition, although high-precision positioning systems, such as DGPS, can reduce positioning errors and obtain current driving lanes, high-precision positioning systems are expensive to manufacture and susceptible to weather. Therefore, how to provide a perfect and low-cost lane recognition positioning system is one of the topics of interest to those skilled in the art.

有鑑於此,本發明提供一種車道辨識方法與使用該方法的電子裝置,可藉由低成本的設備來達到辨識當前行駛車道的目的。 In view of this, the present invention provides a lane recognition method and an electronic device using the same, which can achieve the purpose of recognizing the current driving lane by using a low-cost device.

本發明提出一種車道辨識方法,適用於配置於車輛上的電子裝置。此車輛配置有影像擷取單元與通訊單元,而此車道辨識方法包括下列步驟。透過影像擷取單元獲取車輛前方的至少一車道影像。藉由車道影像執行車道偵測程序。若無法透過車道偵測程序獲取車輛的目前行駛車道,辨識車道影像中的參考車牌。透過該通訊單元接收另一車輛所傳送的車道分享資訊,並比對參考車牌與車道分享資訊,從而獲取目前行駛車道。 The invention provides a lane recognition method suitable for an electronic device disposed on a vehicle. The vehicle is equipped with an image capturing unit and a communication unit, and the lane recognition method includes the following steps. Acquiring at least one lane image in front of the vehicle through the image capturing unit. The lane detection procedure is performed by the lane image. If it is not possible to obtain the current driving lane of the vehicle through the lane detection program, the reference license plate in the lane image is recognized. The lane sharing information transmitted by another vehicle is received through the communication unit, and information is shared with the reference license plate and the lane to obtain the current driving lane.

在本發明的一實施例中,上述的車道影像至少包括歷史 影像與當前影像,而車道辨識方法更包括:分析歷史影像與當前影像中至少一車道線的斜率變化,據以判斷車輛是否變換目前行駛車道。若車輛變換目前行駛車道,更新車輛的目前行駛車道。 In an embodiment of the invention, the lane image described above includes at least history The image and the current image, and the lane recognition method further comprises: analyzing a change in the slope of the at least one lane line in the historical image and the current image, thereby determining whether the vehicle changes the current driving lane. If the vehicle changes the current driving lane, the current driving lane of the vehicle is updated.

在本發明的一實施例中,上述的車道辨識方法更包括:透過通訊單元廣播車輛的車牌與目前行駛車道,從而使又一車輛接收車牌與目前行駛車道。 In an embodiment of the present invention, the lane recognition method further includes: broadcasting the license plate of the vehicle and the current driving lane through the communication unit, so that the other vehicle receives the license plate and the current driving lane.

在本發明的一實施例中,上述在藉由所述車道影像執行該車道偵測程序的步驟之前,更包括:透過車輛定位單元進行定位,藉以獲得車輛的車輛位置。依據車輛位置與地圖資訊,獲取車輛的目前行駛道路的車道數目。 In an embodiment of the invention, before the step of executing the lane detection program by the lane image, the method further comprises: positioning by using a vehicle positioning unit to obtain a vehicle position of the vehicle. According to the vehicle location and the map information, the number of lanes of the current road of the vehicle is obtained.

在本發明的一實施例中,上述在藉由所述車道影像執行該車道偵測程序的步驟包括:設定車道影像對應的至少一興趣區域。將車道影像對應的興趣區域轉換為至少一灰階影像。對灰階影像進行邊緣偵測與直線偵測而獲取複數個車道線。依據車道線計算出車輛的目前行駛道路的車道數目以及目前行駛車道。 In an embodiment of the invention, the step of executing the lane detection program by the lane image comprises: setting at least one region of interest corresponding to the lane image. Converting the region of interest corresponding to the lane image into at least one grayscale image. Performing edge detection and line detection on grayscale images to obtain a plurality of lane lines. The number of lanes of the current road of the vehicle and the current driving lane are calculated based on the lane line.

在本發明的一實施例中,上述對灰階影像進行邊緣偵測與直線偵測而獲取耶車道線的步驟包括:對所述灰階影像進行邊緣偵測與直線偵測而獲取複數個第一候選直線。依據第一候選直線的直線方程式,從第一候選直線過濾出複數個第二候選直線。計算所述第二候選直線與參考水平線的複數個交點,依據這些交點之間的距離判斷這些第二候選直線是否為車道線。 In an embodiment of the invention, the step of performing edge detection and line detection on the grayscale image to obtain the lane line includes: performing edge detection and line detection on the grayscale image to obtain a plurality of A candidate line. A plurality of second candidate straight lines are filtered from the first candidate straight line according to the straight line equation of the first candidate straight line. Calculating a plurality of intersections of the second candidate line and the reference horizontal line, and determining whether the second candidate lines are lane lines according to the distance between the intersection points.

在本發明的一實施例中,上述若無法透過該車道偵測程 序獲取該車輛的目前行駛車道,辨識所述車道影像中的該參考車牌的步驟包括:對車道影像進行影像前處理,並從所述車道影像定位出參考車牌的車牌區域。針對此車牌區域進行字元分割,以劃分出多個字元圖像。辨識這些字元圖像,以獲取參考車牌的複數個車牌字元。 In an embodiment of the invention, if the above-mentioned lane detection process cannot be passed The step of acquiring the current driving lane of the vehicle and identifying the reference license plate in the lane image comprises: performing image pre-processing on the lane image, and locating the license plate area of the reference license plate from the lane image. Character segmentation is performed for the license plate area to divide a plurality of character images. These character images are identified to obtain a plurality of license plate characters of the reference license plate.

在本發明的一實施例中,上述辨識這些字元圖像,以獲 取參考車牌的字元的步驟包括:比對這些字元圖像與樣本字元,據以獲取各個字元圖像所代表的複數個初步判定字元。判斷這些初步判定字元是否屬於特定類別,透過字元特徵辨識程序重新辨識屬於特定類別的這些初步判定字元,從而獲取參考車牌的複數個車牌字元。 In an embodiment of the invention, the character images are identified by the above The step of taking the characters of the reference license plate includes comparing the character images and the sample characters to obtain a plurality of preliminary decision characters represented by the respective character images. It is judged whether these preliminary decision characters belong to a specific category, and these preliminary decision characters belonging to a specific category are re-identified by the character feature recognition program, thereby acquiring a plurality of license plate characters of the reference license plate.

在本發明的一實施例中,上述透過該通訊單元接收另一 車輛所傳送的車道分享資訊,並比對參考車牌與車道分享資訊,從而獲取目前行駛車道的步驟包括:依據另一車輛與車輛之間的相對位置以及車道分相享資訊,分析車輛的目前行駛車道。 In an embodiment of the invention, the receiving the other one through the communication unit The lanes shared by the vehicle share information and share the information with the reference license plate and the lane, so that the step of obtaining the current driving lane includes: analyzing the current driving of the vehicle according to the relative position between the other vehicle and the vehicle and the lane sharing information. Lane.

從另一觀點來看,本發明提出一種電子裝置,此電子裝 置配置於一車輛上。此電子裝置耦接影像擷取單元,且此電子裝置包括通訊單元、記憶體與處理器。記憶體儲存有多個指令。處理器耦接至通訊單元與記憶體,用以執行這些指令以執行多個下列步驟。透過影像擷取單元獲取車輛前方的至少一車道影像。藉由車道影像執行車道偵測程序。若無法透過車道偵測程序獲取車輛的目前行駛車道,辨識車道影像中的參考車牌。透過通訊單元 接收另一車輛所傳送的車道分享資訊,並比對參考車牌與車道分享資訊,從而獲取目前行駛車道。 From another point of view, the present invention provides an electronic device, the electronic device Placed on a vehicle. The electronic device is coupled to the image capturing unit, and the electronic device includes a communication unit, a memory, and a processor. The memory is stored with multiple instructions. The processor is coupled to the communication unit and the memory for executing the instructions to perform the following steps. Acquiring at least one lane image in front of the vehicle through the image capturing unit. The lane detection procedure is performed by the lane image. If it is not possible to obtain the current driving lane of the vehicle through the lane detection program, the reference license plate in the lane image is recognized. Communication unit The lane sharing information transmitted by another vehicle is received, and information is shared with the reference license plate and the lane to obtain the current driving lane.

基於上述,於本發明的一實施例中,藉由影像擷取單元取得車輛前方的車道影像,並對車道影像進行影像處理與分析。當車道影像中用以偵測車道的必須資訊不完整或被障礙物遮蔽時,可藉由車道影像辨識出前車的車牌。據此,藉由比對前車的車牌資訊與其他車輛透過車間通訊所傳送的車道分享資訊,可基於比對結果而從前車的車道分享資訊中知道車輛當前的所在位置,以進一步獲取車輛的目前行駛車道。 Based on the above, in an embodiment of the present invention, a lane image in front of the vehicle is acquired by the image capturing unit, and image processing and analysis are performed on the lane image. When the necessary information for detecting the lane in the lane image is incomplete or obscured by the obstacle, the license plate of the preceding vehicle can be identified by the lane image. Accordingly, by sharing the information of the license plate information of the preceding vehicle with the lanes transmitted by other vehicles through the workshop communication, the current location of the vehicle can be known from the lane sharing information of the preceding vehicle based on the comparison result to further obtain the current state of the vehicle. Driving lane.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 The above described features and advantages of the invention will be apparent from the following description.

10‧‧‧車道辨識系統 10‧‧‧ Lane Identification System

100‧‧‧電子裝置 100‧‧‧Electronic devices

110‧‧‧記憶體 110‧‧‧ memory

111‧‧‧車道偵測模組 111‧‧‧ Lane Detection Module

112‧‧‧車牌辨識模組 112‧‧‧ License Plate Identification Module

113‧‧‧車道追蹤模組 113‧‧‧ Lane Tracking Module

120‧‧‧處理器 120‧‧‧ processor

200‧‧‧影像擷取單元 200‧‧‧Image capture unit

300‧‧‧車輛定位單元 300‧‧‧Vehicle locating unit

400‧‧‧通訊單元 400‧‧‧Communication unit

R1‧‧‧道路 R1‧‧‧ Road

LN1~LN3‧‧‧車道 LN1~LN3‧‧" lane

C_1~C_3‧‧‧車輛 C_1~C_3‧‧‧ Vehicles

Img1~Img7‧‧‧影像 Img1~Img7‧‧‧ images

M1~M4、T1~T2‧‧‧車道線 M1~M4, T1~T2‧‧‧ lane lines

Z1~Z2‧‧‧興趣區域 Z1~Z2‧‧‧ interest area

H1‧‧‧投影統計圖 H1‧‧‧projection chart

L1~L4‧‧‧取樣線段 L1~L4‧‧‧Sampling line segment

S1‧‧‧相似字元群組 S1‧‧‧ similar character group

I1‧‧‧判斷機制表 I1‧‧‧Judgement Mechanism

S301~S306‧‧‧本發明一實施例所述的車道辨識方法的各步驟 S301~S306‧‧‧ steps of the lane recognition method according to an embodiment of the present invention

S401~S409‧‧‧本發明另一實施例所述的車道辨識方法的各步驟 S401~S409‧‧‧ steps of the lane recognition method according to another embodiment of the present invention

圖1是依照本發明一實施例所繪示之車道辨識系統的示意圖。 FIG. 1 is a schematic diagram of a lane recognition system according to an embodiment of the invention.

圖2是依照本發明一實施例所繪示之車道辨識方法的示意圖。 2 is a schematic diagram of a lane recognition method according to an embodiment of the invention.

圖3是依照本發明一實施例所繪示之車道辨識方法的流程圖。 FIG. 3 is a flow chart of a lane recognition method according to an embodiment of the invention.

圖4是依照本發明另一實施例所繪示之車道辨識方法的流程圖。 4 is a flow chart of a lane recognition method according to another embodiment of the present invention.

圖5為依照本發明另一實施例所繪示之設定興趣區域的示意圖。 FIG. 5 is a schematic diagram of setting an area of interest according to another embodiment of the invention.

圖6A為依照本發明另一實施例所繪示之疊加灰階影像的示意圖。 FIG. 6A is a schematic diagram of an overlay grayscale image according to another embodiment of the invention.

圖6B為依照本發明另一實施例所繪示之邊緣偵測影像的示意圖。 FIG. 6B is a schematic diagram of an edge detection image according to another embodiment of the invention.

圖6C為依照本發明另一實施例所繪示之消除影像雜訊的示意圖。 FIG. 6C is a schematic diagram of eliminating image noise according to another embodiment of the invention.

圖7是依照本發明另一實施例所繪示之字元切割的示意圖。 FIG. 7 is a schematic diagram of character cutting according to another embodiment of the present invention.

圖8是依照本發明另一實施例所繪示之字元辨識的示意圖。 FIG. 8 is a schematic diagram of character recognition according to another embodiment of the present invention.

圖9為依照本發明另一實施例所繪示之設定興趣區域的示意圖。 FIG. 9 is a schematic diagram of setting an area of interest according to another embodiment of the invention.

圖10為依照本發明另一實施例所繪示之追蹤車道線的示意。 FIG. 10 is a schematic diagram of a tracking lane line according to another embodiment of the invention.

圖1是依照本發明一實施例所繪示之車道辨識系統的示 意圖。請參照圖1,車道辨識系統10包括電子裝置100、影像擷取單元200、車輛定位單元300以及通訊單元400。車道辨識系統10適用於一車輛上,影像擷取單元200設置於車輛的前方,例如車輛擋風玻璃的上方,以擷取車輛前方的車道影像。一般來說,影像擷取單元200可設置於車內或車外,本發明在此不設限。影像擷取單元200例如是具有電荷耦合元件(Charge Coupled Device,CCD)或互補式金氧半導體(Complementary Metal-Oxide Semiconductor,CMOS)元件的影像感測器,用以擷取車輛前方的車道影像。舉例來說,影像擷取單元200可以是具有錄影設備的行車記錄器,也可以是具有攝影功能的照相機。影像擷取單元200的數量及配置可以針對實際的需求而變更,在此不設限。 1 is a diagram of a lane recognition system according to an embodiment of the invention. intention. Referring to FIG. 1 , the lane recognition system 10 includes an electronic device 100 , an image capturing unit 200 , a vehicle positioning unit 300 , and a communication unit 400 . The lane recognition system 10 is applied to a vehicle, and the image capturing unit 200 is disposed in front of the vehicle, such as above the windshield of the vehicle, to capture the image of the lane in front of the vehicle. Generally, the image capturing unit 200 can be disposed in or outside the vehicle, and the present invention is not limited thereto. The image capturing unit 200 has, for example, a charge coupled device (Charge Coupled) Device, CCD) or Complementary Metal-Oxide Semiconductor (CMOS) component image sensor for capturing lane images in front of the vehicle. For example, the image capturing unit 200 may be a driving recorder having a video recording device or a camera having a photography function. The number and configuration of the image capturing unit 200 can be changed according to actual needs, and is not limited herein.

車輛定位單元300例如是全球衛星定位系統(Global Position System,GPS),可定位車輛目前的位置以及運算出行進方向與速度等行車資訊。通訊單元400用以於無線網路中傳送與接收資料,並響應於無線網路的類型而具有對應的硬體設置。本發明對於通訊單元400的實施態樣並不限制,只要是可於透過無線傳輸接收或傳送資料的無線通訊裝置皆屬本發明的範疇所及。 更進一步來說,通訊單元400可基於特定的通訊協定與其他車輛進行通訊,例如基於IEEE 1609標準下的車用通訊協定,但本發明並不限制於此。 The vehicle positioning unit 300 is, for example, a Global Position System (GPS), which can locate the current position of the vehicle and calculate driving information such as the traveling direction and speed. The communication unit 400 is configured to transmit and receive data in a wireless network and has corresponding hardware settings in response to the type of wireless network. The present invention is not limited to the implementation of the communication unit 400, and any wireless communication device that can receive or transmit data through wireless transmission is within the scope of the present invention. Further, the communication unit 400 can communicate with other vehicles based on a specific communication protocol, for example, based on the vehicle communication protocol under the IEEE 1609 standard, but the present invention is not limited thereto.

電子裝置100至少包括一處理器120與一記憶體110。電子裝置100可以被實作為電腦、車用電腦或其他車用電子裝置。 舉例來說,車用電子裝置可以是汽車導航裝置,但本發明並不侷限於此等實作態樣。處理器120可以例如是中央處理單元(Central Processing Unit,CPU)、微處理器(Microprocessor)、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)、可程式化邏輯裝置(Programmable Logic Device,PLD)或其他具備運算能力的硬體裝置。記憶體110例如是隨機存取記憶體(random access memory)、快閃記憶體(Flash)或其他的記憶體,用以儲存資料與多個模組,而處理器120耦接記憶體110並用以執行這些模組。上述模組包括車道偵測模組111、車牌辨識模組112及車道追蹤模組113,這些模組例如是電腦程式,其可載入處理器120,從而執行辨識車道的功能。 The electronic device 100 includes at least a processor 120 and a memory 110. The electronic device 100 can be implemented as a computer, a car computer, or other vehicle electronic device. For example, the vehicle electronic device may be a car navigation device, but the invention is not limited to such implementations. The processor 120 can be, for example, a central processing unit (CPU), a microprocessor (Microprocessor), an application specific integrated circuit (ASIC), or a programmable logic device (PLD). Or other hardware devices with computing power. The memory 110 is, for example, a random access memory (random An access memory, a flash memory or other memory for storing data and a plurality of modules, and the processor 120 is coupled to the memory 110 and configured to execute the modules. The modules include a lane detection module 111, a license plate recognition module 112, and a lane tracking module 113. These modules are, for example, computer programs that can be loaded into the processor 120 to perform the function of recognizing lanes.

圖2是依照本發明一實施例所繪示之車道辨識方法的示 意圖。請參照圖2,假設道路R1具有三行車道,分別為第一車道LN1、第二車道L2以及第三車道LN3。車輛C_1、車輛C_2以及車輛C_3行駛於道路R1上,且車輛C_1、車輛C_2以及車輛C_3位於道路R1的第二車道LN2上。如圖2所示,車輛C_2緊跟於車輛C_1後方,且車輛C_3緊跟於車輛C_2後方。於圖2所示的範例實施例中,車輛C_2以及車輛C_3由於與前方車輛過於接近,導致於無法透過分析車道影像而取得當前的車道資訊。相較之下,由於車輛C_1前方並無阻擋車輛,因此車輛C_1可透過分析車道影像而取得當前的車道資訊。一旦車輛C_1得知目前的車道位置,車輛C_1將向外廣播車道分享資訊,而車輛C_1的車道分享資訊至少包括目前行駛車道(第二車道LN2)與車輛C_1的車牌號碼。 2 is a diagram showing a lane recognition method according to an embodiment of the invention. intention. Referring to FIG. 2, it is assumed that the road R1 has three lanes, which are the first lane LN1, the second lane L2, and the third lane LN3, respectively. The vehicle C_1, the vehicle C_2, and the vehicle C_3 travel on the road R1, and the vehicle C_1, the vehicle C_2, and the vehicle C_3 are located on the second lane LN2 of the road R1. As shown in FIG. 2, the vehicle C_2 is immediately behind the vehicle C_1, and the vehicle C_3 is immediately behind the vehicle C_2. In the exemplary embodiment shown in FIG. 2, the vehicle C_2 and the vehicle C_3 are too close to the preceding vehicle, so that the current lane information cannot be obtained by analyzing the lane image. In contrast, since there is no blocking vehicle in front of the vehicle C_1, the vehicle C_1 can obtain the current lane information by analyzing the lane image. Once the vehicle C_1 knows the current lane position, the vehicle C_1 will broadcast the lane sharing information, and the lane sharing information of the vehicle C_1 includes at least the current driving lane (the second lane LN2) and the license plate number of the vehicle C_1.

於本發明中,當車輛無法藉由自身的分析而獲取正確的 車道資訊時,由於前後相鄰的兩車輛位於同一車道上,因此可將前車的目前行駛車道作為後方車輛的目前行駛車道。以圖2為例,雖然車輛C_2無法自行分析出目前行駛車道,但車輛C_2可透過 無線傳輸接收到其他車輛所傳送的車道分享資訊。再者,車輛C_2可從車道影像中辨識出前車(車輛C_1)的車牌號碼,以藉由辨識結果從多個車道分享資訊中挑選出屬於車輛C_1的車道分享資訊。基此,車輛C_2可從車輛C_1的車道分享資訊得知車輛C_1的目前行駛車道,並且進一步將車輛C_1的目前行駛車道作為自身的目前行駛車道。類似地,當車輛C_2得知目前的車道位置,車輛C_2將向外廣播車道分享資訊,讓車輛C_3同樣可藉由車牌辨識與車輛C_2的車道分享資訊來得知目前的車道位置。 In the present invention, when the vehicle cannot obtain the correct one by its own analysis In the lane information, since the two vehicles adjacent to each other are located in the same lane, the current driving lane of the preceding vehicle can be used as the current driving lane of the rear vehicle. Taking Figure 2 as an example, although the vehicle C_2 cannot analyze the current driving lane by itself, the vehicle C_2 can pass through. The wireless transmission receives lane sharing information transmitted by other vehicles. Furthermore, the vehicle C_2 can recognize the license plate number of the preceding vehicle (vehicle C_1) from the lane image to select the lane sharing information belonging to the vehicle C_1 from the plurality of lane sharing information by the identification result. Based on this, the vehicle C_2 can know the current driving lane of the vehicle C_1 from the lane sharing information of the vehicle C_1, and further use the current driving lane of the vehicle C_1 as its current driving lane. Similarly, when the vehicle C_2 knows the current lane position, the vehicle C_2 will broadcast the lane sharing information, so that the vehicle C_3 can also know the current lane position by the license plate recognition and the lane sharing information of the vehicle C_2.

為了進一步說明本發明,以下特舉一實施例說明電子裝置100執行車道辨識方法的詳細步驟。圖3是依照本發明一實施例所繪示車道辨識方法的流程圖。請同時參照圖1與圖3,在本實施例中,車道辨識方法例如可利用圖1中的電子裝置100來執行。 以下搭配車道辨識系統10中的各項元件來說明本實施例之車道辨識方法的步驟。 In order to further illustrate the present invention, the following detailed description of the detailed steps of the electronic device 100 performing the lane recognition method will be described. FIG. 3 is a flow chart showing a lane recognition method according to an embodiment of the invention. Referring to FIG. 1 and FIG. 3 simultaneously, in the embodiment, the lane recognition method can be performed by using the electronic device 100 in FIG. 1, for example. The steps of the lane recognition method of the present embodiment will be described below in conjunction with various elements in the lane recognition system 10.

首先,於步驟S301中,車道偵測模組111透過影像擷取單元200獲取車輛前方的至少一車道影像。於步驟S302,車道偵測模組111藉由車道影像執行車道偵測程序。換句話說,於本實施例中,車道偵測模組111可藉由影像擷取單元200所擷取的車道影像來進行車道偵測。需說明的是,若要藉由分析車道影像來進行車道的偵測,車道影像內的攜帶資訊必須完整,否則車道偵測模組111將不易透過車道影像分析出車道資訊。一般來說,當車輛處於前方空曠且可完整取得車道線資訊的情況中,車道偵測 模組111可藉由影像擷取單元200所擷取的車道影像。然而,倘若車輛處於壅塞的交通路況中,由於車道上每部車的間距非常近,則車道偵測模組111可能因為車道線被鄰車或前車遮蔽而無法獲取當前的車道資訊,或是因為影像畫面過於複雜而產生錯誤的分析資訊。換言之,藉由分析車道影像來進行車道的偵測將受限於許多的環境因素。 First, in step S301, the lane detection module 111 acquires at least one lane image in front of the vehicle through the image capturing unit 200. In step S302, the lane detection module 111 performs a lane detection program by using the lane image. In other words, in the present embodiment, the lane detection module 111 can perform lane detection by using the lane image captured by the image capturing unit 200. It should be noted that if the lane detection is to be performed by analyzing the lane image, the information carried in the lane image must be complete, otherwise the lane detection module 111 will not easily analyze the lane information through the lane image. Generally speaking, when the vehicle is in front of the open space and can completely obtain the lane line information, the lane detection The module 111 can capture the lane image captured by the image capturing unit 200. However, if the vehicle is in a traffic jam, because the distance between each car in the lane is very close, the lane detection module 111 may not be able to obtain the current lane information because the lane line is obscured by the adjacent vehicle or the preceding vehicle, or Because the image is too complicated, it produces incorrect analysis information. In other words, lane detection by analyzing lane images will be limited by many environmental factors.

於是,於步驟S303中,車道偵測模組111判斷是否透過 車道偵測程序獲取車輛的目前行駛車道。詳細來說,車道偵測模組111將判斷是否獲取車輛的車道資訊,並檢查分析出來的車道資訊是否正確。舉例來說,於一實施例中,車道偵測模組111透過車輛定位單元300進行定位,藉以獲得車輛於地圖上的車輛位置。接著,車道偵測模組111依據車輛位置與地圖資訊,獲取目前行駛道路的車道數目。換句話說,基於定位系統與地圖資訊,車道偵測模組111可得知目前行駛道路的車道數目。於是,車道偵測模組111判斷地圖資訊中的車道數目是否與藉由車道影像偵測出來的車道數目相同。若是,代表分析資訊正確,車道偵測模組111可透過基於影像處理的車道偵測程序獲取車輛的目前行駛車道。若否,表示分析資訊不正確,車道偵測模組111將判定無法透過基於影像處理的車道偵測程序獲取車輛的目前行駛車道。 Therefore, in step S303, the lane detection module 111 determines whether it is transparent. The lane detection program acquires the current driving lane of the vehicle. In detail, the lane detection module 111 will determine whether to acquire the lane information of the vehicle and check whether the analyzed lane information is correct. For example, in one embodiment, the lane detection module 111 is positioned by the vehicle positioning unit 300 to obtain a vehicle location on the map. Then, the lane detection module 111 acquires the number of lanes of the currently traveling road according to the vehicle location and the map information. In other words, based on the positioning system and the map information, the lane detection module 111 can know the number of lanes of the currently traveling road. Therefore, the lane detection module 111 determines whether the number of lanes in the map information is the same as the number of lanes detected by the lane image. If yes, the representative of the analysis information is correct, the lane detection module 111 can obtain the current driving lane of the vehicle through the image processing-based lane detection program. If not, indicating that the analysis information is incorrect, the lane detection module 111 determines that the current driving lane of the vehicle cannot be acquired through the image processing-based lane detection program.

若步驟S303判斷為是,代表車道偵測模組111可透過基於影像處理的車道偵測程序獲取車輛的目前行駛車道。之後,於步驟S306中,車道偵測模組111透過通訊單元400廣播包括車輛 的車牌與目前行駛車道的車道分享資訊,從而使又一車輛接收車牌與目前行駛車道。也就是說,當車道偵測模組111已藉由車道影像分析出正確的車道資訊時,車道偵測模組111利用通訊單元400廣播出車輛的所在車道位置與本身的車牌資訊。如此一來,可讓其他的車輛接收到通訊單元400廣播出來的車道分享資訊,據以讓其他車輛可藉由通訊單元400廣播出來的車道分享資訊來得知車道位置。 If the determination in step S303 is YES, the representative lane detection module 111 can acquire the current driving lane of the vehicle through the image processing-based lane detection program. Thereafter, in step S306, the lane detection module 111 broadcasts the included vehicle through the communication unit 400. The license plate shares information with the lane of the current driving lane, so that another vehicle receives the license plate and the current driving lane. That is to say, when the lane detection module 111 has analyzed the correct lane information by using the lane image, the lane detection module 111 uses the communication unit 400 to broadcast the location of the lane of the vehicle and its own license plate information. In this way, other vehicles can receive the lane sharing information broadcasted by the communication unit 400, so that other vehicles can know the lane position by the lane sharing information broadcasted by the communication unit 400.

另一方面,若無法透過車道偵測程序獲取車輛的目前行駛車道,於步驟S304中,車牌辨識模組112辨識車道影像中的參考車牌。換句話說,於車道壅塞的狀況中,雖然電子裝置100無法透過影像獲取準確的車道資訊,但車牌辨識模組112依然可偵測與辨識車道影像中前車的車牌。接著,於步驟S305中,車牌辨識模組112透過通訊單元400接收另一車輛所傳送的車道分享資訊,並比對參考車牌與車道分享資訊,從而獲取目前行駛車道。 詳細來說,車牌辨識模組112可能會透過通訊單元400接收到許多車輛傳送過來的車道分享資訊,但車牌辨識模組112需要的是前一相鄰車輛的車道資訊。因此,由於車牌辨識模組112已經透過車道影像得知前車的車牌號碼,因此車牌辨識模組112可透過比對辨識結果與車道分享資訊中的車牌資訊而濾出前車所傳送的車道分享資訊。如果車道分享資訊中的車牌資訊與辨識結果相符,車牌辨識模組112可從過濾出來的車道分享資訊中據以得知目前行駛車道。 On the other hand, if the current driving lane of the vehicle cannot be acquired through the lane detecting program, the license plate recognition module 112 recognizes the reference license plate in the lane image in step S304. In other words, in the case of the lane congestion, although the electronic device 100 cannot obtain accurate lane information through the image, the license plate recognition module 112 can still detect and recognize the license plate of the preceding vehicle in the lane image. Next, in step S305, the license plate recognition module 112 receives the lane sharing information transmitted by another vehicle through the communication unit 400, and compares the reference license plate with the lane to share information, thereby acquiring the current driving lane. In detail, the license plate recognition module 112 may receive the lane sharing information transmitted by many vehicles through the communication unit 400, but the license plate recognition module 112 needs the lane information of the previous adjacent vehicle. Therefore, since the license plate recognition module 112 has learned the license plate number of the preceding vehicle through the lane image, the license plate recognition module 112 can filter the lane sharing information transmitted by the preceding vehicle by comparing the identification result with the license plate information in the lane sharing information. . If the license plate information in the lane sharing information matches the identification result, the license plate recognition module 112 can learn the current driving lane from the filtered lane sharing information.

值得一提的是,本發明的實現方式不限於上述說明,可 以對於實際的需求而酌予變更上述實施例的內容。例如,在電子裝置100藉由車道偵測程序或車牌辨識獲取車道資訊後,電子裝置100更可以藉由車道影像執行一車道追蹤程序,以確認車輛是否切換目前行駛車道。以下則舉本發明之另一實施例來詳細描述車道辨識方法的步驟。 It is worth mentioning that the implementation manner of the present invention is not limited to the above description, and The contents of the above embodiments are changed as appropriate for actual needs. For example, after the electronic device 100 acquires the lane information by using the lane detection program or the license plate recognition, the electronic device 100 can further perform a lane tracking program by using the lane image to confirm whether the vehicle switches the current driving lane. Hereinafter, another embodiment of the present invention will be described in detail to describe the steps of the lane recognition method.

圖4是依照本發明另一實施例所繪示之車道辨識方法的 流程圖。請同時參照圖1與圖4,在本實施例中,車道辨識方法例如可利用圖1中的電子裝置100來執行。以下搭配車道辨識系統10中的各項元件來說明本實施例之車道辨識方法的步驟。 FIG. 4 is a diagram of a lane recognition method according to another embodiment of the invention. flow chart. Referring to FIG. 1 and FIG. 4 simultaneously, in the embodiment, the lane recognition method can be performed by using the electronic device 100 in FIG. 1, for example. The steps of the lane recognition method of the present embodiment will be described below in conjunction with various elements in the lane recognition system 10.

首先,於步驟S401中,車道偵測模組111透過影像擷取 單元200獲取車輛前方的至少一車道影像。於步驟S402中,車道偵測模組111藉由車道影像執行車道偵測程序。於步驟S403中,車道偵測模組111判斷是否透過車道偵測程序獲取車輛的目前行駛車道。 First, in step S401, the lane detection module 111 transmits image through Unit 200 acquires at least one lane image in front of the vehicle. In step S402, the lane detection module 111 performs a lane detection program by using the lane image. In step S403, the lane detection module 111 determines whether the current driving lane of the vehicle is acquired through the lane detection program.

於本實施例的車道偵測程序中,車道偵測模組111首先 設定車道影像對應的至少一興趣區域(Region of Interest,ROI),並將車道影像對應的興趣區域轉換為至少一灰階影像。詳細來說,由於用以偵測車道線所需的影像資訊為地上的車道線,因此車道偵測模組111在車道影像中選取出興趣區域為至少涵蓋到所有車道線的特定區域。舉例來說,圖5為依照本發明另一實施例所繪示之選定興趣區域的示意圖。請參照圖5,車道偵測模組111 於車道影像Img1上的一基準線(例如地平線)下方開始搜尋並設定出興趣區域Z1。如圖5所示,興趣區域Z1為涵蓋到所有車道線M1~M4的特定區域。基於興趣區域Z1的選定,可一併的提升運算速度及減少不必要的雜訊干擾。 In the lane detection program of this embodiment, the lane detection module 111 first At least one Region of Interest (ROI) corresponding to the lane image is set, and the region of interest corresponding to the lane image is converted into at least one grayscale image. In detail, since the image information required for detecting the lane line is the lane line on the ground, the lane detecting module 111 selects the region of interest in the lane image as a specific region covering at least all the lane lines. For example, FIG. 5 is a schematic diagram of a selected region of interest according to another embodiment of the invention. Referring to FIG. 5, the lane detection module 111 Searching and setting the region of interest Z1 below a baseline (e.g., horizon) on the lane image Img1. As shown in FIG. 5, the region of interest Z1 is a specific region covering all of the lane lines M1 to M4. Based on the selection of the interest area Z1, the operation speed can be improved and the unnecessary noise interference can be reduced.

之後,車道偵測模組111將選定的興趣區域轉換為灰階影像,且車道偵測模組111對轉換後的灰階影像進行邊緣偵測(Edge detection)與直線偵測而獲取複數個車道線。詳細來說,基於車道線邊緣特徵明顯的特性,車道偵測模組111可使用邊緣偵測找出車道線的邊緣。值得一提的是,於一實施例中,由於車道線有虛線的存在,所以興趣區域中的車道線可能有過短或不連續的情況發生。因此,於車道偵測模組111把取出的興趣區域轉成灰階影像後,車道偵測模組111可疊加取樣時間相鄰的多張灰階影像,以讓車道線於疊加影像中成為一條較連續且明顯的直線。 Then, the lane detection module 111 converts the selected region of interest into a grayscale image, and the lane detection module 111 performs edge detection and line detection on the converted grayscale image to obtain a plurality of lanes. line. In detail, based on the obvious characteristics of the lane line edge feature, the lane detection module 111 can use edge detection to find the edge of the lane line. It is worth mentioning that in an embodiment, the lane line in the region of interest may be too short or discontinuous due to the presence of a dotted line on the lane line. Therefore, after the lane detection module 111 converts the extracted region of interest into a grayscale image, the lane detection module 111 can superimpose a plurality of grayscale images adjacent to the sampling time to make the lane line become a layer in the superimposed image. A more continuous and distinct line.

舉例來說,圖6A為依照本發明另一實施例所繪示之疊加灰階影像的示意圖。圖6B為依照本發明另一實施例所繪示之邊緣偵測影像的示意圖。於圖6A所示的範例中,影像Img2係為車道偵測模組111疊加四張連續的車道影像所產生的疊加影像。於圖6B所示的範例中,影像Img3係為車道偵測模組111對影像Img2進行邊緣偵測所產生的邊緣影像。 For example, FIG. 6A is a schematic diagram of superimposed grayscale images according to another embodiment of the invention. FIG. 6B is a schematic diagram of an edge detection image according to another embodiment of the invention. In the example shown in FIG. 6A, the image Img2 is a superimposed image generated by the lane detecting module 111 superimposing four consecutive lane images. In the example shown in FIG. 6B, the image Img3 is an edge image generated by the lane detection module 111 for edge detection of the image Img2.

另外,於一實施例中,為了將一些明顯雜訊的消除,車道偵測模組111可利用形態學(Morphology)中的侵蝕(Erosion)來消除雜訊。舉例來說,圖6C為依照本發明另一實施例所繪示之 消除影像雜訊的示意圖。於圖6C所示的範例中,影像Img4係為車道偵測模組111對邊緣影像Img3進行形態學中的侵蝕所產生的影像。 In addition, in an embodiment, in order to eliminate some obvious noise, the lane detection module 111 can use the erosion (Erosion) in Morphology to eliminate noise. For example, FIG. 6C illustrates a second embodiment of the present invention. A schematic diagram that eliminates image noise. In the example shown in FIG. 6C, the image Img4 is an image generated by the lane detection module 111 performing morphological erosion on the edge image Img3.

再者,車道偵測模組111利用邊緣偵測後所產生的邊緣 影像來進行直線偵測。於一實施例中,車道偵測模組111例如是利用霍夫線偵測(Hough line detection)來偵測出邊緣影像中的直線。然而,於其他實施例中,車道偵測模組111可利用其他演算法來執行直線偵測,以進一步尋找出興趣區域中可能是車道線邊緣的直線邊緣,本發明對此不限制。於本實施例中,車道偵測模組111對興趣區域的灰階影像進行邊緣偵測與直線偵測而獲取複數個第一候選直線。 Furthermore, the lane detection module 111 utilizes edges generated by edge detection. Image for line detection. In one embodiment, the lane detection module 111 detects a line in the edge image by using Hough line detection, for example. However, in other embodiments, the lane detection module 111 may use other algorithms to perform line detection to further find a straight edge in the region of interest that may be the edge of the lane line, which is not limited by the present invention. In this embodiment, the lane detection module 111 performs edge detection and line detection on the grayscale image of the region of interest to obtain a plurality of first candidate lines.

基此,車道偵測模組111可藉由特定的判斷機制來判斷 這些第一候選直線是否為車道線。於利用霍夫線偵測而偵測出第一候選直線的實施例中,車道偵測模組111可依據這些第一候選直線的直線方程式,從這些第一候選直線中過濾出複數個第二候選直線。接著,車道偵測模組111計算第二候選直線與參考水平線的複數個交點,依據這些交點之間的距離判斷第二候選直線是否為車道線。 Based on this, the lane detection module 111 can be judged by a specific judgment mechanism. Whether these first candidate lines are lane lines. In the embodiment in which the first candidate line is detected by using the Hough line detection, the lane detection module 111 may filter the plurality of second lines from the first candidate lines according to the line equations of the first candidate lines. Candidate line. Next, the lane detection module 111 calculates a plurality of intersections of the second candidate line and the reference horizontal line, and determines whether the second candidate line is a lane line according to the distance between the intersection points.

詳細來說,由於霍夫線偵測利用影像上兩個座標點來代 表搜尋到的直線線段,因此車道偵測模組111先以每一線段的兩座標點計算出代表每一線段的直線方程式。之後,車道偵測模組111藉由每一線段的直線方程式判斷此直線是否為車道線。由於車 道線不會是水平的直線,因此車道偵測模組111可依據這些第一候選直線的斜率將係為水平線段的第一候選直線移除。另外,如果有直線方程式相同的第一候選直線,車道偵測模組111也可只保留其中一條。基此,車道偵測模組111可從多個第一候選直線當中過濾出第二候選直線。 In detail, since the Hoff line detection uses two coordinate points on the image to represent The straight line segments searched by the table, so the lane detecting module 111 first calculates a straight line equation representing each line segment by using two punctuation points of each line segment. Thereafter, the lane detection module 111 determines whether the line is a lane line by a straight line equation of each line segment. Due to the car The lane lines are not horizontal straight lines, so the lane detection module 111 can remove the first candidate line that is a horizontal line segment according to the slope of the first candidate lines. In addition, if there is a first candidate line having the same straight line equation, the lane detecting module 111 may retain only one of them. Based on this, the lane detection module 111 can filter out the second candidate line from among the plurality of first candidate lines.

之後,車道偵測模組111計算所有第二候選直線和固定 高度的參考水平線的交點,並將此些交點依序排列。由於車道線之間的距離(車道寬度)落在一定的合理區間內,因此車道偵測模組111可計算各個交點之間的距離而據以從第二候選直線中偵測出車道線。基於上述車道線的偵測與判斷,車道偵測模組111將從車道影像的興趣區域找出最有可能為車道線的直線線段。 After that, the lane detection module 111 calculates all the second candidate lines and fixed The intersection of the height reference horizontal lines, and the intersections are arranged in order. Since the distance between the lane lines (the lane width) falls within a certain reasonable interval, the lane detection module 111 can calculate the distance between the intersections to detect the lane line from the second candidate line. Based on the detection and determination of the lane line, the lane detection module 111 will find the straight line segment most likely to be the lane line from the region of interest of the lane image.

基此,車道偵測模組111可依據車道線計算出車輛的目 前行駛道路的車道數目以及目前行駛車道。進一步來說,車道線的數總數減一即為目前行駛道路的車道數。舉例來說,若車道偵測模組111找到4條車道線,代表目前行駛道路為三線道。再者,當影像擷取單元200放置於車輛前方時,位於車輛左側的車道線的斜率必定為正值。相反的,位於車輛右側的車道線的斜率必定為負值。也就是說,透過分析車道線的斜率,車道偵測模組111可得知車輛的左右兩方各有幾條車道線。如此一來,車道偵測模組111更可以藉由左車道線與右車道線的數目而得知車輛的位於哪一車道上,從而獲取目前行駛車道。 Based on the lane line, the lane detection module 111 can calculate the target of the vehicle. The number of lanes on the road ahead and the current lane. Further, the total number of lane lines minus one is the number of lanes on the current road. For example, if the lane detection module 111 finds 4 lane lines, it represents that the current road is a three lane. Furthermore, when the image capturing unit 200 is placed in front of the vehicle, the slope of the lane line located on the left side of the vehicle must be a positive value. Conversely, the slope of the lane line on the right side of the vehicle must be negative. That is to say, by analyzing the slope of the lane line, the lane detecting module 111 can know that there are several lane lines on the left and right sides of the vehicle. In this way, the lane detecting module 111 can further know which lane the vehicle is located by the number of the left lane line and the right lane line, thereby acquiring the current driving lane.

請再次參考圖4,若步驟S403判斷為否,於步驟S404 中,車牌辨識模組112辨識車道影像中的參考車牌。於本實施例中,車牌辨識流程包括了影像前處理、車牌定位、字元切割以及字元辨識。於一實施例中,車牌辨識模組112對車道影像進行影像前處理,並從車道影像定位出參考車牌的車牌區域。車牌辨識模組112針對車牌區域進行字元分割,以劃分出多個字元圖像。 車牌辨識模組112接著辨識這些字元圖像,以獲取參考車牌的複數個車牌字元。 Please refer to FIG. 4 again. If the determination in step S403 is no, in step S404. The license plate recognition module 112 recognizes the reference license plate in the lane image. In this embodiment, the license plate recognition process includes image pre-processing, license plate location, character cutting, and character recognition. In one embodiment, the license plate recognition module 112 performs image pre-processing on the lane image and locates the license plate area of the reference license plate from the lane image. The license plate recognition module 112 performs character segmentation for the license plate area to divide a plurality of character images. The license plate recognition module 112 then recognizes the character images to obtain a plurality of license plate characters of the reference license plate.

詳細來說,車牌辨識模組112先進行影像前處理來加強 車牌在車道影像中的特徵,讓之後的車牌定位較容易定位出車牌位置及大小。舉例來說,為了讓車道影像中的邊緣更明顯、更容易被偵測,車牌辨識模組112可以用直方圖等化(Histogram equalization)來加強影像的對比。直方圖等化就是讓影像中的所有像素的灰階度盡可能平均分佈在0到255來提高影像的對比度。 In detail, the license plate recognition module 112 first performs image pre-processing to strengthen The characteristics of the license plate in the lane image make it easier to locate the license plate position and size after the license plate is positioned. For example, in order to make the edges in the lane image more visible and easier to detect, the license plate recognition module 112 can enhance the contrast of the image by using histogram equalization. Histogram equalization is to increase the grayscale of all pixels in the image as evenly as possible from 0 to 255 to improve the contrast of the image.

於車牌定位中,車牌辨識模組112利用車牌影像中灰階 度劇烈變化的特徵來找出可能為車牌的區域,再利用投影切割法達到初步車牌定位的目的。舉例來說,車牌辨識模組112利用邊緣偵側找出車道影像中的所有邊緣特徵,並利用形態學中的膨脹(Dilation)及侵蝕將所有邊緣部份集合成一塊,方便計算車牌在影像中位置。接著,車牌辨識模組112將經過影像前處理而產生的邊緣影像中的白點(代表灰階度劇烈變化的像素點)分別投影到水平軸和垂直軸上,且車牌辨識模組112更分別統計白點落於水平和垂直軸的累積數量。基於相對多的白點代表車牌在影像中 的大略位置,車牌辨識模組112可定位出車牌位置。於一實施例中,車牌辨識模組112還可以將擷取出來的車牌影像向外延伸,並再次利用投影切割的方式來微調車牌影像的邊界。 In the license plate location, the license plate recognition module 112 utilizes the grayscale in the license plate image. The characteristics of the drastic changes to find out the area that may be the license plate, and then use the projection cutting method to achieve the purpose of initial license plate positioning. For example, the license plate recognition module 112 uses the edge detection side to find all the edge features in the lane image, and uses the morphological expansion and erosion to combine all the edge parts into one piece, which is convenient for calculating the license plate in the image. position. Then, the license plate recognition module 112 respectively projects white points (pixel points representing dramatic changes in gray scale) in the edge image generated by the image pre-processing onto the horizontal axis and the vertical axis, and the license plate recognition module 112 further separates The cumulative number of white spots falling on the horizontal and vertical axes is counted. Based on a relatively large number of white dots representing the license plate in the image In a general location, the license plate recognition module 112 can position the license plate. In an embodiment, the license plate recognition module 112 can further extend the image of the license plate taken out, and use the method of projection cutting to finely adjust the boundary of the license plate image.

在定位出車牌位置之後,車牌辨識模組112執行字元切割與字元辨識的動作。也就是說,車牌辨識模組112從車牌影像中切割出各個字元圖像,在切割出各個字元圖像後接著對各個字元進行辨識。需說明的是,任何字元分割技術皆可用於實現本發明的字元切割,本發明對此不限制。 After the license plate position is located, the license plate recognition module 112 performs the functions of character cutting and character recognition. That is to say, the license plate recognition module 112 cuts out each character image from the license plate image, and then recognizes each character after cutting each character image. It should be noted that any character segmentation technique can be used to implement the character slice of the present invention, which is not limited by the present invention.

舉例來說,圖7是依照本發明另一實施例所繪示的字元切割之示意圖。於圖7所示範的字元切割方法中,車牌辨識模組112依據字元之間的空白處來做切割。如圖7所示,車牌辨識模組112先將車牌影像Img5投影到水平軸而產生灰階值投影量的統計圖H1。可以知道的是,由於字元之間具有空白處,因此字元之間的空白區域所對應的灰階值投影量一定最高。基此,如圖7所示,統計圖H1中的各個峰值P1~P5之間可視為一個字元所在位置。 也就是說,如圖7中的影像Img6所示,車牌辨識模組112可依據車牌的左右邊緣與峰值P1~P5而初步切割出各個字元。另外,車牌辨識模組112還可藉由第一個字元左邊切割處C1和第二個字元左邊切割處C2得到字元的寬度B1,並依此字元寬度B1來進一步切割出每個字元。 For example, FIG. 7 is a schematic diagram of character cutting according to another embodiment of the present invention. In the character cutting method exemplified in FIG. 7, the license plate recognition module 112 performs cutting according to the space between the characters. As shown in FIG. 7, the license plate recognition module 112 first projects the license plate image Img5 onto the horizontal axis to generate a statistical map H1 of the grayscale value projection amount. It can be known that since there is a space between the characters, the amount of grayscale value corresponding to the blank area between the characters must be the highest. Based on this, as shown in FIG. 7, the peaks P1 to P5 in the graph H1 can be regarded as the position of one character. That is to say, as shown by the image Img6 in FIG. 7, the license plate recognition module 112 can initially cut out the respective characters according to the left and right edges of the license plate and the peaks P1 to P5. In addition, the license plate recognition module 112 can further obtain the width B1 of the character by the cut position C1 on the left side of the first character and the cut position C2 on the left side of the second character, and further cut each of the characters according to the width B1 of the character. Character.

在進行字元切割之後,車牌辨識模組112便可進行字元辨識的步驟。於一實施例中,車牌辨識模組112例如使用樣版比 對(Template matching)來比對出字元,將待辨識字元和所有樣本圖像逐一比對。藉由將與待辨識字元最接近的樣本圖像作為辨識結果而達成辨識的目的。舉例來說,將同樣尺寸大小的兩個影像的灰階值相減,相減後的灰階值差異越小,代表兩影像越相近。 其中,可藉由先收集所有字母與數字的樣本圖像來建立辨識用的字元資料庫。需特別說明的是,雖然上述實施例以樣版比對為例進行說明,但本發明所屬技術領域之技術人員可以任何字元辨識技術來實現辨識車牌字元的步驟。 After the character cutting, the license plate recognition module 112 can perform the step of character recognition. In an embodiment, the license plate recognition module 112 uses, for example, a pattern ratio. For (Template matching) to compare the characters, the characters to be recognized and all the sample images are aligned one by one. The purpose of identification is achieved by taking the sample image closest to the character to be recognized as the recognition result. For example, the grayscale values of two images of the same size are subtracted, and the smaller the difference of the grayscale values after subtraction, the closer the two images are. Among them, the character database for identification can be established by collecting sample images of all letters and numbers first. It should be particularly noted that although the above embodiment is described by taking a sample alignment as an example, those skilled in the art can implement the steps of recognizing license plate characters by any character recognition technology.

此外,在使用樣版比對出初步判定字元之後,由於例如為‘0’、‘6’、‘8’、‘9’、‘C’、‘D’以及‘S’的這些字元比較相似,因此只要字元圖像稍微偏移或傾斜,就有可能會造成辨識錯誤。於是,於一實施例中,在車牌辨識模組112藉由樣本比對進行字元辨識後,車牌辨識模組112更針對這些相似字元再次進行特徵比對,以增加字元辨識的正確率。 In addition, after comparing the preliminary decision characters using the pattern, these characters are compared due to, for example, '0', '6', '8', '9', 'C', 'D', and 'S'. Similar, so as long as the character image is slightly offset or tilted, it may cause a recognition error. Therefore, in an embodiment, after the license plate recognition module 112 performs character recognition by sample comparison, the license plate recognition module 112 performs feature comparison again on the similar characters to increase the correct rate of character recognition. .

也就是說,車牌辨識模組112首先比對切割後的字元圖像與樣本字元,據以獲取各字元圖像所代表的初步判定字元。接著,車牌辨識模組112判斷這些初步判定字元是否屬於由相似字元所組成的特定類別。舉例來說,假使初步判定字元屬於‘0’、‘6’、‘8’、‘9’、‘C’、‘D’以及‘S’這幾個相似字元的話,車牌辨識模組112則要經由特定的特徵來進行再次的辨識。 換言之,車牌辨識模組112可透過字元特徵辨識程序重新辨識屬於特定類別的多個初步判定字元,從而獲取前車之參考車牌的車 牌字元。 That is to say, the license plate recognition module 112 first compares the cut character image and the sample character to obtain the preliminary determination character represented by each character image. Next, the license plate recognition module 112 determines whether the preliminary decision characters belong to a particular category consisting of similar characters. For example, if the preliminary decision character belongs to similar characters such as '0', '6', '8', '9', 'C', 'D', and 'S', the license plate recognition module 112 Then it is necessary to identify again through specific features. In other words, the license plate recognition module 112 can re-identify a plurality of preliminary determination characters belonging to a specific category through the character feature recognition program, thereby acquiring the vehicle of the reference vehicle license plate of the preceding vehicle. Card character.

圖8是依照本發明另一實施例所繪示的字元辨識的示意圖。於圖8所示範的字元辨識方法中,為了區分相似字元群組S1中的各個字元,車牌辨識模組112在字元圖像上分別取出取樣線段L1~L4,並分別判斷字元上的取樣線段L1到取樣線段L4是否為白色線段。基於各個字元的結構差異,車牌辨識模組112可依取樣線段L1到取樣線段L4是否為白色線段來區分出相似字元群組S1中的字元。舉例來說,對於數字‘6’來說,由於其右上方具有缺口,因此數字‘6’上的取樣線段L3為白色線段,而其餘的取樣線段L1、L2與L4並非為白色線段。依此類推,基於上述規則而建立的判斷機制如圖8中的判斷機制表I1所示。 FIG. 8 is a schematic diagram of character recognition according to another embodiment of the invention. In the character recognition method exemplified in FIG. 8, in order to distinguish each character in the similar character group S1, the license plate recognition module 112 respectively extracts the sampling line segments L1 to L4 on the character image, and respectively determines the character characters. Whether the sampling line segment L1 to the sampling line segment L4 is a white line segment. Based on the structural difference of each character, the license plate recognition module 112 can distinguish the characters in the similar character group S1 according to whether the sampling line segment L1 to the sampling line segment L4 are white line segments. For example, for the number '6', since the upper right side has a gap, the sampling line segment L3 on the number '6' is a white line segment, and the remaining sampling line segments L1, L2, and L4 are not white line segments. And so on, the judgment mechanism established based on the above rules is as shown in the judgment mechanism table I1 in FIG.

換句話說,基於圖8所示的判斷機制表I1,車牌辨識模組112可藉由字元圖像上的取樣線段L1~L4而分辨出相似字元群組S1中的這些相似字元。值得一提的是,如判斷機制表I1所示,數字‘0’以及字母‘D’無法藉由判斷機制表I1的判斷機制來區分。因此,車牌辨識模組112可利用數字‘0’與字母‘D’之左上角和左下角的特徵差異再次進行判別。藉此,車牌辨識模組112可準確的辨識出車牌影像中的所有車牌字元,以得知前車的車牌號碼。 In other words, based on the judgment mechanism table I1 shown in FIG. 8, the license plate recognition module 112 can distinguish the similar characters in the similar character group S1 by the sampling line segments L1 to L4 on the character image. It is worth mentioning that, as shown in the judgment mechanism table I1, the number '0' and the letter 'D' cannot be distinguished by the judgment mechanism of the judgment mechanism table I1. Therefore, the license plate recognition module 112 can perform discrimination again by using the characteristic difference between the upper left corner and the lower left corner of the number '0' and the letter 'D'. Thereby, the license plate recognition module 112 can accurately identify all the license plate characters in the license plate image to know the license plate number of the preceding vehicle.

請再次參考圖4,在車牌辨識模組112辨識出前車的車牌號碼後,於步驟S405中,車牌辨識模組112透過通訊單元400接收另一車輛所傳送的車道分享資訊,並比對參考車牌與車道分享 資訊,從而獲取目前行駛車道。與圖3所示實施例不同的是,於本實施例中,一旦車道偵測模組111或車牌辨識模組112取得車道位置,車道追蹤模組113將進行車道追蹤。車道影像包括歷史影像與當前影像,其中歷史影像與當前影像的取樣時間點不同,當前影像可視為當前最新取得的一張車道影像。於是,在車牌辨識模組112獲取目前行駛車道後,於步驟S406,車道追蹤模組113分析歷史影像與當前影像中至少一車道線的斜率變化,據以判斷車輛是否變換目前行駛車道。若車輛變換目前行駛車道,車道追蹤模組113更新車輛的目前行駛車道。 Referring to FIG. 4 again, after the license plate recognition module 112 recognizes the license plate number of the preceding vehicle, in step S405, the license plate recognition module 112 receives the lane sharing information transmitted by another vehicle through the communication unit 400, and compares the reference license plate. Share with lane Information to get the current driving lane. Different from the embodiment shown in FIG. 3, in the present embodiment, once the lane detection module 111 or the license plate recognition module 112 obtains the lane position, the lane tracking module 113 performs lane tracking. The lane image includes a historical image and a current image. The historical image is different from the sampling time of the current image, and the current image can be regarded as the currently acquired one lane image. Then, after the license plate recognition module 112 acquires the current driving lane, in step S406, the lane tracking module 113 analyzes the slope change of the at least one lane line in the historical image and the current image, thereby determining whether the vehicle changes the current driving lane. If the vehicle changes the current driving lane, the lane tracking module 113 updates the current driving lane of the vehicle.

詳細來說,於一實施例中,車道追蹤模組113可依據歷 史影像中已得知的車道線位置來尋找當前影像中新的車道線位置,並基於斜率的變化來判斷車輛是否切換車道。於本實施例中,車道追蹤模組113首先選定歷史影像與當前影像的興趣區域作為追蹤車道線的區域。由於車輛通常會與前車保持一段安全距離,在靠近車頭處的左右側車道線較不容易有被遮蔽的狀況發生。因此,圖9為依照本發明一實施例所繪示的設定興趣區域的示意圖。 請參照圖9,車道追蹤模組113例如可設定車道影像Img7中最下緣的區域Z2作為用以偵測與分析的興趣區域。如圖9所示,區域Z2包括左車道線T1以及右車道線T2。 In detail, in an embodiment, the lane tracking module 113 can be based on the calendar. The lane line position already known in the history image is used to find a new lane line position in the current image, and it is determined whether the vehicle switches lanes based on the change in the slope. In the present embodiment, the lane tracking module 113 first selects the historical image and the region of interest of the current image as the region for tracking the lane line. Since the vehicle usually maintains a safe distance from the preceding vehicle, the left and right side lane lines near the front of the vehicle are less likely to be obscured. Therefore, FIG. 9 is a schematic diagram of setting an interest area according to an embodiment of the invention. Referring to FIG. 9, the lane tracking module 113 can set, for example, the region Z2 at the lowermost edge of the lane image Img7 as the region of interest for detection and analysis. As shown in FIG. 9, the zone Z2 includes a left lane line T1 and a right lane line T2.

在沒有歷史影像的情況中,車道追蹤模組113可透過取 樣車道線的中點並透過最小平方迴歸線(least square regression line)算出代表車道線的直線方程式。之後,在有了歷史影像所偵 測到的車道線位置後,便能以歷史影像所偵測到的位置為依據而於當前影像尋找新的車道線位置。如此一來,將大大減少用以運算的影像面積而讓運算速度加快。換句話說,車道追蹤模組113依據歷史影像中至少一車道線的先前資訊,於當前影像中關聯於此先前資訊的追蹤區域偵測車道線的位置,從而獲取車道線的當前資訊。 In the absence of historical images, the lane tracking module 113 can take The midpoint of the lane line and the straight line equation representing the lane line is calculated by the least square regression line. After that, it was detected by historical images. After the detected lane line position, the new lane line position can be found in the current image based on the position detected by the historical image. In this way, the area of the image used for calculation is greatly reduced and the operation speed is increased. In other words, the lane tracking module 113 detects the location of the lane line in the tracking area associated with the previous information based on the previous information of at least one lane line in the historical image, thereby acquiring the current information of the lane line.

圖10為依照本發明另一實施例所繪示的追蹤車道線的示意。假設以圖9中的左車道線T1為例進行說明,如圖10所示,首先以藉由歷史影像所找出的左側車道線為依據來對當前影像做搜尋,虛線四邊形Q1代表歷史影像的左側車道線而實線四邊形Q2代表當前影像的左側車道線。由於在歷史影像中已找出左側車道線的中線Lpre,車道追蹤模組113利用此中線由上向下平均取出分別為線段Ly1~Ly16的16條參考線。然後在線段Ly1~Ly16中向左與向右找出當前影像中左側車道線的左邊邊緣點(如點PLeft)和右邊邊緣點(如點PRight),再算出左邊邊緣點與右邊邊緣點的中點(如點Pmid)。 FIG. 10 is a schematic diagram of a tracking lane line according to another embodiment of the invention. Assume that the left lane line T1 in FIG. 9 is taken as an example. As shown in FIG. 10, the current image is first searched based on the left lane line found by the historical image. The dotted quadrilateral Q1 represents the historical image. The left lane line and the solid line quadrilateral Q2 represent the left lane line of the current image. Since the center line Lpre of the left lane line has been found in the historical image, the lane tracking module 113 uses the center line to averagely extract 16 reference lines respectively from the line segments Ly1 to Ly16 from the top to the bottom. Then, in the line segments Ly1~Ly16, find the left edge point (such as the point P Left ) and the right edge point (such as the point P Right ) of the left lane line in the current image to the left and right, and then calculate the left edge point and the right edge point. The midpoint (such as point P mid ).

值得一提的是,由於車道線有可能為虛線,因此排除掉沒找到左右邊緣的線段(如線段Ly1以及線段Ly2)後,再從線段Ly3到線段Ly16上獲取所有左邊邊緣點與所有右邊邊緣點的中點。之後,車道追蹤模組113利用最小平方迴歸線與這些中點(例如線段Ly16上的中點Pmid)算出代表新的左側車道線位置的直線方程式Lcur。依此類推,車道追蹤模組113不斷以新的車道線位 置為依據來重複進行一樣的搜尋動作,以達到追蹤車道線的目的。 It is worth mentioning that since the lane line may be a dotted line, the line segments that do not find the left and right edges (such as the line segment Ly1 and the line segment Ly2) are excluded, and then all the left edge points and all the right edge edges are obtained from the line segment Ly3 to the line segment Ly16. The midpoint of the point. Thereafter, the lane tracking module 113 calculates a linear equation Lcur representing the position of the new left lane line using the least square regression line and the midpoints (eg, the midpoint P mid on the line segment Ly16). By analogy, the lane tracking module 113 continuously repeats the same search action based on the new lane line position to achieve the purpose of tracking the lane line.

當車道追蹤模組113取得左側與右側車道線的位置後, 車道追蹤模組113依據車道線的斜率變化來判斷車輛是否變換車道。舉例來說,如果車輛欲切換到左側車道時,目前行駛車道的左側車道線的斜率會從一正值逐漸變大。然後,於切換至左車道的期間,此左側車道線的斜率轉換為負值,再逐漸變大。類似的,當車輛欲切換到右側車道時,目前行駛車道的右側車道線的斜率會從一負值逐漸變小。然後,於切換至右車道的期間,此右側車道線的斜率變成正值,再逐漸變小。由此可見,車道追蹤模組113可利用左右車道線的斜率的變化情形來偵測車輛是否變換車道及其變換的車道位置。若判定車輛切換車道,車道追蹤模組113依據車道線的斜率變化而分析出切換後的目前行駛車道,並據以更新目前行駛車道。 When the lane tracking module 113 obtains the positions of the left and right lane lines, The lane tracking module 113 determines whether the vehicle changes lanes according to the change in the slope of the lane line. For example, if the vehicle wants to switch to the left lane, the slope of the left lane line of the current lane will gradually increase from a positive value. Then, during the transition to the left lane, the slope of this left lane line is converted to a negative value and then gradually becomes larger. Similarly, when the vehicle wants to switch to the right lane, the slope of the right lane line of the current driving lane will gradually decrease from a negative value. Then, during the transition to the right lane, the slope of the right lane line becomes a positive value and then gradually becomes smaller. It can be seen that the lane tracking module 113 can detect whether the vehicle changes the lane and its changed lane position by using the change of the slope of the left and right lane lines. If it is determined that the vehicle switches lanes, the lane tracking module 113 analyzes the current driving lane after the switching according to the slope change of the lane line, and updates the current driving lane accordingly.

接著,於步驟S407,車牌追蹤模組113透過通訊單元400 廣播包括車牌與更新後的目前行駛車道的車道分享資訊,從而使又一車輛接收車牌與更新後的目前行駛車道。換言之,於透過連續取樣的車道影像來不停的進行車道追蹤的期間,車牌追蹤模組113可不斷的將更新後的車道資訊廣播出去,避免因為切換車道而導致電子裝置100將與現實狀況不符的車道資訊分享出去。 Next, in step S407, the license plate tracking module 113 transmits through the communication unit 400. The broadcast includes the license plate sharing information with the updated current driving lane, so that the other vehicle receives the license plate and the updated current driving lane. In other words, during the continuous tracking of the lane image through the continuously sampled lane image, the license plate tracking module 113 can continuously broadcast the updated lane information to avoid the electronic device 100 being inconsistent with the reality due to the lane change. The lane information is shared.

另一方面,若步驟S403判斷為是,代表車道偵測模組111 可直接透過車道偵測程序獲取目前行駛車道。同樣地,於步驟S408中,車道追蹤模組113分析歷史影像與當前影像中至少一車道線 的斜率變化,據以判斷車輛是否變換目前行駛車道。若車輛變換目前行駛車道,車道追蹤模組113更新車輛的目前行駛車道。於步驟S409中,車牌追蹤模組113透過通訊單元400廣播包括車牌與更新後的目前行駛車道的車道分享資訊,從而使又一車輛接收車牌與更新後的目前行駛車道。其中,步驟S408~S409與步驟S406~S407的內容相同或相似,於此不再贅述。 On the other hand, if the determination in step S403 is YES, the representative lane detection module 111 The current driving lane can be obtained directly through the lane detection program. Similarly, in step S408, the lane tracking module 113 analyzes at least one lane line in the historical image and the current image. The slope of the change is based on which it is determined whether the vehicle is changing the current driving lane. If the vehicle changes the current driving lane, the lane tracking module 113 updates the current driving lane of the vehicle. In step S409, the license plate tracking module 113 broadcasts the lane sharing information including the license plate and the updated current driving lane through the communication unit 400, so that the other vehicle receives the license plate and the updated current driving lane. The content of steps S408 to S409 is the same as or similar to that of steps S406 to S407, and details are not described herein again.

值得一提的是,除了利用正前方車輛的車道資訊來獲取目前行駛車道之外,電子裝置100還可利用左前方或右前方的車輛所發送過來的車道分享資訊來獲取目前行駛車道。也就是說,電子裝置100可依據兩車輛之間的相對位置以及車道分相享資訊,分析出車輛的該目前行駛車道。舉例來說,在前一相鄰車輛的車牌因污損或反光等外在因素而導致無法順利辨識出車牌時,電子裝置100可辨識出位於右前側的另一車輛的車牌,並利用右前側的另一車輛所發送出來的車道分享資訊來順利定位到車輛所在的車道位置。 It is worth mentioning that, in addition to using the lane information of the vehicle in front to obtain the current driving lane, the electronic device 100 can also use the lane sharing information sent by the vehicle in the left front or the right front to obtain the current driving lane. That is to say, the electronic device 100 can analyze the current driving lane of the vehicle according to the relative position between the two vehicles and the lane sharing information. For example, when the license plate of the previous adjacent vehicle cannot be successfully recognized due to external factors such as staining or reflection, the electronic device 100 can recognize the license plate of another vehicle on the right front side, and utilize the right front side. The lanes sent by another vehicle share information to smoothly locate the lane location where the vehicle is located.

綜上所述,當車道影像中用以偵測車道的必須資訊不完 整或被障礙物遮蔽時,本發明可藉由車道影像辨識出前車的車牌,據以從前車的車道分享資訊中知道車輛當前的所在位置,以進一步獲取車輛的目前行駛車道。如此一來,藉由精確的車道辨識系統,可提高行車導航系統的精準度與便利性。再者,相較於高精密度的定位系統,本發明所需之硬體設備成本更是低廉,因此可以低成本的設備達到辨識行駛車道的目的。 In summary, when the lane image is used to detect the lane, the necessary information is not complete. When the whole object is obscured by the obstacle, the present invention can recognize the license plate of the preceding vehicle by the lane image, and accordingly, the current location of the vehicle is known from the lane sharing information of the preceding vehicle to further acquire the current driving lane of the vehicle. In this way, the accuracy and convenience of the navigation system can be improved by the accurate lane recognition system. Moreover, compared with the high-precision positioning system, the hardware equipment required by the present invention is cheaper, so that the low-cost device can be used to identify the driving lane.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and any one of ordinary skill in the art can make some changes and refinements without departing from the spirit and scope of the present invention. The scope of the invention is defined by the scope of the appended claims.

S301~S306‧‧‧本發明一實施例之車道辨識方法的各步驟 S301~S306‧‧‧ steps of the lane recognition method according to an embodiment of the present invention

Claims (18)

一種車道辨識方法,適用於配置於一車輛上的一電子裝置,其中該車輛配置有一影像擷取單元與一通訊單元,該車道辨識方法包括:透過該影像擷取單元獲取該車輛前方的至少一車道影像;藉由所述車道影像執行一車道偵測程序;若無法透過該車道偵測程序獲取該車輛的一目前行駛車道,辨識所述車道影像中的一參考車牌;以及透過該通訊單元接收另一車輛所傳送的一車道分享資訊,並比對該參考車牌與該車道分享資訊,從而獲取該目前行駛車道。 A lane recognition method is applicable to an electronic device disposed on a vehicle, wherein the vehicle is configured with an image capturing unit and a communication unit, and the lane recognition method includes: acquiring at least one of the front of the vehicle through the image capturing unit a lane image; performing a lane detection procedure by the lane image; if a lane of the vehicle is not available through the lane detection program, identifying a reference license plate in the lane image; and receiving through the communication unit One lane of information transmitted by another vehicle shares information and shares information with the reference license plate to the lane to obtain the current driving lane. 如申請專利範圍第1項所述的車道辨識方法,其中所述車道影像至少包括一歷史影像與一當前影像,而該車道辨識方法更包括:分析該歷史影像與該當前影像中至少一車道線的一斜率變化,據以判斷該車輛是否變換該目前行駛車道;以及若該車輛變換該目前行駛車道,更新該車輛的該目前行駛車道。 The lane recognition method of claim 1, wherein the lane image includes at least one historical image and a current image, and the lane recognition method further comprises: analyzing the historical image and at least one lane line in the current image. a slope change according to which it is determined whether the vehicle changes the current driving lane; and if the vehicle changes the current driving lane, the current driving lane of the vehicle is updated. 如申請專利範圍第1項所述的車道辨識方法,其中該車道辨識方法更包括:透過該通訊單元廣播包括該車輛的車牌與該目前行駛車道的該車道分享資訊,從而使又一車輛接收該車牌與該目前行駛車道。 The lane recognition method of claim 1, wherein the lane recognition method further comprises: broadcasting, by the communication unit, a license plate including the vehicle and the lane sharing information of the current driving lane, so that another vehicle receives the The license plate is with the current driving lane. 如申請專利範圍第1項所述的車道辨識方法,其中在藉由 所述車道影像執行該車道偵測程序的步驟之前,更包括:透過一車輛定位單元進行定位,藉以獲得該車輛的一車輛位置;以及依據該車輛位置與一地圖資訊,獲取該車輛的一目前行駛道路的一車道數目。 For example, the lane identification method described in claim 1 is Before the step of performing the lane detection procedure, the lane image further includes: positioning by a vehicle positioning unit to obtain a vehicle position of the vehicle; and acquiring a current status of the vehicle according to the vehicle location and a map information The number of lanes on the road. 如申請專利範圍第1項所述的車道辨識方法,其中藉由所述車道影像執行該車道偵測程序的步驟包括:設定所述車道影像對應的至少一興趣區域,將所述車道影像對應的所述興趣區域轉換為至少一灰階影像;對所述灰階影像進行一邊緣偵測與一直線偵測而獲取複數個車道線;以及依據所述車道線計算出該車輛的一目前行駛道路的一車道數目以及該目前行駛車道。 The lane recognition method of claim 1, wherein the step of executing the lane detection program by the lane image comprises: setting at least one region of interest corresponding to the lane image, and corresponding to the lane image Converting the region of interest into at least one grayscale image; performing an edge detection and line detection on the grayscale image to obtain a plurality of lane lines; and calculating a current driving path of the vehicle according to the lane line The number of lanes and the current driving lane. 如申請專利範圍第5項所述的車道辨識方法,其中對所述灰階影像進行該邊緣偵測與該直線偵測而獲取該車道線的步驟包括:對所述灰階影像進行該邊緣偵測與該直線偵測而獲取複數個第一候選直線;依據所述第一候選直線的直線方程式,從所述第一候選直線過濾出複數個第二候選直線;以及計算所述第二候選直線與一參考水平線的複數個交點,依據所述交點之間的距離判斷所述第二候選直線是否為所述車道線。 The lane recognition method of claim 5, wherein the step of acquiring the lane line by performing the edge detection and the line detection on the grayscale image comprises: performing the edge detection on the grayscale image And determining, by the line detection, a plurality of first candidate lines; filtering a plurality of second candidate lines from the first candidate line according to the line equation of the first candidate line; and calculating the second candidate line And a plurality of intersections with a reference horizontal line, determining whether the second candidate straight line is the lane line according to a distance between the intersection points. 如申請專利範圍第1項所述的車道辨識方法,其中若無法透過該車道偵測程序獲取該車輛的該目前行駛車道,辨識所述車道影像中的該參考車牌的步驟包括:對所述車道影像進行一影像前處理,並從所述車道影像定位出該參考車牌的一車牌區域;針對該車牌區域進行字元分割,以劃分出多個字元圖像;以及辨識所述字元圖像,以獲取該參考車牌的複數個車牌字元。 The lane recognition method of claim 1, wherein if the current driving lane of the vehicle cannot be acquired through the lane detection program, the step of recognizing the reference license plate in the lane image comprises: Performing an image pre-processing on the image, and positioning a license plate area of the reference license plate from the lane image; performing character segmentation on the license plate area to divide a plurality of character images; and identifying the character image To obtain a plurality of license plate characters of the reference license plate. 如申請專利範圍第7項所述的車道辨識方法,其中辨識所述字元圖像,以獲取該參考車牌的所述車牌字元的步驟包括:比對所述字元圖像與樣本字元,據以獲取各所述字元圖像所代表的複數個初步判定字元;以及判斷所述初步判定字元是否屬於一特定類別,透過一字元特徵辨識程序重新辨識屬於該特定類別的所述初步判定字元,從而獲取該參考車牌的所述車牌字元。 The lane recognition method of claim 7, wherein the step of recognizing the character image to obtain the license plate character of the reference license plate comprises: comparing the character image and the sample character Obtaining a plurality of preliminary decision characters represented by each of the character images; and determining whether the preliminary decision characters belong to a specific category, and re-identifying the belonging to the specific category by using a character feature recognition program The preliminary decision character is obtained to obtain the license plate character of the reference license plate. 如申請專利範圍第1項所述的車道辨識方法,其中透過該通訊單元接收該另一車輛所傳送的該車道分享資訊,並比對該參考車牌與該車道分享資訊,從而獲取該目前行駛車道的步驟包括:依據該另一車輛與該車輛之間的相對位置以及該車道分相享資訊,分析該車輛的該目前行駛車道。 The lane recognition method of claim 1, wherein the lane sharing information transmitted by the other vehicle is received through the communication unit, and the information is shared with the reference license plate and the lane, thereby acquiring the current driving lane. The step of analyzing includes analyzing the current driving lane of the vehicle according to the relative position between the other vehicle and the vehicle and the lane sharing information. 一種電子裝置,配置於一車輛上,耦接一影像擷取單元與一通訊單元,該電子裝置包括: 一記憶體,儲存有多個模組;以及一處理器,耦接至該通訊單元與該記憶體,以存取並執行儲存單元中記錄的所述模組,所述模組包括:一車道偵測模組,透過該影像擷取單元獲取該車輛前方的至少一車道影像,以及藉由所述車道影像執行一車道偵測程序;以及一車牌辨識模組,若無法透過該車道偵測程序獲取該車輛的一目前行駛車道,該車牌辨識模組辨識所述車道影像中的一參考車牌,其中,該車牌辨識模組透過該通訊單元接收另一車輛所傳送的一車道分享資訊,並比對該參考車牌與該車道分享資訊,從而獲取該目前行駛車道。 An electronic device is disposed on a vehicle and coupled to an image capturing unit and a communication unit. The electronic device includes: a memory having a plurality of modules stored therein; and a processor coupled to the communication unit and the memory to access and execute the module recorded in the storage unit, the module comprising: a lane The detection module obtains at least one lane image in front of the vehicle through the image capturing unit, and performs a lane detection program by using the lane image; and a license plate recognition module, if the lane detection program cannot pass through the lane detection program Obtaining a current driving lane of the vehicle, the license plate recognition module identifying a reference license plate in the lane image, wherein the license plate recognition module receives a lane sharing information transmitted by another vehicle through the communication unit, and compares The reference license plate shares information with the lane to obtain the current driving lane. 如申請專利範圍第10項所述的電子裝置,其中所述車道影像至少包括一歷史影像與一當前影像,且所述模組更包括:一車道追蹤模組,分析該歷史影像與該當前影像中至少一車道線的一斜率變化,據以判斷該車輛是否變換該目前行駛車道其中,若該車輛變換該目前行駛車道,該車道追蹤模組更新該車輛的該目前行駛車道。 The electronic device of claim 10, wherein the lane image includes at least one historical image and a current image, and the module further comprises: a lane tracking module, analyzing the historical image and the current image A slope change of at least one lane line is determined to determine whether the vehicle changes the current driving lane. If the vehicle changes the current driving lane, the lane tracking module updates the current driving lane of the vehicle. 如申請專利範圍第11項所述的電子裝置,其中該車道追蹤模組透過該通訊單元廣播包括該車輛的車牌與該目前行駛車道的該車道分享資訊,從而使又一車輛接收該車牌與該目前行駛車道。 The electronic device of claim 11, wherein the lane tracking module broadcasts, by the communication unit, a license plate including the license plate of the vehicle and the lane of the current driving lane, so that another vehicle receives the license plate and the vehicle Currently driving lanes. 如申請專利範圍第10項所述的電子裝置,其中該車道偵測模組透過一車輛定位單元進行定位,藉以獲得該車輛的一車輛位置,以及依據該車輛位置與一地圖資訊,獲取該車輛的一目前行駛道路的一車道數目。 The electronic device of claim 10, wherein the lane detection module is positioned by a vehicle positioning unit to obtain a vehicle position of the vehicle, and obtain the vehicle according to the vehicle position and a map information. The number of one lane of a currently traveling road. 如申請專利範圍第10項所述的電子裝置,其中該車道偵測模組設定所述車道影像對應的至少一興趣區域,將所述車道影像對應的所述興趣區域轉換為至少一灰階影像,並對所述灰階影像進行一邊緣偵測與一直線偵測而獲取複數個車道線,其中,該車道偵測模組依據所述車道線計算出該車輛的一目前行駛道路的一車道數目以及該目前行駛車道。 The electronic device of claim 10, wherein the lane detection module sets at least one region of interest corresponding to the lane image, and converts the region of interest corresponding to the lane image into at least one grayscale image. And performing an edge detection and a line detection on the grayscale image to obtain a plurality of lane lines, wherein the lane detection module calculates a number of lanes of a current traveling road of the vehicle according to the lane line And the current driving lane. 如申請專利範圍第14項所述的電子裝置,其中該車道偵測模組對所述灰階影像進行該邊緣偵測與該直線偵測而獲取複數個第一候選直線,其中,依據所述第一候選直線的直線方程式,該車道偵測模組從所述第一候選直線過濾出複數個第二候選直線,並計算所述第二候選直線與一參考水平線的複數個交點,以及依據所述交點之間的距離判斷所述第二候選直線是否為所述車道線。 The electronic device of claim 14, wherein the lane detection module performs the edge detection and the line detection on the grayscale image to obtain a plurality of first candidate lines, wherein, according to the a straight line equation of the first candidate straight line, the lane detecting module filters a plurality of second candidate straight lines from the first candidate straight line, and calculates a plurality of intersection points of the second candidate straight line and a reference horizontal line, and a basis The distance between the intersection points determines whether the second candidate line is the lane line. 如申請專利範圍第10項所述的電子裝置,其中該車牌辨識模組對所述車道影像進行一影像前處理,並從所述車道影像定位出該參考車牌的一車牌區域,其中,該車牌辨識模組針對該車牌區域進行字元分割,以劃分出多個字元圖像, 其中,該車牌辨識模組辨識所述字元圖像,以獲取該參考車牌的複數個車牌字元。 The electronic device of claim 10, wherein the license plate recognition module performs an image pre-processing on the lane image, and locates a license plate area of the reference license plate from the lane image, wherein the license plate region The recognition module performs character segmentation on the license plate area to divide a plurality of character images. The license plate recognition module recognizes the character image to obtain a plurality of license plate characters of the reference license plate. 如申請專利範圍第16項所述的電子裝置,其中該車牌辨識模組比對所述字元圖像與樣本字元,據以獲取各所述字元圖像所代表的複數個初步判定字元,其中,該車牌辨識模組判斷所述初步判定字元是否屬於一特定類別,透過一字元特徵辨識程序重新辨識屬於該特定類別的所述初步判定字元,從而獲取該參考車牌的所述車牌字元。 The electronic device of claim 16, wherein the license plate recognition module compares the character image and the sample character to obtain a plurality of preliminary determination words represented by each of the character images. And the license plate recognition module determines whether the preliminary determination character belongs to a specific category, and re-identifies the preliminary determination character belonging to the specific category through a character recognition program, thereby acquiring the reference license plate The license plate character. 如申請專利範圍第10項所述的電子裝置,其中該車牌辨識模組依據該另一車輛與該車輛之間的相對位置以及該車道分相享資訊,分析該車輛的該目前行駛車道。 The electronic device of claim 10, wherein the license plate recognition module analyzes the current driving lane of the vehicle according to the relative position between the other vehicle and the vehicle and the lane sharing information.
TW103100209A 2014-01-03 2014-01-03 Lane recognition method and electronic device using the same TWI561419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103100209A TWI561419B (en) 2014-01-03 2014-01-03 Lane recognition method and electronic device using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103100209A TWI561419B (en) 2014-01-03 2014-01-03 Lane recognition method and electronic device using the same

Publications (2)

Publication Number Publication Date
TW201527156A true TW201527156A (en) 2015-07-16
TWI561419B TWI561419B (en) 2016-12-11

Family

ID=54198057

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103100209A TWI561419B (en) 2014-01-03 2014-01-03 Lane recognition method and electronic device using the same

Country Status (1)

Country Link
TW (1) TWI561419B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765816A (en) * 2018-07-26 2020-02-07 浙江宇视科技有限公司 Vehicle line-pressing violation detection method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200944698A (en) * 2008-04-25 2009-11-01 Li-Chu Chang Reflector for energy-saving lamp and assembly method
TWM452566U (en) * 2012-11-30 2013-05-01 Hua Chuang Automobile Information Technical Ct Co Ltd Road condition sharing device and road condition sharing server

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765816A (en) * 2018-07-26 2020-02-07 浙江宇视科技有限公司 Vehicle line-pressing violation detection method and device and electronic equipment
CN110765816B (en) * 2018-07-26 2022-08-23 浙江宇视科技有限公司 Vehicle line-pressing violation detection method and device and electronic equipment

Also Published As

Publication number Publication date
TWI561419B (en) 2016-12-11

Similar Documents

Publication Publication Date Title
Grassi et al. Parkmaster: An in-vehicle, edge-based video analytics service for detecting open parking spaces in urban environments
Wu et al. Lane-mark extraction for automobiles under complex conditions
US9846812B2 (en) Image recognition system for a vehicle and corresponding method
US8184859B2 (en) Road marking recognition apparatus and method
US10081308B2 (en) Image-based vehicle detection and distance measuring method and apparatus
CN110929655B (en) Lane line identification method in driving process, terminal device and storage medium
US20100110193A1 (en) Lane recognition device, vehicle, lane recognition method, and lane recognition program
CN111149131B (en) Dividing line recognition device
WO2020154990A1 (en) Target object motion state detection method and device, and storage medium
US20200285913A1 (en) Method for training and using a neural network to detect ego part position
CN111539907B (en) Image processing method and device for target detection
US10235579B2 (en) Vanishing point correction apparatus and method
US20090201370A1 (en) Traveling Lane Detector
CN110163039B (en) Method, apparatus, storage medium, and processor for determining vehicle driving state
JP2016122320A (en) Travel section line recognition device
US11645783B2 (en) Calibration apparatus and calibration method
KR20160088986A (en) Lane detection method using disparity based on vanishing point
CN110211172B (en) Fast ground plane discrimination in stereoscopic images
CN113807293B (en) Deceleration strip detection method, deceleration strip detection system, deceleration strip detection equipment and computer readable storage medium
EP3631675A1 (en) Advanced driver assistance system and method
JP2018073275A (en) Image recognition device
TW201536609A (en) Obstacle detection device
TW201527156A (en) Lane recognition method and electronic device using the same
CN108256510B (en) Road edge line detection method and device and terminal
KR101595317B1 (en) Precise positioning of the vehicle for detecting a road surface display method and system

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees