TW201713920A - Pavement detecting method, pavement detecting device and pavement detecting system - Google Patents
Pavement detecting method, pavement detecting device and pavement detecting system Download PDFInfo
- Publication number
- TW201713920A TW201713920A TW104133149A TW104133149A TW201713920A TW 201713920 A TW201713920 A TW 201713920A TW 104133149 A TW104133149 A TW 104133149A TW 104133149 A TW104133149 A TW 104133149A TW 201713920 A TW201713920 A TW 201713920A
- Authority
- TW
- Taiwan
- Prior art keywords
- road surface
- image
- tested
- projection
- linear laser
- Prior art date
Links
Landscapes
- Image Analysis (AREA)
Abstract
Description
本發明是有關於一種檢測方法、裝置與系統,且特別是有關於一種路面檢測方法、裝置與系統。The present invention relates to a detection method, apparatus and system, and more particularly to a road surface detection method, apparatus and system.
道路的平整與否,除了關係到用路人在舒適度上的感受外,與交通安全更是息息相關。現今常用的道路平整度檢測方法是使用直規,人工計算路面任一檢驗單位內每一點與直規的高低差,並且計算該高低差的標準差以獲得平整度的資訊。然而,這樣的方法僅能適用於新鋪道路時檢驗是否符合路平標準的檢測,並不能在用路人行走或駕駛時即時的提供前方路面的安全資訊。Whether the road is level or not is not only related to the feeling of comfort of passers-by, but also related to traffic safety. The commonly used road flatness detection method is to use a straight gauge to manually calculate the height difference between each point in the inspection unit and the straight gauge, and calculate the standard deviation of the height difference to obtain the flatness information. However, such a method can only be applied to the inspection of the road level when the road is newly paved, and it is not possible to provide the safety information of the road ahead in time when the passerby is walking or driving.
另一方面,僅憑用路人的眼睛或感覺來判斷道路是否平整是不夠精準的。更詳細而言,用路人很可能無法誤判道路的平整程度,進而導致意外的發生。因此,如何能夠利用現有技術來即時的檢測道路是否平整,以提供用路人即時的資訊是個相當值得研究的課題。On the other hand, it is not accurate enough to judge whether the road is flat or not by using the eyes or feelings of passers-by. In more detail, the passers-by may not be able to misjudge the level of the road, which may lead to accidents. Therefore, how to use the existing technology to instantly detect whether the road is flat or not to provide real-time information for passers-by is a subject worthy of study.
基於上述,本發明提出一種路面檢測方法、裝置與系統,在附有光學攝像鏡頭的智慧型電子裝置與雷射光源的搭配之下,可使光學攝像鏡頭得到清晰的影像,並且在較低的計算複雜度及計算量之下得到良好的道路檢測結果。Based on the above, the present invention provides a road surface detecting method, apparatus and system. Under the combination of a smart electronic device with an optical camera lens and a laser light source, the optical camera lens can obtain a clear image and is low. Good road test results are obtained under computational complexity and calculation.
本發明提供一種路面檢測方法,適用於檢測待測路面。此方法包括下列步驟。發射線狀雷射於待測路面,以使待測路面包括線狀雷射的投影。取得待測路面的影像。藉由所取得的影像判斷線狀雷射的投影是否為直線。倘若線狀雷射的投影為直線,判定待測路面為平整路面。倘若線狀雷射的投影不為直線,判定待測路面為非平整路面。The invention provides a road surface detecting method suitable for detecting a road surface to be tested. This method includes the following steps. A linear laser is emitted on the road surface to be tested, so that the road surface to be tested includes a projection of a linear laser. Obtain an image of the road surface to be tested. Whether the projection of the linear laser is a straight line is determined by the acquired image. If the projection of the linear laser is a straight line, it is determined that the road surface to be tested is a flat road surface. If the projection of the linear laser is not a straight line, it is determined that the road surface to be tested is a non-flat road surface.
本發明提供一種路面檢測裝置,適用於檢測待測路面。此裝置包括雷射發射器、影像擷取裝置以及處理器。雷射發射器用以發射線狀雷射於待測路面,以使待測路面包括線狀雷射的投影。影像擷取裝置用以取得待測路面的影像。處理器從影像擷取裝置用以取得影像,並且藉由所取得的影像判斷線狀雷射的投影是否為直線。倘若處理器判斷線狀雷射的投影為直線,則處理器判定待測路面為平整路面,倘若處理器判斷線狀雷射的投影不為直線,則處理器判定待測路面為非平整路面。The invention provides a road surface detecting device suitable for detecting a road surface to be tested. The device includes a laser emitter, an image capture device, and a processor. The laser emitter is used to emit a linear laser on the road surface to be tested, so that the road surface to be tested includes a projection of the linear laser. The image capturing device is used to obtain an image of the road surface to be tested. The processor uses the image capturing device to acquire an image, and determines whether the projection of the linear laser is a straight line by the acquired image. If the processor determines that the projection of the linear laser is a straight line, the processor determines that the road surface to be tested is a flat road surface. If the processor determines that the projection of the linear laser beam is not a straight line, the processor determines that the road surface to be tested is a non-flat road surface.
本發明提供一種路面檢測系統,適用於檢測待測路面,此系統包括雷射發射器與電子裝置,其中電子裝置包括影像擷取器與處理器。雷射發射器用以發射線狀雷射於待測路面,以使待測路面包括線狀雷射的投影。影像擷取裝置用以取得待測路面的影像。處理器用以從影像擷取裝置取得影像,並且藉由所取得的影像判斷線狀雷射的投影是否為直線。倘若處理器判斷線狀雷射的投影為直線,則處理器判定待測路面為平整路面。倘若處理器判斷線狀雷射的投影不為直線,則處理器判定待測路面為非平整路面。The invention provides a road surface detecting system suitable for detecting a road surface to be tested. The system comprises a laser emitter and an electronic device, wherein the electronic device comprises an image capturing device and a processor. The laser emitter is used to emit a linear laser on the road surface to be tested, so that the road surface to be tested includes a projection of the linear laser. The image capturing device is used to obtain an image of the road surface to be tested. The processor is configured to acquire an image from the image capturing device, and determine, by the acquired image, whether the projection of the linear laser is a straight line. If the processor determines that the projection of the linear laser is a straight line, the processor determines that the road surface to be tested is a flat road surface. If the processor determines that the projection of the linear laser is not a straight line, the processor determines that the road surface to be tested is a non-flat road surface.
基於上述,透過前述的路面檢測方法、裝置以及系統,能夠在多數的環境下即時的判定待測路面是否平整,並且具有良好的檢測效能。Based on the above, the above-described road surface detecting method, apparatus, and system can instantly determine whether the road surface to be tested is flat in a large number of environments, and has good detection performance.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the invention will be apparent from the following description.
圖1A是根據本發明的一範例實施例所繪示的路面檢測裝置的方塊圖。圖1B是根據本發明的一範例實施例所繪示的處理器的方塊圖。圖1C是根據本發明的一範例實施例所繪示的路面檢測系統的方塊圖。FIG. 1A is a block diagram of a road surface detecting apparatus according to an exemplary embodiment of the invention. FIG. 1B is a block diagram of a processor according to an exemplary embodiment of the invention. FIG. 1C is a block diagram of a road surface detecting system according to an exemplary embodiment of the invention.
請參照圖1A,路面檢測裝置100包括雷射發射器110、影像擷取裝置130與處理器150。在本範例實施例中,雷射發射器110用以發射線狀雷射,並且雷射發射器110使用波長650奈米(nm)的紅光雷射光源,搭配柱狀透鏡來產生線狀雷射,但本發明不限於此。在本發明的另一實施例中,雷射發射器110也可以是使用532奈米(nm)的綠光雷射光源搭配特殊構造的平面鏡來產生線狀雷射。本發明並不在此限制雷射發射器110的雷射光源與其產生線狀雷射的手段。在本範例實施例中,雷射發射器110耦接至處理器150,並且由處理器150控制雷射發射器110的運作。值得注意的是,在本發明的另一實施例中,雷射發射器110則獨立於處理器150的控制外而運作或者被操作。Referring to FIG. 1A, the road surface detecting device 100 includes a laser emitter 110, an image capturing device 130, and a processor 150. In the present exemplary embodiment, the laser emitter 110 is used to emit a linear laser, and the laser emitter 110 uses a red laser light source having a wavelength of 650 nanometers (nm), which is combined with a lenticular lens to generate a linear lightning. Shot, but the invention is not limited thereto. In another embodiment of the invention, the laser emitter 110 may also use a 532 nanometer (nm) green laser source with a specially constructed plane mirror to produce a linear laser. The invention does not limit the laser source of the laser emitter 110 and the means by which it produces a linear laser. In the present exemplary embodiment, the laser emitter 110 is coupled to the processor 150 and the processor 150 controls the operation of the laser emitter 110. It is noted that in another embodiment of the invention, the laser emitter 110 operates or is operated independently of the control of the processor 150.
在本範例實施例中,影像擷取裝置130耦接至處理器150,用以擷取影像。影像擷取裝置130例如是包括電荷耦合元件(Charge Coupled Device, CCD)或互補金氧半導體影像感測器(Complementary Metal-Oxide Semiconductor Image Sensor, CMOS Image Sensor)。In the exemplary embodiment, the image capturing device 130 is coupled to the processor 150 for capturing images. The image capturing device 130 includes, for example, a Charge Coupled Device (CCD) or a Complementary Metal-Oxide Semiconductor Image Sensor (CMOS Image Sensor).
在本範例實施例中,處理器150分別耦接於雷射發射器110與影像擷取裝置130,用以控制雷射發射器110與影像擷取裝置130的運作以及從影像擷取裝置130取得其所擷取的影像。處理器150例如是微控制器(micro-controller)、嵌入式控制器(embedded controller)、中央處理器(central processing unit, CPU)或類似的元件,而本發明不在此限制。參照圖1B,於本範例實施例中,處理器150更包括色彩過濾模組151、影像處理模組153與判斷模組155。In the present exemplary embodiment, the processor 150 is coupled to the laser emitter 110 and the image capturing device 130 for controlling the operation of the laser emitter 110 and the image capturing device 130 and obtaining the image capturing device 130 from the image capturing device 130. The image it captured. The processor 150 is, for example, a micro-controller, an embedded controller, a central processing unit (CPU) or the like, and the present invention is not limited thereto. Referring to FIG. 1B , in the exemplary embodiment, the processor 150 further includes a color filter module 151 , an image processing module 153 , and a determination module 155 .
在本發明的另一範例實施例中,路面檢測裝置100可更包括警示裝置170。警示裝置170耦接至處理器150並且由處理器150來控制其運作。具體而言,警示裝置170例如是以光源或喇叭等裝置來實現。當警示裝置170為光源時,處理器150可以利用警示裝置170來發出閃爍光以作為警示。當警示裝置170為喇叭時,處理器150則可利用警示裝置170來發出警示音以作為警示。In another exemplary embodiment of the present invention, the road surface detecting device 100 may further include a warning device 170. The alert device 170 is coupled to the processor 150 and is controlled by the processor 150 for its operation. Specifically, the alert device 170 is implemented, for example, by a device such as a light source or a horn. When the alert device 170 is a light source, the processor 150 can utilize the alert device 170 to emit flashing light as an alert. When the alert device 170 is a horn, the processor 150 can use the alert device 170 to sound a warning tone as an alert.
值得注意的是,圖1A所繪示的路面檢測裝置100可實現於既有的電子裝置,例如是智慧型手機、平板電腦、筆記型電腦等。換言之,雷射發射器110、影像擷取裝置130、處理器150與警示裝置170都內建於電子裝置之中,但本發明不限於此。在本發明的另一範例實施例中,本發明也可以是如圖1C所繪示,由包括影像擷取裝置130與處理器150的電子裝置10,搭配獨立於電子裝置10之外的雷射發射器110,以路面檢測系統1000的型式來實作。具體而言,於本範例實施例中,路面檢測系統1000的雷射發射器110例如是雷射筆,而電子裝置10則例如是智慧型手機或平板電腦。It should be noted that the road surface detecting device 100 illustrated in FIG. 1A can be implemented in an existing electronic device, such as a smart phone, a tablet computer, a notebook computer, or the like. In other words, the laser emitter 110, the image capturing device 130, the processor 150, and the alerting device 170 are all built into the electronic device, but the invention is not limited thereto. In another exemplary embodiment of the present invention, the present invention may also be as shown in FIG. 1C, and the electronic device 10 including the image capturing device 130 and the processor 150 is coupled with a laser independent of the electronic device 10. The transmitter 110 is implemented in the form of a road surface inspection system 1000. Specifically, in the present exemplary embodiment, the laser emitter 110 of the road surface detecting system 1000 is, for example, a laser pen, and the electronic device 10 is, for example, a smart phone or a tablet computer.
圖2是根據本發明的一範例實施例所繪示的路面檢測方法的流程圖。本範例實施例的路面檢測方法適用於圖1A、圖1B與圖1C所提出的路面檢測裝置100與路面檢測系統1000。參照圖1A、圖1B、圖1C與圖2,於步驟S201中,雷射發射器110會發射線狀雷射於待測路面,以使待測路面包括線狀雷射的投影。接著,於步驟S203中,影像擷取裝置130會取得待測路面的影像。2 is a flow chart of a road surface detecting method according to an exemplary embodiment of the invention. The road surface detecting method of the present exemplary embodiment is applied to the road surface detecting device 100 and the road surface detecting system 1000 proposed in FIGS. 1A, 1B, and 1C. Referring to FIG. 1A, FIG. 1B, FIG. 1C and FIG. 2, in step S201, the laser emitter 110 emits a linear laser on the road surface to be tested, so that the road surface to be tested includes a projection of a linear laser. Next, in step S203, the image capturing device 130 obtains an image of the road surface to be tested.
圖3為根據本發明的一範例實施例所繪示的待測路面的影像的示意圖。參照圖3,雷射發射器110發射線狀雷射於待測路面,以使線狀雷射在待測路面上形成一個投影。接著,處理器150控制影像擷取裝置130擷取待測路面的影像300。影像300至少包括待測路面310與線狀雷射的投影330。在不同的實施例中,影像300更可包括護欄、樹木或天空等任何出現在影像擷取裝置130的影像擷取範圍中的物件或環境。處理器150從影像擷取裝置130取得影像300以進行路面檢測的後續程序。FIG. 3 is a schematic diagram of an image of a road surface to be tested according to an exemplary embodiment of the invention. Referring to FIG. 3, the laser emitter 110 emits a linear laser beam to the road surface to be tested, so that the linear laser beam forms a projection on the road surface to be tested. Next, the processor 150 controls the image capturing device 130 to capture the image 300 of the road surface to be tested. The image 300 includes at least a projection 330 of the road surface 310 to be tested and a linear laser. In various embodiments, the image 300 may further include any object or environment that appears in the image capturing range of the image capturing device 130, such as a guardrail, a tree, or a sky. The processor 150 acquires the image 300 from the image capturing device 130 to perform a subsequent process of road surface detection.
重新參照圖1A、圖1B、圖1C與圖2,在步驟S205中,處理器150會藉由影像擷取裝置所取得的影像,判斷線狀雷射的投影是否為直線。圖4是根據本發明的一範例實施例所繪示的藉由影像判斷線狀雷射的投影是否為直線的流程圖。如圖4所示,在步驟S2051中,處理器150的色彩過濾模組151會依據其所設定的波長保留範圍過濾影像為目標影像。接著,在S2053中,處理器150的影像處理模組153會對前述目標影像進行前置影像處理,以得到包括待測區域的二元影像。值得注意的是,於本範例實施例中,前置影像處理包括二值化處理與邊緣檢測。最後,於步驟S2055中,處理器150的判斷模組155會藉由所得到的二元影像來判斷線狀雷射的投影330是否為直線。Referring back to FIG. 1A, FIG. 1B, FIG. 1C and FIG. 2, in step S205, the processor 150 determines whether the projection of the linear laser is a straight line by the image acquired by the image capturing device. FIG. 4 is a flow chart for determining whether a projection of a linear laser is a straight line by an image according to an exemplary embodiment of the invention. As shown in FIG. 4, in step S2051, the color filter module 151 of the processor 150 filters the image as a target image according to the set wavelength retention range. Next, in S2053, the image processing module 153 of the processor 150 performs pre-image processing on the target image to obtain a binary image including the area to be tested. It should be noted that in the exemplary embodiment, the pre-image processing includes binarization processing and edge detection. Finally, in step S2055, the determination module 155 of the processor 150 determines whether the projection 330 of the linear laser is a straight line by the obtained binary image.
圖5為根據本發明的一範例實施例所繪示的目標影像的示意圖。參照圖5,在本範例實施例中,雷射發射器110的雷射光源例如為650奈米(nm)的紅光雷射光源,因此處理器150在接收到影像擷取裝置130所擷取的影像300後,色彩過濾模組151會以650奈米(nm)為中心設置一段容錯緩衝的波長保留範圍,例如是645奈米至655奈米,並且使用此波長保留範圍過濾影像300,藉以濾除影像300中對應上述波長保留範圍以外的顏色。換言之,色彩過濾模組151在本範例實施例中是用以濾除影像300中的其它成分以保留線狀雷射的投影330。於本範例實施例中,經過色彩過濾模組151過濾之後,例如是得到僅包含線狀雷射的投影330的目標影像500。在本範例實施例中,目標影像500的像素的顏色若不是對應至波長保留範圍,則處理器150的色彩過濾模組151將前述像素設定為黑色,但本發明不在此限制。在本發明的另一實施例中,色彩過濾模組151也可以把前述像素設定為白色或其他顏色。FIG. 5 is a schematic diagram of a target image according to an exemplary embodiment of the invention. Referring to FIG. 5, in the present exemplary embodiment, the laser light source of the laser emitter 110 is, for example, a 650 nanometer (nm) red laser light source, so the processor 150 receives the image capturing device 130. After the image 300, the color filter module 151 sets a wavelength-limited range of fault-tolerant buffer centering on 650 nanometers (nm), for example, 645 nm to 655 nm, and filters the image 300 using the wavelength retention range. The color in the image 300 corresponding to the wavelength retention range mentioned above is filtered out. In other words, the color filter module 151 is used in the present exemplary embodiment to filter out other components in the image 300 to preserve the projection 330 of the linear laser. In the present exemplary embodiment, after filtering by the color filter module 151, for example, a target image 500 of a projection 330 containing only a linear laser is obtained. In the present exemplary embodiment, if the color of the pixel of the target image 500 does not correspond to the wavelength retention range, the color filter module 151 of the processor 150 sets the pixel to be black, but the present invention is not limited thereto. In another embodiment of the present invention, the color filter module 151 can also set the aforementioned pixels to be white or other colors.
如同圖4所示,在取得目標影像500後,影像處理模組153接著對目標影像500進行前置影像處理。圖6A是根據本發明的一範例實施例所繪示的灰階影像的示意圖。圖6B是根據本發明的一範例實施例所繪示的二值化影像的示意圖。圖6C是根據本發明的一範例實施例所繪示的二元影像的示意圖。As shown in FIG. 4, after acquiring the target image 500, the image processing module 153 then performs pre-image processing on the target image 500. FIG. 6A is a schematic diagram of a grayscale image according to an exemplary embodiment of the invention. FIG. 6B is a schematic diagram of a binarized image according to an exemplary embodiment of the invention. FIG. 6C is a schematic diagram of a binary image according to an exemplary embodiment of the invention.
首先,請參照圖6A,在色彩過濾模組151將影像300過濾為目標影像500後,影像處理模組153會將目標影像500轉為灰階影像600。具體來說,在本範例實施例中,影像處理模組153會將目標影像500中每一像素的紅綠藍(RGB)數值,利用一個轉換公式轉換為灰階值。轉換公式例如是0.2999*r+0.587*g+0.114*b。值得注意的是,r、g、b分別對應至RGB色碼的R值、G值以及B值。在本發明的不同實施例中,影像處理模組153也可以是利用其他的轉換公式將目標影像500轉為灰階影像,本發明不在此限制灰階轉換的方式。First, referring to FIG. 6A, after the color filter module 151 filters the image 300 into the target image 500, the image processing module 153 converts the target image 500 into a grayscale image 600. Specifically, in the exemplary embodiment, the image processing module 153 converts the red, green, and blue (RGB) values of each pixel in the target image 500 into grayscale values using a conversion formula. The conversion formula is, for example, 0.2999*r+0.587*g+0.114*b. It is worth noting that r, g, and b correspond to the R value, the G value, and the B value of the RGB color code, respectively. In the different embodiments of the present invention, the image processing module 153 may also convert the target image 500 into a grayscale image by using other conversion formulas, and the present invention does not limit the manner of grayscale conversion.
請接著參照圖6B,在本範例實施例中,在影像處理模組153將目標影像500轉為灰階影像600後,接著會將灰階影像600進行二值化處理轉為二值化影像602。具體來說,影像處理模組153會設置一個灰度門檻值,用以將灰階影像600中每一像素進行二值化處理,其中設置灰度門檻值的方法例如有雙峰法(Mode Method)、P參數法(P-tile Method)、迭代法(Iterative Method)或歐蘇法(Otsu Method)等,本發明不在此限制。在本範例實施例中,影像處理模組153會將灰階影像600中灰階值大於所設定灰度門檻值的像素設定為灰度極大值,例如白色,並且將灰階影像600中灰度值小於所設定灰度門檻值的像素設定為灰度極小值,例如黑色,進而得到二值化影像602。Referring to FIG. 6B, in the exemplary embodiment, after the image processing module 153 converts the target image 500 into the grayscale image 600, the grayscale image 600 is then binarized into a binarized image 602. . Specifically, the image processing module 153 sets a grayscale threshold value for binarizing each pixel in the grayscale image 600. The method for setting the grayscale threshold is, for example, a bimodal method. The present invention is not limited thereto, the P-tile method, the Iterative Method, or the Otsu Method. In the exemplary embodiment, the image processing module 153 sets the grayscale image in the grayscale image 600 to a grayscale maximum value, such as white, and grayscale in the grayscale image 600. A pixel whose value is smaller than the set grayscale threshold value is set to a grayscale minimum value, for example, black, thereby obtaining a binarized image 602.
請接著參照圖6C,在影像處理模組153將灰階影像600轉為二值化影像602後,接著會將此二值化影像602作邊緣檢測,以減少數據量並且找出二值化影像602中對應於線狀雷射的投影330的邊界。在本發明的一實施例中,影像處理模組153例如是利用Canny邊緣檢測元(Canny Edge Detector)來作邊緣檢測,但本發明不在此限制邊緣檢測的方法。在不同的實施例中,也可以是使用Roberts Cross運算元(Roberts Cross Operator)、Prewitt運算元(Prewitt Operator)或其它類似的運算元來進行邊緣檢測。在本範例實施例中,二值化影像602經過邊緣檢測後,將得到二元影像604。Referring to FIG. 6C, after the image processing module 153 converts the grayscale image 600 into the binarized image 602, the binarized image 602 is then edge-detected to reduce the amount of data and find the binarized image. The boundary of the projection 330 corresponding to the linear laser in 602. In an embodiment of the present invention, the image processing module 153 uses the Canny Edge Detector for edge detection, for example, but the present invention does not limit the edge detection method. In various embodiments, it is also possible to perform edge detection using a Roberts Cross Operator, a Prewitt Operator, or other similar operand. In the present exemplary embodiment, after the binarized image 602 passes the edge detection, the binary image 604 is obtained.
如圖6C所示,在本範例實施例中,經過前置影像處理所得到的二元影像604包括對應線狀雷射的投影330的待測區域A以及待測邊緣B。接著,判斷模組155會藉由二元影像604來判斷線狀雷射的投影330是否為直線。As shown in FIG. 6C, in the present exemplary embodiment, the binary image 604 obtained by the pre-image processing includes the area to be tested A corresponding to the projection 330 of the linear laser and the edge B to be tested. Next, the determination module 155 determines whether the projection 330 of the linear laser is a straight line by the binary image 604.
於本發明的一範例實施例中,判斷模組155對二元影像604使用霍夫線轉換(Hough Line Transformation)來判斷線狀雷射的投影330是否為直線。圖7是根據本發明的一範例實施例所繪示的藉由二元影像判斷線狀雷射的投影是否為直線的流程圖。圖8是根據本發明的一範例實施例所繪示的霍夫線轉換檢測方法的示意圖。參照圖7與圖8,首先,於步驟S701,判斷模組155會對二元影像604作霍夫線轉換以檢測二元影像604。接著,於步驟S703中,判斷模組155會判斷二元影像604中的待測區域A是符合單一線段或是多條線段。倘若判斷的結果為單一線段,則於步驟S705中,判斷模組155會判定線狀雷射的投影330為直線。倘若判斷結果為多條線段,則於步驟S707中,判斷模組155會判定線狀雷射的投影330不為直線。In an exemplary embodiment of the present invention, the determination module 155 uses Hough Line Transformation on the binary image 604 to determine whether the projection 330 of the linear laser is a straight line. FIG. 7 is a flow chart showing whether a projection of a linear laser is a straight line by a binary image according to an exemplary embodiment of the present invention. FIG. 8 is a schematic diagram of a Hough line conversion detecting method according to an exemplary embodiment of the present invention. Referring to FIG. 7 and FIG. 8, first, in step S701, the determination module 155 performs a Hough line conversion on the binary image 604 to detect the binary image 604. Next, in step S703, the determining module 155 determines whether the area A to be tested in the binary image 604 conforms to a single line segment or a plurality of line segments. If the result of the determination is a single line segment, then in step S705, the determination module 155 determines that the projection 330 of the linear laser is a straight line. If the result of the determination is a plurality of line segments, then in step S707, the determination module 155 determines that the projection 330 of the linear laser is not a straight line.
舉例來說,圖8(a)相同於二元影像604,其中包括待測區域A1,而判斷模組155對其使用霍夫線轉換方法檢測圖8(a)的影像後,可以得到如圖8(b)的影像。也就是說,在圖8(a)經過霍夫線轉換方法檢測之後,可以判斷出其中包括L1與L2兩條平行線。然而,由於具有寬度的單一線段經過邊緣檢測後會包括兩條平行線,因此可以判定圖8(a)中的待測區域A1是符合單一線段的標準,故判斷模組155判定待測區域A1所對應的線狀雷射的投影為直線。值得一提的是,在本範例實施例中,由於使用的光源為線狀雷射,因此待測區域A1雖具有寬度,但其寬度並不足以使霍夫線轉換的檢測判定待測區域A1的兩端點為直線。For example, FIG. 8(a) is the same as the binary image 604, which includes the area A1 to be tested, and the determination module 155 can detect the image of FIG. 8(a) by using the Hough line conversion method. Image of 8(b). That is to say, after the detection by the Hough line conversion method in Fig. 8(a), it can be judged that two parallel lines including L1 and L2 are included. However, since a single line segment having a width includes two parallel lines after edge detection, it can be determined that the area to be tested A1 in FIG. 8(a) is a standard conforming to a single line segment, so the determination module 155 determines the area A1 to be tested. The projection of the corresponding linear laser is a straight line. It should be noted that, in the present exemplary embodiment, since the light source used is a linear laser, the area to be tested A1 has a width, but the width thereof is not enough for the detection of the Hough line to determine the area A1 to be tested. The ends of the points are straight lines.
舉另一實施例來說,倘若二元影像是如圖8(c)所示,在待測區域A2中有部分凹陷,則在判斷模組155對其使用霍夫線轉換方法檢測圖8(c)後,可以得到如圖8(d)的影像。也就是說,在圖8(c)經過霍夫線轉換方法檢測之後,可以判斷出其中包括L1與L2以及L3與L4兩組平行線。根據上述的分析,兩組平行線是對應於具有寬度的兩條線段,因此可以判定圖8(c)中的待測區域A2是符合多條線段,並不符合單一線段的標準。此時,判斷模組155判定待測區域A2所對應的線狀雷射的投影不為直線。In another embodiment, if the binary image is partially recessed in the area to be tested A2 as shown in FIG. 8(c), the determination module 155 detects the image using the Hough line conversion method. After c), an image as shown in Fig. 8(d) can be obtained. That is to say, after the detection by the Hough line conversion method in FIG. 8(c), it can be judged that L1 and L2 and L3 and L4 are parallel lines. According to the above analysis, the two sets of parallel lines correspond to the two line segments having the width, so it can be determined that the area to be tested A2 in Fig. 8(c) is in conformity with a plurality of line segments, and does not conform to the criterion of a single line segment. At this time, the determination module 155 determines that the projection of the linear laser corresponding to the area A2 to be tested is not a straight line.
於前述多個範例實施例中,路面檢測方法、裝置以及系統採用霍夫線轉換來判斷線狀雷射的投影230是否為直線,但本發明不限於此。圖9是根據本發明的另一範例實施例所繪示的藉由二元影像判斷線狀雷射的投影是否為直線的流程圖。圖10是根據本發明的另一範例實施例所繪示的等差檢測法的示意圖。參照圖9、圖10,在本發明的另一範例實施例中,判斷模組155是使用等差檢測法來藉由二元影像604判斷線狀雷射的投影330是否為直線。In the foregoing plurality of exemplary embodiments, the road surface detecting method, apparatus, and system employ Hough line conversion to determine whether the projection 230 of the linear laser is a straight line, but the present invention is not limited thereto. FIG. 9 is a flow chart for determining whether a projection of a linear laser is a straight line by a binary image according to another exemplary embodiment of the present invention. FIG. 10 is a schematic diagram of an equal difference detection method according to another exemplary embodiment of the present invention. Referring to FIG. 9 and FIG. 10, in another exemplary embodiment of the present invention, the determination module 155 determines whether the projection 330 of the linear laser is a straight line by the binary image 604 using the isometric detection method.
首先,於步驟S901中,判斷模組155會在二元影像604中,提供一條基準線。基準線例如是平行於二元影像404其中一條邊線的直線。接著,於步驟S903中,在對應於線狀雷射的投影330的待測區域A內,判斷模組155沿著上述邊線延伸的方向,等距地取得多個待測點。於步驟S905中,判斷模組155更分別取得多個待測點到基準線的多個偏差距離,然後於步驟S907,判斷模組155判斷多個偏差距離是否有等差性。倘若上述多個偏差距離間具有等差性,則於步驟S909中,判斷模組155判定線狀雷射的投影是直線。另一方面,倘若上述多個偏差距離不具有等差性,則於步驟S911中,判斷模組155判定線狀雷射的投影不為直線。First, in step S901, the determination module 155 provides a reference line in the binary image 604. The reference line is, for example, a line parallel to one of the edges of the binary image 404. Next, in step S903, in the area A to be measured corresponding to the projection 330 of the linear laser, the determination module 155 obtains a plurality of points to be measured equidistantly along the direction in which the edge line extends. In step S905, the determination module 155 further obtains a plurality of deviation distances from the plurality of points to be measured to the reference line, and then in step S907, the determination module 155 determines whether the plurality of deviation distances are equivariant. If the plurality of deviation distances have the same difference, then in step S909, the determination module 155 determines that the projection of the linear laser is a straight line. On the other hand, if the plurality of deviation distances do not have the same difference, then in step S911, the determination module 155 determines that the projection of the linear laser is not a straight line.
舉例來說,請參照圖10,判斷模組155將二元影像604中的像素座標化,而二元影像604的大小例如是360*240像素,則二元影像604最左下角像素的座標會是(0,0),而最右上角的像素會是(360,240)。基準線BL是平行於x軸,因此沿x軸等距地取n個點x1~xn,並且在區域A中取n個x座標分別為x1~xn的多個待測點P1~Pn。接著,分別取得P1~Pn到基準線BL的多個偏差距離D1~Dn,其中D1~Dn的單位例如是像素。並且接著判斷D1~Dn是否為等差數列,倘若偏差距離D1~Dn為等差數列,則判斷模組155應判定線狀雷射的投影330為直線;倘若偏差距離D1~Dn不為等差數列,則判斷模組155應判定線狀雷射的投影330不為直線。其中上述的n可取為一任意自然數,並且n取值越大,此判斷的準確度或解析度也就越高。值得一提的是,如圖6所示,由於線狀雷射的投影330也會有一定的寬度,因此判斷D1~Dn是否為等差數列時,應設置一誤差容忍值,來作為判斷D1~Dn是否為等差數列時可容忍的誤差。For example, referring to FIG. 10, the determining module 155 coordinates the pixels in the binary image 604, and the size of the binary image 604 is, for example, 360*240 pixels, and the coordinates of the bottom left pixel of the binary image 604 are Yes (0,0), and the pixel in the top right corner will be (360,240). The reference line BL is parallel to the x-axis, so n points x1 to xn are equally spaced along the x-axis, and n pieces of points P1 to Pn whose x-coordinates are x1 to xn, respectively, are taken in the area A. Next, a plurality of deviation distances D1 to Dn from P1 to Pn to the reference line BL are obtained, and the unit of D1 to Dn is, for example, a pixel. And then it is determined whether D1~Dn is an arithmetic progression. If the deviation distances D1~Dn are equal difference series, the determination module 155 should determine that the projection 330 of the linear laser is a straight line; if the deviation distances D1~Dn are not equal In the sequence, the decision module 155 should determine that the projection 330 of the linear laser is not a straight line. The above n can be taken as an arbitrary natural number, and the larger the value of n, the higher the accuracy or resolution of the judgment. It is worth mentioning that, as shown in Fig. 6, since the projection 330 of the linear laser also has a certain width, when determining whether D1~Dn is an arithmetic progression, an error tolerance value should be set as the judgment D1. Whether ~Dn is an error that can be tolerated when it is an arithmetic progression.
重新參照圖1A、圖1B、圖1C與圖2,處理器150藉由色彩過濾模組151、影像處理模組153與判斷模組155判斷線狀雷射的投影330是否為直線。倘若線狀雷射的投影330為直線,則於步驟S207中,處理器150判定待測路面為平整路面。反之,倘若線狀雷射的投影不為直線,則於步驟S209中,處理器150判定待測路面為非平整路面。當判定待測路面為非平整路面後,處理器150更例如是控制警示裝置170以發出警示。Referring back to FIG. 1A, FIG. 1B, FIG. 1C and FIG. 2, the processor 150 determines whether the projection 330 of the linear laser is a straight line by the color filter module 151, the image processing module 153, and the determination module 155. If the projection 330 of the linear laser is a straight line, then in step S207, the processor 150 determines that the road surface to be tested is a flat road surface. On the other hand, if the projection of the linear laser is not a straight line, then in step S209, the processor 150 determines that the road surface to be tested is a non-flat road surface. When it is determined that the road surface to be tested is a non-flat road surface, the processor 150 further controls the warning device 170 to issue an alert.
值得注意的是,於本發明的一範例實施例中,處理器150中的色彩過濾模組151、影像處理模組153與判斷模組155例如是由處理器150所執行的多個軟體程序。然而,於其它實施例中,色彩過濾模組151、影像處理模組153與判斷模組155也可以由多組實體電路來實現。It should be noted that, in an exemplary embodiment of the present invention, the color filter module 151, the image processing module 153, and the determination module 155 in the processor 150 are, for example, a plurality of software programs executed by the processor 150. However, in other embodiments, the color filter module 151, the image processing module 153, and the determination module 155 can also be implemented by multiple sets of physical circuits.
綜上所述,本發明所提出的路面檢測方法、裝置與系統中,由於使用了雷射光作為指示光源,因此即使在夜間光線不足時,仍然能夠輔助使用者判斷道路上的坑洞,進而了確保了交通上的安全。此外,本發明利用影像處理技術來擷取出影像中對應於雷射光線的部份,僅需分析雷射光線的線條,便能判別道路的平整度,相較於目前採用其他技術來偵測到路上坑洞的方法,本發明在雷射光線的搭配之下,可以在較低的影像處理複雜度和計算量中,得到良好的檢測效果。In summary, in the road surface detecting method, device and system proposed by the present invention, since the laser light is used as the indicating light source, even when the light is insufficient at night, the user can be assisted in judging the pit on the road, and further It ensures the safety of traffic. In addition, the present invention utilizes image processing technology to extract the portion of the image corresponding to the laser light, and only needs to analyze the line of the laser light to determine the flatness of the road, which is detected by other techniques. The method of tunneling on the road, the invention can achieve good detection effect in the lower image processing complexity and calculation amount under the combination of laser light.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。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.
100‧‧‧路面檢測裝置
10‧‧‧電子裝置
110‧‧‧雷射發射器
130‧‧‧影像擷取裝置
150‧‧‧處理器
151‧‧‧色彩過濾模組
153‧‧‧影像處理模組
155‧‧‧判斷模組
170‧‧‧警示裝置
1000‧‧‧路面檢測系統
S201、S203、S205、S207、S209‧‧‧路面檢測方法的步驟
S2051、S2053、S2055‧‧‧藉由影像判斷線狀雷射的投影是否為直線的步驟
300‧‧‧影像
310‧‧‧待測路面影像
330‧‧‧線狀雷射的投影
500‧‧‧目標影像
600‧‧‧灰階影像
602‧‧‧二值化影像
604‧‧‧二元影像
S701、S703、S705、S707‧‧‧藉由二元影像使用霍夫線轉換檢測方法判斷線狀雷射的投影是否為直線的步驟
S901、S903、S905、S907、S909、S911‧‧‧藉由二元影像使用等差檢測法判斷線狀雷射的投影是否為直線的步驟
A、A1、A2‧‧‧待測區域
B‧‧‧待測邊緣
L1、L2‧‧‧平行線
L3、L4‧‧‧平行線
BL‧‧‧基準線
P1~Pn‧‧‧待測點
D1~Dn‧‧‧偏差距離
x1~xn‧‧‧x軸座標100‧‧‧Pavement detection device
10‧‧‧Electronic devices
110‧‧‧Laser transmitter
130‧‧‧Image capture device
150‧‧‧ processor
151‧‧‧Color Filter Module
153‧‧‧Image Processing Module
155‧‧‧Judgement module
170‧‧‧ Warning device
1000‧‧‧Pavement Inspection System
Steps of S201, S203, S205, S207, S209‧‧‧ Pavement Detection Method
S2051, S2053, S2055‧‧‧Steps for judging whether the projection of the linear laser is a straight line by image
300‧‧‧ images
310‧‧‧Surface image to be tested
330‧‧‧Projection of linear laser
500‧‧‧ Target image
600‧‧‧ grayscale imagery
602‧‧‧ binarized image
604‧‧‧ binary image
S701, S703, S705, S707‧‧‧ Steps for judging whether the projection of the linear laser is a straight line by the binary image using the Hough line conversion detection method
S901, S903, S905, S907, S909, S911‧‧‧ Steps for judging whether the projection of the linear laser is a straight line by using the heterodyne detection method for the binary image
A, A1, A2‧‧‧ area to be tested
B‧‧‧ edge to be tested
L1, L2‧‧‧ parallel lines
L3, L4‧‧‧ parallel lines
BL‧‧‧ baseline
P1~Pn‧‧‧ points to be tested
D1~Dn‧‧‧ deviation distance
X1~xn‧‧‧x axis coordinates
圖1A是根據本發明的一範例實施例所繪示的路面檢測裝置的方塊圖。 圖1B是根據本發明的一範例實施例所繪示的處理器的方塊圖。 圖1C是根據本發明的一範例實施例所繪示的路面檢測系統的方塊圖。 圖2是根據本發明的一範例實施例所繪示的路面檢測方法的流程圖。 圖3是根據本發明的一範例實施例所繪示的待測路面的影像的示意圖。 圖4是根據本發明的一範例實施例所繪示的藉由影像判斷線狀雷射的投影是否為直線的流程圖。 圖5是根據本發明的一範例實施例所繪示的目標影像的示意圖。 圖6A是根據本發明的一範例實施例所繪示的灰階影像的示意圖。 圖6B是根據本發明的一範例實施例所繪示的二值化影像的示意圖。 圖6C是根據本發明的一範例實施例所繪示的二元影像的示意圖。 圖7是根據本發明的一範例實施例所繪示的藉由二元影像判斷線狀雷射的投影是否為直線的流程圖。 圖8是根據本發明的一範例實施例所繪示的霍夫線轉換檢測方法的示意圖。 圖9是根據本發明的另一範例實施例所繪示的藉由二元影像判斷線狀雷射的投影是否為直線的流程圖。 圖10是根據本發明的另一範例實施例所繪示的等差檢測法的示意圖。FIG. 1A is a block diagram of a road surface detecting apparatus according to an exemplary embodiment of the invention. FIG. 1B is a block diagram of a processor according to an exemplary embodiment of the invention. FIG. 1C is a block diagram of a road surface detecting system according to an exemplary embodiment of the invention. 2 is a flow chart of a road surface detecting method according to an exemplary embodiment of the invention. FIG. 3 is a schematic diagram of an image of a road surface to be tested according to an exemplary embodiment of the invention. FIG. 4 is a flow chart for determining whether a projection of a linear laser is a straight line by an image according to an exemplary embodiment of the invention. FIG. 5 is a schematic diagram of a target image according to an exemplary embodiment of the invention. FIG. 6A is a schematic diagram of a grayscale image according to an exemplary embodiment of the invention. FIG. 6B is a schematic diagram of a binarized image according to an exemplary embodiment of the invention. FIG. 6C is a schematic diagram of a binary image according to an exemplary embodiment of the invention. FIG. 7 is a flow chart showing whether a projection of a linear laser is a straight line by a binary image according to an exemplary embodiment of the present invention. FIG. 8 is a schematic diagram of a Hough line conversion detecting method according to an exemplary embodiment of the present invention. FIG. 9 is a flow chart for determining whether a projection of a linear laser is a straight line by a binary image according to another exemplary embodiment of the present invention. FIG. 10 is a schematic diagram of an equal difference detection method according to another exemplary embodiment of the present invention.
S201、S203、S205、S207、S209‧‧‧路面檢測方法的步驟 Steps of S201, S203, S205, S207, S209‧‧‧ Pavement Detection Method
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW104133149A TWI588444B (en) | 2015-10-08 | 2015-10-08 | Pavement detecting method, pavement detecting device and pavement detecting system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW104133149A TWI588444B (en) | 2015-10-08 | 2015-10-08 | Pavement detecting method, pavement detecting device and pavement detecting system |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201713920A true TW201713920A (en) | 2017-04-16 |
TWI588444B TWI588444B (en) | 2017-06-21 |
Family
ID=59256687
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW104133149A TWI588444B (en) | 2015-10-08 | 2015-10-08 | Pavement detecting method, pavement detecting device and pavement detecting system |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI588444B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110042736A (en) * | 2018-01-16 | 2019-07-23 | 光宝电子(广州)有限公司 | Road surface reparation method, apparatus and system |
CN114111652A (en) * | 2021-12-24 | 2022-03-01 | 格林美股份有限公司 | Battery module flatness detection device and method based on machine vision |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA1235773A (en) * | 1983-12-23 | 1988-04-26 | Shigeto Nakayama | Device for detecting road surface condition |
CN100389301C (en) * | 2003-12-15 | 2008-05-21 | 上海浩顺科技有限公司 | Laser test control device and method for pavement construction flatness |
DE102006062061B4 (en) * | 2006-12-29 | 2010-06-10 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Apparatus, method and computer program for determining a position based on a camera image from a camera |
CN101487224B (en) * | 2009-02-27 | 2010-07-28 | 长安大学 | High-speed road conditions detection vehicle |
JP5747482B2 (en) * | 2010-03-26 | 2015-07-15 | 日産自動車株式会社 | Vehicle environment recognition device |
KR101395089B1 (en) * | 2010-10-01 | 2014-05-16 | 안동대학교 산학협력단 | System and method for detecting obstacle applying to vehicle |
CN104005324B (en) * | 2014-04-25 | 2016-02-24 | 湖南晨皓科技有限公司 | A kind of detection system of pavement structure information |
-
2015
- 2015-10-08 TW TW104133149A patent/TWI588444B/en not_active IP Right Cessation
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110042736A (en) * | 2018-01-16 | 2019-07-23 | 光宝电子(广州)有限公司 | Road surface reparation method, apparatus and system |
CN114111652A (en) * | 2021-12-24 | 2022-03-01 | 格林美股份有限公司 | Battery module flatness detection device and method based on machine vision |
Also Published As
Publication number | Publication date |
---|---|
TWI588444B (en) | 2017-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6395759B2 (en) | Lane detection | |
JP5787024B2 (en) | Three-dimensional object detection device | |
JP6667065B2 (en) | Position estimation device and position estimation method | |
WO2014073322A1 (en) | Object detection device and object detection method | |
CN102314601B (en) | Shadow removal in image captured by vehicle based camera using non-linear illumination-invariant kernel | |
KR101279712B1 (en) | Apparatus and method for providing real-time lane detection, recording medium thereof | |
US20100259609A1 (en) | Pavement marker recognition device, pavement marker recognition method and pavement marker recognition program | |
US9286512B2 (en) | Method for detecting pedestrians based on far infrared ray camera at night | |
US9613425B2 (en) | Three-dimensional measurement apparatus, three-dimensional measurement method and program | |
CN106096512B (en) | Detection device and method for recognizing vehicle or pedestrian by using depth camera | |
JP2007234019A (en) | Vehicle image area specifying device and method for it | |
JP2008123113A (en) | Pedestrian detection device | |
JP2019530924A (en) | Object detection from camera images | |
JP5548212B2 (en) | Crosswalk sign detection method and crosswalk sign detection device | |
TWI588444B (en) | Pavement detecting method, pavement detecting device and pavement detecting system | |
KR101818842B1 (en) | Driving assistant apparatus, distance detection method and width of lane detection method | |
KR101276073B1 (en) | System and method for detecting distance between forward vehicle using image in navigation for vehicle | |
KR20120011533A (en) | Detection system of road line using both laser sensor and camera | |
JP2018073275A (en) | Image recognition device | |
JP6452361B2 (en) | Information processing apparatus, information processing method, and program | |
JP2016162130A (en) | Device and method for detecting pedestrian crossing and computer for pedestrian crossing detection | |
JP2010286995A (en) | Image processing system for vehicle | |
JP4765113B2 (en) | Vehicle periphery monitoring device, vehicle, vehicle periphery monitoring program, and vehicle periphery monitoring method | |
JP2017027578A (en) | Detection device, parallax value derivation device, object recognition device, device control system, detection method and program | |
JP2020126304A (en) | Out-of-vehicle object detection apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MM4A | Annulment or lapse of patent due to non-payment of fees |