TWI427262B - Computer system and method for adjusting profile light - Google Patents

Computer system and method for adjusting profile light Download PDF

Info

Publication number
TWI427262B
TWI427262B TW97125416A TW97125416A TWI427262B TW I427262 B TWI427262 B TW I427262B TW 97125416 A TW97125416 A TW 97125416A TW 97125416 A TW97125416 A TW 97125416A TW I427262 B TWI427262 B TW I427262B
Authority
TW
Taiwan
Prior art keywords
level
contour light
image
contour
light
Prior art date
Application number
TW97125416A
Other languages
Chinese (zh)
Other versions
TW201003032A (en
Inventor
Chih Kuang Chang
Xian-Yi Chen
Zhong-Kui Yuan
Li Jiang
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 TW97125416A priority Critical patent/TWI427262B/en
Publication of TW201003032A publication Critical patent/TW201003032A/en
Application granted granted Critical
Publication of TWI427262B publication Critical patent/TWI427262B/en

Links

Classifications

    • Y02B20/46

Description

輪廓光調節方法及其電腦系統 Contour light adjustment method and computer system thereof

本發明涉及一種光源調節方法及其電腦系統,尤其涉及一種輪廓光調節方法及其電腦系統。 The invention relates to a light source adjusting method and a computer system thereof, in particular to a contour light adjusting method and a computer system thereof.

影像量測是目前精密量測領域中最廣泛使用的量測方法,該方法不僅精度高,而且量測速度快。影像量測主要用於零件或者部件的尺寸誤差和形位誤差的測量,對保證產品品質起著重要的作用。 Image measurement is currently the most widely used measurement method in the field of precision measurement. This method not only has high precision, but also has fast measurement speed. Image measurement is mainly used for measuring the dimensional error and shape error of parts or components, which plays an important role in ensuring product quality.

傳統的影像量測方法是採用工業光學鏡頭搭配高解析度的電荷耦合裝置(Charged Coupled Device,CCD),透過影像擷取卡取得待測工件或者部件的影像,該量測方法對工件或者部件的很多精密量測都達到了很高的精度。 The conventional image measuring method uses an industrial optical lens with a high-resolution Charged Coupled Device (CCD) to obtain an image of a workpiece or a component to be tested through an image capturing card. The measuring method is for a workpiece or a component. Many precision measurements have achieved high precision.

但是在以前的影像量測過程中,由於影像測量機台上發光裝置所發出的影像光源會有差異,例如,強度、亮度等都會不同,即使是相同種類的發光裝置(如:同一種規格的光源裝置)發出的影像光源也會不同,在對CCD影像進行處理時,就會對獲取的影像清晰度產生很大的偏差,使得不同的機台對相同的工件進行影像測量時的重複性差,從而導致精度不高。 However, in the previous image measurement process, the image light source emitted by the light-emitting device on the image measuring machine may be different, for example, the intensity and brightness may be different, even for the same type of light-emitting device (eg, the same specification). The source of the image emitted by the light source device is also different. When the CCD image is processed, the image sharpness of the acquired image is greatly deviated, so that the repeatability of the image measurement by different machines for the same workpiece is poor. As a result, the accuracy is not high.

在習知技術中,光源尤其是輪廓光的調節是透過測量人員手動完成的,光源的強度受到個人主觀意識影響大,容易造成測量結果的誤差大。同時,手動調節需要測量人員將注意力高度集中在工件的影像與影像量測機台的光源調節器上,有一定的勞動強度。 In the prior art, the adjustment of the light source, especially the contour light, is manually performed by the measuring personnel, and the intensity of the light source is greatly affected by the subjective consciousness of the individual, and the error of the measurement result is easily caused. At the same time, manual adjustment requires the measurement personnel to focus on the image of the workpiece and the light source adjuster of the image measuring machine, which has a certain labor intensity.

鑒於以上內容,有必要提供一種輪廓光調節方法及其電腦系統,可提高影像測量的重複性與精度,減輕測量人員的勞動強度。 In view of the above, it is necessary to provide a contour light adjustment method and a computer system thereof, which can improve the repeatability and accuracy of image measurement and reduce the labor intensity of the measurement personnel.

一種輪廓光調節方法,該方法包括:將輪廓光調節到一初始等級;獲取該初始等級下需調節輪廓光的區域的影像,並對該影像進行平均值過濾和二值化處理;設置輪廓光調節過程中所涉及到的變數;根據上述變數計算所述影像的最佳輪廓光對應的等級;及根據所計算出的等級自動調節輪廓光。 A method for adjusting a contour light, the method comprising: adjusting contour light to an initial level; acquiring an image of an area of the initial level where the contour light needs to be adjusted, and performing average filtering and binarization processing on the image; and setting the contour light a variable involved in the adjustment process; calculating a level corresponding to the best contour light of the image according to the above variable; and automatically adjusting the contour light according to the calculated level.

一種調節輪廓光的電腦系統,該電腦系統包括影像處理單元、計算單元和輪廓光調節單元。其中,影像處理單元用於將影像量測機台的輪廓光調節到一初始等級,並對需調節輪廓光的區域的影像進行平均值過濾和二值化處理。計算單元用於設置輪廓光調節過程中所涉及到的變數,並根據所述變數計算出所述影像對應的最佳輪廓光的等級。輪廓光調節單元用於根據計算單元所計算出的等級自動調節輪廓光。 A computer system for adjusting contour light, the computer system comprising an image processing unit, a calculation unit, and a contour light adjustment unit. The image processing unit is configured to adjust the contour light of the image measuring machine to an initial level, and perform average filtering and binarization processing on the image of the area where the contour light needs to be adjusted. The calculation unit is configured to set a variable involved in the contour light adjustment process, and calculate a level of the best contour light corresponding to the image according to the variable. The contour light adjustment unit is configured to automatically adjust the contour light according to the level calculated by the calculation unit.

相較於習知技術,所述輪廓光調節方法及其電腦系統,透過分析輪廓光與工件影像的關係,計算出最佳輪廓光對應的等級,以自動調節輪廓光,提高影像測量的重複性與精度,減輕測量人員的勞動強度。 Compared with the prior art, the contour light adjustment method and the computer system thereof analyze the relationship between the contour light and the workpiece image to calculate the level corresponding to the optimal contour light, thereby automatically adjusting the contour light to improve the repeatability of the image measurement. With precision, it reduces the labor intensity of the measurement personnel.

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

2‧‧‧工件 2‧‧‧Workpiece

3‧‧‧電腦 3‧‧‧ computer

10‧‧‧光源調節器 10‧‧‧Light source regulator

12‧‧‧電荷耦合裝置 12‧‧‧Charge-coupled device

30‧‧‧輪廓光調節系統 30‧‧‧Contour light adjustment system

300‧‧‧影像處理單元 300‧‧‧Image Processing Unit

302‧‧‧計算單元 302‧‧‧Computation unit

304‧‧‧輪廓光調節單元 304‧‧‧Contour light adjustment unit

S1‧‧‧在工件的影像中選定需調節輪廓光的區域 S1‧‧‧Select the area where the contour light needs to be adjusted in the image of the workpiece

S3‧‧‧將輪廓光調到一個初始等級 S3‧‧‧ to adjust the outline light to an initial level

S5‧‧‧獲取所選定區域的影像並對其進行平均值過濾和二值化處理 S5‧‧‧ Obtain images of selected areas and average them and binarize them

S7‧‧‧設置輪廓光調節過程中所涉及到的變數 S7‧‧‧Set the variables involved in the contour light adjustment process

S9‧‧‧根據上述變數透過迭代逼近法計算出最佳輪廓光對應的等級 S9‧‧‧ Calculate the level corresponding to the best contour light by the iterative approximation method according to the above variables

S11‧‧‧根據上述計算出的等級自動進行輪廓光調節 S11‧‧‧Automatic contour light adjustment according to the calculated level

圖1係本發明輪廓光調節的電腦系統較佳實施例之運行環境圖。 BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a diagram showing the operating environment of a preferred embodiment of a computer system for contour light adjustment of the present invention.

圖2係本發明不同輪廓光下影像之灰度值變化曲線圖。 2 is a graph showing changes in gray value of images under different contours of the present invention.

圖3係本發明輪廓光調節的電腦系統之功能單元圖。 3 is a functional unit diagram of a computer system for contour light adjustment of the present invention.

圖4係本發明輪廓光調節方法較佳實施例之作業流程圖。 Fig. 4 is a flow chart showing the operation of the preferred embodiment of the contour light adjusting method of the present invention.

圖5係本發明利用迭代逼近法計算最佳輪廓光對應的等級之具體作業流程圖。 FIG. 5 is a specific operational flowchart of the present invention for calculating the level corresponding to the optimal contour light by using the iterative approximation method.

參閱圖1所示,係本發明輪廓光調節的電腦系統較佳實施例之運行環境圖。該運行環境圖包括影像量測機台1、被影像量測機台1量測的工件2及電腦3。所述影像量測機台1可以是型號為“VMS”系列的影像量測儀,其包括光源調節器10和電荷耦合裝置12。該電荷耦合裝置12用於對工件2進行成像,而光源調節器10用於調節所述成像時影像量測機台1所發出的輪廓光的亮度。電腦3內存儲一輪廓光調節系統30用於控制光源調節器10,以進行自動輪廓光調節。 Referring to Figure 1, there is shown an operational environment diagram of a preferred embodiment of a computer system for contour light adjustment of the present invention. The operating environment map includes an image measuring machine 1, a workpiece 2 measured by the image measuring machine 1, and a computer 3. The image measuring machine 1 may be an image measuring instrument of the "VMS" series, which includes a light source adjuster 10 and a charge coupled device 12. The charge coupled device 12 is used to image the workpiece 2, and the light source adjuster 10 is used to adjust the brightness of the contour light emitted by the image measuring machine 1 during the imaging. A contour light adjustment system 30 is stored in the computer 3 for controlling the light source adjuster 10 for automatic contour light adjustment.

在本實施例中,光源調節器10利用“0~100”個等級來調節輪廓光的強弱,根據工件2的顏色及工件2所放置的背景顏色,每個等級對應一輪廓光的亮度。也就是說,不同工件2或相同工件2放置在不同背景中,同一等級所示意的輪廓光的亮度可能會不同。 In the present embodiment, the light source adjuster 10 adjusts the intensity of the contour light by using "0~100" levels, and each level corresponds to the brightness of a contour light according to the color of the workpiece 2 and the background color placed on the workpiece 2. That is to say, different workpieces 2 or the same workpiece 2 are placed in different backgrounds, and the brightness of the contour light indicated by the same level may be different.

另外,本實施例中的亮度可利用影像的灰度值來示意。眾所週知,影像的灰度值範圍為0~255。當光源調節器10被調整到0等級時,工件2的影像必定為黑色,即影像的灰度值為0,輪廓光的亮度低;而當光源調節器10被調整到100等級時,工件2的影像為白色 ,即影像的灰度值為255,輪廓光的亮度高。如圖2所示,係本發明不同輪廓光下影像之灰度值變化曲線圖。 In addition, the brightness in this embodiment can be indicated by the gradation value of the image. As we all know, the gray value of the image ranges from 0 to 255. When the light source adjuster 10 is adjusted to the 0 level, the image of the workpiece 2 must be black, that is, the gray value of the image is 0, and the brightness of the contour light is low; and when the light source adjuster 10 is adjusted to the 100 level, the workpiece 2 Image is white That is, the gray value of the image is 255, and the brightness of the contour light is high. As shown in FIG. 2, it is a graph of gray value variation of images under different contour lights of the present invention.

參閱圖3所示,係本發明輪廓光調節系統30之功能單元圖。該輪廓光調節系統30為電腦程式,按照功能可劃分為影像處理單元300、計算單元302和輪廓光調節單元304,其功能可透過圖4所述之流程圖進行具體描述:如圖4所示,係本發明輪廓光調節方法較佳實施例之作業流程圖。 Referring to Figure 3, there is shown a functional unit diagram of the contoured light adjustment system 30 of the present invention. The contour light adjustment system 30 is a computer program, and can be divided into an image processing unit 300, a calculation unit 302, and a contour light adjustment unit 304 according to functions, and the functions thereof can be specifically described through the flowchart shown in FIG. 4: as shown in FIG. It is a flowchart of the operation of the preferred embodiment of the contour light adjusting method of the present invention.

步驟S1,電荷耦合裝置12對工件2進行成像,用戶在該工件2的影像中選定需調節工件2的輪廓光的區域,該區域通常為邊界區域。 In step S1, the charge coupled device 12 images the workpiece 2, and the user selects an area in the image of the workpiece 2 where the contour light of the workpiece 2 needs to be adjusted, which is usually a boundary region.

步驟S3,用戶透過手動調節光源調節器10,使得影像量測機台1的輪廓光被調整到一初始等級。在本實施例中,該初始等級不可能太低或太高,於該初始等級下的影像一定為用戶可識別的影像,例如,其不可能為“0等級”或“100等級”,本較佳實施例中的初始等級為“10等級”。 In step S3, the user adjusts the light source adjuster 10 manually so that the contour light of the image measuring machine 1 is adjusted to an initial level. In this embodiment, the initial level may not be too low or too high, and the image at the initial level must be a user-recognizable image, for example, it may not be “0 level” or “100 level”. The initial level in the preferred embodiment is "10 levels."

步驟S5,影像處理單元300獲取初始等級下所選定區域的影像,並對該影像進行平均值過濾和二值化處理,以減少或消除影像雜訊的影響,改善影像的品質,使得工件2的影像能夠感應輪廓光,也就是說,處理後的影像的灰度值可隨著輪廓光的強弱而改變。其中,所述二值化處理是指將一幅多個灰度級的影像轉化為只有兩個灰度級的影像,以便於特徵的突出以及圖形的識別,處理後的影像為黑白色,即灰度值為0和255。 In step S5, the image processing unit 300 acquires an image of the selected area under the initial level, and performs average filtering and binarization processing on the image to reduce or eliminate the influence of image noise, improve image quality, and make the workpiece 2 The image can sense the contour light, that is, the gray value of the processed image can change with the intensity of the contour light. The binarization process refers to converting a plurality of grayscale images into images having only two gray levels, so as to facilitate feature highlighting and graphic recognition, and the processed image is black and white, that is, Gray values are 0 and 255.

步驟S7,計算單元302設置輪廓光調節過程中所涉及到的變數,該變數包括最佳輪廓光對應的等級Vp的上臨近等級Vm、下臨近等級Vn及當前等級Vc。 In step S7, the calculation unit 302 sets a variable involved in the contour light adjustment process, which includes the upper adjacent level Vm, the lower adjacent level Vn, and the current level Vc of the level Vp corresponding to the optimum contour light.

步驟S9,計算單元302根據上述變數利用迭代逼近法計算出所述處理後的影像的最佳輪廓光所對應的等級Vp。 In step S9, the calculating unit 302 calculates the level Vp corresponding to the optimal contour light of the processed image by using the iterative approximation method according to the above variable.

步驟S11,輪廓光調節單元304根據計算單元302所計算出的等級Vp自動調節輪廓光。 In step S11, the contour light adjustment unit 304 automatically adjusts the contour light according to the level Vp calculated by the calculation unit 302.

參閱圖5,係步驟S9中利用迭代逼近法計算等級Vp之具體作業流程圖。 Referring to Fig. 5, a specific operation flow chart for calculating the level Vp by the iterative approximation method in step S9 is shown.

步驟S900,計算單元302初始化輪廓光調節過程中所涉及到的各變數,即計算單元302設置所述上臨近等級Vm=100,下臨近等級Vn=1。 In step S900, the calculation unit 302 initializes the variables involved in the contour light adjustment process, that is, the calculation unit 302 sets the upper adjacent level Vm=100, and the lower adjacent level Vn=1.

步驟S902,將輪廓光的當前等級Vc調節至Vc=(Vm+Vn)/2,獲取該當前等級Vc下的影像,並計算影像的灰度值Gc。具體而言,計算單元302獲取影像中每個圖元的灰度,將所有圖元的灰度相加,然後除以圖元的總個數所得到的值就是影像的灰度值Gc。在影像的數位化處理過程中,影像資料是未壓縮的,其透過連續的記憶體區域進行保存,通常,影像中每個圖元的灰度值可透過指針進行存取,例如,若寬為W,高為H的8位元灰度影像的影像資料的第一個圖元位址為pixel,則第(i,j)個圖元的灰度值可以透過“pixel[j*W+i]”或“*(pixel+j*W+i)”進行讀取。 In step S902, the current level Vc of the contour light is adjusted to Vc=(Vm+Vn)/2, the image at the current level Vc is acquired, and the gray value Gc of the image is calculated. Specifically, the calculation unit 302 acquires the gradation of each primitive in the image, adds the gradations of all the primitives, and then divides the total number of primitives to obtain the grayscale value Gc of the image. During the digitization process of the image, the image data is uncompressed, and is saved through a continuous memory area. Generally, the gray value of each primitive in the image can be accessed through the pointer, for example, if the width is W, the first primitive address of the image data of the 8-bit grayscale image with height H is pixel, and the gray value of the (i, j)th primitive can be transmitted through "pixel[j*W+i ]" or "*(pixel+j*W+i)" for reading.

步驟S904,判斷灰度值Gc是否小於所述最佳輪廓光下影像的灰度值Gp。該灰度值Gp可取0~255的中間值。在本較佳實施例中,Gp 取125。 In step S904, it is determined whether the gradation value Gc is smaller than the gradation value Gp of the image under the optimal contour light. The gray value Gp can take an intermediate value of 0 to 255. In the preferred embodiment, Gp Take 125.

若Gc=Gp,則直接進入步驟S912;若Gc<Gp,於步驟S906,計算單元302則以當前等級Vc為下臨近等級,即使得Vn=Vc,然後進入步驟S910。 If Gc=Gp, go directly to step S912; if Gc<Gp, in step S906, the calculation unit 302 takes the current level Vc as the next adjacent level, that is, makes Vn=Vc, and then proceeds to step S910.

反之,若Gc>Gp,於步驟S908,計算單元302則以當前等級Vc為上臨近等級,即使得Vm=Vc,然後進入步驟S910。 On the other hand, if Gc>Gp, in step S908, the calculation unit 302 takes the current level Vc as the upper adjacent level, that is, makes Vm=Vc, and then proceeds to step S910.

步驟S910,計算單元302比較當前的上臨近等級Vm與當前的下臨近等級Vn之差(Vm-Vn)是否小於一個最佳預定值V0。本較佳實施例中,該最佳預定值V0等於2。 In step S910, the calculating unit 302 compares whether the difference (Vm-Vn) between the current upper adjacent level Vm and the current lower adjacent level Vn is less than a best predetermined value V0. In the preferred embodiment, the optimal predetermined value V0 is equal to two.

若(Vm-Vn)<V0,則於步驟S912,表明上述計算與調節後的等級為最佳輪廓光所對應的等級Vp。 If (Vm - Vn) < V0, then in step S912, it is indicated that the above-mentioned calculation and the adjusted level are the level Vp corresponding to the optimum contour light.

反之,若Vm-Vn>=V0,則返回步驟S902,以當前的上臨近等級Vm與當前的下臨近等級Vn為計算條件調用迭代逼近公式Vc=(Vm+Vn)/2重新進行計算與調節。例如,若步驟S902中計算出的灰度值為Gc1,則計算單元302還需透過當前的上臨近等級Vm與當前的下臨近等級Vn計算出Vc2,然後獲取等級為Vc2的影像的灰度值Gc2,如圖2所示,重複執行步驟S904至步驟S912,直到計算與調節出最佳輪廓光所對應的等級Vp為止。 On the other hand, if Vm-Vn>=V0, the process returns to step S902, and the current upper adjacent level Vm and the current lower adjacent level Vn are used as calculation conditions to call the iterative approximation formula Vc=(Vm+Vn)/2 to perform calculation and adjustment again. . For example, if the gradation value calculated in step S902 is Gc1, the calculation unit 302 further calculates Vc2 from the current upper neighboring level Vm and the current lower neighboring level Vn, and then acquires the gradation value of the image of the level Vc2. Gc2, as shown in FIG. 2, step S904 to step S912 are repeatedly executed until the level Vp corresponding to the adjustment of the optimum contour light is calculated.

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

S1‧‧‧在工件的影像中選定需調節輪廓光的區域 S1‧‧‧Select the area where the contour light needs to be adjusted in the image of the workpiece

S3‧‧‧將輪廓光調到一個初始等級 S3‧‧‧ to adjust the outline light to an initial level

S5‧‧‧獲取所選定區域的影像並對其進行平均值過濾和二值化處理 S5‧‧‧ Obtain images of selected areas and average them and binarize them

S7‧‧‧設置輪廓光調節過程中所涉及到的變數 S7‧‧‧Set the variables involved in the contour light adjustment process

S9‧‧‧根據上述變數透過迭代逼近法計算出最佳輪廓光對應的等級 S9‧‧‧ Calculate the level corresponding to the best contour light by the iterative approximation method according to the above variables

S11‧‧‧根據上述計算出的等級自動進行輪廓光調節 S11‧‧‧Automatic contour light adjustment according to the calculated level

Claims (9)

一種輪廓光調節方法,該方法包括:將輪廓光調節到一個初始等級;獲取該初始等級下需調節輪廓光的區域的影像,並對該影像進行平均值過濾和二值化處理;設置輪廓光調節過程中所涉及到的變數,該變數包括最佳輪廓光對應的等級Vp的上臨近等級Vm、下臨近等級Vn及當前等級Vc;根據上述變數計算所述影像的最佳輪廓光對應的等級,包括步驟:(a)初始化各變數,該變數包括最佳輪廓光對應的等級的上臨近等級Vm和下臨近等級Vn,即使得該上臨近等級Vm=100,下臨近等級Vn=1;(b)將輪廓光的等級調節至Vc=(Vm+Vn)/2;(c)獲取該等級Vc下的影像及該影像的灰度值Gc;(d)判斷該灰度值Gc是否小於所述最佳輪廓光下的影像的灰度值Gp;(e)若Gc<Gp,則以所述等級Vc為下臨近等級,即使得Vn=Vc,若Gc>Gp,則以所述等級Vc為上臨近等級,即使得Vm=Vc;(f)比較當前的上臨近等級Vm與下臨近等級Vn之差(Vm-Vn)是否小於一個最佳預定值V0;及(g)若Vm-Vn<V0,則表明上述計算與調節後的等級為最佳輪廓光所對應的等級;及(h)若Vm-Vn>=V0,則返回步驟(b);及根據所計算出的等級自動調節輪廓光。 A contour light adjustment method, the method comprising: adjusting contour light to an initial level; acquiring an image of an area of the initial level where the contour light needs to be adjusted, and performing average filtering and binarization processing on the image; setting the contour light a variable involved in the adjustment process, the variable includes an upper adjacent level Vm of the level Vp corresponding to the best contour light, a lower adjacent level Vn, and a current level Vc; and a level corresponding to the optimal contour light of the image is calculated according to the above variable The method includes the steps of: (a) initializing each variable, the variable including the upper adjacent level Vm of the level corresponding to the best contour light and the lower adjacent level Vn, that is, the upper adjacent level Vm=100, and the next adjacent level Vn=1; b) adjusting the level of the contour light to Vc=(Vm+Vn)/2; (c) acquiring the image at the level Vc and the gray value Gc of the image; (d) determining whether the gray value Gc is smaller than The gray value Gp of the image under the optimal contour light; (e) if Gc < Gp, the level Vc is the next adjacent level, that is, Vn=Vc, and if Gc>Gp, the level Vc For the adjacent level, that is, make Vm=Vc; (f) compare the current upper adjacent level Vm Whether the difference (Vm-Vn) of the next adjacent level Vn is less than a best predetermined value V0; and (g) if Vm-Vn < V0, it indicates that the above calculation is the level corresponding to the adjusted level of the optimum contour light; And (h) if Vm-Vn>=V0, return to step (b); and automatically adjust the contour light according to the calculated level. 如申請專利範圍第1項所述之輪廓光調節方法,其中所述最佳輪廓光下影像的灰度值Gp可取0~255的中間值。 The contour light adjustment method according to claim 1, wherein the gray value Gp of the image under the optimal contour light can take an intermediate value of 0 to 255. 如申請專利範圍第2項所述之輪廓光調節方法,其中所述輪廓光的等級包括0~100個等級,其中,所述初始等級介於0~100個等級之間。 The contour light adjustment method of claim 2, wherein the level of the contour light comprises 0 to 100 levels, wherein the initial level is between 0 and 100 levels. 如申請專利範圍第1項所述之輪廓光調節方法,其中所述步驟(d)還包括步驟:若Gc=Gp,則表明上述計算與調節後的等級為最佳輪廓光所對應的等級。 The contour light adjustment method according to claim 1, wherein the step (d) further comprises the step of: if Gc=Gp, indicating that the calculated level is the level corresponding to the optimal contour light. 如申請專利範圍第1項所述之輪廓光調節方法,其中所述最佳預定值等於2。 The contour light adjustment method of claim 1, wherein the optimal predetermined value is equal to two. 一種輪廓光調節的電腦系統,該電腦系統包括:影像處理單元,用於將影像量測機台的輪廓光調節到一初始等級,並對需調節輪廓光的區域的影像進行平均值過濾和二值化處理;計算單元,用於設置輪廓光調節過程中所涉及到的變數,該變數包括最佳輪廓光對應的等級Vp的上臨近等級Vm、下臨近等級Vn及當前等級Vc,並根據所述變數計算出所述影像對應的最佳輪廓光的等級,包括:(a)初始化各變數,該變數包括最佳輪廓光對應的等級的上臨近等級Vm和下臨近等級Vn,即使得該上臨近等級Vm=100,下臨近等級Vn=1;(b)將輪廓光的等級調節至Vc=(Vm+Vn)/2;(c)獲取該等級Vc下的影像及該影像的灰度值Gc;(d)判斷該灰度值Gc是否小於所述最佳輪廓光下的影像的灰度值Gp;(e)若Gc<Gp,則以所述等級Vc為下臨近等級,即使得Vn=Vc,若Gc>Gp,則以所述等級Vc為上臨近等級,即使得Vm=Vc;(f)比較當前的上臨近等級Vm與下臨近等級Vn之差(Vm-Vn)是否小於一個最佳預定值V0;及(g)若Vm-Vn<V0,則表明上述計算與調節後的等級為最佳輪廓光所對應的等級;及(h)若Vm-Vn>=V0,則返回步驟(b);及輪廓光調節單元,用於根據計算單元所計算出的等級自動調節輪廓光。 A computer system for contour light adjustment, the computer system comprising: an image processing unit for adjusting the contour light of the image measuring machine to an initial level, and filtering the image of the area where the contour light needs to be adjusted and a calculation unit for setting a variable involved in the contour light adjustment process, the variable includes an upper adjacent level Vm of the level Vp corresponding to the optimal contour light, a lower adjacent level Vn, and a current level Vc, and Calculating the level of the best contour light corresponding to the image, comprising: (a) initializing each variable, the variable including the upper adjacent level Vm and the lower adjacent level Vn of the level corresponding to the best contour light, that is, the upper The adjacent level Vm=100, the next adjacent level Vn=1; (b) the level of the contour light is adjusted to Vc=(Vm+Vn)/2; (c) the image at the level Vc and the gray value of the image are obtained. Gc; (d) determining whether the gray value Gc is smaller than the gray value Gp of the image under the optimal contour light; (e) if Gc < Gp, then the level Vc is the next adjacent level, that is, making Vn =Vc, if Gc>Gp, then the level Vc is the upper adjacent level, that is, Vm=Vc; (f) comparing whether the difference between the current upper adjacent level Vm and the lower adjacent level Vn (Vm-Vn) is less than a best predetermined value V0; and (g) if Vm-Vn<V0, indicating the above calculation And the adjusted level is the level corresponding to the best contour light; and (h) if Vm-Vn>=V0, returning to step (b); and the contour light adjusting unit for calculating the level according to the calculating unit The contour light is automatically adjusted. 如申請專利範圍第6項所述之電腦系統,其中所述最佳輪廓光下影像的灰 度值可取0~255的中間值,所述輪廓光的等級包括0~100個等級,其中,所述初始等級介於0~100個等級之間。 The computer system according to claim 6, wherein the ash of the best contour light image is The degree value may take an intermediate value of 0 to 255, and the level of the contour light includes 0 to 100 levels, wherein the initial level is between 0 and 100 levels. 如申請專利範圍第6項所述之電腦系統,其中所述變數包括最佳輪廓光對應的等級的上臨近等級Vm和下臨近等級Vn。 The computer system of claim 6, wherein the variable comprises an upper adjacent level Vm and a lower adjacent level Vn of a level corresponding to the best contour light. 如申請專利範圍第8項所述之電腦系統,其中所述計算單元利用迭代逼近法計算最佳輪廓光的等級,該迭代逼近法的計算公式為Vc=(Vm+Vn)/2,其中,Vc指當前輪廓光的等級。 The computer system according to claim 8, wherein the calculating unit calculates the level of the best contour light by using an iterative approximation method, and the calculation formula of the iterative approximation method is Vc=(Vm+Vn)/2, wherein Vc refers to the level of the current contour light.
TW97125416A 2008-07-04 2008-07-04 Computer system and method for adjusting profile light TWI427262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW97125416A TWI427262B (en) 2008-07-04 2008-07-04 Computer system and method for adjusting profile light

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW97125416A TWI427262B (en) 2008-07-04 2008-07-04 Computer system and method for adjusting profile light

Publications (2)

Publication Number Publication Date
TW201003032A TW201003032A (en) 2010-01-16
TWI427262B true TWI427262B (en) 2014-02-21

Family

ID=44825386

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97125416A TWI427262B (en) 2008-07-04 2008-07-04 Computer system and method for adjusting profile light

Country Status (1)

Country Link
TW (1) TWI427262B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI648123B (en) * 2017-02-16 2019-01-21 台本機械有限公司 Detection system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5631976A (en) * 1994-04-29 1997-05-20 International Business Machines Corporation Object imaging system
US6542180B1 (en) * 2000-01-07 2003-04-01 Mitutoyo Corporation Systems and methods for adjusting lighting of a part based on a plurality of selected regions of an image of the part
US6627863B2 (en) * 2000-12-15 2003-09-30 Mitutoyo Corporation System and methods to determine the settings of multiple light sources in a vision system
CN101188889A (en) * 2007-10-23 2008-05-28 柏高权 Profile mark controller device
TW200825367A (en) * 2006-12-08 2008-06-16 Hon Hai Prec Ind Co Ltd System and method for image measuring

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5631976A (en) * 1994-04-29 1997-05-20 International Business Machines Corporation Object imaging system
US6542180B1 (en) * 2000-01-07 2003-04-01 Mitutoyo Corporation Systems and methods for adjusting lighting of a part based on a plurality of selected regions of an image of the part
US6627863B2 (en) * 2000-12-15 2003-09-30 Mitutoyo Corporation System and methods to determine the settings of multiple light sources in a vision system
TW200825367A (en) * 2006-12-08 2008-06-16 Hon Hai Prec Ind Co Ltd System and method for image measuring
CN101188889A (en) * 2007-10-23 2008-05-28 柏高权 Profile mark controller device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI648123B (en) * 2017-02-16 2019-01-21 台本機械有限公司 Detection system

Also Published As

Publication number Publication date
TW201003032A (en) 2010-01-16

Similar Documents

Publication Publication Date Title
EP2438554B1 (en) Calibration of imaging device for biological/chemical samples
JP2002533665A (en) Method and apparatus for determining the appearance of an object
US20060232682A1 (en) Image processing system, image processing method, image processing program, image capturing apparatus, and image capturing method
CN111179362A (en) Test paper color uniformity detection method based on dynamic illumination correction algorithm
TW200805198A (en) Measuring method and measuring device using color image
CN101610623B (en) Contour light adjusting method and computer system thereof
TWI427262B (en) Computer system and method for adjusting profile light
CN107635124B (en) White balancing treatment method, device and the equipment of face shooting
CN101726247B (en) Light irradiation regulating method and computer system thereof
JP6969164B2 (en) Evaluation device, evaluation program and evaluation method
JP2001503892A (en) Method for quantifying the visual homogeneity of planar objects
JP3305576B2 (en) Image quality measurement method
JP2018004509A (en) Colorimetric system and inspection device
CN106646677B (en) Rainfall detection method and device
EP4220570A1 (en) Three-dimensional modeling method and apparatus using same
TWI427271B (en) Computer system and method for adjusting lights
MXPA05002673A (en) Method of adjusting gray scale response to more closely correlate scanner based image analysis systems.
JP2022049874A (en) Inspection device, inspection method, and inspection program
JP2020153759A (en) Evaluation device, genuine feeling evaluation method, and program
KR101841528B1 (en) A method for controlling a mixed color light source for improving quality of wide images
US20230334780A1 (en) Three-dimensional modeling method and apparatus using same
JPH10269352A (en) Image processor and method
KR101767174B1 (en) The pattern search method in controlling a mixed color light source for improving quality of wide images
JP7262800B2 (en) 3D image generation system, 3D image generation method, 3D image generation program, and recording medium
KR102049172B1 (en) Adaptive method for a light source

Legal Events

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