201239811 六、發明說明: 【發明所屬之技術領威】 [0001] 本發明係有關一種成像系統’特別是關於一種影像校 正方法,用以快速校正成像系統。 【先前技術】 [0002] 影像感測器,例如互補式金屬氧化物半導體(CMOS) 影像感測器’是成像系統中的重要元件之一’用以將光 信號轉換為電信號。現今的成像系統於設計或製造時, 同一影像感測器常因終端產品的需求所致,會分別搭配 〇 各種不同廠牌或型號的鏡頭◊政而,本同鏡頭的規格及 製造技術往往不相同,因而影響了影像的品質,例如影 像的清晰度。 r 〇 [0004] [0003] 對於此問題’目前的作法是在每次捧_新的鏡頭時, 藉由具相當經驗的技術人員來調整成像系統的參數設定 ,如此才能快速且準確地得到考辦的费像y但是,此種 作法會提高於更換新鏡頭時釣技_門糕,因而降低產品 在選擇鏡頭時的彈性度。… 因此,亟需提出一種新穎的影像校正方法,以降低更 換鏡頭時的困難’及增加選擇鏡頭時的彈性度。 【發明内容】 [0005] 鑑於上述’本發明實施例的目的之一在於提出一種影 像校正方法,其不需藉助經驗,而能快速建立符合目標 品質的影像結果’可降低更換鏡頭的困難度且增加鏡頭 選擇時的彈性。 1002017290-0 100110259 表單編號A0101 第3頁/共18頁 201239811 [0006] 根據本發明實施例,選定複數個鏡頭,用以分別搭配 一影像感測器而成為複數組預設成像系統。使用每一預 設成像系統擷取一參考影像,並進行影像特徵分析,用 以分別萃取得到相應的特徵值。對於每一預設成像系統 ,調整其參數設定值,使其達到一目標清晰度。儲存複 數組預設成像系統之特徵值與參數設定值,以建立一資 料庫。預設成像系統並不侷限於實體成像系統,亦可為 軟體模擬之結果。提供一未知成像系統,其係由一鏡頭 搭配影像感測器所形成。以該未知成像系統擷取參考影 像,並進行第一次影像特徵分析,用以萃取得到第一特 徵值。將第一特徵值和資料庫當中的特徵值作比較,以 得到一最符合特徵值。以該最符合特徵值對應之預設成 像系統,於資料庫中得到相應的參數設定值。 【實施方式】 [0007] 第一圖所示之流程圖顯示本發明第一實施例的影像校 正方法,其可用以快速校正成像系統。本實施例之成像 系統所使用之影像感測器可為互補式金屬氧化物半導體 (CMOS)影像感測器,但不限定於此。 [0008] 在本實施例中,影像校正方法主要分為兩大部分:特 徵與參數設定(setting)資料庫103的建立步驟10及成 像裝置校正步驟20。首先,於步驟100,選定複數個(例 如η個)鏡頭,用以分別搭配影像感測器而成為複數組( η組)預設成像系統1至η。接著,於步驟101,使用每一 預設成像系統擷取一參考影像,並進行影像特徵分析, 用以分別萃取得到相應的特徵值。值得注意的是,進行 100110259 表單編號Α0101 第4頁/共18頁 1002017290-0 201239811 Ο 影像特徵分析之影像是尚未經過待校正之影像處理的影 像’且成像系統的設定也尚未作待校正之影像處理調整 。例如’若本校正為調整影像處理中之清晰度強化參數 ’則進行影像分析的影像為未經過清晰度強化處理之影 像。本實施例之影像特徵可為影像的銳利度(Sharpness) , 但不限定於此 。影像的銳利度可藉由一 些量測 值來判定,例如調變轉換函數(modulation transfer function, MTF)響應衰減至百分之五十的頻率值( MTF50) ’其值愈高表示影傳愈清晰。其他的量測值還有 邊緣(e d g e )寬度,亦即畫面中亮暗變化間的過渡區帶 ’寬度愈小表示影像愈銳利或请晰:。經萃取得到之複數 筆特徵值101A則儲存於記憶體裝置中,其分別對應至相 應的預設成像系統。 [0009] 接下來,於步驟1〇2,對於每一預設成像系統,調整其 參數設定值(例如銳利度相關參數設定值),使其達到 一目標特徵值(例如銳利度相關之調變轉換函數(MTF) Ο )。以銳利度設定為例,可調整銳利度相關的濾波器係 數’或者調整影像輪廓之銳利度與去雜訊之臨界值。經 調整後的複數筆參數設定值102A則儲存於記憶體裝置中 ,其分別對應至相應的預設成像系統。上述的特徵值 101A與參數設定值i〇2A共同建立了特徵與參數設定資料 庫103 (以下簡稱資料庫)。 第二圖顯示資料庫103的建立例子。在此例子中,共有 三組預設成像系统:第一組預設成像系統100A、第二組 預設成像系統1 00B及第三組預設成像系統i〇〇c。其中, 100110259 表單編號A0101 第5頁/共18頁 1002017290-0 [0010] 201239811 組預設成像系統10()A由鏡頭1搭配影像感測器,其擷 =參考影像’並進行影像特徵(例如Mm〇)分析 用以萃取付到並儲存相應的特徵值每像剌.3周期 //CleS/P1Xel)。此夕卜,調整其參數設定值102A’ 田、達到一目標影像品質時,則儲存相應的參數設定值1 。:目榡影像品質可由數個影像品質衡量指標組成(如訊 :Λ比MTF5G)或由主觀評量決定。至於第二組預設 像系統1GGB ’其影像特徵分_1β及參數設定值之調 :1〇2_似於第—組預設成像系統1_ ;第三組預設成 系統100C,其影像特徵分析咖及參數設定值之調整 1 〇2C也類似於第一組預設成像系統丨⑽Α。 [0011] 一旦資料庫103建立好之後,則進入成像裝置校正步驟 20 ’對於任何鏡頭搭配影像感測器所形成的未知成像系 統2〇〇 ’可據以決定出適當的參數設定值。首先於步驟 2〇1,以未知成像系統200擷取參考影像,並進行第一次 影像特徵分析,用以萃取得到第―特徵值。接著,於步 驟202,對所得到之第一特徵值作分類(classify), 亦即,將第一特徵值和資料庫1〇3當中的複數筆特徵值 U1A作比較,比較時加入預先定義的條件及偏好(例如 選擇預a免成像系統MTF50大於未知成像系統之mtf5〇中最 接近的),以得到最符合此定義下的一個特徵值所對應 的預設成像系統,即可將此未知成像系統歸類為該最接 近特徵值所對應之預設成像系統,再於步驟2〇3,以此歸 類之預設成像系統於複數筆參數設定值l〇2A當中得到相 應該預設成像系統的參數設定值。 100110259 表·單編號A0101 第6頁/共18頁 1002017290-0 201239811 [0012] [0013] Ο [0014] ❹ [0015] 100110259 1002017290-0 以第二圖所示為例’如果未知成像系統200於進行第一 人衫像特徵分析後得到的第一特徵值(MTF50)為0. 12 將该第—特徵值和第二圖的資料庫特徵值0. 1、0. 2、 〇. 3作比較’若定義以MTF50最接近為條件,可得到最符 口之特徵值為〇. 1。該最符合特徵值相應於參數設定值3 即可作為該未知成像系統200之參數設定值。 第二圖顯示本發明第二實施例的成像裝置校正步驟20Β 。在本實施例中,步驟2〇〇至201與前一實施例(第一圖 )相同,但是在步驟202Β中,將第一特徵值和資料庫1〇3 當中的複數筆特徵值101Α作比較時,得到最符合的二筆 或二筆以上相鄰特徵值,再於步驟203Β,以此二筆或二 筆以上相鄰特徵值於資料庫當中的複數筆參數設定值 102Α之中得到相應的二筆或二筆以上參數設定值。 接著’於步驟204Β ’以該二筆或二筆以上參數設定值 刀別調整該未知成像系統2 ρ 0 ι再分別進行特徵分析以得 到一個或二個以上第二特徵值β最後,於步驟2Q5B,比 • - j- ·;'' 較β亥·一個或二個以.上.第二特徵植’決定哪一個影像效果 較好或較符合目標影像品質所需’並選擇其中一個相應 參數設定值作為未知成像系統200的參數設定值。 第四Α圖顯示本發明第三實施例的成像裝置校正步驟 20C。在本實施例中,步驟2〇〇至203B與前—實施例(第 三圖)相同。接著,於步驟,根據步驟2〇3B所得到之 至少二參數設定值(例如銳利度)及其相應的特徵值以 調和得到未知成像系統2 0 0的取符合參數設定值。在本實 施例中,步驟206可使用一參數運算單元來執行。 表單編號A0101 第7頁/共18頁 201239811 [0016] 第四B圖顯示參數運算單元的詳細方塊圖,其包含參數 調和單元206A及參數產生單元206B。其中,參數調和單 元206A接收步驟203B所得到的至少二參數設定值:第一 參數設定值及第二參數設定值;而參數產生單元206B則 接收相應的特徵值:第一特徵值及第二特徵值。參數產 生單元206B所產生的參數饋至參數調和單元206A,用以 得到最符合參數設定值。 [0017] 在本實施例中,參數運算步驟206係使用線性内插方法 以得到最符合參數設定值。以第二圖所示為例,假設步 驟2 03B得到參數設定值分別為:第一參數設定值1. 5,對 應至預設成像系統2,其相應特徵值為0. 2 ;及第二參數 設定值2. 0,對應至預設成像系統3,其相應特徵值0. 1。 上述參數設定值及特徵值的關係可表示如第四C圖所示。 對參數設定值進行線性内插運算可表示如下: 2.0*(0. 2-0. 12)/(0. 2-0. 1) + 1.5*(0.12-0. 1)/(0.2 -0.1) =2. 0*alpha + l.5*(l-alpha) = l.9 其中,變數alpha係由參數產生單元206B所產生。 [0018] 以上所述僅為本發明之較佳實施例而已,並非用以限 定本發明之申請專利範圍;凡其它未脫離發明所揭示之 精神下所完成之等效改變或修飾,均應包含在下述之申 請專利範圍内。 【圖式簡單說明】 [0019] 第一圖所示之流程圖顯示本發明第一實施例的影像校正 方法。 100110259 表單編號A0101 第8頁/共18頁 1002017290-0 201239811 第二圖顯示特徵與參數設定資料庫的建立例子。 第三圖顯示本發明第二實施例的成像裝置校正步驟。 第四Α圖顯示本發明第三實施例的成像裝置校正步驟。 第四B圖顯示第四A圖之參數運算單元的詳細方塊圖。 第四C圖例示參數設定值及特徵值的關係。 【主要元件符號說明】 [0020] Ο 10 特徵與參數設定資料庫的建立步驟 1 00-1 02A 步驟 103 特徵與參數設定資料庫 100A、100B、100C 預設成像系統 萃取特徵值 調整參數設定值 成像裝置校正步驟201239811 VI. Description of the Invention: [Technical Leadership of the Invention] [0001] The present invention relates to an imaging system', particularly to an image correction method for quickly correcting an imaging system. [Prior Art] [0002] Image sensors, such as complementary metal oxide semiconductor (CMOS) image sensors, are one of the important components in an imaging system for converting optical signals into electrical signals. When designing or manufacturing today's imaging systems, the same image sensor is often caused by the demand of the end products, and will be matched with various brands or models of lenses, and the specifications and manufacturing techniques of the same lens are often not The same, thus affecting the quality of the image, such as the sharpness of the image. r 〇[0004] [0003] For this problem, the current practice is to adjust the parameter settings of the imaging system by a highly experienced technician every time you take a new lens, so that you can get the test quickly and accurately. The fee for the operation is like y. However, this method will improve the elasticity of the product when the lens is replaced. ... Therefore, there is a need to propose a novel image correction method to reduce the difficulty in replacing the lens' and increase the elasticity when selecting the lens. SUMMARY OF THE INVENTION [0005] In view of the above, one of the objects of the embodiment of the present invention is to provide an image correction method, which can quickly establish an image result conforming to the target quality without the need of experience, and can reduce the difficulty of replacing the lens and Increase the flexibility of lens selection. 1002017290-0 100110259 Form No. A0101 Page 3 of 18 201239811 [0006] According to an embodiment of the invention, a plurality of lenses are selected for use with a video sensor to form a complex array of predetermined imaging systems. A reference image is captured using each of the preset imaging systems, and image feature analysis is performed to separately extract corresponding feature values. For each preset imaging system, adjust its parameter settings to achieve a target resolution. Store the eigenvalues and parameter settings of the complex array preset imaging system to create a library. The preset imaging system is not limited to a solid imaging system, but can also be the result of a software simulation. An unknown imaging system is provided which is formed by a lens with an image sensor. The reference image is captured by the unknown imaging system, and the first image feature analysis is performed to extract the first characteristic value. The first feature value is compared with the feature value in the database to obtain a most consistent feature value. The corresponding parameter setting value is obtained in the database by the preset imaging system corresponding to the most eigenvalue corresponding. [Embodiment] The flowchart shown in the first figure shows an image correction method of the first embodiment of the present invention, which can be used to quickly correct an imaging system. The image sensor used in the imaging system of this embodiment may be a complementary metal oxide semiconductor (CMOS) image sensor, but is not limited thereto. In the present embodiment, the image correction method is mainly divided into two major parts: a feature and parameter setting database 103 establishing step 10 and an imaging device correcting step 20. First, in step 100, a plurality of (e.g., n) lenses are selected for use with the image sensor to form a complex array (n group) of predetermined imaging systems 1 to n. Next, in step 101, a reference image is captured using each preset imaging system, and image feature analysis is performed to separately extract corresponding feature values. It is worth noting that, for example, 100110259 Form No. 1010101 Page 4/18 pages 1002017290-0 201239811 Ο Image of image feature analysis is an image that has not been processed by the image to be corrected' and the image system setting has not yet been corrected. Handle adjustments. For example, if the correction is to adjust the sharpness enhancement parameter in the image processing, the image subjected to image analysis is an image that has not been subjected to sharpening enhancement processing. The image feature of this embodiment may be the sharpness of the image, but is not limited thereto. The sharpness of the image can be determined by some measured values, such as the modulation transfer function (MTF) response attenuation to a frequency value of 50% (MTF50). The higher the value, the clearer the image is. . Other measurements have an edge (e d g e ) width, which is the transition zone between the light and dark changes in the picture. The smaller the width, the sharper the image or the more clear: The extracted plurality of feature values 101A are stored in the memory device, which respectively correspond to corresponding preset imaging systems. [0009] Next, in step 1〇2, for each preset imaging system, adjust its parameter setting value (for example, the sharpness-related parameter setting value) to reach a target eigenvalue (for example, a sharpness-dependent modulation). Conversion function (MTF) Ο ). Taking the sharpness setting as an example, the sharpness-dependent filter coefficient can be adjusted or the sharpness of the image contour and the critical value of the denoising can be adjusted. The adjusted plurality of parameter setting values 102A are stored in the memory device, which respectively correspond to the corresponding preset imaging systems. The feature value 101A and the parameter setting value i〇2A together establish a feature and parameter setting database 103 (hereinafter referred to as a database). The second figure shows an example of the establishment of the database 103. In this example, there are three sets of preset imaging systems: a first set of preset imaging systems 100A, a second set of preset imaging systems 100B, and a third set of preset imaging systems i〇〇c. Among them, 100110259 Form No. A0101 Page 5 / Total 18 Page 1002017290-0 [0010] 201239811 Group Preset Imaging System 10 () A is equipped with lens 1 with image sensor, 撷 = reference image ' and image features (such as Mm〇) analysis is used to extract and store the corresponding eigenvalues per image 剌.3 cycles // CleS/P1Xel). In addition, when the parameter setting value 102A' field is adjusted and a target image quality is reached, the corresponding parameter setting value 1 is stored. : The quality of the image can be determined by several image quality measures (such as Λ: MTF5G) or by subjective assessment. As for the second set of preset image system 1GGB 'the image feature score _1β and the parameter setting value adjustment: 1〇2_ is similar to the first group preset imaging system 1_; the third group is preset to the system 100C, its image features Analysis of the analysis coffee and parameter settings 1 〇 2C is also similar to the first set of preset imaging systems 10 (10) Α. [0011] Once the database 103 is established, the imaging device correction step 20' is entered to determine the appropriate parameter settings for the unknown imaging system 2' formed by any of the lens-matched image sensors. First, in step 2〇1, the reference image is captured by the unknown imaging system 200, and the first image feature analysis is performed to extract the first feature value. Next, in step 202, the obtained first feature value is classify, that is, the first feature value is compared with the plurality of feature values U1A in the database 1〇3, and the predefined time is added to the comparison. Conditions and preferences (for example, selecting the pre-a-free imaging system MTF50 is greater than the closest of the mtf5〇 of the unknown imaging system) to obtain the preset imaging system corresponding to one of the eigenvalues under this definition, the unknown imaging can be imaged The system is classified into the preset imaging system corresponding to the closest feature value, and then in step 2〇3, the preset imaging system classified in the plurality of parameter setting values l〇2A is obtained corresponding to the preset imaging system. Parameter setting value. 100110259 Table No. A0101 Page 6/18 pages 1002017290-0 201239811 [0013] [0014] ❹ [0015] 100110259 1002017290-0 Take the second diagram as an example 'If the unknown imaging system 200 is The first eigenvalue (MTF50) obtained after the first person image feature analysis is 0. 12 Compare the first eigenvalue with the database eigenvalue of the second graph by 0.1, 0.2, 〇. 'If the definition is based on the closest condition of MTF50, the characteristic value of the most characteristic can be obtained as 〇. The most compliant characteristic value corresponding to the parameter setting value 3 can be used as the parameter setting value of the unknown imaging system 200. The second figure shows an image forming apparatus correction step 20 of the second embodiment of the present invention. In the present embodiment, steps 2〇〇 to 201 are the same as the previous embodiment (first figure), but in step 202, the first feature value is compared with the plurality of feature values 101 in the database 1〇3. Obtaining the most consistent two or more adjacent feature values, and then in step 203, obtaining two or more adjacent feature values in the database of the plurality of parameter settings 102Α Two or more parameter setting values. Then, in step 204Β, the unknown imaging system 2 ρ 0 ι is adjusted by the two or more parameter setting values, and then the feature analysis is performed separately to obtain one or two second eigenvalues β finally, in step 2Q5B. , than - - j- ·; '' compared to β Hai · one or two with .. second feature plant 'determines which image is better or better than the target image quality' and choose one of the corresponding parameter settings The value is used as a parameter setting for the unknown imaging system 200. The fourth drawing shows the image forming apparatus correction step 20C of the third embodiment of the present invention. In the present embodiment, steps 2A to 203B are the same as the previous embodiment (Fig. 3). Then, in step, according to at least two parameter setting values (for example, sharpness) obtained by step 2〇3B and their corresponding characteristic values, the matching parameter setting values of the unknown imaging system 200 are obtained. In the present embodiment, step 206 can be performed using a parametric arithmetic unit. Form No. A0101 Page 7 of 18 201239811 [0016] The fourth B diagram shows a detailed block diagram of the parameter operation unit, which includes a parameter harmonization unit 206A and a parameter generation unit 206B. The parameter modulating unit 206A receives at least two parameter setting values obtained in step 203B: a first parameter setting value and a second parameter setting value; and the parameter generating unit 206B receives the corresponding feature value: the first eigenvalue and the second feature. value. The parameters generated by the parameter generating unit 206B are fed to the parameter modulating unit 206A for obtaining the most consistent parameter setting value. [0017] In the present embodiment, the parameter operation step 206 uses a linear interpolation method to obtain the most consistent parameter setting value. As shown in the second figure, it is assumed that the parameter setting value of step 2 03B is: the first parameter setting value is 1.5, corresponding to the preset imaging system 2, the corresponding characteristic value is 0.2; and the second parameter 0。 Corresponding to the imaging system 3, the corresponding characteristic value of 0.1. The relationship between the above parameter setting values and the characteristic values can be expressed as shown in the fourth C diagram. Linear interpolation of the parameter settings can be expressed as follows: 2.0*(0. 2-0. 12)/(0. 2-0. 1) + 1.5*(0.12-0. 1)/(0.2 -0.1) =2. 0*alpha + l.5*(l-alpha) = l.9 where the variable alpha is generated by the parameter generation unit 206B. The above description is only the preferred embodiment of the present invention, and is not intended to limit the scope of the claims of the present invention; all other equivalent changes or modifications may be included without departing from the spirit of the invention. It is within the scope of the following patent application. BRIEF DESCRIPTION OF THE DRAWINGS [0019] The flowchart shown in the first figure shows the image correction method of the first embodiment of the present invention. 100110259 Form No. A0101 Page 8 of 18 1002017290-0 201239811 The second figure shows an example of the creation of a feature and parameter setting database. The third figure shows the imaging device correction step of the second embodiment of the present invention. The fourth diagram shows the imaging device correction step of the third embodiment of the present invention. The fourth block B shows a detailed block diagram of the parameter operation unit of the fourth A diagram. The fourth C diagram illustrates the relationship between the parameter setting value and the feature value. [Main component symbol description] [0020] Ο 10 Feature and parameter setting database establishment steps 1 00-1 02A Step 103 Feature and parameter setting database 100A, 100B, 100C Preset imaging system extraction feature value adjustment parameter setting value imaging Device calibration step
101A 、 101B 、 101C 102A、102B、102C 20 、 20B 、 20C 200-203101A, 101B, 101C 102A, 102B, 102C 20, 20B, 20C 200-203
202B-205B 206202B-205B 206
206A ❹ 步驟 步驟 參數運算步驟 參數調和單元 參數產生單元206A ❹ Step Step Parameter operation step Parameter harmonic unit Parameter generation unit
206B 100110259 表單編號A0101 第9頁/共18頁 1002017290-0206B 100110259 Form No. A0101 Page 9 of 18 1002017290-0