TWI466064B - A method of handling a face image - Google Patents

A method of handling a face image Download PDF

Info

Publication number
TWI466064B
TWI466064B TW098128309A TW98128309A TWI466064B TW I466064 B TWI466064 B TW I466064B TW 098128309 A TW098128309 A TW 098128309A TW 98128309 A TW98128309 A TW 98128309A TW I466064 B TWI466064 B TW I466064B
Authority
TW
Taiwan
Prior art keywords
area
overexposed
image
block
micro
Prior art date
Application number
TW098128309A
Other languages
Chinese (zh)
Other versions
TW201108155A (en
Inventor
Chi Jung Weng
Ming Song Hsiao
Original Assignee
Altek Corp
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 Altek Corp filed Critical Altek Corp
Priority to TW098128309A priority Critical patent/TWI466064B/en
Publication of TW201108155A publication Critical patent/TW201108155A/en
Application granted granted Critical
Publication of TWI466064B publication Critical patent/TWI466064B/en

Links

Landscapes

  • Studio Devices (AREA)
  • Image Processing (AREA)

Description

具有人臉之影像的處理方法Processing method for face image

本發明係關於一種具有人臉之影像的處理方法,特別是一種處理具有過曝區之人臉之影像的方法。The present invention relates to a method of processing an image of a human face, and more particularly to a method of processing an image of a face having an overexposed area.

近年來,使用數位相機來拍攝影像的使用者大幅增加。除了攝影專業人員之外,也有越來越多的一般使用者使用數位相機來拍攝。通常,一般使用者所拍攝的影像,因拍攝技巧不如專業人員,故其所攝得的影像經常會有諸如曝光不足、曝光過度、焦距不對等問題。尤其是當拍攝的影像是人像時,出現在人臉上的攝影缺陷更顯的糟糕。In recent years, the number of users who use digital cameras to shoot images has increased dramatically. In addition to photography professionals, more and more general users use digital cameras to shoot. Generally, the images taken by general users are not as good as those of professionals, so the images they take often have problems such as underexposure, overexposure, and incorrect focus. Especially when the image taken is a portrait, the photographic defects appearing on the person's face are even worse.

為了使一般的使用者也能夠輕易地得到高品質的照片,數位相機大多內建有自動對影像中的缺陷進行補償修飾的機能。目前數位相機針對人臉拍攝所進行的處理方式例如(1)稍微讓人臉過曝,以使得皮膚看起來較為白皙;及(2)加重去除影像中的雜訊,以除去人臉上的黑斑等些微瑕疵。而當影像過亮或過暗時,多採用減暗或加亮影像,使影像整體的亮度平均達到正常的數值。但是這種方法並不適用於部分過亮或部分過暗的影像,若單純的調整影像全體的亮度值,會得到與實際人像或景象不符的影像。In order to enable high-quality photos to be easily obtained by ordinary users, digital cameras are often equipped with functions that automatically compensate for defects in the image. At present, the digital camera processes the face shots, for example (1) slightly exposed to make the skin look whiter; and (2) aggravated the noise in the image to remove the black on the face. The spots are a little bit sloppy. When the image is too bright or too dark, the image is mostly dimmed or highlighted, so that the brightness of the image as a whole is averaged to a normal value. However, this method is not suitable for partially over-bright or partially dark images. If you simply adjust the brightness value of the entire image, you will get an image that does not match the actual portrait or scene.

此外,當人處於大太陽底下時,臉上的汗水或是油光可能會使影像中對應油光或汗水位置過度曝光。又例如在黑暗等環境使用閃光燈時,也可能會因為閃光燈打閃的亮度不恰當而使得影像中的人臉的部分區域過度曝光,而無法得到好看的照片。In addition, when a person is under the sun, sweat or shine on the face may overexpose the corresponding oil or sweat position in the image. For example, when the flash is used in an environment such as darkness, a partial area of a human face in the image may be overexposed due to an inappropriate brightness of the flash, and a good-looking photograph may not be obtained.

綜上所述,先前之數位相機存在有無法改善人臉影像中的部分區域過度曝光的問題,尤其是無法針對影像中人臉的部分進行補償修飾的問題。In summary, the previous digital camera has the problem that the partial exposure in the face image cannot be improved, especially the problem that the face of the image cannot be compensated for.

鑒於以上的問題,本發明提供一種可補償人臉影像中部分過度曝光的方法,藉以解決上述問題。In view of the above problems, the present invention provides a method for compensating for partial overexposure in a face image, thereby solving the above problems.

根據本發明的一實施範例,一種具有人臉之影像的處理方法係適用於一數位相機。數位相機可具有一記憶模組。此處理方法包括:擷取一預覽對焦影像,並儲存於記憶模組;擷取一目標影像並儲存於記憶模組,而目標影像中包含一人臉區塊;判斷人臉區塊中是否具有至少一過曝區;若是,則依據預覽對焦影像及目標影像對過曝區進行補償;以及被補償的目標影像回存於記憶模組。其中人臉區塊具有複數個微區塊,且每一微區塊具有一亮度值用以判斷人臉區塊中是否具有過曝區。According to an embodiment of the invention, a processing method for an image of a human face is applied to a digital camera. A digital camera can have a memory module. The processing method includes: capturing a preview focus image and storing it in the memory module; capturing a target image and storing the image in the memory module, wherein the target image includes a face block; determining whether the face block has at least An over-exposed area; if yes, the over-exposed area is compensated according to the preview focus image and the target image; and the compensated target image is restored to the memory module. The face block has a plurality of micro-blocks, and each of the micro-blocks has a brightness value for determining whether there is an over-exposed area in the face block.

前述判斷人臉區塊中是否具有至少一過曝區的步驟可包括:逐一判斷人臉區塊中的各微區塊的亮度值是否大於一第一門檻值,並將亮度值大於第一門檻值的微區塊各別記錄為一候選區塊;將單一相連接的這些候選區塊定義為一相連區塊;以及判斷在各相連區塊內的候選區塊的數量是否大於一第二門檻值,並將數量大於第二門檻值的相連區塊定義為過曝區。其中第二門檻值可介於人臉區塊所包含的微區塊的數量的3%~15%。The step of determining whether the face block has at least one over-exposure zone may include: determining, by one by one, whether the brightness value of each micro-block in the face block is greater than a first threshold, and the brightness value is greater than the first threshold. The micro-blocks of values are each recorded as a candidate block; the candidate blocks connected by a single phase are defined as a connected block; and whether the number of candidate blocks in each connected block is greater than a second threshold is determined. A value, and a connected block whose number is greater than the second threshold is defined as an overexposed area. The second threshold may be between 3% and 15% of the number of micro-blocks included in the face block.

根據本發明之實施範例,前述依據預覽對焦影像及目標影像對過曝區進行補償的步驟包括:定義一鄰近區、一過曝參考區及一鄰近參考區;判斷過曝參考區是否過曝;若否,依據過曝參考區、鄰近參考區與鄰近區補償過曝區;以及若是,依據鄰近區補償過曝區。其中鄰近區係位於過曝區周圍一預定範圍內之區域,過曝參考區係位於預覽對焦影像並與目標影像之過曝區對應,而鄰近參考區係位於預對焦影像並與目標影像之鄰近區對應。According to an embodiment of the present invention, the step of compensating the overexposed area according to the preview focus image and the target image includes: defining a neighboring area, an overexposed reference area, and a neighboring reference area; and determining whether the overexposed reference area is overexposed; If not, the overexposed area is compensated according to the overexposed reference area, the adjacent reference area and the adjacent area; and if so, the overexposed area is compensated according to the adjacent area. The adjacent zone is located in a predetermined range around the overexposed zone, and the overexposed reference zone is located in the preview focus image and corresponds to the overexposed zone of the target image, and the adjacent reference zone is located in the pre-focus image and adjacent to the target image. The area corresponds.

依據過曝參考區、鄰近參考區與鄰近區補償過曝區的步驟可包括:依據過曝參考區之亮度參考值與鄰近參考區之亮度參考值的差,以及鄰近區的亮度值,補償過曝區中的微區塊的亮度值。而依據鄰近區補償過曝區的步驟可包括:依據鄰近區的微區塊的亮度值,以內差法補償過曝區中的微區塊的亮度值。The step of compensating the overexposure region according to the overexposed reference region, the adjacent reference region and the adjacent region may include: compensating according to the difference between the brightness reference value of the overexposed reference region and the brightness reference value of the adjacent reference region, and the brightness value of the adjacent region The brightness value of the micro-blocks in the exposed area. The step of compensating the overexposure zone according to the adjacent zone may include: compensating the luminance value of the micro-block in the over-exposed zone by the internal difference method according to the brightness value of the micro-block of the adjacent zone.

此外,當在人臉區塊不具有至少一過曝區時,不對目標影像進行補償。In addition, when the face block does not have at least one overexposed area, the target image is not compensated.

基於上述,根據本發明之實施範例,其可偵測影像中之人臉區塊的過曝區,並藉由真正擷取目標影像前之預覽對焦影像,或鄰近過曝區的影像對過曝區進行補償。是以上述的實施例可以提供自動修飾影像中人臉的過度曝光部分,令使用者輕鬆地得到好看的照片。Based on the above, according to an embodiment of the present invention, the overexposed area of the face block in the image can be detected, and the preview focus image before the target image is captured, or the image adjacent to the overexposed area is overexposed. The area is compensated. In the above embodiment, it is possible to provide an over-exposed portion of the face in the automatically modified image, so that the user can easily obtain a good-looking photo.

有關本發明的特徵、實作與功效,茲配合圖示作最佳實施例詳細說明如下。The features, implementations, and utilities of the present invention are described in detail below with reference to the preferred embodiments.

以下在實施方式中詳細敘述本發明之詳細特徵以及優點,其內容足以使任何熟習相關技藝者了解本發明之技術內容並據以實施,且根據本說明書所揭露之內容、申請專利範圍及圖式,任何熟習相關技藝者可輕易地理解本發明相關之目的及優點。The detailed features and advantages of the present invention are set forth in the Detailed Description of the Detailed Description of the <RTIgt; </ RTI> <RTIgt; </ RTI> </ RTI> </ RTI> <RTIgt; The objects and advantages associated with the present invention can be readily understood by those skilled in the art.

根據本發明之一實施範例,具有人臉之影像的處理方法適用於一數位相機。數位相機具有一儲存裝置,儲存裝置可以是但不限於揮發性記憶體、非發性記憶體、硬碟、或固態硬碟。請參考「第1圖」,其係為根據本發明一實施範例之流程示意圖。由「第1圖」可知,具有人臉之影像的處理方法具有以下幾個步驟,步驟S20:擷取一預覽對焦影像;步驟S30:擷取一目標影像;步驟S40:判斷人臉區塊中是否具有至少一過曝區;步驟S50:依據預覽對焦影像及目標影像對過曝區進行補償;步驟S60:將被補償的目標影像回存於記憶模組;以及步驟S70:不對目標影像進行補償。According to an embodiment of the present invention, a processing method for an image of a face is applicable to a digital camera. A digital camera has a storage device that can be, but is not limited to, a volatile memory, a non-volatile memory, a hard disk, or a solid state hard disk. Please refer to FIG. 1 , which is a schematic flowchart of an embodiment of the present invention. As shown in FIG. 1, the processing method for the image having the face has the following steps: Step S20: capturing a preview focus image; step S30: capturing a target image; and step S40: determining the face block Whether there is at least one over-exposed area; step S50: compensating the over-exposed area according to the preview focus image and the target image; step S60: restoring the compensated target image to the memory module; and step S70: not compensating the target image .

關於步驟S20與步驟S30中之預覽對焦影像及目標影像,請同時對照「第2A圖」與「第2B圖」。其係為根據本發明一實施範例之預覽對焦影像與目標影像之示意圖。Regarding the preview focus image and the target image in step S20 and step S30, please refer to "2A map" and "2B map" at the same time. It is a schematic diagram of previewing a focused image and a target image according to an embodiment of the present invention.

一般的兩段式快門數位相機在使用時可以分為S0 、S1 與S2 三種狀態(模式)。S0 係為數位相機開機後所處於的預覽模式(Preview),通常於數位相機的顯示螢幕上顯示低解析度的畫面。使用者可在預覽模式下決定欲擷取影像的構圖或是執行調整拍攝參數等功能。A general two-stage shutter digital camera can be divided into three states (modes) of S 0 , S 1 and S 2 when in use. The S 0 is a preview mode in which the digital camera is turned on, and usually displays a low-resolution picture on the display screen of the digital camera. In the preview mode, the user can decide on the composition of the image to be captured or perform the functions of adjusting the shooting parameters.

S1 係為快門鍵被半壓的狀態(Half Shutter)。進入此狀態中的數位相機進行自動對焦(Auto-Focus,AF),並隨時準備進入S2 狀態。在處於S1 狀態下的數位相機自動對焦之後,數位相機會擷取預覽對焦影像300,且一般會將預覽對焦影像300儲存於記憶模組中最後的位置。但由於不同時間所擷取之預覽對焦影像300被存放於儲存模組中固定的位置,儲存模組中只會保存最新的一張的預覽對焦影像300。S 1 is a state in which the shutter button is half pressed (Half Shutter). The digital camera entering this state performs autofocus (Auto-Focus, AF) and is ready to enter the S 2 state. After the digital camera is in the AF state S 1, the number of opportunities for capturing the preview phase-focus image 300 and the position of the focus preview image will generally be stored in the memory module 300 in the last. However, since the preview focus image 300 captured at different times is stored in a fixed position in the storage module, only the latest one preview focus image 300 is saved in the storage module.

S2 係為快門鍵被全壓的狀態(Full Shutter)。當使用者完全按下快門鍵,數位相機會執行微調焦距等最後的準備工作,並正式的擷取影像作為目標影像200。而目標影像200也就是一般使用者所拍攝到的影像。預覽對焦影像300的解析度可跟目標影像200相同,亦可較目標影像200的解析度小。「第2A圖」與「第2B圖」所示的例子即是預覽對焦影像300的解析度小於目標影像200的解析度。關於預覽對焦影像300與目標影像200的解析度的關係,通常成一特定比例關係。例如,若兩者解析度比例為1:16時,即表示數位相機在擷取預覽對焦影像300時,採用每四個像素方擷取一筆資料,而數位相機在擷取目標影像200時,則採用每一個像素即擷取一筆資料。S 2 is a state in which the shutter button is fully pressed (Full Shutter). When the user fully presses the shutter button, the digital camera performs a final preparation such as fine-tuning the focus and officially captures the image as the target image 200. The target image 200 is also an image captured by a general user. The resolution of the preview focus image 300 may be the same as the target image 200 or may be smaller than the resolution of the target image 200. The example shown in "2A" and "2B" is that the resolution of the preview focus image 300 is smaller than the resolution of the target image 200. The relationship between the preview focus image 300 and the resolution of the target image 200 is usually in a specific proportional relationship. For example, if the resolution ratio of the two is 1:16, it means that when the digital camera captures the preview focus image 300, one data is captured every four pixels, and when the digital camera captures the target image 200, A data is captured using each pixel.

於步驟S20中,數位相機處於S1 狀態並擷取預覽對焦影像300;接著當快門鍵被全按下時,處於S2 狀態之數位相機在步驟S30中擷取目標影像200。目標影像200係為具有人臉之人像,數位相機執行人臉偵測功能後能搜尋到目標影像200中的一人臉區塊210。其中數位相機所採用的人臉偵測方法可以是但不限於採用膚色偵測、臉形偵測或是五官偵測等各種偵測技術。以人臉偵測找到人臉區塊210之後,人臉區塊210在目標影像200中所在的位置即被紀錄下來。In step S20, the digital camera is in a state S 1 and capturing the preview image focus 300; then when the shutter button is fully pressed, the state S 2 in digital camera images captured target 200 in step S30. The target image 200 is a portrait with a human face, and the digital camera can search for a face block 210 in the target image 200 after performing the face detection function. The face detection method used by the digital camera can be, but is not limited to, various detection technologies such as skin color detection, face detection or five-question detection. After the face block 210 is found by face detection, the position of the face block 210 in the target image 200 is recorded.

此外,目標影像200與預覽對焦影像300均具有許多的微區塊(micro block)。每一微區塊可以只包含一個像素,亦可是由M*N或是N*N個像素所構成的區塊。根據本發明之實施例係以微區塊最為影像處理之最小單位,且即使目標影像200與預覽對焦影像300具有不同的解析度,目標影像200與預覽對焦影像300仍包含的微區塊大小相同。故當預覽對焦影像300的解析度低於目標影像200的解析度時,預覽對焦影像300具有較少的微區塊。但在進行後續的影像處理時,可放大預覽對焦影像300的解析度。則放大的預覽對焦影像300即具有跟目標影像200相同的解析度以及相同數量的相對應之微區塊。但根據本發明之一實施例,以微區塊處理不同解析度之預覽對焦影像300與目標影像200的方法不限於此。In addition, both the target image 200 and the preview focus image 300 have a plurality of micro blocks. Each micro-block may contain only one pixel, or may be a block composed of M*N or N*N pixels. According to an embodiment of the present invention, the micro-block is the smallest unit of image processing, and even if the target image 200 and the preview focus image 300 have different resolutions, the target image 200 and the preview focus image 300 still contain the same micro-block size. . Therefore, when the resolution of the preview focus image 300 is lower than the resolution of the target image 200, the preview focus image 300 has fewer micro-tiles. However, when performing subsequent image processing, the resolution of the preview focus image 300 can be enlarged. The enlarged preview focus image 300 has the same resolution as the target image 200 and the same number of corresponding micro-tiles. However, according to an embodiment of the present invention, the method of processing the preview image 300 and the target image 200 of different resolutions by using micro-blocks is not limited thereto.

每一微區塊具有一個亮度值。微區塊中之每一像素具有一三原色值(RGB value),RGB各別指此像素的紅色、綠色和藍色的值。而像素的亮度值係為把每一像素的三原色值依照公式(0.6G+0.3R+0.1B)轉換成灰階的值。當微區塊中只具有多個像素時,微區塊的亮度值可例如是所有像素的亮度值之平均值。Each microblock has a luminance value. Each pixel in the micro-tile has a RGB value, and RGB each refers to the red, green, and blue values of the pixel. The luminance value of the pixel is a value obtained by converting the three primary color values of each pixel into gray scale according to the formula (0.6G+0.3R+0.1B). When there are only a plurality of pixels in the micro-tile, the luminance value of the micro-block may be, for example, an average of the luminance values of all the pixels.

步驟S40依據人臉區塊210中所有微區塊的亮度值,判斷人臉區塊210中是否具有至少一個過曝區220。過曝區220係指在目標影像200中亮度值過高的區域,可能是因為不當的閃光燈亮度或是太陽光等造成的。而實際上人臉區塊210中的過曝區220可能是人臉額上或鼻頭的油光。詳細的找尋過曝區220的步驟S42至步驟S46請容後詳述。Step S40 determines whether there is at least one over-exposed area 220 in the face block 210 according to the brightness values of all the micro-blocks in the face block 210. The overexposed area 220 refers to an area where the luminance value is too high in the target image 200, possibly due to improper flash brightness or sunlight. In fact, the overexposed area 220 in the face block 210 may be the shine of the face or the nose. Detailed steps S42 to S46 for finding the overexposure zone 220 are described in detail later.

若在人臉區塊210中具有過曝區220,則於步驟S50對曝光區中的各微區塊的亮度值進行補償。除了目標影像200本身已外,被儲存於記憶模組中之預覽對焦影像300亦可以用以補償過曝區220。而使用目標影像200自身或預覽對焦影像300以補償過曝區220的詳細步驟S52至步驟S58請容後詳述。If there is an overexposed region 220 in the face block 210, the luminance values of the respective micro blocks in the exposed region are compensated in step S50. In addition to the target image 200 itself, the preview focus image 300 stored in the memory module can also be used to compensate for the overexposed region 220. The detailed steps S52 to S58 of using the target image 200 itself or previewing the focused image 300 to compensate the overexposed region 220 will be described in detail later.

於步驟S50中被補償完成的目標影像200即於步驟S60中被回存於記憶模組,作為使用者拍攝完人像的結果。而若在人臉區塊210不具有任何一過曝區220,則步驟S70不對目標影像200進行補償而使目標影像200保持原狀。The target image 200 that has been compensated in step S50 is returned to the memory module in step S60 as a result of the user taking the portrait. If the face block 210 does not have any over-exposed area 220, then step S70 does not compensate the target image 200 to keep the target image 200 in its original state.

請參照「第3圖」,其係為根據本發明一實施範例之步驟S40之流程示意圖。以下為在人臉區塊210中判斷使否具有過曝區220之步驟S40的詳細內容步驟S42至步驟S48。Please refer to FIG. 3, which is a schematic flowchart of step S40 according to an embodiment of the present invention. The following is the detailed content step S42 to step S48 of the step S40 of determining whether or not the overexposed area 220 is in the face block 210.

步驟S40依據人臉區塊210中所有微區塊的亮度值,判斷人臉區塊210中是否具有至少一個過曝區220。由「第3圖」可以知悉,步驟S40中可包含步驟S42:將亮度值大於一第一門檻值的微區塊各別記錄為一候選區塊;步驟S44:將單一相連接的候選區塊定義為一相連區塊;步驟S46:判斷在各相連區塊內的候選區塊的數量是否大於一第二門檻值;以及步驟S48:將數量大於第二門檻值的相連區塊定義為過曝區。Step S40 determines whether there is at least one over-exposed area 220 in the face block 210 according to the brightness values of all the micro-blocks in the face block 210. As can be seen from FIG. 3, step S40 may include step S42: recording micro-blocks whose luminance values are greater than a first threshold as each candidate block; and step S44: selecting a single-connected candidate block. Defined as a connected block; Step S46: determining whether the number of candidate blocks in each connected block is greater than a second threshold; and step S48: defining a connected block having a quantity greater than the second threshold as overexposed Area.

於步驟S42中,人臉區塊210的每一個微區塊的亮度值被逐一確認,當搜尋到亮度值超過第一門檻值得微區塊時,這個微區塊被紀錄為候選區塊。而當微區塊的亮度值超過第一門檻值時即表示這個微區塊可能因閃光燈或直射的太陽光而過度曝光。因此,即將此微區塊記錄成候選區塊。被紀錄為候選區塊之微區塊於人臉區塊210中的相對位置(即微區塊之相對或絕對座標位置)亦被紀錄下來,用以進行後續的判斷。In step S42, the luminance values of each microblock of the face block 210 are confirmed one by one, and when the search for the luminance value exceeds the first threshold value microblock, the microblock is recorded as a candidate block. When the brightness value of the micro-block exceeds the first threshold, it means that the micro-block may be overexposed due to flash or direct sunlight. Therefore, this micro-tile is recorded as a candidate block. The relative positions of the micro-tiles recorded as candidate blocks in the face block 210 (i.e., the relative or absolute coordinate positions of the micro-tiles) are also recorded for subsequent determination.

確認完人臉區塊210中所有微區塊的亮度值之後,於步驟S44中,先依照候選區塊在人臉區塊210中的位置判斷是否有複數個候選區塊呈單一相連狀態。請參照「第4A圖」至「第4C圖」,其係為用來說明「單一相連」之意涵。人臉影像210的具有微區塊205a,205b...,且複數個微區塊205被紀錄為候選區塊206a,206b...。當複數個候選區塊206a,206b等彼此相鄰時,這些相鄰的候選區塊206被視為單一相連。單一相連的複數個候選區塊206a,206b等可互相為左右相鄰,如「第4A圖」;或左右相鄰,如「第4B圖」;亦可為斜對角相鄰,如「第4C圖」。依候選區塊206相對位置搜尋出有複數個候選區塊206a,206b單一相連時,將這些單一相連的候選區塊作為相連區塊207。After confirming the luminance values of all the micro-blocks in the face block 210, in step S44, it is first determined whether there are a plurality of candidate blocks in a single connected state according to the position of the candidate block in the face block 210. Please refer to "4A" to "4C" for the purpose of stating "single connection". The face image 210 has micro-blocks 205a, 205b..., and a plurality of micro-blocks 205 are recorded as candidate blocks 206a, 206b.... When a plurality of candidate blocks 206a, 206b, etc. are adjacent to each other, these adjacent candidate blocks 206 are treated as a single connection. The plurality of candidate blocks 206a, 206b, etc. that are connected to each other may be adjacent to each other, such as "4A"; or adjacent to each other, such as "4B"; or diagonally adjacent, such as " 4C map". When a plurality of candidate blocks 206a are searched for relative positions of the candidate blocks 206, 206b are connected as a single block, and the single connected candidate blocks are used as the connected block 207.

請參照「第5圖」,其係為根據本發明一實施範例之相連區塊示意圖。由「第5圖」可以見悉,候選區塊206a以及候選區塊206b均無與其他候選區塊206單一相連,故不被視為相連區塊207。而相連區塊207a、207b以及207c則由複數個候選區塊207相連而成。Please refer to FIG. 5, which is a schematic diagram of a connected block according to an embodiment of the present invention. It can be seen from "Fig. 5" that neither the candidate block 206a nor the candidate block 206b are directly connected to the other candidate blocks 206, and therefore are not regarded as the connected block 207. The connected blocks 207a, 207b, and 207c are connected by a plurality of candidate blocks 207.

接著於步驟S46,計算每一相連區塊所具有的候選區塊206的數量。當某一相連區塊所具有的候選區塊206的數量大於第二門檻值時,便以這個相連區塊作為過曝區220。第二門檻值例如可介於人臉區塊所具有的微區塊205的數量的3%~15%。這是因為一般人臉上會形成過度曝光的額頭或鼻頭等油光區域,所佔整體人臉的比例約為3%~15%。當相連區塊所具有的候選區塊206的數量小於第二門檻值時,表示相連區塊可能是人臉上例如耳環或眼鏡框的反光,若其所佔的面積不大,並不需要進行補償。Next, in step S46, the number of candidate blocks 206 that each connected block has is calculated. When a certain connected block has a number of candidate blocks 206 greater than the second threshold, the connected block is used as the overexposed area 220. The second threshold may be, for example, between 3% and 15% of the number of micro-blocks 205 that the face block has. This is because the face of the general person will form an over-exposure area such as the forehead or nose, which accounts for about 3% to 15% of the total face. When the number of candidate blocks 206 in the connected block is less than the second threshold value, it indicates that the connected block may be a reflection on a human face such as an earring or an eyeglass frame, and if the occupied area is not large, it does not need to be performed. make up.

以「第5圖」舉例而言,當第二門檻值被設為3時,相連區塊207a所具有的微區塊205數量為2,故不被設為過曝區220。而相連區塊207b與相連區塊207c所具有的微區塊205數量分別為5與9,故皆被設為過曝區220。For example, in the case of "figure 5", when the second threshold value is set to 3, the number of micro-blocks 205 of the connected block 207a is 2, so it is not set as the over-exposed area 220. The number of micro-blocks 205 of the connected block 207b and the connected block 207c are 5 and 9, respectively, and are all set to the over-exposed area 220.

綜上所述,於步驟S40中,首先計算人臉區塊210中每一微區塊205的亮度值,若亮度值高於第一門檻值則將其設為候選區塊206。接著尋找單一相連的候選區塊206作為相連區塊,並將夠大的相連區塊207作為過曝區220,以排除較小的單一相連區塊207。In summary, in step S40, the luminance value of each microblock 205 in the face block 210 is first calculated, and if the luminance value is higher than the first threshold, it is set as the candidate block 206. Next, a single connected candidate block 206 is sought as the connected block, and a large connected block 207 is used as the overexposed area 220 to exclude the smaller single connected block 207.

請參照「第6圖」,其係為根據本發明一實施範例之步驟S50之流程示意圖。以下為在使用目標影像200或預覽對焦影像300補償過曝區之步驟S50的詳細內容步驟S52至步驟S58。Please refer to FIG. 6 , which is a schematic flowchart of step S50 according to an embodiment of the present invention. The following is the detailed content step S52 to step S58 of the step S50 of compensating the overexposure zone using the target image 200 or the preview focus image 300.

由「第6圖」中可以知悉,步驟S50可包含步驟S52:定義一鄰近區、一過曝參考區及一鄰近參考區;步驟S54:判斷過曝參考區是否過曝;步驟S56:依據過曝參考區、鄰近參考區與鄰近區補償過曝區;以及步驟S58:依據鄰近區補償過曝區。As can be seen from FIG. 6, step S50 may include step S52: defining a neighboring area, an overexposed reference area, and a neighboring reference area; step S54: determining whether the overexposed reference area is overexposed; step S56: Exposing the overexposed area, the adjacent reference area and the adjacent area to compensate the overexposed area; and step S58: compensating the overexposed area according to the adjacent area.

於步驟S52,於目標影像200與預覽對焦影像300中定義鄰近區230、過曝參考區320及鄰近參考區330。請再同時參照「第2圖」。鄰近區230係指由鄰近過曝區220的複數個微區塊205所組合成的區域。其可為環繞整個過曝區220的區域,亦可為前述環繞區域的一部分,或僅在過曝區220的左右兩側。In step S52, the adjacent area 230, the overexposed reference area 320, and the adjacent reference area 330 are defined in the target image 200 and the preview focused image 300. Please refer to "Figure 2" at the same time. The neighboring zone 230 refers to a zone that is composed of a plurality of micro-blocks 205 adjacent to the over-exposed zone 220. It may be an area surrounding the entire overexposed area 220, a part of the aforementioned surrounding area, or only on the left and right sides of the overexposed area 220.

過曝參考區320則為在預覽對焦影像300中,與目標影像200之過曝區220相對應的區域。更詳細的說,當目標影像200與預覽對焦影像300具有相同的解析度時,過曝參考區320在預覽對焦影像300中的座標與過曝區220在目標影像200中的座標相同。由於人臉區塊210在目標影像200中所在的位置,以及過曝區220中每一微區塊205在人臉區塊210的相對位置都有被紀錄下來,故可在預覽對焦影像300中依上述紀錄的位置標定過曝參考區320。The overexposure reference area 320 is an area corresponding to the overexposed area 220 of the target image 200 in the preview focus image 300. In more detail, when the target image 200 has the same resolution as the preview focus image 300, the coordinates of the overexposed reference region 320 in the preview focus image 300 are the same as the coordinates of the overexposed region 220 in the target image 200. Since the location of the face block 210 in the target image 200 and the relative position of each of the micro-blocks 205 in the over-exposed area 220 in the face block 210 are recorded, it can be in the preview focus image 300. The overexposed reference region 320 is calibrated according to the position recorded above.

而當目標影像200與預覽對焦影像300的解析度不同時,可將上述紀錄的座標位置依目標影像200與預覽對焦影像300之解析度比例調整後標定過曝參考區320。此外,亦可將預覽對焦影像300放大解析度至與目標影像200之後,再依上述紀錄的座標位置標定過曝區220。When the resolution of the target image 200 and the preview focus image 300 are different, the coordinate position of the record may be adjusted according to the resolution ratio of the target image 200 and the preview focus image 300, and then the overexposure reference area 320 may be calibrated. In addition, the preview focus image 300 may be enlarged to the target image 200, and then the over-exposed area 220 may be calibrated according to the recorded coordinate position.

而標定出鄰近區230之後,以標定過曝參考區320的方法於預覽對焦影像300中標定鄰近參考區330。After the neighboring area 230 is calibrated, the neighboring reference area 330 is calibrated in the preview focus image 300 by calibrating the overexposed reference area 320.

接著於步驟S54,依據第一門檻值判斷過曝參考區320中所包含的微區塊205是否過曝。逐一確認過曝參考區320中所包含的微區塊205之亮度值是否超過第一門檻值,若過曝參考區320中並無過曝(無微區塊205之亮度值高於第一門檻值)情形,則進行步驟S56,反之則進行步驟S58。判斷過曝參考區320中所包含的微區塊205是否過曝時,亦可使用與第一門檻值不同之一第三門檻值進行判斷。根據本發明之一實施範例,只要在過曝參考區320中有任何微區塊205過曝,則執行步驟S58。但亦可設定一第四門檻值,當過曝參考區320中有過曝的微區塊205數量大於第四門檻值時執行步驟S58,反之則執行步驟S56。Next, in step S54, it is determined whether the micro-block 205 included in the overexposed reference area 320 is overexposed according to the first threshold value. It is confirmed whether the brightness value of the micro-block 205 included in the over-exposure reference area 320 exceeds the first threshold value one by one, and if there is no over-exposure in the over-exposure reference area 320 (the luminance value of the non-micro-block 205 is higher than the first threshold) In the case of value, step S56 is performed, otherwise, step S58 is performed. When it is determined whether the micro-block 205 included in the over-exposure reference area 320 is overexposed, the third threshold value different from the first threshold value may also be used for determining. According to an embodiment of the present invention, as long as any micro-block 205 is overexposed in the over-exposure reference area 320, step S58 is performed. However, a fourth threshold may be set. When the number of overexposed microblocks 205 in the overexposure reference area 320 is greater than the fourth threshold, step S58 is performed; otherwise, step S56 is performed.

舉例而言,在夜晚或是光線不足的地方拍攝人像時,可能會產生預覽對焦影像300較暗,但因閃光燈過亮而使得目標影像200之人臉過曝的情形。For example, when shooting a portrait at night or in a low-light area, it may result in a situation where the preview focus image 300 is dark, but the face of the target image 200 is overexposed due to the flash being too bright.

當過曝參考區320不具有過曝的微區塊205,或是有過曝的微區塊205但其數量在容許範圍之內時,步驟S56依據標定的過曝參考區320、鄰近參考區330與鄰近區230補償過曝區220。根據本發明之一實施範例,依據過曝參考區320之一亮度參考值與鄰近參考區330之亮度參考值的差,以及鄰近區230的亮度值,補償過曝區220中的微區塊205的亮度值。When the overexposed reference region 320 does not have the overexposed microblock 205, or has the overexposed microblock 205 but the number thereof is within the allowable range, step S56 is based on the calibrated overexposed reference region 320 and the adjacent reference region. 330 and adjacent zone 230 compensate for overexposure zone 220. According to an embodiment of the present invention, the micro-block 205 in the over-exposed area 220 is compensated according to the difference between the brightness reference value of one of the over-exposed reference areas 320 and the brightness reference value of the adjacent reference area 330, and the brightness value of the adjacent area 230. The brightness value.

預覽對焦影像300的每一微區塊205亦具有亮度值,作為亮度參考值。根據本發明之一實施例,數位相機將預覽對焦影像300放大至與目標影像200相同解析度大小後再對過曝區220進行補償。Each micro-block 205 of the preview focus image 300 also has a brightness value as a brightness reference value. According to an embodiment of the present invention, the digital camera compensates the overexposed region 220 by enlarging the preview focused image 300 to the same resolution as the target image 200.

請同時參考「第7A圖」與「第7B圖」,其分別為根據本發明一實施範例之過曝區與鄰近區之示意圖,以及過曝參考區與鄰近參考區之示意圖。首先,數位相機在鄰近參考區330及過曝參考區320的範圍內,計算相鄰的兩微區塊205之亮度參考值的差。如「第7A圖」與「第7B圖」所示,可逐行(column)或逐列(row)地對相鄰的兩微區塊205進行計算。例如可將處理中的某一列作為一處理區240,而在預覽對焦影像300之與處理區240相對應位置上的微區塊205則被設為一處理參考區340。接著在處理參考區340之中,依序計算相鄰之微區塊205的差值。接著再以處理區240中屬於鄰近區230之微區塊205的亮度值為準,並以計算差值時的相同方向逐行或逐列地加上上述的差值,計算出新的亮度值作為補償後的亮度值。Please refer to both FIG. 7A and FIG. 7B, which are schematic diagrams of the overexposed area and the adjacent area according to an embodiment of the present invention, and a schematic diagram of the overexposed reference area and the adjacent reference area. First, the digital camera calculates the difference of the brightness reference values of the adjacent two micro-blocks 205 in the range of the adjacent reference area 330 and the over-exposure reference area 320. As shown in "FIG. 7A" and "FIG. 7B", the adjacent two micro-blocks 205 can be calculated row by column or row by row. For example, a certain column in the process can be used as a processing area 240, and the micro-block 205 at the position corresponding to the processing area 240 of the preview focus image 300 is set as a processing reference area 340. Next, in the processing reference area 340, the difference of the adjacent micro-blocks 205 is sequentially calculated. Then, the brightness value of the micro-block 205 belonging to the adjacent area 230 in the processing area 240 is used, and the difference is calculated row by row or column by column in the same direction when calculating the difference, and a new brightness value is calculated. As the compensated brightness value.

以逐列計算差值,並以「第7A圖」與「第7B圖」中所標示之處理區240為例之補償方式如下。請同時配合參考「第8A圖」、「第8B圖」與「第9圖」,其分別為處理區以及處理參考區之示意圖,以及補償過後的處理區之示意圖。假設預覽對焦影像300中處理區240中各微區塊205的亮度參考值分別為:150、160、164、162、152以及145。而與處理區240對應的處理參考區340之微區塊205的亮度值為:180、240、250、245、185以及175,其中亮度值為240、250與245的三個微區塊205屬於過曝區220。則由左至右依序計算左右相鄰之兩微區塊205之差值,可得到差值為:10、4、-2、-10以及-7。再由左至右對過曝區220之微區塊205進行補償,可得到新的亮度值為180、190、194、192、185以及175。此外,亦可由右往左計算而得到新的亮度值180、193、197、195、185以及175作為補償後的亮度值。The difference is calculated column by column, and the processing method of the processing area 240 indicated in "Fig. 7A" and "Fig. 7B" is taken as an example. Please also refer to "8A", "8B" and "9", which are schematic diagrams of the processing area and the processing reference area, and the schematic diagram of the processing area after compensation. It is assumed that the luminance reference values of the micro-blocks 205 in the processing area 240 in the preview focus image 300 are: 150, 160, 164, 162, 152, and 145, respectively. The luminance values of the micro-blocks 205 of the processing reference area 340 corresponding to the processing area 240 are: 180, 240, 250, 245, 185, and 175, and the three micro-blocks 205 of which the luminance values are 240, 250, and 245 belong to Overexposure zone 220. Then, the difference between the two adjacent micro-blocks 205 is calculated from left to right, and the difference values are: 10, 4, -2, -10, and -7. Further, the micro-blocks 205 of the overexposed region 220 are compensated from left to right, and new luminance values of 180, 190, 194, 192, 185, and 175 are obtained. In addition, new luminance values 180, 193, 197, 195, 185, and 175 can also be calculated from right to left as the compensated luminance values.

如此一來,處理區240中的亮度分佈會與未過度曝光的處理參考區340中的亮度分布相同。也就是說,處理區240之過曝區220與鄰近區230中的亮度值係為將處理參考區340之過曝參考區320與鄰近參考區330中的亮度值向上平移後的結果。以視覺上來說,過曝區220的亮度隨著未過曝的過曝參考區320的亮暗變化被自然地降低,而不顯得突兀。As such, the luminance distribution in the processing region 240 may be the same as the luminance distribution in the processing reference region 340 that is not overexposed. That is, the luminance values in the overexposed regions 220 and the adjacent regions 230 of the processing region 240 are the result of shifting the luminance values in the overexposed reference regions 320 and the adjacent reference regions 330 of the processing reference region 340 upward. Visually, the brightness of the overexposed region 220 is naturally reduced with the light and dark variations of the overexposed overexposed reference region 320 without appearing abrupt.

而當過曝參考區330亦過曝時,則預覽對焦影像300的過曝參考區330並不具有補償過曝區220的參考價值。故於步驟S58中依據目標影像200本身之鄰近區230補償過曝區220。根據本發明之一實施例,而當過曝參考區330亦過曝時,依據鄰近區230的微區塊205的亮度值,以內差法補償過曝區220中的區塊的亮度值。內插法可以逐行或逐列地計算。例如對於過曝區的某一列微區塊205中具有最大的亮度值之微區塊205,將此微區塊205的亮度值設為第一門檻值作為補償後的亮度值。接著以此微區塊205以及這一列上鄰近區230的微區塊205為基準,對這一列上過曝區220的所有其他的微區塊205以內插法進行補償。When the overexposed reference area 330 is also overexposed, the overexposed reference area 330 of the preview focus image 300 does not have the reference value of the compensated overexposure area 220. Therefore, in the step S58, the overexposed area 220 is compensated according to the adjacent area 230 of the target image 200 itself. According to an embodiment of the present invention, when the overexposed reference region 330 is also overexposed, the luminance value of the block in the overexposed region 220 is compensated by the internal difference method according to the luminance value of the microblock 205 of the adjacent region 230. Interpolation can be calculated line by line or column by column. For example, for the micro-block 205 having the largest luminance value in a certain column of the micro-block 205 of the over-exposed area, the luminance value of the micro-block 205 is set as the first threshold value as the compensated luminance value. Then, based on the micro-block 205 and the micro-block 205 of the adjacent area 230 on the column, all other micro-blocks 205 of the over-exposed area 220 in this column are compensated by interpolation.

以內插補償過曝區220中某一列的亮度值之處理方法舉例如下。如「第8A圖」與「第8B圖」,假設目標影像200的處理區240之微區塊205的亮度值為:180、240、250、245、185以及175,其中亮度值為240、250與245的三個微區塊205屬於過曝區220,且第一門檻值為240。則最亮的微區塊205(原始的亮度值為250)之亮度值被設為240,並配合兩側之鄰近區230的微區塊205(亮度值為180與185),對過曝區220其他的微區塊205(原始的亮度值分別為240與245)進行內插。如此一來可以得到補償過的亮度值為:180、210、240、212、185以及175。An example of a method of interpolating the brightness value of a column in the overexposure zone 220 is as follows. For example, "8A" and "8B", it is assumed that the luminance values of the micro-block 205 of the processing area 240 of the target image 200 are: 180, 240, 250, 245, 185, and 175, wherein the luminance values are 240, 250. The three micro-tiles 205 with 245 belong to the over-exposed zone 220 and have a first threshold of 240. Then, the brightness value of the brightest micro-block 205 (original brightness value is 250) is set to 240, and the micro-block 205 of the adjacent area 230 on both sides (the brightness values are 180 and 185) is used for the over-exposed area. 220 other micro-blocks 205 (original luminance values of 240 and 245, respectively) are interpolated. As a result, the compensated brightness values are: 180, 210, 240, 212, 185, and 175.

如此一來,過曝區220之微區塊205的亮度值能藉由相鄰之鄰近區230之微區塊205的亮度值獲得修補。且藉由內插法,過曝區220的亮度能夠被平滑的修正,而不會顯的突兀。As such, the luminance value of the micro-block 205 of the over-exposed region 220 can be repaired by the luminance value of the micro-block 205 of the adjacent adjacent region 230. And by interpolation, the brightness of the overexposure zone 220 can be smoothly corrected without significant abrupt changes.

根據本發明之具有人臉影像的處理方法,藉由目標影像之人臉區塊之微區塊的亮度判斷人臉區塊中是否有至少一個過曝區。若人臉區塊具有過曝區,則藉由鄰近區、過曝參考區以及鄰近參考區對過曝區的亮度值進行修補。由於數位相機參考未曝光的預覽對焦影像之亮度分布,或使用內插法對過曝區進行修補,故可自動自然地修補影像中人臉的過度曝光部分,令使用者輕鬆地得到好看的照片。According to the method for processing a face image of the present invention, it is determined whether there is at least one over-exposed area in the face block by the brightness of the micro-block of the face block of the target image. If the face block has an overexposed area, the brightness value of the overexposed area is repaired by the adjacent area, the overexposed reference area, and the adjacent reference area. Since the digital camera refers to the brightness distribution of the unexposed preview focus image, or uses the interpolation method to repair the over-exposed area, the over-exposed portion of the face in the image can be automatically and naturally repaired, so that the user can easily obtain a good-looking photo. .

雖然本發明以前述之較佳實施例揭露如上,然其並非用以限定本發明,任何熟習相像技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之專利保護範圍須視本說明書所附之申請專利範圍所界定者為準。While the present invention has been described above in terms of the preferred embodiments thereof, it is not intended to limit the invention, and the invention may be modified and modified without departing from the spirit and scope of the invention. The patent protection scope of the invention is subject to the definition of the scope of the patent application attached to the specification.

200‧‧‧目標影像200‧‧‧ Target image

205‧‧‧微區塊205‧‧‧Microblocks

206‧‧‧候選區塊206‧‧‧candidate blocks

207‧‧‧相連區塊207‧‧‧Connected blocks

210‧‧‧人臉區塊210‧‧‧Face block

220‧‧‧過曝區220‧‧‧Overexposure zone

230‧‧‧鄰近區230‧‧‧Neighborhood

240‧‧‧處理區240‧‧‧Processing area

300‧‧‧預覽對焦影像300‧‧‧ Preview focus image

320‧‧‧過曝參考區320‧‧‧Overexposure reference area

330‧‧‧鄰近參考區330‧‧‧near reference area

340‧‧‧處理參考區340‧‧‧Processing reference area

第1圖係為根據本發明一實施範例之主流程示意圖;第2A圖係為根據本發明一實施範例之預覽對焦影像示意圖;第2B圖係為與第2A圖對應之目標影像示意圖;第3圖係為根據本發明一實施範例之步驟S40之流程示意圖;第4A圖係為根據本發明一實施範例之第一單一相連示意圖;第4B圖係為根據本發明一實施範例之第二單一相連示意圖;第4C圖係為根據本發明一實施範例之第三單一相連示意圖;第5圖係為根據本發明一實施範例之相連區塊示意圖;第6圖係為根據本發明一實施範例之步驟S50之流程示意圖;第7A圖係為根據本發明一實施範例之過曝區與鄰近區之示意圖;第7B圖係為根據本發明一實施範例之過曝參考區與鄰近參考區之示意圖;第8A圖係為第7A圖之處理區之示意圖;第8B圖係為第7B圖之處理參考區之示意圖;以及第9圖係為根據本發明一實施範例之補償過後的處理區之示意圖。1 is a schematic diagram of a main flow according to an embodiment of the present invention; FIG. 2A is a schematic diagram of a preview focus image according to an embodiment of the present invention; FIG. 2B is a schematic diagram of a target image corresponding to FIG. 2A; The figure is a schematic flow chart of step S40 according to an embodiment of the present invention; FIG. 4A is a first single connected schematic diagram according to an embodiment of the present invention; FIG. 4B is a second single connected according to an embodiment of the present invention; 4C is a third single connected schematic diagram according to an embodiment of the present invention; FIG. 5 is a schematic diagram of a connected block according to an embodiment of the present invention; and FIG. 6 is a schematic diagram of an embodiment according to an embodiment of the present invention; FIG. 7A is a schematic diagram of an overexposed area and an adjacent area according to an embodiment of the present invention; FIG. 7B is a schematic diagram of an overexposed reference area and a neighboring reference area according to an embodiment of the present invention; 8A is a schematic diagram of a processing area of FIG. 7A; FIG. 8B is a schematic diagram of a processing reference area of FIG. 7B; and FIG. 9 is a compensation according to an embodiment of the present invention. A schematic view of the treatment zone.

Claims (5)

一種具有人臉之影像的處理方法,適用於一數位相機,該處理方法包括:擷取一預覽對焦影像並儲存;擷取一目標影像並儲存,該目標影像中包含一人臉區塊,該人臉區塊具有複數個微區塊,且每一該微區塊具有一亮度值;判斷該人臉區塊中是否具有至少一過曝區;若是,則依據該預覽對焦影像及該目標影像對該過曝區進行補償,其中依據該預覽對焦影像及該目標影像對該過曝區進行補償的步驟包括:定義一鄰近區、一過曝參考區及一鄰近參考區,該鄰近區係位於該過曝區周圍一預定範圍內之區域,該過曝參考區係位於該預覽對焦影像並與該目標影像之該過曝區對應,該鄰近參考區係位於該預覽對焦影像並與該目標影像之該鄰近區對應;判斷該過曝參考區是否過曝;若否,依據該過曝參考區、該鄰近參考區與該鄰近區補償該過曝區;及若是,依據該鄰近區補償該過曝區;以及儲存被補償的該目標影像。 A processing method for a face image, which is applicable to a digital camera, the processing method includes: capturing a preview focus image and storing; capturing a target image and storing the target image, the target image includes a face block, the person The face block has a plurality of micro-blocks, and each of the micro-blocks has a brightness value; determining whether the face block has at least one over-exposure area; if so, according to the preview focus image and the target image pair The over-exposed area is compensated, wherein the step of compensating the over-exposed area according to the preview focus image and the target image comprises: defining a neighboring area, an over-exposure reference area, and a neighboring reference area, where the neighboring area is located An overexposed reference area is located in the preview focus image and corresponds to the overexposed area of the target image, and the adjacent reference area is located in the preview focus image and the target image Corresponding to the adjacent area; determining whether the overexposed reference area is overexposed; if not, compensating the overexposed area according to the overexposed reference area, the adjacent reference area and the adjacent area; and if so, based on Compensation region adjacent to the region overexposure; and storing the object image is compensated. 如請求項1所述之具有人臉之影像的處理方法,其中判斷該人臉區塊中是否具有至少一該過曝區的步驟包括: 逐一判斷該人臉區塊中的各該微區塊的該亮度值是否大於一第一門檻值,並將該亮度值大於該第一門檻值的該些微區塊各別記錄為一候選區塊;將單一相連接的該些候選區塊定義為一相連區塊;以及判斷在各該相連區塊內的該候選區塊的數量是否大於一第二門檻值,並將該數量大於該第二門檻值的該相連區塊定義為該過曝區。 The method for processing an image of a face according to claim 1, wherein the step of determining whether the face block has at least one overexposed area comprises: Determining, by one by one, whether the brightness value of each of the micro-blocks in the face block is greater than a first threshold, and recording the micro-blocks whose brightness value is greater than the first threshold as each candidate block Determining, by the single phase, the candidate blocks as a connected block; and determining whether the number of the candidate blocks in each of the connected blocks is greater than a second threshold, and the number is greater than the second The connected block of the threshold value is defined as the overexposed area. 如請求項1所述之具有人臉之影像的處理方法,其中依據該過曝參考區、該鄰近參考區與該鄰近區補償該過曝區的步驟包括:依據該過曝參考區之一亮度參考值與該鄰近參考區之該亮度參考值的差異,以及該鄰近區的該亮度值,補償該過曝區中的該些微區塊的該亮度值。 The method for processing an image of a face according to claim 1, wherein the step of compensating the overexposure region according to the overexposure reference region, the adjacent reference region, and the neighboring region comprises: according to brightness of one of the overexposed reference regions The difference between the reference value and the brightness reference value of the neighboring reference area, and the brightness value of the neighboring area, compensates for the brightness value of the micro-blocks in the over-exposed area. 如請求項1所述之具有人臉之影像的處理方法,其中依據該鄰近區補償該過曝區的步驟包括:依據該鄰近區的該些微區塊的該亮度值,以內差法補償該過曝區中的該微區塊的該亮度值。 The method for processing an image of a human face according to claim 1, wherein the step of compensating the overexposed area according to the neighboring area comprises: compensating the over-exposed method according to the brightness value of the micro-blocks of the adjacent area The brightness value of the micro-block in the exposure zone. 如請求項1所述之具有人臉之影像的處理方法,當在該人臉區塊不具有至少一該過曝區時,不對該目標影像進行補償。The method for processing a face image according to claim 1, wherein when the face block does not have at least one overexposed area, the target image is not compensated.
TW098128309A 2009-08-21 2009-08-21 A method of handling a face image TWI466064B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW098128309A TWI466064B (en) 2009-08-21 2009-08-21 A method of handling a face image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW098128309A TWI466064B (en) 2009-08-21 2009-08-21 A method of handling a face image

Publications (2)

Publication Number Publication Date
TW201108155A TW201108155A (en) 2011-03-01
TWI466064B true TWI466064B (en) 2014-12-21

Family

ID=44835549

Family Applications (1)

Application Number Title Priority Date Filing Date
TW098128309A TWI466064B (en) 2009-08-21 2009-08-21 A method of handling a face image

Country Status (1)

Country Link
TW (1) TWI466064B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI698129B (en) * 2019-03-08 2020-07-01 瑞昱半導體股份有限公司 Image processing method and electronic device thereof

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8754977B2 (en) * 2011-07-28 2014-06-17 Hewlett-Packard Development Company, L.P. Second camera for finding focal target in poorly exposed region of frame taken by first camera
TWI469089B (en) * 2012-08-08 2015-01-11 Pixart Imaging Inc Image determining method and object coordinate computing apparatus
CN103634589B (en) * 2012-08-22 2016-08-03 原相科技股份有限公司 Image judgment method and object coordinates calculate device
CN111726596B (en) * 2019-03-18 2021-09-14 瑞昱半导体股份有限公司 Image processing method and electronic device thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200910925A (en) * 2007-08-20 2009-03-01 Holtek Semiconductor Inc Method for determining image condition and controlling exposure thereof
TW200930042A (en) * 2007-12-26 2009-07-01 Altek Corp Method for capturing image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200910925A (en) * 2007-08-20 2009-03-01 Holtek Semiconductor Inc Method for determining image condition and controlling exposure thereof
TW200930042A (en) * 2007-12-26 2009-07-01 Altek Corp Method for capturing image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI698129B (en) * 2019-03-08 2020-07-01 瑞昱半導體股份有限公司 Image processing method and electronic device thereof
US10970822B2 (en) 2019-03-08 2021-04-06 Realtek Semiconductor Corp. Image processing method and electronic device thereof

Also Published As

Publication number Publication date
TW201108155A (en) 2011-03-01

Similar Documents

Publication Publication Date Title
JP6675194B2 (en) Imaging device, control method therefor, program, and storage medium
CN102006421A (en) Processing method for image with face
JP4210021B2 (en) Image signal processing apparatus and image signal processing method
JP5347707B2 (en) Imaging apparatus and imaging method
JP2007259237A (en) Apparatus and method for photographing
JP2017022610A (en) Image processing apparatus and image processing method
TWI466064B (en) A method of handling a face image
JP6744711B2 (en) Imaging device, control method thereof, program, and storage medium
JP5223686B2 (en) Imaging apparatus and imaging method
JP4999871B2 (en) Imaging apparatus and control method thereof
JP6741881B2 (en) Image processing device, imaging device, image processing method, and program
JP5277863B2 (en) Imaging apparatus and imaging method
JP5970871B2 (en) Electronic camera
JP5948997B2 (en) Imaging apparatus and imaging method
JP5310331B2 (en) Imaging apparatus and imaging method
JP2004245923A (en) Automatic exposure bracketing photographing method
JP2014230121A (en) Imaging apparatus and pixel defect detection method
JP2006319901A (en) Electronic camera and image processing program
JP2018181070A (en) Image processing device and image processing method
JP2022083147A (en) Imaging apparatus, imaging method, program, and recording medium
JP2011135379A (en) Imaging apparatus, imaging method and program
JP2006295774A (en) Imaging apparatus, control method thereof, and image processing program for digital camera
JP2015118274A (en) Imaging device, imaging device control method, and program
JP7387411B2 (en) Image processing device, image processing method, and imaging device
JP2010172013A (en) Electronic camera, and image processing program

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees