200811759 九、發明說明: 【發明所屬之技術領域】 本發明涉及一種點雲均值過濾系統及方法。 【先前技術】 曰,鬲和保證産品品質,是企業活動中的重要内容。爲 了提二和保證産品品質,對産品實施檢驗是必不可少的, =過仏驗活動提供産品及其製造過程的 品質資訊,按照這 二貝訊對産品的製造過程實施控制及進行修正和補償活 動、使廢次品與返修品率降到最低程度,保證産品品質形 成=秩的穩定性及其産出產品的一致性。同時,日漸增多 心k的檢驗需求要求企業能夠快速、準確地實施產品 檢驗。 器,Z期對於受測物件的檢驗,一般採用特定的檢驗福 ° 、、二人工比對後確定檢測值,如此既費時又耗資,使兰 長’生産成本增加’且基於人卫確定的資訊,慈 有人的誤差的影響。近年來,隨著電腦硬體性能纪 二及價格的降低,電腦在受測物件檢驗活動中被大量# =因而提高了檢驗的速度和準確性。其做法一般是崔 台掃描受測物件,獲得由複數三維離散點組0 ,,一般稱之爲點雲,將點雲資料匯入φ 二應二體對點雲資料進行處理’比如量測點雲,色階比斐 、,攸而實現對受測物件的檢驗。2〇〇3年u ’ 国大陸弟1456975號專利發明有一種自動 料分析處理系統和方法,該系統包括有一自 200811759 系統,用於根據實體物件的點雲資料來量測實體物件並獲 得量測尺寸,該發明可自動實現對實體物件的量測,並^ 量測值與設計值進行對比以指導生産。 但是,在實際應用中,尚有另外的需求。目前掃插機 台掃描受測物件後獲得的點雲資料一般密度較大,而利用 點雲進行色階比對或逆向工程時„般不需要較多的點,敎 多的點會加重電腦的負荷。 Φ 【發明内容】 雲於以上内容,還有必要提供一種點雲均值過滤系统 及方法,其可快速地對點雲資料進行精簡及過濾,以便择 得一個點數較少、不失真且較均勻的點雲。 " 種點雲均值過濾系統,其包括應用祠服器、複 用者端電腦及點雲獲取裝置。所述的應用祠服器包括點 雲匯入模組,用於從上述點雲獲取裝置中匯入-個點雲·、、, 並在使用者端電腦提供的圖形處理介面中生成並且顯示上 迷點成的圖像,及點雲過渡模組,用於對上述點雲進 行過濾處理。所述點雲過濾模組包括:區域計算子模組, 用於透過比較該點雲的點雲陣列中所有點座標的方式計算 =述,雲的最大區域點座標及最小區域點座標,並由該點 $的最大區域點座標及最小區域點座標確定點雲所在的立 方體區域,網格化子模組,用於根據用戶設定的網格間距 將上述點雲所在的立方體區域網格化以得到複數網格;及 過濾、子权組’用於計算每個網格中的所有點與該網格的中 u點之間的距離,保留上述每個網格中離網格中心點最近 7 200811759 的點並刪除其 -一種個較少且較均㈣點雲。 從-個點翁;取货過濾方法’該方法包括以下步驟:(a) 提供的圖形i理1置中匯入一個點雲,並在使用者端電腦 像;⑴遷=:中生成並且顯示上述點雲形成的圖 計算上述點==的點f陣列中所有點座標的方式 該點雲的最大區域點座^#1「t域點座標,並由 所在的立據用戶妓的網格間距將上述點雲 網袼中的到複數網格;(d)計算每個 上述母個網格中離網格中心删 ^保 到一個點數較少且較均勾的點雲。並刪除其餘點得 :用本發明,可以對雷射掃插機 ,,和均值化,以便獲得— 均勻的點雲。 双早又夕、不失真且較 【實施方式】 方式=:广系本發明點雲均值過I系統較佳實施 服構圖。該系統包括點雲獲取裝置6、應用伺 “7、網路4及複數使用者端電腦卜 應用式的複數使用者端電腦5利用網路4與 y 7相連,網路4可以是—企業内部網路 通::’也可以是網際網路一)或其他類型的 點雲獲取裝置6與應用飼服器7相連,用於獲取掃描 8 200811759 ^测物件得到的點雲資料。在本較佳實施方式中,該點雲 獲取裝置6是一個掃描測量機台,其透過掃描受測物件獲 取點雲資料。 應用飼服器7用於從點雲獲取裝置6中匯入點雲資 料並對上述點雲進行均值過濾,以獲得一個點數較少且 較均勻的點雲。 使用者端電腦5提供圖形處理介面,該圖形處理介面 馨能夠生成並顯示應用伺服器7匯入的點雲資料組成的圖 像,並獲取及顯示對點雲進行過濾後的結果。 如圖2所示,係本發明點雲均值過濾系統較佳實施方 式中應用伺服器的功能模組圖。應用伺服器7包括點雲匯 入模組10、點雲過濾模組2〇及存儲模組3〇。 其中,點雲匯入模組1〇用於從點雲獲取裝置6中匯 入點雲資料,並在使用者端電腦5提供的圖形處理介面中 生成並且顯示上述點雲資料形成的圖像。 • 點雲過濾模組2〇用於對所匯入的點雲進行過濾以獲 得一個點數較少且較均勻的點雲。 存儲模組30用於存儲該點數較少且較均勻的點雲及 其所包含的點的個數。 如圖3所示,係圖2所示點雲修剪模組的功能子模組 圖。該點雲過濾模組20包括區域計算子模組21〇、網格化 子模組211及過濾子模組212。 其中,區域計算子模組21〇用於計算所匯入點雲的最 大、最小區域點。點雲匯入模組1〇匯入的點雲資料爲複數 9 200811759 離散點的三維座標,故透過比較該點雲中的點雲陣列p扒 +所有點座標的方式可求得點雲中的最小區域點ptMin ^ X 丫、Z)的二維座標(PtMin.x,ptMin.y,ptMin.z)及 最大區域點ptMax( x,y,z )的三維座標(ptMax x,ptMax y, ptMax.z),從而確定了由上述點雲的最大、最小區域點座 標組成的點雲所在的立方體區域。 網格化子模組211用於根據用戶視實際情況在程式中 • 設定的一個網格間距Step將上述點雲所在的立方體區域 以一定的網格數目進行網格化以得到複數網格。其中,用 戶設定的網格間距Step在X軸、γ軸、z軸方向是相同的, 網格化子模組211利用該網格間距Step分別計算點雲在χ 軸、Ύ軸、Ζ軸方向的網格數目nGX,nGY,nGZ,即nGX= (ptMax.x-ptMin.x ) /Step ^ nGY = ( ptMax.y-ptMin.y ) /Step ^ nGZ= (ptMax.z-ptMin.z) /Step 〇 過濾子模組212用於將點雲中所包含的每個點的標識 • 根據其座標填入到上述相應的網格内,及保留每個網格中 離網格的中心點最近的點並刪除其餘點以得到過濾後的點 雲。循環點雲中的每個點,根據當前點a的座標分別確定 其在X轴、Y軸、Z轴方向的網格數ηχ、ηγ、nz,從而 確定其位於點雲區域的第(ηχ、ηΥ、nZ)網格内,並將其 標識填入該網格内,其中 nX:=:(fpt[〇]-ptMin.x)/Step,nY= (fPt[l]-ptMin.y) /Step,nZ= (fPt[2]-ptMin.z) /Step,上 述fPt[0]、fPt[l]、fPt[2]爲點雲中當前點a的三維座標。根 據點雲的最小£域點ptMin( x,y,z)的三維座標(ptMin.x, 200811759 ptMin.y,ptMin.z)及網格間距Step循環求取每個網格的 礞 中心點座標(MinXYZ[0],MinXYZ[l],MinXYZ[2]),其中 MinXYZ[0]= ptMin.x+i*Step+ Step/2 ,MinXYZ[l] = ptMin.y+j*Step+ Step/2,MinXYZ[2]= ptMin.z+k*Step+200811759 IX. INSTRUCTIONS: [Technical Field of the Invention] The present invention relates to a point cloud average filtering system and method. [Prior Art] 曰, 鬲 and guarantee product quality are important contents in corporate activities. In order to improve the quality of the products and to ensure the quality of the products, it is essential to carry out the inspection of the products. The quality of the products and their manufacturing processes is provided by the inspection activities. The control process of the products is controlled and corrected and compensated according to the two products. Activities, minimize the rate of waste products and repairs, and ensure the formation of product quality = the stability of the rank and the consistency of the products produced. At the same time, the increasing demand for testing requires companies to implement product inspections quickly and accurately. For the inspection of the tested object, the test value of the tested object is generally determined by using a specific test, and the second artificial comparison, which is time-consuming and costly, so that Lan Chang's production cost is increased and the information determined based on the person's health is determined. The influence of the error of the kind person. In recent years, with the computer hardware performance and price reduction, the computer has been heavily in the test object inspection activity ## thus increasing the speed and accuracy of the inspection. The method is generally that Cuitai scans the object under test and obtains a complex three-dimensional discrete point group 0, which is generally called a point cloud, and the point cloud data is transferred into the φ two-in-one body to process the point cloud data, such as measuring points. The cloud, the color scale is better than the Fiji, and the test of the object to be tested is realized. 2〇〇3年u 'Guide of the Chinese mainland brother 1456975 has an automatic material analysis processing system and method, the system includes a system from 200811759, which is used for measuring physical objects according to point cloud data of physical objects and obtaining measurement Dimensions, the invention automatically measures the physical objects and compares the measured values with the design values to guide production. However, there are additional needs in practical applications. At present, the point cloud data obtained after the scanning machine scans the object under test is generally dense, and when the point cloud is used for color scale comparison or reverse engineering, no more points are needed, and more points will aggravate the computer. Load Φ [Invention] In the above content, it is also necessary to provide a point cloud mean filtering system and method, which can quickly streamline and filter point cloud data, so as to select a point with less points and no distortion. A more uniform point cloud. " A cloud-average filtering system, which includes an application server, a multiplexer computer, and a point cloud acquisition device. The application server includes a point cloud import module for Extracting a point cloud··, from the point cloud acquiring device, and generating and displaying the smudged image in the graphic processing interface provided by the user terminal computer, and the point cloud transition module for The point cloud filtering process is performed. The point cloud filtering module includes: an area calculation sub-module, configured to calculate a maximum area point coordinate of the cloud by comparing all point coordinates in the point cloud array of the point cloud. Most residential Point coordinates, and the cube area where the point cloud is located is determined by the maximum area point coordinate and the minimum area point coordinate of the point, and the gridded sub-module is used to set the cube area where the point cloud is located according to the grid spacing set by the user. Meshing to obtain a complex grid; and filtering, sub-right group 'used to calculate the distance between all points in each grid and the u point in the grid, leaving each grid above the grid The central point is the point of the last 7 200811759 and deletes it - a small and more average (four) point cloud. From - a point of Weng; picking up the filtering method 'This method includes the following steps: (a) The provided graphic is set to 1 Import a point cloud, and generate and display the above-mentioned point cloud formed map in the user-side computer image; (1) move =: calculate the point of the point == point f in the array all points coordinates in the array the maximum area point of the point cloud Block ^#1"t domain point coordinates, and the grid of the point cloud network is used to calculate the complex grid by the grid spacing of the user; (d) calculate the grid from each of the above parent grids The center deletes the point cloud to a point with fewer points and more hooks, and deletes the remaining points. : With the invention, the laser sweeper can be averaged to obtain a uniform point cloud. Double early and evening, no distortion and more than [Embodiment] Mode:: The I system is preferably implemented in a service composition. The system includes a point cloud acquisition device 6, an application server 7, a network 4, and a plurality of user-side computer applications. The plurality of user computers 5 are connected to the y 7 by using the network 4, The network 4 can be - the intranet: - ' can also be the Internet 1) or other types of point cloud acquisition devices 6 connected to the application server 7, for obtaining the scan 8 200811759 ^ Point cloud data. In the preferred embodiment, the point cloud acquisition device 6 is a scanning measurement machine that acquires point cloud data by scanning the object under test. The applicator 7 is used to import point cloud data from the point cloud acquisition device 6 and perform mean filtering on the point cloud to obtain a point cloud with fewer points and more uniform points. The client computer 5 provides a graphics processing interface, and the graphics processing interface can generate and display an image composed of point cloud data imported by the application server 7, and acquire and display the filtered result of the point cloud. As shown in Fig. 2, it is a functional module diagram of a server in a preferred embodiment of the point cloud mean filtering system of the present invention. The application server 7 includes a point cloud import module 10, a point cloud filter module 2, and a storage module 3A. The point cloud import module 1 is configured to import point cloud data from the point cloud acquiring device 6, and generate and display an image formed by the point cloud data in a graphic processing interface provided by the user terminal computer 5. • Point cloud filter module 2〇 is used to filter the point cloud that is imported to obtain a point cloud with fewer points and more uniformity. The storage module 30 is configured to store the number of points that are less and more uniform, and the number of points they contain. As shown in FIG. 3, it is a functional sub-module diagram of the point cloud trimming module shown in FIG. 2. The point cloud filter module 20 includes an area calculation sub-module 21, a grid sub-module 211, and a filter sub-module 212. The area calculation sub-module 21 is used to calculate the largest and smallest area points of the point cloud to be imported. The point cloud data imported into the module 1 is the 3D coordinate of the discrete point of 200811759. Therefore, by comparing the point cloud array p扒+ all point coordinates in the point cloud, the point cloud can be obtained. The two-dimensional coordinates of the minimum region point ptMin ^ X 丫, Z) (PtMin.x, ptMin.y, ptMin.z) and the three-dimensional coordinates of the largest region point ptMax(x, y, z) (ptMax x, ptMax y, ptMax .z), thereby determining the cube region where the point cloud consisting of the largest and smallest region point coordinates of the point cloud described above. The meshing sub-module 211 is configured to mesh the cube area where the point cloud is located by a certain number of grids according to a grid spacing Step set by the user according to the actual situation to obtain a complex grid. The grid spacing Step set by the user is the same in the X-axis, the γ-axis, and the z-axis direction, and the gridding sub-module 211 uses the grid spacing Step to calculate the point cloud in the χ, Ύ, and Ζ directions, respectively. Number of grids nGX, nGY, nGZ, ie nGX= (ptMax.x-ptMin.x) /Step ^ nGY = ( ptMax.y-ptMin.y ) /Step ^ nGZ= (ptMax.z-ptMin.z) /Step 〇Filter sub-module 212 is used to mark the identification of each point contained in the point cloud. • Fill in the corresponding grid according to its coordinates, and keep the nearest point in the grid from the center point of the grid. Point and delete the remaining points to get the filtered point cloud. Each point in the point cloud is determined according to the coordinates of the current point a, and the number of grids ηχ, ηγ, nz in the X-axis, Y-axis, and Z-axis directions is determined to determine its position in the point cloud region (ηχ, ηΥ, nZ) inside the grid, and fill its mark into the grid, where nX:=:(fpt[〇]-ptMin.x)/Step,nY= (fPt[l]-ptMin.y) / Step, nZ=(fPt[2]-ptMin.z) /Step, the above fPt[0], fPt[l], and fPt[2] are three-dimensional coordinates of the current point a in the point cloud. The center point coordinates of each grid are obtained according to the three-dimensional coordinates of the point cloud's minimum domain point ptMin(x, y, z) (ptMin.x, 200811759 ptMin.y, ptMin.z) and the grid spacing Step cycle. (MinXYZ[0], MinXYZ[l], MinXYZ[2]), where MinXYZ[0]= ptMin.x+i*Step+ Step/2 , MinXYZ[l] = ptMin.y+j*Step+ Step/2, MinXYZ[2]= ptMin.z+k*Step+
Step/2 ’其中i從〇 —直循環至nGx ’ j從〇 —直循環至nGy, z從0 —直循環至nGz。對於每一個網格,循環計算其中 的每個點與該網格中心點之間的距離,將距離網格中心點 最近的點保留並刪除該網格中的其餘點,各個網格均執行 完上述步驟之後就得到一個點數較小且較均勻的點雲。 、如圖4所不,係本發明點雲均值過濾方法較佳實施方 式的作業流程圖。首先,點雲匯人模組10從點雲獲取裝置 L中匯入點雲資料’並在使用者端電腦5提供的圖形處理 二〇m並且顯示上述點雲資料形成的圖像(步驟 S20 ) ° Q域計鼻子槿 々々 210计异所匯入點雲的最大、最小 二座M1Q S人的點雲_複數離散點的 座標的二可雲陣列所有點 的三維座標(霞 域點ptMin(x,y,z) ptMax(x,v,z)的 取大區域點 從而楗— 、二維座標(PtMaX.X,PtMax.y,ptMax z ), 從而確疋了由上述點 y PtMax.z) 雲所在的立方魏 2 —點座標組成的點 用戶視實際情況在^)。網格化子模級加根據 述點雲所在的立方關格間距Step將上 到複數網格。肖°數目進行網格化得 戶设定的網格間距此Ρ在X輪、γ抽、ζ 11 200811759 軸方向上是相同的,網格化子模組211利用該網格間距 Step分別計算點雲在x轴、γ軸、z轴方向的網格數目 nGX,nGY,nGZ,即 nGX= ( ptMax^ptMiiKx ) /Step,nGY= (ptMax.y-ptMin.y ) /Step ^ nGZ= ( ptMax.z-ptMin.z) /Step (步驟S24)。過濾子模組212將點雲中所包含的每個點的 標識根據其座標填入到上述相應網格内,及保留每個網格 中離網格中心點最近的點並刪除其餘點以得到一個點數較 φ 少且較均勻的點雲(步驟S26)。存儲模組30存儲該點數 較少且較均勻的點雲及其所包含點的個數(步驟S28)。 如圖5所示,係圖4所示點雲均值過濾方法較佳實施 方式中步驟S26過濾點雲的具體實施流程圖。過濾子模組 212循環點雲中的每個點,根據當前點a的座標分別確定 其在X軸、Y軸、Z軸方向的網格數ηχ、nY、nZ,從而 確定其位於點雲區域的第(ηΧ、ηY、nZ)網格内,並將其 標識填入該網格内,其中nXWfPtfOh^Min^/stepiY。 • PtMin.y) /Step,nZ= (fPt[2]_ ptMin.z) /Step,上 述fPt[0]、fPt[l]、fPt[2]爲點雲中當前點a的三維座標(步 驟S260)。根據點雲的最小區域點ptMin (X,y,z)的三 維座標(ptMin.x,ptMin.y,ptMin.z)及網格間距 Step 循 環求取每個網格的中心點座標(MinXYZ[0],MinXYZ[l], MinXYZ[2]),其中 MinXYZ[0]= ptMin.x+i*Step+ Step/2, MinXYZ[l]= ptMin.y+j*Step+ Step/2 ,MinXYZ[2] = ptMin.z+k*Step+ Step/2,其中 i 從 〇 — 直循環至 nGx,j 從 〇 —直循環至nGy,z從0 —直循環至nGz (步驟S262)。 12 200811759 計算每個網格中的所有點與該_格的巾心點, 以得到各個網格内距離其中心點最近的點(步驟s264)。 保留每個網格巾離其巾㈣最近的點酬除其餘點以得到 一個點數較少且較均勻的點雲(步驟S266)。 本發明雖以較佳實施例揭露如上,然其並非用以限定 本發明。任何熟悉此項技藝者’在不脫離本發明之精神和 耗圍内’當可做更動與潤飾,因此本發明之保護範 後附之申請專利範圍所界定者為準。 田視 【圖式簡單說明】 圖1係本發明點科值過濾系統較佳實施 架構圖。 股 圖2係本發明點雲均值過淚、系統較佳實施方式中應用 伺服器的功能模組圖。 ^ 圖3係圖2所示點雲過濾模組的功能子模組圖。Step/2 ’ where i is looped from 〇 to nGx ’ j from 〇 – straight to nGy, z from 0 – straight to nGz. For each grid, the loop calculates the distance between each of the points and the center point of the grid, retains the point closest to the center point of the grid and deletes the remaining points in the grid, each grid is executed After the above steps, a point cloud with a smaller number of points and a more uniform point is obtained. As shown in Fig. 4, it is a flowchart of a preferred embodiment of the point cloud mean filtering method of the present invention. First, the point cloud sink module 10 imports the point cloud data from the point cloud acquiring device L and processes the image provided by the user terminal computer 5 and displays an image formed by the point cloud data (step S20). ° Q domain meter nose 槿々々 210 metering point cloud into the point cloud maximum and minimum two M1Q S people point cloud _ complex discrete point coordinates of the two cloud array all points of the three-dimensional coordinates (Xia domain point ptMin ( x, y, z) ptMax(x, v, z) takes a large area point and thus a two-dimensional coordinate (PtMaX.X, PtMax.y, ptMax z ), thereby confirming the above point y PtMax.z The point where the cloud is located in the cube Wei 2 - point coordinates is based on the actual situation in ^). The gridded submodule level is added to the complex grid according to the cube spacing of the point cloud. The grid spacing set by the grid number is the same in the X wheel, γ pumping, and 2008 11 200811759 axis directions, and the gridding submodule 211 uses the grid spacing Step to calculate points respectively. The number of grids in the x-axis, γ-axis, and z-axis directions nGX, nGY, nGZ, ie, nGX=( ptMax^ptMiiKx ) /Step, nGY= (ptMax.y-ptMin.y ) /Step ^ nGZ= ( ptMax .z-ptMin.z) /Step (step S24). The filter sub-module 212 fills the identifier of each point included in the point cloud into the corresponding grid according to its coordinates, and retains the point in each grid closest to the center point of the grid and deletes the remaining points to obtain A point cloud having fewer points than φ and more uniform (step S26). The storage module 30 stores the point cloud having a small number of points and a relatively uniform number of points and the number of points it contains (step S28). As shown in FIG. 5, it is a flowchart of a specific implementation of filtering a point cloud in step S26 in the preferred embodiment of the point cloud mean filtering method shown in FIG. The filter sub-module 212 cycles each point in the point cloud, and determines the number of meshes ηχ, nY, nZ in the X-axis, Y-axis, and Z-axis directions according to the coordinates of the current point a, thereby determining that it is located in the point cloud region. In the (nΧ, ηY, nZ) grid, fill the grid with the identifier, where nXWfPtfOh^Min^/stepiY. • PtMin.y) /Step, nZ= (fPt[2]_ ptMin.z) /Step, the above fPt[0], fPt[l], fPt[2] are the three-dimensional coordinates of the current point a in the point cloud (steps) S260). According to the three-dimensional coordinates (ptMin.x, ptMin.y, ptMin.z) of the minimum region point ptMin (X, y, z) of the point cloud and the grid spacing Step cycle, the center point coordinates of each grid are obtained (MinXYZ[ 0], MinXYZ[l], MinXYZ[2]), where MinXYZ[0]= ptMin.x+i*Step+ Step/2, MinXYZ[l]= ptMin.y+j*Step+ Step/2 , MinXYZ[2 ] = ptMin.z+k*Step+ Step/2, where i is looped from 〇 to nGx, j is looped from 〇 to nGy, and z is looped from 0 to nGz (step S262). 12 200811759 Calculate all the points in each grid and the point of the center of the grid to get the points within each grid that are closest to its center point (step s264). The remaining points of each of the mesh towels are retained from the nearest point of the towel (4) to obtain a point cloud with fewer points and a more uniform point (step S266). The present invention has been described above by way of a preferred embodiment, and is not intended to limit the invention. Any person skilled in the art can make modifications and refinements without departing from the spirit and scope of the invention, and therefore the scope of the invention is defined by the scope of the appended claims. [Simultaneous Description of the Drawings] Fig. 1 is a block diagram showing a preferred embodiment of the point value filtering system of the present invention. Figure 2 is a functional block diagram of the application of the server in the preferred embodiment of the point cloud of the present invention. ^ Figure 3 is a functional sub-module diagram of the point cloud filter module shown in Figure 2.
a圖4係本發明點雲均值過滤方法較佳實施方式的作業 流程圖。 圖5係圖4所示點雲均值過遽方法較佳實施方式中步 驟S26過I點雲的具_施流程圖。 【主要元件符號說明】 網路 4 使用者端電腦 5 點雲獲取裝置 〔 〇 應用伺服器 7 點雲匯入模組 ^ 13 200811759 點雲過濾模組 20 存儲模組 30 區域計算子模組 210 網格化子模組 211 過濾子模組 212Figure 4 is a flow chart showing the operation of the preferred embodiment of the point cloud mean filtering method of the present invention. FIG. 5 is a flow chart of the point cloud over average of the point cloud over average method in step S26 of FIG. [Main component symbol description] Network 4 user terminal computer 5 point cloud acquisition device [〇 application server 7 point cloud import module ^ 13 200811759 point cloud filter module 20 storage module 30 area calculation sub-module 210 network Grid sub-module 211 filter sub-module 212