TWI339308B - Auto-focusing system and auto-focusing method - Google Patents

Auto-focusing system and auto-focusing method Download PDF

Info

Publication number
TWI339308B
TWI339308B TW96126554A TW96126554A TWI339308B TW I339308 B TWI339308 B TW I339308B TW 96126554 A TW96126554 A TW 96126554A TW 96126554 A TW96126554 A TW 96126554A TW I339308 B TWI339308 B TW I339308B
Authority
TW
Taiwan
Prior art keywords
contrast
module
focus
autofocus
contrast evaluation
Prior art date
Application number
TW96126554A
Other languages
Chinese (zh)
Other versions
TW200905351A (en
Inventor
Shen Fu Tsai
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 TW96126554A priority Critical patent/TWI339308B/en
Publication of TW200905351A publication Critical patent/TW200905351A/en
Application granted granted Critical
Publication of TWI339308B publication Critical patent/TWI339308B/en

Links

Landscapes

  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Description

1339308 ,1339308,

I 099年12月23日隹正营換頁I 六、發明說明: 【發明所屬之技術領域】 [0001] 本發明涉及攝像技術,特列涉及一種自動對焦系統及一 種自動對焦方法。 【先前彳支術】 [0002] 數位攝像機動態拍攝時,需對拍攝場景進行即時對焦, 即,數位攝像機需根據拍攝場景之變化即時調整對焦位 置。 [0003] 惟,某些情況下,如,數位攝像機鏡頭抖動或拍攝場景 : 光環境發生變化等,拍攝場景雖發生變化,但拍攝場景 之成像仍在景深範圍内。此猜況十,g‘節施(調整對焦 位置需驅動對焦馬達,較耗龙)11掌(頻繁調整 對焦位置降低畫面穩定度)之考慮,並不希望數位攝像機 調整對焦位置,追蹤可以忽略之拍攝場景變化。 【發明内容】 [0004] 有鑒於此,有必要提供一種利於節能且可提高畫面穩定 度之自動焦對系統及自動對焦方法。 [0005] —種自動對焦系統,其包括: [0006] 鏡頭,用於光學成像; [0007] 感光元件,用於感測該鏡頭之成像光訊號並轉化為電訊 號形式之畫面; [0008] 致動器,用於驅動該鏡頭改變對焦位置; [0009] 計算模組,用於計算該感光元件產生之畫面之對比度評 096126554 表單編號Α0101 第4頁/共23頁 0993457638-0 099年12月23日修正替換頁 1339308 估值; [0010] 求焦模組,用於依據該計算模組之計算結果求取該鏡頭 之最佳對焦位置,並控制該致動器驅動該鏡頭至該最佳 對焦位置以實現對焦;及 [0011] 判斷模組,用於在實現對焦後,判斷該計算模組計算之 相鄰兩幀晝面之對比度評估值之差異是否超出預設域值 ,並在該差異超出該預設域值之情況下控制該致動器驅 動該鏡頭重新對焦。 [0012] —種自動對焦方法,其包括以下步驟: [0013] 對焦; ..V ! \ [0014] 計算相鄰兩幀畫面之對比度'許破; [0015] 判斷該兩幀畫面之對比度評估值之差異是否超出預設域 值; [0016] 若差異超出預設域值;則返:回該對焦步驟;及 1- 1 [0017] 若差異未超出預設域值,則‘运:回:該計算步驟。 » · ▼ [0018] 本發明之自動對焦方法在實現對焦後,判斷相鄰兩幀畫 面之對比度評估值之差異是否在預設域值内,以判斷畫 面之變化是否在可接受之範圍内,進而決定是否重新對 焦。如此,可避免採用該自動對焦方法之自動對焦系統 頻繁對焦追蹤可以接受之畫面變化,達節能及提高畫面 穩定度之效果。 【實施方式】 [0019] 請參閱圖1,較佳實施例之自動對焦系統100包括鏡頭11 096126554 表單編號 A0101 第 5 頁/共 23 頁 0993457638-0 1339308 [0¾年12月23 ά按正替換頁1 感光兀件12、致動器13、計算模組14、求焦模組⑺及 判斷柄組16。鏡頭U用於光學成像。感光^件12用於感 測鏡頭11之成像光訊號並轉化為電訊號形式之畫面。致 動器13用於驅動鏡頭U改變對焦位置。計算模組14用於 計异感光το件12產生之畫面之對比度評估值。求焦模組 15用於依據計算模組14之計算結果求取鏡頭^之最佳對 焦位置,並㈣致動叫_鏡則1㈣最佳對焦位置 以實現對焦。判斷模組16用於在實現對焦後,判斷計算 模組14 si·算之相鄰兩幀畫面之對比度評估值之差異是否 超出預设域值’並在該差異超出預設域值之情況下控制 致動器13驅動鏡頭11重新餘焦。 [〇〇2〇]請參閱圖2,鏡頭11包括傳傳動導軌 Ill上之成像鏡片112;感光元件丨2採用電荷耦合器 (Charge-Coupled Device,CCD),並設置於鏡頭 11 像 側;致動器13採用旋轉步進馬達,旋轉步進馬達之轉軸 與傳動導轨111連接以驅動傳動導轨lu帶動成像鏡片 112在傳動導轨111上移動。旋轉步進馬達與傳動導軌 111配合使得成像鏡片u 2在對焦範圍L内具有四個對焦位 置P卜P4。 [〇〇21]當然’鏡頭11、感光元件12及致勤器13之設置並不限於 本實施例,可採用其他設置。如,採用線性步進馬達取 代傳動導轨111與旋轉步進馬達,採用音圈馬達及導軌取 代旋轉步進馬達及傳動導轨111,採用補充性金屬氧化物 半導體(Complementary Metal Oxide Semiconductor, CMOS)感測 器取代 CCD , 設置數目更多或更少 之對焦 0兆126554 表單編珑A0101 0993457638-0 第6頁/共23頁 1339308 099年1Z月23日惨jE替换頁 位置。 [0022] 計算模組14、求焦模組15及判斷模組16可内建於圖像訊 號處理器 22(Image Signal Processor, ISP)内, ISP22設置於感光元件丨2後端。isp22採用可編程之智慧 晶片,其可執行讀取、運算、比較及判斷等功能。 [0023] 當然,計算模組14、求焦模組15及判斷模組16之設置並 不限於本實施例,計算模組丨4、求焦模組15及判斷模組 1 6可分別内建於複數專用智慧晶片内。 [0024] 具體地’自動對焦系統100還包括獲取模組17、存儲模組 20及比對模組21。獲取模組:17用於獲务感光元件12產生 之畫面以供計算模組〗4計算。存;儲模_ 20用於存儲計算 模組14之計算結果,以供求焦模<|且15义判斷模組16讀取 。比對模組21用於在實現對焦後,比對計算模組14計算 之相鄰兩幀畫面之對比度評估值之差異,以供判斷模組 16判斷。 [0025] 以下結合圖3舉例說明如何計算.感▲元件12產生之書面之 對比度評估值。 [0026] G為灰階(gray scale)形式表示之畫面,為畫面G中 第m列’第η行之像素之灰階值(m,η為自然數,下同), 作為範例,本實施例之畫面G共有5x5個像素。計算模組 14依公式23計算出畫面G之對比度陣列Ε,其中e為對比 度陣列E中第m列,第n行之元素。畫面G之對比度評估值 與對比度陣列Ε對應(如,畫面G之對比度評估值等於對比 度陣列Ε各元素之總和)。可見,畫面g之對比度評估值表 096126554 表單编號Α0101 第7頁/共23頁 0993457638-0 1339308 [0027] [0028] [0029] [0030] [0031] 1 m mm _ «» — Λ I | 徵畫面G中各像素與周圍像素之亮度對比程度。 可以理解,對於同一拍攝場景,越清晰之畫面,畫面之 對比度評估值越大,而當成像鏡片112處於最佳對焦位置 時’感光元件12將感測到最清晰之成像光訊號並產生最 清晰之畫面。故,求焦模組15可通過在複數畫面之對比 度評估值(對應複數對焦位置)中求取最大之對比度評估 值,便得到對應之最佳對焦位置。 可以理解’對於抖動或光環境變化引起之拍攝場景變化 ,畫面之對比度評估值變化較小,通過判斷前後相鄰兩 幀畫面之對比度評估值之差異,便孓判斷:相對於前幀 晝面(對應前一拍攝場景),破橋主勒齡否發生明顯變化( 對應後一拍攝場景),進而痛定。 優選地,自動對焦系統100進一步包括切割模組18及加權 模組19。切割模組18用於將感光元件丨2產生之畫面切割 為複數區域,計算模組14計算每一區域之對比度評估值( 即該區域對應之對比度陣列各元素之總和)以得到對應該 幀畫面之區域對比度陣列,方便後續加權模組丨9對畫面 之不同區域作不同程度加權,達到突出對焦中心之目的 。加權模組19用於產生權重陣列,並用該權重陣列對該 區域對比度陣列進行加權運算得到加權對比度陣列,該 加權對比度陣列與該幀畫面之對比度評估值對應。 以下結合圖4,仍以畫面G為例說明如何計算畫面G之加權 對比度陣列。 作為範例,本實施例之切割模組18將畫面G切割成九個區 096126554 表單編號A0101 第8頁/共23頁 0993457638-0 1339308 099年12月23日後正替換頁 域,計算模組14計算每一區域之對比度評估值得到區域 對比度陣列ES,加權模組19產生權重陣列W,並採用公式 24對區域對比度陣列ES進行加權運算得到加權對比陣列 WE,加權對比度陣列WE對應畫面G之對比度評估值(如, 畫面G之對比度評估值等於對比度陣列E各元素之總和)。 其中,w 、es 及we 分別為W、ES及WE中第m列,第η m n m n m η 行之元素。 [0032] 權重陣列W可預先内建於ISP22,優選地,可預先建立複 數種類型之權重陣列,如,中心型(中央權重大)及平均 型(各處權重等大),以供用戶依據環境選擇合適類型之 權重陣列。 [0033] 可以理解,權重陣列W之元素越大,對應區域之對比度評 估值在整個畫面G之對比度評估值中所佔之權重越大,對 應區域之清晰度對整個晝面G之清晰度影響越大。即,對 畫面G作切割並對切割之區半作合適之加權處理後,可改 善畫面G之層次感,突出對焦中心。 [0034] 獲取模組17、切割模組18、加權模組19、存儲模組20及 比對模組21可内建於ISP22内,也可内建於專用智慧晶片 内。 [0035] 可以理解,本實施例之對比度評估值之計算形式僅用於 描述對比度評估值之物理意義,對比度評估值之計算形 式並不限於本實施例,可以採用其他計算形式計算表徵 畫面各像素與周圍像素亮度對比程度之特徵值作為畫面 之對比度評估值。 096126554 表單編號Α0101 第9頁/共23頁 0993457638-0 m9308I, December 23, 2010, 隹 营 换 I I I. Description of the Invention: [Technical Field of the Invention] [0001] The present invention relates to a camera technology, and particularly to an autofocus system and an autofocus method. [Previous sacral surgery] [0002] When the digital camera is shooting dynamically, it is necessary to focus on the shooting scene immediately. That is, the digital camera needs to adjust the focus position instantly according to the change of the shooting scene. [0003] However, in some cases, such as digital camera lens shake or shooting scenes: changes in the light environment, etc., although the shooting scene changes, but the imaging of the shooting scene is still within the depth of field. This guess ten, g's section (adjusting the focus position to drive the focus motor, more than the dragon) 11 palm (frequently adjust the focus position to reduce the stability of the screen), do not want the digital camera to adjust the focus position, tracking can be ignored Shoot scene changes. SUMMARY OF THE INVENTION [0004] In view of the above, it is necessary to provide an automatic focus system and an autofocus method that are energy efficient and can improve picture stability. [0005] An autofocus system, comprising: [0006] a lens for optical imaging; [0007] a photosensitive element for sensing an imaged optical signal of the lens and converting it into a signal form of a television signal; [0008] Actuator for driving the lens to change the focus position; [0009] calculation module for calculating the contrast of the picture produced by the photosensitive element 096126554 Form No. 1010101 Page 4 / Total 23 Page 0993457638-0 December 099 23rd revised replacement page 1339308 valuation; [0010] a focus module for determining the best focus position of the lens based on the calculation result of the calculation module, and controlling the actuator to drive the lens to the best Focusing position to achieve focusing; and [0011] determining module, configured to determine whether the difference between the contrast evaluation values of the adjacent two frames calculated by the calculating module exceeds a preset domain value after the focus is achieved, and Controlling the actuator to drive the lens to refocus if the difference exceeds the preset field value. [0012] An autofocus method comprising the following steps: [0013] focusing; ..V! \ [0014] calculating the contrast of two adjacent frames of pictures 'breaking; [0015] determining the contrast evaluation of the two frames of pictures Whether the difference in value exceeds the preset field value; [0016] If the difference exceeds the preset field value; then: return to the focus step; and 1- 1 [0017] If the difference does not exceed the preset field value, then 'transport: back : This calculation step. [0018] The autofocus method of the present invention determines whether the difference between the contrast evaluation values of the adjacent two frames is within the preset domain value after the focus is achieved, to determine whether the change of the screen is within an acceptable range. Then decide whether to refocus. In this way, the autofocus system using the autofocus method can avoid the image changes that can be accepted by frequent focus tracking, achieving energy saving and improving picture stability. [Embodiment] Referring to Figure 1, the autofocus system 100 of the preferred embodiment includes a lens 11 096126554 Form No. A0101 Page 5 of 23 0993457638-0 1339308 [03⁄4年12月23 ά Press the replacement page 1 photosensitive member 12, actuator 13, calculation module 14, focus module (7) and judgment handle set 16. The lens U is used for optical imaging. The photosensitive member 12 is used to sense the imaged optical signal of the lens 11 and convert it into a picture in the form of an electrical signal. The actuator 13 is used to drive the lens U to change the focus position. The calculation module 14 is used to calculate the contrast evaluation value of the picture generated by the photosensitive member 12. The focusing module 15 is configured to obtain the optimal focus position of the lens according to the calculation result of the calculation module 14, and (4) actuate the _ mirror to 1 (four) the best focus position to achieve focusing. The determining module 16 is configured to determine, after the focus is achieved, whether the difference between the contrast evaluation values of the adjacent two frames of the calculation module 14 si calculated exceeds the preset domain value 'and if the difference exceeds the preset domain value The control actuator 13 drives the lens 11 to refocus. [〇〇2〇] Please refer to FIG. 2, the lens 11 includes an imaging lens 112 on the transmission guide 111; the photosensitive element 丨2 adopts a charge-coupled device (CCD), and is disposed on the image side of the lens 11; The actuator 13 adopts a rotary stepping motor. The rotating shaft of the rotary stepping motor is coupled to the transmission rail 111 to drive the transmission rail lu to drive the imaging lens 112 to move on the transmission rail 111. The rotary stepping motor cooperates with the drive rail 111 such that the imaging lens u 2 has four focus positions Pb P4 in the focus range L. [〇〇21] Of course, the arrangement of the lens 11, the photosensitive element 12, and the attendant 13 is not limited to this embodiment, and other settings may be employed. For example, a linear stepping motor is used instead of the drive rail 111 and the rotary stepping motor, and the voice coil motor and the guide rail are used instead of the rotary stepping motor and the transmission guide 111, and a complementary metal oxide semiconductor (CMOS) is used. Sensor instead of CCD, set the number of more or less focus 0 trillion 126554 Form Compilation A0101 0993457638-0 Page 6 / Total 23 Page 1339308 099 1Z 23 23 Miserable jE replacement page position. [0022] The calculation module 14, the focus module 15 and the determination module 16 can be built in the image signal processor 22 (ISP), and the ISP 22 is disposed at the back end of the photosensitive element 丨2. The isp22 uses a programmable smart chip that performs functions such as reading, computing, comparison, and judgment. [0023] Of course, the setting of the computing module 14, the focusing module 15 and the determining module 16 is not limited to the embodiment, and the computing module 丨4, the focusing module 15 and the determining module 16 can be built in separately. In the plural dedicated wisdom chip. [0024] Specifically, the autofocus system 100 further includes an acquisition module 17, a storage module 20, and a comparison module 21. The acquisition module: 17 is used to capture the picture generated by the photosensitive element 12 for calculation by the calculation module 4. The storage module _ 20 is used to store the calculation result of the calculation module 14 for reading and outputting the focus mode <| The comparison module 21 is configured to compare the difference between the contrast evaluation values of the adjacent two frames calculated by the calculation module 14 after the focus is achieved, for the determination module 16 to determine. [0025] The following is an example of how to calculate the written contrast evaluation value produced by the sensor element 12 in conjunction with FIG. [0026] G is a picture represented by a gray scale form, and is a gray scale value (m, η is a natural number, the same below) of a pixel of the nth row in the mth column of the screen G. As an example, the present embodiment The picture G of the example has a total of 5 x 5 pixels. The calculation module 14 calculates the contrast array 画面 of the picture G according to the formula 23, where e is the element of the mth column and the nth line in the contrast array E. The contrast evaluation value of the picture G corresponds to the contrast array ( (for example, the contrast evaluation value of the picture G is equal to the sum of the elements of the contrast array )). It can be seen that the contrast evaluation table of the picture g is 096126554. Form number Α 0101 page 7 / 23 pages 0993457638-0 1339308 [0027] [0030] [0031] 1 m mm _ «» — Λ I | The degree of contrast between the brightness of each pixel in the picture G and the surrounding pixels. It can be understood that for the same shooting scene, the clearer the picture, the larger the contrast evaluation value of the picture, and when the imaging lens 112 is in the best focus position, the photosensitive element 12 will sense the clearest imaging light signal and produce the clearest. The picture. Therefore, the focus module 15 can obtain the corresponding best focus position by obtaining the maximum contrast evaluation value in the contrast evaluation value (corresponding to the complex focus position) of the plurality of pictures. It can be understood that 'the change of the contrast value of the picture is small for the change of the shooting scene caused by the jitter or the change of the light environment. By judging the difference of the contrast evaluation values of the two adjacent frames before and after, the judgment is made: relative to the front frame ( Corresponding to the previous shooting scene), whether the main breakage of the broken bridge has changed significantly (corresponding to the next shooting scene), and then it is painful. Preferably, the autofocus system 100 further includes a cutting module 18 and a weighting module 19. The cutting module 18 is configured to cut the image generated by the photosensitive element 丨2 into a plurality of regions, and the calculation module 14 calculates a contrast evaluation value of each region (ie, the sum of the elements of the contrast array corresponding to the region) to obtain a corresponding frame image. The area contrast array facilitates the subsequent weighting module 丨9 to weight different regions of the picture to different degrees to achieve the purpose of highlighting the focus center. The weighting module 19 is configured to generate a weight array, and use the weight array to perform a weighting operation on the area contrast array to obtain a weighted contrast array corresponding to the contrast evaluation value of the frame picture. Referring to Fig. 4, the picture G is still taken as an example to illustrate how to calculate the weighted contrast array of the picture G. As an example, the cutting module 18 of the embodiment cuts the screen G into nine areas 096126554. Form number A0101 Page 8 / Total 23 pages 0993457638-0 1339308 After December 23, 2010, the page area is being replaced, and the calculation module 14 calculates The contrast evaluation value of each area is obtained by the area contrast array ES, the weighting module 19 generates the weight array W, and the weighted contrast array WE is obtained by weighting the area contrast array ES by the formula 24, and the contrast evaluation of the weighted contrast array WE corresponding to the picture G is performed. The value (eg, the contrast evaluation value of the picture G is equal to the sum of the elements of the contrast array E). Where w, es, and we are the mth column of W, ES, and WE, respectively, and the elements of the η m n m n m η row. [0032] The weight array W may be pre-built in the ISP 22, and preferably, a plurality of types of weight arrays may be pre-established, such as a central type (central weight) and an average type (large weights, etc.) for the user to The environment selects the appropriate type of weight array. [0033] It can be understood that the larger the element of the weight array W, the greater the weight of the contrast evaluation value of the corresponding area in the contrast evaluation value of the entire picture G, and the resolution of the corresponding area affects the definition of the entire picture G. The bigger. That is, after the screen G is cut and the weight of the cut portion is appropriately weighted, the layering of the image G can be improved, and the focus center can be highlighted. The acquisition module 17, the cutting module 18, the weighting module 19, the storage module 20, and the comparison module 21 can be built into the ISP 22 or built into a dedicated smart chip. [0035] It can be understood that the calculation form of the contrast evaluation value of the embodiment is only used to describe the physical meaning of the contrast evaluation value, and the calculation form of the contrast evaluation value is not limited to the embodiment, and other calculation forms may be used to calculate each pixel of the representation picture. The feature value of the degree of contrast with the surrounding pixels is used as the contrast evaluation value of the screen. 096126554 Form number Α0101 Page 9 of 23 0993457638-0 m9308

I 099年12月23日资正营疾頁II December 23, 2010, Zizheng Camp Page I

[0036] 請參閱圖5,較佳實施例之自動對焦方法包括以下步驟: [0037] S01 :對焦; [0038] S02 :計算相鄰兩幀畫面之對比度評估值; [0039] S03 :判斷該兩幀畫面之對比度評估值之差異是否超出預 設域值; [0040] 若差異超出預設域值;則返回步驟S01(對焦);及 [0041] 若差異未超出預設域值,則返回步驟S02(計算相鄰兩幀 畫面之對比度評估值)。 [0042] 具體地,在執行自動對焦方法過程中,若氣動對焦系統 ,. . ... 1 00接收到用戶發出之中斷則#丨束自動對焦方法。 [0043] 請參閱圖6,步驟SO 1 (對焦)包括以下子步驟: [0044] S011 :遍尋複數對焦位置以獲取對應之複數幀畫面; [0045] SO 1 2 :計算每幀畫面之對比度評估值;及 [0046] S013 :依據計算之該複數幀畫面之對比度評估值求取最 佳對焦位置;及 [0047] SO 1 4 :返回最佳對焦位置。 [0048] 請結合圖2,對於步驟S011(遍尋複數對焦位置以獲取對 應之複數幀畫面),致動器13驅動成像鏡片11 2遍尋四個 對焦位置P1〜P4,對應每一對焦位置,獲取模組17獲取感 光元件12產生之對應畫面(圖未示)。 [0049] 請結合圖7,計算每幀畫面之對比度評估值包括以下子步 096126554 表單編號A0101 第10頁/共23頁 0993457638-0 1339308 099年12月23日後正替換頁 驟: [0050] S0121 :將該幀畫面切割為複數區域; [0051] S0122 :計算每一區域之對比度評估值以得到對應該幀畫 面之區域對比度陣列;及 [0052] S0123 :對該區域對比度陣列作加權運算得到對應該幀畫 面之加權對比度陣列。 [0053] 通過切割模組18、計算模組14及加權模組19協作,計算 對應對焦位置P卜P4之四幀畫面之對比度評估值並存儲於 存儲模組20。 [0054] 對於步驟S01 3(依據計算之致複數幀畫面之對比度評估值 求取最佳對焦位置),求焦模徒存*取模組20讀取對應 對焦位置P卜P4之四個對比度評估值,並求取其中之最大 對比度評估值,該最大對比度評估值對應之對焦位置即 為最佳對焦位置。 [0055] 對於步驟S014(返回最佳對焦位置),求焦模組15控制致 動器13驅動成像鏡片112移'動表佳對焦位置。 [0056] 可以理解,步驟S01(對焦)並不限於本實施例,可採用其 他之對焦方法實現對焦,如主動式對焦方法(如紅外測距 )或其他被動式對焦方法(如相位法)。 [0057] 請參閱圖8,記實現對焦之畫面為F0,重新對焦前感光元 件12持續產生之畫面為F, (k為自然數)。 k [0058] 步驟S02(計算相鄰兩幀畫面之對比度評估值)首先計算畫 面及Fji對比度評估值WE()&WE1並存儲於存儲模組20 096126554 表單編號A0101 第11頁/共23頁 0993457638-0 1339308[0036] Referring to FIG. 5, the autofocus method of the preferred embodiment includes the following steps: [0037] S01: focus; [0038] S02: calculating a contrast evaluation value of two adjacent frames; [0039] S03: determining the Whether the difference of the contrast evaluation values of the two frames exceeds the preset field value; [0040] if the difference exceeds the preset field value, return to step S01 (focus); and [0041] if the difference does not exceed the preset field value, return Step S02 (calculating the contrast evaluation value of the adjacent two frames of pictures). [0042] Specifically, in the process of performing the autofocus method, if the pneumatic focus system, . . . 1 00 receives the interruption issued by the user, the #丨beam autofocus method. Referring to FIG. 6, step SO1 (focus) includes the following sub-steps: [0044] S011: searching for a plurality of focus positions to obtain a corresponding multi-frame picture; [0045] SO 1 2: calculating a contrast ratio of each frame Evaluation value; and [0046] S013: determining the best focus position according to the calculated contrast evaluation value of the complex frame picture; and [0047] SO 1 4 : returning to the best focus position. [0048] Referring to FIG. 2, for step S011 (passing through the multiple focus positions to obtain the corresponding complex frame picture), the actuator 13 drives the imaging lens 11 to find four focus positions P1 PP4, corresponding to each focus position. The acquisition module 17 acquires a corresponding picture (not shown) generated by the photosensitive element 12. [0049] Please refer to FIG. 7 to calculate the contrast evaluation value of each frame including the following substep 096126554 Form No. A0101 Page 10 / Total 23 Page 0993457638-0 1339308 After December 23, 2010, the page is replaced: [0050] S0121 : cutting the frame picture into a complex area; [0051] S0122: calculating a contrast evaluation value of each area to obtain an area contrast array corresponding to the frame picture; and [0052] S0123: weighting the contrast array of the area to obtain a pair A weighted contrast array of frame pictures should be used. [0053] Through the cooperation of the cutting module 18, the calculation module 14 and the weighting module 19, the contrast evaluation values of the four frames corresponding to the focus position P and P4 are calculated and stored in the storage module 20. [0054] For step S01 3 (according to the calculation of the contrast evaluation value of the complex frame picture to obtain the best focus position), the focus mode is taken to read the four contrast evaluations of the corresponding focus position P and P4. The value and the maximum contrast evaluation value is obtained, and the focus position corresponding to the maximum contrast evaluation value is the best focus position. [0055] For step S014 (returning to the best focus position), the focus module 15 controls the actuator 13 to drive the imaging lens 112 to move to the motion better focus position. It can be understood that step S01 (focusing) is not limited to the embodiment, and focusing can be achieved by other focusing methods, such as an active focusing method (such as infrared ranging) or other passive focusing methods (such as phase method). [0057] Referring to FIG. 8, the screen for realizing the focus is F0, and the screen for continuously generating the photosensitive element 12 before refocusing is F, (k is a natural number). [0058] Step S02 (calculating the contrast evaluation value of the adjacent two frames of pictures) First, the picture and the Fji contrast evaluation value WE() & WE1 are calculated and stored in the storage module 20 096126554 Form No. A0101 Page 11 of 23 0993457638-0 1339308

12月日修正替换頁I 。步驟S 0 3 (判斷該兩幀畫面之對比度評估值之差異是否 超出預設域值)從存儲模組20讀取▽£()及\^1,對比兩個對 比度評估值WE〇及WEi之差異D〇,技判斷差異Dq否超出(大 於)預設域值T。在判斷得差異DQ未超出(大於)預設域值丁 後’返回步驟S02計算畫面F及F之對比度評估值WE及 1 1 1 WE2 ’並進入步驟S03。如此迴圈,直至判斷得畫面f與 k 前幀畫面之差異Dk_】超出預設域值T,則返回步驟s〇i(對 焦)。 [0059] [0060] [0061] 上述流程基於以下考慮: 差異超出預設域值T,說明f气拍攝場景相對於 前幀畫面之拍攝場景發生不亏忽〈略,:需重新對隹 場' :.. .、、、 。判斷模組16控制致動器1綠重新遍尋複 數對焦位置P卜P4,即,回到步驟S01 (對焦)。 重新對焦前,相鄰兩幀畫面之對比度評估值之差異未超 出預設域值T,說明每幀畫面之耠攝,塲景相對於前幀畫面 之拍攝場景之變化可以忽略,無需重新對焦。計算模組 14計算後續畫面間之差異,即,返:回步驟s〇2(計算相鄰 兩幀畫面之對比度評估值)。 [0062] 預設域值T之取值視需求而定,具體地,可對應感光元件 12在鏡頭11之景深範_產生之畫面之對比度評估值之 變化範圍設定。 本發明之自㈣焦方法在實現對焦後,_相鄰兩賴畫 面之對比度評估值之差異是^在預設域值内,以判斷畫 面之變化是否在可接受之範圍内,進而決定是否重新; 096126554 表單編號A0101 第12頁/共23頁 0993457638-0 [0063] 1339308 099年12月23日核正替換頁 焦。如此,可避免採用該自動對焦方法之自動對焦系統 頻繁對焦追蹤可以接受之畫面變化,達節能及提高畫面 穩定度之效果。 [0064] 综上所述,本發明確已符合發明專利要件,爰依法提出 專利申請。惟,以上所述者僅為本發明之較佳實施方式 ,舉凡熟悉本案技藝之人士,於援依本案發明精神所作 之等效修飾或變化,皆應包含於以下之申請專利範圍内 〇 【圖式簡單說明】 [0065] 圖1為較佳實施例的自動對焦系統的功能模組示意圖; [0066] 圖2為圖1所示的自動對焦系森的硬體連接示意圖; ;; .The replacement page I is corrected on December. Step S 0 3 (determining whether the difference between the contrast evaluation values of the two frames exceeds the preset field value) reads (£() and \^1 from the storage module 20, and compares the two contrast evaluation values WE〇 and WEi The difference D〇, the technical judgment difference Dq exceeds (greater than) the preset domain value T. After judging that the difference DQ has not exceeded (greater than) the preset field value, the processing returns to step S02 to calculate the contrast evaluation values WE and 1 1 1 WE2 ' of the pictures F and F and proceeds to step S03. In this way, until it is judged that the difference Dk_] between the picture f and the k previous frame is beyond the preset field value T, the process returns to step s〇i (focus). [0060] [0061] The above process is based on the following considerations: The difference exceeds the preset domain value T, indicating that the shooting scene of the f-gas shooting scene is not lost relative to the shooting scene of the previous frame picture (slightly: need to re-send the field) :.. .,,,. The judging module 16 controls the actuator 1 to re-see the complex focus position P P4, i.e., return to step S01 (focus). Before refocusing, the difference between the contrast evaluation values of the adjacent two frames does not exceed the preset field value T, indicating that the frame of each frame is captured, and the change of the scene relative to the shooting scene of the previous frame is negligible, and there is no need to refocus. The calculation module 14 calculates the difference between subsequent frames, i.e., returns to step s〇2 (calculates the contrast evaluation value of the adjacent two frames). The value of the preset domain value T depends on the demand, and specifically, can be set corresponding to the range of variation of the contrast evaluation value of the image generated by the depth of field image of the lens 11 . After the (four) focus method of the present invention realizes focusing, the difference between the contrast evaluation values of the adjacent two images is ^ within the preset domain value to determine whether the change of the picture is within an acceptable range, thereby determining whether to re- ; 096126554 Form No. A0101 Page 12 of 23 0993457638-0 [0063] 1339308 December 23, 099, the nuclear replacement page focus. In this way, the autofocus system using the autofocus method can avoid the image changes that can be accepted by frequent focus tracking, achieving energy saving and improving picture stability. [0064] In summary, the present invention has indeed met the requirements of the invention patent, and has filed a patent application according to law. However, the above description is only a preferred embodiment of the present invention. Any equivalent modifications or variations made by the person skilled in the art of the present invention should be included in the following claims. BRIEF DESCRIPTION OF THE DRAWINGS [0065] FIG. 1 is a schematic diagram of a functional module of an autofocus system according to a preferred embodiment; [0066] FIG. 2 is a schematic diagram of a hardware connection of the autofocus system shown in FIG.

[0067] 圖3為對比度陣列的計算原理示意圖; [0068] 圖4為加權對比度陣列的計算原理示意圖; [0069] 圖5為較佳實施例的自動對焦、方法的流程圖; [0070] 圖6為圖5所示的流程圖的一個子流程圖; [0071] 圖7為計算加權對比度陣列的流程圖; [0072] 圖8為較佳實施例的自動對焦方法原理示意圖。 【主要元件符號說明】 [0073] 自動對焦系統:100 [0074] 判斷模組:16 [0075] 鏡頭:11 [0076] 獲取模組:17 096126554 表單編號A0101 第13頁/共23頁 0993457638-0 1339308 I 099年12月23日移正替换w [0077] 傳動導軌:111 [0078] 切割模組:18 [0079] 成像鏡片:112 [0080] 加權模組:19 [0081] 感光元件:12 [0082] 存儲模組:20 [0083] 致動器:13 [0084] 比對模組:21 [0085] >Ί :': ;- 計算模組:14 k 1, : [0086] ....... • , *1 *-,”,.·一-· — w k _··^»·: ·.··· ·'··» T " ISP : 22 [0087] 求焦模組:15 [0088] 公式:23、24 096126554 表單編號A0101 第14頁/共23頁 0993457638-03 is a schematic diagram of a calculation principle of a contrast array; [0068] FIG. 4 is a schematic diagram of a calculation principle of a weighted contrast array; [0069] FIG. 5 is a flow chart of an autofocus method according to a preferred embodiment; [0070] 6 is a sub-flowchart of the flowchart shown in FIG. 5; [0071] FIG. 7 is a flowchart for calculating a weighted contrast array; [0072] FIG. 8 is a schematic diagram showing the principle of the autofocus method of the preferred embodiment. [Main component symbol description] [0073] Autofocus system: 100 [0074] Judgement module: 16 [0075] Lens: 11 [0076] Get module: 17 096126554 Form number A0101 Page 13 / Total 23 page 0993457638-0 1339308 I December 23, 099 shifting replacement w [0077] drive rail: 111 [0078] cutting module: 18 [0079] imaging lens: 112 [0080] weighting module: 19 [0081] photosensitive element: 12 [ 0082] Storage Module: 20 [0083] Actuator: 13 [0084] Alignment Module: 21 [0085] > Ί : ': ;- Calculation Module: 14 k 1, : [0086] ... .... • , *1 *-,",.·一-· — wk _··^»·: ····· ····» T " ISP : 22 [0087] Seeking module :15 [0088] Formula: 23, 24 096126554 Form No. A0101 Page 14 of 23 0993457638-0

Claims (1)

1339308 099年12月23日樓正替换頁 七、申請專利範圍: 1 . 一種自動對焦系統,其包括: 鏡頭,用於光學成像; 感光元件,用於感測該鏡頭之成像光訊號並轉化為電訊號 形式之畫面; 致動器,用於驅動該鏡頭改變對焦位置; 計算模組,用於計算該感光元件產生之晝面之對比度評估 值; 求焦模組,用於依據該計算模組之計算結果求取該鏡頭之 最佳對焦位置,並控制該致動器驅動該鏡頭至該最佳對焦 位置以實現對焦;及 Λ .. 判斷模組,用於在實現對焦後;,判,斷·讓計算模組計算之相 鄰兩幀畫面之對比度評估值之差異是否超出預設域值,並 在該差異超出該預設域值之情況下控制該致動器驅動該鏡 頭重新對焦。 2 .如申請專利範圍第1項所述之自動對焦系統,其中,該鏡 頭包括傳動導轨及設於傳動.導軌上之成像鏡片,該傳動導 軌具有多個對焦位置。 3 .如申請專利範圍第1項所述之自動對焦系統,其中,該感 光元件採用電荷耦合器或補充性金屬氧化物半導體感測器 〇 4 .如申請專利範圍第1項所述之自動對焦系統,其中,該致 動器採用步進馬達。 5 .如申請專利範圍第1項所述之自動對焦系統,其中,該系 統還包括獲取模組,用於獲取該感光元件產生之畫面以供 096126554 表單編號Α0101 第15頁/共23頁 0993457638-0 ^359308 卩99年23日粒雜百I 該計算模組計算。 --1 .如申請專利範圍第1項所述之自動對焦系統,其中,該系 統進一步包括: 如申請專利範圍第1項所述之自動對焦系統,其中,該系 統還進-料括有存職組存解料模組之計算 結果,以供該求焦模組及 如申請專利範圍第1項所述其中,該系 統還包括有比對模組,用於在實現對焦後,比對該計算模 組計算之相鄰兩幀畫面之對比度評估值之差異以供該判 斷模組判斷。 .一種自動對焦方法,其包括以下步驟: 對焦; 計异相鄰兩幀畫面之對比度評估值; 判斷該兩㈣面之對比度評估值之差異〇超出預設域值 若差異超出預設域值;則返回該對焦步驟;及 若差異未超出預設域值,則返回該計算步驟。 10,如申請專利範圍第9項所述之自動對焦方法,其中,該對 焦步驟包括以下子步驟: 096126554 切割模組,用於將該感光元件產生之畫面切割為複數區域 ;該計算模料算H収對比度冊值以糾對應該 中貞畫面之區域對比度陣列;及 加權模組,用於產生權重陣列,並對該區域對比度陣列進 行加權運算以得到對應該區域對比度陣列之加權對比度陣 列’該加權對比度_與_畫面之對比度評估值對應。 遍尋複數對焦位置以獲取對應之複數幀畫面; 0993457638-0 表單編號A0101 第16頁/共23頁 1339308 099年12月23日按正餅頁 計算每幀畫面之對比度評估值; 依據计具之該複數幀畫面之對比度評估值求取最佳對焦位 置;及 返回最佳對焦位置。 U .如申請專利範圍第9項所述之自動對焦方法,其中,該對 焦步驟採用相位法自動對焦方法或紅外測距對焦方法。 12 .如申請專利範圍第9項所述之自動對焦方法,其中,計算 —幀畫面之對比度評估值包括以下子步驟: 將該幀畫面切割為複數區域; 計算每一區域之對比度評估值以得到對應該幀畫面之區域 對比度陣列;及 對該區域對比度陣列作加權運算^到如權對比度陣列; 其中,該加權對比度陣列與該幀^面之對比度評估值對應 〇 如申請專利範圍第12所述之自動對焦方法,其中,該對比 度評估值與該加權對比度陣列對應。 14 .如申請專利範圍第9所述之自動對焦方法,其中,該對比 度評估值表徵畫面中每-像素與周圍像素之亮度比對程度 〇 15 .如申請專利範圍第9或1〇項所述之自動對焦方法其中, 每-計算步驟後還包括-存儲步驟,用於存儲該計算步驟 之計算結果。 16 ·如申請專利範圍第9項所述之自動對焦方法,其中,該方 法在接收到中斷訊號後結束。 096126554 表單編號A0101 第17頁/共23頁 0993457638-01339308 December 23, 099, the replacement of the building page VII, the scope of application for patents: 1. An autofocus system, comprising: a lens for optical imaging; a photosensitive element for sensing the imaging optical signal of the lens and converted into a signal in the form of a signal; an actuator for driving the lens to change the focus position; a calculation module for calculating a contrast evaluation value of the surface generated by the photosensitive element; a focus module for using the calculation module Calculating the best focus position of the lens, and controlling the actuator to drive the lens to the optimal focus position for focusing; and Λ.. determining module for achieving focus; Breaking whether the difference between the contrast evaluation values of the adjacent two frames calculated by the calculation module exceeds the preset field value, and controls the actuator to drive the lens to refocus if the difference exceeds the preset field value. 2. The autofocus system of claim 1, wherein the lens comprises a drive rail and an imaging lens disposed on the drive rail, the drive rail having a plurality of in-focus positions. 3. The autofocus system of claim 1, wherein the photosensitive element employs a charge coupler or a complementary metal oxide semiconductor sensor 〇4. The autofocus of claim 1 is as described in claim 1. A system wherein the actuator employs a stepper motor. 5. The autofocus system of claim 1, wherein the system further comprises an acquisition module for acquiring a picture generated by the photosensitive element for 096126554 form number Α0101 page 15/23 pages 0993457638- 0 ^359308 卩99年23日粒杂百I The calculation module is calculated. The autofocus system of claim 1, wherein the system further comprises: the autofocus system of claim 1, wherein the system further includes The calculation result of the job storage module is provided for the focus module and as described in item 1 of the patent application scope, the system further includes a comparison module for comparing the focus The difference between the contrast evaluation values of the adjacent two frames calculated by the calculation module is determined by the determination module. An autofocus method comprising the steps of: focusing; determining a contrast evaluation value of two adjacent frames; determining a difference between the two (four) plane contrast evaluation values exceeding a preset field value if the difference exceeds a preset field value; Return to the focus step; and return to the calculation step if the difference does not exceed the preset field value. The autofocus method of claim 9, wherein the focusing step comprises the following substeps: 096126554 a cutting module for cutting a picture generated by the photosensitive element into a plurality of regions; H receives the contrast value to correct the area contrast array of the middle picture; and the weighting module is used to generate the weight array, and weights the area contrast array to obtain a weighted contrast array corresponding to the area contrast array' The weighted contrast_ corresponds to the contrast evaluation value of the _ picture. Searching for the multiple focus positions to obtain the corresponding multiple frame picture; 0993457638-0 Form No. A0101 Page 16 of 23 1339308 December 23, 2010 Calculate the contrast evaluation value of each frame according to the pie page; The contrast evaluation value of the plurality of frame pictures is used to obtain the best focus position; and the best focus position is returned. The autofocus method of claim 9, wherein the focusing step uses a phase autofocus method or an infrared ranging focus method. 12. The autofocus method of claim 9, wherein calculating a contrast evaluation value of the frame picture comprises the following substeps: cutting the frame picture into a plurality of regions; calculating a contrast evaluation value for each region to obtain Corresponding to the area contrast array of the frame picture; and weighting the contrast array of the area to the weight contrast array; wherein the weighted contrast array corresponds to the contrast evaluation value of the frame surface, as described in claim 12 The autofocus method, wherein the contrast evaluation value corresponds to the weighted contrast array. 14. The autofocus method of claim 9, wherein the contrast evaluation value characterizes a degree of luminance contrast between each pixel and surrounding pixels in the picture 〇15. As described in claim 9 or 1 The autofocus method includes, after each calculation step, a storage step for storing the calculation result of the calculation step. The autofocus method of claim 9, wherein the method ends after receiving the interrupt signal. 096126554 Form No. A0101 Page 17 of 23 0993457638-0
TW96126554A 2007-07-20 2007-07-20 Auto-focusing system and auto-focusing method TWI339308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW96126554A TWI339308B (en) 2007-07-20 2007-07-20 Auto-focusing system and auto-focusing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW96126554A TWI339308B (en) 2007-07-20 2007-07-20 Auto-focusing system and auto-focusing method

Publications (2)

Publication Number Publication Date
TW200905351A TW200905351A (en) 2009-02-01
TWI339308B true TWI339308B (en) 2011-03-21

Family

ID=44722701

Family Applications (1)

Application Number Title Priority Date Filing Date
TW96126554A TWI339308B (en) 2007-07-20 2007-07-20 Auto-focusing system and auto-focusing method

Country Status (1)

Country Link
TW (1) TWI339308B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI465790B (en) * 2012-07-23 2014-12-21 Altek Corp Real-time auto-focus apparatus and method thereof
TWI468772B (en) * 2013-05-27 2015-01-11 Hon Hai Prec Ind Co Ltd Device and method for taking photographs
TWI472864B (en) * 2013-07-19 2015-02-11 Htc Corp Image processing device and method for controlling the same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI465790B (en) * 2012-07-23 2014-12-21 Altek Corp Real-time auto-focus apparatus and method thereof
TWI468772B (en) * 2013-05-27 2015-01-11 Hon Hai Prec Ind Co Ltd Device and method for taking photographs
TWI472864B (en) * 2013-07-19 2015-02-11 Htc Corp Image processing device and method for controlling the same
US9088708B2 (en) 2013-07-19 2015-07-21 Htc Corporation Image processing device and method for controlling the same

Also Published As

Publication number Publication date
TW200905351A (en) 2009-02-01

Similar Documents

Publication Publication Date Title
JP5688545B2 (en) Focus system, interchangeable lens and imaging device
JP4528235B2 (en) Digital camera
US20160044233A1 (en) Image capturing apparatus capable of storing focus detection data
JP5397751B2 (en) Camera and image correction method
US20050157180A1 (en) Image sensing system and its control method
JP5967544B2 (en) Lens barrel, imaging device, and camera
CN108989647A (en) Based on Dual-Aperture zoom digital camera
JP2007241288A (en) Auto-focusing method and auto-focusing apparatus using the same
JP2010263619A (en) Dual lens digital zoom
US20050052564A1 (en) Image-taking apparatus and focus control program for image-taking apparatus
TW200810533A (en) Digital imaging apparatus with camera shake compensation and adaptive sensitivity switching function
JP2007264396A (en) Camera system
CN103168271A (en) Image capture device, semiconductor integrated circuit, and image capture method
JPH05257062A (en) Automatic focusing device
JP6249636B2 (en) Imaging apparatus and control method thereof
JP2012037574A (en) Electronic imaging apparatus
TWI339308B (en) Auto-focusing system and auto-focusing method
JP5744581B2 (en) Imaging apparatus and control method thereof
US8582016B2 (en) Photographing apparatus and focus detecting method using the same
JP2006235142A (en) Autofocus controller, autofocus control method and camera with autofocus controller
JP2016142924A (en) Imaging apparatus, method of controlling the same, program, and storage medium
JP2005140851A (en) Autofocus camera
JP2002333568A (en) Imaging device
JP2004120582A (en) Camera
WO2012090348A1 (en) Lens barrel, image pickup device, and camera

Legal Events

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