TWI817610B - White balance coefficient correction method and electronic device - Google Patents

White balance coefficient correction method and electronic device Download PDF

Info

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
Application number
TW111126599A
Other languages
Chinese (zh)
Other versions
TW202406331A (en
Inventor
鄭珍如
Original Assignee
宏碁股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宏碁股份有限公司 filed Critical 宏碁股份有限公司
Priority to TW111126599A priority Critical patent/TWI817610B/en
Priority to CN202211027831.9A priority patent/CN117440136A/en
Application granted granted Critical
Publication of TWI817610B publication Critical patent/TWI817610B/en
Publication of TW202406331A publication Critical patent/TW202406331A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3179Video signal processing therefor
    • H04N9/3182Colour 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

The disclosure provides a white balance coefficient correction method and an electronic device. The method includes the following steps. Default white balance coefficients are recorded. An image sensor is used to perform a light sensing operation under the illumination of a light source, so as to obtain a plurality of response values corresponding to a plurality of color channels. Whether the response values corresponding to the color channels satisfy a tolerable condition is determined based on a default condition range of a default color temperature. In response to determining that the response values satisfy the tolerable condition, the default white balance coefficient is corrected according to the response values corresponding to the color channels, so as to obtain a plurality of final white balance coefficients corresponding to the default color temperature.

Description

白平衡係數校正方法及電子裝置White balance coefficient correction method and electronic device

本發明是有關於一種電子裝置,且特別是有關於一種白平衡係數校正方法及電子裝置。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 electronic device 100 may be, for example, a laptop computer, a smart TV, a tablet computer, a game console, a mobile phone, or other electronic device with an image capture function. The present invention is not limited thereto. In FIG. 1 , the electronic device 100 may include an image sensor 110 , a storage device 120 , and a processor 130 .

在一些實施例中,影像感測器110用以提供影像感測功能。影像感測器110可包括感光元件,例如是電荷耦合元件(Charge Coupled Device,CCD)、互補性氧化金屬半導體(Complementary Metal-Oxide Semiconductor,CMOS)元件或其他元件,本發明對此不限制。影像感測器110可與其他元件(例如鏡頭、光圈等等)組成電子裝置100的相機模組。In some embodiments, the image sensor 110 is used to provide image sensing functions. The image sensor 110 may include a photosensitive element, such as a Charge Coupled Device (CCD), a Complementary Metal-Oxide Semiconductor (CMOS) element or other elements, which the present invention is not limited to. The image sensor 110 may be combined with other components (such as a lens, aperture, etc.) to form a camera module of the electronic device 100 .

儲存裝置120可用以儲存影像、指令、程式碼、軟體模組等等資料,其可以例如是任意型式的固定式或可移動式隨機存取記憶體(random access memory,RAM)、唯讀記憶體(read-only memory,ROM)、快閃記憶體(flash memory)、硬碟或其他類似裝置、積體電路及其組合。The storage device 120 can be used to store images, instructions, program codes, software modules, etc., and can be, for example, any type of fixed or removable random access memory (RAM) or read-only memory. (read-only memory, ROM), flash memory, hard disk or other similar devices, integrated circuits and combinations thereof.

處理器130耦接影像感測器110以及儲存裝置120,例如是中央處理單元(central processing unit,CPU)、應用處理器(application processor,AP),或是其他可程式化之一般用途或特殊用途的微處理器(microprocessor)、數位訊號處理器(digital signal processor,DSP)、影像訊號處理器(image signal processor,ISP)、圖形處理器(graphics processing unit,GPU)或其他類似裝置、積體電路及其組合。The processor 130 is coupled to the image sensor 110 and the storage device 120, such as a central processing unit (CPU), an application processor (AP), or other programmable general or special purposes. Microprocessor (microprocessor), digital signal processor (DSP), image signal processor (ISP), graphics processing unit (GPU) or other similar devices, integrated circuits and combinations thereof.

處理器130可存取並執行記錄在儲存裝置120中的軟體模組,以實現本發明實施例中的白平衡係數校正方法。上述軟體模組可廣泛地解釋為意謂指令、指令集、代碼、程式碼、程式、應用程式、軟體套件、執行緒、程序、功能等,而不管其是被稱作軟體、韌體、中間軟體、微碼、硬體描述語言亦或其他者。The processor 130 can access and execute the software module recorded in the storage device 120 to implement the white balance coefficient correction method in the embodiment of the present invention. The software modules described above may be broadly construed to mean instructions, instruction sets, code, code, programs, applications, software packages, threads, programs, functions, etc., whether referred to as software, firmware, middleware or the like. Software, microcode, hardware description language, or others.

圖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 electronic device 100 in FIG. 1 . The details of each step in FIG. 2 will be described below with reference to the components shown in FIG. 1 .

在步驟S202中,儲存裝置120紀錄多個預設白平衡係數。具體而言,儲存裝置120可紀錄對應至多個預設色溫的多個預設白平衡係數,且各預設色溫所對應的多個預設白平衡係數可包括紅綠比例(R/G)係數以及藍綠(B/G)比例係數。舉例而言,這些預設色溫可包括D65光源的6500K、CWF光源的4150K,以及A燈源的2800K等等,本發明對此不限制。處理器130可將多個預設色溫的多個預設白平衡係數寫入儲存裝置120,且對應至多個預設色溫的多個預設白平衡係數可用以建立一預設色溫曲線。儲存裝置120例如是連接影像訊號處理器(ISP)的電子抹除式可複寫唯讀記憶體(EEPROM),但本發明不限制於此。In step S202, the storage device 120 records a plurality of preset white balance coefficients. Specifically, the storage device 120 may record a plurality of preset white balance coefficients corresponding to a plurality of preset color temperatures, and the plurality of preset white balance coefficients corresponding to each preset color temperature may include a red-green ratio (R/G) coefficient. And the blue-green (B/G) proportion coefficient. For example, these preset color temperatures may include 6500K for D65 light source, 4150K for CWF light source, and 2800K for A light source, etc., and the present invention is not limited thereto. The processor 130 can write a plurality of preset white balance coefficients of a plurality of preset color temperatures into the storage device 120 , and the plurality of preset white balance coefficients corresponding to the plurality of preset color temperatures can be used to establish a preset color temperature curve. The storage device 120 is, for example, an electronically erasable rewritable read-only memory (EEPROM) connected to an image signal processor (ISP), but the invention is not limited thereto.

在步驟S204中,處理器130可利用影像感測器110在光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值。詳細而言,當要校正電子裝置100的白平衡係數時,電子裝置100將被可被放置於一燈箱或是其他校正環境中。當處理器130進行白平衡係數校正操作時,影像感測器110將透過拍攝校正環境中的一白色校正物件來進行光感測操作。白色校正物件例如為白色壓克力板或白紙等等,本發明對此不限制。In step S204, the processor 130 may use the image sensor 110 to perform a light sensing operation under illumination of a light source to obtain multiple response values corresponding to multiple color channels. Specifically, when the white balance coefficient of the electronic device 100 is to be corrected, the electronic device 100 will be placed in a light box or other correction environment. When the processor 130 performs a white balance coefficient correction operation, the image sensor 110 will perform a light sensing operation by photographing a white correction object in the correction environment. The white calibration object is, for example, a white acrylic plate or white paper, and the present invention is not limited thereto.

須說明的是,當要針對某一預設色溫進行白平衡係數校正時,校正環境中的光源的設定目標色溫應為預設色溫。於一些實施例中,在影像感測器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 image sensor 110 captures a white correction object, the processor 130 may capture multiple response values (ie, pixel values of the image pixels) of multiple color channels of multiple pixels in the image. Perform statistical operations, such as averaging the response values of each color channel or other statistical operations, etc. These response values include the red channel response value, the green channel response value, and the blue channel response value. Therefore, after the image sensor 110 performs a light sensing operation for a certain preset color temperature, the processor 130 can obtain a red channel response value, a green channel response value and a blue channel response value.

在步驟S206中,基於預設色溫的一預設條件範圍,處理器130可判斷對應於這些色彩通道的響應值是否符合一可容忍條件。透過此步驟的實施,處理器130可檢測校正環境中的光源的實際色溫是否嚴重偏移於預設色溫。舉例而言,當校正環境中的光源的設定目標色溫為預設色溫「6500K」時,處理器130將根據對應於預設色溫「6500K」的預設條件範圍來判斷影像感測器110所獲取的響應值是否符合可容忍條件,從而檢測校正環境中的光源的實際色溫是否與預設色溫「6500K」相差甚多。In step S206, based on a preset condition range of the preset color temperature, the processor 130 may determine whether the response values corresponding to the color channels meet a tolerable condition. Through the implementation of this step, the processor 130 can detect whether the actual color temperature of the light source in the calibration environment seriously deviates from the preset color temperature. For example, when the set target color temperature of the light source in the calibration environment is the preset color temperature "6500K", the processor 130 will determine the color temperature obtained by the image sensor 110 according to the preset condition range corresponding to the preset color temperature "6500K". Whether the response value meets the tolerable condition, thereby detecting whether the actual color temperature of the light source in the calibration environment is significantly different from the default color temperature "6500K".

若這些色彩通道的響應值不符合可容忍條件(步驟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 processor 130 may set the preset white balance coefficient to a plurality of final white balance coefficients corresponding to the preset color temperature. The final white balance coefficient also includes the red-green ratio coefficient and the blue-green ratio coefficient. The final white balance coefficient is used for the automatic white balance (AWB) function of the image sensor 110 . That is to say, in response to determining that the response value does not meet the tolerable condition, in order to avoid using erroneous data to correct the preset white balance coefficient, the processor 130 will not correct the preset white balance coefficient, but directly use the preset white balance coefficient as an electronic The final white balance coefficient used by the device 100 to perform the automatic white balance function.

另一方面,若這些色彩通道的響應值符合可容忍條件(步驟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 processor 130 may correct the preset white balance coefficient 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. . The processor 130 may use the red channel response value, the green channel response value and the blue channel response value corresponding to a certain preset color temperature to correct the preset white balance coefficient corresponding to the same preset color temperature. After correcting the preset white balance coefficient, the processor 130 may use the correction result as the final white balance coefficient used by the electronic device 100 to perform the automatic white balance function.

詳細而言,圖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 processor 130 may obtain a plurality of reference white balance coefficients corresponding to the preset color temperature according to the response value. The reference white balance coefficient may include an R/G proportional coefficient and a B/G proportional coefficient. For example, the processor 130 may obtain an R/G proportional coefficient and a B/G proportional coefficient corresponding to the predetermined color temperature "6500K" based on the RGB response value corresponding to the predetermined color temperature "6500K". The denominator of the R/G scaling factor is the red channel response and the numerator is the green response. The denominator of the B/G scaling factor is the blue channel response and the numerator is the green response.

接著,於步驟S2082中,處理器130根據參考白平衡係數校正預設白平衡係數,以獲取對應於預設色溫的最終白平衡係數。於一些實施例中,處理器130可直接將對應於某一預設色溫的參考白平衡係數設定為對應於該相同預設色溫的最終白平衡係數。如此一來,對應至多個預設色溫的多組參考白平衡係數可分別直接對應至經校正色溫曲線上的多個點。或者,於一些實施例中,處理器130可根據對應至多個預設色溫的多組參考白平衡係數來平移預設色溫曲線以獲取經校正色溫曲線,並根據經校正色溫曲線獲取對應於多個預設色溫的多組最終白平衡係數。Next, in step S2082, the processor 130 corrects the preset white balance coefficient according to the reference white balance coefficient to obtain the final white balance coefficient corresponding to the preset color temperature. In some embodiments, the processor 130 may directly set the reference white balance coefficient corresponding to a certain preset color temperature to the final white balance coefficient corresponding to the same preset color temperature. In this way, multiple sets of reference white balance coefficients corresponding to multiple preset color temperatures can directly correspond to multiple points on the corrected color temperature curve. Alternatively, in some embodiments, the processor 130 may translate the preset color temperature curve according to multiple sets of reference white balance coefficients corresponding to multiple preset color temperatures to obtain the corrected color temperature curve, and obtain the corrected color temperature curve corresponding to the plurality of reference white balance coefficients according to the corrected color temperature curve. Multiple sets of final white balance coefficients for preset color temperatures.

舉例而言,圖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 storage device 120 may record a preset white balance coefficient corresponding to the first preset color temperature (i.e., an R/G proportion coefficient “Gr_d1” and a B/G proportion coefficient “GB_d1”), and a preset value corresponding to the first preset color temperature. The white balance coefficient corresponds to point P1 on the preset color temperature curve C1. Similarly, the storage device 120 can record four sets of preset white balance coefficients respectively corresponding to the second preset color temperature, the third preset color temperature, the fourth preset color temperature, and the fifth preset color temperature. By connecting the points P2, P3, P4, and P5 corresponding to these four sets of preset white balance coefficients, the preset color temperature curve C1 can be obtained.

於圖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 processor 130 may determine that the RGB channel response value corresponding to the first preset light source meets the tolerable condition. Therefore, the processor 130 can calculate the reference white balance coefficient (ie, the R/G proportional coefficient "Gr_r1" and the B/G proportional coefficient "GB_r1") according to the RGB channel response value corresponding to the first preset light source. In this example, the processor can correct the default white balance coefficient by setting the reference white balance coefficient (i.e., the R/G proportional coefficient "Gr_r1" and the B/G proportional coefficient "GB_r1") as the final white balance coefficient. That is, the reference white balance coefficient corresponding to the first preset color temperature will correspond to the point P6 on the corrected color temperature curve C2. Similarly, the processor 130 can obtain four sets of final white balance coefficients respectively corresponding to the second preset color temperature, the third preset color temperature, the fourth preset color temperature and the fifth preset color temperature according to a similar process, so as to obtain the final white balance coefficients according to these Points P7, P8, P9, and P10 corresponding to the final white balance coefficient obtain the corrected color temperature curve C2. Thereby, the electronic device 100 can perform the automatic white balance function according to the corrected color temperature curve C2, so that the captured image will not suffer from color shift. For example, after the electronic device 100 completes the correction of the white balance coefficient and records the relevant information of the corrected color temperature curve C2, the processor 130 can use the corrected color temperature curve C2 to estimate the scene color temperature and determine based on the corrected color temperature curve C2. The final white balance coefficient used to adjust the image color.

圖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 electronic device 100 in FIG. 1 . The details of each step in FIG. 5 will be described below with reference to the components shown in FIG. 1 .

於步驟S502,儲存裝置120紀錄多個預設白平衡係數。於步驟S504,處理器130利用影像感測器110在光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值。步驟S502~步驟S504的詳細實施方式已於前述實施例說明,於此不再贅述。In step S502, the storage device 120 records a plurality of preset white balance coefficients. In step S504, the processor 130 uses the image sensor 110 to perform a light sensing operation under illumination of a light source to obtain multiple response values corresponding to multiple color channels. The detailed implementation of steps S502 to S504 has been described in the previous embodiments and will not be described again here.

於步驟S506,基於預設色溫的一預設條件範圍,處理器130可判斷對應於這些色彩通道的響應值是否符合一可容忍條件。於本實施例中,步驟S506可實施為步驟S5061~步驟S5064。In step S506, based on a preset condition range of the preset color temperature, the processor 130 may determine whether the response values corresponding to these color channels meet a tolerable condition. In this embodiment, step S506 may be implemented as steps S5061 to S5064.

於步驟S5061,處理器130根據響應值獲取至少一色彩通道比例係數。色彩通道比例係數包括紅綠比例係數與藍綠比例係數。具體而言,當針對預設色溫進行白平衡係數的校正時,處理器130利用影像感測器110獲取對應於預設色溫的校正影像,並根據上述校正影像獲取RGB通道響應值。之後,處理器130可根據RGB通道響應值而獲取紅綠比例係數與藍綠比例係數。In step S5061, the processor 130 obtains at least one color channel proportion coefficient according to the response value. The color channel proportion coefficient includes the red-green proportion coefficient and the blue-green proportion coefficient. Specifically, when correcting the white balance coefficient for the preset color temperature, the processor 130 uses the image sensor 110 to obtain a corrected image corresponding to the preset color temperature, and obtains an RGB channel response value based on the corrected image. Afterwards, the processor 130 may obtain the red-green proportional coefficient and the blue-green proportional coefficient according to the RGB channel response value.

之後,於步驟S5062,處理器130判斷至少一色彩通道比例係數是否介於對應於預設色溫的比例範圍內。須說明的是,不同預設色溫將對應至不同的比例範圍。此外,於一些實施例中,處理器130將判斷紅綠比例係數是否介於對應於某一預設色溫的第一比例範圍內,並判斷藍綠比例係數是否介於對應於某一預設色溫的第二比例範圍內。Then, in step S5062, the processor 130 determines whether at least one color channel proportion coefficient is within a proportion range corresponding to the preset color temperature. It should be noted that different preset color temperatures will correspond to different ratio ranges. In addition, in some embodiments, the processor 130 will determine whether the red-green proportional coefficient is within a first proportional range corresponding to a certain preset color temperature, and determine whether the blue-green proportional coefficient is within a first proportional range corresponding to a certain predetermined color temperature. within the second ratio range.

於一些實施例中,對應於預設色溫的比例範圍包括以預設白平衡係數其中之一為範圍中心的一數值範圍。舉例而言,對應於預設色溫「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 processor 130 will determine whether the R/G ratio coefficient obtained based on the corrected image is within the numerical range of 0.63˜0.77. From another point of view, the processor 130 will determine whether the point corresponding to the color channel scale coefficient falls within an area centered on point P1.

若至少一色彩通道比例係數介於對應於預設色溫的比例範圍內(步驟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 processor 130 determines that the response value meets the tolerable condition. If at least one color channel proportion coefficient is not within the proportion range corresponding to the preset color temperature (step S5062 determines No), in step S5064, the processor 130 determines that the response value does not meet the tolerable condition.

接著,於步驟S508,反應於判定響應值符合可容忍條件,處理器130根據對應於色彩通道的響應值校正預設白平衡係數,以獲取對應於預設色溫的多個最終白平衡係數。於步驟S510,反應於判定響應值不符合可容忍條件,處理器130將預設白平衡係數設定為對應於預設色溫的多個最終白平衡係數。步驟S508~步驟S510的詳細實施方式已於前述實施例說明,於此不再贅述。Next, in step S508, in response to determining that the response value meets the tolerable condition, the processor 130 corrects the preset white balance coefficient 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. In step S510, in response to determining that the response value does not meet the tolerable condition, the processor 130 sets the preset white balance coefficient to a plurality of final white balance coefficients corresponding to the preset color temperature. The detailed implementation of steps S508 to S510 has been described in the previous embodiments and will not be described again here.

圖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 electronic device 100 in FIG. 1 . The details of each step in FIG. 6 will be described below with reference to the components shown in FIG. 1 .

於步驟S602,儲存裝置120紀錄多個預設白平衡係數。於步驟S604,處理器130利用影像感測器110在光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值。步驟S602~步驟S604的詳細實施方式已於前述實施例說明,於此不再贅述。In step S602, the storage device 120 records a plurality of preset white balance coefficients. In step S604, the processor 130 uses the image sensor 110 to perform a light sensing operation under illumination of a light source to obtain multiple response values corresponding to multiple color channels. The detailed implementation of steps S602 to S604 has been described in the previous embodiments and will not be described again here.

於步驟S606,基於預設色溫的一預設條件範圍,處理器130可判斷對應於這些色彩通道的響應值是否符合一可容忍條件。於本實施例中,步驟S606可實施為步驟S6061~步驟S6063。In step S606, based on a preset condition range of the preset color temperature, the processor 130 may determine whether the response values corresponding to the color channels meet a tolerable condition. In this embodiment, step S606 can be implemented as steps S6061 to S6063.

於步驟S6061,處理器130判斷各響應值是否介於對應於預設色溫的響應範圍內。舉例而言,對應於預設色溫「6500K」的響應範圍包括分別對應於RGB通道響應值的第一響應範圍、第二響應範圍與第三響應範圍。同理,對應於預設色溫「5000K」的響應範圍也包括分別對應於RGB通道響應值的第一響應範圍、第二響應範圍與第三響應範圍。然而,不同預設色溫將對應至不同的比例範圍。,舉例而言,對應於預設色溫「5000K」的第一響應範圍相異於對應於預設色溫「6500K」的第一響應範圍。In step S6061, the processor 130 determines whether each response value is within a response range corresponding to the preset color temperature. For example, the response range corresponding to the preset color temperature "6500K" includes a first response range, a second response range and a third response range respectively corresponding to RGB channel response values. Similarly, the response range corresponding to the preset color temperature "5000K" also includes the first response range, the second response range and the third response range respectively corresponding to the RGB channel response values. However, different preset color temperatures will correspond to different ratio ranges. , for example, the first response range corresponding to the preset color temperature "5000K" is different from the first response range corresponding to the preset color temperature "6500K".

具體而言,處理器130利用影像感測器110獲取對應於預設色溫的校正影像,並根據上述校正影像進行像素值的統計運算後獲取RGB通道響應值。之後,處理器130可依序判斷RGB通道響應值是否介於對應的響應範圍內。亦即,處理器130將判斷紅色通道響應值是否介於對應於紅色通道響應值的響應範圍內。處理器130將判斷藍色通道響應值是否介於對應於藍色通道響應值的響應範圍內。處理器130將判斷綠色通道響應值是否介於對應於綠色通道響應值的響應範圍內。Specifically, the processor 130 uses the image sensor 110 to obtain a corrected image corresponding to the preset color temperature, and performs statistical calculations on pixel values based on the corrected image to obtain the RGB channel response value. Afterwards, the processor 130 can sequentially determine whether the RGB channel response value is within the corresponding response range. That is, the processor 130 will determine whether the red channel response value is within a response range corresponding to the red channel response value. The processor 130 will determine whether the blue channel response value is within a response range corresponding to the blue channel response value. The processor 130 will determine whether the green channel response value is within a response range corresponding to the green channel response value.

若各響應值介於對應於預設色溫的響應範圍內(步驟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 processor 130 determines that the response value meets the tolerable condition. If one of the response values is not within the response range corresponding to the preset color temperature (step S6061 determines No), in step S6063, the processor 130 determines that the response value does not meet the tolerable condition.

接著,於步驟S608,反應於判定響應值符合可容忍條件,處理器130根據對應於色彩通道的響應值校正預設白平衡係數,以獲取對應於預設色溫的多個最終白平衡係數。於步驟S610,反應於判定響應值不符合可容忍條件,處理器130將預設白平衡係數設定為對應於預設色溫的多個最終白平衡係數。步驟S608~步驟S610的詳細實施方式已於前述實施例說明,於此不再贅述。Next, in step S608, in response to determining that the response value meets the tolerable condition, the processor 130 corrects the preset white balance coefficient 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. In step S610, in response to determining that the response value does not meet the tolerable condition, the processor 130 sets the preset white balance coefficient to a plurality of final white balance coefficients corresponding to the preset color temperature. The detailed implementation of steps S608 to S610 has been described in the previous embodiments and will not be described again here.

須說明的是,以至少一處理器執行之白平衡係數校正方法的處理程序並不限於上述實施形態。舉例而言,可以其他順序執行各步驟。又,可組合上述步驟中之任二個以上的步驟,亦可修正步驟之一部分。或者,亦可除了上述各步驟外還執行其他步驟。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)

一種白平衡係數校正方法,適於包括一影像感測器的一電子裝置,所述方法包括:紀錄多個預設白平衡係數;利用所述影像感測器在一光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值;基於一預設色溫的一預設條件範圍,判斷對應於所述色彩通道的所述響應值是否符合一可容忍條件;反應於判定所述響應值符合所述可容忍條件,根據對應於所述色彩通道的所述響應值校正所述預設白平衡係數,以獲取對應於所述預設色溫的多個最終白平衡係數;以及反應於判定所述響應值不符合所述可容忍條件,將所述預設白平衡係數設定為對應於所述預設色溫的所述最終白平衡係數。 A white balance coefficient correction method suitable for an electronic device including an image sensor. The method includes: recording a plurality of preset white balance coefficients; using the image sensor to perform light sensing under the illumination of a light source. A testing operation is performed 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; reacting to Determine that the response value meets the tolerable condition, and correct the preset white balance coefficient 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; and in response to determining that the response value does not meet the tolerable condition, setting the preset white balance coefficient to the final white balance coefficient corresponding to the preset color temperature. 如請求項1所述的白平衡係數校正方法,其中基於所述預設色溫的所述預設條件範圍,判斷對應於所述色彩通道的所述響應值是否符合所述可容忍條件的步驟包括:根據所述響應值獲取至少一色彩通道比例係數;判斷所述至少一色彩通道比例係數是否介於對應於所述預設色溫的一比例範圍內;若所述至少一色彩通道比例係數介於對應於所述預設色溫的所述比例範圍內,判定所述響應值符合所述可容忍條件;以及若所述至少一色彩通道比例係數未介於對應於所述預設色溫 的所述比例範圍內,判定所述響應值不符合所述可容忍條件。 The white balance coefficient correction method according to claim 1, wherein based on the preset condition range of the preset color temperature, the step of determining whether the response value corresponding to the color channel meets the tolerable condition includes : Obtain at least one color channel proportion coefficient according to the response value; determine whether the at least one color channel proportion coefficient is within a proportion range corresponding to the preset color temperature; if the at least one color channel proportion coefficient is between Within the proportion range corresponding to the preset color temperature, it is determined that the response value meets the tolerable condition; and if the at least one color channel proportion coefficient is not within the range corresponding to the preset color temperature Within the proportion range, it is determined that the response value does not meet the tolerable condition. 如請求項2所述的白平衡係數校正方法,其中對應於所述預設色溫的所述比例範圍包括以所述預設白平衡係數其中之一為範圍中心的一數值範圍。 The white balance coefficient correction method according to claim 2, wherein the proportional 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. 如請求項1所述的白平衡係數校正方法,其中基於所述預設色溫的所述預設條件範圍,判斷對應於所述色彩通道的所述響應值是否符合所述可容忍條件的步驟包括:判斷各所述響應值是否介於對應於所述預設色溫的一響應範圍內;若各所述響應值介於對應於所述預設色溫的所述響應範圍內,判定所述響應值符合所述可容忍條件;以及若所述響應值其中之一未介於對應於所述預設色溫的所述響應範圍內,判定所述響應值不符合所述可容忍條件。 The white balance coefficient correction method according to claim 1, wherein based on the preset condition range of the preset color temperature, the step of determining whether the response value corresponding to the color channel meets the tolerable condition includes : Determine whether each of the response values is within a response range corresponding to the preset color temperature; if each of the response values is within the response range corresponding to the preset color temperature, determine whether the response value The tolerable condition is met; and if one of the response values is not within the response range corresponding to the preset color temperature, it is determined that the response value does not meet the tolerable condition. 如請求項1所述的白平衡係數校正方法,其中所述預設白平衡係數與所述最終白平衡係數分別包括一紅綠比例係數與一藍綠比例係數。 The white balance coefficient correction method according to claim 1, wherein the preset white balance coefficient and the final white balance coefficient respectively include a red-green proportional coefficient and a blue-green proportional coefficient. 如請求項1所述的白平衡係數校正方法,其中根據對應於所述色彩通道的所述響應值校正所述預設白平衡係數,以獲取對應於所述預設色溫的所述最終白平衡係數的步驟包括:根據所述響應值獲取對應於所述預設色溫的多個參考白平衡係數;以及根據所述參考白平衡係數校正所述預設白平衡係數,以獲取 對應於所述預設色溫的所述最終白平衡係數。 The white balance coefficient correction method according to claim 1, wherein the preset white balance coefficient is corrected according to the response value corresponding to the color channel to obtain the final white balance corresponding to the preset color temperature The steps of the coefficient include: obtaining a plurality of reference white balance coefficients corresponding to the preset color temperature according to the response value; and correcting the preset white balance coefficient according to the reference white balance coefficient to obtain The final white balance coefficient corresponding to the preset color temperature. 一種電子裝置,包括:一影像感測器;一儲存裝置,紀錄多個預設白平衡係數;一處理器,耦接於所述影像感測器與所述儲存裝置,並經配置以:利用所述影像感測器在一光源的照射下進行光感測操作,以獲取對應於多個色彩通道的多個響應值;基於一預設色溫的一預設條件範圍,判斷對應於所述色彩通道的所述響應值是否符合一可容忍條件;反應於判定所述響應值符合所述可容忍條件,根據對應於所述色彩通道的所述響應值校正所述預設白平衡係數,以獲取對應於所述預設色溫的多個最終白平衡係數;以及反應於判定所述響應值不符合所述可容忍條件,將所述預設白平衡係數設定為對應於所述預設色溫的所述最終白平衡係數。 An electronic device includes: an image sensor; a storage device that records a plurality of preset white balance coefficients; a processor coupled to the image sensor and the storage device, and configured to: utilize The image sensor performs 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 that the color corresponding to the Whether the response value of the channel meets a tolerable condition; in response to determining that the response value meets the tolerable condition, correct the preset white balance coefficient 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; and in response to determining that the response value does not meet the tolerable condition, setting the preset white balance coefficients to all final white balance coefficients corresponding to the preset color temperature. Describe the final white balance coefficient. 如請求項7所述的電子裝置,其中所述處理器更經配置以:根據所述響應值獲取至少一色彩通道比例係數;判斷所述至少一色彩通道比例係數是否介於對應於所述預設色溫的一比例範圍內;若所述至少一色彩通道比例係數介於對應於所述預設色溫的所述比例範圍內,判定所述響應值符合所述可容忍條件;以及 若所述至少一色彩通道比例係數未介於對應於所述預設色溫的所述比例範圍內,判定所述響應值不符合所述可容忍條件。 The electronic device of claim 7, wherein the processor is further configured to: obtain at least one color channel proportion coefficient according to the response value; determine whether the at least one color channel proportion coefficient is between the value corresponding to the predetermined value. Set the color temperature to be within a proportional range; if the at least one color channel proportional coefficient is within the proportional range corresponding to the preset color temperature, determine that the response value meets the tolerable condition; and If the at least one color channel proportion coefficient is not within the proportion range corresponding to the preset color temperature, it is determined that the response value does not meet the tolerable condition. 如請求項8所述的電子裝置,其中對應於所述預設色溫的所述比例範圍包括以所述預設白平衡係數其中之一為範圍中心的一數值範圍。 The electronic device of claim 8, wherein the proportional 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. 如請求項7所述的電子裝置,其中所述處理器更經配置以:判斷各所述響應值是否介於對應於所述預設色溫的一響應範圍內;若各所述響應值介於對應於所述預設色溫的所述響應範圍內,判定所述響應值符合所述可容忍條件;以及若所述響應值其中之一未介於對應於所述預設色溫的所述響應範圍內,判定所述響應值不符合所述可容忍條件。 The electronic device of claim 7, wherein the processor is further configured to: determine whether each of the response values is within a response range corresponding to the preset color temperature; if each of the response values is between Within the response range corresponding to the preset color temperature, it is determined that the response value meets the tolerable condition; and if one of the response values is not within the response range corresponding to the preset color temperature Within, it is determined that the response value does not meet the tolerable condition. 如請求項7所述的電子裝置,其中所述預設白平衡係數與所述最終白平衡係數分別包括一紅綠比例係數與一藍綠比例係數。 The electronic device of claim 7, wherein the preset white balance coefficient and the final white balance coefficient include a red-green proportional coefficient and a blue-green proportional coefficient respectively. 如請求項7所述的電子裝置,其中所述處理器更經配置以:根據所述響應值獲取對應於所述預設色溫的多個參考白平衡係數;以及根據所述參考白平衡係數校正所述預設白平衡係數,以獲取對應於所述預設色溫的所述最終白平衡係數。 The electronic device of claim 7, wherein the processor is further configured to: obtain a plurality of reference white balance coefficients corresponding to the preset color temperature according to the response value; and correct according to the reference white balance coefficients The preset white balance coefficient is used to obtain the final white balance coefficient corresponding to the preset color temperature.
TW111126599A 2022-07-15 2022-07-15 White balance coefficient correction method and electronic device TWI817610B (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (1)

* Cited by examiner, † Cited by third party
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