1273513 九、發明說明: 【發明所屬之技術領域】 的二系統及方法,特別是一麵於製造業 【先前技術】 二術二 電腦技術的發展,圖像量測及圖 或者產品的二維圖_取工件 效率。 ’、、、後透過電細辅助進行量測和判斷,提高了量測的 值,ίί圍ΐΐί ϋ干構成的,每個圖元都有—個對應的灰度 是圖像中較亮的z r圆m的=像中較暗的部分,灰度值高的 120,读禍斟闰-七也, 人厌徂日®現奴大的改變,例如從80變爲 圖形,進,可轉找二_中表現的 特徵,靖11Η娜_來生賴形,分析圖形 這樣_細物衫___。但是, 大批量的1Q傻/析處湖像的效率不高,不適宜處理製造業中 【發明内容】 維圖於提供-種二維圖像分析處理系統,可以對二 其參數。< a ®像巾的特殊點,輸出由特殊點構成的圖形及 攝像目的在於提供一種二維圖像分析處理系統,可以透過 攝像裝置獲取鋼物的二維圖像,並對二維圖像進行分析處理,獲取= 1273513 中的特殊點’輸出_殊簡成_形及 本發明的第三個目的在於提供_種二唯° =進行分•獲__殊點:輪:=二:: 本發明的第四個目的在於提供_種 方法生成輸出的圖形進行參數量测今^刀析處理方法,可以對該 '本發明㈣五個目的在於提供—種;足麟轉數要求。 方法生成輸出的圖形參數進行處理分析,尋找圖二^理方法,可以對該 維圖像是否與已知圖像相同或者類似。 ,特徵,識別待測物的二 爲實現本發明第一個目的,本 =該系統包括—電腦用於分析處理二維圖像,象分析處理系 ΞΠ電腦包括··—資料存取模組,胁存取t館二維 獲取池,用於依據_的圖元灰纽>特殊點 -維圖像上的特殊點;一圖形分析模組 二:兀、犬又值梯度’獲取 計算特殊點形成的圖形,輸出圖形參數。;、又取的圖像上的特殊點, 號轉個目的,上述系統還包括··-攝像裝置用· 置及上《jrii 制物的二、_像資料卜影像卡與上述攝像^ 法。ίΰίίΓ第三個目的,本發明提供了一種二維圖像分析處理方 的灰度值^攄择讀取待測物的二維圖像;獲取二維圖像中圖元 ^ 獲取的圖兀灰度值,計算該圖元的灰度值梯度,獲取二維 二:殊S依據獲取的圖像上的特殊點,計算由特殊點形成的圖形 及圖形參數,輸出圖形及圖形參數。 爲^現本發明第四個目的,上述方法還包括如下步驟··將圖形來數盥 預没的參數對比,靖_形是否滿足預設的參數要求。 、、爲實現本發明第五個目的,本發明提供了一種二維圖像分析處理方 法該方法包括如下步驟··讀取待測物的二維圖像;獲取二維圖像中圖元 1273513 特:==:=的灰度值梯度,獲取二維 形 T象上的特殊點;依據獲取的;象二=元== 弟度,獲取二維 及圖形參數,輸出圖形及圖形參數圖异由特殊點形成的圖形 特徵,識別待測物的二維圖像 、θ "進行處王里分析,尋找圖 _本發明,可以==:像:同或秦 進行分析處理,獲取圖像中的、^ ^物的—維圖像,對二維圖像 卜觀進行親其參數’ 硬碟,崎二嶋進行分咖、記憶體、 點構成的_及其參數,對待嶋的尺;由特殊 別。存儲裝置2是-種與電腦!連制 ^^=仃„ 電腦i本身的存儲裝置如内 己憶體,可以是 腦1外接的存儲裝置,如她Γ J先碟、軟碟專’也可以是與電 ^ 4 3 ^ 〇 ^ 電轉換裝置,可以獲取待測物的二維圖 置則:勿 爲電餘合卿,㈣i金屬i 物 + 導體(CMOS, C〇mplementary Meial 〇xide Semic〇nduct〇r) =於,攝像裝置4獲取的二義像資料轉換爲電腦〗可識的二維圖 象,影像卡3爲與攝像裝置4匹配的類型,並且附帶相關的軟體程於 進行資料轉換。 如第二圖所示,係本發明電腦之功能模組圖。電腦工包括一資料存取 模組11 曰,一灰度值獲取模組12,一特殊點獲取模組13,一圖形分析模組 14 ’畺測模組15,一圖像識別模組16。資料存取模組11用於存取上述 存儲裝置4中的二維圖像;一灰度值獲取模組12用於獲取二維圖像中圖元 的灰度值;特殊點獲取模組13用於依據獲取的圖元灰度值,計算該圖元的 灰度值梯度,獲取二維圖像上的特殊點;圖形分析模組14用於依據獲取的 圖像上的特殊點,計算特殊點形成的圖形,輸出圖形參數;量測模組15用 1273513 於對上述圖形分析模組形成的gj形進行參 設的參數要求;_酬歡16 _壯述是否滿足預 與已知圖娜,纖齡4形成的圖形 法’,=:圖係首本先發:==方法(《下簡稱“本方 你^ 僻冢裒置4對待測物進行攝像,择敗-給闰 像(步驟S1),待測物可以是製造業生產的工件或=^ ^圖 該待測物的二維圖像,通常該待測物會I &、又取 上,並預設合適的外界光源對待測物進行縣位置 ^數如焦距、曝光量、細等對待測物進行攝像,攝像完成^,影m 維圖像,如腑、職式等腦1可識別的二 存儲裝置2巾。=_取歡u從^= t取额11存儲在 其他來 -认― 獲取核組13依據獲取關元灰度值,計瞀棚 -的灰度值梯度’獲取二維圖像上的特殊點(步驟s4),具體 _分析模組14依據獲取的圖像上的特二,計算特 參數,輸出的圖形爲圓、圓環、圓弧、 :=及2 在_了 式特殊點形成的圖形。以直線爲例, ϊ _伽,便賴成由細闕錄,但是, 僅由乂兩伽構成的直線可能與實際直、_差較大 需要取足夠多的特殊點,利用最小一乘法 二 里/ =、, 距離之和最小的直線,即獲得—條各個點到該直線 的直ί^ΙίίΓ ’判斷該圖形是否滿足預設的參數要求,例如圓 圖形“、隹L t求的ί差細之内等(步驟S7)。圖像識別模組16將 知a像相η^Γ讀’械圖形特徵,翻制物的二糊像是否與已 夫圖像相同或者類似(步驟S8)。 如第四圖所示,係本發明二_像分析處理方法獲取圖元灰度值之工 1273513 定二維圖像的二維座標系並設定要獲取灰細^ k里(步驟S31)。设定一個起始點圖元,起始點圖元的位置可以由本方 =動設定’也可以由人卫奴,獲得起始闕元的座標(步驟s32)。在 獲传了起缝圖的座標之後,該座標便對應了—侧元的灰度值,該灰 度值可赠爲制元的絕對灰度值。爲了消除灰度 了 者人4擇0植或料触的籍來元^ ΐίί^Γ, ,1° ^««« 圖二灰度值。採财間灰度值獲取觸元的灰度值的步驟如下:依據該圖 票,確定該圖元附近的一個區域;獲取上述區域各圖元的二維 座‘,依據上述各圖兀的二維座標,獲取各座標對應的圖元的絕對灰度值; 2逑各圖元絕對灰度值的中·,作爲該圖元的灰度值。平均灰度 該圖元的灰度值的步驟如下:依據該圖元的二維座標,確定該圖元 域;獲取上述區域各圖獅二維座標;依據上述各圖元的二 ,獲取各座標對應的圖元的絕對灰度值;取上述各圖元絕對灰度值 =均^作爲該圖元的灰度值(步驟S34)。以當前圖元爲基點,向該起 多個方向獲取該方向上—跋離的第二個圖⑽座標,採用 二驟S34的方法獲取該點灰度值。如可以取以起始點爲基點,向相互成卯 個方向延伸獲取第二個圖元的座標,也可以成60度的六個方向延伸 二了個fd個方向之間的角度越小,較容易找到灰度值接近的圖 二但疋運异讀會越大;像各個方向延伸的一定距離可以由本方法自動 設ϊί Γ關城者3個毫米,也可以人卫設定如12烟滅者6個毫米, 距離设定的越小,越容易找到灰度值接近的圖元,但是運算量將會越大(步 =S35)。以當前圖元爲基點,重複步驟奶,獲取多個圖元的灰度值(步 Γ 6)判斷已經獲取灰度值的圖元滿足設定的數量要求,若滿足要求, 則、、:束獲取圖元灰度值步驟,若未滿足要求,則返回步驟幻$獲取下一個 圖元的灰度值(步驟S37)。 。如第五圖所示,係本發明二維圖像分析處理方法獲取特殊點的工作流 矛囷首先,5又疋灰度值梯度極限值及特殊點數量要求,可以由本方法自 動設定,也可以由人工設定(步驟S41)。取某一圖元周圍圖元各方向一定 1273513 距離的圖元灰度值與該圖元灰度值之差作爲該圖元在該方向上的灰度值梯 度,灰度值梯度大,則該圖元明暗過渡明顯,說明該圖元處在二維圖像輪 廓線的附近(步驟S42)。判斷該點圖元灰度值梯度是否超過灰度值梯度極 限值(步驟S43)。如超過灰度值梯度極限值,則確定該圖元爲特殊點(步 驟S44)。若沒有超過灰度值梯度極限值,則計算其他點圖元的灰度值梯度, 繼續尋找特殊點(步驟S45)。判斷已經獲取特殊點的數量是否滿足設定的 數量要求,若滿足要求,則結束獲取特殊點步驟,若未滿足要求,則返回 步驟S45獲取下一個特殊點(步驟S46)。 綜上所述,本發明所提出之一種二維圖像分析處理系統及方法確實可1273513 IX. Description of the invention: The second system and method of the technical field of the invention, in particular, the development of the prior art, the second technique, the development of computer technology, the image measurement and the two-dimensional image of the product or product. _ Take the workpiece efficiency. ',, and then through the electric fine assist measurement and judgment, improve the measured value, ίί ΐΐ ϋ ϋ , , , , , , , , , , , , 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个 每个The circle m = the darker part of the image, the high gray value of 120, the misfortune-seven, the change of the human swearing day, the current slave, such as from 80 to graphics, into, can be transferred to The characteristics of _ performance, Jing 11 Η Na _ come to the shape, analyze the graphics such as _ fine shirt ___. However, the high-volume 1Q silly/resolution lake image is not efficient and is not suitable for processing in the manufacturing industry. [Inventive content] Weitu provides a two-dimensional image analysis processing system, which can be used for its parameters. < a ® special point of the image towel, the output of the pattern composed of special points and the purpose of the camera is to provide a two-dimensional image analysis processing system, which can acquire a two-dimensional image of the steel object through the image pickup device, and acquire a two-dimensional image Performing the analysis and processing, obtaining the special point in the = 1273513 'output _ simple _ shape and the third purpose of the present invention is to provide _ kind of two only ° = score points · get __ special points: round: = two:: A fourth object of the present invention is to provide a method for generating a pattern of a method for performing a parameter measurement method, and the method of the present invention (four) is to provide a seed; The method generates the output graphic parameters for processing and analysis, and finds the graphic method, which can be the same or similar to the known image. , feature, identify the object to be tested, in order to achieve the first object of the present invention, the system includes: a computer for analyzing and processing two-dimensional images, such as an analysis processing system, a computer including a data access module, The threat accesses the two-dimensional acquisition pool of the t-shop for the special points on the special point-dimensional image according to _; a graphical analysis module 2: 兀, dog value gradient 'acquisition calculation special point The resulting graph, the output graph parameters. And the special point on the image taken, the number is transferred to the purpose. The above system also includes the camera device. The third object of the present invention is to provide a two-dimensional image of a two-dimensional image analysis processing method to select a two-dimensional image of the object to be tested; Degree value, calculate the gray value gradient of the primitive, obtain two-dimensional two: special S according to the special points on the acquired image, calculate the graphics and graphics parameters formed by the special points, output graphics and graphics parameters. In order to achieve the fourth object of the present invention, the above method further includes the following steps: • comparing the parameters of the graph to the pre-existing parameters, and whether the Jing _ shape satisfies the preset parameter requirements. In order to achieve the fifth object of the present invention, the present invention provides a two-dimensional image analysis processing method. The method includes the following steps: reading a two-dimensional image of the object to be tested; acquiring the two-dimensional image element 1273513 Special: ==:= gradation value gradient, obtain a special point on the two-dimensional T image; according to the acquired; like two = yuan == brother degree, obtain two-dimensional and graphic parameters, output graphics and graphic parameters A graphic feature formed by a special point, identifying a two-dimensional image of the object to be tested, θ " performing a Wang Li analysis, looking for a picture _ the present invention, can ==: like: the same or Qin for analysis and processing, obtaining an image The image of the image of the ^^ object, the two-dimensional image of the observation of the parameters of the 'hard disk, the second 嶋 嶋 分 、 、 、 记忆 记忆 记忆 记忆 、 、 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其 及其Special. Storage device 2 is a kind of computer! Connected ^^=仃„ The storage device of the computer i itself, such as the internal memory, can be an external storage device of the brain 1, such as her 先J first disc, floppy special 'can also be with the electric ^ 4 3 ^ 〇 ^ The electric conversion device can obtain the two-dimensional map of the object to be tested: not for electric remnant, (4) i metal i material + conductor (CMOS, C〇mplementary Meial 〇xide Semic〇nduct〇r) =, camera device 4 The acquired binary image data is converted into a two-dimensional image that can be recognized by the computer, and the image card 3 is of a type matching with the camera device 4, and the related software program is included for data conversion. As shown in the second figure, the image is Inventing a functional module diagram of a computer. The computer worker comprises a data access module 11 曰, a gray value acquisition module 12, a special point acquisition module 13, and a graphics analysis module 14 'test module 15 An image recognition module 16 is configured to access the two-dimensional image in the storage device 4; a gray value acquisition module 12 is configured to acquire the grayscale of the primitive in the two-dimensional image. a special point acquisition module 13 is configured to calculate a gray value gradient of the primitive according to the acquired gray value of the primitive Obtaining a special point on the two-dimensional image; the graphic analysis module 14 is configured to calculate a graphic formed by the special point according to the special point on the acquired image, and output the graphic parameter; the measuring module 15 uses 1273513 to analyze the graphic The gj shape formed by the module is used to set the parameter requirements; _ 欢 欢 16 _ 壮 是否 是否 是否 是否 是否 是否 是否 已知 已知 , , , , , , , , , , , , , , , , , , , , , , , , , , , , (hereinafter referred to as "the party you are ^ 冢裒 冢裒 4 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待 对待The two-dimensional image, usually the object to be tested will be I &, and take the appropriate external light source to measure the object to the county position ^ such as focal length, exposure, fine and other objects to be measured, video Completion ^, shadow m-dimensional image, such as 腑, job, etc. Brain 1 identifiable two storage device 2 towel. = _ 欢 u u from ^ = t withdrawal amount 11 stored in other - recognition - acquisition core group 13 basis Obtain the gray value of the Guanyuan, and calculate the special value on the two-dimensional image by taking the gray value gradient of the shed--the specific_analysis module 14 According to the special image on the acquired image, the special parameters are calculated, and the output graphic is a circle, a circle, an arc, a :=, and a pattern formed by a special point in the _ type. Taking a straight line as an example, ϊ _ gamma, However, the line consisting of only two gammas may be different from the actual straight line, and the difference between the two may require enough special points, using the least one multiplication method / =, and the sum of the distances is the smallest. The straight line, that is, the straight line of each point to the straight line, determines whether the graphic satisfies the preset parameter requirements, for example, the circle figure ", the difference between the 隹L t and the like" (step S7). The image recognition module 16 reads the image phase feature of the image a, and determines whether the second paste image of the object is the same as or similar to the image of the image (step S8). As shown in the fourth figure, the two-image analysis processing method of the present invention acquires the two-dimensional coordinate system of the two-dimensional image and sets the gray-scale image to be acquired (step S31). A starting point primitive is set, and the position of the starting point primitive can be set by the local = moving setting or by the human slave, and the coordinates of the starting unit are obtained (step s32). After the coordinates of the seaming map have been transmitted, the coordinates correspond to the gray value of the side element, which can be given as the absolute gray value of the system element. In order to eliminate the grayscale, the person who chooses the 0 plant or the material touches the element ^ ΐ ί ί Γ, , 1 ° ^ « « « Fig. 2 gray value. The step of obtaining the gray value of the touch element by the gray value of the money collection is as follows: determining an area near the picture element according to the picture ticket; acquiring a two-dimensional block of each picture element in the above area, according to the above two figures The dimension coordinates obtain the absolute gray value of the primitive corresponding to each coordinate; 2) the middle of the absolute gray value of each primitive as the gray value of the primitive. The step of averaging the gray value of the primitive is as follows: determining the primitive domain according to the two-dimensional coordinates of the primitive; acquiring the two-dimensional coordinates of each lion in the above region; acquiring the coordinates according to the second of the above primitives The absolute gray value of the corresponding primitive; the absolute gray value of each of the above primitives is taken as the gray value of the primitive (step S34). Taking the current picture element as a base point, the second picture (10) coordinate in the direction is obtained from the plurality of directions, and the gray value of the point is obtained by the method of the second step S34. If the starting point is taken as the base point, the coordinates of the second primitive element may be extended in the direction of each other, or may be extended in six directions of 60 degrees, and the angle between the two fd directions is smaller. It is easy to find the picture 2 with the gray value close to it, but the difference between the different readings will be larger; the certain distance extending in all directions can be automatically set by the method ϊ Γ 城 城 3 3 3 3 3 3 3 3 3 3 3 3 3 3 In millimeters, the smaller the distance is set, the easier it is to find the primitive with the gray value close to it, but the amount of calculation will be larger (step = S35). Taking the current picture element as a base point, repeating the step milk, obtaining the gray value of the plurality of picture elements (step 6), determining that the picture element that has acquired the gray value satisfies the set quantity requirement, and if the requirement is met, then: The primitive gray value step, if not satisfied, returns to the step magic $ to obtain the gray value of the next primitive (step S37). . As shown in the fifth figure, the two-dimensional image analysis processing method of the present invention acquires a special point of the workflow spear. First, the gradation value of the gray value gradient limit and the number of special points can be automatically set by the method, or It is manually set (step S41). Taking the difference between the gray value of the primitive having a distance of 1273513 in each direction of the primitive and the gray value of the primitive as a gradient of the gray value of the primitive in the direction, and the gradient of the gray value is large, then the gradient is The transition of the picture element is obvious, indicating that the picture element is in the vicinity of the contour of the two-dimensional image (step S42). It is judged whether or not the dot primitive gradation value gradient exceeds the gradation value gradient limit value (step S43). If the gray value gradient limit value is exceeded, it is determined that the primitive is a special point (step S44). If the gray value gradient limit value is not exceeded, the gray value gradient of the other dot primitive is calculated, and the special point is continuously searched (step S45). It is judged whether the number of the special points has been obtained satisfies the set quantity requirement, and if the request is satisfied, the step of acquiring the special point is ended, and if the request is not satisfied, the process returns to step S45 to acquire the next special point (step S46). In summary, the two-dimensional image analysis processing system and method proposed by the present invention can indeed
符合發明專利要件,爰依法提出專利申請。惟,以上所述者僅為本發明一 種二維圖像分析處理系統及方法之較佳實施例,舉凡熟悉本案技藝之人 士,在參照本發明所做等效修飾或變化,皆應包含於以下申請專利:範圍 内0 【圖式簡單說明】 第-圖係本伽二_像分析處理祕之硬體架構圖 第二圖係本發明電腦之功能模組圖。 第二圖係本發明二維圖像分析處理方法之功流程圖。 &第四圖係本發明二維圖像分析處理方法獲取圖元灰度值的工作流程 第五圖係本發明二維圖像分析處理 【主要元件符號說明】 獲取特殊點的工作流程圖In accordance with the requirements of the invention patent, 提出 file a patent application according to law. However, the above description is only a preferred embodiment of a two-dimensional image analysis processing system and method of the present invention. Any equivalent modifications or changes made by the present invention to those skilled in the art should be included in the following. Patent application: 0 in the range [Simple description of the diagram] The first diagram is the hardware diagram of the computer of the present invention. The second figure is a power flow chart of the two-dimensional image analysis processing method of the present invention. <Fourth figure is the workflow of obtaining the gray value of the primitive by the two-dimensional image analysis processing method of the present invention. The fifth figure is the two-dimensional image analysis processing of the present invention. [Main component symbol description] Work flow chart for obtaining special points
電腦 1 11 12 13 14 15 16 2 資料存取模組 灰度值獲取模組 特殊點獲取模組 圖形分析模組 量測模組 圖像識別模組 存儲裝置 11 1273513 影像卡 攝像裝置Computer 1 11 12 13 14 15 16 2 Data Access Module Gray Value Acquisition Module Special Point Acquisition Module Graphic Analysis Module Measurement Module Image Recognition Module Storage Device 11 1273513 Image Card Camera