TW202412960A - System and method for detecting and compensating depth - Google Patents

System and method for detecting and compensating depth Download PDF

Info

Publication number
TW202412960A
TW202412960A TW111136766A TW111136766A TW202412960A TW 202412960 A TW202412960 A TW 202412960A TW 111136766 A TW111136766 A TW 111136766A TW 111136766 A TW111136766 A TW 111136766A TW 202412960 A TW202412960 A TW 202412960A
Authority
TW
Taiwan
Prior art keywords
depth
rectangular
sliding window
deviation
depth image
Prior art date
Application number
TW111136766A
Other languages
Chinese (zh)
Other versions
TWI806780B (en
Inventor
李境嚴
Original Assignee
中國鋼鐵股份有限公司
Filing date
Publication date
Application filed by 中國鋼鐵股份有限公司 filed Critical 中國鋼鐵股份有限公司
Priority to TW111136766A priority Critical patent/TWI806780B/en
Priority claimed from TW111136766A external-priority patent/TWI806780B/en
Application granted granted Critical
Publication of TWI806780B publication Critical patent/TWI806780B/en
Publication of TW202412960A publication Critical patent/TW202412960A/en

Links

Images

Abstract

A system includes an object to be tested, multiple rotation modules, a depth sensing module and a computing module. The rotation modules rotate the object around an axis. The depth sensing module is arranged on one side of the object to obtain a rectangular depth image having a sampling direction and a rotation direction. The computing module applies a sliding window on the rectangular depth image, and the sliding window moves along the sampling direction to obtain multiple depth values. The computing module determines whether there is a deviation in the rectangular depth image according to the depth values, and compensates the deviation if so.

Description

深度檢測與補償系統與方法Depth detection and compensation system and method

本揭露是有關於旋轉待測物並掃描待測物側面深度的檢測系統與方法,特別是可補償旋轉時所造成的偏差。The present disclosure relates to a detection system and method for rotating an object to be tested and scanning the side depth of the object to be tested, and in particular, can compensate for the deviation caused by the rotation.

在鋼廠中,鋼帶在經過冷軋以後的厚度較薄,容易產生邊裂或鋸齒邊缺陷,為了避免有邊緣缺陷的鋼帶進入後續的製程產生問題,必須依照檢測系統來檢查鋼帶的邊緣是否有缺陷。一種做法是將鋼帶盤捲為鋼卷以後利用攝影機來拍攝鋼卷的側面,但由於鋼卷的半徑相當大,攝影機難以涵蓋整個鋼卷的範圍。In steel mills, the thickness of steel strips after cold rolling is relatively thin, which is prone to edge cracks or sawtooth defects. In order to avoid problems caused by steel strips with edge defects in subsequent processes, it is necessary to use a detection system to check whether the edges of the steel strips are defective. One method is to use a camera to shoot the side of the steel coil after winding the steel strip into a coil, but because the radius of the steel coil is quite large, it is difficult for the camera to cover the entire range of the steel coil.

本揭露的實施例提出一種深度檢測與補償系統,包括待測物、多個旋轉模組、深度感測模組與計算模組。旋轉模組用以將待測物繞著軸線旋轉,待測物從軸線視之的輪廓為圓形。深度感測模組設置在待測物的一側,用以取得矩形深度影像,其中矩形深度影像具有取樣方向與旋轉方向,深度感測模組的掃瞄範圍小於圓形的直徑。計算模組通訊連接至旋轉模組與深度感測模組,用以套用滑動視窗在矩形深度影像上,滑動視窗沿著取樣方向移動以得到多個深度值。計算模組用以根據深度值判斷矩形深度影像是否有偏差,若有的話補償偏差。The disclosed embodiment proposes a depth detection and compensation system, including an object to be measured, multiple rotation modules, a depth sensing module and a calculation module. The rotation module is used to rotate the object to be measured around an axis, and the outline of the object to be measured viewed from the axis is circular. The depth sensing module is arranged on one side of the object to be measured to obtain a rectangular depth image, wherein the rectangular depth image has a sampling direction and a rotation direction, and the scanning range of the depth sensing module is smaller than the diameter of the circle. The calculation module is communicatively connected to the rotation module and the depth sensing module, and is used to apply a sliding window to the rectangular depth image, and the sliding window moves along the sampling direction to obtain multiple depth values. The calculation module is used to determine whether the rectangular depth image has deviation according to the depth value, and if so, compensate for the deviation.

在一些實施例中,滑動視窗在取樣方向上的長度大於1,滑動視窗在旋轉方向上的長度等於矩形深度影像在旋轉方向上的長度。計算模組用以根據滑動視窗執行一移動平均演算法,滑動視窗的每一個位置對應至一個深度值。In some embodiments, the length of the sliding window in the sampling direction is greater than 1, and the length of the sliding window in the rotation direction is equal to the length of the rectangular depth image in the rotation direction. The calculation module is used to execute a moving average algorithm according to the sliding window, and each position of the sliding window corresponds to a depth value.

在一些實施例中,計算模組還用以計算每兩個相鄰的深度值之間的斜率,並根據斜率是否超出範圍來判斷矩形深度影像是否具有線性偏差或是非線性偏差。In some embodiments, the calculation module is further used to calculate the slope between every two adjacent depth values, and determine whether the rectangular depth image has a linear deviation or a non-linear deviation based on whether the slope exceeds a range.

在一些實施例中,計算模組還用以根據深度值執行線性迴歸演算法,並根據線性迴歸演算法的結果來判斷矩形深度影像是否具有線性偏差或是非線性偏差。In some embodiments, the calculation module is further used to execute a linear regression algorithm according to the depth value, and determine whether the rectangular depth image has a linear deviation or a non-linear deviation according to the result of the linear regression algorithm.

在一些實施例中,待測物為圓筒狀的鋼卷。In some embodiments, the object to be tested is a cylindrical steel coil.

以另一個角度來說,本揭露的實施例提出一種深度檢測與補償方法,適用於電腦系統。此深度檢測與補償方法包括:透過多個旋轉模組將待測物繞著軸線旋轉,其中待測物從軸線視之的輪廓為圓形;透過深度感測模組取得矩形深度影像,其中深度感測模組設置在待測物的一側,矩形深度影像具有取樣方向與旋轉方向,深度感測模組的掃瞄範圍小於圓形的直徑;套用滑動視窗在矩形深度影像上,滑動視窗沿著取樣方向移動以得到多個深度值;以及根據深度值判斷矩形深度影像是否有偏差,若有的話補償偏差。From another perspective, the embodiment of the present disclosure proposes a depth detection and compensation method applicable to a computer system. The depth detection and compensation method includes: rotating the object to be detected around an axis through multiple rotation modules, wherein the outline of the object to be detected viewed from the axis is a circle; obtaining a rectangular depth image through a depth sensing module, wherein the depth sensing module is set on one side of the object to be detected, the rectangular depth image has a sampling direction and a rotation direction, and the scanning range of the depth sensing module is smaller than the diameter of the circle; applying a sliding window on the rectangular depth image, the sliding window moves along the sampling direction to obtain multiple depth values; and judging whether the rectangular depth image has deviation according to the depth value, and if so, compensating for the deviation.

在一些實施例中,滑動視窗在取樣方向上的長度大於1,滑動視窗在旋轉方向上的長度等於矩形深度影像在旋轉方向上的長度。深度檢測與補償方法還包括:根據滑動視窗執行移動平均演算法,滑動視窗的每一個位置對應至其中一個深度值。In some embodiments, the length of the sliding window in the sampling direction is greater than 1, and the length of the sliding window in the rotation direction is equal to the length of the rectangular depth image in the rotation direction. The depth detection and compensation method also includes: executing a moving average algorithm based on the sliding window, and each position of the sliding window corresponds to one of the depth values.

在一些實施例中,深度檢測與補償方法還包括:計算兩個相鄰的深度值之間的斜率,並根據斜率是否超出範圍來判斷矩形深度影像是否具有線性偏差或是非線性偏差。In some embodiments, the depth detection and compensation method further includes: calculating the slope between two adjacent depth values, and determining whether the rectangular depth image has a linear deviation or a non-linear deviation based on whether the slope exceeds a range.

在一些實施例中,深度檢測與補償方法還包括:根據深度值執行線性迴歸演算法,並根據線性迴歸演算法的結果來判斷矩形深度影像是否具有線性偏差或是非線性偏差。In some embodiments, the depth detection and compensation method further includes: executing a linear regression algorithm according to the depth value, and determining whether the rectangular depth image has a linear deviation or a non-linear deviation according to the result of the linear regression algorithm.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above features and advantages of the present invention more clearly understood, embodiments are specifically cited below and described in detail with reference to the accompanying drawings.

關於本文中所使用之「第一」、「第二」等,並非特別指次序或順位的意思,其僅為了區別以相同技術用語描述的元件或操作。The terms “first,” “second,” etc. used herein do not particularly refer to order or sequence, but are only used to distinguish elements or operations described with the same technical term.

圖1是根據一實施例繪示檢測系統的示意圖。請參照圖1,深度檢測與補償系統100包括了待測物110、多個旋轉模組121~122、深度感測模組130與計算模組140。待測物110例如為圓筒狀的鋼卷,但本揭露並不限於此,在其他實施例中待測物110也可以是圓柱狀或圓盤狀,待測物110的材料可以包含任意金屬、有機物、金屬化合物等材質。旋轉模組121~122可包括滾子以及馬達,用以將待測物110繞著軸線150旋轉。FIG1 is a schematic diagram of a detection system according to an embodiment. Referring to FIG1 , the depth detection and compensation system 100 includes an object to be detected 110, a plurality of rotation modules 121-122, a depth sensing module 130, and a calculation module 140. The object to be detected 110 is, for example, a cylindrical steel coil, but the present disclosure is not limited thereto. In other embodiments, the object to be detected 110 may also be cylindrical or disc-shaped, and the material of the object to be detected 110 may include any metal, organic matter, metal compound, and the like. The rotation modules 121-122 may include rollers and motors for rotating the object to be detected 110 around an axis 150.

深度感測模組130可包含結構光模組、紅外光模組、雙攝影機模組、雷射距離感測器、或任意可以感測場景深度的模組。待測物110在軸線150上有兩側,從任何一側來觀察,待測物110的輪廓(最外圍的形狀)為圓形,深度感測模組130設置在其中一側,用以拍攝待測物110的側面。在一些實施例中,深度感測模組130為線掃描器,當待測物110旋轉時深度感測模組130持續掃描,所拍攝到的影像稱為矩形深度影像,特別的是深度感測模組130的掃瞄範圍小於上述圓形的直徑,例如只需要大於等於圓形的半徑。The depth sensing module 130 may include a structured light module, an infrared module, a dual camera module, a laser distance sensor, or any module that can sense the depth of a scene. The object 110 to be tested has two sides on the axis 150. When viewed from any side, the outline (the outermost shape) of the object 110 to be tested is a circle. The depth sensing module 130 is disposed on one of the sides to photograph the side of the object 110 to be tested. In some embodiments, the depth sensing module 130 is a line scanner. When the object 110 to be tested rotates, the depth sensing module 130 continues to scan. The captured image is called a rectangular depth image. In particular, the scanning range of the depth sensing module 130 is smaller than the diameter of the circle, for example, only a radius greater than or equal to the circle is required.

計算模組140通訊連接至深度感測模組130與旋轉模組121~122,此通訊連接可以用任意的有線或無線通訊手段來達成。計算模組140例如為中央控制器、處理器、電腦系統、伺服器、或任意有計算能力的電子裝置。計算模組140會控制旋轉模組121~122,藉此決定待測物110旋轉的角速度,計算模組140也會從深度感測模組130接收矩形深度影像。The computing module 140 is communicatively connected to the depth sensing module 130 and the rotation modules 121-122. The communication connection can be achieved by any wired or wireless communication means. The computing module 140 is, for example, a central controller, a processor, a computer system, a server, or any electronic device with computing capabilities. The computing module 140 controls the rotation modules 121-122 to determine the angular velocity of the rotation of the object to be measured 110. The computing module 140 also receives a rectangular depth image from the depth sensing module 130.

待測物110在轉動時可能會有一些位移,這些位移會導致所感測的矩形深度影像有偏差。舉例來說,軸線160與軸線150垂直,待測物110可能會沿著軸線160旋轉一角度,造成待測物110有一部份會較靠近深度感測模組130,另一部分較遠離深度感測模組130,這使得所感測到的矩形深度影像有線性的偏差。此外,待測物110的旋轉速度可能不一致,這樣不定速的旋轉會使得感測到的矩形深度影像有非線性的偏差。計算模組140會執行一個深度檢測與補償方法,用以偵測矩形深度影像是否有偏差,若有的話會補償此偏差,以下將說明此方法。The object to be measured 110 may have some displacement when rotating, and these displacements will cause deviations in the sensed rectangular depth image. For example, axis 160 is perpendicular to axis 150, and the object to be measured 110 may rotate along axis 160 at an angle, causing a portion of the object to be measured 110 to be closer to the depth sensing module 130 and another portion to be farther from the depth sensing module 130, which causes the sensed rectangular depth image to have a linear deviation. In addition, the rotation speed of the object to be measured 110 may be inconsistent, and such an irregular rotation speed will cause the sensed rectangular depth image to have a non-linear deviation. The calculation module 140 will execute a depth detection and compensation method to detect whether the rectangular depth image has deviations, and if so, will compensate for the deviations. This method will be described below.

圖2是根據一實施例繪示深度檢測與補償方法的流程圖。圖3是根據一實施例繪示偵測偏差的示意圖。請參照圖2與圖3,在步驟201,透過深度感測模組取得矩形深度影像300,此矩形深度影像300具有取樣方向301與旋轉方向302。取樣方向301也是線掃描器的掃描方向,而旋轉方向302是待測物110的旋轉方向,線掃描器每掃描一次可以產生一列(row)的像素,每個像素的灰階代表深度,而隨著待測物110旋轉,在下個取樣時間線掃描器會取得下一列的像素。FIG2 is a flow chart of a depth detection and compensation method according to an embodiment. FIG3 is a schematic diagram of a detection deviation according to an embodiment. Referring to FIG2 and FIG3, in step 201, a rectangular depth image 300 is obtained through a depth sensing module, and the rectangular depth image 300 has a sampling direction 301 and a rotation direction 302. The sampling direction 301 is also the scanning direction of the line scanner, and the rotation direction 302 is the rotation direction of the object to be measured 110. The line scanner can generate a row of pixels each time it scans, and the gray level of each pixel represents the depth. As the object to be measured 110 rotates, the line scanner will obtain the next row of pixels at the next sampling time.

在步驟202,判斷矩形深度影像300是否有偏差,如果有偏差,則在步驟203進一步判斷偏差種類。具體來說,可先套用一個滑動視窗(sliding window)310在矩形深度影像300上,此滑動視窗310在取樣方向301上的長度大於1(例如為3),滑動視窗310在旋轉方向302上的長度例如等於矩形深度影像300在旋轉方向302上的長度。滑動視窗310是用以執行移動平均演算法(moving average),也就是計算滑動視窗310內所有像素的平均。滑動視窗310是沿著取樣方向301移動,例如每次移動一或多個像素,在移動的過程中每一個位置都可計算出一個平均值。在一些實施例中,不同位置的滑動視窗310的範圍可彼此重疊。In step 202, it is determined whether the rectangular depth image 300 has a deviation. If there is a deviation, the type of deviation is further determined in step 203. Specifically, a sliding window 310 may be applied to the rectangular depth image 300. The length of the sliding window 310 in the sampling direction 301 is greater than 1 (e.g., 3), and the length of the sliding window 310 in the rotation direction 302 is, for example, equal to the length of the rectangular depth image 300 in the rotation direction 302. The sliding window 310 is used to execute a moving average algorithm, that is, to calculate the average of all pixels in the sliding window 310. The sliding window 310 moves along the sampling direction 301, for example, by one or more pixels each time, and an average value can be calculated for each position during the movement. In some embodiments, the ranges of the sliding windows 310 at different positions may overlap each other.

為了說明起見,以下將利用移動平均演算法所計算出的平均稱為深度值,接下來根據這些深度值判斷矩形深度影像300是否有偏差。在沒有偏差的理想狀況,深度值的分佈類似於圖表320所示,其中橫軸為取樣方向,縱軸為深度值的大小,圖表320中的每一個點321都代表深度值,為了簡化起見在此並未標示所有的深度值321。此外,直線322代表這些深度值321的趨勢,理想狀況下直線322的斜率應該趨近於0。For the purpose of explanation, the average calculated by the moving average algorithm is referred to as the depth value below. Next, whether the rectangular depth image 300 has deviation is determined based on these depth values. In an ideal situation without deviation, the distribution of the depth value is similar to that shown in the graph 320, wherein the horizontal axis is the sampling direction and the vertical axis is the magnitude of the depth value. Each point 321 in the graph 320 represents a depth value. For the sake of simplicity, not all the depth values 321 are marked here. In addition, the straight line 322 represents the trend of these depth values 321. In an ideal situation, the slope of the straight line 322 should be close to 0.

如上所述,當待測物110沿著垂直的軸線160旋轉一角度時會有線性偏差,此時深度值的分佈會類似於圖表330,這些深度值331會逐漸下降,因此代表趨勢的直線332的斜率會小於0;或者深度值331逐漸上升,代表趨勢的直線斜率大於0。當有非線性偏差時會形成圖表340,深度值341也是逐漸下降,但在不同的片段341~344中下降的速度不相同,也就是說片段342的斜率會大於片段343的斜率,片段343的斜率會大於片段344的斜率。或者,深度值341可逐漸上升,但在不同片段中的斜率不相同。在此可以利用斜率或是線性迴歸演算法來判斷是屬於哪一種偏差。As described above, when the object to be tested 110 rotates an angle along the vertical axis 160, there will be a linear deviation. At this time, the distribution of the depth values will be similar to the graph 330. These depth values 331 will gradually decrease, so the slope of the straight line 332 representing the trend will be less than 0; or the depth value 331 will gradually increase, and the slope of the straight line representing the trend will be greater than 0. When there is a non-linear deviation, a graph 340 will be formed, and the depth value 341 will also gradually decrease, but the decreasing speed in different segments 341~344 is different, that is, the slope of segment 342 will be greater than the slope of segment 343, and the slope of segment 343 will be greater than the slope of segment 344. Alternatively, the depth value 341 may gradually increase, but the slope in different segments is different. Here, the slope or linear regression algorithm can be used to determine which type of deviation it belongs to.

首先說明斜率的作法,首先從左至右(沿著取樣方向301)計算每兩個相鄰的深度值之間的斜率, 表示第i個斜率,i為正整數。接下來設定一個範圍,表示為-R~+R,其中R為正整數。此外也設定一個基準值T,其初始值設定為0。對於每一個深度值 ,如果 成立,則產生一個新的片段,並且設定新的基準值 ,否則處理下一個深度值。在處理所有的深度值以後,判斷片段的個數,如果片段的個數為0,則表示沒有偏差。如果片段的個數為1,則有可能是有個轉折點或是線性偏差,因此可以進一步判斷所有斜率 的標準差,如果標準差在某個臨界值以下,則判斷為線性偏差。如果片段的個數大於1則表示非線性偏差。在圖表340的實施例中會產生片段342~344,這是因為片段交界處的斜率超出了上述的範圍。 First, the slope calculation method is explained. First, the slope between every two adjacent depth values is calculated from left to right (along the sampling direction 301). represents the i-th slope, i is a positive integer. Next, a range is set, expressed as -R~+R, where R is a positive integer. In addition, a reference value T is also set, and its initial value is set to 0. For each depth value ,if If true, a new fragment is generated and a new baseline value is set , otherwise, process the next depth value. After processing all the depth values, determine the number of segments. If the number of segments is 0, it means there is no deviation. If the number of segments is 1, there may be a turning point or linear deviation, so all slopes can be further determined. If the standard deviation is below a certain critical value, it is judged as a linear deviation. If the number of segments is greater than 1, it indicates a nonlinear deviation. In the embodiment of the graph 340, segments 342-344 are generated because the slope at the segment junction exceeds the above range.

接下來說明線性迴歸演算法,可以用一個線性函數來逼近所有的深度值,以下用 表示第i個深度值。線性迴歸演算法是要執行以下數學式1的最佳化演算法。 [數學式1] Next, we will explain the linear regression algorithm. We can use a linear function to approximate all depth values. represents the i-th depth value. The linear regression algorithm is to perform the optimization algorithm of the following mathematical formula 1. [Mathematical formula 1]

其中 為深度值 所對應在取樣方向上的位置, 代表一個線性方程式, 為變數,數學式1的目的是要找到一條直線來逼近這些深度值,變數 代表直線的斜率。如果數學式1所計算出的誤差小於一臨界值且變數 在範圍-R~+R之內,則表示矩形深度影像300沒有偏差。如果數學式1計算出的誤差小於臨界值但變數 在範圍-R~+R之外,則表示為線性偏差。如果數學式1計算出的誤差大於等於臨界值,則表示為非線性偏差。當判斷為非線性偏差以後,可以再進一步判斷出片段,例如執行以下的最佳化演算法。 [數學式2] in is the depth value The corresponding position in the sampling direction, represents a linear equation, The purpose of Equation 1 is to find a straight line to approximate these depth values. represents the slope of the line. If the error calculated by equation 1 is less than a critical value and the variable If the error calculated by equation 1 is less than the critical value but the variable Outside the range -R~+R, it is expressed as a linear deviation. If the error calculated by Mathematical Formula 1 is greater than or equal to the critical value, it is expressed as a nonlinear deviation. After determining that it is a nonlinear deviation, the segment can be further determined, such as executing the following optimization algorithm. [Mathematical Formula 2]

其中k為正整數,代表兩個片段的交界。線性方程式 是用以逼近第一個片段內的深度值,而線性方程式 是用以逼近第二個片段內的深度值。數學式2是要找到正整數k以及兩個線性方程式中的變數 ,使得數學式2的目標函數有最小的誤差。如果數學式2所計算出的誤差大於一第二臨界值,則表示有多於2個片段,可以新增一個片段重複類似的最佳化演算法,直到誤差小於第二臨界值為止。換言之,根據線性迴歸演算法的結果可判斷矩形深度影像300是否具有線性偏差或是非線性偏差。 Where k is a positive integer representing the boundary between two segments. is used to approximate the depth value in the first fragment, and the linear equation is used to approximate the depth value in the second segment. Mathematical formula 2 is to find the positive integer k and the variables in the two linear equations , so that the objective function of Mathematical Formula 2 has the smallest error. If the error calculated by Mathematical Formula 2 is greater than a second critical value, it means that there are more than 2 segments, and a new segment can be added to repeat the similar optimization algorithm until the error is less than the second critical value. In other words, it can be determined whether the rectangular depth image 300 has a linear deviation or a non-linear deviation based on the result of the linear regression algorithm.

除了上述斜率與線性迴歸的做法,本領域具有通常知識者當可採用任意的演算法來判斷深度值是否可近似為水平直線(無偏差)、斜直線(線性偏差)或多個片段(非線性偏差),本揭露並不限於上述做法。In addition to the above-mentioned slope and linear regression methods, a person skilled in the art can use any algorithm to determine whether the depth value can be approximated as a horizontal line (no deviation), an oblique line (linear deviation) or multiple segments (non-linear deviation), and the present disclosure is not limited to the above-mentioned methods.

在偵測偏差以後,可以根據是否有偏差進行補償,如果沒有偏差則在步驟350不進行補償。如果是線性偏差,則可以在步驟204進行線性補償。具體來說,在上述做法中可以找到線性方程式的變數 ,對深度值 的補償可以寫為 。如果是採用斜率方法,則可以計算所有斜率 的平均當作是斜率 。如此一來,補償後的深度值會接近圖表320所示的水平直線。由於深度值 代表矩形深度影像300多個像素的平均,因此可對所有對應像素都執行上述的補償。如果是非線性偏差,則可以在步驟205進行非線性補償。具體來說,在第一個片段中的補償類似於線性補償,寫為 ;在第二個片段中的補償寫為 ,如果有更多片段則以此類推。補償以後的深度值會接近圖表320所示的水平直線。類似的,由於深度值 代表矩形深度影像300多個像素的平均,因此可對所有對應像素都執行上述的補償。 After detecting the deviation, compensation can be performed based on whether there is a deviation. If there is no deviation, no compensation is performed in step 350. If it is a linear deviation, linear compensation can be performed in step 204. Specifically, in the above method, the variables of the linear equation can be found. , for depth values The compensation can be written as If the slope method is used, all slopes can be calculated The average of As a result, the compensated depth value will be close to the horizontal line shown in the graph 320. represents the average of more than 300 pixels of the rectangular depth image, so the above compensation can be performed on all corresponding pixels. If it is a nonlinear deviation, nonlinear compensation can be performed in step 205. Specifically, the compensation in the first segment is similar to linear compensation and is written as ; The compensation in the second fragment is written as , and so on if there are more fragments. The depth value after compensation will be close to the horizontal line shown in graph 320. Similarly, due to the depth value It represents the average of more than 300 pixels of the rectangular depth image, so the above compensation can be performed on all corresponding pixels.

請回到圖2,如果步驟202的結果為否或者是經過步驟204、205的補償,在步驟206中可以得到理想資料型態(類似於圖表320)。在步驟207,可以對補償後的矩形深度影像300進行後處理,例如將矩形影像的直角座標轉換為極座標,變成符合鋼捲形狀的圓形影像。Please return to FIG. 2 . If the result of step 202 is no or after compensation in steps 204 and 205, an ideal data type (similar to graph 320 ) can be obtained in step 206 . In step 207 , the compensated rectangular depth image 300 can be post-processed, for example, the rectangular coordinates of the rectangular image can be converted into polar coordinates to become a circular image that conforms to the shape of the steel coil.

在上述的深度檢測與補償系統中,藉由讓待測物旋轉,深度感測模組130的掃瞄範圍可以不用涵蓋整個待測物,可以降低深度感測模組130的硬體需求或是提升掃描精確度。此外,由於待測物可能會沿著垂直的軸線旋轉或是速度不固定導致感測的深度有偏差,在此也提出偵測並補償偏差的辦法。In the above-mentioned depth detection and compensation system, by rotating the object to be detected, the scanning range of the depth sensing module 130 does not need to cover the entire object to be detected, which can reduce the hardware requirements of the depth sensing module 130 or improve the scanning accuracy. In addition, since the object to be detected may rotate along a vertical axis or the speed is not fixed, resulting in deviations in the sensed depth, a method for detecting and compensating the deviation is also proposed herein.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed as above by the embodiments, they are not intended to limit the present invention. Any person with ordinary knowledge in the relevant technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be defined by the scope of the attached patent application.

100:深度檢測與補償系統 110:待測物 121,122:旋轉模組 130:深度感測模組 140:計算模組 150,160:軸線 201~207:步驟 300:矩形深度影像 301:取樣方向 302:旋轉方向 310:滑動視窗 320,330,340:圖表 321,331,341:深度值 322,332:直線 342~344:片段 350:步驟 100: Depth detection and compensation system 110: Object to be detected 121,122: Rotation module 130: Depth sensing module 140: Calculation module 150,160: Axis 201~207: Step 300: Rectangular depth image 301: Sampling direction 302: Rotation direction 310: Sliding window 320,330,340: Graph 321,331,341: Depth value 322,332: Line 342~344: Clip 350: Step

圖1是根據一實施例繪示檢測系統的示意圖。 圖2是根據一實施例繪示深度檢測與補償方法的流程圖。 圖3是根據一實施例繪示偵測偏差的示意圖。 FIG. 1 is a schematic diagram of a detection system according to an embodiment. FIG. 2 is a flow chart of a depth detection and compensation method according to an embodiment. FIG. 3 is a schematic diagram of a detection deviation according to an embodiment.

201~207:步驟 201~207: Steps

Claims (10)

一種深度檢測與補償系統,包括: 一待測物; 多個旋轉模組,用以將該待測物繞著一軸線旋轉,其中該待測物從該軸線視之的輪廓為圓形; 一深度感測模組,設置在該待測物的一側,用以取得矩形深度影像,其中該矩形深度影像具有一取樣方向與一旋轉方向,該深度感測模組的掃瞄範圍小於該圓形的直徑;以及 一計算模組,通訊連接至該些旋轉模組與該深度感測模組,用以套用一滑動視窗在該矩形深度影像上,該滑動視窗沿著該取樣方向移動以得到多個深度值, 其中該計算模組用以根據該些深度值判斷該矩形深度影像是否有偏差,若有的話補償該偏差。 A depth detection and compensation system includes: an object to be detected; a plurality of rotation modules for rotating the object to be detected around an axis, wherein the outline of the object to be detected viewed from the axis is a circle; a depth sensing module, disposed on one side of the object to be detected, for obtaining a rectangular depth image, wherein the rectangular depth image has a sampling direction and a rotation direction, and the scanning range of the depth sensing module is smaller than the diameter of the circle; and a calculation module, communicatively connected to the rotation modules and the depth sensing module, for applying a sliding window on the rectangular depth image, wherein the sliding window moves along the sampling direction to obtain a plurality of depth values, wherein the calculation module is used to determine whether the rectangular depth image has a deviation according to the depth values, and if so, to compensate for the deviation. 如請求項1所述之深度檢測與補償系統,其中該滑動視窗在該取樣方向上的長度大於1,該滑動視窗在該旋轉方向上的長度等於該矩形深度影像在該旋轉方向上的長度, 其中該計算模組用以根據該滑動視窗執行一移動平均演算法,該滑動視窗的每一位置對應至該些深度值的其中之一。 A depth detection and compensation system as described in claim 1, wherein the length of the sliding window in the sampling direction is greater than 1, the length of the sliding window in the rotation direction is equal to the length of the rectangular depth image in the rotation direction, wherein the calculation module is used to execute a moving average algorithm based on the sliding window, and each position of the sliding window corresponds to one of the depth values. 如請求項2所述之深度檢測與補償系統,其中該計算模組還用以計算該些深度值中每兩個相鄰的該些深度值之間的斜率,並根據該斜率是否超出一範圍來判斷該矩形深度影像是否具有線性偏差或是非線性偏差。A depth detection and compensation system as described in claim 2, wherein the calculation module is also used to calculate the slope between every two adjacent depth values among the depth values, and determine whether the rectangular depth image has a linear deviation or a non-linear deviation based on whether the slope exceeds a range. 如請求項2所述之深度檢測與補償系統,其中該計算模組還用以根據該些深度值執行一線性迴歸演算法,並根據該線性迴歸演算法的結果來判斷該矩形深度影像是否具有線性偏差或是非線性偏差。A depth detection and compensation system as described in claim 2, wherein the computing module is further used to execute a linear regression algorithm based on the depth values, and to determine whether the rectangular depth image has a linear deviation or a non-linear deviation based on the result of the linear regression algorithm. 如請求項1所述之深度檢測與補償系統,其中該待測物為圓筒狀的鋼卷。A depth detection and compensation system as described in claim 1, wherein the object to be detected is a cylindrical steel coil. 一種深度檢測與補償方法,適用於一電腦系統,該深度檢測與補償方法包括: 透過多個旋轉模組將一待測物繞著一軸線旋轉,其中該待測物從該軸線視之的輪廓為圓形; 透過一深度感測模組取得一矩形深度影像,其中該深度感測模組設置在該待測物的一側,該矩形深度影像具有一取樣方向與一旋轉方向,該深度感測模組的掃瞄範圍小於該圓形的直徑; 套用一滑動視窗在該矩形深度影像上,該滑動視窗沿著該取樣方向移動以得到多個深度值;以及 根據該些深度值判斷該矩形深度影像是否有偏差,若有的話補償該偏差。 A depth detection and compensation method is applicable to a computer system, and the depth detection and compensation method includes: Rotating an object to be detected around an axis through multiple rotation modules, wherein the outline of the object to be detected viewed from the axis is circular; Obtaining a rectangular depth image through a depth sensing module, wherein the depth sensing module is set on one side of the object to be detected, the rectangular depth image has a sampling direction and a rotation direction, and the scanning range of the depth sensing module is smaller than the diameter of the circle; Applying a sliding window on the rectangular depth image, the sliding window moves along the sampling direction to obtain multiple depth values; and Judging whether the rectangular depth image has deviation according to the depth values, and if so, compensating for the deviation. 如請求項6所述之深度檢測與補償方法,其中該滑動視窗在該取樣方向上的長度大於1,該滑動視窗在該旋轉方向上的長度等於該矩形深度影像在該旋轉方向上的長度,該深度檢測與補償方法還包括: 根據該滑動視窗執行一移動平均演算法,該滑動視窗的每一位置對應至該些深度值的其中之一。 The depth detection and compensation method as described in claim 6, wherein the length of the sliding window in the sampling direction is greater than 1, and the length of the sliding window in the rotation direction is equal to the length of the rectangular depth image in the rotation direction, and the depth detection and compensation method further includes: Executing a moving average algorithm based on the sliding window, each position of the sliding window corresponds to one of the depth values. 如請求項7所述之深度檢測與補償方法,還包括: 計算該些深度值中每兩個相鄰的該些深度值之間的斜率,並根據該斜率是否超出一範圍來判斷該矩形深度影像是否具有線性偏差或是非線性偏差。 The depth detection and compensation method as described in claim 7 further includes: Calculating the slope between every two adjacent depth values among the depth values, and judging whether the rectangular depth image has a linear deviation or a nonlinear deviation according to whether the slope exceeds a range. 如請求項7所述之深度檢測與補償方法,還包括: 根據該些深度值執行一線性迴歸演算法,並根據該線性迴歸演算法的結果來判斷該矩形深度影像是否具有線性偏差或是非線性偏差。 The depth detection and compensation method as described in claim 7 further includes: Executing a linear regression algorithm based on the depth values, and determining whether the rectangular depth image has a linear deviation or a non-linear deviation based on the result of the linear regression algorithm. 如請求項6所述之深度檢測與補償方法,其中該待測物為圓筒狀的鋼卷。A depth detection and compensation method as described in claim 6, wherein the object to be detected is a cylindrical steel coil.
TW111136766A 2022-09-28 2022-09-28 System and method for detecting and compensating depth TWI806780B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111136766A TWI806780B (en) 2022-09-28 2022-09-28 System and method for detecting and compensating depth

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111136766A TWI806780B (en) 2022-09-28 2022-09-28 System and method for detecting and compensating depth

Publications (2)

Publication Number Publication Date
TWI806780B TWI806780B (en) 2023-06-21
TW202412960A true TW202412960A (en) 2024-04-01

Family

ID=87803278

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111136766A TWI806780B (en) 2022-09-28 2022-09-28 System and method for detecting and compensating depth

Country Status (1)

Country Link
TW (1) TWI806780B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3110152B2 (en) * 1992-05-14 2000-11-20 日新製鋼株式会社 A device that detects the winding shape on the side of the coil
KR20040020358A (en) * 2002-08-30 2004-03-09 주식회사 포스코 Device and method for telescope measurement for steel coil
KR100941592B1 (en) * 2009-03-26 2010-02-11 유진인스텍 주식회사 Detecting method of defect in rolling state of roll and the detecting apparatus
WO2011014262A1 (en) * 2009-07-31 2011-02-03 The Mill Steel Co. Apparatus for determining gauge profile for flat rolled material with laser-based lap counter
KR102043564B1 (en) * 2018-08-29 2019-11-12 주식회사 포스코 Measuring apparatus telescope of coil
CN113465511B (en) * 2021-06-19 2022-12-13 精锐视觉智能科技(上海)有限公司 Steel coil size online measurement and omnibearing end surface defect online detection method

Similar Documents

Publication Publication Date Title
US8107064B2 (en) Disc wafer inspecting device and inspecting method
WO2018173660A1 (en) Surface defect inspection method and surface defect inspection device
CN110906875B (en) Visual processing method for aperture measurement
US20060070417A1 (en) Flatness monitor
JP5344699B2 (en) Semiconductor wafer edge inspection apparatus and edge inspection method
JP2001343223A (en) Method for measuring quality of strip-shaped object, method for controlling camber, quality-measuring apparatus for strip-shaped object, rolling apparatus and trimming apparatus
JP6314798B2 (en) Surface defect detection method and surface defect detection apparatus
CN110553594A (en) Image processing apparatus, overload detection system, and medium
TWI806780B (en) System and method for detecting and compensating depth
TW202412960A (en) System and method for detecting and compensating depth
Guang-Sheng et al. Dynamic wood slice recognition using image blur information
JP2006226918A (en) Optical distortion correction device and optical distortion correction method
CN116630327B (en) Boiler state abnormity monitoring system based on thermodynamic diagram
JP2002310618A (en) Size measurement device, size measurement method and inspection device for electronic component
US8929661B2 (en) System and method for measuring camber on a surface
WO2023000540A1 (en) Method and terminal device for measuring burden surface profile of blast furnace, and storage medium
CN112361985B (en) Machine vision-based blank curvature detection method
CN114018299A (en) Control method and system of two-channel rotating transformer type inductive shaft angle encoder
JP4023295B2 (en) Surface inspection method and surface inspection apparatus
JPH08285550A (en) Instrument for measuring-steel plate displacement
JP2009025078A (en) Luminance nonuniformity measurement method for uniform light source
Zhang et al. The defects recognition of wheel tread based on linear CCD
JP2009025078A5 (en)
Duan et al. Measuring of train wheel surface defect based on linear CCD imaging
JP5403653B2 (en) Disc-shaped substrate inspection equipment