TWI817610B - White balance coefficient correction method and electronic device - Google Patents
White balance coefficient correction method and electronic device Download PDFInfo
- Publication number
- TWI817610B TWI817610B TW111126599A TW111126599A TWI817610B TW I817610 B TWI817610 B TW I817610B TW 111126599 A TW111126599 A TW 111126599A TW 111126599 A TW111126599 A TW 111126599A TW I817610 B TWI817610 B TW I817610B
- Authority
- TW
- Taiwan
- Prior art keywords
- white balance
- preset
- color temperature
- coefficient
- response
- Prior art date
Links
- 238000012937 correction Methods 0.000 title claims abstract description 36
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000004044 response Effects 0.000 claims abstract description 143
- 238000005286 illumination Methods 0.000 claims abstract description 9
- 230000006870 function Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- NIXOWILDQLNWCW-UHFFFAOYSA-N acrylic acid group Chemical group C(C=C)(=O)O NIXOWILDQLNWCW-UHFFFAOYSA-N 0.000 description 1
- 230000032683 aging Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/12—Picture reproducers
- H04N9/31—Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
- H04N9/3179—Video signal processing therefor
- H04N9/3182—Colour adjustment, e.g. white balance, shading or gamut
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Processing Of Color Television Signals (AREA)
- Color Television Image Signal Generators (AREA)
- Exposure Control For Cameras (AREA)
- Endoscopes (AREA)
Abstract
Description
本發明是有關於一種電子裝置,且特別是有關於一種白平衡係數校正方法及電子裝置。The present invention relates to an electronic device, and in particular, to a white balance coefficient correction method and an electronic device.
目前,大多數的電子產品皆配有影像擷取模組,好讓使用者可操作這些電子產品來拍照或錄影。除了可達到紀錄影像的功用之外,更可根據擷取影像執行例如視訊會議或擴增實境等等各種後續應用。基於各種組裝因素或元件特性差異,不同影像擷取模組在相同光源環境下所產生的感測結果是有落差的。也就是說,若將相同的白平衡係數套用至不同的影像感測模組,這些影像感測模組在相同光源環境下所產生的感測結果是不一致的。因此,這些影像感測模組在出廠之前會分別進行白平衡係數的校正程序來獲取專屬的白平衡係數,而非單純將相同的白平衡係數套用至所有的影像感測模組。Currently, most electronic products are equipped with image capture modules, allowing users to operate these electronic products to take photos or videos. In addition to the function of recording images, it can also perform various subsequent applications based on the captured images, such as video conferencing or augmented reality. Due to various assembly factors or differences in component characteristics, there are differences in the sensing results produced by different image capture modules under the same light source environment. That is to say, if the same white balance coefficient is applied to different image sensing modules, the sensing results produced by these image sensing modules under the same light source environment are inconsistent. Therefore, these image sensing modules will undergo a white balance coefficient correction process separately before leaving the factory to obtain exclusive white balance coefficients, rather than simply applying the same white balance coefficient to all image sensing modules.
然而,於校正白平衡係數的校正環境中,工廠可能會使用多個光源設備來對多的影像擷取裝模組進行校正,但這些光源設備隨著使用年限的增加可能會有老化等等現象,且不同的光源設備於相同色溫設定條件下所發出的光波長也具有差異性。因此,白平衡係數的校正結果將因為光源設備所發出的光源色溫發生偏移而不如預期。此外,於白平衡係數的校正過程中,操作人員也可能因為誤操作而將光源設備的色溫設定為非預期色溫,進而導致白平衡係數的校正結果明顯錯誤。一旦白平衡係數的校正結果不理想,將導致基於自動白平衡功能擷取的影像發生色偏。However, in a calibration environment where the white balance coefficient is corrected, the factory may use multiple light source devices to calibrate multiple image capture modules. However, these light source devices may age as their years of use increase. , and the wavelengths of light emitted by different light source devices under the same color temperature setting conditions are also different. Therefore, the correction result of the white balance coefficient will not be as expected because the color temperature of the light source emitted by the light source device is shifted. In addition, during the correction process of the white balance coefficient, the operator may also set the color temperature of the light source device to an unexpected color temperature due to misoperation, thereby causing the correction result of the white balance coefficient to be obviously wrong. Once the correction result of the white balance coefficient is not ideal, it will cause color cast in the images captured based on the automatic white balance function.
有鑑於此,本發明提供一種白平衡係數校正方法及電子裝置,其可用於解決上述技術問題。In view of this, the present invention provides a white balance coefficient correction method and an electronic device, which can be used to solve the above technical problems.
本發明實施例提供一種白平衡係數校正方法,適於包括影像感測器的電子裝置,所述方法包括下列步驟。紀錄多個預設白平衡係數。利用影像感測器在一光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值。基於一預設色溫的預設條件範圍,判斷對應於色彩通道的響應值是否符合一可容忍條件。反應於判定響應值符合可容忍條件,根據對應於色彩通道的響應值校正預設白平衡係數,以獲取對應於預設色溫的多個最終白平衡係數。Embodiments of the present invention provide a white balance coefficient correction method, which is suitable for electronic devices including image sensors. The method includes the following steps. Record multiple preset white balance coefficients. The image sensor is used to perform a light sensing operation under the illumination of a light source to obtain multiple response values corresponding to multiple color channels. Based on a preset condition range of a preset color temperature, it is determined whether the response value corresponding to the color channel meets a tolerable condition. In response to determining that the response value meets the tolerable condition, the preset white balance coefficient is corrected according to the response value corresponding to the color channel to obtain a plurality of final white balance coefficients corresponding to the preset color temperature.
本發明實施例提供一種電子裝置,其包括影像感測器、儲存裝置及處理器。處理器耦接於影像感測器與儲存裝置,並經配置以執行下列步驟。紀錄多個預設白平衡係數。利用影像感測器在一光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值。基於一預設色溫的預設條件範圍,判斷對應於色彩通道的響應值是否符合一可容忍條件。反應於判定響應值符合可容忍條件,根據對應於色彩通道的響應值校正預設白平衡係數,以獲取對應於預設色溫的多個最終白平衡係數。An embodiment of the present invention provides an electronic device, which includes an image sensor, a storage device and a processor. The processor is coupled to the image sensor and the storage device, and is configured to perform the following steps. Record multiple preset white balance coefficients. The image sensor is used to perform a light sensing operation under the illumination of a light source to obtain multiple response values corresponding to multiple color channels. Based on a preset condition range of a preset color temperature, it is determined whether the response value corresponding to the color channel meets a tolerable condition. In response to determining that the response value meets the tolerable condition, the preset white balance coefficient is corrected according to the response value corresponding to the color channel to obtain a plurality of final white balance coefficients corresponding to the preset color temperature.
基於上述,於本發明的實施例中,透過影像感測器在校正環境中光源的照射下進行光感測操作,可取得多個色彩通道的多個響應值。當這些響應值根據對應於預設色溫的預設條件範圍被判斷符合可容忍條件時,可利用這些響應值來校正已儲存的預設白平衡係數,從而獲取對應於此預設色溫的最終白平衡係數。如此一來,可避免白平衡係數的校正結果出現超乎預期的錯誤,進而提高了白平衡增益校正的可靠性。Based on the above, in embodiments of the present invention, multiple response values of multiple color channels can be obtained by performing light sensing operations through the image sensor under the illumination of the light source in the calibration environment. When these response values are judged to meet the tolerable conditions according to the preset condition range corresponding to the preset color temperature, these response values can be used to correct the stored preset white balance coefficients, thereby obtaining the final white balance corresponding to this preset color temperature. Balance factor. In this way, unexpected errors in the correction results of the white balance coefficient can be avoided, thereby improving the reliability of the white balance gain correction.
本發明的部份實施例接下來將會配合附圖來詳細描述,以下的描述所引用的元件符號,當不同附圖出現相同的元件符號將視為相同或相似的元件。這些實施例只是本發明的一部份,並未揭示所有本發明的可實施方式。更確切的說,這些實施例只是本發明的專利申請範圍中的方法與裝置的範例。Some embodiments of the present invention will be described in detail with reference to the accompanying drawings. The component symbols cited in the following description will be regarded as the same or similar components when the same component symbols appear in different drawings. These embodiments are only part of the present invention and do not disclose all possible implementations of the present invention. Rather, these embodiments are only examples of methods and apparatuses within the scope of the patent application of the present invention.
圖1是依據本發明一實施例的電子裝置的示意圖。請參照圖1,在不同的實施例中,電子裝置100可例如為筆記型電腦、智慧電視、平板電腦、遊戲機、手機等等具有影像擷取功能的電子裝置,本發明對此不限制。在圖1中,電子裝置100可包括影像感測器110、儲存裝置120,以及處理器130。FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention. Please refer to FIG. 1 . In different embodiments, the
在一些實施例中,影像感測器110用以提供影像感測功能。影像感測器110可包括感光元件,例如是電荷耦合元件(Charge Coupled Device,CCD)、互補性氧化金屬半導體(Complementary Metal-Oxide Semiconductor,CMOS)元件或其他元件,本發明對此不限制。影像感測器110可與其他元件(例如鏡頭、光圈等等)組成電子裝置100的相機模組。In some embodiments, the
儲存裝置120可用以儲存影像、指令、程式碼、軟體模組等等資料,其可以例如是任意型式的固定式或可移動式隨機存取記憶體(random access memory,RAM)、唯讀記憶體(read-only memory,ROM)、快閃記憶體(flash memory)、硬碟或其他類似裝置、積體電路及其組合。The
處理器130耦接影像感測器110以及儲存裝置120,例如是中央處理單元(central processing unit,CPU)、應用處理器(application processor,AP),或是其他可程式化之一般用途或特殊用途的微處理器(microprocessor)、數位訊號處理器(digital signal processor,DSP)、影像訊號處理器(image signal processor,ISP)、圖形處理器(graphics processing unit,GPU)或其他類似裝置、積體電路及其組合。The
處理器130可存取並執行記錄在儲存裝置120中的軟體模組,以實現本發明實施例中的白平衡係數校正方法。上述軟體模組可廣泛地解釋為意謂指令、指令集、代碼、程式碼、程式、應用程式、軟體套件、執行緒、程序、功能等,而不管其是被稱作軟體、韌體、中間軟體、微碼、硬體描述語言亦或其他者。The
圖2是依據本發明一實施例的白平衡係數校正方法的流程圖。請參照圖2,本實施例的方法可由圖1的電子裝置100執行,以下即搭配圖1所示的元件說明圖2各步驟的細節。FIG. 2 is a flow chart of a white balance coefficient correction method according to an embodiment of the present invention. Referring to FIG. 2 , the method of this embodiment can be executed by the
在步驟S202中,儲存裝置120紀錄多個預設白平衡係數。具體而言,儲存裝置120可紀錄對應至多個預設色溫的多個預設白平衡係數,且各預設色溫所對應的多個預設白平衡係數可包括紅綠比例(R/G)係數以及藍綠(B/G)比例係數。舉例而言,這些預設色溫可包括D65光源的6500K、CWF光源的4150K,以及A燈源的2800K等等,本發明對此不限制。處理器130可將多個預設色溫的多個預設白平衡係數寫入儲存裝置120,且對應至多個預設色溫的多個預設白平衡係數可用以建立一預設色溫曲線。儲存裝置120例如是連接影像訊號處理器(ISP)的電子抹除式可複寫唯讀記憶體(EEPROM),但本發明不限制於此。In step S202, the
在步驟S204中,處理器130可利用影像感測器110在光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值。詳細而言,當要校正電子裝置100的白平衡係數時,電子裝置100將被可被放置於一燈箱或是其他校正環境中。當處理器130進行白平衡係數校正操作時,影像感測器110將透過拍攝校正環境中的一白色校正物件來進行光感測操作。白色校正物件例如為白色壓克力板或白紙等等,本發明對此不限制。In step S204, the
須說明的是,當要針對某一預設色溫進行白平衡係數校正時,校正環境中的光源的設定目標色溫應為預設色溫。於一些實施例中,在影像感測器110拍攝一白色校正物件後,處理器130可對擷取影像中多個像素的多個色彩通道的多個響應值(亦即影像像素的像素值)進行統計運算,例如對各色彩通道的響應值進行平均運算或其他統計運算等等。這些響應值包括紅色通道響應值、綠色通道響應值與藍色通道響應值。於是,在影像感測器110針對某一預設色溫進行一次光感測操作之後,處理器130可獲取一紅色通道響應值、一綠色通道響應值與一藍色通道響應值。It should be noted that when the white balance coefficient is corrected for a certain preset color temperature, the set target color temperature of the light source in the correction environment should be the preset color temperature. In some embodiments, after the
在步驟S206中,基於預設色溫的一預設條件範圍,處理器130可判斷對應於這些色彩通道的響應值是否符合一可容忍條件。透過此步驟的實施,處理器130可檢測校正環境中的光源的實際色溫是否嚴重偏移於預設色溫。舉例而言,當校正環境中的光源的設定目標色溫為預設色溫「6500K」時,處理器130將根據對應於預設色溫「6500K」的預設條件範圍來判斷影像感測器110所獲取的響應值是否符合可容忍條件,從而檢測校正環境中的光源的實際色溫是否與預設色溫「6500K」相差甚多。In step S206, based on a preset condition range of the preset color temperature, the
若這些色彩通道的響應值不符合可容忍條件(步驟S206判斷為否),代表校正環境中的光源的實際色溫與預設色溫落差太大。具體而言,基於校正環境中的光源有老化現象或其他人為操作因素,光源的實際色溫與預設色溫之間將具有明顯落差。因此,在步驟S210中,反應於判定響應值不符合可容忍條件,處理器130可將預設白平衡係數設定為對應於預設色溫的多個最終白平衡係數。最終白平衡係數同樣包括紅綠比例係數與藍綠比例係數。最終白平衡係數用於影像感測器110的自動白平衡(AWB)功能。也就是說,反應於判定響應值不符合可容忍條件,為了避免使用錯誤資料來校正預設白平衡係數,處理器130將不校正預設白平衡係數,而直接將預設白平衡係數作為電子裝置100執行自動白平衡功能所使用的最終白平衡係數。If the response values of these color channels do not meet the tolerable conditions (step S206 determines No), it means that the actual color temperature of the light source in the calibration environment is too different from the preset color temperature. Specifically, due to the aging phenomenon of the light source in the calibration environment or other human operating factors, there will be a significant gap between the actual color temperature of the light source and the preset color temperature. Therefore, in step S210, in response to determining that the response value does not meet the tolerable condition, the
另一方面,若這些色彩通道的響應值符合可容忍條件(步驟S206判斷為是),代表校正環境中的光源的實際色溫與預設色溫貼近,即光源的實際色溫符合預期。因此,在步驟S208中,反應於判定響應值符合可容忍條件,處理器130可根據對應於色彩通道的響應值校正預設白平衡係數,以獲取對應於預設色溫的多個最終白平衡係數。處理器130可利用對應於某一預設色溫的紅色通道響應值、綠色通道響應值與藍色通道響應值來校正對應於該相同預設色溫的預設白平衡係數。在校正預設白平衡係數之後,處理器130可將校正結果作為電子裝置100執行自動白平衡功能所使用的最終白平衡係數。On the other hand, if the response values of these color channels meet the tolerable conditions (yes in step S206), it means that the actual color temperature of the light source in the calibration environment is close to the preset color temperature, that is, the actual color temperature of the light source is in line with expectations. Therefore, in step S208, in response to determining that the response value meets the tolerable condition, the
詳細而言,圖3是依據本發明一實施例的校正預設白平衡係數的流程圖。請參照圖3,圖2所示的步驟S208可實施為步驟S2081~S2082。於步驟S2081中,反應於判定響應值符合可容忍條件,處理器130可根據響應值獲取對應於預設色溫的多個參考白平衡係數。參考白平衡係數可包括R/G比例係數與B/G比例係數。舉例而言,處理器130可根據對應於預設色溫「6500K」的RGB響應值獲取對應於預設色溫「6500K」的一個R/G比例係數與一個B/G比例係數。R/G比例係數的分母為紅色通道響應值而分子為綠色響應值。B/G比例係數的分母為藍色通道響應值而分子為綠色響應值。Specifically, FIG. 3 is a flow chart for correcting the preset white balance coefficient according to an embodiment of the present invention. Please refer to Figure 3. Step S208 shown in Figure 2 can be implemented as steps S2081 to S2082. In step S2081, in response to determining that the response value meets the tolerable condition, the
接著,於步驟S2082中,處理器130根據參考白平衡係數校正預設白平衡係數,以獲取對應於預設色溫的最終白平衡係數。於一些實施例中,處理器130可直接將對應於某一預設色溫的參考白平衡係數設定為對應於該相同預設色溫的最終白平衡係數。如此一來,對應至多個預設色溫的多組參考白平衡係數可分別直接對應至經校正色溫曲線上的多個點。或者,於一些實施例中,處理器130可根據對應至多個預設色溫的多組參考白平衡係數來平移預設色溫曲線以獲取經校正色溫曲線,並根據經校正色溫曲線獲取對應於多個預設色溫的多組最終白平衡係數。Next, in step S2082, the
舉例而言,圖4是依據本發明一實施例的預設色溫曲線與經校正色溫曲線的示意圖。請參照圖4,為了方便說明,圖4是以五個預設色溫為範例進行說明,但本發明不限制於此。儲存裝置120可紀錄對應至第一預設色溫的預設白平衡係數(即R/G比例係數「Gr_d1」以及B/G比例係數「GB_d1」),且對應至第一預設色溫的預設白平衡係數是對應於預設色溫曲線C1上的點P1。同理,儲存裝置120可紀錄分別對應至第二預設色溫、第三預設色溫、第四預設色溫以及第五預設色溫的4組預設白平衡係數。透過連接這4組預設白平衡係數所對應的點P2、P3、P4、P5,可獲取預設色溫曲線C1。For example, FIG. 4 is a schematic diagram of a preset color temperature curve and a corrected color temperature curve according to an embodiment of the present invention. Please refer to FIG. 4. For convenience of explanation, FIG. 4 uses five preset color temperatures as an example for illustration, but the present invention is not limited thereto. The
於圖4的範例中,處理器130可判定對應於第一預設光源的RGB通道響應值符合可容忍條件。於是,處理器130可根據對應於第一預設光源的RGB通道響應值計算出參考白平衡係數(即R/G比例係數「Gr_r1」以及B/G比例係數「GB_r1」)。於本範例中,處理器可透過將參考白平衡係數(即R/G比例係數「Gr_r1」以及B/G比例係數「GB_r1」)設定為最終白平衡係數來校正預設白平衡係數。亦即,對應至第一預設色溫的參考白平衡係數將對應於經校正色溫曲線C2上的點P6。同理,處理器130可依據相似的流程而獲取分別對應至第二預設色溫、第三預設色溫、第四預設色溫以及第五預設色溫的4組最終白平衡係數,從而根據這些最終白平衡係數所對應的點P7、P8、P9、P10獲取經校正色溫曲線C2。藉此,電子裝置100可根據經校正色溫曲線C2來執行自動白平衡功能,使擷取影像不會發生色偏現象。舉例而言,在電子裝置100完成白平衡係數的校正且紀錄經校正色溫曲線C2的相關資訊之後,處理器130可利用經校正色溫曲線C2來估測場景色溫,並根據校正色溫曲線C2來決定用以調整影像顏色的最終白平衡係數。In the example of FIG. 4 , the
圖5是依據本發明一實施例的白平衡係數校正方法的流程圖。請參照圖5,本實施例的方法可由圖1的電子裝置100執行,以下即搭配圖1所示的元件說明圖5各步驟的細節。FIG. 5 is a flow chart of a white balance coefficient correction method according to an embodiment of the present invention. Referring to FIG. 5 , the method of this embodiment can be executed by the
於步驟S502,儲存裝置120紀錄多個預設白平衡係數。於步驟S504,處理器130利用影像感測器110在光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值。步驟S502~步驟S504的詳細實施方式已於前述實施例說明,於此不再贅述。In step S502, the
於步驟S506,基於預設色溫的一預設條件範圍,處理器130可判斷對應於這些色彩通道的響應值是否符合一可容忍條件。於本實施例中,步驟S506可實施為步驟S5061~步驟S5064。In step S506, based on a preset condition range of the preset color temperature, the
於步驟S5061,處理器130根據響應值獲取至少一色彩通道比例係數。色彩通道比例係數包括紅綠比例係數與藍綠比例係數。具體而言,當針對預設色溫進行白平衡係數的校正時,處理器130利用影像感測器110獲取對應於預設色溫的校正影像,並根據上述校正影像獲取RGB通道響應值。之後,處理器130可根據RGB通道響應值而獲取紅綠比例係數與藍綠比例係數。In step S5061, the
之後,於步驟S5062,處理器130判斷至少一色彩通道比例係數是否介於對應於預設色溫的比例範圍內。須說明的是,不同預設色溫將對應至不同的比例範圍。此外,於一些實施例中,處理器130將判斷紅綠比例係數是否介於對應於某一預設色溫的第一比例範圍內,並判斷藍綠比例係數是否介於對應於某一預設色溫的第二比例範圍內。Then, in step S5062, the
於一些實施例中,對應於預設色溫的比例範圍包括以預設白平衡係數其中之一為範圍中心的一數值範圍。舉例而言,對應於預設色溫「6500K」的比例範圍是根據預設色溫「6500K」的預設白平衡係數而決定。對應於預設色溫「5000K」的比例範圍是根據預設色溫「5000K」的預設白平衡係數而決定。更詳細而言,若以圖4為範例說明,對應於第一預設色溫的比例範圍可包括以R/G比例係數「Gr_d1」為範圍中心的一數值範圍。對應於第一預設色溫的比例範圍還可包括以B/G比例係數「Gb_d1」為範圍中心的一數值範圍。舉例而言,假設Gr_d1等於0.7,則比例範圍可為0.7±0.7*10%。處理器130將判斷基於校正影像而獲取的R/G比例係數是否介於數值範圍0.63~0.77內。從另一觀點來看,處理器130將判斷色彩通道比例係數所對應的點是否落在以點P1為中心的一個區域內。In some embodiments, the ratio range corresponding to the preset color temperature includes a numerical range with one of the preset white balance coefficients as the center of the range. For example, the proportion range corresponding to the preset color temperature "6500K" is determined based on the preset white balance coefficient of the preset color temperature "6500K". The proportion range corresponding to the preset color temperature "5000K" is determined based on the preset white balance coefficient of the preset color temperature "5000K". In more detail, taking FIG. 4 as an example, the proportion range corresponding to the first preset color temperature may include a numerical range with the R/G proportion coefficient "Gr_d1" as the center of the range. The proportional range corresponding to the first preset color temperature may also include a numerical range with the B/G proportional coefficient "Gb_d1" as the center of the range. For example, assuming Gr_d1 is equal to 0.7, the proportion range can be 0.7±0.7*10%. The
若至少一色彩通道比例係數介於對應於預設色溫的比例範圍內(步驟S5062判斷為是),於步驟S5063,處理器130判定響應值符合可容忍條件。若至少一色彩通道比例係數未介於對應於預設色溫的比例範圍內(步驟S5062判斷為否),於步驟S5064,處理器130判定響應值不符合可容忍條件。If at least one color channel proportion coefficient is within the proportion range corresponding to the preset color temperature (step S5062 determines yes), in step S5063, the
接著,於步驟S508,反應於判定響應值符合可容忍條件,處理器130根據對應於色彩通道的響應值校正預設白平衡係數,以獲取對應於預設色溫的多個最終白平衡係數。於步驟S510,反應於判定響應值不符合可容忍條件,處理器130將預設白平衡係數設定為對應於預設色溫的多個最終白平衡係數。步驟S508~步驟S510的詳細實施方式已於前述實施例說明,於此不再贅述。Next, in step S508, in response to determining that the response value meets the tolerable condition, the
圖6是依據本發明一實施例的白平衡係數校正方法的流程圖。請參照圖6,本實施例的方法可由圖1的電子裝置100執行,以下即搭配圖1所示的元件說明圖6各步驟的細節。FIG. 6 is a flow chart of a white balance coefficient correction method according to an embodiment of the present invention. Referring to FIG. 6 , the method of this embodiment can be executed by the
於步驟S602,儲存裝置120紀錄多個預設白平衡係數。於步驟S604,處理器130利用影像感測器110在光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值。步驟S602~步驟S604的詳細實施方式已於前述實施例說明,於此不再贅述。In step S602, the
於步驟S606,基於預設色溫的一預設條件範圍,處理器130可判斷對應於這些色彩通道的響應值是否符合一可容忍條件。於本實施例中,步驟S606可實施為步驟S6061~步驟S6063。In step S606, based on a preset condition range of the preset color temperature, the
於步驟S6061,處理器130判斷各響應值是否介於對應於預設色溫的響應範圍內。舉例而言,對應於預設色溫「6500K」的響應範圍包括分別對應於RGB通道響應值的第一響應範圍、第二響應範圍與第三響應範圍。同理,對應於預設色溫「5000K」的響應範圍也包括分別對應於RGB通道響應值的第一響應範圍、第二響應範圍與第三響應範圍。然而,不同預設色溫將對應至不同的比例範圍。,舉例而言,對應於預設色溫「5000K」的第一響應範圍相異於對應於預設色溫「6500K」的第一響應範圍。In step S6061, the
具體而言,處理器130利用影像感測器110獲取對應於預設色溫的校正影像,並根據上述校正影像進行像素值的統計運算後獲取RGB通道響應值。之後,處理器130可依序判斷RGB通道響應值是否介於對應的響應範圍內。亦即,處理器130將判斷紅色通道響應值是否介於對應於紅色通道響應值的響應範圍內。處理器130將判斷藍色通道響應值是否介於對應於藍色通道響應值的響應範圍內。處理器130將判斷綠色通道響應值是否介於對應於綠色通道響應值的響應範圍內。Specifically, the
若各響應值介於對應於預設色溫的響應範圍內(步驟S6061判斷為是),於步驟S6062,處理器130判定響應值符合可容忍條件。若響應值其中之一未介於對應於預設色溫的響應範圍內(步驟S6061判斷為否),於步驟S6063,處理器130判定響應值不符合可容忍條件。If each response value is within the response range corresponding to the preset color temperature (YES in step S6061), in step S6062, the
接著,於步驟S608,反應於判定響應值符合可容忍條件,處理器130根據對應於色彩通道的響應值校正預設白平衡係數,以獲取對應於預設色溫的多個最終白平衡係數。於步驟S610,反應於判定響應值不符合可容忍條件,處理器130將預設白平衡係數設定為對應於預設色溫的多個最終白平衡係數。步驟S608~步驟S610的詳細實施方式已於前述實施例說明,於此不再贅述。Next, in step S608, in response to determining that the response value meets the tolerable condition, the
須說明的是,以至少一處理器執行之白平衡係數校正方法的處理程序並不限於上述實施形態。舉例而言,可以其他順序執行各步驟。又,可組合上述步驟中之任二個以上的步驟,亦可修正步驟之一部分。或者,亦可除了上述各步驟外還執行其他步驟。It should be noted that the processing procedure of the white balance coefficient correction method executed by at least one processor is not limited to the above embodiment. For example, the steps may be performed in other orders. Furthermore, any two or more of the above steps may be combined, or part of the steps may be modified. Alternatively, other steps may be performed in addition to the above steps.
綜上所述,在本發明的實施例中,於校正白平衡係數的過程中,校正環境的實際色溫是否明顯偏移預設色溫可被偵測出來。如此一來,即便校正環境中光源的實際色溫發生嚴重偏移或出現人為操作失誤,可避免利用錯誤的資料來校正預設白平衡參數,提高了自動白平衡功能的準確度和可靠性。因此,可避免電子裝置因為執行自動白平衡功能而產生色調不如預期的影像。In summary, in embodiments of the present invention, during the process of correcting the white balance coefficient, whether the actual color temperature of the correction environment deviates significantly from the preset color temperature can be detected. In this way, even if the actual color temperature of the light source in the correction environment is seriously shifted or human error occurs, the use of incorrect data to correct the preset white balance parameters can be avoided, improving the accuracy and reliability of the automatic white balance function. Therefore, it is possible to prevent the electronic device from producing images with lower-than-expected hues due to the automatic white balance function.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above through embodiments, they are not intended to limit the present invention. Anyone with ordinary knowledge in the relevant technical field may make some modifications 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 appended patent application scope.
100:電子裝置100: Electronic devices
110:影像感測器110:Image sensor
120:儲存裝置120:Storage device
130:處理器130: Processor
P1~P10:點P1~P10: points
C1:預設色溫曲線C1: Preset color temperature curve
C2:經校正色溫曲線C2: Corrected color temperature curve
S202~S210,S2081~S2082,S502~S510,S5061~S5064,S602~S610,S6061~S6062:步驟S202~S210,S2081~S2082,S502~S510,S5061~S5064,S602~S610,S6061~S6062: steps
圖1是依據本發明一實施例的電子裝置的示意圖。 圖2是依據本發明一實施例的白平衡係數校正方法的流程圖。 圖3是依據本發明一實施例的校正預設白平衡係數的流程圖。 圖4是依據本發明一實施例的預設色溫曲線與經校正色溫曲線的示意圖。 圖5是依據本發明一實施例的白平衡係數校正方法的流程圖。 圖6是依據本發明一實施例的白平衡係數校正方法的流程圖。 FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention. FIG. 2 is a flow chart of a white balance coefficient correction method according to an embodiment of the present invention. FIG. 3 is a flowchart of correcting the preset white balance coefficient according to an embodiment of the present invention. FIG. 4 is a schematic diagram of a preset color temperature curve and a corrected color temperature curve according to an embodiment of the present invention. FIG. 5 is a flow chart of a white balance coefficient correction method according to an embodiment of the present invention. FIG. 6 is a flow chart of a white balance coefficient correction method according to an embodiment of the present invention.
S202~S210:步驟 S202~S210: steps
Claims (12)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111126599A TWI817610B (en) | 2022-07-15 | 2022-07-15 | White balance coefficient correction method and electronic device |
CN202211027831.9A CN117440136A (en) | 2022-07-15 | 2022-08-25 | White balance coefficient correction method and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111126599A TWI817610B (en) | 2022-07-15 | 2022-07-15 | White balance coefficient correction method and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI817610B true TWI817610B (en) | 2023-10-01 |
TW202406331A TW202406331A (en) | 2024-02-01 |
Family
ID=89545043
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW111126599A TWI817610B (en) | 2022-07-15 | 2022-07-15 | White balance coefficient correction method and electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117440136A (en) |
TW (1) | TWI817610B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200950532A (en) * | 2008-05-16 | 2009-12-01 | Syntek Semiconductor Co Ltd | White balance method and its application on a digital photographing apparatus |
-
2022
- 2022-07-15 TW TW111126599A patent/TWI817610B/en active
- 2022-08-25 CN CN202211027831.9A patent/CN117440136A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200950532A (en) * | 2008-05-16 | 2009-12-01 | Syntek Semiconductor Co Ltd | White balance method and its application on a digital photographing apparatus |
Also Published As
Publication number | Publication date |
---|---|
TW202406331A (en) | 2024-02-01 |
CN117440136A (en) | 2024-01-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8654207B2 (en) | Imaging pickup apparatus, image pickup method, image processing apparatus, image processing method, and image processing program | |
US9451187B2 (en) | Lens shading calibration for cameras | |
TWI422234B (en) | An image signal correcting means, an image capturing means, an image signal correcting means, and an image signal correcting processing means | |
CN104796683B (en) | A kind of method and system of calibration image color | |
TWI395958B (en) | Defective pixel detection and correction devices, systems, and methods for detecting and correcting defective pixel | |
US7623160B2 (en) | Image processing method, image processing program, image processing apparatus, imaging apparatus, imaging method, and imaging program | |
JP2013219705A (en) | Image processor, image processing method and program | |
US20140204248A1 (en) | Apparatus and method for image processing and storage medium, and image pickup apparatus | |
JP2008153768A (en) | Imaging apparatus, and white balance processor | |
TWI552600B (en) | Image calibrating method for stitching images and related camera and image processing system with image calibrating function | |
US20190082153A1 (en) | Method, apparatus, computer-readable storage medium, and terminal for calibrating automatic white balance | |
US20210266507A1 (en) | Image processing apparatus, image capture apparatus, and image processing method | |
US9307168B2 (en) | Image capture apparatus and method for controlling image capture apparatus in which defective pixels are indicated | |
US9319653B2 (en) | White balance compensation method and electronic apparatus using the same | |
TW201601538A (en) | Image capture apparatus and image compensating method thereof | |
JP6066866B2 (en) | Image processing apparatus, control method thereof, and control program | |
JP4295149B2 (en) | Color shading correction method and solid-state imaging device | |
TWI817610B (en) | White balance coefficient correction method and electronic device | |
US20210195082A1 (en) | Dual sensor imaging system and calibration method thereof | |
US11405598B2 (en) | Image processing apparatus, image processing method, and storage medium | |
TWI806681B (en) | White balance coefficient correction method and electronic device | |
TWI767484B (en) | Dual sensor imaging system and depth map calculation method thereof | |
JP2009027289A (en) | Digital camera and operation control method thereof | |
TWI708509B (en) | System and method for image displaying | |
JP2012029194A (en) | Electronic camera and exposure control program |