TW201743286A - Method for detecting of liquid - Google Patents
Method for detecting of liquid Download PDFInfo
- Publication number
- TW201743286A TW201743286A TW105117870A TW105117870A TW201743286A TW 201743286 A TW201743286 A TW 201743286A TW 105117870 A TW105117870 A TW 105117870A TW 105117870 A TW105117870 A TW 105117870A TW 201743286 A TW201743286 A TW 201743286A
- Authority
- TW
- Taiwan
- Prior art keywords
- liquid level
- light
- liquid
- data processing
- processing module
- Prior art date
Links
- 239000007788 liquid Substances 0.000 title claims abstract description 111
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000012545 processing Methods 0.000 claims abstract description 84
- 238000012544 monitoring process Methods 0.000 claims abstract description 40
- 238000013481 data capture Methods 0.000 claims abstract description 20
- 238000001514 detection method Methods 0.000 claims description 16
- 230000000877 morphologic effect Effects 0.000 claims description 12
- 238000003708 edge detection Methods 0.000 claims description 10
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 239000012530 fluid Substances 0.000 abstract 3
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 10
- 239000013598 vector Substances 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 6
- 238000012937 correction Methods 0.000 description 5
- 239000011159 matrix material Substances 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 3
- 239000003814 drug Substances 0.000 description 3
- 239000000126 substance Substances 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000009545 invasion Effects 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01F—MEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
- G01F23/00—Indicating or measuring liquid level or level of fluent solid material, e.g. indicating in terms of volume or indicating by means of an alarm
- G01F23/22—Indicating or measuring liquid level or level of fluent solid material, e.g. indicating in terms of volume or indicating by means of an alarm by measuring physical variables, other than linear dimensions, pressure or weight, dependent on the level to be measured, e.g. by difference of heat transfer of steam or water
- G01F23/28—Indicating or measuring liquid level or level of fluent solid material, e.g. indicating in terms of volume or indicating by means of an alarm by measuring physical variables, other than linear dimensions, pressure or weight, dependent on the level to be measured, e.g. by difference of heat transfer of steam or water by measuring the variations of parameters of electromagnetic or acoustic waves applied directly to the liquid or fluent solid material
- G01F23/284—Electromagnetic waves
- G01F23/292—Light, e.g. infrared or ultraviolet
Landscapes
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Thermal Sciences (AREA)
- Fluid Mechanics (AREA)
- General Physics & Mathematics (AREA)
- Measurement Of Levels Of Liquids Or Fluent Solid Materials (AREA)
Abstract
Description
本發明係關於一種液面監測方法,特別是一種將一平面狀雷射光束投射到一壁面及一液面,該壁面與該液面交界處形成一共交點的至少三條光線段,並以影像處理方法取得該共交點的空間位置的液面監測方法。 The invention relates to a liquid level monitoring method, in particular to projecting a planar laser beam onto a wall surface and a liquid surface, and at least three light segments forming a common intersection with the liquid surface and the liquid surface are processed by image processing. The method obtains a liquid level monitoring method for the spatial position of the co-intersection point.
台灣處於西北太平洋地區颱風侵襲的主要路徑,係屬於高災害風險地區,且極易受到天然災害的影響。有鑒於此,都市地區容易因為大量的雨水而造成短時間內無法排除多餘雨量或區域排洪不及而淹水,而嚴重威脅民眾的生命與財產安全。據此,河川水位的液位監測與預警向來是災害防範的首要目標;而為了達到上述之目標,較佳是採用一液面監測方法,以監測該液面位置。此外,該液面監測方法亦可廣泛地應用於其他各種領域,例如:化學或醫學等相關領域。舉例而言,於化學相關領域之實驗中,對於各種液態化學原料之量測,由於牽扯到各種化學原料間不同濃度的配置,因此,其劑量之量測精準度是非常重要。再者,於醫學相關領域中,對於治療病患所用之藥劑的用量監測,例如:施打點滴時,其點滴瓶之藥劑是否已經低於一臨界值,而需提醒醫療人員補充該藥劑或停止施打點滴。 Taiwan is the main path of typhoon invasion in the Pacific Northwest. It is a high-risk area and is highly vulnerable to natural disasters. In view of this, urban areas are prone to flooding due to the inability to eliminate excess rainfall or regional flooding in a short period of time due to the large amount of rainwater, which seriously threatens the lives and property of the people. Accordingly, liquid level monitoring and early warning of river water level has always been the primary target of disaster prevention; and in order to achieve the above objectives, it is preferable to use a liquid level monitoring method to monitor the liquid level position. In addition, the liquid level monitoring method can be widely applied to various other fields such as chemical or medical related fields. For example, in experiments in the field of chemistry, the measurement of various liquid chemical materials is very important because of the different concentration configurations between various chemical materials. Furthermore, in the medical related field, for monitoring the dosage of the medicament used by the patient, for example, when the drip is administered, whether the medicine of the drip bottle has fallen below a critical value, and the medical personnel need to be reminded to supplement the medicament or stop applying. Drip.
上述液面監測方法,可為一習知液位量測方法,其係透過拍攝一液體的表面影像,以測量該液體的液面位置,其實施例可參酌如中華民國第201024687號「雷射光學影像水位量測裝置及其方法」專利案。上 述專利案之方法,係利用二雷射光源射出的光線於一水體表面形成二雷射光點。隨後,由一影像擷取裝置拍攝並取得包含該二雷射光點之一水體影像,並傳送該水體影像至影像處理裝置進行分析。該影像處理裝置的分析方法係利用一校正迴歸曲線計算該二雷射光點之間的距離,藉此求出該水體之水位高度。 The liquid level monitoring method may be a conventional liquid level measuring method for measuring the liquid surface position of a liquid by taking a surface image of a liquid, and the embodiment may be referred to as the Republic of China No. 201024687 "Laser". Patent of optical image water level measuring device and method thereof. on The method of the patent case uses the light emitted by the two laser light sources to form two laser spots on the surface of a water body. Then, an image capturing device is used to capture and obtain a water body image including the two laser light spots, and the water body image is transmitted to the image processing device for analysis. The analysis method of the image processing apparatus calculates the distance between the two laser spots using a corrected regression curve, thereby obtaining the water level height of the water body.
惟,該二雷射光點係藉由該二雷射光源產生,並執行後續的運算,以求出該水體之水位高度。有鑑於此,為了更簡化上述液位量測方法之硬體需求,本發明提供一種液面監測方法,僅須將一平面狀雷射光束投射到一壁面及一液面,該壁面與該液面交界處形成一共交點的至少三條光線段,並分析該共交點的位置以準確量測並取得液面位置。 However, the two laser light spots are generated by the two laser light sources, and subsequent operations are performed to determine the water level height of the water body. In view of the above, in order to simplify the hardware requirements of the above liquid level measuring method, the present invention provides a liquid level monitoring method, which only needs to project a planar laser beam onto a wall surface and a liquid surface, the wall surface and the liquid At least three ray segments of a common intersection are formed at the surface intersection, and the position of the co-intersection is analyzed to accurately measure and obtain the liquid level position.
本發明之目的係提供一種液面監測方法,係由一發光模組將一平面狀雷射光束投射到一壁面及一液面,該壁面與該液面交界處形成一共交點的至少三條光線段,並分析該共交點的位置以準確量測並取得液面位置。 The object of the present invention is to provide a liquid level monitoring method, in which a planar laser beam is projected by a light-emitting module onto a wall surface and a liquid surface, and at least three light segments are formed at a boundary point between the wall surface and the liquid surface. And analyze the position of the co-intersection point to accurately measure and obtain the liquid level position.
一種液面監測方法,應用於一液面監測系統,以監測一盛液裝置內之液體的液面位置,該液面監測系統包含一資料處理模組,該方法包含:以該資料處理模組讀入一原始影像;以該資料處理模組偵測該原始影像中形成一共交點的至少三條光線段;以該資料處理模組計算該共交點的影像座標;及以該資料處理模組將該影像座標換算為一空間座標,該空間座標即為該液體之液面位置。 A liquid level monitoring method is applied to a liquid level monitoring system for monitoring a liquid level position of a liquid in a liquid holding device, the liquid level monitoring system comprising a data processing module, the method comprising: using the data processing module Reading an original image; detecting, by the data processing module, at least three light segments forming a common intersection in the original image; calculating, by the data processing module, image coordinates of the common intersection; and using the data processing module to The image coordinates are converted into a space coordinate, which is the liquid level of the liquid.
其中,該盛液裝置具有一壁面與該液體相接觸,使該液體之液面與該壁面相接形成一交線,該液面監測系統另包含一發光模組及一資料擷取模組,該資料處理模組耦接該發光模組及該資料擷取模組,該方法於該資料處理模組讀入該原始影像前,以該發光模組朝該交線投射一平面 狀雷射光束,以於鄰近該交線的壁面與液面形成該至少三條光線段,而該共交點即係位於該交線上,且以該資料擷取模組朝該至少三條光線段拍攝並產生該原始影像。 Wherein, the liquid receiving device has a wall surface in contact with the liquid, so that the liquid level of the liquid is in contact with the wall surface to form a line of intersection, the liquid level monitoring system further comprises a light emitting module and a data capturing module. The data processing module is coupled to the light emitting module and the data capturing module. The method projects a plane toward the intersection line before the data processing module reads the original image. a laser beam for forming the at least three light segments adjacent to the wall surface and the liquid surface of the intersection line, wherein the intersection point is located on the intersection line, and the data capture module is photographed toward the at least three light segments The original image is produced.
其中,該平面狀雷射光束於該壁面及該液面分別形成一第一光線段及一第二光線段,該第二光線段於該壁面形成一第三光線段,該第三光線段於該液面形成一第四光線段,該至少三條光線段包含該第一光線段、該第二光線段、該第三光線段及該第四光線段中至少三條光線段。 The planar light beam forms a first light segment and a second light segment on the wall surface and the liquid surface, and the second light segment forms a third light segment on the wall surface, and the third light segment is The liquid surface forms a fourth light segment, and the at least three light segments include at least three light segments of the first light segment, the second light segment, the third light segment, and the fourth light segment.
其中,該至少三條光線段之偵測方法,係對該原始影像執行一邊緣偵測及一形態學處理以產生一二值影像,並對該二值影像執行線段偵測。 The method for detecting the at least three ray segments performs an edge detection and a morphological processing on the original image to generate a binary image, and performs line segment detection on the binary image.
其中,該形態學處理係對該原始影像執行形態學中的填滿及骨架化。 Wherein, the morphological processing performs filling and skeletonization in the morphology of the original image.
其中,該至少三條光線段包含至少一曲線線段時,該資料處理模組對該原始影像執行直線偵測及曲線偵測。 The data processing module performs line detection and curve detection on the original image when the at least three light segments comprise at least one curved line segment.
其中,該壁面為一曲面狀壁面時,該至少三條光線段包含至少一曲線線段,該資料處理模組對該原始影像執行直線偵測及曲線偵測。 Wherein, when the wall surface is a curved wall surface, the at least three light segments comprise at least one curved line segment, and the data processing module performs line detection and curve detection on the original image.
其中,該資料處理模組計算該共交點之影像座標的方法係為一最小二乘法。 The method for calculating the image coordinates of the co-intersection point by the data processing module is a least squares method.
其中,該資料處理模組將該影像座標換算為該空間座標的方法係為一直接線性轉換法。 The method for converting the image coordinates into the space coordinates by the data processing module is a direct linear conversion method.
1‧‧‧資料處理模組 1‧‧‧ Data Processing Module
2‧‧‧發光模組 2‧‧‧Lighting module
3‧‧‧資料擷取模組 3‧‧‧Data Capture Module
4‧‧‧資料庫模組 4‧‧‧Database module
S1‧‧‧前置處理程序 S1‧‧‧ pre-processing program
S11‧‧‧參數校定步驟 S11‧‧‧ parameter calibration steps
S12‧‧‧影像讀取步驟 S12‧‧‧Image reading step
S13‧‧‧灰階處理步驟 S13‧‧‧ Grayscale processing steps
S2‧‧‧特徵強化程序 S2‧‧‧ Feature Enhancement Procedure
S21‧‧‧邊緣偵測步驟 S21‧‧‧ Edge Detection Steps
S22‧‧‧形態學處理步驟 S22‧‧‧ Morphological processing steps
S3‧‧‧影像分析程序 S3‧‧‧ image analysis program
S31‧‧‧線段偵測步驟 S31‧‧‧ Line segment detection steps
S32‧‧‧共點計算步驟 S32‧‧‧Complex calculation steps
S33‧‧‧液面估算步驟 S33‧‧‧ Liquid level estimation procedure
L‧‧‧液體 L‧‧‧Liquid
S‧‧‧液面 S‧‧‧ liquid level
W‧‧‧壁面 W‧‧‧ wall
A‧‧‧原始影像 A‧‧‧ original image
T‧‧‧平面狀雷射光束 T‧‧‧ planar laser beam
U‧‧‧第一光線段 U‧‧‧First light segment
Y‧‧‧第二光線段 Y‧‧‧second light segment
Z‧‧‧第三光線段 Z‧‧‧The third light segment
X‧‧‧第四光線段 X‧‧‧fourth light segment
G‧‧‧影像梯度值 G‧‧‧ image gradient values
E‧‧‧影像邊界值 E‧‧‧ image boundary value
ω‧‧‧閾值 ω ‧‧‧ threshold
第1圖:本發明液面監測方法實施例之系統架構示意圖。 Fig. 1 is a schematic view showing the system architecture of the embodiment of the liquid level monitoring method of the present invention.
第2圖:本發明液面監測方法實施例之硬體運作流程圖。 Fig. 2 is a flow chart showing the hardware operation of the embodiment of the liquid level monitoring method of the present invention.
第3圖:本發明液面監測方法實施例之軟體運作流程圖。 Figure 3 is a flow chart showing the software operation of the embodiment of the liquid level monitoring method of the present invention.
第4圖:本發明液面監測方法實施例之光線段偵測示意圖。 Figure 4 is a schematic diagram of light segment detection in the embodiment of the liquid level monitoring method of the present invention.
為讓本發明之上述及其他目的、特徵及優點能更明顯易懂,下文特舉本發明之較佳實施例,並配合所附圖式,作詳細說明如下:本發明全文所述之「耦接」(Coupled Connection),係指二電子裝置可經由有線或是無線技術相互通訊,惟不以此為限,係本發明所屬技術領域中具有通常知識者可以理解。 The above and other objects, features and advantages of the present invention will become more <RTIgt; "Coupled Connection" means that two electronic devices can communicate with each other via wired or wireless technology, but not limited thereto, as will be understood by those of ordinary skill in the art to which the present invention pertains.
本發明全文所述之「像素」(Pixels),係指一影像組成的最小單位,用以表示該影像之解析度(Resolution),例如:若該影像之解析度為1024×768,則代表該影像共有1024×768個像素,係本發明所屬技術領域中具有通常知識者可以理解。 "Pixels" as used throughout the present invention refers to a minimum unit of image composition for indicating the resolution of the image. For example, if the resolution of the image is 1024×768, it means The image has a total of 1024 x 768 pixels, which is understood by those of ordinary skill in the art to which the present invention pertains.
本發明全文所述之「色階」(Color Level),係指該像素所顯現顏色分量或亮度的濃淡程度,例如:彩色影像之紅色(R)、綠色(G)、藍色(B)分量的色階範圍各為0~255;或者,灰階影像之亮度(Luminance)的色階範圍可為0~255,係本發明所屬技術領域中具有通常知識者可以理解。 The "Color Level" as used throughout the present invention refers to the degree of gradation of the color component or brightness exhibited by the pixel, for example, the red (R), green (G), and blue (B) components of the color image. The range of the gradation ranges from 0 to 255; alternatively, the range of the gradation of the grayscale image (Luminance) may range from 0 to 255, which can be understood by those of ordinary skill in the art to which the present invention pertains.
請參閱第1圖所示,其係本發明液面監測方法實施例之系統架構示意圖,包含:一資料處理模組1、一發光模組2及一資料擷取模組3。其中,該發光模組2及該資料擷取模組3耦接該資料處理模組1。該系統可應用於監測一盛液裝置(例如:一水道或一容器)內之液體L的液面S位置。其中,該盛液裝置包括二側壁、一底壁及一容置空間,該容置空間係由該二側壁及該底壁所形成,且該容置空間係用以盛裝該液體L。詳言之,該二側壁之一係具有一朝向該容置空間的壁面W,該壁面W可為一平面狀壁面或一曲面狀壁面,且該壁面W具有相對的一頂端及一底端。此外,該盛液裝置內盛有該液體L的情況下,該液體L與該壁面W相接觸, 且該液面S與該壁面W相接形成一交線。此外,該資料處理模組1較佳可耦接一資料庫模組4,例如:MySql、Oracle等資料庫,該資料庫模組4可用以儲存該資料擷取模組3所拍攝之原始影像A,亦可由該資料處理模組1接收一影像作為該原始影像A,並作為後續影像處理分析使用。 Please refer to FIG. 1 , which is a schematic diagram of a system architecture of an embodiment of a liquid level monitoring method of the present invention, comprising: a data processing module 1 , a light emitting module 2 , and a data capturing module 3 . The light module 2 and the data capture module 3 are coupled to the data processing module 1 . The system can be used to monitor the level of the liquid surface S of a liquid L in a liquid holding device (for example, a water channel or a container). The liquid receiving device comprises two side walls, a bottom wall and an accommodating space. The accommodating space is formed by the two side walls and the bottom wall, and the accommodating space is for accommodating the liquid L. In detail, one of the two side walls has a wall surface W facing the accommodating space, and the wall surface W can be a planar wall surface or a curved wall surface, and the wall surface W has an opposite top end and a bottom end. Further, in the case where the liquid L is contained in the liquid holding device, the liquid L is in contact with the wall surface W, And the liquid surface S is in contact with the wall surface W to form an intersection line. In addition, the data processing module 1 is preferably coupled to a database module 4, such as a database of MySql, Oracle, etc., and the database module 4 can be used to store the original image captured by the data capture module 3. A, the data processing module 1 can also receive an image as the original image A and use it as a subsequent image processing analysis.
請參閱第2圖所示,其係本發明液面監測方法實施例之硬體運作流程圖。其中,該發光模組2係朝向該交線投射一平面狀雷射光束T,該平面狀雷射光束T較佳係涵蓋由該發光模組2及該壁面W之底端的連線方向至該發光模組2及該壁面W之頂端的連線方向所構成之範圍。並且,該平面狀雷射光束T不與該交線平行。藉此,該盛液裝置內盛有該液體L的情況下,該平面狀雷射光束T可於鄰近該交線的壁面W與液面S形成至少三條光線段,且該至少三條光線段係於該交線上形成一共交點。在本實施例中,該平面狀雷射光束T於該壁面W及液面S分別形成一第一光線段U及一第二光線段Y,該第二光線段Y於該壁面W形成一第三光線段Z,該第三光線段Z於該液面S形成一第四光線段X,該至少三條光線段包含該第一光線段U、該第二光線段Y、該第三光線段Z及該第四光線段X中至少三條光線段。此外,該壁面W係以一渠道側壁之壁面為實施態樣作為後續說明。再者,該發光模組2可為一雷射霧燈(Laser Emitter with Prism Lens),亦可利用一雷射筆投射一條狀光束於一稜鏡上,藉此形成該平面狀雷射光束T。然而,該發光模組2之實施方式及應用本監測方法之容器並不以上述型態為限。 Please refer to FIG. 2, which is a hardware operation flowchart of the embodiment of the liquid level monitoring method of the present invention. The light-emitting module 2 projects a planar laser beam T toward the intersection line, and the planar laser beam T preferably covers the connection direction between the light-emitting module 2 and the bottom end of the wall surface W. The range in which the light-emitting module 2 and the tip end of the wall surface W are connected. Also, the planar laser beam T is not parallel to the intersection. Thereby, in the case where the liquid L is contained in the liquid containing device, the planar laser beam T can form at least three light segments with the liquid surface S adjacent to the wall surface W of the intersection line, and the at least three light segments are A common intersection is formed on the intersection. In this embodiment, the planar laser beam T forms a first ray segment U and a second ray segment Y on the wall surface W and the liquid surface S, respectively, and the second ray segment Y forms a first layer on the wall surface W. a third ray segment Z, the third ray segment Z forming a fourth ray segment X on the liquid surface S, the at least three ray segments including the first ray segment U, the second ray segment Y, and the third ray segment Z And at least three ray segments in the fourth ray segment X. In addition, the wall surface W is described in the following manner as a wall surface of a channel side wall. Furthermore, the illumination module 2 can be a Laser Emitter with Prism Lens, and a laser beam can be used to project a beam of light onto a stack, thereby forming the planar laser beam T. . However, the embodiment of the light-emitting module 2 and the container to which the monitoring method is applied are not limited to the above-described types.
請再參閱第2圖所示,該資料擷取模組3(例如:監視攝影機、網路攝影機或紅外線攝影機等)可耦接該資料處理模組1(例如:電腦主機、檔案伺服器或雲端伺服器等)作為系統執行架構。在本實施例中,該資料擷取模組3可設置於該發光模組2旁,且拍攝取得包含該至少三條光線段的原始影像A(Original Image),例如:單一(Single)或連續 (Continued)影像等,該原始影像A可為彩色或灰階影像。該資料處理模組1可自該資料擷取模組3接收該原始影像A,並據以執行本發明液面監測方法實施例所揭示的軟體運作流程,用以量測液面位置,惟不以此為限。詳言之,上述之液面位置係為該液體L之水位高度。此外,該原始影像A係以彩色影像作為實施態樣進行後續說明,惟不以此為限,依此類推,可應用於黑白或連續影像之液面位置量測,其係本發明所屬技術領域中具有通常知識者可以理解,在此容不贅述。 Please refer to FIG. 2 again. The data capture module 3 (for example, a surveillance camera, a network camera or an infrared camera) can be coupled to the data processing module 1 (for example, a computer host, a file server, or a cloud). The server, etc.) acts as the system execution architecture. In this embodiment, the data capture module 3 can be disposed adjacent to the light-emitting module 2, and capture an original image A (Original Image) including the at least three light segments, for example, single or continuous. (Continued) image or the like, the original image A may be a color or grayscale image. The data processing module 1 can receive the original image A from the data acquisition module 3, and execute the software operation process disclosed in the embodiment of the liquid level monitoring method of the present invention to measure the liquid surface position, but This is limited to this. In detail, the above liquid level position is the water level height of the liquid L. In addition, the original image A is followed by a color image as an implementation aspect, but not limited thereto, and the like, and can be applied to liquid level position measurement of black and white or continuous images, which is a technical field to which the present invention pertains. Those who have the usual knowledge can understand it, and I won't go into details here.
請參閱第3圖所示,其係本發明液面監測方法實施例之軟體運作流程圖,可包含一前置處理程序S1、一特徵強化程序S2及一影像分析程序S3,分別敘述如後。 Referring to FIG. 3, it is a software operation flowchart of the embodiment of the liquid level monitoring method of the present invention, which may include a pre-processing program S1, a feature enhancement program S2, and an image analysis program S3, respectively, as described later.
該前置處理程序S1可包含一參數校定步驟S11、一影像讀取步驟S12及一灰階處理步驟S13。其中,該參數校定步驟S11可由該資料處理模組1設定至少四外部控制點,以求得該資料擷取模組3的外部參數。該資料處理模組1以該資料擷取模組3的外部參數、一平面校正版及一校正公式計算,求出該資料擷取模組3的內部參數。在本實施例中,該資料擷取模組3係為一攝影機。而該攝影機的內部參數可用以校正其鏡頭之輻射畸變(Radial Distortion),其係本發明所屬技術領域中具有通常知識者可以理解,在此不多加贅述。其中,該校正公式可參酌「Holland等人(1997)所提供的一種用以解決影像扭曲之校正方法」。此外,該資料擷取模組3之內部參數的計算方式係為本發明所屬技術領域中具有通常知識者可以理解,在此容不贅述。 The pre-processing program S1 may include a parameter calibration step S11, an image reading step S12, and a grayscale processing step S13. The parameter calibration step S11 can be configured by the data processing module 1 to set at least four external control points to obtain external parameters of the data capture module 3. The data processing module 1 calculates the internal parameters of the data capture module 3 by calculating the external parameters of the data capture module 3, a plane correction plate, and a correction formula. In this embodiment, the data capture module 3 is a camera. The internal parameters of the camera can be used to correct the Radiation Distortion of the lens, which can be understood by those of ordinary skill in the art to which the present invention pertains, and will not be further described herein. Among them, the correction formula can refer to "a correction method for solving image distortion provided by Holland et al. (1997)". In addition, the calculation method of the internal parameters of the data capture module 3 is understood by those having ordinary knowledge in the technical field of the present invention, and details are not described herein.
該影像讀取步驟S12可由該資料處理模組1自該資料擷取模組3中讀入該原始影像A,惟不以此為限。其中,該原始影像A可包含該壁面W、該液體L及該至少三條光線段的圖像。 The image reading step S12 can read the original image A from the data capturing module 3 by the data processing module 1 , but not limited thereto. The original image A may include an image of the wall surface W, the liquid L, and the at least three light segments.
該灰階處理步驟S13可由該資料處理模組1對該原始影像A 進行灰階處理,其主要原理乃依據該原始影像A各像素之紅色、綠色及藍色分量的色階,將該原始影像A之色調平均轉換到色階範圍為0~255之亮度。 The grayscale processing step S13 can be performed by the data processing module 1 on the original image A. The gray scale processing is performed according to the gradation of the red, green and blue components of each pixel of the original image A, and the gradation of the original image A is averaged to a luminance ranging from 0 to 255.
惟,該參數校定步驟S11及該灰階處理步驟S13係可選擇性執行,例如:該資料擷取模組3之內外部參數不需進行校定時,即可省略該參數校定步驟S11;再者,該原始影像A之像素的色階範圍為0~255,即可省略該灰階處理步驟S13,其係本發明所屬技術領域中具有通常知識者可以理解,在此不多加限制。 However, the parameter calibration step S11 and the gray scale processing step S13 can be selectively performed, for example, the internal and external parameters of the data capture module 3 need not be calibrated, and the parameter calibration step S11 can be omitted; Furthermore, the color gradation of the pixel of the original image A is in the range of 0 to 255, and the grayscale processing step S13 can be omitted, which is understood by those skilled in the art to which the present invention pertains, and is not limited thereto.
該特徵強化程序S2之主要目的係強化該原始影像A所包含的光線段之特徵,可包含一邊緣偵測步驟S21及一形態學處理步驟S22。其中,該邊緣偵測步驟S21可由該資料處理模組1偵測該原始影像A之邊緣特徵,該偵測方法可為一種梯度運算子邊緣搜尋法,例如:肯尼邊緣檢測(Canny Edge Detection)或索貝爾邊緣檢測(Sobel Edge Detection)等。在本實施例中,係採用肯尼邊緣檢測為實施態樣作為後續說明,惟不以此為限,其主要原理係計算該原始影像A中各像素之影像梯度(Gradient)值G,並依據該影像梯度值G計算各該像素之影像邊界值E。詳言之,該原始影像A經由執行該邊緣偵測步驟S21後,可為影像處理中的二值影像,惟不以此為限。其中,該影像邊界值E為1或0,分別代表一像素為一邊界或並非一邊界。該影像梯度值G與影像邊界值E之計算公式如下式(1)~(3)所示:
該形態學處理步驟S22可由該資料處理模組1對該原始影像A使用填滿(Fill)及骨架化(Skeletonizing)的形態學影像處理方法,使該原始影像A中產生該至少三條光線段之特徵。該原始影像A經由執行該形態學處理步驟S22後,可為影像處理中的二值影像,惟不以此為限。舉例而言,該資料處理模組1對該原始影像A使用填滿的形態學影像處理方法後,會將該原始影像A所包含之至少三條光線段的邊緣特徵內部填滿。當該至少三條光線段皆係為一直線時,該至少三條光線段皆為一mxn的四邊形,其中,m代表該四邊形寬度的像素值,且m≧1;n代表該四邊形長度的像素值,且n≧1;當該至少三條光線段中包含一曲線時,則該曲線之寬度的像素值為m,且m≧1。惟,該至少三條光線段的寬度或長度之像素值大於1時,可能會造成後續影像處理步驟的誤判,故,該資料處理模組1再對該原始影像A使用骨架化的形態學影像處理方法,將該至少三條光線段的寬度或長度其中之一的像素值轉換成1像素。藉此,提高後續影像處理步驟的精確度及影像處理效率。 The morphological processing step S22 can use the morphological image processing method of the fill and skeletoning of the original image A by the data processing module 1 to generate the at least three ray segments in the original image A. feature. The original image A can be a binary image in the image processing after the morphological processing step S22 is performed, but is not limited thereto. For example, after the data processing module 1 uses the filled morphological image processing method for the original image A, the edge features of at least three ray segments included in the original image A are filled inside. When the at least three ray segments are all in a straight line, the at least three ray segments are each a mxn quadrilateral, wherein m represents a pixel value of the quadrilateral width, and m ≧ 1; n represents a pixel value of the quadrilateral length, and N≧1; when the curve is included in the at least three ray segments, the pixel value of the width of the curve is m, and m ≧ 1. However, when the pixel value of the width or length of the at least three light segments is greater than 1, the subsequent image processing steps may be misjudged. Therefore, the data processing module 1 uses the skeletonized morphological image processing on the original image A. The method converts pixel values of one of the widths or lengths of the at least three light segments into 1 pixel. Thereby, the accuracy of the subsequent image processing steps and the image processing efficiency are improved.
請一併參閱第4圖所示,該影像分析程序S3可包含一線段
偵測步驟S31、一共點計算步驟S32及一液面估算步驟S33。其中,該線段偵測步驟S31可由該資料處理模組1偵測該原始影像A所包含之至少三條光線段。在本實施例中,當該壁面W係為該平面狀壁面時,係採用一霍夫轉換法(Hough Transform)可參酌「Hough(1962)」,偵測該原始影像A所包含之至少三條光線段,其主要原理係將該原始影像A中各線段之各點的x及y座標轉換為ρ(rho)及θ(theta)極座標。該轉換公式如下式(4)~(5)所示:
惟,當該壁面W係為該曲面狀壁面時,該至少三條光線段可包含至少一曲線線段,因此,可由該資料處理模組1對該原始影像A執行直線偵測及曲線偵測。 However, when the wall surface W is the curved wall surface, the at least three light segments may include at least one curved line segment. Therefore, the data processing module 1 may perform line detection and curve detection on the original image A.
該共點計算步驟S32可由該資料處理模組1求得該至少三條光線段的線段方程式。在本實施例中,可由該資料處理模組1於該原始影像A中任取組成該至少三條光線段之最低需求數量的像素座標點(例如:至少需要二像素座標點才能產生一直線方程式或至少需要三像素座標點才能產生一曲線方程式),以產生該至少三條光線段的線段方程式。此外,當該至少三條光線段皆為一直線線段時,可由該資料處理模組1將該至少三條光線段以一向量表示法表示各自的線段方程式。隨後,可由該資料處理模組1根據上述的線段方程式產生一矩陣方程式,並以該資料處理模組1藉由一聯立法或一最小二乘法(Generalized Least Squares)對該矩陣方程 式計算,以求得該至少三條光線段之共交點的影像座標。在本實施例中,該資料處理模組1係採用該最小二乘法對該線段方程式運算,惟不以此為限,且該最小二乘法之運算方式係本發明所屬相關技術領域中具有通常知識者可以理解,在此不多加贅述。 The common point calculation step S32 can obtain the line segment equation of the at least three light segments from the data processing module 1. In this embodiment, the data processing module 1 can take any pixel coordinate points that constitute the minimum required number of the at least three light segments in the original image A (for example, at least two pixel coordinate points are required to generate a linear equation or at least A three-pixel coordinate point is required to generate a curve equation) to generate a line segment equation for the at least three light segments. In addition, when the at least three light segments are all straight line segments, the data processing module 1 can represent the at least three light segments in a vector representation to represent the respective line segment equations. Then, the data processing module 1 can generate a matrix equation according to the line segment equation described above, and use the data processing module 1 to formulate the matrix equation by a joint legislation or a least square method (Generalized Least Squares). The calculation is performed to obtain image coordinates of the co-intersection points of the at least three light segments. In this embodiment, the data processing module 1 uses the least squares method to calculate the line segment equation, but not limited thereto, and the operation method of the least square method has the usual knowledge in the related technical field to which the present invention pertains. It can be understood that there will be no more details here.
舉例而言,當該壁面係為該平面狀壁面時,該資料處理模組1可於該原始影像A中偵測出二直線線段L1,L2。其中,該直線線段L1之任意兩點的影像座標分別為(248,216)、(276,538);該直線線段L2之任意兩點的影像座標分別為(260,387)、(523,825)。一直線線段的向量表示式如下式(6)所示:ai+tni,-<t< (6)其中,ai為第i條直線線段之像素座標的矩陣表示式,ni為第i條直線線段之單位向量,則該二直線線段L1,L2各自的單位向量分別為[0.0866 0.9962]T及[0.5148 0.8573]T。隨後,該資料處理模組1以該最小二乘法計算,求出該二直線線段L1,L2之共交點的影像座標,其中該最小二乘法的計算方式如下式(7)~(9)所示:p=R-1q (7) For example, when the wall surface is the planar wall surface, the data processing module 1 can detect two straight line segments L1, L2 in the original image A. The image coordinates of any two points of the straight line segment L1 are (248, 216) and (276, 538), respectively; and the image coordinates of any two points of the straight line segment L2 are (260, 387) and (523, 825), respectively. The vector representation of a straight line segment is as shown in the following equation (6): a i +tn i ,- <t< (6) where a i is the matrix representation of the pixel coordinates of the i-th straight line segment, and n i is the unit vector of the i-th straight line segment, and the unit vectors of the two straight line segments L1 and L2 are respectively [0.0866 0.9962 ] T and [0.5148 0.8573] T . Then, the data processing module 1 calculates the image coordinates of the co-intersection points of the two straight line segments L1 and L2 by the least square method, wherein the least squares method is calculated as shown in the following equations (7) to (9). :p=R -1 q (7)
該液面估算步驟S33可由該資料處理模組1將該影像座標轉換為該壁面與該液面交界處之空間座標,從而估算出液面位置。在本實施
例中,該空間座標之轉換較佳可採用一直接線性轉換法(Direct Linear Transformation),其公式如下式(10)所示:
綜上所述,本發明之液面監測方法於該影像前處理程序S1中對該資料處理模組1設定該四外部控制點,以求得該資料擷取模組3的外部參數。該資料處理模組1以該外部參數、該平面校正板及該校正公式產生該資料擷取模組3的內部參數。隨後,該資料處理模組1自該資料擷取模組3讀入該原始影像A,並且藉由執行該特徵強化程序S2對該原始影像A進行影像處理。再者,該資料處理模組1執行該影像分析程序S3偵測該原始影像A所包含之至少三條光線段的特徵,並計算該至少三條光線段之共交點的影像座標,以估算出該壁面與該液面交界處之空間座標,並取得該液面位置。據此,本發明之液面監測量測方法,可達成準確量測液面位置之目的。 In summary, the liquid level monitoring method of the present invention sets the four external control points to the data processing module 1 in the image pre-processing program S1 to obtain the external parameters of the data capturing module 3. The data processing module 1 generates internal parameters of the data capture module 3 by using the external parameter, the plane calibration plate, and the correction formula. Then, the data processing module 1 reads the original image A from the data capturing module 3, and performs image processing on the original image A by executing the feature enhancement program S2. Furthermore, the data processing module 1 executes the image analysis program S3 to detect features of at least three light segments included in the original image A, and calculates image coordinates of the intersection points of the at least three light segments to estimate the wall surface. The space coordinates at the junction with the liquid level, and the liquid level position is obtained. Accordingly, the liquid level monitoring measurement method of the present invention can achieve the purpose of accurately measuring the liquid level position.
雖然本發明已利用上述較佳實施例揭示,然其並非用以限定本發明,任何熟習此技藝者在不脫離本發明之精神和範圍之內,相對上述實施例進行各種更動與修改仍屬本發明所保護之技術範疇,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 While the invention has been described in connection with the preferred embodiments described above, it is not intended to limit the scope of the invention. The technical scope of the invention is protected, and therefore the scope of the invention is defined by the scope of the appended claims.
S1‧‧‧前置處理程序 S1‧‧‧ pre-processing program
S11‧‧‧參數校定步驟 S11‧‧‧ parameter calibration steps
S12‧‧‧影像讀取步驟 S12‧‧‧Image reading step
S13‧‧‧灰階處理步驟 S13‧‧‧ Grayscale processing steps
S2‧‧‧特徵強化程序 S2‧‧‧ Feature Enhancement Procedure
S21‧‧‧邊緣偵測步驟 S21‧‧‧ Edge Detection Steps
S22‧‧‧形態學處理步驟 S22‧‧‧ Morphological processing steps
S3‧‧‧影像分析程序 S3‧‧‧ image analysis program
S31‧‧‧線段偵測步驟 S31‧‧‧ Line segment detection steps
S32‧‧‧共點計算步驟 S32‧‧‧Complex calculation steps
S33‧‧‧液面估算步驟 S33‧‧‧ Liquid level estimation procedure
Claims (9)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW105117870A TWI590196B (en) | 2016-06-06 | 2016-06-06 | Method for detecting of liquid |
CN201710329130.3A CN107462301A (en) | 2016-06-06 | 2017-05-11 | Liquid level monitoring method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW105117870A TWI590196B (en) | 2016-06-06 | 2016-06-06 | Method for detecting of liquid |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI590196B TWI590196B (en) | 2017-07-01 |
TW201743286A true TW201743286A (en) | 2017-12-16 |
Family
ID=60048205
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW105117870A TWI590196B (en) | 2016-06-06 | 2016-06-06 | Method for detecting of liquid |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107462301A (en) |
TW (1) | TWI590196B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3870940B1 (en) | 2018-12-03 | 2023-10-18 | Bio-Rad Laboratories, Inc. | Liquid level determination |
CN111750956A (en) * | 2020-07-07 | 2020-10-09 | 中铁十一局集团有限公司 | System and method for measuring liquid level of mortar tank of shield machine |
KR102523809B1 (en) * | 2020-12-31 | 2023-04-20 | 동국대학교 산학협력단 | System of detecting defective gas-lighters using computer vision library |
CN117455922B (en) * | 2023-12-26 | 2024-04-05 | 墨卓生物科技(浙江)有限公司 | Automatic counting analysis method based on liquid drop moving image |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3001200B1 (en) * | 1999-02-09 | 2000-01-24 | 新川電機株式会社 | Surface level measuring device for molten metal |
JP4946425B2 (en) * | 2006-12-26 | 2012-06-06 | セイコーエプソン株式会社 | Liquid container |
TWI395933B (en) * | 2008-12-18 | 2013-05-11 | Univ Nat Central | Measuring device for water level by laser optical imaging technology and method for the same |
CN101988845B (en) * | 2010-07-30 | 2012-04-18 | 西安理工大学 | Device and method for detecting fused silica liquid level by laser curved mirror reflection |
TWI465699B (en) * | 2012-11-01 | 2014-12-21 | Univ Ishou | Method of water level measurement |
CN104296829A (en) * | 2014-09-30 | 2015-01-21 | 四川泛华航空仪表电器有限公司 | Body axis system based oil level measuring method |
CN104215302B (en) * | 2014-10-06 | 2017-11-17 | 上海工程技术大学 | A kind of method that can accurately monitor oil tank oil mass in real time |
CN104457911B (en) * | 2014-12-26 | 2018-01-02 | 上海神开石油化工装备股份有限公司 | A kind of liquid level detection system and liquid-level detecting method |
TWI590190B (en) * | 2016-05-26 | 2017-07-01 | 財團法人成大水利海洋研究發展文教基金會 | Method for image recognition of liquid |
-
2016
- 2016-06-06 TW TW105117870A patent/TWI590196B/en active
-
2017
- 2017-05-11 CN CN201710329130.3A patent/CN107462301A/en active Pending
Also Published As
Publication number | Publication date |
---|---|
TWI590196B (en) | 2017-07-01 |
CN107462301A (en) | 2017-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019120011A1 (en) | Target detection method and apparatus | |
US11423562B2 (en) | Device and method for obtaining distance information from views | |
TWI590196B (en) | Method for detecting of liquid | |
TWI608221B (en) | Liquid level detecting system and method thereof | |
JP4986679B2 (en) | Non-stationary object three-dimensional image measurement apparatus, three-dimensional image measurement method, and three-dimensional image measurement program | |
TWI759669B (en) | Method and system for inspecting display image | |
TWI590190B (en) | Method for image recognition of liquid | |
JP5633058B1 (en) | 3D measuring apparatus and 3D measuring method | |
US20230366738A1 (en) | Systems and methods for temperature measurement | |
Ferstl et al. | Learning Depth Calibration of Time-of-Flight Cameras. | |
US20210256729A1 (en) | Methods and systems for determining calibration quality metrics for a multicamera imaging system | |
CN112595236A (en) | Measuring device for underwater laser three-dimensional scanning and real-time distance measurement | |
CN114569047B (en) | Capsule endoscope, and distance measuring method and device for imaging system | |
CN101661620A (en) | Camera response curve calibration method based on single image | |
TWI521410B (en) | Apparatus and method for acquiring object image of a pointer | |
JP2021092439A (en) | Illumination optimization method, control device, and program | |
TWI450155B (en) | Method and system for calculating calibration information for an optical touch apparatus | |
CN113749646A (en) | Monocular vision-based human body height measuring method and device and electronic equipment | |
JP5336325B2 (en) | Image processing method | |
CN115880643B (en) | Social distance monitoring method and device based on target detection algorithm | |
CN106500577A (en) | A kind of clinac vane grating method for detecting position | |
Weinmann et al. | Semi-automatic image-based co-registration of range imaging data with different characteristics | |
KR102356430B1 (en) | Apparatus and method for measuring pollution degree | |
Prasser et al. | Probabilistic visual recognition of artificial landmarks for simultaneous localization and mapping | |
CN110794389B (en) | Image processing-based non-contact distance measurement method |