TWI450216B - Computer system and method for extracting boundary elements - Google Patents

Computer system and method for extracting boundary elements Download PDF

Info

Publication number
TWI450216B
TWI450216B TW097130282A TW97130282A TWI450216B TW I450216 B TWI450216 B TW I450216B TW 097130282 A TW097130282 A TW 097130282A TW 97130282 A TW97130282 A TW 97130282A TW I450216 B TWI450216 B TW I450216B
Authority
TW
Taiwan
Prior art keywords
point
boundary
triangle
vertex
points
Prior art date
Application number
TW097130282A
Other languages
Chinese (zh)
Other versions
TW201007618A (en
Inventor
Chih Kuang Chang
Xin-Yuan Wu
Hua Huang
Original Assignee
Hon Hai Prec Ind Co Ltd
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 Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW097130282A priority Critical patent/TWI450216B/en
Publication of TW201007618A publication Critical patent/TW201007618A/en
Application granted granted Critical
Publication of TWI450216B publication Critical patent/TWI450216B/en

Links

Landscapes

  • Image Analysis (AREA)

Description

邊界元素提取方法及其電腦系統Boundary element extraction method and computer system thereof

本發明涉及一種邊界元素提取方法及其電腦系統,尤其涉及一種從雜亂點雲中提取邊界元素的方法及其電腦系統。The invention relates to a boundary element extraction method and a computer system thereof, in particular to a method for extracting boundary elements from a messy point cloud and a computer system thereof.

在三維產品的開發及製造過程中,誤差分析已經成為產品品質驗證的重要環節。傳統的做法是使用點雲獲取裝置獲取工件的點雲(即由多個三維離散點組成的點的集合),而後將點雲資料登錄電腦,執行相應軟體對點雲資料進行處理,以提取點雲對應的邊界元素,也就是工件的邊界點和邊界特徵。然後,透過迭代擬合法將實際工件和量測工件所得的理論設計圖檔進行對齊,以確定實際工件與理論設計圖檔中的影像之間是否存在誤差。但是,此種做法的對齊效率不高,且特殊位置還不能完全對齊。In the development and manufacturing process of 3D products, error analysis has become an important part of product quality verification. The traditional approach is to use a point cloud acquisition device to acquire a point cloud of the workpiece (ie, a collection of points consisting of multiple three-dimensional discrete points), and then log the point cloud data to the computer, and execute the corresponding software to process the point cloud data to extract points. The boundary element corresponding to the cloud, that is, the boundary point and boundary feature of the workpiece. Then, the actual workpiece and the theoretical design image obtained by measuring the workpiece are aligned by an iterative fitting method to determine whether there is an error between the actual workpiece and the image in the theoretical design image. However, the alignment of this method is not efficient, and the special positions are not fully aligned.

另外,隨著影像技術的發展,人臉識別、特徵匹配、有限元分析等技術的引用,業界人員對邊界元素的提取精度和提取速度的要求也越來越高,而傳統技術中進行邊界元素提取的方法還不能達到此等要求。In addition, with the development of imaging technology, the reference of technologies such as face recognition, feature matching, and finite element analysis, the requirements of the extraction precision and extraction speed of boundary elements are getting higher and higher in the industry, while the boundary elements in the traditional technology are used. The extraction method still does not meet these requirements.

鑒於以上內容,有必要提供一種邊界元素提取方法及其電腦系統,可自動提取雜亂點雲的邊界元素,包括提取邊界點和創建邊界特徵,提高了邊界元素的提取精度和提取速度。In view of the above, it is necessary to provide a boundary element extraction method and a computer system thereof, which can automatically extract boundary elements of a chaotic point cloud, including extracting boundary points and creating boundary features, and improving extraction precision and extraction speed of boundary elements.

一種邊界元素提取方法,該方法包括:獲取量測工件所產生的點雲資料及組成點雲三角網格化曲面的三角形的最大邊長;根據該最大邊長將所獲取的點雲建立成三角網格化曲面;從上述三角網格化曲面中提取邊界點;根據邊界點的向量變化情況對所述邊界點進行分組;將每組邊界點分別擬合成直線和圓;在進行直線容差判斷和圓容差判斷後確定適合每組邊界點的邊界特徵;及輸出所述邊界特徵。A boundary element extraction method, comprising: obtaining a point cloud data generated by the measurement workpiece and a maximum side length of a triangle constituting a point cloud triangle meshing surface; and the acquired point cloud is formed into a triangle according to the maximum side length Meshing the surface; extracting the boundary points from the triangular meshed surface; grouping the boundary points according to the vector variation of the boundary points; fitting each set of boundary points into a straight line and a circle respectively; determining the linear tolerance And the round tolerance judgment determines the boundary features suitable for each set of boundary points; and outputs the boundary features.

一種提取邊界元素的電腦系統,該電腦系統包括:獲取單元,用於獲取量測工件所產生的點雲資料及組成點雲三角網格化曲面的三角形的最大邊長;三角網格化單元,用於根據所述最大邊長將所獲取的點雲建立成三角網格化曲面;邊界點提取單元,用於從上述三角網格化曲面中提取邊界點;及創建單元,用於根據邊界點的向量變化情況對所述邊界點進行分組,將每組邊界點分別擬合成直線或圓,在進行直線容差判斷和圓容差判斷後確定適合每組邊界點的邊界特徵,並輸出所述邊界特徵。A computer system for extracting boundary elements, the computer system comprising: an acquisition unit, configured to acquire a point cloud data generated by the measurement workpiece and a maximum side length of a triangle constituting a point cloud triangle meshed surface; a triangular meshing unit, And a boundary point extraction unit configured to extract a boundary point from the triangular meshed surface; and a unit for forming the boundary point according to the maximum side length; The vector variation case groups the boundary points, and each set of boundary points is respectively fitted into a straight line or a circle, and after determining the linear tolerance judgment and the round tolerance judgment, determining boundary features suitable for each set of boundary points, and outputting the Border features.

相較於習知技術,所述邊界元素提取方法及其電腦系統,不僅可自動提取單層雜亂點雲的邊界元素,還可以提取多層雜亂點雲的邊界元素,提高了邊界元素提取精度和速度。Compared with the prior art, the boundary element extraction method and the computer system thereof can not only automatically extract boundary elements of a single layer of disordered point clouds, but also extract boundary elements of multiple layers of disordered point clouds, thereby improving the accuracy and speed of boundary element extraction. .

參閱圖1所示,係本發明提取邊界元素的電腦系統較佳實施例之運行環境圖。該運行環境圖包括一影像量測機 台1及與該影像量測機台1相連接的電腦2。Referring to Figure 1, there is shown an operational environment diagram of a preferred embodiment of a computer system for extracting boundary elements of the present invention. The operating environment map includes an image measuring machine The table 1 and the computer 2 connected to the image measuring machine 1 are provided.

所述影像量測機台1用於對工件3進行量測,獲取該工件3的點雲資料。該點雲資料包括點的三維座標、點的標識和點雲總數。在本實施例中,由於工件3每個部位的密度不同、結構不同,所以,影像量測機台1所獲取的點雲為雜亂點雲。The image measuring machine 1 is used for measuring the workpiece 3 and acquiring point cloud data of the workpiece 3. The point cloud data includes the three-dimensional coordinates of the point, the identification of the point, and the total number of point clouds. In this embodiment, since the density of each part of the workpiece 3 is different and the structure is different, the point cloud acquired by the image measuring machine 1 is a messy point cloud.

電腦2內存儲一邊界元素提取系統20,如圖2所示,該邊界元素提取系統20包括獲取單元21、三角網格化單元23、邊界點提取單元25和創建單元27,用於從雜亂點雲中提取邊界元素,該邊界元素包括邊界點和邊界特徵。因此,本實施例中的提取邊界元素包括提取邊界點和創建邊界特徵,具體而言,邊界元素提取系統20對所獲取的點雲建立三角網格化曲面(以下簡稱為“三角網格面”),從三角網格面中提取邊界點,並根據所提取的邊界點創建點雲的邊界特徵。A boundary element extraction system 20 is stored in the computer 2, and as shown in FIG. 2, the boundary element extraction system 20 includes an acquisition unit 21, a triangular meshing unit 23, a boundary point extraction unit 25, and a creation unit 27 for use from a messy point. A boundary element is extracted from the cloud, the boundary element including boundary points and boundary features. Therefore, extracting the boundary element in the embodiment includes extracting the boundary point and creating the boundary feature. Specifically, the boundary element extraction system 20 establishes a triangular meshed surface for the acquired point cloud (hereinafter referred to as a “triangular mesh surface”). ), extracting boundary points from the triangular mesh surface, and creating boundary features of the point cloud according to the extracted boundary points.

參閱圖3,係本發明邊界元素提取方法較佳實施例之作業流程圖。Referring to Figure 3, there is shown a flow chart of a preferred embodiment of the boundary element extraction method of the present invention.

步驟S1,獲取單元21獲取影像量測機台1量測工件3所產生的點雲資料及獲取用戶輸入的組成三角網格面的三角形的最大邊長。其中,所述獲取包括獲取單元21接收影像量測機台1線上量測工件3的點雲資料,及透過打開資料檔案的形式獲取影像量測機台1先前量測工件3所得到的點雲資料。所述最大邊長為用戶自定義的邊長,其約等於點雲中相鄰點之間距離的平均值。In step S1, the acquiring unit 21 acquires the point cloud data generated by the image measuring machine 1 for measuring the workpiece 3 and obtains the maximum side length of the triangle of the triangular mesh surface input by the user. The obtaining includes the acquiring unit 21 receiving the point cloud data of the measuring workpiece 3 on the image measuring machine 1 on the line, and acquiring the point cloud obtained by the image measuring machine 1 previously measuring the workpiece 3 by opening the data file. data. The maximum side length is a user-defined side length that is approximately equal to the average of the distance between adjacent points in the point cloud.

步驟S3,三角網格化單元23根據所述最大邊長將所獲取的點雲建立成三角網格面。In step S3, the triangular meshing unit 23 establishes the acquired point cloud into a triangular mesh surface according to the maximum side length.

步驟S5,邊界點提取單元25從上述三角網格面中提取邊界點。In step S5, the boundary point extracting unit 25 extracts a boundary point from the above-described triangular mesh surface.

步驟S7,創建單元27根據所提取的邊界點創建點雲的邊界特徵,並輸出所創建的邊界特徵。In step S7, the creating unit 27 creates a boundary feature of the point cloud according to the extracted boundary point, and outputs the created boundary feature.

參閱圖4,係圖3中步驟S3建立三角網格面的具體作業流程圖。Referring to FIG. 4, a specific operation flowchart of establishing a triangular mesh surface in step S3 in FIG. 3 is shown.

步驟S300,三角網格化單元23根據點雲資料中點的三維座標計算得到所述點雲的包圍盒,對該包圍盒進行分組,並將點雲資料中每個點的標識填入到相應的分組中。所述分組後每個單元小正方體的邊長可由所述最大邊長及點雲總數計算得出。Step S300, the triangle meshing unit 23 calculates the bounding box of the point cloud according to the three-dimensional coordinates of the point in the point cloud data, groups the bounding box, and fills in the identifier of each point in the point cloud data into corresponding In the grouping. The side length of each unit small cube after the grouping can be calculated from the maximum side length and the total number of point clouds.

步驟S302,獲取點雲中尚未與其他點組成三角形TO的任一點,作為三角形TO的第一頂點D1,並求取距離該第一頂點D1最近的點,作為三角形TO的第二頂點D2。Step S302: Obtain any point in the point cloud that has not formed a triangle TO with other points, as the first vertex D1 of the triangle TO, and obtain a point closest to the first vertex D1 as the second vertex D2 of the triangle TO.

步驟S304,連接第一頂點D1和第二頂點D2得到一條邊B0,且將該邊B0加入一邊佇列中。Step S304, connecting the first vertex D1 and the second vertex D2 to obtain one side B0, and adding the side B0 to the side array.

步驟S306,根據所述最大邊長找出組成該三角形TO的第三頂點D3,構建該三角形T0且將該三角形T0的另外兩條邊添至所述邊佇列,即除了邊B0外的另外兩條邊。其中,三角形T0的內角不能太小,如1度、2度,在尋找第三頂點D3時,要優先考慮所組成的角大於25度的點,然後再考慮所組成的角小於25度但角度卻不能太小的 點。在本較佳實施例中,該組成的角不能小於3度。Step S306, finding a third vertex D3 constituting the triangle TO according to the maximum side length, constructing the triangle T0 and adding the other two sides of the triangle T0 to the edge array, that is, the other two except the edge B0 Side. Wherein, the inner angle of the triangle T0 cannot be too small, such as 1 degree and 2 degrees. When searching for the third vertex D3, priority should be given to the points formed by the angle greater than 25 degrees, and then the angle formed is less than 25 degrees. Angle can not be too small point. In the preferred embodiment, the angle of the composition cannot be less than 3 degrees.

步驟S308,對上述三角形T0進行外接球判斷和鈍角判斷,以找出除了上述第三頂點D3外能與邊B0構成三角形的點D`。所述外接球判斷是指利用數學法則如最小二乘法,將三角形T0擬合成一個球,三角形T0透過其三個頂點與所述球連接,且該球內沒有點存在,三角網格化單元23利用鈍角原則在該球上尋找點D`,點D`與邊B0組成三角形T`,該三角形T`與三角形T0之間的夾角必須為鈍角。Step S308, performing circumscribed ball determination and obtuse angle judgment on the triangle T0 to find a point D' which can form a triangle with the side B0 except the third vertex D3. The circumscribed ball judgment refers to fitting a triangle T0 into a ball by using a mathematical rule such as a least square method, the triangle T0 is connected to the ball through its three vertices, and no point exists in the ball, and the triangular meshing unit 23 The point D' is found on the ball by the obtuse angle principle, and the point D' and the side B0 form a triangle T', and the angle between the triangle T' and the triangle T0 must be an obtuse angle.

步驟S310,點D`與邊B0組成三角形T`,三角網格化單元23將該三角形T‵的另外兩條邊,即除了邊B0的另外兩條邊,添加到所述邊佇列中。In step S310, the point D' and the side B0 form a triangle T', and the triangular meshing unit 23 adds the other two sides of the triangle T, that is, the other two sides except the side B0, to the side line.

步驟S312,三角網格化單元23迴圈邊佇列中的邊,並重複執行步驟S308至步驟S312,直至所有的邊被迴圈完,完成構建的三角形組成了點雲的三角網格面。In step S312, the triangular meshing unit 23 loops back the edges in the edge array, and repeats steps S308 to S312 until all the edges are circled, and the completed triangle constitutes a triangular mesh surface of the point cloud.

於步驟S308中,在進行鈍角判斷時,本較佳實施例優先考慮與三角形T0組成120度夾角的三角形。然而,三角網格化單元23利用外接球判斷和鈍角判斷的方法可能會同時找到多個點D`,但其最終只能確定一個點D`為最佳點,與邊B0組成三角形T`。例如,若三角網格化單元23利用外接球判斷和鈍角判斷的方法同時找到了點D1`和點D2`,邊B0與點D1`可組成三角形T1`、邊B0與點D2`可組成三角形T2`,則三角網格化單元23需確定在三角形T1`和T2`中邊B0的對角哪個更大,若邊B0在三角形T1`中的對角大於在三角形T2`中的對角,則最終確定點 D1`是所要找到的最佳點;反之,若邊B0在三角形T2`中的對角大於在三角形T1`中的對角,則最終確定點D2`是所要找到的最佳點。In step S308, in the case of obtuse angle determination, the preferred embodiment preferentially considers a triangle that forms an angle of 120 degrees with the triangle T0. However, the triangle meshing unit 23 may find a plurality of points D' at the same time by using the method of circumscribing and obtuse angle judgment, but it can only determine that one point D' is the best point, and the side B0 forms a triangle T'. For example, if the triangular meshing unit 23 finds the point D1' and the point D2' simultaneously by the method of the circumscribing ball judgment and the obtuse angle judgment, the edge B0 and the point D1' may form a triangle T1', the edge B0 and the point D2' may form a triangle. T2`, the triangular meshing unit 23 needs to determine which of the diagonals of the edge B0 in the triangles T1' and T2' is larger, if the diagonal of the edge B0 in the triangle T1' is larger than the diagonal in the triangle T2', Final point D1` is the best point to be found; conversely, if the diagonal of edge B0 in triangle T2' is greater than the diagonal in triangle T1', then the final point D2' is the best point to be found.

參閱圖5,係圖3中步驟S5提取邊界點之具體作業流程圖。Referring to FIG. 5, a specific operation flowchart of extracting boundary points in step S5 in FIG. 3 is shown.

步驟S500,邊界點提取單元25從所述三角網格面中獲取當前判斷點週圍的三角形及每個三角形的頂點。In step S500, the boundary point extracting unit 25 acquires a triangle around the current judgment point and a vertex of each triangle from the triangular mesh plane.

步驟S502,計算每個頂點被當前判斷點週圍的三角形所佔用的次數,如圖6和圖7所示,點1、點2、點3、點4和點5分別為當前判斷點0週圍的三角形的頂點。在圖6中,點1、點2、點3、點4和點5被當前判斷點0週圍的三角形所佔用的次數分別為2;在圖7中,點2、點3和點4被當前判斷點0週圍的三角形所佔用的次數分別為2,點1和點5被佔用的次數分別為1。Step S502, calculating the number of times each vertex is occupied by the triangle around the current judgment point, as shown in FIG. 6 and FIG. 7, point 1, point 2, point 3, point 4, and point 5 are respectively around the current judgment point 0. The vertices of the triangle. In FIG. 6, points 1, 2, 3, 4, and 5 are occupied by the triangles around the current judgment point 0, respectively; in FIG. 7, points 2, 3, and 4 are currently The number of times the triangle around point 0 is occupied is 2, and the number of times 1 and 5 are occupied is 1.

步驟S504,依次判斷所述頂點被當前判斷點0週圍的三角形所佔用的次數是否均大於1。Step S504, it is sequentially determined whether the number of times the vertex is occupied by the triangle around the current judgment point 0 is greater than 1.

若步驟S504的判斷結果為是,即所述頂點被佔用的次數均大於1,則步驟S506確定該當前判斷點為內點,然後直接進入步驟S510。如圖6所示,由於所有的頂點被當前判斷點0週圍的三角形所佔用的次數均大於1,因此,圖6所示的當前判斷點0被確定為內點。If the result of the determination in step S504 is YES, that is, the number of times the vertices are occupied is greater than 1, step S506 determines that the current determination point is an internal point, and then directly proceeds to step S510. As shown in FIG. 6, since all the vertices are occupied by the triangle around the current judgment point 0 by more than 1, the current judgment point 0 shown in FIG. 6 is determined as the inner point.

若步驟S504的判斷結果為否,即所述頂點中存在至少一個頂點被佔用的次數等於1,則步驟S508確定該當前判斷點為邊界點,如圖7所示,由於點1和點5被佔用的 次數分別為1,因此,圖7所示的當前判斷點0被確定為邊界點。If the result of the determination in step S504 is NO, that is, the number of times at least one vertex in the vertex is occupied is equal to 1, step S508 determines that the current judgment point is a boundary point, as shown in FIG. 7, since point 1 and point 5 are Occupied The number of times is 1, respectively, and therefore, the current judgment point 0 shown in Fig. 7 is determined as the boundary point.

步驟S510,邊界點提取單元25判斷三角網格面中的點是否都被進行了邊界點判斷。若是,則直接結束流程;若還有點未進行邊界點判斷,則返回步驟S500,將該點作為當前判斷點,重新執行步驟S500至步驟S510直至所有的點均被進行了邊界點判斷。In step S510, the boundary point extracting unit 25 determines whether or not the points in the triangular mesh plane have been subjected to the boundary point determination. If so, the flow is directly ended; if there is still no boundary point determination, the process returns to step S500, and the point is taken as the current determination point, and steps S500 to S510 are executed again until all the points are judged by the boundary point.

參閱圖8,係圖3中步驟S7創建邊界特徵之具體作業流程圖。Referring to FIG. 8, a specific operation flowchart of creating a boundary feature in step S7 in FIG. 3 is shown.

步驟S700,創建單元27分別以圖5中提取的邊界點為當前點,並以該當前點為中心層層向外展開,計算所展開的邊界點在三角網格面上的向量之間的角度關係。In step S700, the creating unit 27 respectively uses the boundary point extracted in FIG. 5 as the current point, and expands outwardly with the current point as a center layer, and calculates an angle between the vectors of the expanded boundary point on the triangular mesh surface. relationship.

步驟S702,創建單元27根據角度變化情況對所有邊界點進行分組,並將每組邊界點分別擬合成直線。具體而言,創建單元27於步驟S702中將角度變化相差很小的邊界點放在一個組中,並由此得到了多組邊界點,然後將每組邊界點擬合成直線。例如,若邊界點a與邊界點b在三角網格面上的向量之間的角度為60度,邊界點a與邊界點c在三角網格面上的向量之間的角度為1度,則表明邊界點a與b的向量之間的角度變化很大,而邊界點a與邊界點c的向量之間的角度變化很小,因此,邊界點a與邊界點b會被分在不同組中,而邊界點a與邊界點c會被分在同一個組中。In step S702, the creating unit 27 groups all the boundary points according to the angle change condition, and fits each set of boundary points to a straight line. Specifically, the creating unit 27 places the boundary points whose angle changes differ little in one group in step S702, and thereby obtains a plurality of sets of boundary points, and then fits each set of boundary points into a straight line. For example, if the angle between the boundary point a and the vector of the boundary point b on the triangular mesh surface is 60 degrees, and the angle between the boundary point a and the vector of the boundary point c on the triangular mesh surface is 1 degree, then It indicates that the angle between the vectors of the boundary points a and b varies greatly, and the angle change between the boundary point a and the vector of the boundary point c is small, so the boundary point a and the boundary point b are divided into different groups. , and the boundary point a and the boundary point c are divided into the same group.

步驟S704,判斷用於擬合所述直線的點與該擬合後的 直線之間的差值是否均小於一個預設的直線容差。Step S704, determining a point for fitting the straight line with the fitted Whether the difference between the lines is less than a preset line tolerance.

若步驟S704中的判斷結果為是,則直接進入步驟S714;若步驟S704中的判斷結果為否,則表明所擬合的直線不適合該組邊界點,步驟S706,創建單元27利用最小二乘法將該組邊界點擬合成圓。If the result of the determination in step S704 is YES, the process directly proceeds to step S714; if the result of the determination in step S704 is negative, it indicates that the fitted straight line is not suitable for the set of boundary points, and in step S706, the creating unit 27 uses the least squares method. The set of boundary points is fitted to a circle.

步驟S708,判斷用於擬合成圓的點與該擬合後的圓之間的差值是否均小於一預設的圓容差。Step S708, determining whether the difference between the point for fitting the circle and the fitted circle is less than a preset circular tolerance.

若步驟S708中的判斷結果為否,則直接進入步驟S714;若步驟S708中的判斷結果為是,且步驟S706中擬合了至少兩個圓,則步驟S710中創建單元27根據圓的半徑、圓的向量及圓心連線與所述向量之間的關係來判斷所擬合的圓之間是否能構建圓柱。在本實施例中,創建單元27構建圓柱的條件為:上述擬合的圓的半徑相同、圓的向量之間的角度為0度或180度,且圓心連線與所述向量之間的角度也為0度或180度。If the result of the determination in step S708 is no, go directly to step S714; if the result of the determination in step S708 is YES, and at least two circles are fitted in step S706, the creating unit 27 in step S710 is based on the radius of the circle, The relationship between the circle vector and the center line and the vector to determine whether a cylinder can be constructed between the fitted circles. In this embodiment, the condition that the creating unit 27 constructs the cylinder is that the radius of the circle fitted above is the same, the angle between the vectors of the circle is 0 degree or 180 degrees, and the angle between the center line and the vector is Also 0 or 180 degrees.

若步驟S710中的判斷結果為否,則直接進入步驟S714;若步驟S710中的判斷結果為是,則步驟S712,創建單元27將滿足上述條件的圓構建成圓柱。If the result of the determination in step S710 is NO, the process proceeds directly to step S714; if the result of the determination in step S710 is YES, then in step S712, the creation unit 27 constructs a circle satisfying the above condition into a cylinder.

步驟S714,創建單元27輸出適合每組邊界點的邊界特徵,該邊界特徵包括直線、圓和圓柱。例如,若邊界點提取單元25所提取的所有邊界點如圖9(a)所示,則創建單元27所創建的邊界特徵如圖9(b)所示。In step S714, the creating unit 27 outputs boundary features suitable for each set of boundary points including straight lines, circles, and cylinders. For example, if all the boundary points extracted by the boundary point extraction unit 25 are as shown in FIG. 9(a), the boundary features created by the creation unit 27 are as shown in FIG. 9(b).

在本實施例中,所述直線容差和圓容差可由用戶提前計算出,其約等於點雲中相鄰點之間距離的平均值。另外, 不同區域的點雲的密度可能會不同,在點雲密度較大的區域,可以將所述平均值乘以一個係數,以得到該區域的直線容差和圓容差。其中,所述係數可能為0.1、0.2或0.3。In this embodiment, the linear tolerance and the round tolerance can be calculated in advance by the user, which is approximately equal to the average of the distance between adjacent points in the point cloud. In addition, The density of point clouds in different regions may be different. In the region where the density of the point cloud is large, the average value may be multiplied by a coefficient to obtain the linear tolerance and the round tolerance of the region. Wherein, the coefficient may be 0.1, 0.2 or 0.3.

另外,在本實施例中,所述創建單元27還可以先將每組邊界點擬合成圓。若用於擬合成圓的點與該擬合後的圓之間的差值不小於所述圓容差,則表明所擬合的圓不適合該組邊界點,創建單元27利用最小二乘法將該組邊界點擬合成直線,然後進行直線容差判斷。當創建單元27所擬合的圓至少為兩個時,才判斷所擬合的圓之間能否構建圓柱。In addition, in this embodiment, the creating unit 27 may also first fit each set of boundary points into a circle. If the difference between the point used to fit the circle and the fitted circle is not less than the circle tolerance, it indicates that the fitted circle is not suitable for the set of boundary points, and the creating unit 27 uses the least squares method to The group boundary points are fitted to a straight line, and then the line tolerance is judged. When the creation unit 27 fits at least two circles, it is judged whether or not a cylinder can be constructed between the fitted circles.

本發明雖以較佳實施例揭露如上,然其並非用以限定本發明。任何熟悉此項技藝之人士,在不脫離本發明之精神及範圍內,當可做更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。The present invention has been described above in terms of preferred embodiments, and is not intended to limit the invention. Any person skilled in the art will be able to make changes and refinements without departing from the spirit and scope of the invention, and the scope of the invention is defined by the scope of the appended claims.

影像量測機台‧‧‧1Image measuring machine ‧‧1

電腦‧‧‧2Computer ‧‧2

工件‧‧‧3Workpiece ‧‧3

邊界元素提取系統‧‧‧20Border element extraction system ‧‧20

獲取單元‧‧‧21Access unit ‧‧21

三角網格化單元‧‧‧23Triangular grid unit ‧‧23

邊界點提取單元‧‧‧25Boundary point extraction unit ‧‧‧25

創建單元‧‧‧27Creation unit ‧‧27

獲取量測工件所得到的點雲資料‧‧‧S1Get the point cloud data obtained by measuring the workpiece ‧‧‧S1

將所獲取的點雲建立成三角網格化曲面‧‧‧S3Create the acquired point cloud into a triangular meshed surface ‧‧‧S3

從所述三角網格化曲面中提取邊界點‧‧‧S5Extracting boundary points from the triangular meshed surface ‧‧‧S5

根據所提取的邊界點創建點雲的邊界特徵‧‧‧S7Create boundary features of point clouds based on extracted boundary points ‧‧‧S7

圖1係本發明提取邊界元素的電腦系統較佳實施例之運行環境圖。BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a diagram showing the operational environment of a preferred embodiment of a computer system for extracting boundary elements of the present invention.

圖2係本發明邊界元素提取系統之功能單元圖。Figure 2 is a functional unit diagram of the boundary element extraction system of the present invention.

圖3係本發明邊界元素提取方法較佳實施例之作業流程圖。3 is a flow chart showing the operation of a preferred embodiment of the boundary element extraction method of the present invention.

圖4係圖3中步驟S3建立三角網格化曲面之具體作業流程圖。FIG. 4 is a flow chart showing the specific operation of establishing a triangular meshed surface in step S3 of FIG. 3.

圖5係圖3中步驟S5提取邊界點之具體作業流程圖。FIG. 5 is a flow chart showing the specific operation of extracting the boundary point in step S5 of FIG. 3.

圖6和圖7係本發明獲取當前判斷點週圍的三角形及 每個三角形的頂點之示意圖。6 and 7 show that the present invention obtains a triangle around the current judgment point and A schematic representation of the vertices of each triangle.

圖8係圖3中步驟S7創建邊界特徵之具體作業流程圖。FIG. 8 is a specific operational flowchart of creating a boundary feature in step S7 of FIG. 3.

圖9係本發明創建邊界特徵之示意圖。Figure 9 is a schematic illustration of the creation of boundary features in accordance with the present invention.

獲取量測工件所得到的點雲資料‧‧‧S1Get the point cloud data obtained by measuring the workpiece ‧‧‧S1

將所獲取的點雲建立成三角網格化曲面‧‧‧S3Create the acquired point cloud into a triangular meshed surface ‧‧‧S3

從所述三角網格化曲面中提取邊界點‧‧‧S5Extracting boundary points from the triangular meshed surface ‧‧‧S5

根據所提取的邊界點創建點雲的邊界特徵‧‧‧S7Create boundary features of point clouds based on extracted boundary points ‧‧‧S7

Claims (10)

一種邊界元素提取方法,其中,該邊界元素包括邊界點和邊界特徵,該方法包括:(a)獲取量測工件所產生的點雲資料及組成點雲三角網格化曲面的三角形的最大邊長;(b)根據該最大邊長將所獲取的點雲建立成三角網格化曲面;(c)從上述三角網格化曲面中提取邊界點:(d)根據邊界點的向量變化情況對邊界點進行分組;(e)將每組邊界點分別擬合成直線和圓;(f)在進行直線容差判斷和圓容差判斷後確定適合每組邊界點的邊界特徵;及(g)輸出所述邊界特徵。A boundary element extraction method, wherein the boundary element comprises a boundary point and a boundary feature, the method comprises: (a) acquiring a point cloud data generated by the measurement workpiece and a maximum side length of a triangle constituting the point cloud triangle meshed surface (b) the acquired point cloud is formed into a triangular meshed surface according to the maximum side length; (c) extracting the boundary point from the triangular meshed surface: (d) the boundary is changed according to the vector variation of the boundary point Points are grouped; (e) each set of boundary points is fitted to a straight line and a circle respectively; (f) a boundary feature suitable for each set of boundary points is determined after straight line tolerance judgment and round tolerance judgment; and (g) output Describe the boundary features. 如申請專利範圍第1項所述之邊界元素提取方法,其中所述步驟(b)包括如下步驟:(b1)根據點雲資料中點的三維座標計算得到所述點雲的包圍盒,對該包圍盒進行分組,並將點雲資料中每個點的標識填入到相應的分組中;(b2)獲取點雲中尚未與其他點組成三角形的任一點,作為三角形的第一頂點,並求取距離該第一頂點最近的點,作為三角形的第二頂點;(b3)連接第一頂點和第二頂點得到一條邊B0,且將該邊B0加入邊佇列中;(b4)根據所述最大邊長找出組成該三角形的第三頂 點,構建該三角形且將該三角形的另外兩條邊添至上述邊佇列中;(b5)對上述三角形進行外接球判斷和鈍角判斷,以找出除了上述第三頂點外能與邊B0構成三角形的點;(b6)所找出的點與邊B0組成另一三角形,添加除了邊B0外該另一三角形的另外兩條邊至所述邊佇列;及(b7)迴圈所述邊佇列中的邊並重複執行步驟(b5)至步驟(b6),直至所有的邊都完成了構建三角形的任務。The boundary element extraction method according to claim 1, wherein the step (b) comprises the following steps: (b1) calculating a bounding box of the point cloud according to a three-dimensional coordinate of a point in the point cloud data, The bounding box is grouped, and the identifier of each point in the point cloud data is filled into the corresponding group; (b2) any point in the point cloud that has not formed a triangle with other points is obtained as the first vertex of the triangle, and Taking the point closest to the first vertex as the second vertex of the triangle; (b3) connecting the first vertex and the second vertex to obtain an edge B0, and adding the side B0 to the edge array; (b4) according to the The largest side length finds the third top that makes up the triangle Pointing, constructing the triangle and adding the other two sides of the triangle to the edge array; (b5) performing circumscribed ball judgment and obtuse angle judgment on the triangle to find a triangle which can form a triangle with the edge B0 except the third vertex (b6) the found point and the side B0 form another triangle, adding the other two sides of the other triangle except the side B0 to the side 伫 column; and (b7) looping the side 伫 column The middle edge and repeat steps (b5) through (b6) until all the edges complete the task of building the triangle. 如申請專利範圍第1項所述之邊界元素提取方法,其中所述步驟(c)包括如下步驟:(c1)獲取三角網格化曲面中當前判斷點週圍的三角形及每個三角形的頂點;(c2)計算每個頂點被當前判斷點週圍的三角形所佔用的次數;(c3)若所述頂點被佔用的次數均大於1,則確定該當前判斷點為內點;(c4)若所述頂點中有頂點被佔用的次數等於1,則確定該當前判斷點為邊界點;(c5)判斷三角網格面中的點是否都被進行了邊界點判斷;及(c6)若步驟(c5)判斷的結果為是,則直接結束流程,若步驟(c5)判斷的結果為還有點未進行邊界點判斷,則返回步驟(c1),將該點作為當前判斷點,重新執行步驟(c1)至步驟(c5)直至所有的點均被進行了邊界點判斷。The boundary element extraction method according to claim 1, wherein the step (c) comprises the following steps: (c1) acquiring a triangle around the current judgment point in the triangular meshed surface and a vertex of each triangle; C2) calculating the number of times each vertex is occupied by a triangle around the current judgment point; (c3) if the number of times the vertex is occupied is greater than 1, determining that the current judgment point is an inner point; (c4) if the vertex is If the number of times the vertex is occupied is equal to 1, it is determined that the current judgment point is a boundary point; (c5) determining whether the points in the triangular mesh plane are all judged by the boundary point; and (c6) if the step (c5) is judged If the result is YES, the process is directly terminated. If the result of the step (c5) is that the boundary point is not determined, the process returns to the step (c1), and the point is used as the current judgment point, and the step (c1) to the step is re-executed. (c5) until all points have been judged by the boundary point. 如申請專利範圍第1項所述之邊界元素提取方法,其中所述邊界特徵包括直線、圓和圓柱。The boundary element extraction method of claim 1, wherein the boundary features comprise a straight line, a circle, and a cylinder. 如申請專利範圍第4項所述之邊界元素提取方法,其中,在所述步驟(f)與步驟(g)之間包括如下步驟:若在步驟(f)中確定至少有兩個擬合的圓存在,則根據圓的半徑、圓的向量及圓心連線與所述向量之間的關係來判斷所擬合的圓之間是否能構建圓柱;及若判斷的結果為是,則根據所述擬合圓構建圓柱。The boundary element extraction method of claim 4, wherein between the step (f) and the step (g), the following step is included: if at least two fits are determined in the step (f) If a circle exists, it is determined whether a cylinder can be constructed between the fitted circles according to the radius of the circle, the vector of the circle, and the relationship between the line and the vector; and if the result of the determination is yes, according to the Fit the circle to build the cylinder. 一種提取邊界元素的電腦系統,其中,所述邊界元素包括邊界點和邊界特徵,該電腦系統包括:獲取單元,用於獲取量測工件所產生的點雲資料及組成點雲三角網格化曲面的三角形的最大邊長;三角網格化單元,用於根據所述最大邊長將所獲取的點雲建立成三角網格化曲面;邊界點提取單元,用於從上述三角網格化曲面中提取邊界點;及創建單元,用於根據邊界點的向量變化情況對所述邊界點進行分組,將每組邊界點分別擬合成直線或圓,在進行直線容差判斷和圓容差判斷後確定適合每組邊界點的邊界特徵,並輸出所述邊界特徵。A computer system for extracting boundary elements, wherein the boundary element comprises a boundary point and a boundary feature, the computer system comprises: an acquisition unit, configured to acquire a point cloud data generated by the measurement workpiece, and a triangle mesh surface of the point cloud a maximum side length of the triangle; a triangular meshing unit configured to establish the acquired point cloud as a triangular meshed surface according to the maximum side length; and a boundary point extracting unit for using the triangular meshed surface from the triangle Extracting boundary points; and creating a unit for grouping the boundary points according to the vector variation of the boundary points, respectively fitting each set of boundary points into a straight line or a circle, and determining the straight line tolerance judgment and the round tolerance judgment The boundary features of each set of boundary points are adapted and the boundary features are output. 如申請專利範圍第6項所述之電腦系統,其中所述點雲資料包括點的三維座標和點的標識。The computer system of claim 6, wherein the point cloud data comprises a three-dimensional coordinate of a point and an identification of a point. 如申請專利範圍第6項所述之電腦系統,其中所述邊界點提取單元在從三角網格化曲面中提取邊界點時,重複 執行以下步驟直至該三角網格化曲面上的點都被進行了邊界點判斷:獲取三角網格化曲面中當前判斷點週圍的三角形及該每個三角形的頂點;標示每個頂點被當前判斷點週圍的三角形所佔用的次數;若所述頂點被佔用的次數均大於1,則判定該當前判斷點為內點;及若所述頂點中有頂點被佔用的次數等於1,則判定該當前判斷點為邊界點。The computer system of claim 6, wherein the boundary point extraction unit repeats when extracting a boundary point from the triangular meshed surface Perform the following steps until the points on the triangular meshed surface are evaluated by the boundary point: obtain the triangle around the current judgment point in the triangular meshed surface and the vertices of each triangle; mark each vertex to be judged by the current point The number of times the surrounding triangle is occupied; if the number of times the vertex is occupied is greater than 1, it is determined that the current judgment point is an inner point; and if the number of times the vertex is occupied in the vertex is equal to 1, the current judgment is determined The point is the boundary point. 如申請專利範圍第6項所述之電腦系統,其中所述邊界特徵包括直線、圓或圓柱。The computer system of claim 6, wherein the boundary feature comprises a straight line, a circle or a cylinder. 如如申請專利範圍第9項所述之電腦系統,其中所述創建單元還用於在進行直線容差判斷和圓容差判斷後,若確定至少有兩個擬合的圓存在,則根據圓的半徑、圓的向量及圓心連線與所述向量之間的關係來判斷擬合圓之間能否構建圓柱,若判斷的結果為是,則根據所擬合的圓構建圓柱,並輸出所構建的圓柱。The computer system according to claim 9, wherein the creating unit is further configured to: after determining the linear tolerance judgment and the round tolerance judgment, if it is determined that at least two fitted circles exist, according to the circle The radius, the vector of the circle, and the relationship between the line and the vector to determine whether the cylinder can be constructed between the fitted circles. If the result of the judgment is yes, the cylinder is constructed according to the fitted circle, and the output is The constructed cylinder.
TW097130282A 2008-08-08 2008-08-08 Computer system and method for extracting boundary elements TWI450216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW097130282A TWI450216B (en) 2008-08-08 2008-08-08 Computer system and method for extracting boundary elements

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW097130282A TWI450216B (en) 2008-08-08 2008-08-08 Computer system and method for extracting boundary elements

Publications (2)

Publication Number Publication Date
TW201007618A TW201007618A (en) 2010-02-16
TWI450216B true TWI450216B (en) 2014-08-21

Family

ID=44827156

Family Applications (1)

Application Number Title Priority Date Filing Date
TW097130282A TWI450216B (en) 2008-08-08 2008-08-08 Computer system and method for extracting boundary elements

Country Status (1)

Country Link
TW (1) TWI450216B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI401459B (en) * 2010-10-11 2013-07-11 Univ Nat Quemoy The Method of Stereo Point Cloud Structure
CN103136387A (en) * 2011-11-25 2013-06-05 鸿富锦精密工业(深圳)有限公司 Inspection processing system and method of border line graphs
CN103177254A (en) * 2011-12-26 2013-06-26 鸿富锦精密工业(深圳)有限公司 System and method for extracting measurement element
CN104240227B (en) * 2013-06-24 2018-06-15 富泰华工业(深圳)有限公司 image analysis system and method
CN107077735A (en) * 2014-10-28 2017-08-18 惠普发展公司,有限责任合伙企业 Three dimensional object is recognized
TWI791910B (en) * 2019-10-16 2023-02-11 由田新技股份有限公司 An inspection information presentation method, inespection method, and inspection apparatus for a hole-like structure
CN112614209B (en) * 2020-12-30 2024-02-20 凌云光技术股份有限公司 Element redrawing method and system during flow chart refreshing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6545676B1 (en) * 1999-05-24 2003-04-08 Parametric Technology Corporation Method and system for creating a tessellated approximation of an outer envelope of a complex model
TW200625202A (en) * 2005-01-11 2006-07-16 Inst Information Industry Mesh simplification methods, storage media and systems
US20070130239A1 (en) * 2005-11-21 2007-06-07 Wheeler Mark D Identification of edge regions from 3D point data
TW200810518A (en) * 2006-08-11 2008-02-16 Hon Hai Prec Ind Co Ltd System and method for boundary scan of an image
CN101127031A (en) * 2006-08-18 2008-02-20 鸿富锦精密工业(深圳)有限公司 Point cloud data mean value filtering system and method
TW200823803A (en) * 2006-11-27 2008-06-01 Hon Hai Prec Ind Co Ltd Method for constructing triangular grids of point clouds

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6545676B1 (en) * 1999-05-24 2003-04-08 Parametric Technology Corporation Method and system for creating a tessellated approximation of an outer envelope of a complex model
TW200625202A (en) * 2005-01-11 2006-07-16 Inst Information Industry Mesh simplification methods, storage media and systems
US20070130239A1 (en) * 2005-11-21 2007-06-07 Wheeler Mark D Identification of edge regions from 3D point data
TW200810518A (en) * 2006-08-11 2008-02-16 Hon Hai Prec Ind Co Ltd System and method for boundary scan of an image
CN101127031A (en) * 2006-08-18 2008-02-20 鸿富锦精密工业(深圳)有限公司 Point cloud data mean value filtering system and method
TW200823803A (en) * 2006-11-27 2008-06-01 Hon Hai Prec Ind Co Ltd Method for constructing triangular grids of point clouds

Also Published As

Publication number Publication date
TW201007618A (en) 2010-02-16

Similar Documents

Publication Publication Date Title
TWI450216B (en) Computer system and method for extracting boundary elements
WO2018059155A1 (en) Method for constructing three-dimensional entity model having geometric error and computer readable storage medium
CN105844711B (en) Engraving 2D images on subdivision surfaces
US9984181B2 (en) Junction meshing for lattice structures
CN101635051B (en) Boundary element extracting method and computer system thereof
CN118586223A (en) Method and system for converting grid geometry into watertight boundary representation and medium
CN107610061B (en) Edge-preserving point cloud hole repairing method based on two-dimensional projection
Leng et al. A multi‐scale plane‐detection method based on the Hough transform and region growing
US8600713B2 (en) Method of online building-model reconstruction using photogrammetric mapping system
CN104346830A (en) Design of a path connecting a first point to a second point in a three-dimensional scene
Jakovljevic et al. Recognition of planar segments in point cloud based on wavelet transform
Yoshimura et al. Automatic registration of MLS point clouds and SfM meshes of urban area
CN115661374A (en) Rapid retrieval method based on space division and model voxelization
CN108010114B (en) Geometric shape recognition method and feature recognition method for basic primitive point cloud curved surface
CN113971718B (en) Method for performing Boolean operation on three-dimensional point cloud model
CN113763529A (en) Transformer substation modeling method based on three-dimensional scanning
CN108563915B (en) Vehicle digital simulation test model construction system and method, and computer program
Nieser et al. Patch layout from feature graphs
CN110363801A (en) The corresponding point matching method of workpiece material object and workpiece three-dimensional CAD model
JP2017168081A (en) 3d object localization with descriptor
CN104200525B (en) Three-dimensional modeling method and system based on extrusion object images
Men et al. Hue-assisted automatic registration of color point clouds
Schwartz et al. Surface detection and modeling of an arbitrary point cloud from 3D sketching
Zeraatkar et al. High‐Precision Laser Scanning System for Three‐Dimensional Modeling of Saffron Flower
TWI426406B (en) Method for comparing and analyzing three-dimensional objects

Legal Events

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