TW202316852A - Image color adjustment method and image color adjustment device - Google Patents

Image color adjustment method and image color adjustment device Download PDF

Info

Publication number
TW202316852A
TW202316852A TW110136455A TW110136455A TW202316852A TW 202316852 A TW202316852 A TW 202316852A TW 110136455 A TW110136455 A TW 110136455A TW 110136455 A TW110136455 A TW 110136455A TW 202316852 A TW202316852 A TW 202316852A
Authority
TW
Taiwan
Prior art keywords
image
color
neutral point
adjustment
target image
Prior art date
Application number
TW110136455A
Other languages
Chinese (zh)
Other versions
TWI800934B (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 TW110136455A priority Critical patent/TWI800934B/en
Publication of TW202316852A publication Critical patent/TW202316852A/en
Application granted granted Critical
Publication of TWI800934B publication Critical patent/TWI800934B/en

Links

Images

Abstract

An image color adjustment method and an image color adjustment device are disclosed. The method includes: obtaining a target image; performing a neutral point detection on a color distribution of the target image; entering a first adjustment mode or a second adjustment mode according to a detection result of the neutral point detection; in the first adjustment mode, performing a face detection on the target image, and performing an image color adjustment on the target image according to a detection result of the face detection; and in the second adjustment mode, performing the image color adjustment on the target image according to the color distribution of the target image without performing the face detection.

Description

影像色彩調整方法與影像色彩調整裝置Image color adjustment method and image color adjustment device

本發明是有關於一種影像色彩調整技術,且特別是有關於一種影像色彩調整方法與影像色彩調整裝置。The present invention relates to an image color adjustment technology, and in particular to an image color adjustment method and an image color adjustment device.

目前大多數具有拍照功能的電子裝置(例如智慧型手機)普偏支援自動白平衡的影像調整功能,以對所拍攝的影像進行顏色補償,例如調整影像的色溫。然而,這種自動白平衡機制在使用上往往出現問題。例如,在所拍攝的影像中同時存在人臉與背景時,若以背景的影像色調去調整整張影像,則可能會讓影像中的人臉產生色偏。因此,實務上較為理想的方式是在調整影像之前,先去偵測影像中的人臉,然後再根據人臉顏色去調整整張影像。但是,在某些情況下(例如當影像中僅存在單一環境光源時),由於人臉可能僅占整張影像的一小部分,因此,若單純根據影像中的人臉顏色來對整張影像進行顏色調整,可能會導致整張影像產生色偏。At present, most electronic devices with a camera function (such as smart phones) generally support the image adjustment function of automatic white balance, so as to perform color compensation on the captured image, such as adjusting the color temperature of the image. However, this automatic white balance mechanism often has problems in use. For example, when there are human faces and the background in the captured image, if the entire image is adjusted with the image tone of the background, the human face in the image may have a color cast. Therefore, in practice, a more ideal way is to detect faces in the image before adjusting the image, and then adjust the entire image according to the color of the face. However, in some cases (for example, when there is only a single ambient light source in the image), since the face may only occupy a small part of the entire image, if the entire image is only based on the color of the face in the image Making color adjustments may cause color casts in the entire image.

有鑑於此,本發明的實施例提供一種影像色彩調整方法與影像色彩調整裝置,可改善上述問題。In view of this, the embodiments of the present invention provide an image color adjustment method and an image color adjustment device, which can improve the above problems.

本發明的實施例提供一種影像色彩調整方法,其包括:獲得目標影像;對所述目標影像的色彩分布執行中性點(neutral point)檢測;根據所述中性點檢測的檢測結果進入第一調整模式或第二調整模式;在所述第一調整模式中,對所述目標影像執行臉部辨識,並根據所述臉部辨識的辨識結果對所述目標影像執行影像色彩調整;以及在所述第二調整模式中,在未執行所述臉部辨識的狀態下,根據所述目標影像的所述色彩分布對所述目標影像執行所述影像色彩調整。An embodiment of the present invention provides an image color adjustment method, which includes: obtaining a target image; performing neutral point (neutral point) detection on the color distribution of the target image; an adjustment mode or a second adjustment mode; in the first adjustment mode, face recognition is performed on the target image, and image color adjustment is performed on the target image according to a recognition result of the face recognition; and in the first adjustment mode, In the second adjustment mode, when the face recognition is not performed, the image color adjustment is performed on the target image according to the color distribution of the target image.

本發明的實施例另提供一種影像色彩調整裝置,其包括儲存電路與處理器。所述儲存電路用以儲存目標影像。所述處理器耦接至所述儲存電路並用以:獲得所述目標影像;對所述目標影像的色彩分布執行中性點檢測;根據所述中性點檢測的檢測結果進入第一調整模式或第二調整模式;在所述第一調整模式中,對所述目標影像執行臉部辨識,並根據所述臉部辨識的辨識結果對所述目標影像執行影像色彩調整;以及在所述第二調整模式中,在未執行所述臉部辨識的狀態下,根據所述目標影像的所述色彩分布對所述目標影像執行所述影像色彩調整。An embodiment of the invention further provides an image color adjustment device, which includes a storage circuit and a processor. The storage circuit is used for storing the target image. The processor is coupled to the storage circuit and is used to: obtain the target image; perform neutral point detection on the color distribution of the target image; enter a first adjustment mode according to the detection result of the neutral point detection; or The second adjustment mode; in the first adjustment mode, perform face recognition on the target image, and perform image color adjustment on the target image according to the recognition result of the face recognition; and in the second adjustment mode, In the adjustment mode, the image color adjustment is performed on the target image according to the color distribution of the target image when the face recognition is not performed.

基於上述,在獲得目標影像後,可對所述目標影像的色彩分布執行中性點檢測。根據所述中性點檢測的檢測結果,第一調整模式與第二調整模式的其中之一可被選擇性地啟動。在所述第一調整模式中,可對所述目標影像執行臉部辨識,並根據所述臉部辨識的辨識結果對所述目標影像執行影像色彩調整。另一方面,在所述第二調整模式中,所述臉部辨識將不被啟動,並且在未執行所述臉部辨識的狀態下,對所述目標影像執行的影像色彩調整可根據所述目標影像的所述色彩分布而執行。藉此,可針對不同類型的影像選擇性地啟動臉部辨識,從而有效提升對整張影像的色彩調整效率。Based on the above, after the target image is obtained, neutral point detection may be performed on the color distribution of the target image. According to the detection result of the neutral point detection, one of the first adjustment mode and the second adjustment mode can be selectively activated. In the first adjustment mode, face recognition may be performed on the target image, and image color adjustment may be performed on the target image according to a recognition result of the face recognition. On the other hand, in the second adjustment mode, the face recognition will not be activated, and in the state where the face recognition is not performed, the image color adjustment performed on the target image can be performed according to the The color distribution of the target image is performed. In this way, face recognition can be selectively activated for different types of images, thereby effectively improving the efficiency of color adjustment for the entire image.

圖1是根據本發明的實施例所繪示的影像色彩調整裝置的示意圖。請參照圖1,裝置(亦稱為影像色彩調整裝置)10可為智慧型手機、平板電腦、筆記型電腦、攝影機、照相機、遊戲機、桌上型電腦、工業電腦或伺服器等各式具有資料處理以及影像處理功能的電子裝置。在一實施例中,裝置10亦可具有影像擷取功能。FIG. 1 is a schematic diagram of an image color adjustment device according to an embodiment of the present invention. Please refer to FIG. 1, the device (also called image color adjustment device) 10 can be a smart phone, a tablet computer, a notebook computer, a video camera, a camera, a game machine, a desktop computer, an industrial computer or a server, etc. An electronic device with data processing and image processing functions. In an embodiment, the device 10 may also have an image capture function.

裝置10包括處理器11、儲存電路12及輸入/輸出(I/O)介面13。處理器11耦接至儲存電路12與輸入/輸出裝置13。處理器11用以負責裝置10的整體或部分運作。例如,處理器11可包括中央處理單元(Central Processing Unit, CPU)、圖形處理器(graphics processing unit, GPU)、或是其他可程式化之一般用途或特殊用途的微處理器、數位訊號處理器(Digital Signal Processor, DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits, ASIC)、可程式化邏輯裝置(Programmable Logic Device, PLD)或其他類似裝置或這些裝置的組合。The device 10 includes a processor 11 , a storage circuit 12 and an input/output (I/O) interface 13 . The processor 11 is coupled to a storage circuit 12 and an input/output device 13 . The processor 11 is responsible for the whole or part of the operation of the device 10 . For example, the processor 11 may include a central processing unit (Central Processing Unit, CPU), a graphics processing unit (graphics processing unit, GPU), or other programmable general-purpose or special-purpose microprocessors, digital signal processors (Digital Signal Processor, DSP), programmable controller, application specific integrated circuit (Application Specific Integrated Circuits, ASIC), programmable logic device (Programmable Logic Device, PLD) or other similar devices or a combination of these devices.

儲存電路12用以儲存資料。例如,儲存電路12可包括揮發性儲存電路與非揮發性儲存電路。揮發性儲存電路用以揮發性地儲存資料。例如,揮發性儲存電路可包括隨機存取記憶體(Random Access Memory, RAM)或類似的揮發性儲存媒體。非揮發性儲存電路用以非揮發性地儲存資料。例如,非揮發性儲存電路可包括唯讀記憶體(Read Only Memory, ROM)、固態硬碟(solid state disk, SSD)、傳統硬碟(Hard disk drive, HDD)或類似的非揮發性儲存媒體。The storage circuit 12 is used for storing data. For example, the storage circuit 12 may include a volatile storage circuit and a non-volatile storage circuit. The volatile storage circuit is used for volatile storage of data. For example, the volatile storage circuit may include random access memory (Random Access Memory, RAM) or similar volatile storage media. The non-volatile storage circuit is used for non-volatile storage of data. For example, the non-volatile storage circuit may include a read only memory (Read Only Memory, ROM), a solid state disk (solid state disk, SSD), a traditional hard disk (Hard disk drive, HDD) or similar non-volatile storage media .

輸入/輸出裝置13可包括攝影鏡頭、通訊介面、滑鼠、鍵盤、螢幕、觸控螢幕、揚聲器及/或麥克風等各式訊號的輸入/輸出裝置。本發明不限制輸入/輸出裝置13的裝置類型。The input/output device 13 may include various signal input/output devices such as a camera lens, a communication interface, a mouse, a keyboard, a screen, a touch screen, a speaker, and/or a microphone. The present invention does not limit the device type of the input/output device 13 .

在一實施例中,處理器11可經由輸入/輸出(I/O)裝置13中的攝影鏡頭對環境影像進行影像擷取以獲得影像(亦稱為目標影像)101。或者,在一實施例中,處理器11可經由輸入/輸出(I/O)裝置13中的通訊介面從其他電子裝置接收影像101。影像101可被儲存於儲存電路12中。在一實施例中,影像101中可包括人的臉部影像。或者,在一實施例中,影像101中可不包括人的臉部影像。In one embodiment, the processor 11 can capture an image of the environment image through a camera lens in the input/output (I/O) device 13 to obtain an image (also referred to as a target image) 101 . Alternatively, in one embodiment, the processor 11 can receive the image 101 from other electronic devices through the communication interface in the input/output (I/O) device 13 . The image 101 can be stored in the storage circuit 12 . In an embodiment, the image 101 may include a face image of a person. Or, in an embodiment, the image 101 may not include a face image of a person.

在一實施例中,處理器11可獲得影像101。例如,處理器11可從儲存電路12中讀取影像101。處理器11可對影像101執行色彩分析以獲得影像101的色彩分布。例如,影像101中可包括多個像素點。影像101中的每一個像素點可對應一個色碼組合,且一個色碼組合可對應一種視覺上的顏色。例如,一個色碼組合可由紅(R)、綠(G)及藍(B)三原色的色碼組成。以某一個像素點所對應的色碼組合(198, 164, 162)為例,色碼組合(198, 164, 162)表示在此像素點上,原色R的色碼為198,原色G的色碼為164,且原色B的色碼為162。處理器11可根據影像101中至少部分的像素點所對應的色碼組合來獲得影像101的色彩分布。In one embodiment, the processor 11 can obtain the image 101 . For example, the processor 11 can read the image 101 from the storage circuit 12 . The processor 11 can perform color analysis on the image 101 to obtain the color distribution of the image 101 . For example, the image 101 may include multiple pixels. Each pixel in the image 101 can correspond to a color code combination, and a color code combination can correspond to a visual color. For example, a color code combination can be composed of the color codes of the three primary colors of red (R), green (G) and blue (B). Take the color code combination (198, 164, 162) corresponding to a certain pixel as an example, the color code combination (198, 164, 162) means that at this pixel point, the color code of the primary color R is 198, and the color code of the primary color G is The code is 164, and the color code of primary color B is 162. The processor 11 can obtain the color distribution of the image 101 according to the combination of color codes corresponding to at least part of the pixels in the image 101 .

在獲得影像101的色彩分布後,處理器11可對影像101的色彩分布執行中性點(neutral point)檢測。所述中性點檢測可用以檢測影像101的色彩分布中的中性點(亦稱為中性色參考點)。一個中性點可對應一種色彩分布。一種色彩分布可對應一種色溫。根據所述中性點檢測的檢測結果,處理器11可選擇性地進入第一調整模式或第二調整模式。After obtaining the color distribution of the image 101 , the processor 11 may perform neutral point detection on the color distribution of the image 101 . The neutral point detection can be used to detect a neutral point (also called a neutral color reference point) in the color distribution of the image 101 . A neutral point corresponds to a color distribution. One color distribution can correspond to one color temperature. According to the detection result of the neutral point detection, the processor 11 can selectively enter the first adjustment mode or the second adjustment mode.

在第一調整模式中,處理器11可對影像101執行臉部辨識。然後,處理器11可根據臉部辨識的辨識結果對影像101執行影像色彩調整。例如,所述影像色彩調整包括調整影像101的白平衡。另一方面,在第二調整模式中,處理器11可在未執行所述臉部辨識的狀態下,根據影像101的色彩分布對影像101執行所述影像色彩調整。In the first adjustment mode, the processor 11 can perform facial recognition on the image 101 . Then, the processor 11 may perform image color adjustment on the image 101 according to the recognition result of the facial recognition. For example, the image color adjustment includes adjusting the white balance of the image 101 . On the other hand, in the second adjustment mode, the processor 11 may perform the image color adjustment on the image 101 according to the color distribution of the image 101 when the face recognition is not performed.

在一實施例中,若影像101的色彩分布中僅存在單一種色彩分布(或色溫),則所述中性點檢測的檢測結果可反映影像101的色彩分布中存在單一個中性點。所述單一個中性點可反映或用以描述所述單一種色彩分布(或色溫)的統計特性或分布特性。例如,所述單一個中性點可反映影像101整體的色彩分布(或色溫)是偏冷或偏暖。In one embodiment, if there is only a single color distribution (or color temperature) in the color distribution of the image 101 , the detection result of the neutral point detection may reflect that there is a single neutral point in the color distribution of the image 101 . The single neutral point can reflect or be used to describe the statistical characteristics or distribution characteristics of the single color distribution (or color temperature). For example, the single neutral point may reflect whether the overall color distribution (or color temperature) of the image 101 is cooler or warmer.

在一實施例中,若影像101的色彩分布中同時存在多種色彩分布(或色溫),則所述中性點檢測的檢測結果可反映影像101的色彩分布中存在多個中性點。所述多個中性點可分別反映或用以描述所述多種色彩分布(或色溫)各別的統計特性或分布特性。例如,所述多個中性點的其中之一可反映影像101中一部分區域的色彩分布(或色溫)是偏冷,而所述多個中性點的其中之另一則可反映影像101中另一部分區域的色彩分布(或色溫)是偏暖。In one embodiment, if multiple color distributions (or color temperatures) exist in the color distribution of the image 101 at the same time, the detection result of the neutral point detection may reflect that there are multiple neutral points in the color distribution of the image 101 . The plurality of neutral points can respectively reflect or be used to describe the respective statistical characteristics or distribution characteristics of the plurality of color distributions (or color temperatures). For example, one of the plurality of neutral points may reflect that the color distribution (or color temperature) of a part of the image 101 is cooler, and the other of the plurality of neutral points may reflect that the color distribution (or color temperature) of a part of the image 101 is cooler. The color distribution (or color temperature) of some areas is warmer.

在一實施例中,若影像101的色彩分布無法被明確識別、分組或定義,則所述中性點檢測的檢測結果可反映影像101的色彩分布中不存在任何中性點。In one embodiment, if the color distribution of the image 101 cannot be clearly identified, grouped or defined, the detection result of the neutral point detection may reflect that there is no neutral point in the color distribution of the image 101 .

在一實施例中,所述中性點檢測的檢測結果可反映影像101的色彩分布中是否存在任何中性點及/或影像101的色彩分布中的中性點的總數。響應於所述中性點檢測的檢測結果反映影像101的色彩分布中存在多個中性點或不存在任何中性點,處理器11可進入所述第一調整模式。然後,處理器11可在第一調整模式中對影像101進行影像色彩調整。或者,響應於所述中性點檢測的檢測結果反映影像101的色彩分布中僅存在單一個中性點,則處理器11可進入所述第二調整模式。然後,處理器11可在第二調整模式中對影像101進行影像色彩調整。In one embodiment, the detection result of the neutral point detection may reflect whether there is any neutral point in the color distribution of the image 101 and/or the total number of neutral points in the color distribution of the image 101 . In response to the detection result of the neutral point detection reflecting that there are multiple neutral points or no neutral point in the color distribution of the image 101 , the processor 11 may enter the first adjustment mode. Then, the processor 11 can perform image color adjustment on the image 101 in the first adjustment mode. Alternatively, in response to the detection result of the neutral point detection reflecting that there is only a single neutral point in the color distribution of the image 101 , the processor 11 may enter the second adjustment mode. Then, the processor 11 can perform image color adjustment on the image 101 in the second adjustment mode.

在一實施例中,在第一調整模式中,處理器11可根據臉部辨識的辨識結果判斷影像101中是否存在人的臉部圖案(即人臉)。在第一調整模式中,若臉部辨識的辨識結果反映影像101中存在人的臉部圖案,處理器11可根據所述臉部圖案的色彩分布來對影像101執行影像色彩調整。例如,處理器11可根據所述臉部圖案的色彩分布(例如膚色),來調整影像101整體(包含影像101中人臉所在的區域以及人臉以外的區域)的白平衡。其中,影像101中的人的臉部圖案所涵蓋的區域的色溫可能會與影像101中的人的臉部圖案以外的區域的色溫相同或不同。In one embodiment, in the first adjustment mode, the processor 11 may determine whether there is a human facial pattern (ie, a human face) in the image 101 according to the recognition result of the facial recognition. In the first adjustment mode, if the recognition result of the facial recognition reflects that there is a human facial pattern in the image 101 , the processor 11 may perform image color adjustment on the image 101 according to the color distribution of the facial pattern. For example, the processor 11 may adjust the white balance of the entire image 101 (including the area where the face is located and the area other than the face in the image 101 ) according to the color distribution of the facial pattern (eg, skin color). Wherein, the color temperature of the area covered by the facial pattern in the image 101 may be the same as or different from the color temperature of the area other than the facial pattern in the image 101 .

從另一角度而言,在第一調整模式中,若影像101中存在人的臉部圖案,則處理器11可忽略影像101中的人的臉部圖案以外的區域的色彩分布,而僅是根據所述臉部圖案的色彩分布,來調整影像101整體的白平衡。另一方面,在第一調整模式中,若臉部辨識的辨識結果反映影像101中不存在人的臉部圖案,則處理器11可根據影像101整體的色彩分布,來調整影像101整體的白平衡。From another point of view, in the first adjustment mode, if there is a human facial pattern in the image 101, the processor 11 may ignore the color distribution of the area other than the human facial pattern in the image 101, and only According to the color distribution of the facial pattern, the overall white balance of the image 101 is adjusted. On the other hand, in the first adjustment mode, if the recognition result of face recognition reflects that there is no human facial pattern in the image 101, the processor 11 can adjust the overall white of the image 101 according to the overall color distribution of the image 101. balance.

在一實施例中,在第二調整模式中,處理器11可不對影像101執行臉部辨識。藉此,可提高處理器11在第二調整模式中執行影像色彩調整的效率。特別是,在第二調整模式中,即便影像101中存在人的臉部圖案,處理器11仍是根據影像101整體的色彩分布,來調整影像101整體的白平衡。亦即,在第二調整模式中,即便影像101中存在人的臉部圖案,處理器11仍是同時考慮影像101中人臉所在的區域以及人臉以外的區域的色彩分布,來調整影像101整體的白平衡。In an embodiment, in the second adjustment mode, the processor 11 may not perform face recognition on the image 101 . Thereby, the efficiency of the processor 11 in performing image color adjustment in the second adjustment mode can be improved. Especially, in the second adjustment mode, even if there is a human face pattern in the image 101 , the processor 11 still adjusts the overall white balance of the image 101 according to the overall color distribution of the image 101 . That is, in the second adjustment mode, even if there is a human face pattern in the image 101, the processor 11 still considers the color distribution of the area where the human face is located in the image 101 and the color distribution of the area other than the human face to adjust the image 101. Overall white balance.

在一實施例中,若影像101的色彩分布中同時存在多個中性點或不存在任何中性點,表示影像101中的多個區域可能具有不同的色彩分布(或色溫)。在此狀況下,在第一調整模式中,處理器11可優先以人的臉部圖案的色彩分布(或人臉所在的環境光源下的色溫)為基準來調整影像101整體的白平衡。藉此,在影像101的拍攝環境中同時存在多種光源(即存在混和光源)或光源條件不明確的狀況下,可有效減少執行色彩調整後的影像101中可能呈現於人臉的色偏,進而提高影像的色彩調整品質。In one embodiment, if there are multiple neutral points or no neutral point in the color distribution of the image 101 , it means that multiple areas in the image 101 may have different color distributions (or color temperatures). In this situation, in the first adjustment mode, the processor 11 can preferentially adjust the overall white balance of the image 101 based on the color distribution of the face pattern (or the color temperature of the ambient light source where the face is located). Thereby, in the shooting environment of the image 101, there are multiple light sources (i.e. mixed light sources) or the conditions of the light sources are not clear, the color shift that may appear on the human face in the image 101 after the color adjustment can be effectively reduced, and further Improves the color adjustment quality of images.

另一方面,若影像101的色彩分布中僅存在單一個中性點,表示影像101的拍攝環境中僅存在單一光源且影像101整體的色彩分布(或色溫)趨於一致。在此狀況下,在第二調整模式中,處理器11可略過臉部辨識程序而直接以影像101整體的色彩分布為基準來調整影像101整體的白平衡。藉此,可在幾乎不影響影像101的色彩調整品質的前提下,提高對影像101執行色彩調整的效率。On the other hand, if there is only a single neutral point in the color distribution of the image 101, it means that there is only a single light source in the shooting environment of the image 101 and the overall color distribution (or color temperature) of the image 101 tends to be consistent. In this situation, in the second adjustment mode, the processor 11 may skip the face recognition process and directly adjust the white balance of the entire image 101 based on the overall color distribution of the image 101 . Thereby, the efficiency of performing color adjustment on the image 101 can be improved under the premise that the color adjustment quality of the image 101 is hardly affected.

圖2是根據本發明的實施例所繪示的影像色彩調整方法的流程圖。請參照圖2,在步驟S201中,獲得目標影像。在步驟S202中,對所述目標影像的色彩分布執行中性點(neutral point)檢測。在步驟S203中,根據所述中性點檢測的檢測結果進入第一調整模式或第二調整模式。在步驟S204中,在所述第一調整模式中,對所述目標影像執行臉部辨識,並根據所述臉部辨識的辨識結果對所述目標影像執行影像色彩調整。在步驟S205中,在所述第二調整模式中,在未執行所述臉部辨識的狀態下,根據所述目標影像的所述色彩分布對所述目標影像執行所述影像色彩調整。FIG. 2 is a flowchart of an image color adjustment method according to an embodiment of the invention. Please refer to FIG. 2 , in step S201 , a target image is obtained. In step S202, a neutral point detection is performed on the color distribution of the target image. In step S203, enter the first adjustment mode or the second adjustment mode according to the detection result of the neutral point detection. In step S204 , in the first adjustment mode, face recognition is performed on the target image, and image color adjustment is performed on the target image according to a recognition result of the face recognition. In step S205 , in the second adjustment mode, the image color adjustment is performed on the target image according to the color distribution of the target image when the face recognition is not performed.

圖3是根據本發明的實施例所繪示的影像色彩調整方法的流程圖。請參照圖3,在步驟S301中,獲得目標影像。在步驟S302中,對所述目標影像的色彩分布執行中性點檢測。在步驟S303中,判斷所述目標影像的色彩分布中是否存在中性點。若所述目標影像的色彩分布中不存在任何中性點,在步驟S304中,進入第一調整模式。若所述目標影像的色彩分布中存在至少一中性點,在步驟S305中,判斷所述中性點的數目是否大於一。若所述中性點的數目大於一,在步驟S304中,進入第一調整模式。或者,若所述中性點的數目不大於一,在步驟S306中,進入第二調整模式。FIG. 3 is a flowchart of an image color adjustment method according to an embodiment of the invention. Referring to FIG. 3 , in step S301 , a target image is obtained. In step S302, a neutral point detection is performed on the color distribution of the target image. In step S303, it is determined whether there is a neutral point in the color distribution of the target image. If there is no neutral point in the color distribution of the target image, in step S304, enter the first adjustment mode. If there is at least one neutral point in the color distribution of the target image, in step S305, it is determined whether the number of the neutral points is greater than one. If the number of neutral points is greater than one, in step S304, enter the first adjustment mode. Or, if the number of neutral points is not greater than one, in step S306, enter the second adjustment mode.

然而,圖2與圖3中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖2與圖3中各步驟可以實作為多個程式碼或是電路,本發明不加以限制。此外,圖2與圖3的方法可以搭配以上範例實施例使用,也可以單獨使用,本發明不加以限制。However, each step in FIG. 2 and FIG. 3 has been described in detail above, and will not be repeated here. It should be noted that each step in FIG. 2 and FIG. 3 can be implemented as a plurality of program codes or circuits, which is not limited by the present invention. In addition, the methods shown in FIG. 2 and FIG. 3 can be used together with the above exemplary embodiments, or can be used alone, which is not limited by the present invention.

綜上所述,本發明所提出的實施例可對當下所欲處理之影像的色彩分布執行中性點檢測並根據檢測結果決定是否在後續的影像色彩調整操作中對所述影像執行臉部辨識。藉此,可在影像的色彩調整品質與色彩調整效率之間取得較佳平衡。To sum up, the embodiment of the present invention can perform neutral point detection on the color distribution of the image to be processed at the moment and decide whether to perform face recognition on the image in the subsequent image color adjustment operation according to the detection result . Thereby, a better balance can be achieved between the color adjustment quality and the color adjustment efficiency of the image.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field may make some changes and modifications without departing from the spirit and scope of the present invention. The scope of protection of the present invention should be defined by the scope of the appended patent application.

10:影像色彩調整裝置 11:處理器 12:儲存電路 13:輸入/輸出(I/O)介面 101:影像 S201~S205,S301~S306:步驟 10: Image color adjustment device 11: Processor 12: storage circuit 13: Input/output (I/O) interface 101: Image S201~S205, S301~S306: steps

圖1是根據本發明的實施例所繪示的影像色彩調整裝置的示意圖。 圖2是根據本發明的實施例所繪示的影像色彩調整方法的流程圖。 圖3是根據本發明的實施例所繪示的影像色彩調整方法的流程圖。 FIG. 1 is a schematic diagram of an image color adjustment device according to an embodiment of the present invention. FIG. 2 is a flowchart of an image color adjustment method according to an embodiment of the invention. FIG. 3 is a flowchart of an image color adjustment method according to an embodiment of the invention.

S201~S205:步驟 S201~S205: steps

Claims (10)

一種影像色彩調整方法,包括: 獲得目標影像; 對該目標影像的色彩分布執行中性點(neutral point)檢測; 根據該中性點檢測的檢測結果進入第一調整模式或第二調整模式; 在該第一調整模式中,對該目標影像執行臉部辨識,並根據該臉部辨識的辨識結果對該目標影像執行影像色彩調整;以及 在該第二調整模式中,在未執行該臉部辨識的狀態下,根據該目標影像的該色彩分布對該目標影像執行該影像色彩調整。 A method for image color adjustment, comprising: Obtain the target image; performing a neutral point detection on the color distribution of the target image; Entering the first adjustment mode or the second adjustment mode according to the detection result of the neutral point detection; In the first adjustment mode, face recognition is performed on the target image, and image color adjustment is performed on the target image according to a recognition result of the face recognition; and In the second adjustment mode, when the face recognition is not performed, the image color adjustment is performed on the target image according to the color distribution of the target image. 如請求項1所述的影像色彩調整方法,其中根據該中性點檢測的該檢測結果進入該第一調整模式或該第二調整模式的步驟包括: 響應於該中性點檢測的該檢測結果反映該目標影像的該色彩分布中存在多個中性點或不存在任何中性點,進入該第一調整模式。 The image color adjustment method according to claim 1, wherein the step of entering the first adjustment mode or the second adjustment mode according to the detection result of the neutral point detection includes: In response to the detection result of the neutral point detection reflecting that there are multiple neutral points or no neutral point in the color distribution of the target image, the first adjustment mode is entered. 如請求項1所述的影像色彩調整方法,其中根據該中性點檢測的該檢測結果進入該第一調整模式或該第二調整模式的步驟包括: 響應於該中性點檢測的該檢測結果反映該目標影像的該色彩分布中僅存在單一個中性點,進入該第二調整模式。 The image color adjustment method according to claim 1, wherein the step of entering the first adjustment mode or the second adjustment mode according to the detection result of the neutral point detection includes: In response to the detection result of the neutral point detection reflecting that there is only a single neutral point in the color distribution of the target image, the second adjustment mode is entered. 如請求項1所述的影像色彩調整方法,其中根據該中性點檢測的該檢測結果進入該第一調整模式或該第二調整模式的步驟包括: 判斷該目標影像的該色彩分布中是否存在中性點; 響應於該目標影像的該色彩分布中不存在任何中性點,進入該第一調整模式; 響應於該目標影像的該色彩分布中存在至少一中性點,判斷該至少一中性點的數目是否大於一; 響應於該至少一中性點的該數目大於一,進入該第一調整模式;以及 響應於該至少一中性點的該數目不大於一,進入該第二調整模式。 The image color adjustment method according to claim 1, wherein the step of entering the first adjustment mode or the second adjustment mode according to the detection result of the neutral point detection includes: judging whether there is a neutral point in the color distribution of the target image; Entering the first adjustment mode in response to the absence of any neutral point in the color distribution of the target image; In response to the presence of at least one neutral point in the color distribution of the target image, determine whether the number of the at least one neutral point is greater than one; entering the first adjustment mode in response to the number of the at least one neutral point being greater than one; and In response to the number of the at least one neutral point being not greater than one, the second adjustment mode is entered. 如請求項1所述的影像色彩調整方法,其中根據該臉部辨識的該辨識結果對該目標影像執行該影像色彩調整的步驟包括: 根據該目標影像中的臉部圖像的色彩分布,對該目標影像執行該影像色彩調整。 The image color adjustment method as described in Claim 1, wherein the step of performing the image color adjustment on the target image according to the recognition result of the facial recognition includes: The image color adjustment is performed on the target image according to the color distribution of the face image in the target image. 一種影像色彩調整裝置,包括: 儲存電路,用以儲存目標影像; 處理器,耦接至該儲存電路並用以: 獲得該目標影像; 對該目標影像的色彩分布執行中性點(neutral point)檢測; 根據該中性點檢測的檢測結果進入第一調整模式或第二調整模式; 在該第一調整模式中,對該目標影像執行臉部辨識,並根據該臉部辨識的辨識結果對該目標影像執行影像色彩調整;以及 在該第二調整模式中,在未執行該臉部辨識的狀態下,根據該目標影像的該色彩分布對該目標影像執行該影像色彩調整。 An image color adjustment device, comprising: a storage circuit for storing the target image; a processor, coupled to the storage circuit and used for: Obtain the target image; performing a neutral point detection on the color distribution of the target image; Entering the first adjustment mode or the second adjustment mode according to the detection result of the neutral point detection; In the first adjustment mode, face recognition is performed on the target image, and image color adjustment is performed on the target image according to a recognition result of the face recognition; and In the second adjustment mode, when the face recognition is not performed, the image color adjustment is performed on the target image according to the color distribution of the target image. 如請求項6所述的影像色彩調整裝置,其中根據該中性點檢測的該檢測結果進入該第一調整模式或該第二調整模式的操作包括: 響應於該中性點檢測的該檢測結果反映該目標影像的該色彩分布中存在多個中性點或不存在任何中性點,進入該第一調整模式。 The image color adjustment device according to claim 6, wherein the operation of entering the first adjustment mode or the second adjustment mode according to the detection result of the neutral point detection includes: In response to the detection result of the neutral point detection reflecting that there are multiple neutral points or no neutral point in the color distribution of the target image, the first adjustment mode is entered. 如請求項6所述的影像色彩調整裝置,其中根據該中性點檢測的該檢測結果進入該第一調整模式或該第二調整模式的操作包括: 響應於該中性點檢測的該檢測結果反映該目標影像的該色彩分布中僅存在單一個中性點,進入該第二調整模式。 The image color adjustment device according to claim 6, wherein the operation of entering the first adjustment mode or the second adjustment mode according to the detection result of the neutral point detection includes: In response to the detection result of the neutral point detection reflecting that there is only a single neutral point in the color distribution of the target image, the second adjustment mode is entered. 如請求項6所述的影像色彩調整裝置,其中根據該中性點檢測的該檢測結果進入該第一調整模式或該第二調整模式的操作包括: 判斷該目標影像的該色彩分布中是否存在中性點; 響應於該目標影像的該色彩分布中不存在任何中性點,進入該第一調整模式; 響應於該目標影像的該色彩分布中存在至少一中性點,判斷該至少一中性點的數目是否大於一; 響應於該至少一中性點的該數目大於一,進入該第一調整模式;以及 響應於該至少一中性點的該數目不大於一,進入該第二調整模式。 The image color adjustment device according to claim 6, wherein the operation of entering the first adjustment mode or the second adjustment mode according to the detection result of the neutral point detection includes: judging whether there is a neutral point in the color distribution of the target image; Entering the first adjustment mode in response to the absence of any neutral point in the color distribution of the target image; In response to the presence of at least one neutral point in the color distribution of the target image, determine whether the number of the at least one neutral point is greater than one; entering the first adjustment mode in response to the number of the at least one neutral point being greater than one; and In response to the number of the at least one neutral point being not greater than one, the second adjustment mode is entered. 如請求項6所述的影像色彩調整裝置,其中根據該臉部辨識的該辨識結果對該目標影像執行該影像色彩調整的操作包括: 根據該目標影像中的臉部圖像的色彩分布,對該目標影像執行該影像色彩調整。 The image color adjustment device according to claim 6, wherein the operation of performing the image color adjustment on the target image according to the recognition result of the facial recognition includes: The image color adjustment is performed on the target image according to the color distribution of the face image in the target image.
TW110136455A 2021-09-30 2021-09-30 Image color adjustment method and image color adjustment device TWI800934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110136455A TWI800934B (en) 2021-09-30 2021-09-30 Image color adjustment method and image color adjustment device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110136455A TWI800934B (en) 2021-09-30 2021-09-30 Image color adjustment method and image color adjustment device

Publications (2)

Publication Number Publication Date
TW202316852A true TW202316852A (en) 2023-04-16
TWI800934B TWI800934B (en) 2023-05-01

Family

ID=86943232

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110136455A TWI800934B (en) 2021-09-30 2021-09-30 Image color adjustment method and image color adjustment device

Country Status (1)

Country Link
TW (1) TWI800934B (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107396079B (en) * 2017-08-31 2019-06-07 Oppo广东移动通信有限公司 White balance adjustment method and device
CN111836029B (en) * 2019-04-18 2022-03-15 福州瑞芯微电子股份有限公司 White balance adjusting method and system based on color gamut mapping and white balance terminal

Also Published As

Publication number Publication date
TWI800934B (en) 2023-05-01

Similar Documents

Publication Publication Date Title
EP3614335B1 (en) Method for image processing and electronic device
CN107810505B (en) Machine learning of real-time image capture parameters
WO2017084255A1 (en) Real-time video enhancement method, terminal, and nonvolatile computer readable storage medium
US11763470B2 (en) Method and apparatus for aligning image frames, electronic device and storage medium
WO2017215527A1 (en) Hdr scenario detection method, device, and computer storage medium
WO2023065523A1 (en) Isp-based image processing method and apparatus, storage medium, and camera device
US8995784B2 (en) Structure descriptors for image processing
CN112218065B (en) Image white balance method, system, terminal device and storage medium
CN115496668A (en) Image processing method, image processing device, electronic equipment and storage medium
WO2019128539A1 (en) Image definition obtaining method and apparatus, storage medium, and electronic device
CN110618852B (en) View processing method, view processing device and terminal equipment
US20220329729A1 (en) Photographing method, storage medium and electronic device
US10769416B2 (en) Image processing method, electronic device and storage medium
WO2018161568A1 (en) Photographing method and device based on two cameras
CN108932703B (en) Picture processing method, picture processing device and terminal equipment
US20180322676A1 (en) Simplified lighting compositing
WO2021258300A1 (en) In-screen photography control method, terminal device and storage medium
TW202316852A (en) Image color adjustment method and image color adjustment device
CN115660997B (en) Image data processing method and device and electronic equipment
WO2023077981A1 (en) Display parameter adjusting method and apparatus, storage medium, and display device
TWI727780B (en) Image noise reduction device and method thereof
CN114416089A (en) Page display method and device, mobile terminal and storage medium
US20090073464A1 (en) Selective Color Replacement
US10742862B2 (en) Information processing device, information processing method, and information processing system
CN112291548B (en) White balance statistical method, device, mobile terminal and storage medium