TWI774418B - Camera module, focus adjustment system and focusing method - Google Patents
Camera module, focus adjustment system and focusing method Download PDFInfo
- Publication number
- TWI774418B TWI774418B TW110121428A TW110121428A TWI774418B TW I774418 B TWI774418 B TW I774418B TW 110121428 A TW110121428 A TW 110121428A TW 110121428 A TW110121428 A TW 110121428A TW I774418 B TWI774418 B TW I774418B
- Authority
- TW
- Taiwan
- Prior art keywords
- measured
- motor
- value
- transfer function
- modulation transfer
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012546 transfer Methods 0.000 claims abstract description 104
- 238000012360 testing method Methods 0.000 claims abstract description 12
- 230000008859 change Effects 0.000 claims description 62
- 238000006073 displacement reaction Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 9
- 240000004282 Grewia occidentalis Species 0.000 description 4
- 238000003384 imaging method Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000007620 mathematical function Methods 0.000 description 2
- 239000003086 colorant Substances 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012634 optical imaging Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Studio Devices (AREA)
- Automatic Focus Adjustment (AREA)
- Particle Formation And Scattering Control In Inkjet Printers (AREA)
- Focusing (AREA)
Abstract
Description
本發明是有關於一種對焦技術,且特別是有關於一種相機模組、對焦調整系統及對焦方法。The present invention relates to a focusing technology, and more particularly, to a camera module, a focusing adjustment system and a focusing method.
一般而言,相機的對焦點前後相對成像清晰的範圍稱為景深(Depth of Field,DoF)。在光學成像中,尤其是錄影或是攝影,景深是在空間中可以清楚成像的距離範圍。值得注意的是,相機的透鏡只能夠將光聚到某一特定的距離,且遠離對焦點會導致成像逐漸模糊。然而,在某一段特定的距離內,影像的模糊程度是肉眼無法察覺的。而這段距離稱之為景深,如圖1是相機C的景深DoF的示意圖。物體O在景深DoF處的成像較為清晰。此外,當焦點設在超焦距處時,景深會從超焦距的一半延伸到無限遠,對一個固定的光圈值來說,這是最大的景深。而相機出廠前需要找出其成像的最佳清晰點(或稱準焦點)。Generally speaking, the relatively clear range of the image before and after the focus point of the camera is called the depth of field (Depth of Field, DoF). In optical imaging, especially video or photography, the depth of field is the range of distances that can be clearly imaged in space. It's worth noting that a camera's lens can only focus light to a certain distance, and moving away from the focus point will cause the image to gradually blur. However, at a certain distance, the blur of the image is imperceptible to the naked eye. This distance is called the depth of field. Figure 1 is a schematic diagram of the depth of field DoF of camera C. The imaging of the object O at the depth of field DoF is relatively clear. Also, when the focus is set at the hyperfocal distance, the depth of field extends from half the hyperfocal distance to infinity, which is the maximum depth of field for a fixed f-stop. Before the camera leaves the factory, it is necessary to find the best clear point (or quasi-focus) of its imaging.
值得注意的是,在鏡頭的組裝階段中,存在許多變因。例如,點膠作業的烘烤時間及溫度、電路板的平整度以及表面黏著技術(Surface-Mount Technology,SMT)定位中心等。這些變因可能讓同一批生產的鏡頭經組裝至相機模組後對應的準焦點位置不同。It is worth noting that there are many variables during the assembly phase of the lens. For example, the baking time and temperature of the dispensing operation, the flatness of the circuit board, and the positioning center of the Surface-Mount Technology (SMT), etc. These variables may cause the corresponding quasi-focus positions of the lenses produced in the same batch to be different after being assembled into the camera module.
然而,現今找尋準焦點的過程較長,進而影響整體產線的生產效率。例如,現有調焦方法需要使用兩階段調焦:其一者為粗調階段,另一者為細調階段。兩階段調焦的缺點為,無法控制兩者設定的參數。例如,細調階段無法取得粗調階段相關的調焦數值,更無法進行後續的優化動作。此外,使用兩階段調焦將花費過多時間。However, the process of finding the right focus is now long, which affects the production efficiency of the overall production line. For example, the existing focusing method needs to use two stages of focusing: one is a coarse adjustment stage and the other is a fine adjustment stage. The disadvantage of two-stage focusing is that the parameters set by the two cannot be controlled. For example, in the fine adjustment stage, the focus adjustment value related to the coarse adjustment stage cannot be obtained, and further optimization actions cannot be performed. Also, using two-stage focusing will take too much time.
有鑑於此,本發明實施例提供一種相機模組、對焦調整系統及對焦方法,參考已測準焦點的已測資料,以提升對焦速度。In view of this, embodiments of the present invention provide a camera module, a focus adjustment system, and a focus method, which refer to the measured data of the measured focus, so as to improve the focus speed.
本發明實施例的對焦方法包括(但不僅限於)下列步驟:取得已測資料及待測資料。已測資料包括一個或更多個已測相機模組的準焦位置、對應的調變傳遞函數(Modulation Transfer Function,MTF)峰值及對應的已測比例值。待測資料包括待測相機模組的馬達位置、對應的調變傳遞函數值、及對應的待測比例值。各對焦位置是指在對應已測相機模組的馬達驅動其鏡頭位移所至的位置有對應的調變傳遞函數峰值。已測比例值及待測比例值相關於所擷取影像中的參考區域的面積。依據已測資料中的那些已測相機模組在準焦位置及對應的已測比例值決定變化關係。這變化關係為鏡頭位移變化與比例值變化的比例。依據待測資料與變化關係決定待測相機模組的下一馬達位置。The focusing method of the embodiment of the present invention includes (but is not limited to) the following steps: obtaining measured data and to-be-measured data. The measured data includes the focal position of one or more measured camera modules, the corresponding Modulation Transfer Function (MTF) peak value and the corresponding measured ratio value. The data to be tested includes the motor position of the camera module to be tested, the corresponding modulation transfer function value, and the corresponding proportional value to be tested. Each focus position means that there is a corresponding peak value of the modulation transfer function at the position to which the motor of the camera module under test drives the lens displacement. The measured scale value and the to-be-measured scale value are related to the area of the reference region in the captured image. The variation relationship is determined according to the focal positions of the tested camera modules in the tested data and the corresponding measured scale values. This change is the ratio of the lens shift change to the scale value change. The next motor position of the camera module to be tested is determined according to the data to be tested and the changing relationship.
本發明實施例的對焦調整系統包括(但不僅限於)處理器。處理器經配置用以取得已測資料及待測資料,依據已測資料中的那些已測相機模組在對焦位置及對應已測比例值決定變化關係,並依據待測資料與變化關係決定待測相機模組的下一馬達位置。已測資料包括一個或更多個已測相機模組的準焦位置、對應的調變傳遞函數峰值及對應的已測比例值。待測資料包括待測相機模組的馬達位置、對應的調變傳遞函數值、及對應的待測比例值。各對焦位置是指在對應已測相機模組的馬達驅動其鏡頭位移所至的位置有對應的調變傳遞函數峰值。已測比例值及待測比例值相關於所擷取影像中的參考區域的面積。變化關係為鏡頭位移變化與比例值變化的比例。The focus adjustment system of the embodiment of the present invention includes (but is not limited to) a processor. The processor is configured to obtain the measured data and the data to be measured, determine the change relationship according to the focus positions of the measured camera modules in the measured data and the corresponding measured scale values, and determine the change relationship according to the data to be measured and the change relationship. Measure the next motor position of the camera module. The measured data includes the focal position of one or more measured camera modules, the corresponding peak value of the modulation transfer function, and the corresponding measured ratio value. The data to be tested includes the motor position of the camera module to be tested, the corresponding modulation transfer function value, and the corresponding proportional value to be tested. Each focus position means that there is a corresponding peak value of the modulation transfer function at the position to which the motor of the camera module under test drives the lens displacement. The measured scale value and the to-be-measured scale value are related to the area of the reference region in the captured image. The change relationship is the ratio of the lens shift change to the scale value change.
本發明實施例的相機模組包括(但不僅限於)鏡頭、馬達、馬達驅動電路、影像感測器及處理器。馬達耦接鏡頭,並用以驅動鏡頭位移。馬達驅動電路耦接馬達,並用以控制馬達。影像擷取裝置用以擷取影像。處理器耦接馬達驅動電路及影像感測器。處理器並經配置用以取得已測資料及待測資料,依據已測資料中的那些已測相機模組在對焦位置及對應已測比例值決定變化關係,並依據待測資料與變化關係決定待測相機模組的下一馬達位置。已測資料包括一個或更多個已測相機模組的準焦位置、對應的調變傳遞函數峰值及對應的已測比例值。待測資料包括待測相機模組的馬達位置、對應的調變傳遞函數值、及對應的待測比例值。各對焦位置是指在對應已測相機模組的馬達驅動其鏡頭位移所至的位置有對應的調變傳遞函數峰值。已測比例值及待測比例值相關於所擷取影像中的參考區域的面積。變化關係為鏡頭位移變化與比例值變化的比例。The camera module of the embodiment of the present invention includes (but is not limited to) a lens, a motor, a motor driving circuit, an image sensor, and a processor. The motor is coupled to the lens and used to drive the lens to move. The motor driving circuit is coupled to the motor and used to control the motor. The image capturing device is used for capturing images. The processor is coupled to the motor driving circuit and the image sensor. The processor is also configured to obtain the measured data and the data to be measured, determine the change relationship according to the focus positions of the measured camera modules in the measured data and the corresponding measured scale values, and determine the relationship between the data to be measured and the change The next motor position of the camera module to be tested. The measured data includes the focal position of one or more measured camera modules, the corresponding peak value of the modulation transfer function, and the corresponding measured ratio value. The data to be tested includes the motor position of the camera module to be tested, the corresponding modulation transfer function value, and the corresponding proportional value to be tested. Each focus position means that there is a corresponding peak value of the modulation transfer function at the position to which the motor of the camera module under test drives the lens displacement. The measured scale value and the to-be-measured scale value are related to the area of the reference region in the captured image. The change relationship is the ratio of the lens shift change to the scale value change.
基於上述,依據本發明實施例的相機模組、對焦調整系統及對焦方法,可基於已測相機模組的已測資料在準焦位置與影像中參考區域的面積的變化關係決定待測相機模組的馬達移動位置。藉此,可減少反覆移動鏡頭及數值量測的次數,進而提升相機模組的生產效率。Based on the above, according to the camera module, the focus adjustment system, and the focus method according to the embodiments of the present invention, the camera module to be tested can be determined based on the change relationship between the focal position of the measured data of the measured camera module and the area of the reference area in the image. Motor movement position of the group. In this way, the number of times of repeatedly moving the lens and measuring the value can be reduced, thereby improving the production efficiency of the camera module.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more obvious and easy to understand, the following embodiments are given and described in detail with the accompanying drawings as follows.
圖2是依據本發明一實施例的對焦調整系統1的元件方塊圖。請參照圖2,對焦調整系統1包括(但不僅限於)運算裝置50及一台或更多台相機模組100。FIG. 2 is a block diagram of components of the
運算裝置50可以是桌上型電腦、筆記型電腦、伺服器、智慧型手機、平板電腦等電子裝置。運算裝置50包括(但不僅限於)處理器59。The
處理器59可以是中央處理單元(CPU),或是其他可程式化之一般用途或特殊用途的微處理器(Microprocessor)、數位信號處理器(Digital Signal Processor,DSP)、可程式化控制器、特殊應用積體電路(Application-Specific Integrated Circuit,ASIC)或其他類似元件或上述元件的組合。在一實施例中,處理器59用以執行運算裝置50的所有或部分作業。The
相機模組100包括(但不僅限於)鏡頭110、馬達130、馬達驅動電路150、影像感測器170及處理器190。相機模組100可用於手機、平板電腦、筆記型電腦、監視器或其他類型的相機。The
鏡頭110可能包括一塊或更多塊鏡片,且鏡片可以是由塑膠、玻璃或其他材料所製成。須說明的是,本發明實施例不限制鏡頭110的焦段、視角或其他規格。The
馬達130可以是音圈馬達(Voice Coil Motor,VCM)、壓電(piezoelectric)馬達、步進(step)馬達、超聲波馬達或其他類型的馬達。馬達130耦接鏡頭110,馬達130並用以驅動鏡頭110中的鏡片或鏡片組位移/移動。The
馬達驅動電路150可以是數位類比轉換器(Digital-to-Analog Converter,DAC)、類比驅動器或其他馬達130支援的驅動器。馬達驅動電路150耦接馬達130,馬達驅動電路150並用以控制馬達130,進而控制鏡頭110移動。例如,透過改變馬達驅動電路150輸出至馬達130的電流,將改變鏡頭110相對於影像感測器170的位置。The
影像感測器170可以是電荷耦合器件(Charge-Coupled Device,CCD)、互補式金屬氧化物半導體(Complementary Metal-Oxide-Semiconductor,CMOS)或其他感光元件。在一實施例中,影像感測器170用以反應於經由鏡頭110射入的光而取得光強度相關的感測資料。即,透過像素陣列擷取影像。The
處理器190耦接馬達驅動電路150及影像感測器170。處理器59可以是中央處理單元,或是其他可程式化之一般用途或特殊用途的微處理器、數位信號處理器、影像訊號處理器(Image Signal Processor,ISP)、可程式化控制器、特殊應用積體電路或其他類似元件或上述元件的組合。在一實施例中,處理器190用以執行相機模組100的所有或部分作業。例如,處理器190基於影像感測器170的感測資料(例如,所擷取的影像)傳送訊號給馬達驅動電路150,使馬達130驅動鏡頭110位移。The
在一實施例中,運算裝置50與相機模組100整合成單一裝置。例如,處理器59與處理器190為同一者或經組態用於不同功能的兩者。在另一實施例中,運算裝置50與相機模組100可透過有線或無線通訊(例如,通用序列匯流排(Universal Serial Bus,USB)、I2C、或Wi-Fi)相互傳輸。In one embodiment, the
下文中,將搭配對焦調整系統1中的各項元件及模組說明本發明實施例所述之方法。本方法的各個流程可依照實施情形而隨之調整,且並不僅限於此。Hereinafter, the method described in the embodiment of the present invention will be described in conjunction with various components and modules in the
圖3是依據本發明一實施例的對焦方法的流程圖。請參照圖3,處理器59或處理器190可取得已測資料及待測資料(步驟S610)。具體而言,已測資料包括一台或數台已測相機模組的準焦位置及調變傳遞函數(Modulation Transfer Function,MTF)峰值、及對應的已測比例值。FIG. 3 is a flowchart of a focusing method according to an embodiment of the present invention. Referring to FIG. 3, the
調變傳遞函數值越高,代表通過鏡頭110成像的結果越清晰。因此,調變傳遞函數峰值(即,調變傳遞函數的最高值)所對應馬達位置(對應於鏡頭110相對於影像感測器170的距離)可作為準焦位置。換句而言,準焦位置是指在對應已測相機模組的馬達130驅動其鏡頭110位移所至的位置有對應的調變傳遞函數峰值。調變傳遞函數峰值表示此已測相機模組在所有馬達位置對應的調變傳遞函數值中的最高者。而已測相機模組是指某一個相機模組100已經事先量測、找出調變傳遞函數峰值及其對應的準焦位置。須說明的是,本發明實施例不限制已測相機模組的數量。The higher the modulation transfer function value is, the clearer the result of imaging through the
調變傳遞函數值例如是影像感測器170所擷取的影像中所測得的最大光強度與最小光強度的差值與兩者的和值的比值,但不以此為限。The modulation transfer function value is, for example, the ratio of the difference between the maximum light intensity and the minimum light intensity measured in the image captured by the
圖4是依據本發明一實施例的取得已測資料的流程圖。請參照圖4,針對即將成為已測相機模組的相機模組100,處理器59或處理器190可判斷已測相機模組的調變傳遞函數值是否到達細調門檻值(步驟S410)。一般而言,對焦流程區分為粗調及細調階段。細調階段的調變傳遞函數值應相較於粗調階段的調變傳遞函數值更接近調變傳遞函數峰值。細調門檻值可以是基於其他已測相機模組的調變傳遞函數峰值(已完成對焦流程)的統計指標(例如,平均值、中位數或眾數)的特定百分比(例如,百分之八十、七十五等)、或是基於相關人員的經驗法則或過往數據得出。FIG. 4 is a flow chart of obtaining measured data according to an embodiment of the present invention. Referring to FIG. 4 , for the
若已測相機模組的調變傳遞函數值未到達細調門檻值,則尚未進入細調階段(即,維持在粗調階段),且處理器59或處理器190可透過馬達驅動電路150驅動馬達130,並據以改變鏡頭110位置。即,處理器59控制馬達130依據下一個馬達位置驅動鏡頭110。在粗調階段中,下一個馬達位置可能是與當前馬達位置相距特定距離(即,所決定的移動距離)的位置,並可視實際需求而變更(步驟S420)。在一些實施例中,馬達130的移動距離也可能相關於基於當前調變傳遞函數值的數學函數,但不以此為限。步驟S410及S420可能反覆進行,直到相機模組100的調變傳遞函數值到達(例如,大於或等於)細調門檻值。If the modulation transfer function value of the tested camera module does not reach the fine tuning threshold, it has not entered the fine tuning stage (ie, remains in the coarse tuning stage), and the
若已測相機模組的調變傳遞函數值未到達細調門檻值,則進入細調階段,且處理器59或處理器190仍可透過馬達驅動電路150驅動馬達130,並據以改變鏡頭110位置。此外,處理器59或處理器190可記錄細調階段中各馬達位置對應的調變傳遞函數值及對應的已測比例值。If the modulation transfer function value of the measured camera module does not reach the fine tuning threshold, the fine tuning stage is entered, and the
已測比例值相關於影像感測器170所擷取影像中的參考區域的面積。舉例而言,圖5是依據本發明一實施例的決定比例值的示意圖。請參照圖5,假設鏡頭模組100所欲拍攝的目標位置上有目標圖案(以黑色方塊為例,但也可能是其他形狀或顏色,且不以此為限)。影像感測器170所擷取的影像包括目標圖案。處理器59或處理器190可將影像中的目標圖案作為參考區域RA,並決定影像中的參考區域RA的面積(例如,影像中所占像數(pixel)的數量、數量比例或以長度單位計量)。比例值即是參考區域RA的面積。而已測比例值是已測相機模組在特定的馬達位置所得出的參考區域RA的面積。在一些實施例中,比例值也可能是參考區域RA的面積再經特定數學函數轉換所得的值,但不以此為限。The measured scale value is related to the area of the reference region in the image captured by the
各比例值是用於確認鏡頭110與待測物的相對位置(或是相對距離),並進而得知馬達位置(或是鏡頭110相對於影像感測器170的位置)。Each ratio value is used to confirm the relative position (or relative distance) of the
此外,在一實施例中,已測資料中的調變傳遞函數值可以是所擷取的影像中的中心區域CP所測得的調變傳遞函數值。在另一實施例中,已測資料中的調變傳遞函數值可以是所擷取的影像中的四角區域CP(以左上角為例,但可能是其他位置)所測得的調變傳遞函數值。在一些實施例中,已測資料中的調變傳遞函數值可以所擷取的影像中任一位置所測得的調變傳遞函數值或多個位置的調變傳遞函數值的統計指標(例如,平均值、中位數或眾數)。In addition, in one embodiment, the modulation transfer function value in the measured data may be the modulation transfer function value measured in the central region CP in the captured image. In another embodiment, the modulation transfer function value in the measured data may be the modulation transfer function measured at the four-corner region CP (take the upper left corner as an example, but may be other positions) in the captured image value. In some embodiments, the MTF value in the measured data can be the MTF value measured at any position in the captured image or a statistical indicator of the MTF values at multiple positions (eg, , mean, median or mode).
處理器59或處理器190可收集細調階段中各馬達位置所對應的調變傳遞函數值,據以形成且取得調焦曲線(步驟S430)。舉例而言,圖6A及圖6B是依據本發明一實施例的完整曲線的示意圖。請參照圖6A,假設某一台已測相機模組在不同馬達位置下所測得的調變傳遞函數值TD如圖所示。請參照圖6B,處理器59或處理器190可基於已測得的調變傳遞函數值TD進行曲線擬合(Curve fitting),以決定調焦曲線FC。以調變傳遞函數值與馬達位置所形成的坐標系,調焦曲線FC可能由三次方或其他次方的方程式表示(例如,形成拋物線)。然而,方程式不限於三次方程式或多項式曲線,相關於數據的函數或其他幾何(geometric)擬合皆可適用於決定調焦曲線FC。The
處理器59或處理器190可判斷基於當前收集的數據是否有完整曲線(步驟S440)。完整曲線的確定例如是調焦曲線FC與準焦位置(對應於調變傳遞函數峰值)的差異小於對應門檻值,或是調焦曲線FC通過調變傳遞函數峰值。若尚未有完整曲線,則處理器59或處理器190繼續決定相機模組100的馬達130的移動距離(即,決定下一個馬達)(步驟S450),直到形成完整曲線(即可結束)。The
在一實施例中,當四角區域(例如,圖5所示的四角區域SP)有找到準焦位置時,處理器59或處理器190可記錄收集四角區域的所有相關數據(例如,已測比例值及調變傳遞函數值)。而取得完整曲線之後,處理器59或處理器190可記錄收集中心區域(例如,圖5所示的中心區域CP)的所有相關數據、及最佳清晰位置(即,準焦點)的比例值,進而將馬達130移動至清晰位置,從而完成調焦。在一些實施例中,處理器59或處理器190可僅針對中心區域的數據。In one embodiment, when the four-corner area (for example, the four-corner area SP shown in FIG. 5 ) has a focal position, the
另一方面,待測資料包括待測相機模組的馬達位置、對應的調變傳遞函數值、及對應的待測比例值。待測相機模組是指當前進行對焦調整的某一個相機模組100(尚未決定或再次決定調變傳遞函數峰值及其對應的準焦位置)。當馬達130移動鏡頭110到指定位置時,相機模組100擷取影像,且處理器190或處理器59基於影像感測器170的感測資料(即,所擷取的影像)計算調變傳遞函數值及待測比例值,並據以將一對一的一組資料(即,馬達位置與此位置下透過鏡頭110成像所得的調變傳遞函數值及待測比例值)記錄在待測資料中。其中,待測比例值相關於待測相機模組在特定的馬達位置所得出的參考區域的面積。例如,圖5所示參考區域RA的面積。On the other hand, the data to be tested includes the motor position of the camera module to be tested, the corresponding modulation transfer function value, and the corresponding value of the ratio to be tested. The camera module to be tested refers to a
處理器59或處理器190可依據該已測資料中的一台或更多台已測相機模組在準焦位置及對應的已測比例值決定變化關係(步驟S330)。具體而言,變化關係為鏡頭位移變化與比例值變化的比例。鏡頭位移變化為準焦位置與已測資料中的一個或更多個馬達位置中的一者的變化量。例如,準焦位置與另一馬達位置的數值差值。比例值變化為準焦位置對應的比例值與已測資料中的一個或更多個比例值(即,已測比例值)中的一者的變化量。例如,準焦位置的比例值與另一已測比例值的數值差異。變化關係可以是鏡頭位移變化除以比例值變化或其倒數。The
在一實施例中,處理器59或處理器190可將已測相機模組在其調變傳遞函數值超過細調門檻值後的一個或更多個細調馬達位置及對應的一個或更多個第二已測比例值作為可用數據。當然,已測資料已記錄這些細調馬達位置及對應的第二已測比例值(相關於對應細調馬達位置下所量測到影像中的參考區域的面積)。即,前述馬達位置包括細調馬達位置,且已測比例值包括第二已測比例值。處理器59或處理器190可依據那些細調馬達位置中的代表馬達位置及對應的代表比例值決定變化關係。鏡頭位移變化為代表馬達位置與準焦位置之間的差異,且比例值變化為代表比例值與已測比例值之間的差異。In one embodiment, the
在一實施例中,代表馬達位置對應的調變傳遞函數值為那些細調馬達位置中的最小者或稱為細調階段的第一步的位置。舉例而言,表(1)是一顆已測相機模組的馬達130移動8個位置以及其對應的調變傳遞函數值:
表(1)
假設細調門檻值為30,則步數為2~8所對應的馬達位置為細調馬達位置,且其已測比例值為第二已測比例值。此外,變化關係ScaleRatio 的數學表示式為:…(1) 其中,PeakPos 為準焦位置對應的調變傳遞函數峰值,FirstPos 為代表馬達位置(以其調變傳遞函數值大於細調門檻值的第一步的馬達位置為例,但在其他實施例可能是其他步數的馬達位置),PeakScale 為準焦位置對應已測比例值,且FirstScale 為代表馬達位置對應的已測比例值。由此可知,PeakPos-FirstPos 所得的值為鏡頭位移變化,且PeakScale-FirstScale 所得的值為比例值變化。Assuming that the fine adjustment threshold is 30, the motor positions corresponding to the steps of 2 to 8 are the fine adjustment motor positions, and the measured scale value is the second measured scale value. In addition, the mathematical expression of the variation relationship ScaleRatio is: …(1) Among them, PeakPos is the peak value of the modulation transfer function corresponding to the quasi-focus position, and FirstPos represents the motor position (for example, the motor position of the first step whose modulation transfer function value is greater than the fine adjustment threshold, but in other The embodiment may be motor positions of other steps), PeakScale is the measured scale value corresponding to the quasi-focus position, and FirstScale is the measured scale value corresponding to the motor position. It can be seen that the value obtained by PeakPos-FirstPos is the lens shift change, and the value obtained by PeakScale-FirstScale is the scale value change.
此外,表(1)中的位置變化為準焦位置與當前馬達位置的數值差異,且比例變化為準焦位置對應的已測比例值與當前馬達位置所測得的已測比例值的數值差異。In addition, the position change in Table (1) is the numerical difference between the quasi-focus position and the current motor position, and the scale change is the numerical difference between the measured scale value corresponding to the quasi-focus position and the measured scale value measured at the current motor position .
在另一實施例中,代表馬達位置可以是已測資料中的那些馬達位置中的其他者(即,不限於細調階段的第一步的位置)。In another embodiment, the representative motor position may be other of those motor positions in the measured data (ie, not limited to the position of the first step of the fine tuning phase).
在一實施例中,處理器59或處理器190可將那些細調馬達位置與準焦位置的相對距離依據對應的調變傳遞函數值分別分類到數個細調區間中的一者。相對距離例如是前述表(1)中的位置變化(即,準焦位置與當前馬達位置的數值差異)。In one embodiment, the
在一實施例中,處理器59或處理器190將細調階段的那些已測資料依據其調變傳遞函數值等分切割成數個細調區間。例如,那些已測資料的調變傳遞函數值介於30~90之間,則細調區間的大小為4且可切割成15等分(形成15筆資料)。其中,第一筆資料為調變傳遞函數值為30所對應的數據,第二筆資料為調變傳遞函數值為34所對應的數據,其餘依此類推。在另一實施例中,細調區間的大小及變化(例如,可能不是等分)仍可依據實際需求而改變,且本發明實施例不加以限制。In one embodiment, the
各細調區間對應於那些相對距離中的一者。處理器59或處理器190確認已測資料中的某一調變傳遞函數值對應的細調區間,並將這調變傳遞函數值映射至對應的細調區間。細調區間的編號Item_Index可由公式(2)得出:
Item_Index = [(MTF-30)/Interval]…(2)
MTF為調變傳遞函數值,且Interval為細調區間的大小(例如,4或其他數值)。Each fine tuning interval corresponds to one of those relative distances. The
舉例而言,假設細調區間的大小為4,表(2)為細調區間的相對距離數據:
表(2)
舉例而言,圖7是依據本發明一實施例的調焦過程的調變傳遞函數值與馬達位置的關係圖。請參照圖7,假設已測資料中的馬達位置x為{0, 2200, 4400, 6600, 8800, 11000, 11110, 11220, 11330, 11440},且對應的調變傳遞函數值y(x)為{1.3184, 1.0017, 1.367, 2.2299, 11.6538, 69.2429, 72.0549, 73.5307, 73.5189, 72.9504}(即,馬達位置x對應的調變傳遞函數值)。For example, FIG. 7 is a diagram illustrating a relationship between a modulation transfer function value and a motor position in a focusing process according to an embodiment of the present invention. Referring to FIG. 7, it is assumed that the motor position x in the measured data is {0, 2200, 4400, 6600, 8800, 11000, 11110, 11220, 11330, 11440}, and the corresponding modulation transfer function value y(x) is {1.3184, 1.0017, 1.367, 2.2299, 11.6538, 69.2429, 72.0549, 73.5307, 73.5189, 72.9504} (that is, the modulation transfer function value corresponding to the motor position x).
圖8是依據本發明一實施例的調焦過程的已測比例值與馬達位置的關係圖。請參照圖8,假設馬達位置x與圖7相同,且對應的已測比例值z(x)為{472.91, 468, 460.78, 453.46, 446.18, 438.84, 438.25, 438, 437.44, 437.04}。8 is a graph showing the relationship between the measured scale value and the motor position in the focusing process according to an embodiment of the present invention. Referring to FIG. 8, it is assumed that the motor position x is the same as that of FIG. 7, and the corresponding measured scale value z(x) is {472.91, 468, 460.78, 453.46, 446.18, 438.84, 438.25, 438, 437.44, 437.04}.
此外,表(3)為10顆已測相機模組的所有調焦數據(須說明的是,表(3)所示數據僅作為範例說明,且對應於這些數據的已測相機模組不同於圖7及圖8的已測相機模組):
表(3)
處理器59或處理器190可決定這些調變傳遞函數峰值的峰值代表及變化關係的關係代表。在一實施例中,峰值代表為其平均值AvgValue:
AvgValue= ()/n…(3)
其中,為調變傳遞函數峰值,n為那些已測相機模組的數量。以表(3)為例,峰值代表為(84.9901+86.5307+83.361+87.0328+84.6829+87.3083+87.7189+84.7532+87.4093+86.8734)/10=86.0661。
此外,關係代表為其平均值AvgScale_Ratio:
AvgScale_Ratio=/n…(4)
其中,為變化關係(例如由公式(1)得出)。以表(3)為例,關係代表為(-310.734-314.848-284.483-288.21-324.125-281.57-306.62-302.29-330.472-307.263)/10=-305.062。The
在另一實施例中,峰值代表可以是已測資料中的那些調變傳遞函數峰值的其他統計指標(例如,中位數、或眾數)或任一者,且關係代表可以是已測資料中的那些變化關係的其他統計指標(例如,中位數、或眾數)或任一者。In another embodiment, the peak representation may be other statistical indicators (eg, median, or mode) or any of those modulation transfer function peaks in the measured data, and the relational representation may be the measured data Other statistical measures of the relationship (eg, median, or mode) or any of those in the relationship.
處理器59或處理器190可依據待測資料與變化關係決定待測相機模組的下一馬達位置(步驟S350)。具體而言,圖9是依據本發明一實施例的調焦方法的流程圖。請參照圖9,針對待測相機模組,處理器59或處理器190可分析其變化關係(步驟S910)。與已測比例值相似,針對待測相機模組,處理器59或處理器190可基於其影像感測器170所擷取的影像中的目標圖案(如圖5所示的黑色方塊為例,但不以此為限),並基於目標圖案在影像中所對應的目標區域的面積計算待測比例值(例如,影像中所占像數(pixel)的數量、數量比例或以長度單位計量)。The
在一實施例中,處理器59或處理器190可對待測比例值與已測比例值的差異使用變化關係以取得下一馬達位置。具體而言,鏡頭位移變化(相關於準焦位置與其他馬達位置的數值差異)與比例值變化(相關於準焦位置對應的比例值與其他比例值的數值差異)的比例(即,變化關係)大致相同。因此,使用變化關係可預測準焦位置。而當前馬達位置與這下一馬達位置之間的數值差異與比例值變化(相關於下一馬達位置對應的已測比例值與當前馬達位置對應的未測比例值的數值差異)也應等於或接近基於已測資料所得出的變化關係。In one embodiment, the
下一馬達位置Next_Pos可由公式(5)得出: Next_Pos = ((Peak_Scale – Current_Scale) * Scale_Ratio) + Current_Pos…(5) 其中,Peak_Scale為已測資料中的已測比例值的比例代表(例如,那些已測資料中的一個或更多個已測相機模組的準焦位置所對應的已測比例值的統計指標或其中的任一者),Current_Scale為待測相機模組的待測比例值,Scale_Ratio為已測資料中的一個或更多個已測相機模組的變化關係的關係代表,且Current_Pos為當前馬達位置。The next motor position Next_Pos can be derived from equation (5): Next_Pos = ((Peak_Scale – Current_Scale) * Scale_Ratio) + Current_Pos…(5) Wherein, Peak_Scale is the scale representation of the measured scale value in the measured data (for example, the statistical index of the measured scale value corresponding to the quasi-focus position of one or more measured camera modules in the measured data or Any of them), Current_Scale is the measured ratio value of the camera module to be tested, Scale_Ratio is the relationship representation of the change relationship of one or more tested camera modules in the measured data, and Current_Pos is the current motor position .
處理器59或處理器190可依據下一馬達位置透過控制馬達驅動電路150驅動馬達130移動至預測位置(即,預測有調變傳遞函數峰值的位置)(步驟S920),在這下一馬達位置透過影像感測器170擷取影像,並據以取得對應的調變傳遞函數值及待測比例值。The
處理器59或處理器190可判斷當前馬達位置所對應的調變傳遞函數值是否到達細調門檻值(可能相同於或不同於已測資料所用的細調門檻值)。若當前的調變傳遞函數值未到達細調門檻值,則維持粗調階段,且處理器59或處理器190可再次使用變化關係及當前馬達位置所對應的待測比例值決定下一馬達位置。The
若當前的調變傳遞函數值已達到細調門檻值(例如,待測相機模組的馬達位置所對應的調變傳遞函數值大於或等於細調門檻值),則進入細調階段,且處理器59或處理器190可取得當前調變傳遞函數值所屬的細調區間所對應的相對距離(步驟S930)。細調區間的切割方式可參照前述說明,且於此不再贅述。處理器59或處理器190可利用公式(2)得出當前調變傳遞函數值所屬的細調區間的編號,並依據已測資料中所屬的細調區間所對應的相對距離(如表(2)所示)。在細調階段中,處理器59或處理器190可依據這相對距離決定下一馬達位置而不使用變化關係。即,下一馬達位置為當前馬達位置與相對距離的和值。以表(2)為例,假設當前調變傳遞函數值屬於編號5,且當前馬達位置為18000,則下一馬達位置為18000+1694=19694。If the current modulation transfer function value has reached the fine tuning threshold (for example, the modulation transfer function value corresponding to the motor position of the camera module to be tested is greater than or equal to the fine tuning threshold), the fine tuning stage is entered, and processing is performed. The
前述各馬達位置所得的調變傳遞函數值及待測比例值皆可作為待測資料,處理器59或處理器190可判斷當前的待測資料是否有完整曲線(步驟S940)。與步驟S440相似地,完整曲線的確定例如是待測資料中的馬達位置與一個或更多個調變傳遞函數值所形成的調焦曲線與準焦位置(對應於調變傳遞函數峰值)的差異小於對應門檻值,或是調焦曲線通過調變傳遞函數峰值。The modulation transfer function value and the ratio value to be measured obtained from the aforementioned motor positions can be used as the data to be measured, and the
若尚未有完整曲線,則處理器59或處理器190繼續決定相機模組100的馬達130的移動距離(即,決定下一馬達)(步驟S930),直到形成完整曲線(即是找到這待測相機模組的準焦位置)。此時,代表馬達130可移動至清晰位置(即,準焦位置)(步驟S950),並據以完成調焦(步驟S960)。If there is no complete curve yet, the
綜上所述,在本發明實施例的相機模組、對焦調整系統及對焦方法中,收集已測相機模組的已測資料,並得出與鏡頭位移變化與比例值變化相關的變化關係及與準焦位置的相對距離。這變化關係及相對距離可用於估測準焦位置,進而調焦流程快速進行。To sum up, in the camera module, focus adjustment system, and focus method according to the embodiments of the present invention, the measured data of the measured camera module are collected, and the change relationship related to the change of the lens displacement and the change of the scale value and The relative distance from the focus position. The changing relationship and relative distance can be used to estimate the focus position, so that the focus adjustment process can be performed quickly.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above by the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, The protection scope of the present invention shall be determined by the scope of the appended patent application.
C:相機 DoF:景深 O:物體 1:對焦調整系統 50:運算裝置 59:處理器 100:相機模組 110:鏡頭 130:馬達 150:馬達驅動電路 170:影像感測器 190:處理器 S310~S350、S410~S450、S910~S960:步驟 RA:參考區域 SP:四角區域 CP:中心區域 TD:調變傳遞函數值 FC:調焦曲線C: camera DoF: Depth of Field O: object 1: Focus adjustment system 50: Computing device 59: Processor 100: Camera Module 110: Lens 130: Motor 150: Motor drive circuit 170: Image Sensor 190: Processor S310~S350, S410~S450, S910~S960: Steps RA: Reference area SP: Four Corners Area CP: Central area TD: Modulation transfer function value FC: focus curve
圖1是相機的景深的示意圖。 圖2是依據本發明一實施例的對焦調整系統的元件方塊圖。 圖3是依據本發明一實施例的對焦方法的流程圖。 圖4是依據本發明一實施例的取得已測資料的流程圖。 圖5是依據本發明一實施例的決定比例值的示意圖。 圖6A及圖6B是依據本發明一實施例的完整曲線的示意圖。 圖7是依據本發明一實施例的調焦過程的調變傳遞函數(Modulation Transfer Function,MTF)值與馬達位置的關係圖。 圖8是依據本發明一實施例的調焦過程的已測比例值與馬達位置的關係圖。 圖9是依據本發明一實施例的調焦方法的流程圖。Figure 1 is a schematic diagram of the depth of field of a camera. FIG. 2 is a block diagram of components of a focus adjustment system according to an embodiment of the present invention. FIG. 3 is a flowchart of a focusing method according to an embodiment of the present invention. FIG. 4 is a flow chart of obtaining measured data according to an embodiment of the present invention. FIG. 5 is a schematic diagram of determining a scale value according to an embodiment of the present invention. 6A and 6B are schematic diagrams of complete curves according to an embodiment of the present invention. 7 is a diagram illustrating a relationship between a Modulation Transfer Function (MTF) value and a motor position in a focusing process according to an embodiment of the present invention. 8 is a graph showing the relationship between the measured scale value and the motor position in the focusing process according to an embodiment of the present invention. FIG. 9 is a flowchart of a focusing method according to an embodiment of the present invention.
S310~S350:步驟 S310~S350: Steps
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW110121428A TWI774418B (en) | 2021-06-11 | 2021-06-11 | Camera module, focus adjustment system and focusing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW110121428A TWI774418B (en) | 2021-06-11 | 2021-06-11 | Camera module, focus adjustment system and focusing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202136894A TW202136894A (en) | 2021-10-01 |
| TWI774418B true TWI774418B (en) | 2022-08-11 |
Family
ID=79601012
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW110121428A TWI774418B (en) | 2021-06-11 | 2021-06-11 | Camera module, focus adjustment system and focusing method |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI774418B (en) |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5115262A (en) * | 1990-04-25 | 1992-05-19 | Olympus Optical Co., Ltd. | Auto-focusing apparatus |
| CN101510040A (en) * | 2008-02-14 | 2009-08-19 | 株式会社尼康 | Image processing device, imaging device, and medium storing image processing program |
| CN103458261A (en) * | 2013-09-08 | 2013-12-18 | 华东电网有限公司 | Video scene variation detection method based on stereoscopic vision |
| JP5523143B2 (en) * | 2010-02-25 | 2014-06-18 | オリンパスイメージング株式会社 | Imaging apparatus and automatic focusing method |
| TW201504740A (en) * | 2013-07-19 | 2015-02-01 | Htc Corp | Image processing device and method for controlling the same |
| US20150316833A1 (en) * | 2014-05-01 | 2015-11-05 | Canon Kabushiki Kaisha | Focus adjustment device, method for controlling the same, and image capture apparatus |
| CN106686308A (en) * | 2016-12-28 | 2017-05-17 | 平安科技(深圳)有限公司 | Image focal length detection method and device |
| CN107147849A (en) * | 2017-05-25 | 2017-09-08 | 潍坊科技学院 | A method for controlling a photographic device |
| CN110266938A (en) * | 2018-12-27 | 2019-09-20 | 全球能源互联网研究院有限公司 | Intelligent shooting method and device for substation equipment based on deep learning |
-
2021
- 2021-06-11 TW TW110121428A patent/TWI774418B/en active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5115262A (en) * | 1990-04-25 | 1992-05-19 | Olympus Optical Co., Ltd. | Auto-focusing apparatus |
| CN101510040A (en) * | 2008-02-14 | 2009-08-19 | 株式会社尼康 | Image processing device, imaging device, and medium storing image processing program |
| JP5523143B2 (en) * | 2010-02-25 | 2014-06-18 | オリンパスイメージング株式会社 | Imaging apparatus and automatic focusing method |
| TW201504740A (en) * | 2013-07-19 | 2015-02-01 | Htc Corp | Image processing device and method for controlling the same |
| CN103458261A (en) * | 2013-09-08 | 2013-12-18 | 华东电网有限公司 | Video scene variation detection method based on stereoscopic vision |
| US20150316833A1 (en) * | 2014-05-01 | 2015-11-05 | Canon Kabushiki Kaisha | Focus adjustment device, method for controlling the same, and image capture apparatus |
| CN106686308A (en) * | 2016-12-28 | 2017-05-17 | 平安科技(深圳)有限公司 | Image focal length detection method and device |
| CN107147849A (en) * | 2017-05-25 | 2017-09-08 | 潍坊科技学院 | A method for controlling a photographic device |
| CN110266938A (en) * | 2018-12-27 | 2019-09-20 | 全球能源互联网研究院有限公司 | Intelligent shooting method and device for substation equipment based on deep learning |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202136894A (en) | 2021-10-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107888819A (en) | A kind of auto focusing method and device | |
| CN101950116B (en) | Video automatic focusing method applied to multi-main-body scene | |
| JP2011191568A (en) | Imaging device, display method and program | |
| TWI392852B (en) | Portable electric device using auto focus for distance measurement and distance measuring method using the same | |
| CN116156321B (en) | A focusing method, device, equipment and storage medium | |
| US9900493B2 (en) | Focus detecting apparatus, and method of prediction for the same | |
| CN117278851A (en) | Focusing method, equipment and storage medium applied to monitoring equipment | |
| TWI245556B (en) | Autofocus control method, autofocus controller, and image processor | |
| CN104864810A (en) | Digital measuring method and device thereof | |
| CN103809348B (en) | Auto focus method applied to camera module | |
| CN116182786B (en) | Monocular vision ranging method, camera and medium | |
| US20230177711A1 (en) | Distance measurement apparatus, distance detection technique, and imaging apparatus | |
| US7912314B2 (en) | Method to evaluate contrast value for an image and applications thereof | |
| TWI774418B (en) | Camera module, focus adjustment system and focusing method | |
| CN106154688A (en) | A kind of method and device of auto-focusing | |
| JP2013246052A (en) | Distance measuring apparatus | |
| JP6642998B2 (en) | Image shift amount calculating apparatus, imaging apparatus, and image shift amount calculating method | |
| KR101032174B1 (en) | Auto Focus Method | |
| CN113242387B (en) | Camera module, focusing adjustment system and focusing method | |
| CN113114905B (en) | Camera module, focusing adjustment system and focusing method | |
| TW201441713A (en) | Image sensor, electric device and focusing method thereof | |
| TWI780665B (en) | Camera module, focus adjustment system, and focusing method | |
| JP2013061560A (en) | Distance measuring device, and imaging device | |
| JP6615258B2 (en) | Control device, imaging device, control method, program, and storage medium | |
| CN100559255C (en) | The image capture unit of automatic focusing method and use said method |