201026035 九、發明說明: 【發明所屬之技術領域】 _種自動難綠及魏錄健置,制是在於高雜訊環 . 境下的自動對焦方法及應用其方法的數位取像裝置。 【先前技術】 隨著數位相機的發展,攝影不再是昂貴的消費。使用者可以 隨意的拍攝所要的影像,用以記錄值得紀念的一刻或景象。一般 ❹而言’進行拍攝時為能清晰成像,大部分的相機中都具備了自動 對焦的功能。 習知的對焦技術,請參考「第la圖」所示,係在不同的物距 娜相對細触雜,數帅齡針縣—驗鄉像計算對 焦框内的高親號’制如「第lb圖」所示之物距與高頻訊號曲 線圖。接著利用習知的曲線逼近(curve mting)與求值技術找到 高頻喊最大值所減翻物距,此㈣最佳難物距。最後將 鏡頭對焦群組移至該最佳對焦位置,完成對焦。 但在低光_境需用高感光度⑽)條件拍_,數位影像容 易出雜訊(noise)。習知的去雜訊演算法的去雜訊能力對低照度且 高感光度的條件所擷取的數位影像,去雜訊演算法的雜訊抑^效 果是相當有_。而且數位影像中景物的細節通常也被模糊化, 使得數位相機的自動對錢組在雜極高的場合仍無法取得有效 的高頻訊號。在此種狀況下,習知的對焦技術容易得到如「第化 201026035 圖」所示之物距與高頻訊號曲線圖,在圖中 _ t亚無明顯之整體最大 是最準確的 【發明内容】 值(global maximum)存在,導致自動對焦程序決定的對焦物距不 鑒於以上的問題,本發明的主要目的在於提供一種在高雜訊 環境下的自動對焦方法。 ’° 為達上述目的,本發明所提出的自動對焦方法,其包括下列 〇步驟:在最遠物距以第—曝光條件拍攝—第—最遠物距影像與以 第二曝光條件拍攝—第二最遠物距影像;在該數位取像裝置的一 最近物距以第-曝光條件拍攝一第一最近物距影像與以第二曝光 條件拍攝-第二最近植雜;分別在最遠物距及最近物距外的m 個不同物距以第-曝絲件擷取相應的一數位影像;共計在最遠 物距、最近物距與Μ個不同物距以第一曝光條件擷取㈣張,以 •第二曝光條件擷取2張數位影像,儲存於儲存單元中。 接著载入以第一曝光條件拍攝的M+2張數位影像;將每N張 (隨2)触影像進时加產生(M_N+3)張合成影像;重新定義這 (M-N+3)張合成影像相對應的物距;計算這(M_N+3)張合成影像對 焦區域内的高頻訊號; 接著載入以第二曝光條件拍攝的2張數位影像;計算這2張 〜像對焦區域内的高頻訊號;這二張的物距,亦即最遠物距與最 近物距,不需重新決定。將此高頻信號與物距的關係合併入前段 ❹ ❹ 201026035 :::::’7屬仔之域信號與其相對應物距的關係中,·並據 == 爾輸^_錄距;將自 動對…、鏡頭移動至最佳對焦物距,完成對焦。 =提供’高_魏爾自峨之數位取像裝 ’了係用於決定該數位取像裝置與被攝物的物距。 為達上述目的’本發騎提出的數絲像裝置包括有:自動 對焦鏡頭、感光元件、儲存單元與微處驾 調整數位树W攝制―以元制《鱗 像裝置的簡魏無攝物之亮度,並將鋪物之紐轉換成電 减號;儲存單元用以儲存複數張數位影像;微處理器電性連接 於感2件與儲存單元。微處理器内至少包含影像疊加單元、物 距重設單元、高觀號計料元與最鱗纽置決定單元。 有關本發日㈣特徵與實作,兹配合圖示作最佳實施例詳細說 明如下。 【實施方式】 為能清楚綱树明之基本運作祕,請參考「f 2a圖」所 示首先在最遠物距以第一曝光條件拍攝第一最遠物距影像201a 與以第二曝絲件賴第二最遠物妈彡像2Glb;分別最遠物距及 最近物距外在Μ個不同物距(在此作叉設「第2a圖」中M=8)以第一 曝光條件擷取相應的數位影像,如「第2a圖」所示之複數張數位 衫像(即為「第2a圖」中的第一數位影像2〇2、第二數位影像203、 201026035 第三數位影像綱、第四數位影像挪、第五數位影像挪、第丄 數位影像207、第七數位影像施與第八數位影像_。以數位 取像裝置的最小物距在第-曝光條件下,拍攝第—最近物距影像 210a ;再以第二曝光條件拍攝第二最近物距影像拠。以第一曝 ❹ 光條件共娜Π)張(M制0)。每一張數位影像皆具有相應的第 Μ物距位置Sm ’·第-最遠物距影像201a與第二最遠物距影像娜 之相對物距係為Sl ;第-數位影像2〇2的相對物距為&,·第二數 位影像203的相對物距為S3;第三數位影像2〇4的相對物距為& ; 第四數位影像205的相對物距為Ss ;第五數位影像施的相對物 距為S6,第六數位影像浙的相對物距為& ;第七數位影像咖 的相對物距為S8;第八數位影像2〇9的相對物距為& ;第一最近 物距影像210讀第二最近物距影像_的相對物距為&。,,其中 Sl為最遠物距,為最近物距。 ®㊅接讀人以第—曝絲件拍攝之數位影像(2G2〜2G9);將每連 ^張(N〈M)數位影像進行臺加產生(M__張合成影像。假設在 「第2a圖」中N=2。則在經過疊加計算後得到共計9張合成影像 CM〜N+3=8-2+3=9)。 〜接下來,重新定義這(M_N+3)張合成影像相對應的物距。重新 又義的處理方法請參考以下所述,在此並以「帛2&目」作為說明。 寸於第最遠物距影像2〇ia的物距係為&、第一數位影像2〇2的 物距係為s”將第一最遠物距影像施與第一數位影像2〇2所叠 201026035 加而成之第一合成影像2〇ι, S!’ ’其中S!’為&與&的重 。第一合成影像201,的物距係為 心’亦即 Sr KSASOe。 依序選擇相__數师像,並麵設定此兩驗位影像 合成影 像 20Γ 202 ‘ 204‘ 物距 sr &, ---—— S/ 所示。 206 ‘ 207‘ 208 ‘ 209‘ 〇 表1·合成影像與物距關係表 &, 設定-對焦框,其係用以選擇上述數位影像中的部分影像。 隨後’計算第—合成影像至第九合成影像⑽1,、2Q2,、…與 209,)中對焦框的高頻訊號。並計算第二最遠物距影像鳩與第 二最近物距影像2⑽㈣餘_高倾號。細紅述各影像 的高頻訊號找出相朗物距。在本發财係從上述影像的高頻訊 就中,選擇出最大的-組作為輸出的最佳對焦物距。因為第二最 ❿f物距影像2〇lb與第二最近物距影㈣〇b縣和其他影像進行 合成,因此其相對應物距仍是最遠物距&與最近物距 因為合成影像的雜訊已被降低許多,因此高頻訊號的來源絕 2份是拍攝物體的細節,而不是高頻雜訊;因此經如此計算便 可件到如「第2b圖」所示之高頻訊號與其相對應的物距關係,會 有明顯的整體最大值存在。相較於習知技術的「第lc圖」,本發 可X得到更明確的對焦位置的曲線關係,增加物距判斷的成功 率。 201026035 =再根據高頻訊號與其相對應的物距_,決定出高頻訊 相對應的物距以得到―最佳對焦物距;將自動對焦鏡頭 • 祕至最佳對錄距,完成對焦。 際貝施上,請參考「第3圖」所示,其係為本發明之架 3不意圖。本發明之數位取像裝置中包括有:自動對焦鏡頭 〇、自動對f、鏡稱序控制電路32G、絲元件咖、感光元件 時序控制電路34〇、類比數位轉換處理電路35〇、儲存單元獅斑 ❹微處理器370。 自動對焦铜310紐連接於自麟錄稱序控制電路 自動對焦鏡頭%序控制電路32Q電性連接於微處理器370, 接收微處理器370發出的指示訊號來驅動自動對焦鏡頭310。自動 對焦鏡頭時序控制電路32()控制移動自動對焦鏡頭⑽,並將被拍 攝之%境與物體成像在感光元件33〇上。感光元件咖係為一種 ❹光電轉換元件’其用以記錄拍攝環境與物體之光學訊號,並將此 光學訊號轉換為電訊號。感光元件330可例如為電荷辆合裝置 (charge-coupied device,簡稱CCD)或—互補式金屬氧化層半導 體(Complementaiy Metal-Oxide-Semiconductor,簡稱CMOS)。 感光元件330用以記錄數位取像裝置3〇〇的被攝環境與被攝 物之亮度,並將被攝物之亮度轉換成電氣訊號。感光元件時序控 制電路340電性連接於感光元件330與微處理器37〇之間,並接 受微處理器370的控制產生驅動感光元件33〇的控制訊號。類比 201026035 數位轉換處理電路350電性連接 钱瓦感先兀件330、感光元件時序控 制340與儲存單元360,並接受咸朵分丛# + 又以先70件時序控制與驅動電路34〇 的控制將感光元件330送出之類比甸缺絲 貝比訊唬轉換為數位訊號,傳送至 儲存單元360儲存。 儲存單元删用以儲存複數張數位影像、儲存單元360電性 連接於類比數位轉換處理電路35G無處理器37()。儲存單元細201026035 IX. Invention Description: [Technical field of invention] _ kinds of automatic hard green and Wei Lujian set, the system is based on high noise ring. The autofocus method under the environment and the digital image capturing device using the method. [Prior Art] With the development of digital cameras, photography is no longer an expensive purchase. The user can take the desired image at will to record a memorable moment or scene. In general, it is used for clear imaging when shooting, and most cameras have auto focus. For the well-known focusing technology, please refer to the "La Figure", which is based on the different material distances. The number of the young people in the county is the same as the high-number in the focus frame. The object distance and high frequency signal graph shown in the lb diagram. Then use the conventional curve approximation (curve mting) and evaluation techniques to find the maximum value of the high frequency shouting and reduce the object distance. This (4) is the best difficult object distance. Finally, move the lens focus group to the best focus position to complete the focus. However, in low light conditions, high sensitivity (10) conditions are required to shoot _, and digital images are easy to emit noise. The denoising ability of the conventional de-noising algorithm is quite _ for the digital image captured by the low-illuminance and high-sensitivity conditions. Moreover, the details of the scene in the digital image are usually blurred, so that the automatic camera of the digital camera can not obtain effective high frequency signals in the case of extremely high frequency. Under such circumstances, the conventional focusing technology is easy to obtain the object distance and high-frequency signal graphs as shown in the figure "Dihua 201026035". In the figure, the overall maximum is the most accurate. The global maximum exists, resulting in a focus distance determined by the autofocus program. In view of the above problems, the main object of the present invention is to provide an autofocus method in a high noise environment. In order to achieve the above object, the autofocus method of the present invention comprises the following steps: shooting at the farthest object distance in the first exposure condition - the first farthest object image and the second exposure condition - a farthest object distance image; a closest object distance of the digital image capturing device is photographed with a first closest object image and a second exposure condition with a first exposure condition - the second most recent planting; The corresponding digital image is taken by the first-expansion wire from the m different object distances from the nearest object distance; the total exposure is obtained at the farthest object distance, the closest object distance and the different object distances by the first exposure condition (4) Zhang, take 2 digital images in the second exposure condition and store them in the storage unit. Then load M+2 digital images taken with the first exposure condition; add (M_N+3) composite images every N (with 2) touch images; redefine this (M-N+3) The object distance corresponding to the composite image; calculate the high frequency signal in the (M_N+3) composite image focus area; then load the two digital images captured in the second exposure condition; calculate the two image areas The high frequency signal inside; the object distance of the two sheets, that is, the farthest object distance and the closest object distance, need not be re-determined. The relationship between the high frequency signal and the object distance is merged into the front segment ❹ ❹ 201026035 ::::: '7 is the relationship between the domain signal of the genus and its corresponding object distance, and according to == er ^^ recording distance; Automatically..., the lens moves to the best focus distance, and the focus is completed. = Providing 'High_Weil's self-contained digital image capture device' is used to determine the object distance between the digital image capture device and the subject. In order to achieve the above objectives, the digital image device proposed by the present invention includes: an autofocus lens, a photosensitive element, a storage unit, and a micro-camera adjustment digital tree W filming--the "system" of the scale device Brightness, and convert the button to an electrical minus sign; the storage unit is used to store a plurality of digital images; the microprocessor is electrically connected to the sensing device and the storage unit. The microprocessor includes at least an image superimposing unit, a distance resetting unit, a high-viewing metering element, and a maximum scale determining unit. The features and implementations of this (D) feature are described in detail below with reference to the preferred embodiment. [Embodiment] In order to understand the basic operation secrets of the outline, please refer to the "f 2a diagram" to first capture the first farthest object image 201a and the second wire in the first exposure condition at the farthest object distance. Lai's second farthest mother is like 2Glb; the farthest object distance and the nearest object distance are different from each other (in this case, M=8 in the 2a picture), the first exposure condition is taken. Corresponding digital image, such as the number of portrait shirts shown in "Fig. 2a" (that is, the first digital image 2 in the "2a", the second digital image 203, 201026035, the third digital image, The fourth digital image shift, the fifth digital image shift, the third digital image 207, and the seventh digital image are applied to the eighth digital image _. The first object is taken under the first exposure condition with the minimum object distance of the digital image capturing device. The object distance image 210a; and the second closest object distance image 拍摄 is taken by the second exposure condition. The first exposure light condition is a total of Π) (M system 0). Each digital image has a corresponding first object distance position Sm '· the first-distal object distance image 201a and the second farthest object distance image are relative to each other, and the first-digit image is 2〇2 The relative object distance is &, the relative object distance of the second digital image 203 is S3; the relative object distance of the third digital image 2〇4 is &; the relative object distance of the fourth digital image 205 is Ss; the fifth digit The relative object distance of the image application is S6, the relative object distance of the sixth digital image is & the relative object distance of the seventh digital image coffee is S8; the relative object distance of the eighth digital image 2〇9 is & The relative object distance of the closest object distance image 210 reading the second closest object image _ is & , where Sl is the farthest object distance, which is the closest object distance. ® 6 readers take digital images taken by the first-infrared (2G2~2G9); each connected (N<M) digital image is generated (M__ Zhang synthetic image. Assume in Figure 2a) In the case of N=2, a total of 9 synthetic images CM~N+3=8-2+3=9) are obtained after the superposition calculation. ~ Next, redefine the object distance corresponding to this (M_N+3) composite image. Please refer to the following for the re-processing method. Here, "帛2&" is used as a description. The object distance between the second farthest image 2〇ia is &, the first digital image is 2〇2, and the first farthest image is applied to the first digital image 2〇2 The first synthetic image added by 201026035 is 2〇ι, S!' 'where S!' is the weight of && the first synthetic image 201, the object distance is the heart ', ie Sr KSASOe. Select phase __ several master images in sequence, and set the two imaged image composite images 20Γ 202 ' 204' object distance sr &, ---—— S/. 206 ' 207' 208 ' 209' 〇 Table 1. Synthetic image and object distance relationship table &, setting - focus frame, which is used to select part of the image in the above digital image. Then 'calculate the first synthetic image to the ninth synthetic image (10) 1, 2Q2, ... And 209,) the high-frequency signal of the focus frame, and calculate the second farthest object image 鸠 and the second closest object image 2 (10) (four) _ _ high slanting number. The high-frequency signal of each image is found to find the object In the high-frequency news of the above images, the largest group is selected as the best focus of the output. Because the second The most ❿f object distance image 2〇lb and the second closest object distance shadow (4) 〇b county and other images are synthesized, so the corresponding object distance is still the farthest object distance & the nearest object distance because of the synthetic image of the noise has been It has been reduced a lot, so the source of the high-frequency signal is only the details of the object, not the high-frequency noise; therefore, the high-frequency signal as shown in "2b" can be calculated accordingly. For the object distance relationship, there will be a significant overall maximum. Compared with the "lc map" of the prior art, the present invention can obtain a more clear curve relationship of the focus position and increase the success rate of the object distance judgment. 201026035=According to the high-frequency signal and its corresponding object distance _, determine the object distance corresponding to the high-frequency signal to get the “best focus distance”; the autofocus lens will be the best to the recording distance to complete the focus. Please refer to "Figure 3" for the application of the present invention, which is not intended. The digital image capturing device of the present invention comprises: an autofocus lens 〇, an automatic pair f, a mirror order control circuit 32G, a wire component coffee, a photosensitive element timing control circuit 34〇, an analog digital conversion processing circuit 35〇, a storage unit lion Dove microprocessor 370. The autofocus copper 310 button is connected to the self-instrument recording control circuit. The autofocus lens % sequence control circuit 32Q is electrically connected to the microprocessor 370, and receives an indication signal from the microprocessor 370 to drive the autofocus lens 310. The autofocus lens timing control circuit 32() controls the moving autofocus lens (10) and images the captured object and the object on the photosensitive element 33A. The photosensitive element is a type of photoelectric conversion element that records an optical signal of a shooting environment and an object, and converts the optical signal into an electrical signal. The photosensitive element 330 can be, for example, a charge-coupied device (CCD) or a Complementaiy Metal-Oxide-Semiconductor (CMOS). The photosensitive element 330 is used to record the brightness of the subject environment of the digital image capturing device 3 and the subject, and convert the brightness of the subject into an electrical signal. The photosensitive element timing control circuit 340 is electrically connected between the photosensitive element 330 and the microprocessor 37A, and is controlled by the microprocessor 370 to generate a control signal for driving the photosensitive element 33A. Analogue 201026035 The digital conversion processing circuit 350 is electrically connected to the load sensing device 330, the photosensitive element timing control 340 and the storage unit 360, and accepts the control of the salty sub-cluster #+ and the 70-time sequential control and drive circuit 34〇. The photosensitive element 330 is sent out to convert the digital signal into a digital signal and transmitted to the storage unit 360 for storage. The storage unit is deleted for storing a plurality of digital images, and the storage unit 360 is electrically connected to the analog digital conversion processing circuit 35G without the processor 37 (). Storage unit
用以接受微處理器37G控制進行資料讀出與寫入。微處理器37〇 在執行時會包含㈣祕赫數蚊與控解元371、影像疊加單 儿372、物距重設單元373 '高頻訊號計算單元观與最佳對隹位 置決定單元375。 、 在實際執㈣,自鱗光錄較魅.元371會根據拍 攝的環境決定㈣讀當的曝光參數,料—曝絲件與第二曝 先條件。曝光條件包括曝光時間、光圈大小與感光值 ^International Standards Organization » νχτίίΜ ISO) 〇 ^ 微處理器37G透過自動對焦鏡頭時序控制電路320設定自動對焦 鏡碩310㈤光圈,並透過感光元件時序控制電路3㈣定曝光日^ L ISO值’利用第一曝光條件在最遠物距、最近物距以及其他Μ 個不同的物距擷取相對應的脱張數位影像,儲存於儲存單元360 中。以第二曝光條件在最遠物距及最近物距擷取相對應的2張數 位影像,儲存於儲存單元360中。 微處理H 370接著控制設置於其内的影像疊加單元372、物距 11 201026035 重設單元373、高頻訊號計算單元374與最佳對焦位置決定單元 375進行作動。影像疊加單元372用以疊加預攝影像藉以產生多張 合成影像。物距重設單tl 373用以計算每_合成影像的相應物距, • 得到合成影像數量相同的複數個相應物距。 物距重设單元373用以計算每—合成影像⑽‘〜‘)的相應 物距,得到合成影像數量相同的複數個相應物距。高頻訊號計算 單元374用以計算每-合成影像巾之至少—部份晝素的高頻訊 β號,得到與合成景^像數量相同的複數個高頻訊號,高頻訊號計算 單元374係為尚通濾波器(High-pass fiIter)、帶通濾波器 (Band-pass filter)、傅利葉轉換(Fourier transf〇rm)裝置、離 散餘弦轉換(Discrete Cosine Transform)裝置或離散小波轉換 (Discrete Wavelet Transformation)裝置。 最佳對焦位置決定單元375用以從最遠物距、合成影像之相 對應物距、最近物距與其相對應的高頻訊號的關係曲線中決定出 高頻訊號最大值所相應之物距以作為一最佳對焦物距,藉以拍攝 被攝物。 為方便說明起見在此假設疊加張數為n張,決定被攝物的曝 光參數,影像之曝光時間為t、ISO值為g,第一曝光條件為(t , g)表示;第二曝光條件為(n*t,g/n)。請同時參考「第4a圖」所 示,其係為本發明實際執行的流程圖。說明如下: 步驟S410 :根據環境的亮度或雜訊大小決定疊加數位影像之 12 201026035 張數、第一曝光條件與第二曝光條件。 步驟S420 :拍攝數位影像。 第4b 其中’在步驟S420中拍攝數位影像中,更另外參考如 J所示之步驟; 步驟S421 :在最遠物距以第一曝光條件(t,g)拍攝第一It is used to accept data read and write by the microprocessor 37G. The microprocessor 37A, when executed, includes (4) a secret number mosquito control unit 371, an image superimposition unit 372, an object distance resetting unit 373 'a high frequency signal calculation unit view and an optimal confrontation position determining unit 375. In the actual implementation (four), from the scale of the light recorded more charm. Yuan 371 will be determined according to the circumstances of the shooting (four) read the exposure parameters, material - exposed parts and second exposure conditions. The exposure conditions include exposure time, aperture size, and sensitivity value. ^International Standards Organization » νχτίίΜ ISO) 〇^ The microprocessor 37G sets the autofocus lens master 310 (5) aperture through the autofocus lens timing control circuit 320, and passes through the photosensitive element timing control circuit 3 (4) The exposure date ^ L ISO value 'takes the corresponding distracted digital image at the farthest object distance, the closest object distance, and other two different object distances using the first exposure condition, and is stored in the storage unit 360. The two digital images corresponding to the farthest object distance and the closest object distance are captured by the second exposure condition and stored in the storage unit 360. The microprocessor H 370 then controls the image superimposing unit 372, the object distance 11 201026035 reset unit 373, the high frequency signal calculation unit 374, and the optimal focus position determining unit 375 to be operated. The image superimposing unit 372 is configured to superimpose the pre-images to generate a plurality of composite images. The object distance reset single t1 373 is used to calculate the corresponding object distance of each _synthesized image, and • a plurality of corresponding object distances having the same number of synthetic images are obtained. The object distance resetting unit 373 is configured to calculate a corresponding object distance of each of the synthesized images (10) ‘~’, and obtain a plurality of corresponding object distances having the same number of synthetic images. The high-frequency signal calculation unit 374 is configured to calculate at least a part of the high-frequency signal β of each element of the synthetic image towel, and obtain a plurality of high-frequency signals having the same number as the synthesized scene image, and the high-frequency signal calculation unit 374 is For High-pass fiIter, Band-pass filter, Fourier transf〇rm device, Discrete Cosine Transform device or Discrete Wavelet Transformation ) device. The optimal focus position determining unit 375 is configured to determine the object distance corresponding to the maximum value of the high frequency signal from the relationship between the farthest object distance, the corresponding object distance of the synthesized image, and the closest object distance and the corresponding high frequency signal. As a best focus object, it is used to shoot the subject. For convenience of explanation, it is assumed here that the number of superimposed sheets is n sheets, and the exposure parameters of the object are determined. The exposure time of the image is t, the ISO value is g, the first exposure condition is (t, g); the second exposure The condition is (n*t, g/n). Please also refer to "Fig. 4a", which is a flow chart of the actual implementation of the present invention. The description is as follows: Step S410: Determine the number of superimposed digital images according to the brightness or noise of the environment. 201026035 number of sheets, first exposure condition and second exposure condition. Step S420: Shooting a digital image. 4b where 'the digital image is captured in step S420, and the reference is further referred to as the step shown in J; Step S421: the first exposure condition (t, g) is taken at the farthest object distance.
最遠物距影像201a,並將其儲存於記憶單元 中; 步驟S422 :在最遠物距以第二曝光條件(n*t,拍攝 第二最遠物距影像201b,並將其儲存於記憶 單元中; 步驟S423 :在最遠物距與最近物距外的其他物距以第一 曝光條件(t,g)分別拍攝數位影像,並將其 儲存於記憶單元中; 步驟S424 :判斷是否為最後一張數位影像;若不為最後 一張時,則重複步驟S241至步驟S243,直 到事先決定之物距都已擷取完影像; 步驟S425 .在最近物距以第一曝光條件(t,g)拍攝第一 最近物距影像210a’並將其儲存於記憶單元 中; 步驟S426 :在最近物距以第二曝光條件(n*t,g/n)拍攝 第二最近物距影像210b,並將其儲存於記憶 13 201026035 〇口一 1_ 早7L中。 在本說明中影像的擷取係由最遠物距到最近物距,在實際實 施時亦可由最近物距到最遠物距。 步驟S430 :從以第一曝光條件在不同物距所擷取的數位影像 中’依序選取連續兩張在相鄰物距擷取的數位 影像進行疊加,產生複數張合成影像。 步驟S440 :計算合成影像之物距。 步驟S450 .计算第二曝光條件擷取第二最遠物距影像比 與第二最近物距影像210b的高頻訊號。 步驟S460 :自動對焦程序根據最遠物距、合成影像之相對應 物距、最近物距與其分別相對應之高頻訊號的關 係曲線’決定出高頻訊號最大值相對應的物距, 以得到一最佳對焦物距。 步驟S470:將自動對焦鏡頭移到該對焦物距位置,完成對焦。 為說明起見,在此係以8個物距為例,將所擷取的數位影像 分別定義為第-數位影像202、第二數位影像別3、第三數位影像 204、第四數位影像2〇5、第五數位影像2〇6、第六數位影像2们、 第七數位影像208與第八數位影像2〇9。 接者,將上述數位影像(202〜209)通過步驟S430之處理後, 可以得到第一合成影像201‘、第二合成影像2〇2‘、第三合成影像 第四合成影像204、第五合成影像205‘、第六合成影像 14 201026035 206‘、第七合成影像207‘、第八合成影像208‘與第九合成影像 209‘。並計算合成影像的高頻訊號。 在步驟S430與步驟S450計算高頻訊號時’除了可對整張數 位影像進行高頻訊號的計算外,也可以對於數位影像中的部分影 像區域進行高頻訊號的計算。其中,高頻訊號的計算可以是但不 限定為高通濾波器(High-pass filter)、帶通濾波器(Band-pass filter)、傅利葉轉換(Fourier transform)、離散餘弦轉換 © (Discrete Cosine Transform)或離散小波轉換(Discrete WaveletThe farthest object distance image 201a is stored in the memory unit; Step S422: at the farthest object distance in the second exposure condition (n*t, the second farthest object distance image 201b is taken and stored in the memory In step S423, the digital image is taken in the first exposure condition (t, g) at the distance between the farthest object distance and the closest object distance, and stored in the memory unit; Step S424: determining whether it is The last digital image; if it is not the last one, repeat steps S241 to S243 until the object distance has been determined in advance, and the image is captured; step S425. In the recent object distance, the first exposure condition (t, g) taking the first closest object image 210a' and storing it in the memory unit; step S426: taking the second closest object image 210b at the closest object distance with the second exposure condition (n*t, g/n), And store it in memory 13 201026035 〇口一1_早 7L. In this description, the image is captured from the farthest object distance to the nearest object distance, and in actual implementation, it can also be from the closest object distance to the farthest object distance. Step S430: taking the different object distances from the first exposure condition In the bit image, sequentially select two consecutive digital images captured by adjacent object distances to generate a plurality of composite images. Step S440: Calculate the object distance of the synthesized image. Step S450. Calculate the second exposure condition The farthest object distance image is higher than the second highest object distance image 210b. Step S460: The auto focus program according to the farthest object distance, the corresponding object distance of the synthesized image, and the closest object distance respectively corresponding to the high frequency The signal relationship curve 'determines the object distance corresponding to the maximum value of the high frequency signal to obtain a best focus distance. Step S470: Move the autofocus lens to the focus distance position to complete the focus. For the sake of explanation, Taking 8 object distances as an example, the captured digital images are respectively defined as a digital image 202, a second digital image 3, a third digital image 204, a fourth digital image 2〇5, and a fifth. The digital image 2〇6, the sixth digital image 2, the seventh digital image 208, and the eighth digital image 2〇9. The first digital image (202~209) is processed by the step S430 to obtain the first image. Synthetic shadow 201', second synthesized image 2〇2', third synthesized image fourth synthesized image 204, fifth synthesized image 205', sixth synthesized image 14 201026035 206', seventh synthesized image 207', eighth synthesized image 208 'and the ninth synthesized image 209'. And calculating the high frequency signal of the synthesized image. When calculating the high frequency signal in steps S430 and S450, in addition to the calculation of the high frequency signal of the entire digital image, the digital image can also be used. The high-frequency signal is calculated in part of the image area. The calculation of the high-frequency signal can be, but is not limited to, a high-pass filter, a band-pass filter, and a Fourier transform. Transform), Discrete Cosine Transform or Discrete Wavelet
Transformation)所計算得到。Transformation) is calculated.
雖然本發明以前述之較佳實施例揭露如上,然其並非用以限 定本發明,例如在本發明林限定合成影像與第二曝光條件拍攝 的數位影像高鎮號_序,只要姆觸祕對應正確即可。 換句話說可以先#第二曝光條件拍攝的數位景彡像,再計算合成 影像。也可以先計算料二曝祕縣最箱距轉的數鄉像 的雨頻訊號’再計算合成影像的高頻訊號。最後再計算以第二曝 光條件在最近物距拍攝的數位影像的高頻訊號。 内,^ ^何熟習相像技藝者,在不脫離本發明之精神和範圍 $魅软更__,因此本發狀專利 本_書所附之申請專利範圍所界定者為準。 【圖式簡單說明】 第la圖 係為習知技術彻多張影料算高頻峨之示意圖 201026035 第lb圖係為習知技術所產生高頻訊號與物距曲線示意圖。 第lc圖係為習知技術在低照度的高雜訊數位影像所產生高頻 訊號與物距曲線示意圖。 ' 帛^圖係為本發明利用2張影像疊加並計算高頻訊號之示意 圖。 第b圖係為本發明在低照度的高雜訊數位影像所產生高頻訊 號與物距曲線示意圖。 ❹ 帛3圖係為本發明之架構示意圖。 第4a圖係為本發明執行實施例之流程圖。 第圖係為本發明中拍攝婁文位影像的細部流程圖。 【主要元件符號說明】 201a第一最遠物距影像 2〇lb第二最遠物距影像 202 209第—數位影像〜第八數位影像 210a第一最近物距影像 21〇b第二最近物距影像 201 209第一合成影像〜第九合成影像 3〇〇 數位取像裝置 310 自動對焦鏡頭 320自動對焦鏡頭時序控制電路 330 感光元件 16 201026035 340 感光元件時序控制電路 350 類比數位轉換處理電路 360 儲存單元 370 微處理器 371 自動曝光參數決定與控制單元 372 影像疊加單元 373 物距重設單元 ❹ 374 高頻訊號計算單元 375 最佳對焦位置決定單元Although the present invention has been disclosed above in the foregoing preferred embodiments, it is not intended to limit the present invention. For example, in the present invention, the composite image is limited to the digital image taken by the second exposure condition. That's right. In other words, the digital image captured by the #2 exposure condition can be calculated first, and then the composite image can be calculated. It is also possible to calculate the high-frequency signal of the composite image by calculating the rain frequency signal of the number of townships in the second box of the county. Finally, the high frequency signal of the digital image taken at the closest object distance under the second exposure condition is calculated. Within the scope of the patent application, the scope of the patent application is subject to the scope of the patent application. [Simple diagram of the diagram] The first diagram is a schematic diagram of the high-frequency 峨 彻 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 The lc diagram is a schematic diagram of the high frequency signal and object distance curve generated by the conventional technique in low-light high-noise digital image. The '帛^ diagram is a schematic diagram of the present invention using two images to superimpose and calculate high frequency signals. Figure b is a schematic diagram of the high frequency signal and object distance curve generated by the low illuminance high noise digital image of the present invention. The ❹ 图 3 diagram is a schematic diagram of the architecture of the present invention. Figure 4a is a flow diagram of an embodiment of the invention. The figure is a detailed flow chart of the image taken in the present invention. [Main component symbol description] 201a first farthest object image 2〇 lb second farthest object image 202 209 first-to-digital image to eighth digital image 210a first closest object image 21〇b second closest object distance Image 201 209 first synthesized image ~ ninth synthesized image 3 〇〇 digital image capturing device 310 autofocus lens 320 autofocus lens timing control circuit 330 photosensitive element 16 201026035 340 photosensitive element timing control circuit 350 analog digital conversion processing circuit 360 storage unit 370 Microprocessor 371 Automatic exposure parameter determination and control unit 372 Image superimposing unit 373 Object distance reset unit 374 374 High frequency signal calculation unit 375 Best focus position determining unit
1717