TWI417752B - System and method for comparing two-dimensional color gradation of curve - Google Patents

System and method for comparing two-dimensional color gradation of curve Download PDF

Info

Publication number
TWI417752B
TWI417752B TW97120138A TW97120138A TWI417752B TW I417752 B TWI417752 B TW I417752B TW 97120138 A TW97120138 A TW 97120138A TW 97120138 A TW97120138 A TW 97120138A TW I417752 B TWI417752 B TW I417752B
Authority
TW
Taiwan
Prior art keywords
point
standard curve
point cloud
curve
data
Prior art date
Application number
TW97120138A
Other languages
Chinese (zh)
Other versions
TW200949589A (en
Inventor
Chih Kuang Chang
Xin-Yuan Wu
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 TW97120138A priority Critical patent/TWI417752B/en
Publication of TW200949589A publication Critical patent/TW200949589A/en
Application granted granted Critical
Publication of TWI417752B publication Critical patent/TWI417752B/en

Links

Description

二維曲線色階比對系統及方法 Two-dimensional curve gradation comparison system and method

本發明涉及一種二維曲線色階比對方法。 The invention relates to a two-dimensional curve gradation comparison method.

三座標測量機是在工業、科研中被廣泛應用於對產品進行測量的一種測量裝置,一般的測量方法是將被測物件置於三座標測量空間,利用三座標測量機的接觸探頭沿被測物件的表面經過編程的路徑逐點捕捉資料,根據捕捉的資料分析被測物件的標準曲線品質。然而,隨著產品標準曲線造型越來越複雜,如手機、MP3、MP4,傳統的測量方法獲得的測量資料很難反映標準曲線的真實情況,測量速度慢且效率較低。 The three-coordinate measuring machine is a measuring device widely used in industrial and scientific research to measure products. The general measuring method is to place the measured object in the three-coordinate measuring space, and the contact probe along the three-coordinate measuring machine is measured along the edge. The surface of the object captures the data point by point through a programmed path, and analyzes the standard curve quality of the measured object based on the captured data. However, as the product standard curve modeling becomes more and more complex, such as mobile phones, MP3, MP4, the measurement data obtained by the traditional measurement method is difficult to reflect the true condition of the standard curve, and the measurement speed is slow and the efficiency is low.

鑒於以上內容,有必要提供一種二維曲線色階比對系統,能夠對複雜標準曲線進行檢測,提高標準曲線檢測效率及精度。 In view of the above, it is necessary to provide a two-dimensional curve gradation comparison system, which can detect complex standard curves and improve the efficiency and accuracy of standard curve detection.

鑒於以上內容,還有必要提供一種二維曲線色階比對方法,能夠對複雜標準曲線進行檢測,提高標準曲線檢測效率及精度。 In view of the above, it is also necessary to provide a two-dimensional curve gradation comparison method, which can detect complex standard curves and improve the efficiency and accuracy of standard curve detection.

一種二維曲線色階比對系統,該二維曲線色階比對系統安裝在電腦中,所述電腦與資料庫相連,所述的資料庫中儲存有待檢測物 件的二維標準曲線資料及掃描的點雲資料,其中,所述的二維曲線色階比對系統包括:接收模組,用於接收用戶從資料庫導入的標準曲線資料和點雲資料;對齊模組,用於根據接收的標準曲線資料與點雲資料將點雲與標準曲線對齊;所述接收模組,還用於接收公差設置資訊及顏色設置資訊;計算模組,用於根據對齊後的標準曲線資料和點雲資料計算對齊後點雲中各點到該標準曲線的最近距離,並得到點雲中各點到標準曲線上的最近點;編號模組,用於根據所述最近點在標準曲線的順序,對點雲中各點進行序列化編號,使點雲中每個點都有一個編號;生成模組,用於根據所述點的編號將點雲中的各點以線段連接起來,生成該物件的實際曲線;顏色標識模組,用於根據點雲中各個點到標準曲線的最近距離所屬的公差分段區間標識上述實際曲線的顏色。 A two-dimensional curve gradation comparison system is installed in a computer, the computer is connected to a database, and the database stores the object to be detected The two-dimensional standard curve data of the piece and the scanned point cloud data, wherein the two-dimensional curve level comparison system comprises: a receiving module, configured to receive standard curve data and point cloud data imported by the user from the database; The alignment module is configured to align the point cloud with the standard curve according to the received standard curve data and the point cloud data; the receiving module is further configured to receive tolerance setting information and color setting information; and the computing module is configured to be aligned according to the alignment The following standard curve data and point cloud data calculate the closest distance from each point in the point cloud to the standard curve, and obtain the closest point from the point in the point cloud to the standard curve; the numbering module is used to Pointing in the order of the standard curve, serializing the points in the point cloud so that each point in the point cloud has a number; generating a module for using each point in the point cloud according to the number of the point The line segments are connected to generate an actual curve of the object; the color identification module is configured to identify the color of the actual curve according to the tolerance segment segment to which the closest distance from each point in the point cloud to the standard curve belongs.

一種二維曲線色階比對方法,該方法包括以下步驟:(a)接收用戶從資料庫導入的標準曲線資料和點雲資料;(b)根據所述標準曲線資料及點雲資料將點雲與標準曲線對齊;(c)接收公差設置資訊及顏色設置資訊;(d)根據對齊後的標準曲線資料和點雲資料計算對齊後點雲中各點到該標準曲線的最近距離,並得到點雲中各點到標準曲線上的最近點;(e)根據所述最近點在標準曲線上的順序,對點雲中各點進行序列化編號,使點雲中每個點都有一個編號;(f)根據所述點的編號將點雲中的點以線段連接起來,生成該物件的實際曲線;(g)根據點雲中各個點到標準曲線的最近距離所屬的公差分段區間標識上述實際曲線的顏色。 A two-dimensional curve gradation comparison method, the method comprising the steps of: (a) receiving standard curve data and point cloud data imported by a user from a database; (b) selecting a point cloud according to the standard curve data and point cloud data Align with the standard curve; (c) receive tolerance setting information and color setting information; (d) calculate the closest distance from each point in the point cloud to the standard curve according to the aligned standard curve data and point cloud data, and obtain a point Each point in the cloud reaches the nearest point on the standard curve; (e) serializes each point in the point cloud according to the order of the nearest point on the standard curve, so that each point in the point cloud has a number; (f) connecting the points in the point cloud by line segments according to the number of the points to generate an actual curve of the object; (g) identifying the above-mentioned tolerance segment segments according to the closest distance from each point in the point cloud to the standard curve The color of the actual curve.

相較於傳統的三座標量測機的測量方法,本發明提供的二維曲線色階比對方法可根據掃描物件得到的點雲的點與物件的CAD模型的標準曲線的最近距離所屬的不同公差分段區間用不同顏色標示CAD模型的標準曲線,並對CAD模型的標準曲線加以處理,生成直觀的檢測報告,提高了對複雜標準曲線進行檢測的精度和速度。 Compared with the traditional measurement method of the three-seat scalar measuring machine, the two-dimensional curve gradation comparison method provided by the present invention can be different according to the closest distance of the point cloud point of the scanned object to the standard curve of the CAD model of the object. The tolerance segmentation section marks the standard curve of the CAD model with different colors, and processes the standard curve of the CAD model to generate an intuitive test report, which improves the accuracy and speed of detecting the complex standard curve.

10‧‧‧資料庫 10‧‧‧Database

20‧‧‧電腦 20‧‧‧ computer

30‧‧‧顯示設備 30‧‧‧Display equipment

200‧‧‧二維曲線色階比對系統 200‧‧‧Two-dimensional curve gradation comparison system

210‧‧‧接收模組 210‧‧‧ receiving module

211‧‧‧對齊模組 211‧‧‧Alignment module

212‧‧‧計算模組 212‧‧‧Computation Module

213‧‧‧編號模組 213‧‧‧Number module

214‧‧‧生成模組 214‧‧‧Generation module

215‧‧‧顏色標識模組 215‧‧‧Color identification module

216‧‧‧分組模組 216‧‧‧ group module

217‧‧‧比較模組 217‧‧‧Comparative Module

S101‧‧‧接收用戶從資料庫導入的標準曲線資料和點雲資料 S101‧‧‧ Receive standard curve data and point cloud data imported by users from the database

S102‧‧‧根據接收的標準曲線資料與點雲資料將點雲與標準曲線對齊 S102‧‧‧ Align the point cloud with the standard curve based on the received standard curve data and point cloud data

S103‧‧‧接收公差設置資訊及顏色設置資訊 S103‧‧‧Receive tolerance setting information and color setting information

S104‧‧‧根據對齊後的標準曲線資料和點雲資料計算對齊後點雲中各點到該標準曲線的最近距離,並得到點雲中各點到標準曲線上的最近點 S104‧‧‧ Calculate the nearest distance from each point in the point cloud to the standard curve based on the aligned standard curve data and point cloud data, and obtain the nearest point from the point cloud to the standard curve

S105‧‧‧根據所述最近點在標準曲線的順序,對點雲中各點進行序列化編號,使點雲中每個點都有一個編號 S105‧‧‧ Serialize the points in the point cloud according to the order of the nearest point in the standard curve, so that each point in the point cloud has a number

S106‧‧‧根據所述點的編號將點雲中的各點以線段連接起來,生成該物件的實際曲線 S106‧‧‧Connect the points in the point cloud by line segments according to the number of the points to generate the actual curve of the object

S107‧‧‧根據點雲中各個點到標準曲線的最近距離所屬的公差分段區間標識上述實際曲線的顏色 S107‧‧‧Identifies the color of the above actual curve according to the tolerance segment to which the nearest distance from each point in the point cloud to the standard curve belongs

S108‧‧‧將點雲中經過編號的點進行分組 S108‧‧‧ grouping numbered points in the point cloud

S109‧‧‧比較每一組中各個點到標準曲線的最近距離,以得到每組中最近距離的最大值及最小值 S109‧‧‧ Compare the closest distances of each point in each group to the standard curve to obtain the maximum and minimum values of the closest distance in each group

S110‧‧‧在實際曲線中標出上述每組中點到標準曲線最近距離的最大值及最小值,之後與標準曲線一起輸出,生成一個檢測報告 S110‧‧‧ mark the maximum and minimum values of the closest distance from the midpoint to the standard curve in each set in the actual curve, and then output together with the standard curve to generate a test report.

圖1係本發明二維曲線色階比對系統較佳實施例的應用環境圖。 1 is an application environment diagram of a preferred embodiment of a two-dimensional curve gradation comparison system of the present invention.

圖2係圖1中二維曲線色階比對系統的功能模組圖。 2 is a functional block diagram of the two-dimensional curve gradation comparison system of FIG.

圖3係本發明二維曲線色階比對方法較佳實施例的主流程圖。 3 is a main flow chart of a preferred embodiment of the two-dimensional curve gradation method of the present invention.

圖4係圖3中步驟S104的細化流程圖。 FIG. 4 is a detailed flowchart of step S104 in FIG.

圖5係步驟S110得出的曲線檢測報告圖。 FIG. 5 is a graph of a curve detection report obtained in step S110.

如圖1所示,係本發明二維曲線色階比對系統較佳實施例的應用環境圖。該二維曲線色階比對系統200安裝在電腦20中,所述電腦20與資料庫10連接,該電腦20還連接有顯示設備30。 As shown in FIG. 1, it is an application environment diagram of a preferred embodiment of the two-dimensional curve gradation system of the present invention. The two-dimensional curve scale comparison system 200 is installed in a computer 20, and the computer 20 is connected to a database 10 to which a display device 30 is also connected.

資料庫10用於儲存物件的標準CAD模型的標準曲線資料(以下簡稱標準曲線資料)、掃描物件得到的點雲資料以及標準曲線檢測過程中產生的資料。在本較佳實施例中,所述標準曲線資料和點雲資料都是在二維的平面下產生的,點雲中各點的座標都是二維的。 The database 10 is used for storing the standard curve data of the standard CAD model of the object (hereinafter referred to as the standard curve data), the point cloud data obtained by scanning the object, and the data generated during the standard curve detection process. In the preferred embodiment, the standard curve data and the point cloud data are generated in a two-dimensional plane, and the coordinates of each point in the point cloud are two-dimensional.

二維曲線色階比對系統200接收標準曲線資料和點雲資料,接收用戶的公差設置和顏色設置資訊,根據接收的標準曲線資料與點 雲資料將點雲與標準曲線對齊,根據對齊後的標準曲線資料和點雲資料計算點雲中的各點到標準曲線的最近距離,根據各最近距離所落入的公差區間用不同顏色顯示該標準曲線。此外,二維曲線色階比對系統200還用於依據處理後的標準曲線資料生成檢測報告。 The two-dimensional curve gradation comparison system 200 receives the standard curve data and the point cloud data, receives the user's tolerance setting and color setting information, according to the received standard curve data and points. The cloud data aligns the point cloud with the standard curve, and calculates the closest distance from each point in the point cloud to the standard curve according to the aligned standard curve data and the point cloud data, and displays the color in different colors according to the tolerance interval in which each nearest distance falls. standard curve line. In addition, the two-dimensional curve gradation comparison system 200 is further configured to generate a detection report according to the processed standard curve data.

顯示設備30提供一顯示介面用於顯示標準曲線、掃描物件得到的點雲、利用該系統對標準曲線進行檢測得到的不同顏色標示的標準曲線和檢測報告。 The display device 30 provides a display interface for displaying a standard curve, a point cloud obtained by scanning the object, a standard curve and a test report of different color indications obtained by using the system to detect the standard curve.

如圖2所示,係圖1中二維曲線色階比對系統的功能模組圖。所述二維曲線色階比對系統200包括接收模組210、對齊模組211、計算模組212、編號模組213、生成模組214、顏色標識模組215、分組模組216及比較模組217。本發明所稱的模組是完成一特定功能的電腦程式段,比程式更適合於描述軟體在電腦中的執行過程,因此在本發明以下對軟體描述中都以模組描述。 As shown in FIG. 2, it is a functional module diagram of the two-dimensional curve gradation comparison system in FIG. The two-dimensional curve gradation comparison system 200 includes a receiving module 210, an alignment module 211, a computing module 212, a numbering module 213, a generating module 214, a color identification module 215, a grouping module 216, and a comparison module. Group 217. The module referred to in the present invention is a computer program segment for performing a specific function, and is more suitable for describing the execution process of the software in the computer than the program. Therefore, the following description of the software is described in the module.

其中,所述接收模組210用於接收用戶從資料庫10導入的標準曲線資料和點雲資料。 The receiving module 210 is configured to receive standard curve data and point cloud data imported by the user from the database 10.

所述對齊模組211用於根據接收的標準曲線資料與點雲資料將點雲與標準曲線對齊。用戶在繪製標準曲線資料時,有一個對應座標系,掃描物件的輪廓所得到的點雲也在一個設定的座標系中,在本實施例中,採用座標對齊或迭代方法對齊兩個座標系。具體而言,座標對齊法:1.在標準曲線圖形上用最小二乘法擬合三個元素(如:面,線,原點)構建基準面,基準軸,基準原點創 建座標系得到座標變換4*4(即該矩陣有4行、4列)單位矩陣mat1;2.在掃描得到的點雲相同位置上擬合三個元素(如:面,線,原點)構建基準面,基準軸,基準原點創建座標系得到座標變換4*4單位矩陣mat2;3.點雲對象變換到基準座標系中變換矩陣matTrans=mat1 * mat2;4.將點雲所有點座標與matTrans相乘得到對齊後的座標。迭代法:根據擬牛頓公式對函數f(x)進行迭代,得到最小函數f(x): ,其中,(X1,Y1,Z1)及(X2,Y2,Z2)分別為對齊後點雲的座標及該點到標準曲線上最近點的座標,n為點雲的數目。 The alignment module 211 is configured to align the point cloud with the standard curve according to the received standard curve data and the point cloud data. When the user draws the standard curve data, there is a corresponding coordinate system. The point cloud obtained by scanning the contour of the object is also in a set coordinate system. In this embodiment, the two coordinate systems are aligned by coordinate alignment or iterative method. Specifically, the coordinate alignment method: 1. On the standard curve graph, three elements (such as: face, line, origin) are fitted by the least square method to construct the reference plane, the reference axis, and the reference origin is used to create the coordinate system to obtain the coordinate transformation. 4*4 (that is, the matrix has 4 rows and 4 columns) unit matrix mat1; 2. Fit three elements (such as: face, line, origin) at the same position of the scanned point cloud to construct the reference plane, the reference axis The reference origin creates a coordinate system to obtain a coordinate transformation 4*4 unit matrix mat2; 3. The point cloud object transforms into a transformation coordinate matrix in the reference coordinate system matTrans=mat1 * mat2; 4. multiplies all point coordinates of the point cloud by matTrans to obtain alignment The coordinates after. Iterative method: Iterate the function f(x) according to the quasi-Newton formula to get the minimum function f(x): (X1, Y1, Z1) and (X2, Y2, Z2) are the coordinates of the point cloud after alignment and the coordinates of the point to the nearest point on the standard curve, respectively, where n is the number of point clouds.

所述接收模組210還用於接收公差設置資訊及顏色設置資訊。在本較佳實施例中,公差指的是點雲與標準曲線對齊後點雲中的點到標準曲線的最近距離的值的波動範圍。所述公差設置資訊包括:允許的最大上公差值(如0.350)、允許的最大下公差值(如-0.350)及公差的分段區間,如將允許的最大上公差值與允許的最大下公差值確定的區間[0.350,-0.350]分成若干個公差區間[-0.350,-0.300],[-0.300,-0.250],…,[0.250,0.300],[0.300,0.350]。所述顏色設置資訊包括不同公差區間的顏色,一般從冷色(藍色)到暖色(紅色)逐漸變化,如公差區間[-0.350,-0.300]的顏色為深藍,公差區間[-0.300,-0.250]的顏色為天藍,公差區間[0.250,0.300]的顏色為粉紅,公差區間 [0.300,0.350]的顏色為深紅,大於允許的最大上公差值的區間[0.300,+]的顏色為紫色,小於允許的最大下公差值的區間[-,-0.350]的顏色為咖啡色。 The receiving module 210 is further configured to receive tolerance setting information and color setting information. In the preferred embodiment, the tolerance refers to the range of fluctuations in the value of the closest distance from the point in the point cloud to the standard curve after the point cloud is aligned with the standard curve. The tolerance setting information includes: the maximum upper tolerance value allowed (such as 0.350), the maximum allowable lower tolerance value (such as -0.350), and the segmentation interval of the tolerance, such as the maximum upper tolerance value allowed and the allowed The interval [0.350, -0.350] determined by the maximum lower tolerance value is divided into several tolerance intervals [-0.350, -0.300], [-0.300, -0.250], ..., [0.250, 0.300], [0.300, 0.350]. The color setting information includes colors of different tolerance intervals, generally gradually changing from cool color (blue) to warm color (red), such as the tolerance interval [-0.350, -0.300], the color is dark blue, and the tolerance interval [-0.300, -0.250 The color of the sky is sky blue, the color of the tolerance interval [0.250, 0.300] is pink, the tolerance interval The color of [0.300, 0.350] is dark red, the interval larger than the maximum allowable upper tolerance value [0.300, +] is purple, and the color of the interval [-, -0.350] smaller than the maximum allowable lower tolerance value is brown. .

所述計算模組212用於根據對齊後的標準曲線資料和點雲資料計算對齊後點雲中各點到該標準曲線的最近距離,並得到點雲中各點到標準曲線上的最近點。所述點雲中的點與最近點的距離即為最近距離。 The calculation module 212 is configured to calculate the closest distance from each point in the point cloud to the standard curve according to the aligned standard curve data and the point cloud data, and obtain the closest point of each point in the point cloud to the standard curve. The distance between the point in the point cloud and the nearest point is the closest distance.

所述編號模組213用於根據所述最近點在標準曲線的順序,對點雲中各點進行序列化編號,使點雲中每個點都有一個編號。具體而言,用戶在畫標準曲線時,都有一個起始點,以該起始點為順時針或者逆時針方向,對每個最近點按照在標準曲線上等分點之間順序進行從小到大編號,每個最近點的編號即為對應實際點雲的點的編號。 The numbering module 213 is configured to serialize each point in the point cloud according to the order of the nearest point in the standard curve, so that each point in the point cloud has a number. Specifically, when the user draws a standard curve, there is a starting point, which is clockwise or counterclockwise, and each nearest point is sequentially sequenced on the standard curve from small to Large number, the number of each nearest point is the number of the point corresponding to the actual point cloud.

所述生成模組214用於根據所述點的編號將點雲中的點以直線連接起來,生成該物件的實際曲線。具體而言,假設點雲中有四個點,每個點的編號分別為1、2、3、4,若標準曲線是封閉的曲線,則將按照編號的順序將上述四個點連接起來,則分別有線段1-2,2-3,3-4,4-1,形成一個封閉的曲線,若標準曲線不是封閉的曲線,則不將起始點和結尾點連接起來,分別有線段1-2,2-3,3-4,形成一個不封閉的曲線,由點雲中所有的點連接的曲線為該點雲組成的實際曲線。 The generating module 214 is configured to connect points in the point cloud by straight lines according to the number of the points to generate an actual curve of the object. Specifically, it is assumed that there are four points in the point cloud, and the number of each point is 1, 2, 3, and 4 respectively. If the standard curve is a closed curve, the above four points will be connected in the order of numbering. Then the wired segments 1-2, 2-3, 3-4, 4-1 respectively form a closed curve. If the standard curve is not a closed curve, the starting point and the ending point are not connected, respectively, the wired segment 1 -2, 2-3, 3-4, forming an unclosed curve, the curve connected by all the points in the point cloud is the actual curve composed of the point cloud.

所述顏色標識模組215用於根據點雲中各個點到標準曲線的最近 距離所屬的公差分段區間標識出上述實際曲線的顏色。具體而言,由於實際曲線由各個點之間的連接的線段組成,因此每一個線段的顏色標識出之後,實際曲線的顏色也能夠清楚地顯示出來,實際曲線中點之間連接的線段的顏色由點的顏色決定,例如,有兩個相鄰的點,分別為1、2,假設點1到標準曲線的最近距離落在紅色的公差段,則該點1的顏色為紅色,點2到標準曲線的最近距離落在咖啡色的公差段,則該點2的顏色為咖啡色,而線段1-2的顏色為紅色一半,咖啡色一半;假設點1和點2的顏色都為紅色,則線段1-2的顏色為紅色。 The color identification module 215 is configured to approximate each point in the point cloud to a standard curve. The tolerance segmentation interval to which the distance belongs identifies the color of the actual curve described above. Specifically, since the actual curve is composed of the connected line segments between the respective points, the color of the actual curve can be clearly displayed after the color of each line segment is identified, and the color of the line segment connected between the points in the actual curve is specifically displayed. It is determined by the color of the point. For example, there are two adjacent points, which are 1, 2 respectively. If the closest distance from point 1 to the standard curve falls in the red tolerance section, the color of the point 1 is red, and point 2 is The closest distance of the standard curve falls in the tolerance section of the brown color, then the color of the point 2 is brown, and the color of the line segment 1-2 is half of the red color and half of the brown color; assuming that the colors of the point 1 and the point 2 are both red, the line segment 1 The color of -2 is red.

所述分組模組216用於將點雲中經過編號的點進行分組。在本較佳實施例中,分組的方式是根據實際曲線的曲率變化來分組。在其他實施例中,用戶也可以根據其他方式進行分組,例如,取某一段固定的編號分組,假設取編號1到100為一組,取101到200為下一組。透過分組可以將實際曲線分為很多線段,得到實際曲線的分段變化趨勢。 The grouping module 216 is configured to group the numbered points in the point cloud. In the preferred embodiment, the manner of grouping is grouped according to the change in curvature of the actual curve. In other embodiments, the user may also group according to other methods, for example, taking a fixed number of groups, assuming that numbers 1 to 100 are a group, and 101 to 200 are the next group. Through the grouping, the actual curve can be divided into many line segments, and the segmentation trend of the actual curve is obtained.

所述比較模組217還用於比較每一組中各個點到標準曲線的最近距離,以得到每組中最近距離的最大值及最小值。 The comparison module 217 is further configured to compare the closest distances of each point in each group to the standard curve to obtain the maximum value and the minimum value of the closest distance in each group.

所述生成模組214用於在實際曲線中標出上述每組中點到標準曲線最近距離的最大值及最小值,之後與標準曲線一起輸出,生成一個檢測報告。如圖5所示,為根據所述二維曲線色階比對方法得出某一物件的檢測報告。 The generating module 214 is configured to mark the maximum value and the minimum value of the closest distance from the midpoint to the standard curve in each set in the actual curve, and then output together with the standard curve to generate a detection report. As shown in FIG. 5, a detection report of an object is obtained according to the two-dimensional curve gradation comparison method.

如圖3所示,係本發明二維曲線色階比對方法較佳實施例的主流 程圖。 As shown in FIG. 3, it is the mainstream of the preferred embodiment of the two-dimensional curve gradation method of the present invention. Cheng Tu.

首先,步驟S101,接收模組210接收用戶從資料庫10導入的標準曲線資料和點雲資料。 First, in step S101, the receiving module 210 receives the standard curve data and the point cloud data imported by the user from the database 10.

步驟S102,對齊模組211根據接收的標準曲線資料與點雲資料將點雲與標準曲線對齊。用戶在繪製標準曲線資料時,有一個對應座標系,掃描物件的輪廓所得到的點雲也在一個設定的座標系中,在本實施例中,採用座標對齊或迭代方法對齊兩個座標系。具體而言,座標對齊法:1.在標準曲線上用最小二乘法擬合三個元素(如:面,線,原點)構建基準面,基準軸,基準原點創建座標系得到座標變換4*4(即該矩陣有4行、4列)單位矩陣mat1;2.在掃描得到的點雲相同位置上擬合三個元素(如:面,線,原點)構建基準面,基準軸,基準原點創建座標系得到座標變換4*4單位矩陣mat2;3.點雲對象變換到基準座標系中變換矩陣matTrans=mat1 * mat2;4.將點雲所有點座標與matTrans相乘得到對齊後的座標。迭代法:根據擬牛頓公式對函數f(x)進行迭代,得到最小函數f(x): ,其中,(X1,Y1,Z1)及(X2,Y2,Z2)分別為對齊後點雲的座標及該點到標準曲線上最近點的座標,n為點雲的數目。 In step S102, the alignment module 211 aligns the point cloud with the standard curve according to the received standard curve data and the point cloud data. When the user draws the standard curve data, there is a corresponding coordinate system. The point cloud obtained by scanning the contour of the object is also in a set coordinate system. In this embodiment, the two coordinate systems are aligned by coordinate alignment or iterative method. Specifically, the coordinate alignment method: 1. On the standard curve, the least squares method is used to fit three elements (such as: face, line, origin) to construct the datum plane, the datum axis, and the datum origin to create the coordinate system to obtain the coordinate transformation 4 *4 (that is, the matrix has 4 rows and 4 columns) the unit matrix mat1; 2. Fit three elements (such as: face, line, origin) at the same position of the scanned point cloud to construct the reference plane, the reference axis, The coordinate origin creation coordinate system obtains the coordinate transformation 4*4 unit matrix mat2; 3. The point cloud object transforms into the transformation coordinate matrix in the reference coordinate system matTrans=mat1 * mat2; 4. Multiplies all point coordinates of the point cloud by matTrans to obtain alignment The coordinates of the coordinates. Iterative method: Iterate the function f(x) according to the quasi-Newton formula to get the minimum function f(x): (X1, Y1, Z1) and (X2, Y2, Z2) are the coordinates of the point cloud after alignment and the coordinates of the point to the nearest point on the standard curve, respectively, where n is the number of point clouds.

步驟S103,接收模組210接收公差設置資訊及顏色設置資訊。在 本較佳實施例中,公差指的是點雲與標準曲線對齊後點雲中的點到標準曲線的最近距離的值的波動範圍。所述公差設置資訊包括:允許的最大上公差值(如0.350)、允許的最大下公差值(如-0.350)及公差的分段區間,如將允許的最大上公差值與允許的最大下公差值確定的區間[0.350,-0.350]分成若干個公差區間[-0.350,-0.300],[-0.300,-0.250],…,[0.250,0.300],[0.300,0.350]。所述顏色設置資訊包括不同公差區間的顏色,一般從冷色(藍色)到暖色(紅色)逐漸變化,如公差區間[-0.350,-0.300]的顏色為深藍,公差區間[-0.300,-0.250]的顏色為天藍,公差區間[0.250,0.300]的顏色為粉紅,公差區間[0.300,0.350]的顏色為深紅,大於允許的最大上公差值的區間[0.300,+]的顏色為紫色,小於允許的最大下公差值的區間[-,-0.350]的顏色為咖啡色。 In step S103, the receiving module 210 receives the tolerance setting information and the color setting information. in In the preferred embodiment, the tolerance refers to the fluctuation range of the value of the closest distance from the point in the point cloud to the standard curve after the point cloud is aligned with the standard curve. The tolerance setting information includes: the maximum upper tolerance value allowed (such as 0.350), the maximum allowable lower tolerance value (such as -0.350), and the segmentation interval of the tolerance, such as the maximum upper tolerance value allowed and the allowed The interval [0.350, -0.350] determined by the maximum lower tolerance value is divided into several tolerance intervals [-0.350, -0.300], [-0.300, -0.250], ..., [0.250, 0.300], [0.300, 0.350]. The color setting information includes colors of different tolerance intervals, generally gradually changing from cool color (blue) to warm color (red), such as the tolerance interval [-0.350, -0.300], the color is dark blue, and the tolerance interval [-0.300, -0.250 The color of the sky is blue, the color of the tolerance interval [0.250, 0.300] is pink, the color of the tolerance interval [0.300, 0.350] is dark red, and the color of the interval [0.300, +] larger than the maximum allowable upper tolerance value is purple. The color of the interval [-, -0.350] smaller than the maximum allowable lower tolerance value is brown.

步驟S104,計算模組212根據對齊後的標準曲線資料和點雲資料計算對齊後點雲中各點到該標準曲線的最近距離(具體步驟將在圖4中詳細描述),並得到點雲中各點到標準曲線上的最近點。所述點雲中的點與最近點的距離即為最近距離。 Step S104, the calculation module 212 calculates the closest distance from each point in the aligned point cloud to the standard curve according to the aligned standard curve data and the point cloud data (the specific steps will be described in detail in FIG. 4), and obtain the point cloud. The closest point of each point to the standard curve. The distance between the point in the point cloud and the nearest point is the closest distance.

步驟S105,編號模組213根據所述最近點在標準曲線的順序,對點雲中各點進行序列化編號,使點雲中每個點都有一個編號。具體而言,用戶在畫標準曲線時,都有一個起始點,以該起始點為順時針或者逆時針方向,對每個最近點按照在標準曲線上等分點之間順序進行從小到大編號,每個最近點的編號即為對應實際點雲的點的編號。 In step S105, the numbering module 213 serializes each point in the point cloud according to the order of the nearest point in the standard curve, so that each point in the point cloud has a number. Specifically, when the user draws a standard curve, there is a starting point, which is clockwise or counterclockwise, and each nearest point is sequentially sequenced on the standard curve from small to Large number, the number of each nearest point is the number of the point corresponding to the actual point cloud.

步驟S106,生成模組214根據所述點的編號將點雲中的點以線段連接起來,生成該物件的實際曲線。具體而言,假設點雲中有四個點,每個點的編號分別為1、2、3、4,若標準曲線是封閉的曲線,則將按照編號的順序將上述四個點連接起來,則分別有線段1-2,2-3,3-4,4-1,形成一個封閉的曲線,若標準曲線不是封閉的曲線,則不將起始點和結尾點連接起來,分別有線段1-2,2-3,3-4,形成一個不封閉的曲線,由點雲中所有的點連接的曲線為該點雲組成的實際曲線。 In step S106, the generating module 214 connects the points in the point cloud by line segments according to the number of the points, and generates an actual curve of the object. Specifically, it is assumed that there are four points in the point cloud, and the number of each point is 1, 2, 3, and 4 respectively. If the standard curve is a closed curve, the above four points will be connected in the order of numbering. Then the wired segments 1-2, 2-3, 3-4, 4-1 respectively form a closed curve. If the standard curve is not a closed curve, the starting point and the ending point are not connected, respectively, the wired segment 1 -2, 2-3, 3-4, forming an unclosed curve, the curve connected by all the points in the point cloud is the actual curve composed of the point cloud.

步驟S107,顏色標識模組215根據點雲中各個點到標準曲線的最近距離所屬的公差分段區間標識上述實際曲線的顏色。具體而言,由於實際曲線由各個點之間的連接的線段組成,因此每一個線段的顏色標識出之後,實際曲線的顏色也能夠清楚地顯示出來,實際曲線中點之間連接的線段的顏色由點的顏色決定,例如,有兩個相鄰的點,分別為1、2,假設點1到標準曲線的最近距離落在紅色的公差段,則該點1的顏色為紅色,點2到標準曲線的最近距離落在咖啡色的公差段,則該點2的顏色為咖啡色,而線段1-2的顏色為紅色一半,咖啡色一半;假設點1和點2的顏色都為紅色,則線段1-2的顏色為紅色。 In step S107, the color identification module 215 identifies the color of the actual curve according to the tolerance segment segment to which the closest distance from each point in the point cloud to the standard curve belongs. Specifically, since the actual curve is composed of the connected line segments between the respective points, the color of the actual curve can be clearly displayed after the color of each line segment is identified, and the color of the line segment connected between the points in the actual curve is specifically displayed. It is determined by the color of the point. For example, there are two adjacent points, which are 1, 2 respectively. If the closest distance from point 1 to the standard curve falls in the red tolerance section, the color of the point 1 is red, and point 2 is The closest distance of the standard curve falls in the tolerance section of the brown color, then the color of the point 2 is brown, and the color of the line segment 1-2 is half of the red color and half of the brown color; assuming that the colors of the point 1 and the point 2 are both red, the line segment 1 The color of -2 is red.

步驟S108,分組模組216將點雲中經過編號的點進行分組。在本較佳實施例中,分組的方式是根據曲線曲率的變化來分組。在其他實施例中,用戶也可以根據其他方式進行分組,例如,取某一段固定的編號分組,假設取編號1到100為一組,取101到200為下一組。透過分組可以將實際曲線分為很多線段,得到實際曲線的 分段變化趨勢。 In step S108, the grouping module 216 groups the numbered points in the point cloud. In the preferred embodiment, the manner of grouping is grouped according to changes in the curvature of the curve. In other embodiments, the user may also group according to other methods, for example, taking a fixed number of groups, assuming that numbers 1 to 100 are a group, and 101 to 200 are the next group. Through the grouping, the actual curve can be divided into many line segments to get the actual curve. Segmentation trends.

步驟S109,比較模組217比較每一組中各個點到標準曲線的最近距離,以得到每組中最近距離的最大值及最小值。 In step S109, the comparison module 217 compares the closest distances of the respective points in each group to the standard curve to obtain the maximum value and the minimum value of the closest distance in each group.

步驟S110,在實際曲線中標出上述每組中點到標準曲線最近距離的最大值及最小值,之後與標準曲線一起輸出,生成模組217生成一個檢測報告。如圖5所示,為根據所述二維曲線色階比對方法得出某一物件的檢測報告。 In step S110, the maximum value and the minimum value of the closest distance from the midpoint to the standard curve of each group are marked in the actual curve, and then output together with the standard curve, and the generation module 217 generates a detection report. As shown in FIG. 5, a detection report of an object is obtained according to the two-dimensional curve gradation comparison method.

如圖4所示,係圖3中步驟S104中計算對齊後點雲中各點到標準曲線的最近距離的細化流程圖(在本實施例中,以計算點雲中的某一點為例)。首先,步驟S201,根據點雲資料中所有點的座標,求得該物件的點雲中的最小區域點pt1Min的座標(pt1Min[x],pt1Min[y])及最大區域點pt1Max的座標(pt1Max[x],pt1Max[y]),進而可以得到由(pt1Min[x],pt1Min[y])、(pt1Min[x],pt1Max[y])、(pt1Min[x],pt1Max[y])、(pt1Max[x],pt1Max[y])組成的該物件的點雲包圍盒boxR。一般而言,該點雲的包圍盒為正方形或者長方形。 As shown in FIG. 4, it is a refinement flowchart for calculating the closest distance from each point in the point cloud to the standard curve in step S104 in FIG. 3 (in this embodiment, taking a certain point in the point cloud as an example) . First, in step S201, according to the coordinates of all points in the point cloud data, the coordinates of the smallest area point pt1Min in the point cloud of the object (pt1Min[x], pt1Min[y]) and the coordinates of the largest area point pt1Max (pt1Max) are obtained. [x], pt1Max[y]), which in turn can be obtained by (pt1Min[x], pt1Min[y]), (pt1Min[x], pt1Max[y]), (pt1Min[x], pt1Max[y]), The point cloud of the object consisting of (pt1Max[x], pt1Max[y]) surrounds the box boxR. In general, the bounding box of the point cloud is square or rectangular.

步驟S202,將該包圍盒劃分成多個長方形或者正方形(在本實施例中,以長方形為例)。利用電腦繪製的標準曲線是由一個個圖元點組成,透過座標計算點雲中點到標準曲線上圖元點的最近距離,之後比較得出一個最小的距離,為了避免點雲中每個點都和標準曲線上的圖元點進行計算,將包圍盒劃分成很多個長方形,在長方形內計算點到圖元點的距離,可以大大提高運算時間和效 率。劃分長方形的數量由用戶設定,通常,根據測試結果,能夠最快速的計算出點雲中各點到標準曲線的最近距離,是使點雲中的每一個點都只落在一個長方形內。 In step S202, the bounding box is divided into a plurality of rectangles or squares (in the embodiment, a rectangle is taken as an example). The standard curve drawn by the computer is composed of one primitive point. The nearest distance from the point in the point cloud to the point on the standard curve is calculated through the coordinates, and then a minimum distance is obtained. In order to avoid each point in the point cloud. Both the calculation and the primitive points on the standard curve are calculated, and the bounding box is divided into a plurality of rectangles, and the distance from the point to the pixel point is calculated in the rectangle, which can greatly improve the operation time and effect. rate. The number of divided rectangles is set by the user. Generally, according to the test result, the closest distance from each point in the point cloud to the standard curve can be calculated most quickly, so that each point in the point cloud falls within only one rectangle.

步驟S203,選擇一個包含點雲中點的最小長方形內,判斷是否存在標準曲線的圖元點。 In step S203, a minimum rectangle including a point in the point cloud is selected to determine whether there is a primitive point of the standard curve.

步驟S204,若該最小長方形內沒有圖元點,將尋找標準曲線的圖元點的範圍擴大,取與該長方形相鄰的所有最小長方形,組成一個更大的長方形,直到在該更大的長方形內有標準曲線的圖元點為止。 Step S204, if there is no primitive point in the minimum rectangle, expand the range of the primitive point of the standard curve, and take all the smallest rectangles adjacent to the rectangle to form a larger rectangle until the larger rectangle There are primitive points in the standard curve.

步驟S205,在存在標準曲線圖元點的該長方形內,根據點雲中點的座標計算該點到該長方形內尋找到的上述標準曲線圖元點的距離。具體而言,假設某一個長方形內點雲中的點為A,該長方形內有2個標準曲線圖元點為B、C,則分別計算A到B的距離,A到C的距離,之後對這兩個距離進行比較,以得出一個最小距離,所得出的距離就是A點到標準曲線的最近距離。 Step S205, in the rectangle in which the standard curve element point exists, calculate the distance from the point to the standard curve element point found in the rectangle according to the coordinates of the point in the point cloud. Specifically, suppose that the point in a rectangular point cloud is A, and there are two standard curve elements in the rectangle as B and C, then calculate the distance from A to B, the distance from A to C, and then The two distances are compared to obtain a minimum distance, and the resulting distance is the closest distance from point A to the standard curve.

步驟S206,比較該點到上述標準曲線圖元點的距離,得出一個最小距離,即為該點到標準曲線的最近距離。 Step S206, comparing the distance of the point to the point of the standard curve element, and obtaining a minimum distance, that is, the closest distance from the point to the standard curve.

在步驟S203中,若該最小長方形內有標準曲線的圖元點,則直接轉到步驟S205。 In step S203, if there is a primitive point of the standard curve in the minimum rectangle, the process proceeds directly to step S205.

最後所應說明的是,以上實施例僅用以說明本發明的技術方案而非限制,儘管參照以上較佳實施例對本發明進行了詳細說明,本領域的普通技術人員應當理解,可以對本發明的技術方案進行修 改或等同替換,而不脫離本發明技術方案的精神和範圍。 It should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and are not intended to be limiting, and the present invention will be described in detail with reference to the preferred embodiments thereof Technical solution Modifications or equivalents are made without departing from the spirit and scope of the invention.

S101‧‧‧接收用戶從資料庫導入的標準曲線資料和點雲資料 S101‧‧‧ Receive standard curve data and point cloud data imported by users from the database

S102‧‧‧根據接收的標準曲線資料與點雲資料將點雲與標準曲線對齊 S102‧‧‧ Align the point cloud with the standard curve based on the received standard curve data and point cloud data

S103‧‧‧接收公差設置資訊及顏色設置資訊 S103‧‧‧Receive tolerance setting information and color setting information

S104‧‧‧根據對齊後的標準曲線資料和點雲資料計算對齊後點雲中各點到該標準曲線的最近距離,並得到點雲中各點到標準曲線上的最近點 S104‧‧‧ Calculate the nearest distance from each point in the point cloud to the standard curve based on the aligned standard curve data and point cloud data, and obtain the nearest point from the point cloud to the standard curve

S105‧‧‧根據所述最近點在標準曲線的順序,對點雲中各點進行序列化編號,使點雲中每個點都有一個編號 S105‧‧‧ Serialize the points in the point cloud according to the order of the nearest point in the standard curve, so that each point in the point cloud has a number

S106‧‧‧根據所述點的編號將點雲中的各點以線段連接起來,生成該物件的實際曲線 S106‧‧‧Connect the points in the point cloud by line segments according to the number of the points to generate the actual curve of the object

S107‧‧‧根據點雲中各個點到標準曲線的最近距離所屬的公差分段區間標識上述實際曲線的顏色 S107‧‧‧Identifies the color of the above actual curve according to the tolerance segment to which the nearest distance from each point in the point cloud to the standard curve belongs

S108‧‧‧將點雲中經過編號的點進行分組 S108‧‧‧ grouping numbered points in the point cloud

S109‧‧‧比較每一組中各個點到標準曲線的最近距離,以得到每組中最近距離的最大值及最小值 S109‧‧‧ Compare the closest distances of each point in each group to the standard curve to obtain the maximum and minimum values of the closest distance in each group

S110‧‧‧在實際曲線中標出上述每組中點到標準曲線最近距離的最大值及最小值,之後與標準曲線一起輸出,生成一個檢測報告 S110‧‧‧ mark the maximum and minimum values of the closest distance from the midpoint to the standard curve in each set in the actual curve, and then output together with the standard curve to generate a test report.

Claims (10)

一種二維曲線色階比對系統,該二維曲線色階比對系統安裝在電腦中,所述電腦與資料庫相連,其中,所述的資料庫中儲存有待檢測物件的二維標準曲線資料及掃描的點雲資料,其中,所述的二維曲線色階比對系統包括:接收模組,用於接收用戶從資料庫導入的標準曲線資料和點雲資料;對齊模組,用於根據接收的標準曲線資料與點雲資料將點雲與標準曲線對齊;所述接收模組,還用於接收公差設置資訊及顏色設置資訊,所述公差設置資訊包括允許的最大上公差值、允許的最大下公差值及將允許的最大上公差值與允許的最大下公差值確定的區間分成若干個公差區間,所述顏色設置資訊包括不同公差區間的顏色;計算模組,用於根據對齊後的標準曲線資料和點雲資料計算對齊後點雲中各點到該標準曲線的最近距離,並得到點雲中各點到標準曲線最近距離的最近點;編號模組,用於根據所述最近點在標準曲線的順序,對點雲中各點進行序列化編號,使點雲中每個點都有一個編號;生成模組,用於根據所述點的編號將點雲中的各點以線段連接起來,生成該物件的實際曲線;及顏色標識模組,用於根據點雲中各個點到標準曲線的最近距離所屬的公差區間標識上述實際曲線的顏色。 A two-dimensional curve gradation comparison system, the two-dimensional curve gradation comparison system is installed in a computer, and the computer is connected to a database, wherein the database stores two-dimensional standard curve data of the object to be detected And the scanned point cloud data, wherein the two-dimensional curve gradation comparison system comprises: a receiving module, configured to receive standard curve data and point cloud data imported by the user from the database; and an alignment module, configured to The received standard curve data and the point cloud data align the point cloud with the standard curve; the receiving module is further configured to receive the tolerance setting information and the color setting information, the tolerance setting information includes the maximum allowable upper tolerance value, and the permission The maximum lower tolerance value and the interval determined by the maximum upper tolerance value allowed and the maximum allowable lower tolerance value are divided into a plurality of tolerance intervals, the color setting information includes colors of different tolerance intervals; and the calculation module is used for Calculate the nearest distance from each point in the point cloud to the standard curve based on the aligned standard curve data and point cloud data, and obtain the nearest point to the standard curve in the point cloud. The nearest point; the numbering module is used to serialize each point in the point cloud according to the order of the nearest point in the standard curve, so that each point in the point cloud has a number; generating a module, using According to the number of the point, the points in the point cloud are connected by line segments to generate an actual curve of the object; and the color identification module is used for the tolerance interval according to the closest distance from each point in the point cloud to the standard curve. Identifies the color of the actual curve above. 如申請專利範圍第1項所述之二維曲線色階比對系統,其中,所述標準曲線資料包括組成該標準曲線圖元點的座標,所述點雲資料包括點雲上各點的座標。 The two-dimensional curve gradation comparison system according to claim 1, wherein the standard curve data includes coordinates constituting the standard curve element point, and the point cloud data includes coordinates of points on the point cloud. 如申請專利範圍第1項所述之二維曲線色階比對系統,其中,所述曲線檢測程式還包括:分組模組,用於將點雲中經過編號的點進行分組。 The two-dimensional curve gradation comparison system of claim 1, wherein the curve detection program further comprises: a grouping module, configured to group the numbered points in the point cloud. 如申請專利範圍第3項所述之二維曲線色階比對系統,其中,所述曲線檢測程式還包括:比較模組,還用於比較每一組中各個點到標準曲線的最近距離,以得到每組中最近距離的最大值及最小值。 The two-dimensional curve gradation comparison system according to claim 3, wherein the curve detection program further comprises: a comparison module, and is also used for comparing the closest distances of each point in each group to the standard curve, To get the maximum and minimum values of the closest distance in each group. 如申請專利範圍第4項所述之二維曲線色階比對系統,其中,所述曲線檢測程式還包括:所述生成模組,還用於在實際曲線中標出上述每組中點到標準曲線最近距離的最大值及最小值,之後與標準曲線一起輸出,生成一個檢測報告。 The two-dimensional curve gradation system as described in claim 4, wherein the curve detecting program further includes: the generating module, and is further configured to mark the middle point of each group in the actual curve The maximum and minimum values of the closest distance of the standard curve are then output together with the standard curve to generate a test report. 一種二維曲線色階比對方法,其中,該方法包括以下步驟:(a)接收用戶從資料庫導入的標準曲線資料和點雲資料;(b)根據所述標準曲線資料及點雲資料將點雲與標準曲線對齊;(c)接收公差設置資訊及顏色設置資訊,所述公差設置資訊包括允許的最大上公差值、允許的最大下公差值及將允許的最大上公差值與允許的最大下公差值確定的區間分成若干個公差區間,所述顏色設置資訊包括不同公差區間的顏色;(d)根據對齊後的標準曲線資料和點雲資料計算對齊後點雲中各點到該標準曲線的最近距離,並得到點雲中各點到標準曲線最 近距離的最近點;(e)根據所述最近點在標準曲線上的順序,對點雲中各點進行序列化編號,使點雲中每個點都有一個編號;(f)根據所述點的編號將點雲中的點以線段連接起來,生成該物件的實際曲線;及(g)根據點雲中各個點到標準曲線的最近距離所屬的公差區間標識上述實際曲線的顏色。 A two-dimensional curve gradation comparison method, wherein the method comprises the following steps: (a) receiving standard curve data and point cloud data imported by a user from a database; (b) according to the standard curve data and point cloud data The point cloud is aligned with the standard curve; (c) receiving tolerance setting information and color setting information including the maximum allowable upper tolerance value, the maximum allowable lower tolerance value, and the maximum upper tolerance value to be allowed The interval determined by the maximum allowable lower tolerance value is divided into a plurality of tolerance intervals, the color setting information includes colors of different tolerance intervals; (d) calculating points in the aligned point cloud according to the aligned standard curve data and point cloud data The closest distance to the standard curve and get the most points from the point cloud to the standard curve The closest point of the close distance; (e) serialize each point in the point cloud according to the order of the nearest point on the standard curve, so that each point in the point cloud has a number; (f) according to the The point number connects the points in the point cloud by line segments to generate the actual curve of the object; and (g) identifies the color of the actual curve according to the tolerance interval to which the closest distance from each point in the point cloud to the standard curve belongs. 如申請專利範圍第6所述之二維曲線色階比對方法,其中,步驟(b)中對齊的方法為:將標準曲線的座標系與點雲的座標系重合為一個座標系。 The two-dimensional curve gradation method according to the sixth aspect of the patent application, wherein the method of aligning in the step (b) is: superimposing the coordinate system of the standard curve and the coordinate system of the point cloud into a coordinate system. 如申請專利範圍第6所述之二維曲線色階比對方法,其中在步驟(g)之後還包括以下步驟:(h)將點雲中經過編號的點進行分組;(i)比較每一組中各個點到標準曲線的最近距離,以得到每組中最近距離的最大值及最小值;及(j)在實際曲線中標出上述每組中點到標準曲線最近距離的最大值及最小值,之後與標準曲線一起輸出,生成一個檢測報告。 The two-dimensional curve gradation method of claim 6, wherein after step (g), the method further comprises the steps of: (h) grouping the numbered points in the point cloud; (i) comparing each The closest distance from each point in the group to the standard curve to obtain the maximum and minimum values of the closest distance in each group; and (j) the maximum and minimum values of the closest distance from each of the above-mentioned midpoints to the standard curve in the actual curve The value is then output with the standard curve to generate a test report. 如申請專利範圍第6所述之二維曲線色階比對方法,其中步驟(d)包括以下步驟:(d1)根據點雲資料中所有點的座標,求得該物件的點雲中的最小區域點的座標(pt1Min[x],pt1Min[y])及最大區域點pt1Max的座標(pt1Max[x],pt1Max[y]),進而可以得到由點(pt1Min[x],pt1Min[y])、(pt1Min[x],pt1Max[y])、(pt1Min[x],pt1Max[y])、(pt1Max[x],pt1Max[y])組成的該 物件的點雲包圍盒;(d2)將該包圍盒劃分成多個區域;(d3)選擇一個包含點雲中點的最小區域,判斷該最小區域是否存在標準曲線的圖元點;(d4)若該最小區域內沒有圖元點,將尋找標準曲線的圖元點的範圍擴大,取與該區域相鄰的所有最小區域,組成一個更大的區域,直到在該更大的區域內有標準曲線的圖元點為止;(d5)在存在標準曲線圖元點的該區域內,根據點雲中點的座標計算該點到該區域內尋找到的上述標準曲線圖元點的距離;及(d6)比較該點到上述標準曲線圖元點上的距離,得出一個最小距離,即為該點到標準曲線的最近距離。 The method of claim 2, wherein the step (d) comprises the following steps: (d1) determining a minimum of a point cloud of the object according to coordinates of all points in the point cloud data. The coordinates of the region point (pt1Min[x], pt1Min[y]) and the coordinates of the maximum region point pt1Max (pt1Max[x], pt1Max[y]), which can be obtained by the point (pt1Min[x], pt1Min[y]) , (pt1Min[x], pt1Max[y]), (pt1Min[x], pt1Max[y]), (pt1Max[x], pt1Max[y]) a point cloud bounding box of the object; (d2) dividing the bounding box into a plurality of regions; (d3) selecting a minimum region including a point in the point cloud, and determining whether the minimum region has a primitive point of the standard curve; (d4) If there is no primitive point in the minimum area, the range of the primitive point of the standard curve is expanded, and all the minimum areas adjacent to the area are taken to form a larger area until there is a standard in the larger area. (d5) in the region where the standard curve element point exists, calculate the distance from the point to the above-mentioned standard curve element point found in the area according to the coordinates of the point in the point cloud; and D6) Compare the distance from the point to the above-mentioned standard curve element point to obtain a minimum distance, which is the closest distance from the point to the standard curve. 如申請專利範圍第6所述之二維曲線色階比對方法,其中,所述標準曲線資料包括組成該標準曲線圖元點的座標,所述點雲資料包括點雲上各點的座標。 The two-dimensional curve gradation method of claim 6, wherein the standard curve data includes coordinates constituting the standard curve element point, and the point cloud data includes coordinates of points on the point cloud.
TW97120138A 2008-05-30 2008-05-30 System and method for comparing two-dimensional color gradation of curve TWI417752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW97120138A TWI417752B (en) 2008-05-30 2008-05-30 System and method for comparing two-dimensional color gradation of curve

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW97120138A TWI417752B (en) 2008-05-30 2008-05-30 System and method for comparing two-dimensional color gradation of curve

Publications (2)

Publication Number Publication Date
TW200949589A TW200949589A (en) 2009-12-01
TWI417752B true TWI417752B (en) 2013-12-01

Family

ID=44871018

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97120138A TWI417752B (en) 2008-05-30 2008-05-30 System and method for comparing two-dimensional color gradation of curve

Country Status (1)

Country Link
TW (1) TWI417752B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040254758A1 (en) * 2003-05-28 2004-12-16 Chih-Kuang Chang System and method for detecting defects of objects based on a CAD platform
US20070124107A1 (en) * 2004-09-30 2007-05-31 Shouhei Numata Shape model generation method and shape model generation system
TW200813769A (en) * 2006-09-01 2008-03-16 Hon Hai Prec Ind Co Ltd System and method for analyzing linearity

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040254758A1 (en) * 2003-05-28 2004-12-16 Chih-Kuang Chang System and method for detecting defects of objects based on a CAD platform
US20070124107A1 (en) * 2004-09-30 2007-05-31 Shouhei Numata Shape model generation method and shape model generation system
TW200813769A (en) * 2006-09-01 2008-03-16 Hon Hai Prec Ind Co Ltd System and method for analyzing linearity

Also Published As

Publication number Publication date
TW200949589A (en) 2009-12-01

Similar Documents

Publication Publication Date Title
CN101424520B (en) Method for detecting partial contour outline of object curved surface
CN106599897B (en) Readings of pointer type meters recognition methods and device based on machine vision
US20190086340A1 (en) Smart defect calibration system and the method thereof
Zhang et al. A 3D reconstruction method for pipeline inspection based on multi-vision
US8249304B2 (en) System and method for measuring gaps between object parts
CN105701766A (en) Image matching method and device
CN104422406A (en) Planeness measurement system and method
CN104634242A (en) Point adding system and method of probe
CN108955901B (en) Infrared temperature measurement method and system and terminal equipment
CN105783786A (en) Part chamfering measuring method and device based on structured light vision
CN104344795A (en) Point cloud profile measuring system and method
CN105590311A (en) Graphical plane data analysis system and method
CN105627935A (en) Product material thickness three-dimensional analysis system and method
CN113269193A (en) Pointer type meter reading method, device and storage medium
Shi et al. Circular grid pattern based surface strain measurement system for sheet metal forming
Chen et al. Stereo vision sensor calibration based on random spatial points given by CMM
Di Leo et al. Uncertainty evaluation of camera model parameters
JPWO2018131163A1 (en) Information processing apparatus, database generation apparatus, method, program, and storage medium
CN114037987A (en) Intelligent identification method, device, medium and equipment for scrap steel
CN101581579B (en) Method for comparing two-dimensional curve color gradations
CN103017702A (en) Method and device for three-coordinate measurement
CN102680012B (en) System and method for automatic output of measuring information
TWI417752B (en) System and method for comparing two-dimensional color gradation of curve
TWI510758B (en) System and method for measuring contour line of object
WO2017202191A1 (en) Facial data measurement method and system

Legal Events

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