1263444 七、 指定代表圖: (一) 本案指定代表圖為··第(三)圖。 (二) 本代表圖之元件符號簡單說明: 無 八、 本案若有化學式時,請揭示最能顯示發明特徵的化學 九、 發明說明: 【發明所屬之技術領域】 尤指一種影像量測過程中自動 本發明涉及一種影像量測系統及方法 對焦的系統及方法。 【先前技術】 辦公室自動化(Office Automation,〇A)在目前資料信息化的社會中 已不可缺4 ’除了以電腦來作為大量資料的處理及儲存外,藉由光學掃^ 機(Scanner)來作為文件、表格及特料的輸人裝置,因可有效提= 貧料輸入處理的效率’大量地使用,而已成為電腦的鮮配備之一。 現有的光學掃描ϋ在娜不同規格尺寸的原稿㈣,的換—组 頭機構來達成,在不同尺寸時浦成不同倍率的鏡頭以對應之,方能使得 焦距恰好觀於電餘合胃件(Cha_ 〇)_ Deviee,i。_ 這些鏡頭採總光程相同,且以—相關配合位置的 構 二使^正確成像於電純合器件上,“,由於該鏡頭為復構 ^磨、^的過程中難免會產生少許的誤差,使各鏡頭清晰成像所需 度或略有少許不同。所以,在鏡頭切換的過程中,其影 =就=精確成像於電_合科±,並轉使光學掃描關有一 頭因鏡頭加卫或安裝上的誤差而影_鏡職焦成像的精確度。 明名r 年5月26日授權公告的公告號為CN 2321G22Y、發 光^^= 3置”的專利,料利提供了-種自麟《置,設置於 可執^ 整鏡魏置的鏡頭定位碰單元、— 的咖定蝴整單71、以及-可控制該 ” CD讀罐單元崎作鮮元。當掃描機在開 1263444 機使用時,可自動應鏡頭成像所需 荷執合器件移動至適當位置,使==絲_整,將鏡頭及電 器件上,而使光學掃描機的㈣度大幅提地對焦、成像於電荷轉合 對放置待測物件的影像量測機台進行控腦中的軟體程式來 本發明之另I目之目的在於提供—種影像自動對焦系統。 目的在蛛供-種影像自動對焦方法。 二,讀(CCD),及於該CCD前方n光學 = =頭和CCD採集連續的影像。所述用戶端 ς : Z i ί ίίΓί 料鋪卡11由條數魏與測量機台 相…用於向Ζ轴馬達發送控制指令,以驅動2軸馬達在 =動的^接ζ㈣賴翻相«-㈣賴影_取卡與 所述用戶端電腦括如下魏馳:_輸人/輸出模_,於藉由影 ^員取=獲取工魏學鏡頭和CCD採集的連續影像至用戶端電腦進行分析 处理’藉由控制卡輸出驅動z軸馬達在指定區域來回移動的指令,將焦點 =置在用戶端電腦的介面上輸出;—參數設定模組,用於設定參數,包括 設=像的計算區域、設定是否要過濾、、設定計算量;—計算模組,用於 計算影像清晰度及藉由清晰度的高低計算焦點;一數據臨時儲存模組,用 於保存計算出的清晰度值和該清晰度值對應的機台Z軸位置;一判斷模 組,用於判斷Z軸是否到達設定位置及判斷是否為第二次對焦,若z軸沒 有到達設定位置,則發出驅動z軸馬達繼續移動的指令,藉由控制卡傳送 該指令給z軸馬達使其移動。其中計算模組根據影像的像素值進行計算清 1263444 晰度’其f像素_處理方法是採用 度絕對值之㈣價函數。 以憾4領域灰 树明還揭露-種影像自動對焦方法,該方法包括如下步驟:(a)提 台z軸置的測1機。台及—控制龍的用戶端電腦:⑻於測量機 件的連心件(CCD)及―卫業光學鏡頭,以採集待測物 im於用戶端電腦提供—影像操取卡,以獲取上述連續影 腦提供—控制卡,以發送命令控似軸馬達在指定範 === 命令,以初始化系統;⑴影像擷取卡獲取ccd 上频取的連續影像;⑴根據影像的像 數計算#前影像的清晰度;⑴觸ζ軸是否到達設 牛如果ζ軸沒有到達奴位置,則驅動ζ軸繼續移動, ΓΪ回步驟g;⑴判斷是否為第二次對焦,如果不是第二 二驗由清晰度的高健難定開始位置,驅動z軸_上述重新 ::==移動,並返回步驟g;⑴藉由清晰度的高低計算焦 2且驅動Z軸馬達到達焦點位置;⑴輸出焦點位置,結束對焦。 T述預,理包空上—次計算的臨時數據及過濾圖像雜質。 上下移^月^=里f機台進仃控制’確個尋找區間,移動機台ζ袖 =動’以利用工業光學鏡頭和CCD採集 =像,計算出焦點位置,且移動Z轴移動到焦點位置=: 圖像。本發明結構簡單,成本低,能倾精度。 f “晰的 【實施方式】 首先,對本發明所用到的術語解釋如下: zz=d-cmlpledDeviee ’電荷私裝置或電餘合器件;1263444 VII. Designated representative map: (1) The representative representative of the case is the picture of (3). (2) A brief description of the symbol of the representative figure: No. 8. If there is a chemical formula in this case, please disclose the chemical that best shows the characteristics of the invention. 9. Description of the invention: [Technical field of invention] Especially in the process of image measurement The present invention relates to a system and method for focusing an image measurement system and method. [Prior Art] Office Automation (〇A) is indispensable in the current information informatization society. 4 In addition to using computers as the processing and storage of large amounts of data, it is used as an optical scanner (Scanner). The input devices for documents, forms and special materials have become one of the freshest equipments for computers because they can effectively use the efficiency of the poor input processing. The existing optical scanning is achieved by changing the head-to-head mechanism of the originals of different sizes (4), and the lenses of different magnifications are correspondingly matched at different sizes so that the focal length is just right for the electric and residual stomach pieces ( Cha_ 〇)_ Deviee, i. _ These lenses adopt the same total optical path, and the correct configuration of the corresponding matching position makes it correctly imaged on the electric homozygous device. "Because the lens is a reconstituted ^, ^ process will inevitably produce a little error. In order to make the lens clear imaging requirements or slightly different. Therefore, in the process of lens switching, the shadow = just = accurate imaging in the electric _ _ ± ±, and turn the optical scanning off a lens because of the lens Or the error of the installation and the accuracy of the mirror image. The announcement number of the authorized announcement on May 26th is CN 2321G22Y, and the illuminating ^^= 3" patent, the material provides - from Lin "set, set in the lens can be controlled by the whole lens, the camera positioning unit, - the coffee set, the whole 71, and - can control the" CD reading tank unit is a fresh element. When the scanner is open 1263444 When in use, it can automatically move the lens to the appropriate position for the lens imaging, so that the == silk _ whole, the lens and the electrical device, so that the optical scanner's (four) degree is greatly focused, imaging on the charge transfer The image measuring machine that is placed on the object to be tested is used to control the software in the brain. The purpose of the other object of the present invention is to provide an image autofocus system. The purpose is to provide an image autofocus method in a spider. Second, read (CCD), and in front of the CCD, n optics = = head and CCD acquisition The continuous image. The user terminal Z: Z i ί ίίίί material card 11 is counted by the number of Wei and the measuring machine... used to send a control command to the stern motor to drive the 2-axis motor in the ^ ^ ^ (4) Lai reversal «- (four) Lai Ying _ card and the user computer including the following Wei Chi: _ input / output mode _, by the film ^ take = get the Wei Wei lens and CCD continuous image to The client computer performs analysis processing 'by the control card output to drive the z-axis motor to move back and forth in the designated area, and the focus = is placed on the interface of the user's computer; - the parameter setting module is used to set parameters, including = calculation area of the image, setting whether to filter, setting the calculation amount; - calculation module for calculating image sharpness and calculating focus by definition of height; a data temporary storage module for saving the calculated Sharpness value and the sharpness value The position of the Z-axis of the machine; a judgment module for determining whether the Z-axis reaches the set position and determining whether it is the second focus, and if the z-axis does not reach the set position, issuing an instruction to drive the z-axis motor to continue moving, The control card transmits the command to the z-axis motor to move it. The calculation module calculates the 1263444 clarity according to the pixel value of the image. The f-pixel processing method adopts the (four) valence function of the absolute value of the image. The field gray tree also reveals a kind of image autofocus method, which comprises the following steps: (a) the measuring machine of the z-axis of the platform. The station and the user computer of the control dragon: (8) the connection of the measuring machine Pieces (CCD) and "Weiye optical lens" to collect the object to be tested im provided on the user's computer - image manipulation card to obtain the above-mentioned continuous shadow brain supply - control card to send command control like shaft motor in the specified mode = == command to initialize the system; (1) image capture card to obtain continuous images taken on ccd; (1) calculate the sharpness of #前影像 according to the number of images; (1) whether the touch axis reaches the set cattle if the axis does not reach the slave position Then the drive axis continues to move, and returns to step g; (1) determines whether it is the second focus, if not the second two test by the high-definition start position of the sharpness, driving the z-axis _ the above re::== movement, And returning to step g; (1) calculating the focus 2 by the height of the sharpness and driving the Z-axis motor to reach the focus position; (1) outputting the focus position, ending the focus. T pre-predicts, the temporary calculation of the temporary data and the filtering of image impurities. Move up and down ^ month ^ = 里 f machine into the 仃 control 'determine a search interval, mobile machine ζ sleeve = move 'to use industrial optical lens and CCD acquisition = image, calculate the focus position, and move the Z axis to focus Location =: Image. The invention has the advantages of simple structure, low cost and tilting precision. f "Essential" First, the terms used in the present invention are explained as follows: zz = d-cmlpledDeviee 'charged private device or electric residual device;
^ Θ不,係為本發明影像自動對焦系統之硬體芊檨R 自動對焦系統包括一用戶端電腦Μ一放顯 ^ - cCD16 干鏡頭18 CCD16糟由該工業光學鏡頭18將影 u裝有影像卡12、控制卡13及—龍存儲區2。。其中广 條影像數躲14與輯影_取卡12树,cc應㈣鄉像數據^ 1263444 台獲取的影像電訊轉送·賴取卡12上:所述控制卡u藉由 is 15 η ζ 17 2〇用出的17在指㈣區域來回移動;所述資料存儲區 、保存心出的“影像的清晰度值及該清晰度值所對應的機台z軸 位置。 ° 麥閱第一圖所不,係為本發明用戶端電腦之功能模組 腦π包括-輸墙域組m、―參數設定模組112、—計算模 數據臨時齡馳114及-靖模組115。輸人/輸減組m驗藉由影像 操取卡12獲取業光學鏡頭is和ccd採集的連續影像至用戶端電腦η =仃分析處理、藉由控制卡13輸出驅動ζ軸馬達在指定區域來回移動的指 令及將焦齡置仙戶端電腦η的介社輸&。參數設定她112設定參 ^ ’包括設定圖像的計算區域、設定是否要過濾、設定計算量,其中計算 嚴越大,a十异出的焦點越準確,速度越慢;反之焦點越不準確,速度越快。 計算模組m祕計算影像清晰度及藉由清晰度的高低計算鎌。數據臨 時儲存模組114用於將計算出的清晰度值和該清晰度值對應的機台z軸位 置儲存於資料存儲區20中。判斷模組115用於判斷z軸17是否到達設定 位置及判斷是否為第二次對焦,若z軸沒有到達設定位置,則發出驅動z 軸馬達17繼續移動的指令,藉由控制卡13傳送該指令給z軸馬達17使其 移動。 參閱第三圖所示,係為本發明影像自動對焦方法流程圖。首先,藉由 用戶端電腦11發出對焦命令(步驟300),然後初始化對焦系統,即設定一 些參數及控制機台Z軸到達用戶設定的一個位置,該位置是通過用戶指定 一個大概位置和指定的對焦距離計算得出的,所述設定參數指設定圖像的 計算區域、設定是否要過濾及設定計算量等,其中計算量越大,計算出的 焦點越準確,速度越慢;反之焦點越不準確,速度越快(步驟S302)。再驅 動Z轴馬達17在指定的區域來回移動,CCD16和工業光學鏡頭18採集Z 車由馬達17移動的連續影像,輸入/輸出模組ηι藉由影像擷取卡12將(:1:〇16 傳出的連續影像的數字圖像電訊號輸入到用戶端電腦11中(步驟S304)。 用戶端電腦11對所獲取的影像進行預處理,該預處理主要是清空上一次計 1263444 j和過慮圖像雜f (步驟幻叫 像的清晰度’像素值的處理方法採用當喊 影像越尖銳,黑與自像《_=辦值越大, 灰度差絕驗之和評價函數,如下所示所關I晰—數是4領域 ν-ζν-ι Λ7 Λ κτ ,ι ^[|/( _) /(χ 並將所計Μ崎晰度齡贿觸應補纟 中(步驟S3G8)。然制斷ζ軸是 二;料存儲區20 的範圍(一個最高值、°又疋,以攻定位置是指對焦 —料^ ,Ζ軸的移動範圍是0〜b〇(_),^ α又疋對…、的章巳圍為1〜2 (_)(步驟S31〇)。如果沒有到 .又 續移動,同時又重新獲取圖像且返回步驟⑽,再 二如果到達設定位置,則再判斷是否為第二次對焦(步驟幻⑵ 次聽,_由清·的高低麵指賴始域並驅動機△ ,該開開始位置,返时驟纖重新計算獲取圖像再次進行計^ : 公,焦’則藉由清晰度的高低計算焦點’同時驅動z轴到達隹點位^ tZ4^ 11 ^A (^s>^)= 本發月雖以較佳實施例揭露如上,然其並非用以限定本發明 悉此項技藝者,林麟本發明之精神和範_,當可 1 门、 此本發明之健範1]當視無之中請專纖 太 【圖式簡單說明】 第一圖係為本發明影像自動對焦系統之硬體架構圖 第二圖係為本發明用戶端電腦之功能模組圖。 第三圖係為本發明影像自動對焦方法流程圖。 【主要元件符號說明】 11 111 112 113 114 用戶端電腦 輪入/輸出模組 參數設定模組 計算模組 數據臨時存儲模組 1263444 判斷模組 115 影像擷取卡 12 控制卡 13 影像數據線 14 控制信號數據線 15 CCD 16 Z轴馬達 17 工業光學鏡頭 18 機台 19 資料存儲區 20^ Θ No, it is the hardware of the invention's image autofocus system. The 自动R autofocus system includes a user-side computer Μ一放显示^ - cCD16 dry lens 18 CCD16 is made by the industrial optical lens 18 Card 12, control card 13 and -long storage area 2. . Among them, the number of strip images hides 14 and the album _ takes the card 12 tree, cc should (4) the township image data ^ 1263444 acquisition of the image telecom transfer · the card 12: the control card u by is 15 η ζ 17 2 The used 17 moves back and forth in the finger (four) area; the data storage area stores the "image clarity value" of the image and the z-axis position of the machine corresponding to the sharpness value. The function module of the user terminal computer of the invention is a brain π-including wall group m, a parameter setting module 112, a calculation mode data temporary ageing 114 and a jing module 115. input/transmission group The m test obtains the continuous image acquired by the optical lens is and ccd by the image manipulation card 12 to the user computer η = 仃 analysis processing, and the control card 13 outputs an instruction to drive the reel motor to move back and forth in the designated area and to focus The setting of the idyllic computer η is the same as the setting. The parameter setting her 112 setting parameter ^ includes setting the calculation area of the image, setting whether to filter, setting the calculation amount, wherein the calculation is stricter, the difference is a The more accurate the focus, the slower the speed; the less accurate the focus, the faster the speed. The calculation module m calculates the image sharpness and calculates the height of the image. The data temporary storage module 114 is configured to store the calculated sharpness value and the resolution z-axis position of the machine in the data storage. In the area 20, the determining module 115 is configured to determine whether the z-axis 17 has reached the set position and determine whether it is the second focus. If the z-axis does not reach the set position, an instruction to drive the z-axis motor 17 to continue to move is issued, by controlling The card 13 transmits the command to the z-axis motor 17 for movement. Referring to the third figure, it is a flowchart of the image autofocus method of the present invention. First, a focus command is issued by the client computer 11 (step 300), and then initialized. The focusing system sets some parameters and controls the Z axis of the machine to reach a position set by the user. The position is calculated by the user specifying an approximate position and a specified focusing distance, and the setting parameter refers to a calculation area of the set image. Set whether to filter and set the calculation amount, etc., the larger the calculation amount, the more accurate the calculated focus and the slower the speed; on the contrary, the less accurate the focus, the faster the speed (Step S302). The Z-axis motor 17 is further driven to move back and forth in a designated area, and the CCD 16 and the industrial optical lens 18 capture a continuous image of the Z-vehicle moved by the motor 17, and the input/output module ηι is to be captured by the image capture card 12 ( :1: 数字16 The digital image signal of the continuous image transmitted is input to the client computer 11 (step S304). The client computer 11 preprocesses the acquired image, and the preprocessing is mainly to clear the last time. 1263444 j and over-consideration image misf (the resolution of the phantom image clarity) pixel value processing method is used when the shouting image sharper, black and self-image "_= the greater the value, the gray level difference and the sum of the evaluation function , as shown below, I clear the number is 4 fields ν-ζν-ι Λ7 Λ κτ , ι ^[|/( _) / (χ 并将 所 所 所 晰 晰 晰 ( ( ( ( ( ( S3G8). However, the breaking axis is two; the range of the material storage area 20 (a highest value, ° and 疋, to the position of the target is the focus material ^, the movement range of the Ζ axis is 0~b〇(_), ^ α Also, the chapters of ..., are 1~2 (_) (step S31〇). If there is no arrival, the movement continues, and the image is reacquired and returns to step (10), and if it reaches the set position, then Judging whether it is the second focus (step phantom (2) times of listening, _ by the clear high and low surface refers to the start field and drive the machine △, the start position, the return of the fiber is recalculated to obtain the image again. , Jiao's calculates the focus by the level of sharpness' while driving the z-axis to reach the 隹 point ^ tZ4^ 11 ^A (^s>^)= Although this month is disclosed in the preferred embodiment, it is not used In order to limit the present invention to those skilled in the art, Lin Lin's spirit and scope of the invention, when the door can be used, the invention of the invention can be regarded as a special mode. The second diagram of the hardware architecture of the image autofocus system of the present invention is a functional module diagram of the user terminal computer of the present invention. Inventive image autofocus method flow chart [Main component symbol description] 11 111 112 113 114 User computer wheel input / output module parameter setting module calculation module data temporary storage module 1263444 judgment module 115 image capture card 12 Control card 13 Image data line 14 Control signal data line 15 CCD 16 Z-axis motor 17 Industrial optical lens 18 Machine 19 Data storage area 20