TW201329434A - Water turbidity detection system and the method thereof - Google Patents

Water turbidity detection system and the method thereof Download PDF

Info

Publication number
TW201329434A
TW201329434A TW101101376A TW101101376A TW201329434A TW 201329434 A TW201329434 A TW 201329434A TW 101101376 A TW101101376 A TW 101101376A TW 101101376 A TW101101376 A TW 101101376A TW 201329434 A TW201329434 A TW 201329434A
Authority
TW
Taiwan
Prior art keywords
value
image
block
turbidity
images
Prior art date
Application number
TW101101376A
Other languages
Chinese (zh)
Other versions
TWI456185B (en
Inventor
Chin-Lun Lai
Original Assignee
Oriental Inst Technology
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 Oriental Inst Technology filed Critical Oriental Inst Technology
Priority to TW101101376A priority Critical patent/TWI456185B/en
Publication of TW201329434A publication Critical patent/TW201329434A/en
Application granted granted Critical
Publication of TWI456185B publication Critical patent/TWI456185B/en

Links

Landscapes

  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

A water turbidity detection system for detecting turbidity of water under test (WUT), including a light emitter, an image capturing device, and a processor, is illustrated. The light emitter emits coherent light to the WUT. The image capturing device captures a plurality of reflection picture shown on the surface of the WUT. Each reflection picture includes a blend image resulted from the coherent light confronting with suspending material of the WUT. The processor receives the reflection pictures and defines a scattering block of each picture based on a brightness threshold. The processor calculates area parameters of the scattering blocks, and filers the scattering block via a filtering threshold to generate a statistical value. The statistical value is compared with a turbidity table to determine the turbidity of the WUT, wherein the greater the statistical value the higher the turbidity of the WUT.

Description

水質檢測系統及其方法Water quality testing system and method thereof

本發明有關於一種檢測系統及其方法,以及檢測系統的校正方法,且特別是有關於檢測水源濁度的水質檢測系統及其方法,與水質檢測系統的校正方法。The invention relates to a detection system and a method thereof, and a calibration method of the detection system, and in particular to a water quality detection system and method thereof for detecting water source turbidity, and a calibration method for the water quality detection system.

現今部分水力發電仍需藉由山上引水道匯聚水源發電,而對於高山取水門控制上,常需人力現場判斷原水濁度,或者由下游取樣分析來決定取水壩口閘門的開閉,例如光譜分析儀量測法、水色光譜分析法或濁度映射法等。Nowadays, some hydropower projects still need to generate electricity from the mountain water diversion channel. For the control of mountain water gates, it is often necessary to determine the turbidity of the raw water on the site, or to determine the opening and closing of the gate of the dam by downstream sampling analysis, such as spectrum analyzer. Measurement method, aqua spectrum analysis method or turbidity mapping method.

但因山上地形險要,由人力現場判斷濁度的方法在天候不佳的情況下,不但易危及勘查人員安全外,也無法第一時間反應山上原水濁度的狀態。一旦取水過於混濁時,將影響到冷卻用水及動力用水品質,恐將造成發電作業安全及造成發電機組設備的破壞,產生極大的損失。而現有大多數檢測技術具有有高成本、需常清潔及校正設備、或是需採集檢體的不便性。因此如何設計一個原水濁度檢測系統,即時反映上游水質狀況,來補足前述缺陷將是一項重要的議題。However, due to the dangerous terrain on the mountain, the method of judging the turbidity by the manpower site is not only vulnerable to the safety of the surveying personnel, but also unable to reflect the state of the raw water turbidity of the mountain in the first time. Once the water is too turbid, it will affect the quality of the cooling water and power water, which will cause the safety of power generation and damage to the equipment of the generator set, causing great losses. Most of the existing detection technologies have high cost, need to clean and calibrate equipment frequently, or inconvenience in collecting samples. Therefore, how to design a raw water turbidity detection system to instantly reflect the upstream water quality to complement the aforementioned defects will be an important issue.

本發明實施例提供一種水質檢測系統,用以檢測受測水源之濁度,所述的系統包括發光器、影像擷取裝置及處理器。發光器用以從受測水源上方向受測水源發射同調光,並由影像擷取裝置連續擷取受測水源表面的多個水面影像。每個水面影像中包括同調光撞擊受測水源中之懸浮粒子而在受測水源表面產生的漸層影像。漸層影像的亮度從邊緣向中心增強。處理器接收水面影像並根據亮度門檻定義出每一水面影像的散射區塊,其中,散射區塊對應水面影像的高亮度區域。處理器分別計算散射區塊的面積參數,並根據篩選值比對面積參數以篩選散射區塊,以及根據篩選後所保留的散射區塊的面積參數獲得參數統計值。再根據濁度對照表比對參數統計值,以判斷受測水源的濁度,其中,參數統計值越大,受測水源的濁度越高。Embodiments of the present invention provide a water quality detecting system for detecting turbidity of a water source under test, the system comprising an illuminator, an image capturing device, and a processor. The illuminator is configured to emit the same dimming light from the water source under test to the water source under test, and the image capturing device continuously captures a plurality of water surface images of the surface of the tested water source. Each surface image includes a gradation image that is generated by the dimming light striking the suspended particles in the water source under test to the surface of the water source under test. The brightness of the gradation image is enhanced from the edge to the center. The processor receives the water surface image and defines a scattering block for each water surface image according to the brightness threshold, wherein the scattering block corresponds to a high brightness area of the water surface image. The processor separately calculates an area parameter of the scattering block, and compares the area parameter according to the screening value to filter the scattering block, and obtains the parameter statistical value according to the area parameter of the scattering block retained after the screening. Then, according to the turbidity comparison table, the parameter statistics are compared to determine the turbidity of the tested water source, wherein the larger the parameter statistical value, the higher the turbidity of the tested water source.

除此之外,本發明實施例還提供一種水質檢測方法,利用發光器、影像擷取裝置及處理器檢測受測水源之濁度。所述方法包括:由發光器從受測水源表面向受測水源發射同調光,再由影像擷取裝置連續擷取受測水源表面的多個水面影像。每個所述水面影像中包括同調光撞擊受測水源中之懸浮粒子而在受測水源表面產生的漸層影像,而漸層影像的亮度從邊緣向中心增強。接著接收水面影像,並根據至少一亮度門檻定義出每一水面影像的散射區塊,所述的散射區塊對應水面影像的高亮度區域。接著更分別計算散射區塊的面積參數,並根據篩選值比對面積參數以篩選散射區塊。再根據篩選後所保留的散射區塊的面積參數獲得參數統計值,最後比對參數統計值及濁度對照表,以判斷受測水源的濁度,其中,參數統計值越大,受測水源的濁度越高。In addition, the embodiment of the invention further provides a water quality detecting method, which uses an illuminator, an image capturing device and a processor to detect the turbidity of the water source under test. The method includes: emitting, by the illuminator, the same dimming light from the surface of the tested water source to the water source under test, and then continuously capturing a plurality of water surface images of the surface of the tested water source by the image capturing device. Each of the water surface images includes a gradation image generated by the same dimming light that collides with the suspended particles in the water source under test to generate a surface of the water source, and the brightness of the gradation image increases from the edge to the center. Then, the water surface image is received, and a scattering block of each water surface image is defined according to at least one brightness threshold, and the scattering block corresponds to a high brightness area of the water surface image. Then, the area parameters of the scattering block are calculated separately, and the scattering blocks are screened according to the screening values. Then, according to the area parameter of the scattering block retained after the screening, the parameter statistical value is obtained, and finally the parameter statistical value and the turbidity comparison table are compared to determine the turbidity of the tested water source, wherein the larger the parameter statistical value, the tested water source The higher the turbidity.

此外,本發明實施例還提供一種水質檢測系統的校正方法,用以維持水質檢測系統的檢測正確性。In addition, the embodiment of the invention further provides a calibration method for the water quality detection system for maintaining the correctness of the detection of the water quality detection system.

綜上所述,本發明實施例所提供的水質檢測系統及其方法可供水質監測人員在不需要親自採集水樣的情況下,可即時監控及檢測受測水源處的水質變化,以利水質監測人員在水質混濁度產生變化時可即時應變,藉以保護受測水源處的各項機電設備,避免因受測水源中的泥沙淤積而造成損壞。In summary, the water quality detecting system and the method provided by the embodiments of the present invention can be used by the water quality monitoring personnel to monitor and detect the water quality changes at the tested water source in real time without the need to collect the water sample in person, so as to facilitate the water quality. The monitoring personnel can respond immediately when the water turbidity changes, so as to protect the various electromechanical equipments at the tested water source and avoid damage caused by sediment deposition in the tested water source.

[水質檢測系統實施例][Water Quality Testing System Example]

請參照圖1,圖1繪示本發明提供的一種水質檢測系統實施例的方塊圖。本實施例的水質檢測系統1包括發光器10、影像擷取裝置12、處理器14及記憶單元16。其中,發光器10及影像擷取裝置12相鄰地架設在受測水源2的表面上方。發光器10及影像擷取裝置12特別適於設置在沒有或極少環境光源干擾的地方,例如水庫的引水道束井中。發光器10、影像擷取裝置12及記憶單元16分別連接於處理器12。所述的處理器12及記憶單元16可設置在遠端的控制箱或控制中心,處理器12用以控制發光器10的發光功率,以及接收影像擷取裝置12所擷取到的影像並加以分析處理,藉以判斷所述受測水源2的水質清澈或混濁。藉此,水質監測人員無需親自到受測水源2的取水口取樣以檢測或目測水質,而可以透過處理器14從遠端對影像擷取裝置12所擷取的影像畫面進行分析與運算,進而快速並便捷地判定受測水源2的濁度。Please refer to FIG. 1. FIG. 1 is a block diagram of an embodiment of a water quality detecting system provided by the present invention. The water quality detecting system 1 of the present embodiment includes an illuminator 10, an image capturing device 12, a processor 14, and a memory unit 16. The illuminator 10 and the image capturing device 12 are erected above the surface of the water source 2 under test. The illuminator 10 and image capture device 12 are particularly adapted to be placed in locations where there is little or no environmental light source interference, such as a waterway beam well of a reservoir. The illuminator 10, the image capturing device 12, and the memory unit 16 are connected to the processor 12, respectively. The processor 12 and the memory unit 16 can be disposed at a remote control box or a control center. The processor 12 is configured to control the illuminating power of the illuminator 10 and receive the image captured by the image capturing device 12 and The analysis process is performed to determine whether the water of the tested water source 2 is clear or turbid. Therefore, the water quality monitoring personnel do not need to sample the water intake port of the water source 2 to detect or visually check the water quality, and the image 14 captured by the image capturing device 12 can be analyzed and calculated by the processor 14 from the far end. The turbidity of the water source 2 to be tested is determined quickly and conveniently.

發光器10用以從受測水源2的上方向受測水源2發射同調光,例如雷射光。同調光具有方向、相位及頻率相同的特性,因此同調光之間彼此不會互相干涉,避免了光源隨發射距離變遠而擴散及光線減弱的問題。所述的發光器10可為單光束或多光束陣列雷射光發射裝置,如雷射筆。特別一提,在本實施例中的發光器10以垂直或近乎垂直於受測水源2的水平面的角度設置,以利同調光以垂直或近乎垂直的角度射入水面。The illuminator 10 is configured to emit the same dimming light, such as laser light, from the measured water source 2 from the upper side of the water source 2 under test. The same dimming has the same characteristics of direction, phase and frequency, so the same dimming does not interfere with each other, avoiding the problem that the light source diffuses and the light is weakened as the emission distance becomes longer. The illuminator 10 can be a single beam or multi-beam array of laser light emitting devices, such as a laser pen. In particular, the illuminator 10 in this embodiment is disposed at an angle that is perpendicular or nearly perpendicular to the horizontal plane of the water source 2 under test to facilitate the dimming of light into the water surface at a vertical or near vertical angle.

影像擷取裝置12則用以拍攝發光器10向受測水源2發射同調光的區域之影像,因此影像擷取裝置12與發光器10可設置於相鄰之處以利拍攝所述影像。影像擷取裝置12具體來說可為各種可連續拍攝靜態照片或動態影像的相機或攝影機等裝置。The image capturing device 12 is configured to capture an image of the region where the illuminator 10 emits the same dimming light to the water source 2 to be tested. Therefore, the image capturing device 12 and the illuminator 10 can be disposed adjacent to each other to facilitate capturing the image. The image capturing device 12 can be specifically a device such as a camera or a camera that can continuously capture still photos or moving images.

由於發光器10發射同調光到受測水源2之後,若受測水源2水面下含有懸浮粒子(如泥沙或粉塵),光束在穿透水源的途中會撞擊懸浮粒子。當光束遭遇懸浮粒子時,除小部分光源可繞射繼續向下穿透之外,大部分光源則會因散射效應,而在受測水源2表面根據散射光能量以大致上呈同心圓的型式,形成具有漸層色飽和度及亮度的漸層影像,且其色飽和度及亮度係由同心圓的外圍向中心逐漸提高。在相同的同調光能量照射下,依照受測水源2中所含有的懸浮粒子之多寡不同(也就是水源的濁度不同),所反應出來的漸層影像的漸層擴散程度亦會不同。如圖2所示的水面影像20a到20c之示意圖,分別顯示水質相對清澈、中度混濁及重度混濁的情況時,水表面的漸層影像(分別為200a、200b及200c)的漸層擴散程度會逐漸收斂,並使得光能量集中。換言之,當水質越混濁,整個同心圓的半徑會越縮減,但同心圓中相同亮度的區域則會因光能量的集中而越擴大。Since the illuminator 10 emits the same dimming light to the water source 2 under test, if the water source 2 under test contains suspended particles (such as sediment or dust), the light beam will hit the suspended particles on the way through the water source. When the beam encounters suspended particles, except for a small part of the light source that can continue to penetrate downward by diffraction, most of the light source will be substantially concentric according to the scattered light energy on the surface of the water source 2 under test due to the scattering effect. A gradation image having gradual color saturation and brightness is formed, and its color saturation and brightness are gradually increased from the periphery of the concentric circle toward the center. Under the same dimming energy irradiation, according to the amount of suspended particles contained in the tested water source 2 (that is, the turbidity of the water source is different), the degree of gradual diffusion of the gradation image reflected will also be different. The schematic diagrams of the water surface images 20a to 20c shown in Fig. 2 show the degree of gradual diffusion of the gradation images of the water surface (200a, 200b, and 200c, respectively) when the water quality is relatively clear, moderately turbid, and severely turbid. Will gradually converge and concentrate the light energy. In other words, as the water quality becomes more turbid, the radius of the entire concentric circle decreases, but the area of the same brightness in the concentric circles expands due to the concentration of light energy.

請繼續參照圖2,如前所述,漸層影像的色飽和度及亮度會由外向內提高,因此在每一個漸層影像200a到200c的中心區域會因光散射能量的集中而顯現出高亮度區域(分別為202a、202b及202c),甚至在中央部位顯現出一個飽和同色區塊。飽和同色區塊是由於在發光器10所發出的同調光照射下,集中在中心區域的散射能量過高,而影像擷取裝置12的感光能力有限的情況下,無法辨識中央部分的真實亮度漸層,因而形成一個亮度和色飽和度一致的飽和同色區塊。從影像畫面上看起來,所述的高亮度區域即會呈現為一個以飽和同色區塊為中心且大致上圓形的圖像。如前所述,高亮度區域的區塊大小,會隨著水質的混濁程度而變化,當受測水源2的懸浮粒子越多,水質濁度越高時,同調光照入受測水源2後越容易造成散射,散射能量越高,進而形成面積越大的高亮度區域,如圖2A中的高亮度區域202a到202c的範圍係隨著相對應從清澈到重度混濁的水質而增大。Continuing to refer to FIG. 2, as described above, the color saturation and brightness of the gradation image are increased from the outside to the inside, so that the central region of each of the gradation images 200a to 200c is high due to the concentration of light scattering energy. The luminance regions (202a, 202b, and 202c, respectively) exhibit a saturated, homochromatic block even at the center. The saturated color-matching block is because the scattering energy concentrated in the central region is too high under the same dimming light emitted by the illuminator 10, and the photo-sensing device 12 has a limited photo-sensing capability, and the true brightness of the central portion cannot be recognized. The layer thus forms a saturated, homochromatic block of uniform brightness and color saturation. It appears from the image screen that the high-brightness area appears as an image that is centered on a saturated, homochromatic block and is substantially circular. As mentioned above, the block size in the high-brightness region will vary with the turbidity of the water quality. When the suspended particles of the tested water source 2 are more, the turbidity of the water is higher, and the homogenized light enters the water source 2 after the test. It is easy to cause scattering, and the higher the scattering energy, the larger the area of high luminance is formed, and the range of the high-luminance regions 202a to 202c in FIG. 2A increases with the corresponding water quality from clear to severe turbidity.

回到圖1,影像擷取裝置12即是用以擷取含有所述高亮度區域的水面影像,並將水面影像一一傳送給處理器14。由處理器14對水面影像進行處理和分析,並篩除影像中的雜訊後,界定每個水面影像中屬於高亮度區域的範圍為散射區塊,再根據多個連續擷取的水面影像所表現出來的散射區塊的大小,來判斷出受測水源2中所含的懸浮粒子數量偏多或偏少,藉此而確認受測水源2的濁度高低。換句話說,當處理器14根據相同的條件所計算出來散射區塊範圍越大,代表擷取水面影像當時的受測水源2的水質越混濁。Referring back to FIG. 1 , the image capturing device 12 is configured to capture a water surface image containing the high brightness region and transmit the water surface image to the processor 14 one by one. After the processor 14 processes and analyzes the water surface image, and filters out the noise in the image, the range of the high-luminance region in each water surface image is defined as a scattering block, and then according to a plurality of consecutively captured water surface images. The size of the scattering block is judged to determine whether the amount of suspended particles contained in the water source 2 to be measured is excessive or small, thereby confirming the turbidity of the water source 2 to be tested. In other words, when the processor 14 calculates the range of the scattering block according to the same condition, the water quality of the water source 2 under test at the time of capturing the water surface image is turbid.

設置在遠端的控制中心或控制箱中的處理器14經由有線或無線傳輸而依序接收到水面影像後,為了區隔屬於反射同調光而產生的散射區塊(亦即系統所要界定以判斷濁度的區塊)的範圍與雜訊的範圍(例如流動的水源衝擊水道壁而產生的反射水花影像),處理器14可對接收到的水面影像進行一或多道前置處理。例如當原始的水面影像因發光器10發射紅光或綠光雷射光而顯現為紅色或綠色的彩色影像時,處理器14可先將彩色的水面影像進行灰階化處理,使得水面影像變成灰階影像。The processor 14 disposed in the remote control center or the control box sequentially receives the water surface image through wired or wireless transmission, in order to separate the scattering blocks generated by the reflection and the same dimming (that is, the system is to be defined to determine The range of the turbidity block and the range of noise (eg, the reflected water image generated by the flowing water source impacting the waterway wall), the processor 14 may perform one or more pre-processing on the received water surface image. For example, when the original water surface image appears as a red or green color image due to the illuminator 10 emitting red or green laser light, the processor 14 may first grayscale the color water surface image to make the water surface image gray. Order image.

散射區塊在水面影像中對應到高亮度區域,因此在轉換為灰階影像後,灰階影像中對應散射區塊的區域仍然是屬於亮度較高的部分而偏向白色。The scattering block corresponds to a high-luminance region in the water surface image. Therefore, after being converted into a gray-scale image, the region corresponding to the scattering block in the gray-scale image is still a part with higher brightness and is biased toward white.

處理器14可更進一步將灰階影像中各像素的像素值正規化。換言之,例如將灰階影像中256個色階按比例正規化為0到1之間的數值。並且根據一預定的亮度門檻再將正規化後的灰階影像的各個像素依據亮度門檻畫分為兩種像素值,例如為第一像素值及第二像素值,以產生二值影像。The processor 14 can further normalize the pixel values of each pixel in the grayscale image. In other words, for example, 256 gradations in the grayscale image are normalized to a value between 0 and 1. And according to a predetermined brightness threshold, each pixel of the normalized gray scale image is divided into two pixel values according to the brightness threshold, for example, a first pixel value and a second pixel value to generate a binary image.

用以畫分灰階影像像素的所述亮度門檻,即係用以界定每個灰階影像中被定義為高亮度區域的判斷標準。若亮度門檻過低,可能易於涵蓋影像中的雜訊而高估了散射區塊的大小,以致於誤判受測水源2的濁度。因此亮度門檻的選定亦需經過適當的計算,建議可為0.6到0.8之間,但實際上的選定仍視系統實際設計及運算而得,以上建議值僅為其中一種例示。The brightness threshold used to draw the grayscale image pixels is used to define a criterion for defining a high brightness region in each grayscale image. If the brightness threshold is too low, it may be easy to cover the noise in the image and overestimate the size of the scattering block, so that the turbidity of the tested water source 2 is misjudged. Therefore, the selection of the brightness threshold needs to be properly calculated. The recommended value is between 0.6 and 0.8, but the actual selection is still based on the actual design and calculation of the system. The above suggested values are only one of the examples.

接著請參照圖3所繪示的二值影像30a到30c之示意圖。舉例來說,假設亮度門檻設定為0.8,處理器14將灰階影像正規化後像素值大於或等於0.8的像素皆指定為第一像素值,在本例中可指定為1;而正規化後像素值小於0.8的像素則指定為第二像素值,在本例中則為0。藉此,所述的二值影像中即可呈現出只有白(像素值為1)與黑(像素值為0)兩種顏色的畫面,藉以區隔反應了光散射能量的高亮度區域及其他部分。而二值影像當中多個被指定為第一像素值的相鄰像素群聚在一起而呈現出的白色區塊,即對應到原本在水面影像當中具有高亮度表現的區塊,當中也包括對應於散射區塊的高亮度區域。Please refer to the schematic diagram of the binary images 30a to 30c illustrated in FIG. 3 . For example, assuming that the luminance threshold is set to 0.8, the processor 14 normalizes the grayscale image and the pixel with the pixel value greater than or equal to 0.8 is designated as the first pixel value, which may be specified as 1 in this example; A pixel whose pixel value is less than 0.8 is designated as the second pixel value, which is 0 in this example. Thereby, the binary image can display only two colors of white (pixel value 1) and black (pixel value 0), thereby distinguishing high-brightness regions reflecting light scattering energy and others. section. In the binary image, a plurality of adjacent pixels group designated as the first pixel value are grouped together to present a white block, that is, a block corresponding to a high-brightness performance in the water surface image, which also includes a corresponding In the high-brightness area of the scattering block.

然而,每一個二值影像中所具有的白色區塊,也就是屬於第一像素值之像素群聚的區塊,可能不只一處。由於受檢測的受測水源2可能是流動的水源,如前所述,當影像擷取裝置12拍攝水面影像時,影像畫面中極可能包含有流水衝撞水道壁產生的反射圖形,所述的反射圖形亦會在水面影像中表現出高亮度,如圖2的水面影像20c所示的反射圖形204a及204b,會在相對應的二值影像中呈現為白色區塊,如圖3中,與圖2之水面影像20c對應的二值影像30c所示的白色區塊302a及302b。然而這一類的白色區塊並非處理器14所要用以評估水質濁度的資料,而屬於影像中的雜訊,因此在本實施例中可將包括有雜訊的影像先行排除,以避免處理器14誤判。However, the white blocks in each binary image, that is, the blocks belonging to the pixel group of the first pixel value, may be more than one place. Since the detected water source 2 may be a flowing water source, as described above, when the image capturing device 12 captures a water surface image, the image image may highly contain a reflection pattern generated by the water flowing against the waterway wall, the reflection. The graphics will also exhibit high brightness in the water surface image. The reflection patterns 204a and 204b shown in the water surface image 20c of FIG. 2 will appear as white blocks in the corresponding binary image, as shown in FIG. The white blocks 302a and 302b shown by the binary image 30c corresponding to the water surface image 20c of Fig. 2 . However, this type of white block is not the data that the processor 14 needs to evaluate the turbidity of the water, but belongs to the noise in the image. Therefore, in this embodiment, the image including the noise can be excluded first to avoid the processor. 14 misjudgment.

因此,處理器14根據灰階影像產生二值影像後,可執行標籤化(labeling)處理,計算同一個二值影像當中,由多個第一像素值群聚所形成的白色區塊的區塊數量。若發現一處由多個第一像素值群聚所形成的白色區塊,則將所述區塊標示為1;若發現第二處由第一像素值群聚形成的白色區塊,則標示為2,依此類推。最後統計同一個二值影像當中被標籤的區塊的數量。在本實施例中,當處理器14判斷一個二值影像中的區塊數量大於1時,代表二值影像當中除了包括對應散射區塊的區塊之外,還包含了其他的雜訊,則此時處理器14可決定直接將所述二值影像及其對應的水面影像加以排除,不列入後續的濁度計算,例如圖2所示的水面影像20c及圖3所示的二值影像30c。而區塊數量為1的二值影像則可確定被標示的區塊即為對應散射區塊的白色區塊。處理器14即可從許多二值影像中選取區塊數量為1的二值影像作為候選影像,例如本例中圖3所示的二值影像30a與30b。Therefore, after the processor 14 generates the binary image according to the grayscale image, a labeling process may be performed to calculate a block of the white block formed by the plurality of first pixel values among the same binary image. Quantity. If a white block formed by a plurality of first pixel value clusters is found, the block is marked as 1; if a second white block formed by the first pixel value clustering is found, the flag is marked 2, and so on. Finally, the number of blocked blocks in the same binary image is counted. In this embodiment, when the processor 14 determines that the number of blocks in a binary image is greater than 1, the representative binary image includes other noises in addition to the block including the corresponding scattering block. At this time, the processor 14 may decide to directly exclude the binary image and its corresponding water surface image, and not include the subsequent turbidity calculation, such as the water surface image 20c shown in FIG. 2 and the binary image shown in FIG. 3. 30c. The binary image with a block number of 1 can determine that the marked block is the white block corresponding to the scattering block. The processor 14 can select a binary image with a block number of 1 as a candidate image from a plurality of binary images, such as the binary images 30a and 30b shown in FIG. 3 in this example.

其中,處理器14在執行標籤化的處理之前,可先對二值影像進行形態學的侵蝕與膨脹前處理,以消除二值影像中白色區塊的毛邊現象,以便準確計算白色區塊的面積。The processor 14 may perform morphological erosion and pre-expansion processing on the binary image before performing the labeling process to eliminate the burr phenomenon of the white block in the binary image, so as to accurately calculate the area of the white block. .

處理器14進一步對包含有唯一一個白色區塊的候選影像進行面積參數的計算,例如分別計算各個候選影像30a、30b的白色區塊300a、300b的像素數,以產生對應於所述候選影像的白色區塊之面積為面積參數,並可暫存在記憶單元16中。The processor 14 further performs an area parameter calculation on the candidate image including the only one white block, for example, respectively calculating the number of pixels of the white blocks 300a, 300b of the respective candidate images 30a, 30b to generate corresponding to the candidate image. The area of the white block is an area parameter and can be temporarily stored in the memory unit 16.

當計算出所有候選影像的面積參數後,處理器14可將所有用於檢測的候選影像的面積參數加以平均,以產生參數統計值,也就是對應於散射區塊的面積平均值,藉以作為評估受測水源2的水質濁度的比較基礎。After calculating the area parameters of all candidate images, the processor 14 may average all the area parameters of the candidate images for detection to generate parameter statistics, that is, corresponding to the area average of the scattering blocks, as an evaluation. The basis for comparison of the turbidity of the water source of the tested water source 2.

然而值得注意的是,即使在二值影像當中第一像素值群聚所形成的區塊之區塊數量為1,仍有可能發生雜訊影響散射區塊之像素的情況,如圖4所示的一個候選影像40的示意圖,雖然在候選影像40當中僅包括一個白色區塊400,但白色區塊400當中的一部分404對應的是用以評估水質的散射區塊,而與散射區塊相連接的另一部分402實際上係為應排除的雜訊,此時,圖4所示的候選影像40被計算出來的面積參數會明顯大於其他候選影像。因此,在本實施例中,處理器14可先利用特定的篩選值對各個候選影像進行篩選。在本實施例中所適用的篩選值亦可為所述將要被篩選的各個候選影像之面積參數的平均值。However, it is worth noting that even if the number of blocks formed by the clustering of the first pixel values in the binary image is 1, it is possible that noise may affect the pixels of the scattering block, as shown in FIG. A schematic diagram of a candidate image 40, although only one white block 400 is included in the candidate image 40, a portion 404 of the white block 400 corresponds to a scattering block for evaluating water quality and is connected to the scattering block. The other portion 402 is actually a noise that should be excluded. At this time, the candidate image 40 shown in FIG. 4 is calculated to have a significantly larger area parameter than other candidate images. Therefore, in this embodiment, the processor 14 may first filter each candidate image by using a specific screening value. The screening value applicable in this embodiment may also be an average value of the area parameters of each candidate image to be screened.

處理器14可將每個候選影像的面積參數與篩選值進行比對以篩覺選應保留的候選影像。例如將參數面積大於篩選值的候選影像篩除,藉以摒棄可能包含有雜訊在內的候選影像,並保留未被篩除的候選影像的面積參數以計算參數統計值。The processor 14 may compare the area parameters of each candidate image with the screening values to screen the candidate images that should be retained. For example, the candidate image whose parameter area is larger than the screening value is screened, thereby discarding the candidate image that may contain the noise, and retaining the area parameter of the candidate image that is not screened to calculate the parameter statistics.

以篩選值先行篩選用候選影像後再計算參數統計值的手段,除可消除雜訊所可能造成的誤判之外,亦有助於收斂與集中參數統計值的數值。因此處理器14可執行不只一次的候選影像的篩選,本實施例中建議的篩選次數為兩次,以獲得更精確的參數統計值。例如:影像擷取裝置12連續擷取900張水面影像,並經過灰階化、二值化、消除毛邊及標籤化程序而篩選出750張候選影像。當分別計算出750張候選影像的面積參數,以及所述750張候選影像的面積參數的平均作為篩選值後,根據篩選值篩選所述750張候選影像。假設其中有250張候選影像的面積參數大於篩選值,處理器14則可選取其餘500張面積參數不大於篩選值的候選影像,再以所述500張候選影像為樣本,計算所述500張候選影像的面積參數的平均。最後再根據所述500張候選影像的面積參數之平均來篩選所述500張候選影像。假設500張候選影像中,經篩選後保留了350張候選影像,處理器14方以所述350張候選影像的面積參數加以平均,以計算出最後的參數統計值。The method of filtering the candidate images and then calculating the parameter statistics by filtering the values, in addition to eliminating the misjudgment that may be caused by the noise, also helps to converge and concentrate the values of the parameter statistics. Therefore, the processor 14 can perform screening of candidate images more than once, and the number of screenings suggested in this embodiment is twice to obtain more accurate parameter statistics. For example, the image capturing device 12 continuously captures 900 water surface images, and filters 750 candidate images after graying, binarizing, erasing and labeling procedures. After calculating the area parameters of 750 candidate images and the average of the area parameters of the 750 candidate images as the screening values, the 750 candidate images are screened according to the screening values. Assuming that the area parameter of the 250 candidate images is larger than the screening value, the processor 14 may select the remaining 500 candidate images whose area parameters are not greater than the screening value, and then calculate the 500 candidates by using the 500 candidate images as samples. The average of the area parameters of the image. Finally, the 500 candidate images are screened according to the average of the area parameters of the 500 candidate images. It is assumed that among the 500 candidate images, 350 candidate images are retained after screening, and the processor 14 side averages the area parameters of the 350 candidate images to calculate the final parameter statistics.

當處理器14計算出參數統計值之後,即可根據參數統計值比對預設的濁度對照表。所述的濁度對照表可儲存在記憶單元16當中,並記錄了多種不同的散射區塊的平均面積的區間(range)或臨界值,以及各個平均面積區間或臨界值所對應的濁度等級。例如濁度對照表中可記錄參數統計值為300個像素以下者,濁度等級為「清澈」,參數統計值為300個像素到850個像素者,濁度等級為「輕度混濁」,而參數統計值為850個像素到1350個像素者為「中度混濁」,而高於1350個像素者則為「重度混濁」等。所述的濁度等級可將水質區分為清澈、輕度混濁、中度混濁或重度混濁等類型,以取代具體的濁度計量數值。After the processor 14 calculates the parameter statistics, the preset turbidity comparison table can be compared according to the parameter statistics. The turbidity comparison table may be stored in the memory unit 16 and record the range or threshold of the average area of the plurality of different scattering blocks, and the turbidity level corresponding to each average area interval or threshold. . For example, if the statistic value of the recordable parameter in the turbidity comparison table is 300 pixels or less, the turbidity level is "clear", the parameter statistic is 300 pixels to 850 pixels, and the turbidity level is "mild turbidity", and The parameter statistic value is "moderate turbidity" from 850 pixels to 1350 pixels, and "severe turbidity" is higher than 1350 pixels. The turbidity level can distinguish the water quality into a type of clear, mild turbidity, moderate turbidity or heavy turbidity, instead of the specific turbidity measurement value.

處理器14計算及分析出的水質結果,可輸出到控制中心的顯示界面(圖1未示),例如網頁型式的水質監測系統畫面。利用直接顯示濁度等級的方式,可以使水質監測人員快速且直覺地了解受測水源2的水質狀況,以便於當水質到達應警戒的濁度等級(例如中度混濁)時,可以迅速地進行相關處理,例如關閉水庫進水口,以防止發電機具因水源中過多的懸浮粒子(如泥沙)淤積而損壞。The water quality result calculated and analyzed by the processor 14 can be output to a display interface of the control center (not shown in FIG. 1), such as a webpage type water quality monitoring system screen. By directly displaying the turbidity level, the water quality monitoring personnel can quickly and intuitively understand the water quality status of the tested water source 2, so that when the water quality reaches the turbidity level (such as moderate turbidity) that should be alert, it can be quickly performed. Related treatments, such as closing the reservoir inlet, to prevent damage to the generator due to accumulation of excessive suspended particles (such as sediment) in the water source.

[另一水質檢測系統實施例][Another water quality testing system embodiment]

考慮到影像擷取裝置12所擷取到的水面影像中的漸層影像,可能受到環境光源強弱不同的影響,使得相同濁度的受測水源2在不同強度的環境光源下呈現出大小不同的漸層影像的情況,因此,在如圖1所示的相同架構下可採用不同的實施手段。在本實施例中,處理器14改為利用兩階段式取得不同門檻值所定義出來的散射圖形,並比對所述兩個散射圖形之間的面積比值的方式,判斷受測水源2的濁度,藉此以提高檢測結果對環境光源的容忍度。Considering that the gradation image in the water surface image captured by the image capturing device 12 may be affected by the intensity of the ambient light source, the water source 2 of the same turbidity exhibits different sizes under different ambient light sources. In the case of a gradation image, different implementation means can be employed in the same architecture as shown in FIG. In this embodiment, the processor 14 uses the two-stage method to obtain the scattering pattern defined by the different threshold values, and compares the area ratio between the two scattering patterns to determine the turbidity of the tested water source 2. Degree, in order to improve the tolerance of the test results to the ambient light source.

其中,從發光器10發射光源到影像擷取裝置12擷取水面影像並灰階化的過程,與前述實施例的手段相同,詳細內容請參照上述實施例的說明。值得一提的是,在本實施例中,用以從正規化後的灰階影像產生二值影像的亮度門檻包括第一門檻值及第二門檻值。其中,第二門檻值高於第一門檻值,例如:第一門檻值為0.6,第二門檻值則為0.8。處理器14先根據第一門檻值畫分灰階影像的像素為第一像素值及第二像素值兩種像素值,進而產生第一二值影像,如圖5A所示的第一二值影像50a到50d。其中,每一個第一二值影像當中,由多個對應第一像素值之相鄰像素群聚而形成的白色區塊為原本在水面影像當中具有高亮度表現的區塊,當中也包括對應於散射區塊的高亮度區域。第一二值影像中所包括的白色區塊在本實施例中稱為第一區塊,如第一二值影像50a到50d分別所示的500a、502a、500b、500c及500d。The process of extracting the water surface image from the light source of the illuminator 10 to the image capturing device 12 and graying the surface is the same as that of the foregoing embodiment. For details, refer to the description of the above embodiment. It is worth mentioning that, in this embodiment, the brightness threshold for generating a binary image from the normalized grayscale image includes a first threshold and a second threshold. The second threshold is higher than the first threshold, for example, the first threshold is 0.6 and the second threshold is 0.8. The processor 14 firstly divides the pixels of the grayscale image into two pixel values of the first pixel value and the second pixel value according to the first threshold value, thereby generating the first binary image, such as the first binary image as shown in FIG. 5A. 50a to 50d. Wherein, in each of the first binary images, the white block formed by the plurality of adjacent pixels corresponding to the first pixel value is a block having high brightness performance in the water surface image, which also includes corresponding to The high-brightness area of the scattering block. The white blocks included in the first binary image are referred to as the first block in this embodiment, such as 500a, 502a, 500b, 500c, and 500d shown in the first binary image 50a to 50d, respectively.

所述的第一二值影像50a到50d中,同樣也可能包含有多於一個第一區塊的可能性,因此,處理器14亦可先經過標籤化的處理,排除當中區塊數量大於1的第一二值影像,並保留區塊數量為1的第一二值影像為候選影像。如第一二值影像50a中包含有兩個白色區塊500a及502a,使其區塊數量超過1,因此,處理器14即捨棄區塊數量大於1的第一二值影像50a,並保留其餘的第一二值影像50b到50d作為候選影像。接著參照圖5B,處理器14可再依照較高的第二門檻值,再度將分別產生候選影像(即本例中的第一二值影像50b到50d)的灰階影像的像素值畫分為第三像素值及第四像素值兩類,以分別產生第二二值影像52b到52d。The first binary image 50a to 50d may also contain more than one first block. Therefore, the processor 14 may also perform labeling processing to eliminate the number of blocks in the block. The first binary image, and the first binary image with the number of blocks of 1 is reserved as the candidate image. For example, the first binary image 50a includes two white blocks 500a and 502a, such that the number of blocks exceeds 1. Therefore, the processor 14 discards the first binary image 50a whose number of blocks is greater than 1, and retains the rest. The first binary image 50b to 50d is used as a candidate image. Referring to FIG. 5B, the processor 14 can further divide the pixel values of the grayscale images respectively generating the candidate images (ie, the first binary images 50b to 50d in this example) according to the higher second threshold. The third pixel value and the fourth pixel value are two types to generate second binary images 52b to 52d, respectively.

第三像素值與第一像素值相同,而第四像素值則與第二像素值相同。換言之,在本例中,第三像素值為1,第四像素值為0,使得對應第三像素值的像素為白色,對應於第四像素值的像素為黑色。經畫分後的第二二值影像52b到52d當中,由多個第三像素值群聚所形成的白色區塊稱為第二區塊,如圖5B中的520b、520c及520d。由於第二門檻值高於第一門檻值,因此,同一灰階影像當中,根據第一門檻值被畫分為像素值1的像素,有一部分在根據第二門檻值畫分時,則會被判斷為像素值為0。故而第二區塊在影像中的位置必然重疊於相對應的候選影像中所包含的第一區塊,且第二區塊的面積亦不大於相對應候選影像中的第一區塊的面積。The third pixel value is the same as the first pixel value, and the fourth pixel value is the same as the second pixel value. In other words, in this example, the third pixel value is 1 and the fourth pixel value is 0, such that the pixel corresponding to the third pixel value is white, and the pixel corresponding to the fourth pixel value is black. Among the divided second binary images 52b to 52d, the white blocks formed by the plurality of third pixel value clusters are referred to as second blocks, as shown by 520b, 520c, and 520d in FIG. 5B. Since the second threshold value is higher than the first threshold value, among the same grayscale image, pixels that are divided into pixel values according to the first threshold value, and some of the pixels are scored according to the second threshold value, It is judged that the pixel value is 0. Therefore, the position of the second block in the image necessarily overlaps the first block included in the corresponding candidate image, and the area of the second block is not greater than the area of the first block in the corresponding candidate image.

由於在選取候選影像時,已經進行過標籤化處理而剔除具有兩處以上高亮度區域的影像,故而針對所述候選影像而產生的第二二值影像當中,亦僅會具有一個第二區塊,可省略再次進行標籤化處理的程序。Since the image of the candidate image is selected and the image having two or more high-luminance regions is removed, only the second block of the second binary image generated for the candidate image has only one second block. The program for re-charging can be omitted.

處理器14分別取得各個候選影像的第一區塊及與候選影像對應的第二二值影像的第二區塊後,可分別計算每一候選影像的第一區塊及第二區塊的面積,並且計算第二區塊的面積相較於第一區塊的面積的比值,以作為本實施例中的面積參數。具體來說,如圖5A所示的第一二值影像50b、50c、50d及分別於圖5B相對應的第二二值影像52b、52c、52d,處理器14可分別計算第二區塊520b相較於第一區塊500b的面積比值,第二區塊520c相較於第一區塊500c的面積比值,以及第二區塊520d相較於第一區塊500d的面積比值,所計算出來的面積參數可暫存於記憶單元16中。After the processor 14 obtains the first block of each candidate image and the second block of the second binary image corresponding to the candidate image, the processor can separately calculate the area of the first block and the second block of each candidate image. And calculating the ratio of the area of the second block to the area of the first block as the area parameter in the present embodiment. Specifically, as shown in FIG. 5A, the first binary image 50b, 50c, 50d and the second binary image 52b, 52c, 52d corresponding to FIG. 5B respectively, the processor 14 can calculate the second block 520b. Comparing the area ratio of the first block 500b, the area ratio of the second block 520c to the first block 500c, and the area ratio of the second block 520d to the first block 500d are calculated. The area parameters can be temporarily stored in the memory unit 16.

待處理器14完成對所有候選影像中相對應第一區塊及第二區塊的面積參數之計算後,可利用篩選值篩選所述的候選影像,藉以排除仍然含有雜訊的候選影像。具體來說,係用以排除如圖4所示包含有雜訊之白色區塊的候選影像。在本實施例中,參照圖5A及5B所示的第一區塊及第二區塊,可知第二區塊520b相較於第一區塊500b的面積比值可能超出篩選值而被排除。詳細說明請參照圖4及其對應內容,於此不再重述。本實施例的篩選值可為所述用以進行篩選的多個候選影像的面積參數的平均值,處理器14可將面積參數大於篩選值的候選影像篩除,保留面積參數不大於面積參數之平均值的候選影像,再計算被保留的候選影像之面積參數的參數統計值,也就是對應於散射區塊的面積比值平均值,用以與預存在記憶單元16中的濁度對照表進行比對,以判斷受測水源2的濁度等級。After the processor 14 completes the calculation of the area parameters of the corresponding first block and the second block in all candidate images, the candidate image may be filtered by using the screening value to exclude candidate images that still contain noise. Specifically, it is used to exclude candidate images of white blocks containing noise as shown in FIG. In this embodiment, referring to the first block and the second block shown in FIGS. 5A and 5B, it can be seen that the area ratio of the second block 520b to the first block 500b may be excluded from the screening value. For details, please refer to FIG. 4 and its corresponding content, which will not be repeated here. The screening value of the embodiment may be an average value of the area parameters of the plurality of candidate images used for screening, and the processor 14 may screen the candidate image whose area parameter is greater than the screening value, and the reserved area parameter is not greater than the area parameter. The candidate image of the average value, and then calculating the parameter statistical value of the area parameter of the retained candidate image, that is, the average of the area ratio corresponding to the scattering block, for comparison with the turbidity comparison table in the pre-existing memory unit 16. Yes, to determine the turbidity level of the tested water source 2.

在本實例中的濁度對照表記錄了多種不同的散射區塊的面積比值的區間(range)或臨界值,以及各個面積比值區間或臨界值所對應的濁度等級,處理器14計算出參數統計值之後,即可根據參數統計值比對預設的濁度對照表。The turbidity table in this example records the range or threshold of the area ratio of a plurality of different scattering blocks, and the turbidity level corresponding to each area ratio interval or threshold, and the processor 14 calculates the parameters. After the statistical value, the preset turbidity comparison table can be compared according to the parameter statistics.

特別說明的是,利用面積比值判斷水質的手段在特定環境平均亮度(Environment Average Light,EAL)範圍內能發揮較佳的效果。所述的環境平均亮度係指不包括發光器10所照射的同調光源在內的受測水源2的平均亮度。例如以影像擷取裝置12擷取未開啟發光器10之光源時的水面影像,並計算所述不包含發光器10光源的水面影像之全部像素亮度值的平均。每一像素的亮度值可從0到255(即最暗到最亮),故整個不含同調光源之水面影像的平均亮度值亦會界於0到255之間。根據實驗之結果,當所述不含同調光源之水面影像的平均亮度值(也就是環境平均亮度)界於大約20到80之間時,執行上述以面積比值判斷水質的手段可獲得較精確的結果。In particular, the means for determining the water quality using the area ratio can exert a better effect in the specific environment average brightness (EAL) range. The ambient average brightness refers to the average brightness of the tested water source 2 excluding the coherent light source illuminated by the illuminator 10. For example, the image capturing device 12 captures the water surface image when the light source of the illuminator 10 is not turned on, and calculates an average of the luminance values of all the pixels of the water surface image that does not include the light source of the illuminator 10. The brightness value of each pixel can range from 0 to 255 (ie, the darkest to the brightest), so the average brightness value of the entire water surface image without the same source is also between 0 and 255. According to the result of the experiment, when the average brightness value (that is, the ambient average brightness) of the water surface image without the homology light source is between about 20 and 80, the above method for judging the water quality by the area ratio can be accurately obtained. result.

因此,發光器10可受控制中心的控制,定時短暫停止發射同調光,並於光發器10暫停發光的時間由影像擷取裝置12擷取不含同調光源的水面影像,以供處理器14計算當時的環境平均亮度,並判斷是否仍適合繼續採用本實施例所介紹的以面積比例評估水質之作法。Therefore, the illuminator 10 can be controlled by the control center to stop transmitting the same dimming signal for a short time, and the image capturing device 12 captures the water surface image without the coherent light source for the processor 14 when the light emitting device 10 pauses to emit light. Calculate the average ambient brightness at that time and determine whether it is still suitable to continue the practice of assessing water quality by area ratio as described in this example.

綜上所述,利用面積比值來判斷水質的作法,可使得水質檢測系統1較能抵抗發光器10所發射的同調光之外的環境光源干擾。即使相同濁度的受測水源2在不同強度的環境光源干擾下,可能影響高亮度區域的總面積大小,但同一水面影像中以不同門檻值畫分出來的高亮度區域的面積比值卻能維持一致。換言之,從原始水面影像衍生的第一二值影像的第一區塊的面積,在環境光源的干擾程度低時會大於環境光源的干擾程度高時的面積,但同一水面影像衍生的第一區塊及第二區塊的面積比值不論環境光源的強弱,都會維持一致,也就是說,當環境光源的干擾由弱變強或由強變弱時,第一區塊和第二區塊的面積會對應地同步縮減或同步擴張,因此比值仍然可維持一致。藉此,即使發光器10及影像擷取裝置12無法設置在完全或幾乎無環境光源的處所,水質檢測系統1仍可正確檢測受源水源2的濁度。In summary, the use of the area ratio to determine the water quality can make the water quality detection system 1 more resistant to interference from ambient light sources other than the dimming emitted by the illuminator 10. Even if the water source 2 of the same turbidity interferes with the ambient light source of different intensities, it may affect the total area of the high-brightness area, but the area ratio of the high-brightness area drawn by different threshold values in the same water surface image can be maintained. Consistent. In other words, the area of the first block of the first binary image derived from the original water surface image is larger than the area where the interference level of the ambient light source is high when the interference level of the ambient light source is low, but the first area derived from the same water surface image The area ratio of the block and the second block will remain the same regardless of the strength of the ambient light source, that is, the area of the first block and the second block when the interference of the ambient light source is weakened or weakened. Correspondingly, the synchronization is reduced or synchronized, so the ratio is still consistent. Thereby, even if the illuminator 10 and the image capturing device 12 cannot be disposed in a place with no or almost no ambient light source, the water quality detecting system 1 can correctly detect the turbidity of the source water source 2.

本實施例中與前一實施例手段相同的部分請參照前一實施例之說明,本實施例中不再贅述。For the same parts as the previous embodiment, refer to the description of the previous embodiment, and details are not described in this embodiment.

[水質檢測方法實施例][Water quality testing method example]

接下來請參閱圖6,圖6繪示了本發明提供的一種水質檢測方法實施例的流程圖。所述的水質檢測方法可利用如圖1所示的水質檢測系統實作,故請一併參照圖1所示的方塊圖以利說明。Next, please refer to FIG. 6. FIG. 6 is a flow chart of an embodiment of a water quality detecting method provided by the present invention. The water quality detecting method can be implemented by using the water quality detecting system shown in FIG. 1, so please refer to the block diagram shown in FIG. 1 for illustration.

發光器10可接收遠端的控制中心所發出的命令而開始向受測水源2發射同調光(S601),並由影像擷取裝置12連續擷取受測水源2的水面影像(S603)。水面影像中包含發光器10發射的光源碰撞受測水源2中的懸浮粒子而散射的漸層影像,且漸層影像的亮度自邊緣向中心逐漸增加,因而在漸層影像的中央部分形成高亮度區域。The illuminator 10 can receive the command from the remote control center to start emitting the same dimming light to the water source 2 to be tested (S601), and the image capturing device 12 continuously captures the water surface image of the water source 2 to be tested (S603). The water surface image includes a gradation image in which the light source emitted from the illuminator 10 collides with the suspended particles in the water source 2 to be measured, and the brightness of the gradation image gradually increases from the edge toward the center, thereby forming a high brightness in the central portion of the gradation image. region.

在遠端的處理器14經由有線或無線網路接收被擷取的多個水面影像並進行影像處理,以獲得每一個水面影像中對應於高亮度區域的散射區塊(S605)。處理器14進一步計算各個散射區塊的面積參數,並且以篩選值比對各個面積參數,以篩除含有會影響水質檢測結果的雜訊的水面影像(S607),並且再依據被保留下來的水面影像的面積參數計算參數統計值(S609),例如為被保留下來的水面影像的面積參數之平均值,用以供評估水質濁度。最後,處理器14可根據參數統計值比對一預設的濁度對照表(S611),以根據濁度對照表中記錄的多種不同濁度等級以及相對應的參數統計值區間或臨界值,判定受測水源2所屬的濁度等級。The remote processor 14 receives the captured plurality of water surface images via a wired or wireless network and performs image processing to obtain a scattering block corresponding to the high luminance region in each of the water surface images (S605). The processor 14 further calculates the area parameters of the respective scattering blocks, and compares the respective area parameters with the screening values to screen out the water surface image containing the noise that affects the water quality detection result (S607), and then according to the retained water surface. The area parameter of the image calculates the parameter statistic (S609), for example, the average of the area parameters of the retained water image for evaluating the turbidity of the water. Finally, the processor 14 may compare a preset turbidity comparison table according to the parameter statistics (S611), according to a plurality of different turbidity levels recorded in the turbidity comparison table and corresponding parameter statistical value intervals or threshold values, The turbidity level to which the water source 2 to be tested belongs is determined.

[水質檢測方法另一實施例][Another Embodiment of Water Quality Detection Method]

請參閱圖7所示的本發明另一個水質檢測方法實施例的流程圖,本實施例進一步說明了處理器對影像擷取裝置所擷取到的水面影像的處理過程,以及獲得用以評估水質狀況的散射區塊的步驟,請一併參照圖1所示的方塊圖及其中元件以利理解。Please refer to the flowchart of another embodiment of the water quality detecting method of the present invention shown in FIG. 7. This embodiment further describes the processing process of the water surface image captured by the image capturing device by the processor, and is obtained for evaluating the water quality. For the steps of the scattering block of the condition, please refer to the block diagram shown in FIG. 1 and its components for understanding.

發光器10以實質上垂直於受測水源2的角度向受測水源2發射如雷射光的同調光源(S701),以便由影像擷取裝置12擷取水表面的水面影像(S703),水面影像包含有光線因受測水源2中的懸浮粒子阻擋而散射於水表面的漸層影像。漸層影像的亮度從邊緣向中心逐漸增強,而在漸層影像的中央部分形成高亮度區域。The illuminator 10 emits a coherent light source such as laser light to the water source 2 under test at an angle substantially perpendicular to the water source 2 to be tested (S701), so that the water surface image of the water surface is captured by the image capturing device 12 (S703), and the water surface image includes A gradation image of light scattered on the surface of the water due to the blocking of suspended particles in the water source 2 under test. The brightness of the gradation image gradually increases from the edge toward the center, and a high-luminance region is formed in the central portion of the gradation image.

處理器14接收到被擷取的水面影像後可對水面影像進行灰階化處理(S705),將彩色的水面影像轉換為灰階影像,並可進一步將灰階影像中的像素值加以正規化(S707),使得原本包括256階層的灰階影像的像素值分佈於0到1之間。After receiving the captured water surface image, the processor 14 can perform grayscale processing on the water surface image (S705), convert the color water surface image into a grayscale image, and further normalize the pixel values in the grayscale image. (S707), the pixel values of the grayscale image originally including 256 levels are distributed between 0 and 1.

接著處理器14可再根據亮度門檻對灰階影像進行像素值的分類,以產生二值影像(S709)。亮度門檻可為預定的像素值,例如為0.8,用以比對正規化後的灰階影像中的各像素值,並將大於或等於亮度門檻的像素值指定為第一像素值,以及將小於亮度門檻的像素值指定為第二像素值。其中,第一像素值可為1,代表白色及高亮度的像素,第二像素值可為0,代表黑色及低亮度像素。藉此即可產生對應於水面影像的二值影像。值得一提的是,所述的亮度門檻亦可為適用於不經正規化的灰階影像的像素值,例如為204,用以將像素值範圍為0到255的灰階影像,畫分為像素值大於或等於204者為第一像素值、小於204者為第二像素值的二值影像,故而前述步驟S707亦可視亮度門檻的設定而省略。The processor 14 can then classify the grayscale image according to the brightness threshold to generate a binary image (S709). The brightness threshold may be a predetermined pixel value, for example, 0.8, for comparing each pixel value in the normalized grayscale image, and specifying a pixel value greater than or equal to the brightness threshold as the first pixel value, and will be smaller than The pixel value of the luminance threshold is specified as the second pixel value. The first pixel value may be 1, representing white and high brightness pixels, and the second pixel value may be 0, representing black and low brightness pixels. Thereby, a binary image corresponding to the water surface image can be generated. It is worth mentioning that the brightness threshold may also be a pixel value suitable for a grayscale image that is not normalized, for example, 204, for dividing a grayscale image with a pixel value ranging from 0 to 255. If the pixel value is greater than or equal to 204, the first pixel value is less than 204, and the second pixel value is less than 204. Therefore, the above step S707 may be omitted depending on the setting of the brightness threshold.

二值影像當中可能包括一或多個由多個屬於第一像素值的相鄰相素群聚所形成的白色區塊,為了便於後續的運算處理,處理器14可先對白色區塊進行形態學的膨脹或侵蝕處理以消除區塊的毛邊(S711)。所述的一或多個白色區塊中包括有對應於前述水面影像的的高亮度區域的散射區塊,但亦可能包括受測水源2流動過程中撞擊水道壁而產生的雜訊,為了將雜訊加以排除,處理器14還可對二值影像執行標籤化處理,計算出二值影像中的白色區塊的區塊數量(S713),並判斷區塊數量是否為1(S715)。若所述二值影像的區塊數量是1,則代表二值影像中的唯一一個白色區塊對應於用以評估水質的散射區塊,處理器14即可接著計算所述二值影像的白色區塊的面積參數,例如為白色區塊的總面積(像素個數),並儲存於記憶單元16中(S717)。若區塊數量大於1,則代表二值影像中包括有散射區塊以外的雜訊,則二值影像的面積參數就不會被計算和儲存。The binary image may include one or more white blocks formed by a plurality of adjacent phase clusters belonging to the first pixel value. To facilitate subsequent processing, the processor 14 may first perform the shape on the white block. The expansion or erosion treatment is performed to eliminate the burrs of the block (S711). The one or more white blocks include a scattering block corresponding to a high-luminance region of the water surface image, but may also include noise generated when the water source 2 is tested to impinge on the water channel wall, in order to The noise is excluded, and the processor 14 can perform labeling processing on the binary image, calculate the number of blocks of the white block in the binary image (S713), and determine whether the number of blocks is 1 (S715). If the number of blocks of the binary image is 1, it means that the only one white block in the binary image corresponds to the scattering block for evaluating the water quality, and the processor 14 can then calculate the white color of the binary image. The area parameter of the block is, for example, the total area (number of pixels) of the white block, and is stored in the memory unit 16 (S717). If the number of blocks is greater than 1, it means that the binary image includes noise other than the scattering block, and the area parameter of the binary image is not calculated and stored.

無論二值影像的面積參數是否被計算儲存,處理器14都可判斷是否已計算完所有被擷取的水面影像的散射區塊資料(S719),若尚未將全部的水面影像的資料計算完畢,則可選擇下一個水面影像(S721)並返回步驟S705以下繼續進行相同的處理,直到全部的水面影像的資料都已分析計算完成(即步驟S719的判斷結果為是)時,再由處理器14對被儲存的二值影像進行進一步的篩選。Regardless of whether the area parameter of the binary image is calculated or not, the processor 14 can determine whether the scattered block data of all captured water images has been calculated (S719). If the data of all the water surface images has not been calculated yet, Then, the next water surface image can be selected (S721) and the process returns to step S705 to continue the same process until all the data of the water surface image has been analyzed and calculated (ie, the determination result in step S719 is YES), and then the processor 14 The selected binary images are further screened.

為了避免屬於雜訊的白色區塊與屬於散射區塊的白色區塊相連,而在標籤化過程中未被正確剔除,故而處理器14可利用特定篩選值比對每一個被儲存的面積參數,以排除面積參數超過篩選值的二值影像(S723)。所述的篩選值可為所有將被篩選的二值影像的面積參數的平均值,故而處理器14在步驟S723當中可先計算記憶單元16所儲存的所有面積參數的平均值為篩選值後,再根據篩選值比對各個二值影像的面積參數,並摒棄面積參數大於篩選值的二值影像及其面積參數,例如將所述的面積參數從記憶單元16中刪除,並保留不大於篩選值的二值影像的面積參數以供計算出參數統計值,被保留的二值影像為候選影像。In order to avoid that the white block belonging to the noise is connected to the white block belonging to the scattering block and is not correctly rejected during the labeling process, the processor 14 can compare each stored area parameter with a specific screening value. The binary image whose area parameter exceeds the screening value is excluded (S723). The filter value may be an average value of the area parameters of all the binary images to be screened. Therefore, the processor 14 may first calculate the average value of all the area parameters stored in the memory unit 16 as the filter value in step S723. Then, the area parameters of each binary image are compared according to the screening value, and the binary image whose area parameter is larger than the screening value and its area parameter are discarded, for example, the area parameter is deleted from the memory unit 16, and the value is not greater than the screening value. The area parameter of the binary image is used to calculate the parameter statistics, and the retained binary image is the candidate image.

為了使最後用於評估水質所用的參數統計值的數值收斂與集中,處理器14可對二值影像的面積參數不止一次以篩選值進行篩選,例如預設進行兩次的篩選程序。故可在步驟S723的篩選程序之後,判斷是否已經進行了預設次數的篩選(S725)。若篩選的次數尚未到達預設次數,處理器14可返回步驟S723,再次對前次篩選後仍保留的面積參數以篩選值進行篩選。此時的篩選值雖仍為面積參數的平均值,但用於進行篩選的面積參數的數量已經經過前一次的篩選而減少,故每一次篩選所使用的篩選值之數值將略有差異。In order to converge and concentrate the values of the parameter statistics used for the final evaluation of the water quality, the processor 14 may filter the area parameters of the binary image more than once by the screening value, for example, a screening process that is preset twice. Therefore, after the screening process of step S723, it is judged whether or not the predetermined number of times of screening has been performed (S725). If the number of times of screening has not reached the preset number of times, the processor 14 may return to step S723 to filter the area parameters still retained after the previous screening by the screening value. Although the screening value at this time is still the average value of the area parameters, the number of area parameters used for screening has been reduced by the previous screening, so the value of the screening value used for each screening will be slightly different.

對二值影像的面積參數進行過預設次數的篩選後(即步驟S725的判斷結果為是),處理器14再根據尚被保留在記憶單元16中的二值影像的面積參數計算出所述的參數統計值(S727)。本例中的參數統計值亦可為所述被保留的面積參數的平均值,代表受測水源2中的懸浮粒子所產生的平均散射區塊的大小,並且根據計算出來的參數統計值與濁度對照表加以比對(S729)。濁度對照表中記錄了多個水質的濁度等級,以及每個濁度等級所對應的參數統計值的區間或臨界值,藉此判斷出所述受測水源2的濁度等級。After the area parameter of the binary image is filtered by a preset number of times (ie, the result of the determination in step S725 is YES), the processor 14 calculates the area parameter according to the area parameter of the binary image that is still retained in the memory unit 16. Parameter statistics (S727). The parameter statistical value in this example may also be an average value of the reserved area parameters, representing the size of the average scattering block generated by the suspended particles in the tested water source 2, and according to the calculated parameter statistical value and turbidity. The comparison table is compared (S729). The turbidity comparison table records the turbidity levels of the plurality of water quality, and the interval or critical value of the parameter statistical values corresponding to each turbidity level, thereby determining the turbidity level of the tested water source 2.

[水質檢測方法的再一實施例][Another embodiment of the water quality detecting method]

請參照圖8,圖8所示則為本發明提供的另一個水質檢測方法實施例的流程圖。與圖7所示實施例相同的,係先由發光器10向受測水源2發射同調光(S801),再由影像擷取裝置12擷取包括有漸層影像的水面影像(S803),並由處理器14接收水面影像後依序對水面影像進行灰階化以產生灰階影像(S805),以及將灰階影像之像素值正規化使像素值分佈於0到1之間(S807)的處理。Please refer to FIG. 8. FIG. 8 is a flow chart of another embodiment of a water quality detecting method provided by the present invention. The same as the embodiment shown in FIG. 7, the illuminator 10 first emits the same dimming light to the water source 2 to be tested (S801), and then the image capturing device 12 captures the water surface image including the gradation image (S803), and After receiving the water surface image by the processor 14, the water surface image is gray-scaled to generate a grayscale image (S805), and the pixel values of the grayscale image are normalized so that the pixel values are distributed between 0 and 1 (S807). deal with.

與圖7所示實施例不同之處在於,本實施例中,處理器用以畫分灰階影像之像素值以產生二值影像的亮度門檻包括第一門檻值及第二門檻值,且第二門檻值高於第一門檻值。處理器14首先以第一門檻值比對灰階影像的各像素值,將灰階影像中高於第一門檻值的像素指定為第一像素值,而不大於第一門檻值的像素則指定為第二像素值,藉此而產生第一二值影像(S809)。其中由多個相鄰的第一像素值群聚所形成的白色區塊稱為第一區塊,處理器14可進一步對第一區塊進行形態學的膨脹及侵蝕處理以消除第一區塊的毛邊。The difference from the embodiment shown in FIG. 7 is that, in this embodiment, the brightness threshold of the processor for drawing the pixel values of the grayscale image to generate the binary image includes the first threshold and the second threshold, and the second The threshold is higher than the first threshold. The processor 14 firstly specifies, according to the first threshold value, the pixels of the grayscale image that are higher than the first threshold value as the first pixel value, and the pixels that are not greater than the first threshold value, The second pixel value, thereby generating the first binary image (S809). The white block formed by the clustering of the plurality of adjacent first pixel values is referred to as a first block, and the processor 14 may further perform morphological expansion and erosion processing on the first block to eliminate the first block. The raw edges.

接著,處理器14同樣可對第一二值影像執行標籤化處理程序,計算第一二值影像當中所包括的第一區塊的區塊數量(S811),再判斷目前處理的第一二值影像的區塊數量是否為1(S813)。若第一二值影像的區塊數量為1,代表影像中的第一區塊即為對應水面影像中高亮度區域的散射區塊,所述的第一二值影像可被選為候選影像,且處理器14更以第二門檻值再度對第一二值影像所對應的灰階影像進行像素值的畫分,以產生另一個二值影像,稱為第二二值影像(S815)。Then, the processor 14 can also perform a labeling processing procedure on the first binary image, calculate the number of blocks of the first block included in the first binary image (S811), and determine the first binary value currently processed. Whether the number of blocks of the image is 1 (S813). If the number of blocks of the first binary image is 1, the first block in the image is a scattering block corresponding to the high-brightness area in the water image, and the first binary image can be selected as a candidate image, and The processor 14 further divides the pixel value of the grayscale image corresponding to the first binary image by the second threshold to generate another binary image, which is called a second binary image (S815).

在步驟S815當中,處理器14根據第二門檻值比對灰階影像各像素的像素值,並將像素值大於第二門檻值的像素指定為第三像素值,而不大於第二門檻值者指定為第四像素值。其中,第三像素值與第一像素值同為1,第四像素值與第二像素值同為0。由多個相鄰的第三像素值群聚所形成對應於散射區塊的白色區塊則稱為第二區塊。由於第二門檻值高於第一門檻值,因此第二區塊的面積將小於第一區塊。In step S815, the processor 14 compares the pixel values of the pixels of the grayscale image according to the second threshold value, and specifies the pixel whose pixel value is greater than the second threshold value as the third pixel value, and is not greater than the second threshold value. Specified as the fourth pixel value. The third pixel value is the same as the first pixel value, and the fourth pixel value and the second pixel value are the same as 0. A white block formed by a plurality of adjacent third pixel value clusters corresponding to the scattering block is referred to as a second block. Since the second threshold is higher than the first threshold, the area of the second block will be smaller than the first block.

待處理器14分別從相同的灰階影像產生第一二值影像及第二二值影像及相對應的第一區塊和第二區塊後,處理器14可分別計算第二區塊的面積相較於第一區塊的面積的比值,並儲存在記憶單元16中,以作為本實施例中的面積參數(S817)。After the processor 14 generates the first binary image and the second binary image and the corresponding first block and the second block from the same grayscale image, the processor 14 can calculate the area of the second block separately. The ratio of the area of the first block is compared and stored in the memory unit 16 as the area parameter in the present embodiment (S817).

在處理器14計算出面積參數(即步驟S817)之後,或是第一二值影像的區塊數量被判斷為多於1個而未被選為候選影像(即步驟S813的判斷結果為否)之後,處理器14都會判斷是否已計算完所有被擷取的水面影像的散射區塊資料(S819),若尚有未計算的水面影像的資料,則可選擇下一個水面影像(S821)並返回步驟S805以下繼續進行相同的處理,直到全部的水面影像的資料都已分析計算完成(即步驟S819的判斷結果為是)時,再由處理器14對被儲存的面積參數進行篩選。After the processor 14 calculates the area parameter (ie, step S817), or the number of blocks of the first binary image is determined to be more than one and is not selected as the candidate image (ie, the determination result in step S813 is no) After that, the processor 14 determines whether the scattered block data of all the captured water surface images has been calculated (S819), and if there is still uncalculated water surface image data, the next water surface image (S821) can be selected and returned. In step S805, the same processing is continued until all the data of the water surface image has been analyzed and calculated (ie, the determination result in step S819 is YES), and then the processor 14 filters the stored area parameters.

在算出並儲存所有通過亮度門檻篩選的面積參數後,處理器14還繼續再利用篩選值篩選所述的面積參數(S823),而本例中的篩選值則可為被儲存在記憶單元16中的面積比值的平均值,藉以摒除大於篩選值的面積參數。處理器14篩選後還判斷以篩選值進行篩選的次數是否已經到達預設次數(S825),若尚未到達則返回步驟S823再度對面積參數進行篩選,藉以收斂和集中面積參數的數值;反之,當篩選的次數已經符合預設次數的要求時,處理器14再根據仍被保留的面積參數計算參數統計值(S827),在本例中亦可為面積比值的平均值。最後再以所述的參數統計值與濁度對照表中的資料進行比對(S829),以根據參數統計值在濁度對照表中對應的濁度等級,判定受測水源2的水質。After calculating and storing all the area parameters filtered by the brightness threshold, the processor 14 further continues to filter the area parameters by using the filter values (S823), and the filter values in this example may be stored in the memory unit 16. The average of the area ratios to exclude area parameters greater than the filter value. After screening, the processor 14 further determines whether the number of times of screening by the screening value has reached a preset number of times (S825). If not, the process returns to step S823 to filter the area parameters again, thereby converging and concentrating the values of the area parameters; When the number of times of screening has met the requirements of the preset number of times, the processor 14 calculates the parameter statistics according to the area parameters still reserved (S827), which in this example may also be the average of the area ratio values. Finally, the parameter statistical value is compared with the data in the turbidity comparison table (S829), and the water quality of the tested water source 2 is determined according to the corresponding turbidity level in the turbidity comparison table according to the parameter statistical value.

上述步驟S823到S829的詳細作法與圖7所示流程中的步驟S723到S729相近,故請參照對應於圖7的相關說明,於此不再贅述。The detailed operations of the above steps S823 to S829 are similar to the steps S723 to S729 in the flow shown in FIG. 7, so please refer to the related description corresponding to FIG. 7, and details are not described herein again.

[水質檢測系統校正方法實施例][Water quality detection system correction method example]

除了水質的混濁程度會影像被擷取到的水面影像上的圖像表現之外,發光器10本身的發光功率若不穩定,在相同水質條件下也會使水面影像產生不同的圖像表現。例如當發光器10因久用而使得功率衰減時,即使受測水源2的水質沒有變化,水面影像的高亮度區域仍會光能量的減少而縮小,致使後端產生誤判。為了避免因發光器10的發光功率衰退造成的誤判,故需要定時偵測檢測系統1是否因發光器10的發光功率衰退而有誤差,並且在發現檢測系統1出現誤判時加以校正。由於採用遠距式的水質檢測手段,發光器10與管理人員所在的控制中心或處理器14可能相距超過目測距離,因此,若能利用影像擷取裝置12所擷取到的影像來判斷發光器10是否有功衰的情況產生,係為最便捷的手段之一,故本實施例即提供一種利用影像來判別及校正前述各實施例所指的水質檢測系統1的方法。In addition to the turbidity of the water quality, the image on the water surface image captured by the image is not stable. If the illuminating power of the illuminator 10 itself is unstable, the water surface image will produce different image representation under the same water quality conditions. For example, when the illuminator 10 is used for a long time to attenuate the power, even if the water quality of the water source 2 is not changed, the high-luminance region of the water surface image is reduced by the reduction of the light energy, causing the back end to be misjudged. In order to avoid erroneous judgment due to the deterioration of the illuminating power of the illuminator 10, it is necessary to detect whether the detecting system 1 has an error due to the fading of the illuminating power of the illuminator 10, and to correct it when it is found that the detecting system 1 is erroneously judged. Since the remote water quality detecting means is adopted, the illuminator 10 may be separated from the control center or the processor 14 where the manager is located by more than the visual distance. Therefore, if the image captured by the image capturing device 12 can be used to determine the illuminator It is one of the most convenient means to generate a power failure condition. Therefore, the present embodiment provides a method for discriminating and correcting the water quality detecting system 1 referred to in the foregoing embodiments by using an image.

請參閱圖9所繪示的一種水質檢測系統校正方法實施例之流程圖,所述的方法可用以校正如圖1所示的水質檢測系統1的發光器10因功率衰退造成的檢測結果錯誤。本實施例係利用水質檢測系統1的發光器10、影像擷取裝置2等剛在受測水源2處剛完成裝設時(S901),發光器10尚未有功率衰退的狀況下,連續對受測水源2進行檢測而計算水質濁度(S903)。由於夜間的環境光源較少,可減少對檢測的干擾,故上述的連續檢測可在夜間進行,例如持續擷取數個小時的水面影像,並進行前述實施例所述的處理而獲得參數統計值,如獲得散射區塊的面積平均值。Please refer to FIG. 9 for a flow chart of a method for correcting a water quality detecting system. The method can be used to correct a detection result error of the illuminator 10 of the water quality detecting system 1 shown in FIG. 1 due to power degradation. In the present embodiment, when the illuminator 10, the image capturing device 2, and the like of the water quality detecting system 1 are just installed at the water source 2 to be tested (S901), the illuminator 10 has not been subjected to power degradation, and is continuously subjected to the power luminescence. The water source 2 is detected to calculate the water turbidity (S903). Since the ambient light source at night is less, the interference to the detection can be reduced, so the above continuous detection can be performed at night, for example, continuously capturing the water surface image for several hours, and performing the processing described in the foregoing embodiment to obtain the parameter statistical value. , such as obtaining the average area of the scattering block.

處理器14根據參數統計值比對濁度對照表可判斷水質檢測系統1剛完成裝置設時所測得的水質濁度,此時處理器14可判斷所測得的水質濁度是否屬於「清澈」等級(S905),換言之,即是透過分析影像擷取裝置12擷取到的影像而找出在水面影像上反應出最小散射能量的情況。The processor 14 can determine the water turbidity measured by the water quality detecting system 1 just after the device is set according to the parameter statistical value comparison turbidity comparison table. At this time, the processor 14 can determine whether the measured water turbidity belongs to the "clear" The level (S905), in other words, is the case where the image captured by the image capturing device 12 is analyzed to find out that the minimum scattering energy is reflected on the water surface image.

若處理器14所分析出來的水質濁度並非為清澈等級,則繼續由發光器10發射同調光及由影像擷取裝置12繼續擷取水面影像(返回步驟S903),直到處理器14比對後,獲得受測水源2之水質在預定的時間長度內都屬於清澈等級,例如從安裝好檢測系統1一周後,測得連續10小時被判斷為屬於清澈等級的水質。當處理器14測得連續一段時間屬於清澈水質的資料後,即計算與記錄所述連續一段時間內被判斷為清澈水質之參數統計值的平均值為校正濁度值,並附加預設的誤差值,以便形成所述檢測系統1的校正濁度範圍(S907)。參數統計值已如前述實施例所述可例如為散射區塊所對應的像素總數之平均值,故校正濁度值可為連續被判斷為清澈的水質之散射區塊的像素數之總平均。If the turbidity of the water analyzed by the processor 14 is not a clear level, the same dimming is continued by the illuminator 10 and the water surface image is continuously captured by the image capturing device 12 (return to step S903) until the processor 14 is aligned. The water quality of the water source 2 to be tested is a clear grade for a predetermined period of time. For example, one week after the installation of the detection system 1 is measured, the water quality judged to be a clear grade for 10 consecutive hours is measured. After the processor 14 measures the data that belongs to the clear water quality for a continuous period of time, the average value of the parameter statistical value determined to be the clear water quality for the continuous period of time is calculated and recorded as the corrected turbidity value, and the preset error is added. Values are formed to form a corrected turbidity range of the detection system 1 (S907). The parameter statistic value may be, for example, an average of the total number of pixels corresponding to the scatter block as described in the foregoing embodiments, so the corrected turbidity value may be the total average of the number of pixels of the scatter block that is continuously determined to be clear water quality.

當處理器14將校正濁度值加上預設的誤差值後,即提供了一個區間範圍,凡是以同一組發光器10及影像擷取裝置12所發射之同調光及所擷取的水面影像中,經處理器14處理後所獲得的參數統計值界於所述的校正濁度範圍內時,可被認為是測得與檢測系統1剛被裝設完成時所測到的相同的清澈水質。例如在檢測系統1裝設完成後檢測得到的校正濁度值為100像素(所述的校正濁度值當然落於濁度對照表當中屬於「清澈」等級的區間範圍內),而預設的誤差值為30像素,故就此組檢測系統1而言,在發光器10剛被裝設使用,其發光功率處於最佳的狀況下,若受測水源2的水質屬於「清澈」的等級時,此組檢測系統1所檢測及計算出來的散射區塊之參數統計值應界於70像素到130像素之間。When the processor 14 adds the corrected turbidity value to the preset error value, a range of intervals is provided, where the same group of illuminators 10 and the image capturing device 12 emit the same dimming and the captured water surface image. The statistical value of the parameter obtained after being processed by the processor 14 is within the range of the corrected turbidity, and can be regarded as the same clear water quality measured when the detection system 1 is just installed. . For example, after the installation of the detection system 1 is completed, the corrected turbidity value is 100 pixels (the corrected turbidity value naturally falls within the range of the "clear" level in the turbidity comparison table), and the preset The error value is 30 pixels. Therefore, in the case of the detection system 1 of the group, when the illuminator 10 is just installed and the illuminating power is optimal, if the water quality of the water source 2 under test is "clear", The parameter statistics of the scattering blocks detected and calculated by the detection system 1 of this group should be between 70 pixels and 130 pixels.

在獲得本組水質檢測系統1初始的校正濁度範圍後,即可使水質檢測系統1正式開始運作,執行前述各實施例所述的水質檢測以判斷受測水源2的水質濁度變化(S909)。在檢測系統1運作過程中,處理器14可監控被分析處理的水面影像所產生的資料當中,是否同樣也有經過連續一段時間(如數小時)的分析和計算後,獲得屬於清澈等級之資料的情況(S911)。若檢測過程中尚未遇到連續被分類為「清澈」的水質時,則返回步驟S909繼續檢測。當水質檢測系統1檢測過程中連續獲得同屬清澈等級的資訊時,處理器14可計算在所述連續時間當中的參數統計值的平均為參考濁度值(S913),例如為此時間內所有被用來計算出參數統計值的散射區塊之像素數的平均。After obtaining the initial corrected turbidity range of the water quality detecting system 1 of the group, the water quality detecting system 1 can be officially started to operate, and the water quality testing described in the above embodiments is performed to determine the turbidity change of the water source of the tested water source 2 (S909) ). During the operation of the detection system 1, the processor 14 can monitor whether the data generated by the analyzed water surface image also has the data of the clear level after a continuous period of time (such as several hours) of analysis and calculation. (S911). If the water quality continuously classified as "clear" has not been encountered during the detection, the process returns to step S909 to continue the detection. When the information of the same level of clearness is continuously obtained during the detection of the water quality detecting system 1, the processor 14 may calculate the average of the parameter statistical values among the consecutive times as the reference turbidity value (S913), for example, all of the time The average of the number of pixels of the scattering block used to calculate the parameter statistics.

處理器14可比對參考濁度值是否小於校正濁度範圍的下限(S915)。以上述例示來說,即是判斷參考濁度值的像素數是否小於70像素。若參考濁度值不小於校正濁度範圍的下限(即最小值),處理器14即可判斷發光器10的發光功率正常未衰減,因此可返回步驟S909以下繼續執行水質檢測及判斷是否再遇到連續一段時間內的水質都屬於清澈等級的情況。The processor 14 may compare whether the reference turbidity value is less than the lower limit of the corrected turbidity range (S915). In the above illustration, it is determined whether the number of pixels of the reference turbidity value is less than 70 pixels. If the reference turbidity value is not less than the lower limit (ie, the minimum value) of the corrected turbidity range, the processor 14 can determine that the illuminating power of the illuminator 10 is normal and not attenuated, so it can return to step S909 to continue the water quality detection and determine whether it is re-occurred. The water quality is in a clear grade for a continuous period of time.

但若處理器14比對參考濁度值與校正濁度範圍的結果,確認參考濁度值小於校正濁度範圍的下限,則判斷此時發光器10的發光功率已經衰退。上述原理在於,當發光器10於檢測系統1剛裝設完成而開始使用時,係處於具有最強發光功率的狀態,在此狀態下將同調光發射到水質屬於清澈等級的受測水源2時,所反應出來的散射能量至少都會表現出最小相當於70像素面積大小的散射區塊。若在檢測系統1運作的過程當中,發光器10維持相同的發光功率或甚至提高發光功率時,被計算出來的參考濁度值應不小於70像素。故若比對後發現參考濁度值小於校正濁度值的下限,也就是參考濁度值所對應的像素數小於70像素時,則可判斷係為發光器10的發光功率衰減,造成在同樣的水質濁度條件下,反應散射能量的散射區塊平均面積縮小。However, if the processor 14 compares the reference turbidity value with the corrected turbidity range and confirms that the reference turbidity value is less than the lower limit of the corrected turbidity range, it is determined that the illuminating power of the illuminator 10 has decayed. The above principle is that when the illuminator 10 is started when the detection system 1 is just installed, it is in a state with the strongest luminous power, and when the same dimming light is emitted to the water source 2 whose water quality belongs to a clear level, The reflected scatter energy will at least exhibit a scattering block with a minimum size equivalent to 70 pixels. If the illuminator 10 maintains the same luminous power or even increases the luminous power during the operation of the detecting system 1, the calculated reference turbidity value should be not less than 70 pixels. Therefore, if the reference turbidity value is less than the lower limit of the corrected turbidity value after the comparison, that is, when the reference turbidity value corresponds to the number of pixels less than 70 pixels, it can be determined that the illuminating power of the illuminator 10 is attenuated, resulting in the same Under the condition of water turbidity, the average area of the scattering blocks of the reactive scattering energy is reduced.

當處理器14經由計算及比對而發現發光器10的功率衰減後,可控制外部的訊號控制設備(未繪示)按照一定的補償比例而調整輸出到發光器10的輸出電壓,以對發光器10的發光模組(如雷射筆的雷射模組)進行對應功率比值的調整校正(S917)。例如按照校正濁度範圍下限值與參考濁度值的比值而對應增加輸出電壓,以提高發光器10的發光功率。After the processor 14 finds the power attenuation of the illuminator 10 through calculation and comparison, the external signal control device (not shown) can be controlled to adjust the output voltage output to the illuminator 10 according to a certain compensation ratio to illuminate The illumination module of the device 10 (such as the laser module of the laser pointer) performs adjustment adjustment of the corresponding power ratio (S917). For example, the output voltage is increased in accordance with the ratio of the corrected turbidity range lower limit value to the reference turbidity value to increase the luminous power of the illuminator 10.

處理器14可在校正發光器10的發光功率後,立即於受測水源2還處於清澈等級的狀態下,再度擷取及分析新接收到的多個水面影像(S919)。經過灰階化、二值化及標籤化等程序後,再度算出新的參數統計值,並驗證新的參數統計值是否不小於校正濁度範圍的下限(S921)。若參數統計值仍然小於校正濁度範圍的下限,處理器14可根據新的參數統計值與校正濁度範圍的下限的差距再度調整輸出電壓,以對發光器10的發光功率進行微調(S923),並藉由反覆的即時驗證(即返回步驟S917)和判斷(即步驟S921),直到新的參數統計值不小於校正濁度範圍的下限為止,而完成所述的校正程序(S925)。The processor 14 can again retrieve and analyze the newly received plurality of water surface images after the illumination power of the illuminator 10 is corrected, and the measured water source 2 is still in a clear state (S919). After grayscale, binarization, and labeling, the new parameter statistics are calculated again, and it is verified whether the new parameter statistics are not less than the lower limit of the corrected turbidity range (S921). If the parameter statistical value is still less than the lower limit of the corrected turbidity range, the processor 14 may re-adjust the output voltage according to the difference between the new parameter statistical value and the lower limit of the corrected turbidity range to finely adjust the luminous power of the illuminator 10 (S923). And the verification procedure is completed (S925) by repeated instant verification (ie, returning to step S917) and judgment (ie, step S921) until the new parameter statistic is not less than the lower limit of the corrected turbidity range.

值得一提的是,誤差值所界定的誤差容許範圍大小也會影響校正方法的精準度,若誤差值所界定的誤差容許範圍較小時,發光器10的功率衰減較易被發現。反之,若誤差值界定的誤差容許範圍較大,發光器10需在有較明顯的功率衰退時才會被處理器14檢測出來。當處理器14所比對的參考濁度值或新計算出來的參數統計值已大於或等於校正濁度範圍下限,而仍欲得知發光器10的發光功率是否有衰減的情況發生時,則可在初始裝設水質檢測系統1時額外增設另一組發光器及影像擷取裝置做為對照組,比較兩組發光器及相對應影像擷取裝置在相同條件下擷取到的水面影像所產生的參數統計值是否相近或相同,抑或是具有明顯的數值差異,藉以判斷其中一組發光器10的發光功率是否維持在正常範圍或已經衰減而需要調整。It is worth mentioning that the error tolerance range defined by the error value also affects the accuracy of the calibration method. If the error tolerance range defined by the error value is small, the power attenuation of the illuminator 10 is relatively easy to find. Conversely, if the margin of error defined by the error value is large, the illuminator 10 needs to be detected by the processor 14 when there is a significant power degradation. When the reference turbidity value or the newly calculated parameter statistic value compared by the processor 14 has been greater than or equal to the lower limit of the corrected turbidity range, and it is still known whether the illuminating power of the illuminator 10 is attenuated, then Another set of illuminators and image capturing devices can be additionally added as a control group when the water quality detecting system 1 is initially installed, and the water surface images captured by the two sets of illuminators and corresponding image capturing devices under the same conditions are compared. Whether the generated parameter statistics are similar or identical, or have significant numerical differences, thereby determining whether the lighting power of one of the illuminators 10 is maintained in the normal range or has been attenuated and needs to be adjusted.

[實施例的可能功效][Possible efficacy of the embodiment]

根據本發明實施例,上述的水質檢測系統及方法利用發光器主動對受測水源投射光源,使水面影像根據水源濁度反應出由外向內增加亮度的圖形態樣,以用透過影像分析及處理的技術計算水面影像中所述圖形態樣的面積,可即時判斷受測水源的水質,使得水質監測人員不需要親自採集水樣亦能檢測受測水源的濁度,藉以有效地保護受測水源處的機電設備。According to an embodiment of the invention, the water quality detecting system and method use the illuminator to actively project a light source to the water source under test, so that the water surface image reflects the pattern of increasing brightness from the outside to the inside according to the turbidity of the water source, and uses the image analysis and processing through the image. The technical calculation of the area of the pattern in the water surface image can instantly determine the water quality of the water source under test, so that the water quality monitoring personnel can detect the turbidity of the water source under test without collecting the water sample in person, thereby effectively protecting the water source under test. Electromechanical equipment at the office.

此外,根據本發明的至少一實施例,上述的水質檢測系統及方法利用水面影像中散射區塊的面積之比值判斷受測水源的濁度,可抵抗受測水源處除了發光器所投射光源之外的環境光干擾,防止因外界光源的強弱不同而影響水質檢測結果的正確性。In addition, according to at least one embodiment of the present invention, the water quality detecting system and method use the ratio of the area of the scattering block in the water surface image to determine the turbidity of the water source under test, and is resistant to the light source of the illuminator except the illuminator. External ambient light interference prevents the correctness of water quality test results from being affected by the strength of external light sources.

更進一步來說,根據本發明的實施例,上述的水質檢測系統及方法進行影像分析及處理時,採取了多道篩選及過濾的手段,包括標籤化程序及至少一次以篩選值集中與收斂被分析影像的面積參數,可以有效排除影像中的雜訊,藉以提高檢測的正確性。Furthermore, according to an embodiment of the present invention, when the water quality detecting system and method described above perform image analysis and processing, multiple screening and filtering methods are adopted, including a labeling process and at least one time to filter the concentration and convergence. Analysis of the area parameters of the image can effectively eliminate the noise in the image, so as to improve the correctness of the detection.

此外,根據本發明所提供的實施例,更說明了用以校正所述水質檢測系統,以維持檢測系統之準確性的校正方法。利用水質檢測系統初始裝設完成、尚未有發光器功率衰減問題發生的狀態取得校正的基準,藉以與水質檢測系統運作過程中所檢測到的資料進行比對並加以校正,可以達到遠距監控整個水質檢測系統運作及檢測之正確性的效果。Moreover, in accordance with an embodiment provided by the present invention, a correction method for correcting the water quality detection system to maintain the accuracy of the detection system is further illustrated. By using the water quality detection system to complete the initial installation and the state in which the illuminator power attenuation problem has not occurred, the calibration reference is obtained, so that the data detected during the operation of the water quality detection system can be compared and corrected, and the entire remote monitoring can be achieved. The effect of the correctness of the operation and testing of the water quality testing system.

然而以上所述僅為本發明之實施例,其並非用以侷限本發明之專利範圍。However, the above description is only an embodiment of the present invention, and is not intended to limit the scope of the invention.

1...水質檢測系統1. . . Water quality testing system

10...發光器10. . . Illuminator

12...影像擷取裝置12. . . Image capture device

14...處理器14. . . processor

16...記憶單元16. . . Memory unit

2...受測水源2. . . Water source under test

20a-20c...水面影像20a-20c. . . Water image

200a-200c...漸層影像200a-200c. . . Gradual image

202a-202c...高亮度區域202a-202c. . . High brightness area

204a-204b...反射圖形204a-204b. . . Reflection pattern

30a-30c...二值影像30a-30c. . . Binary image

300a-300c...白色區塊300a-300c. . . White block

302a-302b...白色區塊302a-302b. . . White block

40...候選影像40. . . Candidate image

400...白色區塊400. . . White block

402...部分區塊402. . . Partial block

404...部分區塊404. . . Partial block

50a-50d...第一二值影像50a-50d. . . First binary image

500a-500d...第一區塊500a-500d. . . First block

502a...第一區塊502a. . . First block

52b-52d...第二二值影像52b-52d. . . Second binary image

520b-520d...第二區塊520b-520d. . . Second block

S601-S611...流程步驟S601-S611. . . Process step

S701-S729...流程步驟S701-S729. . . Process step

S801-S829...流程步驟S801-S829. . . Process step

S901-S925...流程步驟S901-S925. . . Process step

圖1:本發明提供的一種水質檢測系統實施例之方塊圖;Figure 1 is a block diagram of an embodiment of a water quality detecting system provided by the present invention;

圖2:本發明實施例中例示之水面影像示意圖;2 is a schematic view showing a water surface image exemplified in the embodiment of the present invention;

圖3:本發明實施例中例示之二值影像示意圖;FIG. 3 is a schematic diagram of a binary image illustrated in an embodiment of the present invention; FIG.

圖4:本發明實施例中例示之候選影像示意圖;FIG. 4 is a schematic diagram of candidate images exemplified in the embodiment of the present invention; FIG.

圖5A:本發明實施例中例示之第一二值影像示意圖;FIG. 5A is a schematic diagram of a first binary image illustrated in an embodiment of the present invention; FIG.

圖5B:本發明實施例中例示之第二二值影像示意圖;FIG. 5B is a schematic diagram of a second binary image exemplified in the embodiment of the present invention; FIG.

圖6:本發明提供的一種水質檢測方法實施例之流程圖;6 is a flow chart of an embodiment of a water quality detecting method provided by the present invention;

圖7:本發明提供的另一種水質檢測方法實施例之流程圖;7 is a flow chart of another embodiment of a water quality detecting method provided by the present invention;

圖8:本發明提供的再一種水質檢測方法實施例流程圖;及8 is a flow chart of another embodiment of a water quality detecting method provided by the present invention; and

圖9:本發明提供的一種水質檢測系統之校正方法的實施例流程圖。9 is a flow chart of an embodiment of a method for correcting a water quality detecting system provided by the present invention.

1...水質檢測系統1. . . Water quality testing system

10...發光器10. . . Illuminator

12...影像擷取裝置12. . . Image capture device

14...處理器14. . . processor

16...記憶單元16. . . Memory unit

2...受測水源2. . . Water source under test

Claims (24)

一種水質檢測系統,用以檢測一受測水源之濁度,該系統包括:一發光器,用以從該受測水源上方向該受測水源發射一同調光;一影像擷取裝置,連續擷取該受測水源表面的多個水面影像,每個所述水面影像中包括該同調光撞擊該受測水源中之懸浮粒子而在該受測水源表面產生的一漸層影像,該漸層影像的亮度從邊緣向中心增強;及一處理器,接收該些水面影像,並根據至少一亮度門檻定義出每一該些水面影像的一散射區塊,該散射區塊對應該水面影像的高亮度區域,該處理器分別計算該些散射區塊的一面積參數,並根據一篩選值比對該些面積參數以篩選該些散射區塊,以及根據篩選後所保留的該些散射區塊的該些面積參數獲得一參數統計值,並根據一濁度對照表比對該參數統計值,以判斷該受測水源的濁度;其中,該參數統計值越大,該受測水源的濁度越高。A water quality detecting system for detecting the turbidity of a water source to be tested, the system comprising: an illuminator for transmitting a dimming light from the water source to be tested to the measured water source; and an image capturing device continuously Taking a plurality of water surface images of the surface of the tested water source, each of the water surface images including a gradation image generated by the same dimming light colliding with the suspended particles in the tested water source on the surface of the tested water source, the gradation image The brightness is enhanced from the edge to the center; and a processor receives the water surface images and defines a scattering block of each of the water surface images according to at least one brightness threshold, the scattering block corresponding to the high brightness of the water surface image a region, the processor separately calculating an area parameter of the scattering blocks, and screening the scattering blocks according to a screening value ratio, and according to the scattering blocks retained after the screening The area parameters obtain a parameter statistical value, and the turbidity of the measured water source is determined according to a turbidity comparison table to determine the turbidity of the measured water source; wherein the larger the statistical value of the parameter, the measured water The higher the turbidity. 如申請專利範圍第1項所述的水質檢測系統,其中,該亮度門檻包括一第一門檻值,該處理器根據該第一門檻值將每一該些水面影像的每一像素區分為一第一像素值及一第二像素值其中之一,以產生一第一二值影像,其中,該散射區塊所對應的該些像素的像素值為該第一像素值。The water quality detecting system of claim 1, wherein the brightness threshold includes a first threshold value, and the processor divides each pixel of each of the water surface images into a first one according to the first threshold value. One of a pixel value and a second pixel value to generate a first binary image, wherein the pixel values of the pixels corresponding to the scattering block are the first pixel value. 如申請專利範圍第2項所述的水質檢測系統,其中,該處理器將該些水面影像進行灰階化處理,以形成多個灰階影像,該處理器根據該第一門檻值比對每一該些灰階影像的該些像素,以分別指定該些像素的像素值為該第一像素值及該第二像素值其中之一,進而產生該第一二值影像。The water quality detecting system of claim 2, wherein the processor performs grayscale processing on the water surface images to form a plurality of grayscale images, and the processor compares each of the first threshold values according to the first threshold value. The pixels of the grayscale images are respectively assigned to the pixel values of the pixels as one of the first pixel value and the second pixel value, thereby generating the first binary image. 如申請專利範圍第2項所述的水質檢測系統,其中,每一所述第一二值影像包括由多個對應該第一像素值的像素群聚所形成之至少一第一區塊,該處理器計算每一所述第一二值影像之該第一區塊的一區塊數量,並保留該區塊數量為一的該些第一二值影像為多個候選影像,其中,該些候選影像所包括的該第一區塊對應於該散射區塊。The water quality detecting system of claim 2, wherein each of the first binary images comprises at least one first block formed by a plurality of pixel groups corresponding to the first pixel value, The processor calculates a number of blocks of the first block of each of the first binary images, and reserves the first binary image of the number of blocks as a plurality of candidate images, wherein the The first block included in the candidate image corresponds to the scattering block. 如申請專利範圍第4項所述的水質檢測系統,其中,該處理器計算每一該些候選影像之該第一區塊的一第一區塊面積為該面積參數。The water quality detecting system of claim 4, wherein the processor calculates a first block area of the first block of each of the candidate images as the area parameter. 如申請專利範圍第4項所述的水質檢測系統,其中,該亮度門檻更包括一第二門檻值,該處理器根據該第二門檻值將對應於該些候選影像的該些灰階影像的該些像素的像素值分別指定為一第三像素值及一第四像素值其中之一,以產生多個第二二值影像,其中,由多個該第三像素值群聚所形成之一第二區塊對應於該散射區塊。The water quality detecting system of claim 4, wherein the brightness threshold further comprises a second threshold value, and the processor, according to the second threshold value, corresponds to the grayscale images of the candidate images. The pixel values of the pixels are respectively designated as one of a third pixel value and a fourth pixel value to generate a plurality of second binary images, wherein one of the plurality of the third pixel values is formed The second block corresponds to the scattering block. 如申請專利範圍第6項所述的水質檢測系統,其中,該處理器分別計算該些第二區塊的一第二區塊面積,以及計算每一所述候選影像的該第二區塊面積相對於該第一區塊面積的一比值為該面積參數。The water quality detecting system of claim 6, wherein the processor separately calculates a second block area of the second blocks, and calculates the second block area of each of the candidate images. A ratio relative to the area of the first block is the area parameter. 如申請專利範圍第7項所述的水質檢測系統,其中,該第二門檻值大於該第一門檻值,每一所述候選影像中的該第二區塊面積小於該第一區塊面積。The water quality detecting system of claim 7, wherein the second threshold value is greater than the first threshold value, and the second block area in each of the candidate images is smaller than the first block area. 如申請專利範圍第5或7項所述的水質檢測系統,其中,該處理器根據該篩選值篩選該些面積參數,並保留該些面積參數不大於該篩選值的該些候選影像,以及根據被保留的該些候選影像的該些面積參數計算出該參數統計值。The water quality detecting system of claim 5, wherein the processor filters the area parameters according to the screening value, and retains the candidate images whose area parameters are not greater than the screening value, and according to The parameter values of the candidate image images that are retained are calculated. 如申請專利範圍第9項所述的水質檢測系統,其中,該篩選值為被該處理器保留的該些候選影像的該些面積參數之平均值。The water quality detecting system of claim 9, wherein the screening value is an average of the area parameters of the candidate images retained by the processor. 如申請專利範圍第9項所述的水質檢測系統,其中,該處理器依照該篩選值進行至少兩次篩選。The water quality detecting system of claim 9, wherein the processor performs at least two screenings according to the screening value. 如申請專利範圍第2項所述的水質檢測系統,其中,該處理器對該些二值影像進行侵蝕及膨脹處理,以消除該些二值影像的毛邊效應。The water quality detecting system of claim 2, wherein the processor erodes and expands the binary images to eliminate the burr effect of the binary images. 一種水質檢測方法,利用一發光器、一影像擷取裝置及一處理器檢測一受測水源之濁度,該方法包括:由該發光器從該受測水源表面向該受測水源發射一同調光;由該影像擷取裝置連續擷取該受測水源表面的多個水面影像,每個所述水面影像中包括該同調光撞擊該受測水源中之懸浮粒子而在該受測水源表面產生的一漸層影像,該漸層影像的亮度從邊緣向中心增強;接收該些水面影像,並根據至少一亮度門檻定義出每一該些水面影像的一散射區塊,該散射區塊對應該水面影像的高亮度區域;分別計算該些散射區塊的一面積參數,並根據一篩選值比對該些面積參數以篩選該些散射區塊;根據篩選後所保留的該些散射區塊的該些面積參數獲得一參數統計值;及比對該參數統計值及一濁度對照表,以判斷該受測水源的濁度;其中,該參數統計值越大,該受測水源的濁度越高。A water quality detecting method for detecting turbidity of a water source to be tested by using an illuminator, an image capturing device and a processor, the method comprising: transmitting, by the illuminator, a homology from the surface of the tested water source to the water source under test The image capturing device continuously captures a plurality of water surface images of the surface of the tested water source, and each of the water surface images includes the same dimming light colliding with the suspended particles in the tested water source to generate on the surface of the tested water source a gradation image, the brightness of the gradation image is enhanced from the edge to the center; receiving the water surface images, and defining a scattering block of each of the water surface images according to at least one brightness threshold, the scattering block corresponding to a high-luminance region of the water surface image; respectively calculating an area parameter of the scattering blocks, and screening the scattering blocks according to a screening value ratio; according to the scattering blocks retained after the screening The area parameters obtain a parameter statistical value; and compare the statistical value of the parameter with a turbidity comparison table to determine the turbidity of the tested water source; wherein the larger the statistical value of the parameter, the The higher the turbidity of the water. 如申請專利範圍第13項所述的水質檢測方法,其中,根據該亮度門檻定義出每一該些水面影像的該散射區塊之步驟中,包括:根據該亮度門檻的一第一門檻值,將每一該些水面影像的多個像素區分為一第一像素值及一第二像素值其中之一,以產生一第一二值影像;其中,該散射區塊所對應的該些像素的像素值為該第一像素值。The water quality detecting method of claim 13, wherein the step of defining the scattering block of each of the water surface images according to the brightness threshold comprises: according to a first threshold value of the brightness threshold, Dividing a plurality of pixels of each of the water surface images into one of a first pixel value and a second pixel value to generate a first binary image; wherein the pixels corresponding to the scattering block The pixel value is the first pixel value. 如申請專利範圍第14項所述的水質檢測方法,其中,根據該水面影像產生該第一二值影像之前,更包括:將該些水面影像進行灰階化處理,以形成多個灰階影像;及根據該第一門檻值將每一該些灰階影像的該些像素分別指定為該第一像素值及該第二像素值其中之一,以產生該第一二值影像。The water quality detecting method according to claim 14, wherein before the generating the first binary image according to the water surface image, the method further comprises: grayscale processing the water surface images to form a plurality of grayscale images. And determining, according to the first threshold, the pixels of each of the grayscale images as one of the first pixel value and the second pixel value to generate the first binary image. 如申請專利範圍第14項所述的水質檢測方法,其中,產生該第一二值影像之後,更包括:計算每一所述第一二值影像中由多個對應該第一像素值的像素群聚所形成之至少一第一區塊的一區塊數量;及選取該區塊數量為一的該些第一二值影像為多個候選影像;其中,該些候選影像所包括的該第一區塊對應於該散射區塊。The water quality detecting method of claim 14, wherein after the generating the first binary image, the method further comprises: calculating, by each of the first binary images, a plurality of pixels corresponding to the first pixel value The number of blocks of the at least one first block formed by the clustering; and the first binary image with the number of the blocks being one of the plurality of candidate images; wherein the candidate image includes the first A block corresponds to the scattering block. 如申請專利範圍第16項所述的水質檢測方法,其中,選取該區塊數量為一的該些二值影像為該些候選影像之後,更包括:計算被選取的每一該些候選影像之該第一區塊的一第一區塊面積為該面積參數。The method for detecting water quality according to claim 16 , wherein after selecting the binary images of the number of blocks as the candidate images, the method further comprises: calculating each of the selected candidate images. A first block area of the first block is the area parameter. 如申請專利範圍第14項所述的水質檢測方法,其中,選取該區塊數量為一的該些第一二值影像為多個候選影像之後,更包括:根據該亮度門檻的一第二門檻值,將對應於該些候選影像的該些灰階影像的像素值分別指定為一第三像素值及一第四像素值其中之一,以產生多個第二二值影像;其中,由多個該第三像素值群聚所形成之一第二區塊對應於該散射區塊。The water quality detecting method of claim 14, wherein the selecting the first binary image of the number of blocks to be a plurality of candidate images further comprises: following a second threshold of the brightness threshold a value, the pixel values of the grayscale images corresponding to the candidate images are respectively designated as one of a third pixel value and a fourth pixel value, to generate a plurality of second binary images; One of the second pixel value clusters forms a second block corresponding to the scattering block. 如申請專利範圍第18項所述的水質檢測方法,其中,產生該些第二二值影像之後,更包括:分別計算該些第二區塊的一第二區塊面積;及計算每一所述候選影像的該第二區塊面積相對於該第一區塊面積的一比值為該面積參數;其中,該第二門檻值大於該第一門檻值,每一所述候選影像中的該第二區塊面積小於該第一區塊面積。The water quality detecting method of claim 18, wherein after generating the second binary images, the method further comprises: separately calculating a second block area of the second blocks; and calculating each The ratio of the area of the second block of the candidate image to the area of the first block is the area parameter; wherein the second threshold is greater than the first threshold, the first of each candidate image The area of the second block is smaller than the area of the first block. 如申請專利範圍第17或19項所述的水質檢測方法,其中,計算出該些候選影像的該些面積參數之後,更包括:根據該篩選值篩選該些面積參數,並保留該面積參數不大於該篩選值的該些候選影像;及根據被保留的該些候選影像的該些面積參數計算出該參數統計值;其中,該篩選值為被保留的該些候選影像的該些面積參數之平均值。The water quality detecting method of claim 17 or 19, wherein after calculating the area parameters of the candidate images, the method further comprises: screening the area parameters according to the screening value, and retaining the area parameter The candidate image is greater than the screening value; and the parameter statistics are calculated according to the area parameters of the candidate images that are retained; wherein the screening value is the area parameters of the candidate images that are retained average value. 如申請專利範圍第14項所述的水質檢測方法,其中,產生該第一二值影像之後,更包括:對該些二值影像進行侵蝕及膨脹處理,以消除該些二值影像的毛邊效應。The water quality detecting method of claim 14, wherein the generating the first binary image further comprises: etching and expanding the binary image to eliminate the burr effect of the binary image . 一種如申請專利範圍第1項所述之水質檢測系統的校正方法,包括:於該發光器之發光功率未衰減時,連續檢測該受測水源以判斷該受測水源的濁度;記錄該發光器之發光功率未衰減且該受測水源持續一時間長度的濁度為清澈等級時之一校正濁度值,並根據該校正濁度值及一誤差值產生一校正濁度範圍;產生該校正濁度範圍後持續擷取該受測水源的該些水面影像,並分析及計算該些參數統計值以判斷該受測水源的濁度;於判斷出該受測水源的濁度持續該時間長度為清澈等級時,計算該時間長度內的該些參數統計值而產生一參考濁度值;比對該參考濁度值與該校正濁度範圍,以判斷該參考濁度值是否小於該校正濁度範圍之下限;及當該參考濁度值小於該校正濁度範圍之下限時,根據一補償比例提高該發光器的發光功率。A method for correcting a water quality detecting system according to claim 1, comprising: continuously detecting the measured water source to determine the turbidity of the water source under test when the illuminating power of the illuminator is not attenuated; recording the illuminating The illuminating power of the device is not attenuated and the turbidity of the measured water source for a period of time is one of the corrected turbidity values, and a corrected turbidity range is generated according to the corrected turbidity value and an error value; the correction is generated After the turbidity range, the water surface images of the tested water source are continuously captured, and the statistical values of the measured parameters are analyzed and calculated to determine the turbidity of the tested water source; and the turbidity of the tested water source is determined to last for the length of time When the level is clear, calculating the parameter statistic values within the length of time to generate a reference turbidity value; comparing the reference turbidity value with the corrected turbidity range to determine whether the reference turbidity value is less than the corrected turbidity value The lower limit of the range; and when the reference turbidity value is less than the lower limit of the corrected turbidity range, the illuminating power of the illuminator is increased according to a compensation ratio. 如申請專利範圍第22項所述的校正方法,其中,根據該補償比例提高該發光器的發光功率之後,更包括:擷取該受測水源的該些水面影像,以計算另一參數統計值;比對所述另一參數統計值是否不小於該校正濁度範圍之下限;及當所述另一參數統計值是否不小於該校正濁度範圍之下限時,完成對該水質檢測系統之校正。The method of claim 22, wherein, after the illuminating power of the illuminator is increased according to the compensation ratio, the method further includes: capturing the water surface images of the water source to be measured to calculate another parameter statistic value. And comparing whether the statistical value of the other parameter is not less than a lower limit of the corrected turbidity range; and when the statistical value of the other parameter is not less than a lower limit of the corrected turbidity range, completing the correction of the water quality detecting system . 如申請專利範圍第22項所述的校正方法,其中,該校正濁度值為該時間長度內所計算出之該參數統計值之平均值。The method of claim 22, wherein the corrected turbidity value is an average of the statistical values of the parameter calculated over the length of time.
TW101101376A 2012-01-13 2012-01-13 Water turbidity detection system and the method thereof TWI456185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW101101376A TWI456185B (en) 2012-01-13 2012-01-13 Water turbidity detection system and the method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101101376A TWI456185B (en) 2012-01-13 2012-01-13 Water turbidity detection system and the method thereof

Publications (2)

Publication Number Publication Date
TW201329434A true TW201329434A (en) 2013-07-16
TWI456185B TWI456185B (en) 2014-10-11

Family

ID=49225695

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101101376A TWI456185B (en) 2012-01-13 2012-01-13 Water turbidity detection system and the method thereof

Country Status (1)

Country Link
TW (1) TWI456185B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI569766B (en) * 2015-07-15 2017-02-11 A method for predicting saliva image recognition in female ovulation
TWI611183B (en) * 2016-07-26 2018-01-11 吳志偉 Remote water quality monitoring system
TWI832435B (en) * 2021-09-21 2024-02-11 日商東芝數字解決方案股份有限公司 Water quality monitoring system and computer-readable recording media

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101655462B (en) * 2009-09-11 2011-08-10 中国科学院地理科学与资源研究所 Apparatus for obtaining water quality information, method and system for recognizing water body eutrophication degree
TWI426256B (en) * 2009-09-21 2014-02-11 Ind Tech Res Inst Measuring device for water suspended solid concentration by laser optical imaging technology and measuring method therefor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI569766B (en) * 2015-07-15 2017-02-11 A method for predicting saliva image recognition in female ovulation
TWI611183B (en) * 2016-07-26 2018-01-11 吳志偉 Remote water quality monitoring system
TWI832435B (en) * 2021-09-21 2024-02-11 日商東芝數字解決方案股份有限公司 Water quality monitoring system and computer-readable recording media

Also Published As

Publication number Publication date
TWI456185B (en) 2014-10-11

Similar Documents

Publication Publication Date Title
US10746763B2 (en) Apparatus and method for diagnosing electric power equipment using thermal imaging camera
CN101908142A (en) Feature analysis-based video flame detecting method
JP2020508465A (en) Method and device for inspection of assets
JP5479385B2 (en) Counting method and counting device for the number of steel materials in a bundle of steel materials
JP2007256119A (en) Inspection device, lamination apparatus and inspection method
CN110443278B (en) Method, device and equipment for detecting thickness abnormality of grid line of solar cell
EP2312269A1 (en) A method and a system for inspecting a pantograph
KR20140031372A (en) Method and device for the reliable detection of material defects in transparent material
CN112784738A (en) Moving object detection alarm method, device and computer readable storage medium
TW201329434A (en) Water turbidity detection system and the method thereof
CN115266757A (en) Defect detection apparatus and method
EP3722780B1 (en) Particle size measuring apparatus and measuring method
CN116862914A (en) Metal shaft surface defect identification method and system based on deep learning
CN110987872B (en) Forward scatter sensor
JP2007316019A (en) Surface defect inspection device
CN201345056Y (en) Rubber production online monitoring device
CN102867385A (en) Building security system and building security method based on pulse light spot array pattern change detection
CN105572133A (en) Flaw detection method and device
CN114821453B (en) Coal mine drill rod counting method based on target detection and computer readable medium
CN116840240A (en) Visual detection system of power supply distributor
CN116385735A (en) Water level measurement method based on image recognition
KR102426829B1 (en) Apparatus and method for product surface inspection based Artificial Intelligence
CN101930541A (en) Video-based flame detecting device and method
CN110441315B (en) Electronic component testing apparatus and method
JP6457728B2 (en) Laminar smoke detection device and laminar smoke detection method

Legal Events

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