201017101 六、發明說明: 【發明所屬之技術領域】 特別是指一種得 本發明是有關於一種影像擷取方法, 到預定影像亮度與均勻度的影像擷取方法。 【先前技術】 進行待測物影像檢測都必須取得特徵明顯的待測物影 像,才能破保進行檢測或量測是否正確,·而取得特徵明顯 ㈣測物影像,最重要的關鍵在於,如何對待測物施予均 參 自且具有預定光輸出強度的照光,從而得到所需影像亮度 的待測物影像。 以實際積體電路封裝體(IC Package)的標籤 (_king)制為例,是對制的㈣電路封裝㈣取有 標籤部分的影像,再將之與預設的基礎影像作比對,進而 判斷待測的積體電路封裝體標籤是否符合出貨標準;而為 了取得特徵明顯的標籤部分影像,會自龍電路封裝體的 四周施于彼此相對稱且輸出強度均一的側向照光,使積體 罾 1路封裝體的標籤清晰可見’不因某-方向的侧向照光過 強,而導致陰影出現,或是出現漸層式的亮度分布的狀 況’接著,將擷取到的標籤部分影像與基礎影像作比對, 判定待測積體電路封裝體標籤的外觀是否符合品管檢驗標 準。 目前’進行影像檢測時採用的照光方式有同轴光源、 背光源、側向光源、環形光源,或組合(同軸與環型)光 源等等,但無論何種照光方式,都是在進行影像檢測前, 201017101 由檢測員自身目視,配合影像擷取裝置,例如攝影機、電 荷耦合攝像裝置(CCD)得到影像品質,人工地調整光源輸 出光強度’以得到具有所需之影像亮度、照光均勻度的待 測物影像。 這樣的方式,缺點是欠缺實施基準,也就是說,不同 的人有不同的視覺感受,所以調整後的光源輸出光強度、 照光至待測物上的亮度、均勻度等等也都會有所差異進 而導致檢測結果或標準有所變化。 另外,由於人的視覺敏銳度會因為隨著工作時間產生 _ 的疲勞而變化,所以在長時間、大量待測物的檢測過程 中,當光源、置放待測物的工作台等等因為長時間機台微 幅震動的累積,而產生例如光源角度變化、工作台傾斜造 成照光均勻度不均一的改變時,檢測員並無法即時察知而 進行調整,而影響到整批檢測的結果。 影像檢測是品管相當重要的環節,而影像檢測的最重 要關鍵則在於如何對待測物施予均句且且古 J 丹有預疋光輸出強 度的照光,從而得到所需影像亮度的待測物影像,所以,_ 設計、建立-套可以穩定得到清晰之待測物影像的影像擷 取方法,是業界、學界努力的方向。 【發明内容】 因此,本發明之目的, 明亮度的影像擷取方法,而 動調節光源輸出光強度與均 像。 即在提供_種自動調節所需昭 可以依據所需的影像亮度,自 勻度以得到清晰的待測物影 4 201017101 於是,本發明自動調節所需照明亮度的影像擷取方 法,包含一系統架設步驟、一參考影像擷取步驟、一光源 照射模型建立步驟、一光源輸出光強度得到步驟、一光源 亮度調節步驟,及一預定亮度影像得到步驟。 該系統架設步驟將至少二可改變輸出光強度的光源與 一影像擷取器對應於一工作台設置,並將該等光源與一可 分別調節該等光源之輸出光強度的多通道光源控制器相電 連接後’將該多通道光源控制器、該影像擷取器與一可進 ❹ 行影像運算的運算控制器電連接。 該參考影像擷取步驟令該等光源分別以任一輸出光強 度照射置於該工作台上的待測物’並以該影像操取器操取 在該等光源照射下之待測物的影像。 該光源照射模型建立步驟於該運算控制器中定義該參 考影像擷取擷取步驟中取得之影像具有複數個區域,並建 立擷取影像時該等光源之輸出光強度對應該複數區域影像 亮度的矩陣與轉換矩陣關係。 ® 該光源輸出光強度得到步驟以該運算控制器對該光源 照射模型建立步驟中建立的矩陣與轉換矩陣關係進行矩陣 運算,得到欲擷取一具有預定影像亮度之待測物影像時所 對應之每一光源的光輸出強度。 該光源免度調即步驟將該運算控制器運算得到之光輪 出強度輸出至該多通道光源控制器,令該多通道光源控制 器依該等光輸出強度值調節該每一光源輸出光強度。 該預定亮度影像得到步驟在每一光源依該多通道光源 201017101 控制器調節的光輸出強度輪出光後,以該影像擁取器擷取 置於該工作台上的待測物影像,得到具有預定影像亮度的 待測物影像。本發明之功效在於:利用矩陣運算自各光源 以任意輸出光強度照射時得到的待測物影像,計算出欲擷 取具有預定影像亮度時之待測物影像時,所需之各光源的 光輸出強度,,然後再輸出此等光輸出強度值自動調節每一 光源的輸出光強度’即可得到具有預定影像亮度的待測物 影像。 【實施方式】 ^ 有關本發明之前述及其他技術内容、特點與功效,在 以下配合參考圖式之二個較佳實施例的詳細說明中,將可 清楚的呈現。 參閲圖1,本發明自動調節所需照明亮度的影像擷取方 法的一第一較佳實施例,包含一系統架設步驟丨丨、一參考 影像擷取步驟12、一光源照射模型建立步驟13、一光源輸 出光強度得到步驟14、一光源亮度調節步驟15’及一預定 亮度影像得到步驟16’而可自動調節光源輸出光強度,得 _ 到具有預定影像亮度的清晰待測物影像,進而供影像檢測 應用。 配合參閱圖2、圖3’首先是進行該系統架設步驟11, 將二可改變輸出光強度的光源21與一影像擷取器22對應 於一工作台23設置,並將該二光源21與可分別調節該等 光源21之輸出光強度的多通道光源控制器24相電連接 後’將該多通道光源控制器24、該影像摘取器22與可進行 6 201017101 影像運算的運算控制器25電連接;在本例與圖示中該二 光源21彼此對應該工作台23中心成對稱分布該影像擷 取器22是電荷耦合攝像裝置(CCD),可敏銳地依照光強度 擷取待測物的數位影像,以供後續應用,該運算控制器25 是嵌入式控制單板或個人電腦,可根據該影像擷取器22所 擷取的數位影像進行運算,並依運算結果輸出訊號至該多 通道光源控制器24,於本實施例中,該運算控制器25為個 人電腦,該多通道光源控制器24根據該運算控制器25輸 • 出的訊號輸出複數電源訊號給該等光源21,以分別控制該 等光源21的光輸出強度,於本實施例中,該多通道光源控 制器24至少可分別控制二光源21的光輸出強度,但不以 此為限。 接著進行該參考影像擷取步驟12,令該二光源21分別 以任一輸出光強度Ll、L2照射置於該工作台23上的待測物 200,並以該影像擷取器22擷取在該等光源21照射下之待 測物200的影像。 ί 然後以該光源照射模型建立步驟13於該運算控制器25 中定義該參考影像擷取擷取步驟12中取得之影像具有兩個 區域’且—區域的影像錢,並建立擷取影像時該等 光源21之輸出光強度對應該複數區域之影像亮度丨丨^的 矩陣與轉換矩陣關係=M(Ll、L2),M是矩陣 (Ιι、Ι2)與(Ι^、Ι^2)的轉換矩陣。 再進行該光源輸出光強度得到步驟14,以該運算控制 器25對該光源照射模型建立步驟13中建立的矩陣與轉換 201017101 矩陣關係進行矩陣運算(Ιι、ΐ2) =m(Li、L2),與⑴、 2) (MM) Μ (1丨、12),得到欲擷取具有預定影像亮 度時之待測物200影像時,所對應之每一光源2i的光輸出 強度。 在此以具鳢數子為例,更細加說明本例之該參考影像 梅取步驟12、該光源照射模型建立步驟13與該光源亮度調 節步驟14的實際過程。 配合參閱圖3’在本例令,光源數目& 2,影像區域數 目也是2,在該參考影像擷取步驟令該二光源21分別以相參 同輸出光強度(假設為〇照射待測物2〇〇,擷取到的影像 .亮度11、12不同,分別假設為0.8、1.〇。 由(Ii、I2) =M ( L,、L2)201017101 VI. Description of the invention: [Technical field to which the invention pertains] In particular, the invention relates to an image capture method for image capture from a predetermined image brightness and uniformity. [Prior Art] In the image detection of the object to be tested, it is necessary to obtain an image of the object to be tested with obvious characteristics, in order to ensure that the detection or measurement is correct, and to obtain the characteristic (4) object image, the most important key is how to treat The test object is applied to and has illumination of a predetermined light output intensity, thereby obtaining an image of the object to be tested of the desired image brightness. Taking the label of the actual IC package (_king) as an example, the image of the label portion is obtained for the (4) circuit package (4), and then compared with the preset base image, and then judged. Whether the integrated circuit package label to be tested meets the shipping standard; and in order to obtain the characteristic image of the label portion, lateral illumination of each other is symmetrical to each other and the output intensity is uniform from the circumference of the dragon circuit package, so that the integrated body is integrated. The label of the 罾1 package is clearly visible 'not because the lateral illumination of a certain direction is too strong, resulting in a shadow, or a gradual brightness distribution.' Then, the image of the captured portion of the label is The basic image is compared to determine whether the appearance of the package of the integrated circuit package to be tested conforms to the quality inspection standard. At present, the illumination methods used for image detection include coaxial light source, backlight, side light source, ring light source, or combined (coaxial and ring type) light source, etc., but no matter what kind of illumination method, image detection is performed. Before, 201017101 visual inspection by the inspector himself, with image capturing device, such as camera, charge coupled camera (CCD) to obtain image quality, manually adjust the light source output light intensity 'to obtain the desired image brightness, illumination uniformity Image of the object to be tested. In this way, the disadvantage is that there is no implementation benchmark, that is, different people have different visual perceptions, so the adjusted light source output light intensity, illumination to the object to be tested, brightness, uniformity, etc. will also be different. This in turn leads to changes in test results or standards. In addition, since the human visual acuity changes due to the fatigue caused by the working time, in the detection process of a long time and a large amount of the object to be tested, the light source, the work table on which the object to be tested is placed, and the like are long. When the time machine's micro-vibration is accumulated, and the change of the angle of the light source, such as the change of the angle of the light source, and the unevenness of the uniformity of the illumination caused by the tilt of the table, the inspector can not adjust it in time, which affects the result of the whole batch of detection. Image detection is a very important part of quality control, and the most important key to image detection is how to treat the test object with a uniform sentence and the ancient J Dan has the light intensity of the pre-dawn light output, so as to obtain the desired image brightness to be tested. Object image, therefore, _ design, build-set can stabilize the image acquisition method of the image of the object to be tested, is the direction of industry and academic efforts. SUMMARY OF THE INVENTION Therefore, for the purpose of the present invention, a brightness image capturing method is used to dynamically adjust the light source output light intensity and uniformity. That is, in the provision of _ kinds of automatic adjustment required according to the required image brightness, self-leveling to obtain a clear object shadow 4 201017101 Thus, the present invention automatically adjusts the required illumination brightness of the image capture method, including a system The erecting step, a reference image capturing step, a light source illumination model establishing step, a light source output light intensity obtaining step, a light source brightness adjusting step, and a predetermined brightness image obtaining step. The system erecting step corresponds to at least two light sources that can change the output light intensity and an image picker corresponding to a table setting, and the light sources and a multi-channel light source controller that can respectively adjust the output light intensity of the light sources After the phase is electrically connected, the multi-channel light source controller and the image extractor are electrically connected to an arithmetic controller capable of performing image calculation. The reference image capturing step causes the light sources to respectively illuminate the object to be tested placed on the table with any output light intensity, and use the image operator to take an image of the object to be tested under the light source . The light source illumination model establishing step defines the reference image in the operation controller, and the image obtained in the capturing step has a plurality of regions, and establishes an output light intensity of the light source corresponding to the brightness of the plurality of regions when capturing the image. The relationship between the matrix and the transformation matrix. The light source output light intensity obtaining step is performed by the operation controller, and the matrix and the conversion matrix relationship established in the light source illumination model establishing step are matrix-operated, and the image corresponding to the object to be tested having the predetermined image brightness is obtained. The light output intensity of each light source. The light source is freely adjusted, that is, the light intensity obtained by the operation controller is output to the multi-channel light source controller, so that the multi-channel light source controller adjusts the output light intensity of each light source according to the light output intensity values. The predetermined brightness image obtaining step is: after each light source emits light according to the light output intensity wheel adjusted by the multi-channel light source 201017101 controller, the image grabber captures the image of the object to be tested placed on the worktable, and obtains a predetermined image. Image of the object to be tested for image brightness. The effect of the invention is that the light output of each light source required for the image of the object to be tested when a predetermined image brightness is to be captured is calculated by using a matrix operation to obtain an image of the object to be tested when the light source is irradiated with an arbitrary output light intensity. The intensity, and then outputting the light output intensity values automatically adjusts the output light intensity of each light source to obtain an image of the object to be tested having a predetermined image brightness. The above and other technical contents, features and effects of the present invention will be apparent from the following detailed description of the preferred embodiments of the drawings. Referring to FIG. 1 , a first preferred embodiment of the image capturing method for automatically adjusting the required illumination brightness of the present invention includes a system erection step 丨丨, a reference image capturing step 12 , and a light source illumination model establishing step 13 . a light source output light intensity obtaining step 14, a light source brightness adjusting step 15' and a predetermined brightness image obtaining step 16', the light source output light intensity can be automatically adjusted to obtain a clear image of the object to be tested having a predetermined image brightness, and further For image detection applications. Referring to FIG. 2 and FIG. 3', the system erecting step 11 is first performed, and the light source 21 and the image capturing device 22, which can change the output light intensity, are disposed corresponding to a working table 23, and the two light sources 21 are After the multi-channel light source controller 24 for adjusting the output light intensity of the light sources 21 is electrically connected, the multi-channel light source controller 24, the image extractor 22 and the arithmetic controller 25 capable of performing 6 201017101 image operations are electrically In the present example and the illustration, the two light sources 21 are symmetrically distributed with each other corresponding to the center of the table 23. The image picker 22 is a charge coupled imaging device (CCD), which can sharply extract the object to be tested according to the light intensity. The digital image is used for subsequent applications. The computing controller 25 is an embedded control board or a personal computer, and can perform operations according to the digital image captured by the image capturing device 22, and output signals to the multi-channel according to the operation result. The light source controller 24, in the embodiment, the computing controller 25 is a personal computer, and the multi-channel light source controller 24 outputs a plurality of power signals to the light according to the signals output by the computing controller 25. The source 21 is used to control the light output intensity of the light sources 21, respectively. In the embodiment, the multi-channel light source controller 24 can control the light output intensity of the two light sources 21 at least, but is not limited thereto. Then, the reference image capturing step 12 is performed, so that the two light sources 21 respectively illuminate the object to be tested 200 placed on the table 23 with any output light intensity L1, L2, and are captured by the image capturing device 22 The light sources 21 illuminate an image of the object 200 under test. And then illuminating the model with the light source establishing step 13 in the computing controller 25 to define the image captured in the reference image capturing step 12 having two regions 'and the image money of the region, and establishing the captured image The output light intensity of the equal light source 21 corresponds to the image brightness of the complex region 丨丨^ matrix and the transformation matrix relationship = M (Ll, L2), M is the transformation of the matrix (Ιι, Ι 2) and (Ι^, Ι^2) matrix. The light source output light intensity is further obtained in step 14. The arithmetic controller 25 performs a matrix operation (Ιι, ΐ2) = m (Li, L2) on the matrix established in the light source illumination model establishing step 13 and the conversion 201017101 matrix relationship. And (1), 2) (MM) Μ (1丨, 12), the light output intensity of each light source 2i corresponding to when the image of the object to be tested 200 with a predetermined image brightness is obtained. Here, taking the number of turns as an example, the actual process of the reference image capturing step 12 of the present example, the light source illumination model establishing step 13 and the light source brightness adjusting step 14 will be more elaborated. Referring to FIG. 3 'in this example, the number of light sources & 2, the number of image areas is also 2, in the reference image capturing step, the two light sources 21 respectively output light intensity with the same reference (assuming that the object is irradiated 2〇〇, captured image. Brightness 11 and 12 are different, respectively assumed to be 0.8, 1. 〇. By (Ii, I2) = M ( L, L2)
ί-- 1 2 z ri- rMMUML I Ϊ 12rM 1121 Λ/Μ - - = ^ r /1 /2 I_I 可調控光源21分別成開(亦即Ll=1或是L2=l),或關 (亦即Ll — 〇或是L2=0)兩種狀態,代入化簡後得到 I.^MnxL! 〇3 = Μπ χ ! _(1) I2=M22xL2 0.8 =Μ22 XI __(2) l2==M2lXLi — 〇.2 = Μ21 χ 1 〜⑺--- 1 2 z ri- rMMUML I Ϊ 12rM 1121 Λ/Μ - - = ^ r /1 /2 I_I The controllable light source 21 is turned on separately (ie Ll=1 or L2=l), or off (also That is, Ll - 〇 or L2 = 0), after substituting into simplification, I.^MnxL! 〇3 = Μπ χ ! _(1) I2=M22xL2 0.8 =Μ22 XI __(2) l2==M2lXLi — 〇.2 = Μ21 χ 1 ~(7)
Il==Ml2xLi 〇.5=Μ12 χ 1 -(4) #⑴⑺⑺(4)式,得到 Μ = 0,3 05 L〇-2 0.8 計算出反矩陣 8 (5) 201017101 M-1 = [5.7143 -3.5714' [-1.4286 2.1429 因為理想上擷取之影像每一區塊的影像亮度“、込都相等, 才是亮度均一的待測物200影像,所以令Ii=1、l2=1代 入,當然,此時若要得到每一區塊影像亮度不等、或是亮 度更高的影像,只須代入不同亮度值進行後續計算即可。 即可解得 Ll= 2.1429 L2= 0.7143 參 亦即,當該參考影像擷取步驟12中,該二光源21以 相同輸出光強度照射待測物200,所擷取的影像亮度並不相 同時,經過該光源照射模型建立步驟13與該光源輸出光強 度得到步驟計算後,可以得到該兩光源21分別以2 1429與 0.7143的輸出光強度照射置於該工作台23上的待測物2⑼ 後,可以該影像擷取器22擷取到亮度均一的待測物2〇〇影 像。 • 計算得到每一光源21應輸出之光強度後,進行該光源 亮度調節步驟15’將該運算㈣器25運算得到之光輸出強 度輸出至該多通道光源控制器24,令該多通道光源控制器 24依該等光輪出強度值調節該每一光源21輸出光強度。 最後,進行該預定亮度影像得到步驟16,在每一光源 21依該多通道光源控制器24調節的光輸出強度穩^輸出光 後’以該影像梅取器22練取置於該工作台23上的待測物 2〇0影像’即可得到具有預定影像亮度的待測物200影像。 另外要說明的是,在得到具有預定影像亮度的待測物 9 201017101 200影像後’仍可以選擇性的重複實施參考影像操取步驟 12、光源照射模型建立步驟13、光源輸出光強度得到步驟 14、光源亮度調節步驟15,及預定亮度影像得到步驟16, 不斷地依實際得到的影像調校光源輸出光的強度,及/或得 到預定亮度的待測物影像。 本發明自動調節所需照明亮度的影像擷取方法的一第 一較佳實施例,疋與上例相似,差異處在於光源2 1數目增 加為四(對應於工作台23中心成對稱的設置)以及分割擷 取影像區域數目為六而已,故以下直接以具體數字就參考_ 影像擷取步驟12、光源照射模型建立步驟13、與光源輸出 光強度得到步驟14作細部說明。 配合參閱圖4,在本例中,光源21數目是4,影像區 域數目設定為6,藉此驗證分割擷取影像區域數目並非—定 要為方陣。 類似地’在該參考影像擷取步驟12假設該四光源2ι 分別以相同輸出光強度(假設為1)照射待測物200,擁取 到影像之各區域L、l2山、“亮度不同 ,也就是LeLp © L3 L4 1 ’ 11、h ...I5、16 分別假設為 1.6、1.8、2.1、 2.5 、 2·5 、 2.7 。 !-1 12 3 4 z z z £- ,4rM^w?w?fM ΜΜΜmmm η ΓΜ ΓΜ rM r« Μ Μ Μ Μ Μ M l2r2232r4252r62Μ Μ MMM MMl m2 m3 m4 Ms Me ~ _^_ -/1 /2 /3 /4 /51/6 I_ 10 201017101 調控光源21分別成開,或關兩種狀態 當 L! = 1、L2 = 0、L3 = 0、L4= 0 得到 Mu = 0.2 ' M21 = 0.2 ' M31 0.3 % M41 = 0.4 ' Μ51 = 0.5 =0.5、M6i 當 Lt = Ο、L2 = 1、L3 = 0、L4 = 0 得到 M!2 = 0.3、M22 = 〇·4、M32 = 0.4、M42 = 0.5、M52 =0.6 =0.5、M62Il==Ml2xLi 〇.5=Μ12 χ 1 -(4) #(1)(7)(7)(4), get Μ = 0,3 05 L〇-2 0.8 Calculate the inverse matrix 8 (5) 201017101 M-1 = [5.7143 - 3.5714' [-1.4286 2.1429 Because the image brightness of each block of the ideally captured image is equal to 込, it is the image of the object to be tested with uniform brightness, so Ii=1, l2=1 are substituted, of course, In this case, if you want to obtain images with different brightness or higher brightness in each block, you only need to substitute different brightness values for subsequent calculation. You can solve Ll=2.1429 L2= 0.7143. In the reference image capturing step 12, the two light sources 21 illuminate the object to be tested 200 with the same output light intensity, and when the captured image brightness is not the same, the light source illumination model establishing step 13 and the light source output light intensity obtaining step are obtained. After the calculation, the two light sources 21 can be used to illuminate the object to be tested 2 (9) placed on the table 23 with the output light intensity of 2 1429 and 0.7143, respectively, and the image picker 22 can capture the object with uniform brightness. 2〇〇 image. • After calculating the light intensity that each light source 21 should output, perform the The source brightness adjustment step 15' outputs the light output intensity calculated by the operation (4) 25 to the multi-channel light source controller 24, so that the multi-channel light source controller 24 adjusts the output of each of the light sources 21 according to the light wheel output intensity values. Light intensity. Finally, the predetermined brightness image is obtained in step 16. After each light source 21 is stabilized according to the light output intensity adjusted by the multi-channel light source controller 24, the image is taken by the image extractor 22 The image of the object to be tested 2〇0 image on the workbench 23 can obtain the image of the object to be tested 200 having the predetermined image brightness. It is also noted that after obtaining the image of the object to be tested 9 with a predetermined image brightness 9 201017101 200 The reference image operation step 12, the light source illumination model establishing step 13, the light source output light intensity obtaining step 14, the light source brightness adjusting step 15, and the predetermined brightness image obtaining step 16 may be selectively performed repeatedly, and the image tone obtained continuously is obtained. The intensity of the output light of the school light source, and/or the image of the object to be tested that obtains the predetermined brightness. The first comparison of the image capturing method for automatically adjusting the required illumination brightness of the present invention In the embodiment, the difference is similar to the above example, the difference is that the number of the light source 2 1 is increased to four (corresponding to the setting of the center of the table 23 symmetrically) and the number of the divided image areas is six, so the following is directly referred to by a specific number. _ image capturing step 12, light source illumination model establishing step 13, and light source output light intensity obtaining step 14 for detailed description. Referring to FIG. 4, in this example, the number of light sources 21 is 4, and the number of image areas is set to 6, borrowing The number of image regions captured by this verification segmentation is not - it must be a square matrix. Similarly, in the reference image capturing step 12, it is assumed that the four light sources 21 respectively illuminate the object to be tested 200 with the same output light intensity (assumed to be 1), and the regions L, l2 of the image are captured, and the brightness is different. That is, LeLp © L3 L4 1 '11, h ... I5, 16 are assumed to be 1.6, 1.8, 2.1, 2.5, 2·5, 2.7. !-1 12 3 4 zzz £- , 4rM^w?w?fM ΜΜΜmmm η ΓΜ ΓΜ rM r« Μ Μ Μ Μ Μ M l2r2232r4252r62Μ Μ MMM MMl m2 m3 m4 Ms Me ~ _^_ -/1 /2 /3 /4 /51/6 I_ 10 201017101 The control light source 21 is turned on, respectively Close two states when L! = 1, L2 = 0, L3 = 0, L4 = 0, get Mu = 0.2 ' M21 = 0.2 ' M31 0.3 % M41 = 0.4 ' Μ51 = 0.5 = 0.5, M6i When Lt = Ο, L2 = 1, L3 = 0, L4 = 0, get M!2 = 0.3, M22 = 〇·4, M32 = 0.4, M42 = 0.5, M52 = 0.6 = 0.5, M62
當 Ο、L2 = 0、L3 = 1、L4= 0 得到 Μ!3 — 0.5、M23 = 〇·5、NI33 = 0 6、M43 = 0.7、M53 = 0.7 =0.7、M63 =0.8 ' M64 當 L! = 〇、L2 = 0、L3 = 0、[4 = 1 得到 ^14 ~~ 〇·6、M24 = 〇 · 7、NI34 = 0.8、M44= 0.9、M54 =0.9 即 M = 0.2 0.3 0.5 0.6 0.2 0.4 0.5 0.7 0.3 0.4 0.6 0.8 0.4 0.5 0.7 0.9 0.5 0.5 0.7 0.8 0.5 0.6 0.7 0.9 因M非方陣,計算其虛擬反矩陣,得到When Ο, L2 = 0, L3 = 1, L4 = 0, Μ! 3 — 0.5, M23 = 〇·5, NI33 = 0 6, M43 = 0.7, M53 = 0.7 = 0.7, M63 = 0.8 ' M64 When L! = 〇, L2 = 0, L3 = 0, [4 = 1 get ^14 ~~ 〇·6, M24 = 〇·7, NI34 = 0.8, M44=0.9, M54 =0.9 ie M = 0.2 0.3 0.5 0.6 0.2 0.4 0.5 0.7 0.3 0.4 0.6 0.8 0.4 0.5 0.7 0.9 0.5 0.5 0.7 0.8 0.5 0.6 0.7 0.9 Calculate the virtual inverse matrix due to the M non-square matrix.
-6.4362 -6.4362 5.6383 2.9787 0.6915 3.4309 8.4309 -10.6915 -4.8936 0.2926 12.1277 2.1277 -8.7234 -4.0426 6.3830 -8.4309 -3.4309 10.6915 4.8936 -5.2926 0.6915 5.2926 -3.6170 -0.2926-6.4362 -6.4362 5.6383 2.9787 0.6915 3.4309 8.4309 -10.6915 -4.8936 0.2926 12.1277 2.1277 -8.7234 -4.0426 6.3830 -8.4309 -3.4309 10.6915 4.8936 -5.2926 0.6915 5.2926 -3.6170 -0.2926
11 201017101 類似地’因為理想上擷取之影像每一區塊的亮度都相等, 才是亮度均一的待測物200影像,所以假定Ι1= ι2= ι3= ι4= !5= I6= 1代入(當然’此時若要得到每一區塊亮度不等的影 像’只須代入不同亮度值進行後續計算即可) 即可解得 L!=-2.8723 ' L2= 1.8617 ' L3= 4.2553 > L4= -1.8617 亦即’當該參考影像擷取步驟12中,該四光源21以 相同輸出光強度照射待測物200,所擷取的影像亮度並不相 同,但經過該光源照射模型建立步驟13與該光源輸出光強 φ 度得到步驟14計算後,可以得到該四光源21的輸出強度 分別疋 1^=-2.8723、L2= 1.8617、L3= 4.2553、L4= -1.8617 時,可以該影像擁取器22擷取到亮度均一的待測物2〇〇影 像;此時,負號表示輸出強度是往負方向(亦即調小)調 整,而非將光輸出強度調整成負值。 由上述兩例說明可知,只要在運算控制器25可運算的 狀況下,光源21數目與影像分割數目都可以向上增加,而 得到每一光源21的正確輸出光強度,進而擷取到具有預定❹ 汾像亮度的待測物200影像,不過要注意的是,若影像分 割數目過多時’相鄰區域的光會有互相干擾的狀況同時 也不利於以運算控制器25運算處理而快速的取得光強度 -貝料此夕卜|景夕像分割後的區域亮度也都可以設計 自訂’以得到最符合檢測需要的清晰待測物·影像。 〜而要另外說明的是’本發明雖然是自動調節所需照明 冗度的影像擷取方法’用彼此相關聯的步驟,而可自動調 12 201017101 節光源21輸出光強度,最終得到具有預定影像亮度的清晰 待測物200影像,以供影像檢測應用;事實上,本發明也 可以直接應用在-待觀察區域需要有多數不同照光亮度, 例如手術的照光中,依序進行系_設步驟、參考影像操 取步驟、光源照射模型建立步驟、光源輸出光強度得到步 驟與光源亮度調節步驟後,即可㈣㈣察區㈣n 域均具有所需的亮度供手術的進行,且在手術進行中,也11 201017101 Similarly 'Because the brightness of each block of the ideal captured image is equal, it is the image of the object to be tested with uniform brightness, so assume Ι1= ι2= ι3= ι4= !5= I6= 1 substitution ( Of course, if you want to get an image with different brightness in each block, you only need to substitute different brightness values for subsequent calculations. You can solve L!=-2.8723 ' L2= 1.8617 ' L3= 4.2553 > L4= -1.8617, that is, in the reference image capturing step 12, the four light sources 21 illuminate the object to be tested 200 with the same output light intensity, and the captured image brightness is not the same, but after the light source illumination model is established, step 13 is performed. After the output intensity of the light source is calculated in step 14, the output intensity of the four light sources 21 can be obtained as ^1^=-2.8723, L2=1.8617, L3=4.2553, L4=-1.8617, and the image grabber can be used. 22 captures the image of the object to be tested with uniform brightness; at this time, the negative sign indicates that the output intensity is adjusted in the negative direction (ie, small), instead of adjusting the light output intensity to a negative value. As can be seen from the above two examples, as long as the arithmetic controller 25 can calculate, the number of the light source 21 and the number of image divisions can be increased upward, and the correct output light intensity of each light source 21 is obtained, and then the predetermined ❹ is obtained. The image of the object to be tested 200 is imaged with brightness, but it should be noted that if the number of image divisions is too large, the situation in which the light of the adjacent area interferes with each other is also disadvantageous for the operation of the arithmetic controller 25 to quickly obtain light. Intensity - Beads this day | The brightness of the area after the image is divided can also be customized to get the clear object/image that best meets the needs of the test. ~ It should be additionally stated that 'the invention is an image capturing method for automatically adjusting the required illumination redundancy', and the steps associated with each other are used, and the output light intensity of the 201017101 light source 21 can be automatically adjusted to finally obtain a predetermined image. Brightness of the image of the object to be tested 200 for image detection applications; in fact, the invention can also be directly applied to - the area to be observed needs to have a plurality of different illumination brightness, such as surgical illumination, in sequence, After the reference image operation step, the light source illumination model establishing step, the light source output light intensity obtaining step and the light source brightness adjusting step, the (4) (4) viewing area (4) n fields have the required brightness for the operation, and during the operation,
可以選擇性的重複此些步驟,而即時地依手術進行需求改 變照光強度’提南手術的安全性。 綜上所述,本發明提供-種自動調節所需照明亮度的 影像操取方法,錢取各光源以任意輸出光強度照射置於 該工作台上之待測物影像作為參考影像後,再建立影像中 每一區域與每-光源之輸出光強度的矩陣與轉換矩陣關 係,即可計算出欲擁取具有預定影像亮度時之待測物影像 時所需之每-光源的光輸出強度,進而自動調節光源的輸 出光強度、得到具有預定影像亮度的待測物影像。 由於本發明不以人的視覺感受作為光源輸出強声標 準,而完全以實際揭取的影像結果進行運算後自動調整^ 所需輸出光的強度,所以檢測結果或是檢測標準不會因人 而異’此外’本發明可以隨時依以影像改變自動調整 光的強度,所以擷取到的影像也不會因為工作台、光源 因為長時間進行大量待測物的檢測而產生例如光源角= 化、工作台傾斜造成照光不均的改變,而影響到檢測二 果,另外,本發明所需硬體設備,僅是簡單、便宜的運算 13 201017101 控制器(即個人電腦)、多通道光源控制器與影像操取器 (CCD)等,而可以在不增加設備成本負擔的狀況下,提高 檢測影像的品質與效能,故確實能達成本發明之目的。 惟以上所述者,僅為本發明之較佳實施例而已,當不 能以此限定本發明實施之範圍,即大凡依本發明申請專利 範圍及發明說明内容所作之簡單的等效變化與修飾,皆仍 屬本發明專利涵蓋之範圍内。 【圖式簡單說明】 圖1是一流程圖’說明本發明自動調節所需照明亮度⑩ 的影像棟取方法的一第一較佳實施例; 圖2是一示意圖,說明本發明自動調節所需照明亮度 的影像擷取方法的一系統架設步驟所架設的檢測系統; 圖3是一示意圖,說明實施本發明自動調節所需照明 亮度的影像擷取方法的第一較佳實施例時,光源與擷取影 像切割區域的關係;及 圖4是一示意圖,說明實施本發明自動調節所需照明 亮度的影像擷取方法的第二較佳實施例時,光源與擷取影❿ 像切割區域的關係。 14 201017101 【主要元件符號說明】 11 系統架設步驟 12 參考影像擷取步驟 200 13 光源照射模型建立 21 步驟 22 14 光源輸出光強度得 23 到步驟 24 15 光源亮度調節步驟 25 16 預定亮度影像得到 步驟 待測物 光源 影像擷取器 工作台 多通道光源控制器 運算控制器 15These steps can be selectively repeated, and the safety of the operation can be changed immediately according to the need of surgery. In summary, the present invention provides an image manipulation method for automatically adjusting the required illumination brightness, and the light source is used to illuminate the image of the object to be tested placed on the worktable with any output light intensity as a reference image, and then establish The relationship between the matrix of each output area and the output light intensity of each light source and the conversion matrix can calculate the light output intensity of each light source required to capture the image of the object to be tested with a predetermined image brightness, and further The output light intensity of the light source is automatically adjusted to obtain an image of the object to be tested having a predetermined image brightness. Since the present invention does not output a strong sound standard by using a human visual experience as a light source, and automatically adjusts the intensity of the required output light after performing the operation on the actually extracted image result, the detection result or the detection standard is not caused by the person. The invention can automatically adjust the intensity of the light at any time according to the image change, so that the captured image is not caused by the detection of a large number of objects to be tested by the worktable or the light source for a long time, for example, the source angle = The tilting of the table causes the change of illumination unevenness, which affects the detection of the second fruit. In addition, the hardware device required by the present invention is only a simple and inexpensive operation. 13 201017101 Controller (ie personal computer), multi-channel light source controller and The image manipulation device (CCD) or the like can improve the quality and performance of the detected image without increasing the burden on the equipment, and thus the object of the present invention can be achieved. The above is only the preferred embodiment of the present invention, and the scope of the invention is not limited thereto, that is, the simple equivalent changes and modifications made by the scope of the invention and the description of the invention are All remain within the scope of the invention patent. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flow chart 'a first preferred embodiment of an image building method for automatically adjusting the required illumination brightness 10 of the present invention; FIG. 2 is a schematic view showing the automatic adjustment required by the present invention. A detection system erected by a system erection step of an image capturing method for illuminating brightness; FIG. 3 is a schematic view showing a first preferred embodiment of an image capturing method for automatically adjusting the required illumination brightness according to the present invention, the light source and The relationship between the image cutting area is captured; and FIG. 4 is a schematic diagram showing the relationship between the light source and the image cutting area when the second preferred embodiment of the image capturing method for automatically adjusting the required illumination brightness is implemented by the present invention. . 14 201017101 [Main component symbol description] 11 System setup step 12 Reference image capture step 200 13 Light source illumination model setup 21 Step 22 14 Light source output light intensity 23 to step 24 15 Light source brightness adjustment step 25 16 Predetermined brightness image acquisition step Measuring object light source image grabber workbench multi-channel light source controller arithmetic controller 15