TWI729338B - Skin detection method and image processing device - Google Patents

Skin detection method and image processing device Download PDF

Info

Publication number
TWI729338B
TWI729338B TW107147382A TW107147382A TWI729338B TW I729338 B TWI729338 B TW I729338B TW 107147382 A TW107147382 A TW 107147382A TW 107147382 A TW107147382 A TW 107147382A TW I729338 B TWI729338 B TW I729338B
Authority
TW
Taiwan
Prior art keywords
detection
image
channel
skin
score
Prior art date
Application number
TW107147382A
Other languages
Chinese (zh)
Other versions
TW202022682A (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 中光電智能雲服股份有限公司
Publication of TW202022682A publication Critical patent/TW202022682A/en
Application granted granted Critical
Publication of TWI729338B publication Critical patent/TWI729338B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Abstract

The disclosure provides a skin detection method and an image processing device. The method includes: retrieving a human face image; retrieving a mask according to a detection item and defining a detection region in the human face image based on the mask; transforming the human face image into channel images; finding out a skin feature corresponding to in the detection region of each channel image; calculating a reference score corresponding to the skin feature of the detection item in each channel image; calculating a detection score of the human face image at the detection item according to the skin feature of the detection item; calculating a calibrated score corresponding to the detection item according to historical detection scores and the detection score.

Description

皮膚檢測方法及影像處理裝置Skin detection method and image processing device

本發明是有關於一種檢測方法及其裝置,且特別是有關於一種皮膚檢測方法及影像處理裝置。The present invention relates to a detection method and device, and more particularly to a skin detection method and image processing device.

近年來,隨著人們生活水準的提高,人們的保健意識和對於美感的追求不斷提高。因此,護膚和保健已經成為一個日益興盛的行業。同時,消費者和業界對於皮膚各項特性、參數(例如白皙度、水分、彈性等)的檢測裝置有了更多的需求。In recent years, with the improvement of people's living standards, people's awareness of health care and the pursuit of beauty continue to increase. Therefore, skin care and health care have become an increasingly prosperous industry. At the same time, consumers and the industry have more demand for detection devices for various skin characteristics and parameters (such as whiteness, moisture, elasticity, etc.).

基於這樣的需求,近年來市場上已經出現一些皮膚檢測儀器,但其多半具有價格昂貴、體積龐大及難以操作等缺點,因此較難以普及。以全臉肌膚影像分析儀為例,其可使用不同的照明模式對臉部影像進行檢測,但由於價格昂貴、體積龐大及難以操作,因此一般使用者多半不會考慮購置。此外,目前亦有利用不同皮膚電阻抗參數進行含水量換算的儀器,但其僅能進行局部偵測,無法對整體臉部特徵進行分析。並且,此儀器所能進行的檢測項目亦較受限,難以擴充。另外,市面上亦存在一種膚質斷層掃描儀,其可透過光線掃描的方式,以即時呈現皮膚組織的斷層結構影像。然而,此膚質斷層掃描儀僅能進行局部偵測,無法對整體臉部特徵進行分析。Based on this demand, some skin testing instruments have appeared on the market in recent years, but most of them have disadvantages such as expensive, bulky, and difficult to operate, so they are difficult to popularize. Take the full-face skin image analyzer as an example. It can use different illumination modes to detect facial images. However, due to its high price, bulkiness and difficulty in operation, most users will not consider purchasing it. In addition, there are also instruments that use different skin electrical impedance parameters for water content conversion, but they can only perform partial detection and cannot analyze the overall facial features. In addition, the test items that this instrument can perform are also limited and difficult to expand. In addition, there is also a skin tomography scanner on the market, which can scan through light to present the tomographic structure of the skin tissue in real time. However, this skin tomography can only perform partial detection and cannot analyze the overall facial features.

“先前技術”段落只是用來幫助了解本發明內容,因此在“先前技術”段落所揭露的內容可能包含一些沒有構成所屬技術領域中具有通常知識者所知道的習知技術。在“先前技術”段落所揭露的內容,不代表所述內容或者本發明一個或多個實施例所要解決的問題,在本發明申請前已被所屬技術領域中具有通常知識者所知曉或認知。The "prior art" paragraph is only used to help understand the content of the present invention, so the contents disclosed in the "prior art" paragraph may include some conventional technologies that do not constitute the common knowledge in the technical field. The content disclosed in the "prior art" paragraph does not represent the content or the problem to be solved by one or more embodiments of the present invention, and has been known or recognized by persons with ordinary knowledge in the technical field before the application of the present invention.

有鑑於此,本發明提供一種皮膚檢測方法及影像處理裝置,其可用以解決上述技術問題。In view of this, the present invention provides a skin detection method and image processing device, which can be used to solve the above technical problems.

本發明提供一種皮膚檢測方法,包括:取得一人臉影像;依據一第一檢測項目取得一第一遮罩,並基於第一遮罩在人臉影像中定義一檢測區域;將人臉影像轉換為多個通道影像;在各通道影像的檢測區域中找出對應於第一檢測項目的一皮膚特徵;計算各通道影像的檢測區域中第一檢測項目的皮膚特徵對應的一參考分數;依據第一檢測項目的皮膚特徵對應的參考分數計算人臉影像在第一檢測項目的一檢測分數;依據多個歷史檢測分數及檢測分數計算對應於第一檢測項目的一第一校正後分數。The present invention provides a skin detection method, including: obtaining a face image; obtaining a first mask according to a first detection item, and defining a detection area in the face image based on the first mask; and converting the face image into Multiple channel images; find a skin feature corresponding to the first detection item in the detection area of each channel image; calculate a reference score corresponding to the skin feature of the first detection item in the detection area of each channel image; according to the first The reference score corresponding to the skin feature of the detection item calculates a detection score of the face image in the first detection item; and a first corrected score corresponding to the first detection item is calculated according to the multiple historical detection scores and the detection scores.

在本發明的一實施例中,上述的取得人臉影像的步驟包括取得一影像,並對影像執行一人臉辨識操作,以在影像中找出該人臉影像。In an embodiment of the present invention, the aforementioned step of obtaining a face image includes obtaining an image and performing a face recognition operation on the image to find the face image in the image.

在本發明的一實施例中,上述的將人臉影像轉換為通道影像的步驟包括:依據第一檢測項目決定一前處理機制及一色彩轉換機制;使用色彩轉換機制將人臉影像轉換為多個色彩通道影像;以及使用前處理機制將色彩通道影像轉換為通道影像。In an embodiment of the present invention, the above-mentioned step of converting a face image into a channel image includes: determining a pre-processing mechanism and a color conversion mechanism according to the first detection item; and using the color conversion mechanism to convert the face image into multiple images. A color channel image; and using a pre-processing mechanism to convert the color channel image into a channel image.

在本發明的一實施例中,上述的皮膚特徵包括一皺紋,且計算各通道影像中第一檢測項目的皮膚特徵對應的參考分數的步驟包括:對於通道影像中的一第一通道影像而言,計算皺紋在檢測區域中的一皺紋面積;計算皺紋面積在檢測區域的面積中所佔的一比例;以及將比例定義為第一通道影像的參考分數。In an embodiment of the present invention, the aforementioned skin feature includes a wrinkle, and the step of calculating the reference score corresponding to the skin feature of the first detection item in each channel image includes: for a first channel image in the channel image , Calculate a wrinkle area of wrinkles in the detection area; calculate a proportion of the wrinkle area in the area of the detection area; and define the ratio as the reference score of the first channel image.

在本發明的一實施例中,上述的皮膚特徵包括一非平滑皮膚,且計算各通道影像中第一檢測項目的皮膚特徵對應的參考分數的步驟包括:對於通道影像中的一第一通道影像而言,計算非平滑皮膚在檢測區域中的一非平滑面積;計算非平滑面積在檢測區域的面積中所佔的一比例;以及將比例定義為第一通道影像的該參考分數。In an embodiment of the present invention, the aforementioned skin feature includes a non-smooth skin, and the step of calculating the reference score corresponding to the skin feature of the first detection item in each channel image includes: for a first channel image in the channel image In other words, calculating a non-smooth area of the non-smooth skin in the detection area; calculating a ratio of the non-smooth area in the area of the detection area; and defining the ratio as the reference score of the first channel image.

在本發明的一實施例中,上述的各通道影像更包括一參考區域,皮膚特徵包括一皮膚油光,且計算各通道影像中該第一檢測項目的皮膚特徵對應的參考分數的步驟包括:對於通道影像中的一第一通道影像而言,計算皮膚油光在檢測區域中的一第一亮度以及皮膚油光在參考區域中的一第二亮度;以第一亮度減去第二亮度以產生一差值;以及將差值定義為第一通道影像的參考分數。In an embodiment of the present invention, each of the above-mentioned channel images further includes a reference area, the skin feature includes a shiny skin, and the step of calculating the reference score corresponding to the skin feature of the first detection item in each channel image includes: For a first channel image in the channel image, calculate a first brightness of the skin oily light in the detection area and a second brightness of the skin oily light in the reference area; subtract the second brightness from the first brightness to generate a difference Value; and the difference is defined as the reference score of the first channel image.

在本發明的一實施例中,上述的皮膚特徵包括一膚色,且計算各通道影像中第一檢測項目的皮膚特徵對應的參考分數的步驟包括:對於通道影像中的一第一通道影像而言,計算膚色在檢測區域中的一膚色標準差,其中檢測區域不包括人臉影像中的五官;以及將膚色標準差定義為第一通道影像的參考分數。In an embodiment of the present invention, the aforementioned skin feature includes a skin color, and the step of calculating the reference score corresponding to the skin feature of the first detection item in each channel image includes: for a first channel image in the channel image Calculate a skin color standard deviation of the skin color in the detection area, where the detection area does not include the facial features in the face image; and define the skin color standard deviation as the reference score of the first channel image.

在本發明的一實施例中,上述的各通道影像更包括一參考區域,皮膚特徵包括一黑眼圈,且計算各通道影像中第一檢測項目的皮膚特徵對應的參考分數的步驟包括:對於通道影像中的一第一通道影像而言,計算黑眼圈在檢測區域中的一第一亮度以及參考區域的一第二亮度;以第二亮度減去第一亮度以產生一差值;以及將差值定義為第一通道影像的參考分數。In an embodiment of the present invention, each channel image described above further includes a reference area, the skin feature includes a dark circle, and the step of calculating the reference score corresponding to the skin feature of the first detection item in each channel image includes: For a first channel image in the image, calculate a first brightness of the dark circles in the detection area and a second brightness of the reference area; subtract the first brightness from the second brightness to generate a difference; and The value is defined as the reference score of the first channel image.

在本發明的一實施例中,上述的通道影像包括第一通道影像、第二通道影像及第三通道影像,且依據第一檢測項目的皮膚特徵對應的參考分數計算人臉影像在第一檢測項目的檢測分數的步驟包括:將第一通道影像的參考分數乘以一第一權重以產生一第一數值;將第二通道影像的參考分數乘以一第二權重以產生一第二數值;將第三通道影像的參考分數乘以一第三權重以產生一第三數值;以及將第一數值、第二數值及第三數值加總為檢測分數。In an embodiment of the present invention, the above-mentioned channel image includes a first channel image, a second channel image, and a third channel image, and the face image is calculated according to the reference score corresponding to the skin feature of the first detection item. The step of detecting the score of the item includes: multiplying the reference score of the first channel image by a first weight to generate a first value; and multiplying the reference score of the second channel image by a second weight to generate a second value; The reference score of the third channel image is multiplied by a third weight to generate a third value; and the first value, the second value, and the third value are added to form the detection score.

在本發明的一實施例中,上述的當皮膚特徵為一黑眼圈或一非平滑皮膚時,第一通道影像為一Y通道影像、第二通道影像為一Cr通道影像,第三通道影像為一Cb通道影像,且第一權重、第二權重及第三權重依序遞減。In an embodiment of the present invention, when the aforementioned skin feature is a dark circle or a non-smooth skin, the first channel image is a Y channel image, the second channel image is a Cr channel image, and the third channel image is A Cb channel image, and the first weight, the second weight, and the third weight are sequentially decreased.

在本發明的一實施例中,上述的當皮膚特徵為一皺紋或一斑點時,第一通道影像為一R通道影像、第二通道影像為一G通道影像,第三通道影像為一B通道影像,且第一權重、第二權重及第三權重皆為1。In an embodiment of the present invention, when the skin feature is a wrinkle or a spot, the first channel image is an R channel image, the second channel image is a G channel image, and the third channel image is a B channel image. Image, and the first weight, second weight, and third weight are all 1.

在本發明的一實施例中,上述依據歷史檢測分數及檢測分數計算第一校正後分數的步驟包括:計算歷史檢測分數的一平均值及一標準差;將檢測分數輸入至一激勵函數以產生第一校正後分數,其中激勵函數為:

Figure 02_image001
,其中SC為第一校正後分數,RC為檢測分數,m為平均值,σ為標準差。In an embodiment of the present invention, the step of calculating the first corrected score based on the historical detection score and the detection score includes: calculating an average value and a standard deviation of the historical detection score; and inputting the detection score into an excitation function to generate The first corrected score, where the activation function is:
Figure 02_image001
, Where SC is the first corrected score, RC is the detection score, m is the average, and σ is the standard deviation.

在本發明的一實施例中,上述的方法,更包括: 基於人臉影像產生對應於一第二檢測項目的一第二校正後分數;將第一校正後分數乘以一第一特定權重以產生一第一特定數值;將第二校正後分數乘以一第二特定權重以產生一第二特定數值;以及將第一特定數值及第二特定數值加總為一綜合性皮膚檢測分數。In an embodiment of the present invention, the above method further includes: generating a second corrected score corresponding to a second detection item based on the face image; multiplying the first corrected score by a first specific weight to Generate a first specific value; multiply the second corrected score by a second specific weight to generate a second specific value; and add the first specific value and the second specific value to a comprehensive skin detection score.

本發明提供一種影像處理裝置,包括影像擷取電路、儲存電路及處理器。儲存電路儲存多個模組。處理器耦接影像擷取電路及儲存電路,存取該些模組以執行下列步驟:取得一人臉影像;依據一第一檢測項目取得一第一遮罩,並基於第一遮罩在人臉影像中定義一檢測區域;將人臉影像轉換為多個通道影像;在各通道影像的檢測區域中找出對應於第一檢測項目的一皮膚特徵;計算各通道影像的檢測區域中第一檢測項目的皮膚特徵對應的一參考分數;依據第一檢測項目的皮膚特徵對應的參考分數計算人臉影像在第一檢測項目的一檢測分數;以及依據多個歷史檢測分數及檢測分數計算對應於第一檢測項目的一第一校正後分數。The invention provides an image processing device, which includes an image capture circuit, a storage circuit and a processor. The storage circuit stores multiple modules. The processor is coupled to the image capture circuit and the storage circuit, and accesses the modules to perform the following steps: obtain a face image; obtain a first mask based on a first detection item, and based on the first mask on the face Define a detection area in the image; convert the face image into multiple channel images; find a skin feature corresponding to the first detection item in the detection area of each channel image; calculate the first detection in the detection area of each channel image A reference score corresponding to the skin feature of the item; calculating a detection score of the face image in the first detection item based on the reference score corresponding to the skin feature of the first detection item; and calculating a detection score corresponding to the first detection item based on multiple historical detection scores and detection scores A first corrected score of a test item.

在本發明的一實施例中,上述的處理器經配置以:取得一影像,並對影像執行一人臉辨識操作,以在影像中找出人臉影像。In an embodiment of the present invention, the aforementioned processor is configured to obtain an image and perform a face recognition operation on the image to find a face image in the image.

在本發明的一實施例中,上述的處理器經配置以:依據第一檢測項目決定一前處理機制及一色彩轉換機制;使用色彩轉換機制將人臉影像轉換為多個色彩通道影像;以及使用前處理機制將色彩通道影像轉換為通道影像。In an embodiment of the present invention, the aforementioned processor is configured to: determine a pre-processing mechanism and a color conversion mechanism according to the first detection item; use the color conversion mechanism to convert the face image into multiple color channel images; and Use the pre-processing mechanism to convert the color channel image to the channel image.

在本發明的一實施例中,上述的皮膚特徵包括一皺紋,且處理器經配置以:對於通道影像中的一第一通道影像而言,計算皺紋在檢測區域中的一皺紋面積;計算皺紋面積在檢測區域的面積中所佔的一比例;以及將比例定義為第一通道影像的參考分數。In an embodiment of the present invention, the aforementioned skin feature includes a wrinkle, and the processor is configured to: for a first channel image in the channel image, calculate a wrinkle area of the wrinkle in the detection area; and calculate the wrinkle The ratio of the area in the area of the detection area; and the ratio is defined as the reference score of the first channel image.

在本發明的一實施例中,上述的皮膚特徵包括一非平滑皮膚,且處理器經配置以:對於通道影像中的一第一通道影像而言,計算非平滑皮膚在檢測區域中的一非平滑面積;計算非平滑面積在檢測區域的面積中所佔的一比例;以及將比例定義為第一通道影像的參考分數。In an embodiment of the present invention, the aforementioned skin feature includes a non-smooth skin, and the processor is configured to: for a first channel image in the channel image, calculate a non-smooth skin in the detection area. Smooth area; calculate the proportion of the non-smooth area in the area of the detection area; and define the proportion as the reference score of the first channel image.

在本發明的一實施例中,上述的各通道影像更包括一參考區域,皮膚特徵包括一皮膚油光,且處理器經配置以:對於通道影像中的一第一通道影像而言,計算皮膚油光在檢測區域中的一第一亮度以及皮膚油光在該參考區域中的一第二亮度;以第一亮度減去第二亮度以產生一差值;以及將差值定義為第一通道影像的該參考分數。In an embodiment of the present invention, each channel image described above further includes a reference area, the skin feature includes a skin shine, and the processor is configured to: for a first channel image in the channel image, calculate the skin shine A first brightness in the detection area and a second brightness in the reference area of the skin oily light; subtracting the second brightness from the first brightness to generate a difference; and defining the difference as the first channel image Reference score.

在本發明的一實施例中,上述的皮膚特徵包括一膚色,且處理器經配置以:對於通道影像中的一第一通道影像而言,計算膚色在檢測區域中的一膚色標準差,其中檢測區域不包括人臉影像中的五官;以及將膚色標準差定義為第一通道影像的參考分數。In an embodiment of the present invention, the aforementioned skin feature includes a skin color, and the processor is configured to: for a first channel image in the channel image, calculate a skin color standard deviation of the skin color in the detection area, wherein The detection area does not include the facial features in the face image; and the skin color standard deviation is defined as the reference score of the first channel image.

在本發明的一實施例中,上述的各通道影像更包括一參考區域,皮膚特徵包括一黑眼圈,且處理器經配置以:對於通道影像中的一第一通道影像而言,計算黑眼圈在檢測區域中的一第一亮度以及參考區域的一第二亮度;以第二亮度減去第一亮度以產生一差值;以及將差值定義為第一通道影像的參考分數。In an embodiment of the present invention, each of the aforementioned channel images further includes a reference area, the skin feature includes a dark circle, and the processor is configured to: for a first channel image in the channel image, calculate the dark circle A first brightness in the detection area and a second brightness in the reference area; the first brightness is subtracted from the second brightness to generate a difference; and the difference is defined as the reference score of the first channel image.

在本發明的一實施例中,上述的通道影像包括第一通道影像、第二通道影像及第三通道影像,且處理器經配置以:將第一通道影像的參考分數乘以一第一權重以產生一第一數值;將第二通道影像的參考分數乘以一第二權重以產生一第二數值;將第三通道影像的參考分數乘以一第三權重以產生一第三數值;將第一數值、第二數值及第三數值加總為檢測分數。In an embodiment of the present invention, the aforementioned channel image includes a first channel image, a second channel image, and a third channel image, and the processor is configured to: multiply the reference score of the first channel image by a first weight To generate a first value; multiply the reference score of the second channel image by a second weight to generate a second value; multiply the reference score of the third channel image by a third weight to generate a third value; The sum of the first value, the second value, and the third value is the detection score.

在本發明的一實施例中,上述的當皮膚特徵為一黑眼圈或一非平滑皮膚時,第一通道影像為一Y通道影像、第二通道影像為一Cr通道影像,第三通道影像為一Cb通道影像,且第一權重、第二權重及第三權重依序遞減。In an embodiment of the present invention, when the aforementioned skin feature is a dark circle or a non-smooth skin, the first channel image is a Y channel image, the second channel image is a Cr channel image, and the third channel image is A Cb channel image, and the first weight, the second weight, and the third weight are sequentially decreased.

在本發明的一實施例中,上述的當皮膚特徵為一皺紋或一斑點時,第一通道影像為一R通道影像、第二通道影像為一G通道影像,第三通道影像為一B通道影像,且第一權重、第二權重及第三權重皆為1。In an embodiment of the present invention, when the skin feature is a wrinkle or a spot, the first channel image is an R channel image, the second channel image is a G channel image, and the third channel image is a B channel image. Image, and the first weight, second weight, and third weight are all 1.

在本發明的一實施例中,上述的處理器經配置以:計算歷史檢測分數的一平均值及一標準差;將檢測分數輸入至一激勵函數以產生第一校正後分數,其中激勵函數為:

Figure 02_image001
,其中SC為第一校正後分數,RC為檢測分數,m為平均值,σ為標準差。In an embodiment of the present invention, the above-mentioned processor is configured to: calculate an average value and a standard deviation of historical detection scores; and input the detection scores into an excitation function to generate a first corrected score, where the excitation function is :
Figure 02_image001
, Where SC is the first corrected score, RC is the detection score, m is the average, and σ is the standard deviation.

在本發明的一實施例中,上述的處理器更經配置以:基於人臉影像產生對應於一第二檢測項目的一第二校正後分數;將第一校正後分數乘以一第一特定權重以產生一第一特定數值;將第二校正後分數乘以一第二特定權重以產生一第二特定數值;以及將第一特定數值及該第二特定數值加總為一綜合性皮膚檢測分數。In an embodiment of the present invention, the above-mentioned processor is further configured to: generate a second corrected score corresponding to a second detection item based on the face image; multiply the first corrected score by a first specific Weighting to generate a first specific value; multiplying the second corrected score by a second specific weight to generate a second specific value; and summing the first specific value and the second specific value into a comprehensive skin test fraction.

基於上述,本發明提出的皮膚檢測方法及影像處理裝置僅需基於單一張人臉影像即可依需求而同時針對不同的檢測項目進行皮膚檢測。藉此,可提供一種簡單且省時的皮膚檢測機制。Based on the above, the skin detection method and image processing device proposed by the present invention only need to be based on a single face image to perform skin detection for different detection items at the same time as required. In this way, a simple and time-saving skin detection mechanism can be provided.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the accompanying drawings.

概略而言,本發明提出的影像處理裝置及皮膚檢測方法可在取得人臉影像後,基於所考慮的一或多個檢測項目在人臉影像中定義出不同的檢測區域。之後,可在檢測區域中找出對應於檢測項目的皮膚特徵,並據以決定上述人臉影像在所考慮的檢測項目中的檢測分數。接著,本發明還可透過一定的機制將檢測分數校正為更為客觀且精準的校正後分數。藉此,可在不需使用特定檢測儀器的情況下,僅透過影像處理的方式以較低成本的方式簡易地完成皮膚檢測。以下將作詳細說明。In summary, the image processing device and skin detection method proposed by the present invention can define different detection areas in the face image based on the considered one or more detection items after obtaining the face image. Afterwards, the skin feature corresponding to the detection item can be found in the detection area, and the detection score of the aforementioned face image in the considered detection item can be determined accordingly. Then, the present invention can also correct the detection score to a more objective and accurate corrected score through a certain mechanism. In this way, it is possible to easily complete skin detection at a lower cost through image processing without using a specific detection instrument. The detailed description will be given below.

請參照圖1,其是依據本發明之一實施例繪示的影像處理裝置示意圖。在本實施例中,影像處理裝置100可以是伺服器、手機、智慧型手機、個人電腦(personal computer,PC)、筆記型電腦(notebook PC)、網本型電腦(netbook PC)、平板電腦(tablet PC),或是任何具有影像擷取功能的電子裝置。於其他實施例中,影像處理裝置100可以為專門用以檢測皮膚的電子裝置,但可不限於此。Please refer to FIG. 1, which is a schematic diagram of an image processing device according to an embodiment of the present invention. In this embodiment, the image processing device 100 may be a server, a mobile phone, a smart phone, a personal computer (PC), a notebook PC, a netbook PC, a tablet computer ( tablet PC), or any electronic device with image capture function. In other embodiments, the image processing device 100 may be an electronic device dedicated to detecting skin, but it is not limited to this.

如圖1所示,影像處理裝置100包括影像擷取電路102、儲存電路104及處理器106。影像擷取電路102可以是任何具有電荷耦合元件(Charge coupled device,CCD)鏡頭、互補式金氧半電晶體(Complementary metal oxide semiconductor transistors,CMOS)鏡頭,或紅外線鏡頭的攝影機,亦可以是可取得深度資訊的影像擷取設備,例如是深度攝影機(depth camera)或立體攝影機,只要所使用的影像擷取設備可擷取影像並可從中獲得人體影像者,即不脫離本發明實施例的範疇。As shown in FIG. 1, the image processing device 100 includes an image capture circuit 102, a storage circuit 104 and a processor 106. The image capture circuit 102 can be any camera with a charge coupled device (CCD) lens, a complementary metal oxide semiconductor transistors (CMOS) lens, or an infrared lens, or it can be available The image capturing device of depth information, such as a depth camera or a stereo camera, does not depart from the scope of the embodiments of the present invention as long as the image capturing device used can capture images and obtain human images from them.

儲存電路104例如是任意型式的固定式或可移動式隨機存取記憶體(Random Access Memory,RAM)、唯讀記憶體(Read-Only Memory,ROM)、快閃記憶體(Flash memory)、硬碟或其他類似裝置或這些裝置的組合,而可用以記錄多個程式碼或模組。The storage circuit 104 is, for example, any type of fixed or removable random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), flash memory (Flash memory), hard disk Disk or other similar devices or a combination of these devices can be used to record multiple codes or modules.

處理器106耦接於影像擷取電路102及儲存電路104,並可為一般用途處理器、特殊用途處理器、傳統的處理器、數位訊號處理器、多個微處理器(microprocessor)、一個或多個結合數位訊號處理器核心的微處理器、控制器、微控制器、特殊應用集成電路(Application Specific Integrated Circuit,ASIC)、場可程式閘陣列電路(Field Programmable Gate Array,FPGA)、任何其他種類的積體電路、狀態機、基於進階精簡指令集機器(Advanced RISC Machine,ARM)的處理器以及類似品。The processor 106 is coupled to the image capture circuit 102 and the storage circuit 104, and can be a general purpose processor, a special purpose processor, a traditional processor, a digital signal processor, multiple microprocessors, one or Multiple microprocessors, controllers, microcontrollers, Application Specific Integrated Circuits (ASIC), Field Programmable Gate Array (FPGA), any other integrated digital signal processor cores Types of integrated circuits, state machines, processors based on Advanced RISC Machine (ARM) and similar products.

在本發明的實施例中,處理器106可載入儲存電路104中所記錄的程式碼或模組以執行本發明提出的皮膚檢測方法,以下將作進一步說明。In the embodiment of the present invention, the processor 106 can load the program code or module recorded in the storage circuit 104 to execute the skin detection method proposed by the present invention, which will be further described below.

請參照圖2,其是依據本發明之一實施例繪示的皮膚檢測方法流程圖。本實施例的方法可由圖1的影像處理裝置100執行,以下即搭配圖1所示的元件來說明圖2各步驟的細節。Please refer to FIG. 2, which is a flowchart of a skin detection method according to an embodiment of the present invention. The method of this embodiment can be executed by the image processing device 100 in FIG. 1. The details of each step in FIG. 2 are described below in conjunction with the components shown in FIG. 1.

首先,在步驟S210中,處理器106可控制影像擷取電路102取得一人臉影像。在本實施例中,處理器106可控制影像擷取電路102對一使用者取得一影像,並對此影像執行一人臉辨識操作,以在此影像中找出人臉影像。First, in step S210, the processor 106 can control the image capturing circuit 102 to obtain a face image. In this embodiment, the processor 106 can control the image capturing circuit 102 to obtain an image for a user, and perform a face recognition operation on the image to find the face image in the image.

請參照圖3,其是依據本發明之一實施例繪示的取得人臉影像的示意圖。如圖1及圖3所示,在本實施例中,影像擷取電路102可受控於處理器106而拍攝影像310,而影像310例如包括待進行皮膚檢測的使用者的人臉影像,且例如是包括完整的人臉影像。接著,處理器106可對影像310執行人臉辨識操作,以在影像310找出人臉影像320。在一實施例中,處理器106可透過人臉辨識操作而在影像310中找出位於人臉上的多個特徵點320a,並透過這些特徵點320a定義出對應於人臉影像320的辨識區域,例如辨識出人臉影像中額頭、眼角、臉頰、下巴、鼻子、嘴唇等區域。因此,即便影像310中的人臉處於上下顛倒的狀態,處理器106仍可基於特徵點320a而找出人臉影像320。Please refer to FIG. 3, which is a schematic diagram of obtaining a face image according to an embodiment of the present invention. As shown in FIGS. 1 and 3, in this embodiment, the image capturing circuit 102 can be controlled by the processor 106 to capture an image 310, and the image 310 includes, for example, a face image of a user whose skin is to be detected. For example, it includes a complete face image. Then, the processor 106 may perform a face recognition operation on the image 310 to find the face image 320 in the image 310. In one embodiment, the processor 106 can find a plurality of feature points 320a on the face in the image 310 through a face recognition operation, and define the recognition area corresponding to the face image 320 through these feature points 320a , Such as identifying areas such as the forehead, corners of the eyes, cheeks, chin, nose, lips, etc. in the face image. Therefore, even if the face in the image 310 is upside down, the processor 106 can still find the face image 320 based on the feature points 320a.

請再參照圖2,在步驟S220中,處理器106可依據第一檢測項目取得第一遮罩,並基於第一遮罩在人臉影像中定義檢測區域。在不同的實施例中,上述第一檢測項目可以是皺紋、皮膚平滑度、皮膚油光、膚色均勻度、黑眼圈、斑點等檢測項目的其中之一,但可不限於此。在一實施例中,影像處理裝置100可透過使用者界面(未繪示)將上述檢測項目提供予使用者參考。相應地,使用者可透過上述使用者界面來選擇所需的檢測項目(例如,皺紋)作為上述第一檢測項目。2 again, in step S220, the processor 106 may obtain a first mask according to the first detection item, and define a detection area in the face image based on the first mask. In different embodiments, the above-mentioned first detection item may be one of the detection items such as wrinkles, skin smoothness, skin shine, skin color uniformity, dark circles, spots, etc., but may not be limited thereto. In one embodiment, the image processing device 100 can provide the above-mentioned detection items for the user's reference through a user interface (not shown). Correspondingly, the user can select a desired detection item (for example, wrinkles) as the first detection item through the aforementioned user interface.

在不同的實施例中,由於不同的檢測項目在人臉影像中會對應到不同的檢測區域,因此處理器106可透過不同的遮罩而在人臉影像中定義出所需的檢測區域,以下將搭配圖4作進一步說明。In different embodiments, because different detection items correspond to different detection areas in the face image, the processor 106 can define the required detection area in the face image through different masks, as follows: It will be further explained in conjunction with Figure 4.

請參照圖4,其是依據本發明之一實施例繪示的基於不同檢測項目的遮罩定義檢測區域的示意圖。在本實施例中,假設遮罩411、412、413、414、415分別對應於皺紋、皮膚平滑度、皮膚油光、膚色均勻度、黑眼圈等檢測項目。Please refer to FIG. 4, which is a schematic diagram illustrating the detection area defined based on the masks of different detection items according to an embodiment of the present invention. In this embodiment, it is assumed that the masks 411, 412, 413, 414, and 415 correspond to detection items such as wrinkles, skin smoothness, skin oiliness, skin color uniformity, dark circles, etc., respectively.

如圖4所示,若檢測項目為皺紋,則其所對應的檢測區域411a例如是人臉影像400中的額頭。在此情況下,處理器106針對檢測項目(皺紋)所選用的遮罩411可將人臉影像400中的額頭以外之處悉數遮蔽,僅留下額頭的部分作為檢測區域411a。若檢測項目為皮膚平滑度,則其所對應的檢測區域412a例如是人臉影像400中的雙頰。在此情況下,處理器106針對檢測項目(皮膚平滑度)所選用的遮罩412可將人臉影像400中的雙頰以外之處悉數遮蔽,僅留下雙頰的部分作為檢測區域412a。若檢測項目為皮膚油光,則其所對應的檢測區域413a例如是人臉影像400中的額頭、雙頰、鼻部及下巴。在此情況下,處理器106針對檢測項目(皮膚油光)所選用的遮罩413可將人臉影像400中的雙頰以外之處悉數遮蔽,以定義出檢測區域413a。基於以上教示,應可相應推得處理器106基於遮罩414及415分別定義檢測區域414a及415a的機制,於此不另贅述。As shown in FIG. 4, if the detection item is wrinkles, the corresponding detection area 411a is, for example, the forehead in the face image 400. In this case, the mask 411 selected by the processor 106 for the detection item (wrinkle) can cover all areas other than the forehead in the face image 400, leaving only the forehead as the detection area 411a. If the detection item is skin smoothness, the corresponding detection area 412 a is, for example, the cheeks in the face image 400. In this case, the mask 412 selected by the processor 106 for the detection item (skin smoothness) can cover all the areas other than the cheeks in the face image 400, leaving only the cheeks as the detection area 412a. If the detection item is shiny skin, the corresponding detection area 413a is, for example, the forehead, cheeks, nose, and chin in the face image 400. In this case, the mask 413 selected by the processor 106 for the detection item (skin shiny) can mask all the areas other than the cheeks in the face image 400 to define the detection area 413a. Based on the above teachings, it should be possible to deduce the mechanism by which the processor 106 defines the detection areas 414a and 415a based on the masks 414 and 415, respectively, which will not be repeated here.

在其他實施例中,各個檢測項目在人臉影像中對應的檢測區域可依設計者的需求而自行調整,並不限於圖4所示態樣。In other embodiments, the detection area corresponding to each detection item in the face image can be adjusted according to the needs of the designer, and is not limited to the aspect shown in FIG. 4.

請參照圖5,其是依據本發明之一實施繪示的將遮罩與人臉影像結合以定義檢測區域的示意圖。如圖1、圖4及圖5所示,在本實施例中,假設所考慮的第一檢測項目為膚色均勻度,則處理器106針對檢測項目(膚色均勻度)可據以找出對應的第一遮罩510,並將第一遮罩510與人臉影像結合,以產生檢測區域影像520。如圖5所示,第一遮罩510可用以遮蔽人臉影像中的五官(例如眼、耳、鼻、口等部位),使得檢測區域影像520中僅留下雙頰、鼻部、下巴等部位作為檢測區域520a,但其僅用以舉例,並非用以限定本發明可能的實施方式。Please refer to FIG. 5, which is a schematic diagram illustrating the combination of a mask and a face image to define a detection area according to an implementation of the present invention. As shown in FIGS. 1, 4, and 5, in this embodiment, assuming that the first detection item considered is skin color uniformity, the processor 106 can find the corresponding detection item (skin color uniformity) accordingly. The first mask 510 is combined with the face image to generate the detection area image 520. As shown in FIG. 5, the first mask 510 can be used to cover the facial features (such as eyes, ears, nose, mouth, etc.) in the face image, so that only cheeks, nose, chin, etc. are left in the detection area image 520 The part is used as the detection area 520a, but it is only used as an example and is not used to limit the possible implementation of the present invention.

請再參照圖2,在步驟S230中,處理器106可將人臉影像轉換為多個通道影像。在一實施例中,處理器106可依據所選定的第一檢測項目決定前處理機制及色彩轉換機制。所述前處理機制例如包括邊緣加強化、模糊化、灰階、雜訊過濾、邊緣處理、區域像素加權等影像處理手段,而所述色彩轉換機制例如是RGB轉換或YCrCb轉換,但可不限於此。之後,處理器106可使用上述色彩轉換機制將人臉影像轉換為多個色彩通道影像,並使用上述前處理機制將前述色彩通道影像轉換為多個通道影像。Please refer to FIG. 2 again. In step S230, the processor 106 may convert the face image into multiple channel images. In one embodiment, the processor 106 may determine the pre-processing mechanism and the color conversion mechanism according to the selected first detection item. The pre-processing mechanism includes, for example, image processing methods such as edge enhancement, blurring, grayscale, noise filtering, edge processing, and area pixel weighting, and the color conversion mechanism is, for example, RGB conversion or YCrCb conversion, but may not be limited thereto. . After that, the processor 106 can use the aforementioned color conversion mechanism to convert the face image into multiple color channel images, and use the aforementioned pre-processing mechanism to convert the aforementioned color channel image into multiple channel images.

舉例而言,假設所考慮的第一檢測項目為皮膚平滑度或黑眼圈,則其對應的色彩轉換機制例如是YCrCb轉換。基此,處理器106可將人臉影像轉換為Y色彩通道影像、Cr色彩通道影像及Cb色彩通道影像等多個色彩通道影像,並可再基於所需的前處理機制將這些色彩通道影像轉換為前述通道影像,但本發明可不限於此。For example, assuming that the first detection item considered is skin smoothness or dark circles, the corresponding color conversion mechanism is, for example, YCrCb conversion. Based on this, the processor 106 can convert the face image into multiple color channel images such as Y color channel image, Cr color channel image, and Cb color channel image, and can then convert these color channel images based on the required pre-processing mechanism. It is the aforementioned channel image, but the present invention is not limited to this.

舉另一例而言,假設所考慮的第一檢測項目為膚色均勻度或皺紋,則其對應的色彩轉換機制例如是RGB轉換。基此,處理器106可將人臉影像轉換為R色彩通道影像、G色彩通道影像及B色彩通道影像等多個色彩通道影像,並可再基於所需的前處理機制將這些色彩通道影像轉換為前述通道影像,但本發明可不限於此。For another example, assuming that the first detection item considered is skin color uniformity or wrinkles, the corresponding color conversion mechanism is, for example, RGB conversion. Based on this, the processor 106 can convert the face image into multiple color channel images such as R color channel image, G color channel image, and B color channel image, and can then convert these color channel images based on the required pre-processing mechanism. It is the aforementioned channel image, but the present invention is not limited to this.

舉再一例而言,假設所考慮的第一檢測項目為斑點或皮膚油光,則處理器106可分別採用邊緣加強化及模糊化作為對應於前述二者的前處理機制,但本發明可不限於此。For another example, assuming that the first detection item considered is spots or skin shiny, the processor 106 can use edge enhancement and blurring as the pre-processing mechanisms corresponding to the two, but the present invention is not limited to this. .

請再參照圖2,在經由步驟S230得到多個通道影像之後,在步驟S240中,處理器106在各通道影像的檢測區域中找出對應於第一檢測項目的皮膚特徵。接著,在步驟S250中,處理器106計算各通道影像的檢測區域中第一檢測項目的皮膚特徵對應的參考分數。為便於說明,以下將假設處理器106所得到的多個通道影像包括第一通道影像、第二通道影像及第三通道影像,但本發明可不限於此。因應於所採用的色彩轉換機制,第一、第二及第三通道影像可分別為R通道影像、G通道影像及B通道影像,或是分別為Y通道影像、Cr通道影像及Cb通道影像,但可不限於此。並且,由於處理器106已在人臉影像中定義出檢測區域,因此處理器106亦可相應地在第一、第二及第三通道中定義出檢測區域。基此,處理器106可在第一、第二及第三通道影像所定義出的檢測區域中分別找出對應於第一檢測項目的皮膚特徵,並據以計算第一、第二及第三通道影像個別的參考分數。相關細節說明如下。2 again, after obtaining multiple channel images through step S230, in step S240, the processor 106 finds the skin feature corresponding to the first detection item in the detection area of each channel image. Next, in step S250, the processor 106 calculates the reference score corresponding to the skin feature of the first detection item in the detection area of each channel image. For ease of description, it will be assumed below that the multiple channel images obtained by the processor 106 include a first channel image, a second channel image, and a third channel image, but the present invention may not be limited to this. Depending on the color conversion mechanism used, the first, second, and third channel images can be R channel images, G channel images, and B channel images, respectively, or Y channel images, Cr channel images, and Cb channel images, respectively. But it is not limited to this. Moreover, since the processor 106 has defined the detection area in the face image, the processor 106 can also define the detection area in the first, second, and third channels accordingly. Based on this, the processor 106 can respectively find the skin features corresponding to the first detection item in the detection areas defined by the first, second, and third channel images, and calculate the first, second, and third features accordingly. Individual reference scores for channel images. The relevant details are as follows.

在不同的實施例中,上述皮膚特徵將隨著所選定的第一檢測項目而不同,而計算參考分數的方式亦有所不同。In different embodiments, the above-mentioned skin characteristics will be different with the selected first detection item, and the way of calculating the reference score will also be different.

在第一實施例中,若所選定的第一檢測項目為皺紋,則處理器106在各通道影像的檢測區域中找出的皮膚特徵即可為皺紋。在此情況下,處理器106例如可透過邊緣偵測的方式在各通道影像中找出多個邊緣,並將其中邊緣強度值高於一預設邊緣強度閾值的一或多者定義為皺紋。In the first embodiment, if the selected first detection item is wrinkles, the skin features found by the processor 106 in the detection regions of each channel image can be wrinkles. In this case, the processor 106 can, for example, find multiple edges in each channel image through edge detection, and define one or more of the edge intensity values higher than a predetermined edge intensity threshold as wrinkles.

對於第一通道影像(例如R通道影像)而言,處理器106可計算皺紋在第一通道影像的檢測區域中的皺紋面積,並計算皺紋面積在第一通道影像的檢測區域的面積中所佔的比例。之後,處理器106可將此比例定義為第一通道影像的參考分數。For the first channel image (for example, the R channel image), the processor 106 may calculate the wrinkle area of the wrinkle in the detection area of the first channel image, and calculate the wrinkle area in the area of the detection area of the first channel image proportion. After that, the processor 106 can define this ratio as the reference score of the first channel image.

對於第二通道影像(例如G通道影像)而言,處理器106可計算皺紋在第二通道影像的檢測區域中的皺紋面積,並計算皺紋面積在第二通道影像的檢測區域的面積中所佔的比例。之後,處理器106可將此比例定義為第二通道影像的參考分數。For the second channel image (eg, G channel image), the processor 106 may calculate the wrinkle area of the wrinkle in the detection area of the second channel image, and calculate the wrinkle area in the area of the detection area of the second channel image proportion. Afterwards, the processor 106 can define this ratio as the reference score of the second channel image.

對於第三通道影像(例如B通道影像)而言,處理器106可計算皺紋在第三通道影像的檢測區域中的皺紋面積,並計算皺紋面積在第三通道影像的檢測區域的面積中所佔的比例。之後,處理器106可將此比例定義為第三通道影像的參考分數。For the third channel image (for example, the B channel image), the processor 106 may calculate the wrinkle area in the detection area of the third channel image, and calculate the wrinkle area in the area of the detection area of the third channel image proportion. Afterwards, the processor 106 may define this ratio as the reference score of the third channel image.

在第二實施例中,若所選定的第一檢測項目為斑點,則處理器106在各通道影像的檢測區域中找出的皮膚特徵即可為斑點。在此情況下,處理器106例如可對各通道影像進行二進制大物件(binary large object,BLOB)偵測。在一實施例中,為提升執行BLOB偵測的效能,處理器106可採用銳利化作為將各色彩通道影像轉換為通道影像的前處理機制,但可不限於此。在對各通道影像進行BLOB偵測以在各通道影像中找出BLOB之後,處理器106可進一步基於BLOB的面積、顏色及圓形變形指數等特性將不屬於斑點的皮膚區域濾除。藉此,處理器106即可在各通道影像的檢測區域中找出斑點。In the second embodiment, if the selected first detection item is a spot, the skin feature found by the processor 106 in the detection area of each channel image can be a spot. In this case, the processor 106 may perform binary large object (BLOB) detection on each channel image, for example. In one embodiment, in order to improve the performance of performing BLOB detection, the processor 106 may use sharpening as a pre-processing mechanism for converting each color channel image into a channel image, but it is not limited to this. After performing BLOB detection on each channel image to find the BLOB in each channel image, the processor 106 may further filter out skin areas that are not blobs based on the area, color, and circular deformation index of the BLOB. In this way, the processor 106 can find spots in the detection area of each channel image.

對於第一通道影像(例如R通道影像)而言,處理器106可計算斑點在第一通道影像的檢測區域中的斑點面積,並計算斑點面積在第一通道影像的檢測區域的面積中所佔的比例。之後,處理器106可將此比例定義為第一通道影像的參考分數。第二通道影像(例如G通道影像)及第三通道影像(例如B通道影像)個別的參考分數的計算方式類似於第一通道影像的參考分數的計算方式,於此不另贅述。For the first channel image (for example, the R channel image), the processor 106 may calculate the spot area of the spot in the detection area of the first channel image, and calculate the area of the spot in the detection area of the first channel image proportion. After that, the processor 106 can define this ratio as the reference score of the first channel image. The calculation method of the individual reference scores of the second channel image (such as the G channel image) and the third channel image (such as the B channel image) is similar to the calculation method of the reference score of the first channel image, and will not be repeated here.

在第三實施例中,若所選定的第一檢測項目為皮膚平滑度,則處理器106在檢測區域中找出的皮膚特徵即可為非平滑皮膚。在此情況下,處理器106例如可透過邊緣偵測的方式在各通道影像的檢測區域中找出多個邊緣,藉以量化檢測區域內的皮膚平滑程度。以下搭配圖6作進一步說明。In the third embodiment, if the selected first detection item is skin smoothness, the skin feature found in the detection area by the processor 106 may be non-smooth skin. In this case, the processor 106 can find multiple edges in the detection area of each channel image by way of edge detection, so as to quantify the smoothness of the skin in the detection area. The following is a further description with Figure 6.

請參照圖6,其是依據本發明第三實施例繪示的在通道影像中找出皮膚特徵的示意圖。在本實施例中,假設所考慮的第一檢測項目為皮膚平滑度,且其對應的前處理機制及色彩轉換機制分別例如是雜訊過濾及YCrCb轉換。在此情況下,在處理器106取得人臉影像(未繪示)之後,處理器106可先基於YCrCb轉換將此人臉影像轉換為多個色彩通道影像(即,Y色彩通道影像、Cr色彩通道影像及Cb色彩通道影像),而其中的Y色彩通道影像例如是圖6中的色彩通道影像610。Please refer to FIG. 6, which is a schematic diagram of finding skin features in a channel image according to a third embodiment of the present invention. In this embodiment, it is assumed that the first detection item considered is skin smoothness, and the corresponding pre-processing mechanism and color conversion mechanism are, for example, noise filtering and YCrCb conversion, respectively. In this case, after the processor 106 obtains a face image (not shown), the processor 106 may first convert the face image into multiple color channel images (ie, Y color channel image, Cr color channel image, etc.) based on YCrCb conversion. Channel image and Cb color channel image), and the Y color channel image is, for example, the color channel image 610 in FIG. 6.

在圖6中,處理器106可基於對應於皮膚平滑度(第一檢測項目)的遮罩找出檢測區域610a,並對其進行雜訊過濾,以產生通道影像620。之後,處理器106例如可透過邊緣偵測的方式在通道影像620的檢測區域610a中找出多個邊緣,藉以量化檢測區域610a內的皮膚平滑程度。之後,處理器106例如可將邊緣強度較高的邊緣定義為非平滑皮膚,但本發明可不限於此。In FIG. 6, the processor 106 can find the detection area 610 a based on the mask corresponding to the skin smoothness (the first detection item), and perform noise filtering on it to generate the channel image 620. After that, the processor 106 can find multiple edges in the detection area 610a of the channel image 620 through edge detection, so as to quantify the smoothness of the skin in the detection area 610a. After that, the processor 106 may define an edge with a higher edge strength as a non-smooth skin, but the present invention may not be limited to this.

之後,對於第一通道影像(例如Y通道影像)而言,處理器106可計算非平滑皮膚在第一通道影像的檢測區域中的非平滑面積,並計算非平滑面積在第一通道影像的檢測區域的面積中所佔的一比例。接著,處理器106可將此比例定義為第一通道影像的參考分數。第二通道影像(例如Cr通道影像)及第三通道影像(例如Cb通道影像)個別的參考分數的計算方式類似於第一通道影像的參考分數的計算方式,於此不另贅述。After that, for the first channel image (for example, the Y channel image), the processor 106 may calculate the non-smooth area of the non-smooth skin in the detection area of the first channel image, and calculate the detection of the non-smooth area in the first channel image. A proportion of the area of a region. Then, the processor 106 can define this ratio as the reference score of the first channel image. The calculation method of the reference scores of the second channel image (such as the Cr channel image) and the third channel image (such as the Cb channel image) is similar to the calculation method of the reference score of the first channel image, and will not be repeated here.

在第四實施例中,若所選定的第一檢測項目為皮膚油光,則處理器106在檢測區域中找出的皮膚特徵即可為皮膚油光。對於第一通道影像而言,處理器106可計算皮膚油光(第一檢測項目)在第一通道影像的檢測區域中的第一亮度,以及皮膚油光在參考區域中的第二亮度。在本實施例中,前述參考區域例如是全臉區域,但可不限於此。之後,處理器106以第一亮度減去第二亮度以產生一差值,並將此差值定義為第一通道影像的該參考分數。第二通道影像及第三通道影像個別的參考分數的計算方式類似於第一通道影像的參考分數的計算方式,於此不另贅述。In the fourth embodiment, if the selected first detection item is shiny skin, the skin feature found by the processor 106 in the detection area can be shiny skin. For the first channel image, the processor 106 may calculate the first brightness of the skin oily light (the first detection item) in the detection area of the first channel image, and the second brightness of the skin oily light in the reference area. In this embodiment, the aforementioned reference area is, for example, a full face area, but it may not be limited to this. After that, the processor 106 subtracts the second brightness from the first brightness to generate a difference value, and defines the difference value as the reference score of the first channel image. The calculation method of the reference score of the second channel image and the third channel image is similar to the calculation method of the reference score of the first channel image, and will not be described here.

在第五實施例中,若所選定的第一檢測項目為膚色均勻度,則處理器106在檢測區域中找出的皮膚特徵即可為膚色。對於第一通道影像(例如R通道影像)而言,處理器106可計算膚色(第一檢測項目)在檢測區域中的膚色標準差,並以此膚色標準差作為第一通道影像的參考分數。第二通道影像(例如G通道影像)及第三通道影像(例如B通道影像)個別的參考分數的計算方式類似於第一通道影像的參考分數的計算方式,於此不另贅述。In the fifth embodiment, if the selected first detection item is skin color uniformity, the skin feature found by the processor 106 in the detection area can be skin color. For the first channel image (for example, the R channel image), the processor 106 may calculate the skin color standard deviation of the skin color (the first detection item) in the detection area, and use the skin color standard deviation as the reference score of the first channel image. The calculation method of the reference scores of the second channel image (such as the G channel image) and the third channel image (such as the B channel image) is similar to the calculation method of the reference score of the first channel image, and will not be described here.

在第六實施例中,若所選定的第一檢測項目為黑眼圈,則處理器106在檢測區域中找出的皮膚特徵即可為黑眼圈。對於第一通道影像(例如Y通道影像)而言,處理器106可計算黑眼圈(第一檢測項目)在第一通道影像的檢測區域中的第一亮度以及參考區域(例如全臉區域)的第二亮度。接著,處理器106可以第二亮度減去第一亮度以產生一差值,並將此差值定義為第一通道影像的參考分數。第二通道影像(例如Cr通道影像)及第三通道影像(例如Cb通道影像)個別的參考分數的計算方式類似於第一通道影像的參考分數的計算方式,於此不另贅述。In the sixth embodiment, if the selected first detection item is dark circles, the skin feature found by the processor 106 in the detection area may be dark circles. For the first channel image (for example, the Y channel image), the processor 106 may calculate the first brightness of the dark circles (the first detection item) in the detection area of the first channel image and the reference area (for example, the full face area). The second brightness. Then, the processor 106 may subtract the first brightness from the second brightness to generate a difference value, and define the difference value as the reference score of the first channel image. The calculation method of the individual reference scores of the second channel image (such as the Cr channel image) and the third channel image (such as the Cb channel image) is similar to the calculation method of the reference score of the first channel image, and will not be repeated here.

在基於以上教示計算第一、第二及第三通道影像的參考分數之後,處理器106可在步驟S260中依據第一檢測項目的皮膚特徵對應的參考分數計算人臉影像在第一檢測項目的檢測分數。After calculating the reference scores of the first, second, and third channel images based on the above teachings, the processor 106 may calculate the reference scores of the face images in the first detection item according to the reference scores corresponding to the skin features of the first detection item in step S260. Detection score.

在一實施例中,處理器106可經配置以:將第一通道影像的參考分數乘以第一權重以產生第一數值;將第二通道影像的參考分數乘以第二權重以產生第二數值;將第三通道影像的參考分數乘以第三權重以產生第三數值;以及將第一數值、第二數值及第三數值加總為檢測分數。簡言之,處理器106可將加權後的第一、第二及第三通道影像的參考分數加總為人臉影像在第一檢測項目的檢測分數。In an embodiment, the processor 106 may be configured to: multiply the reference score of the first channel image by the first weight to generate a first value; and multiply the reference score of the second channel image by the second weight to generate the second value. Numerical value; multiplying the reference score of the third channel image by the third weight to generate a third value; and adding the first value, the second value, and the third value to the detection score. In short, the processor 106 may add the weighted reference scores of the first, second, and third channel images to the detection scores of the face images in the first detection item.

在不同的實施例中,上述第一權重、第二權重及第三權重可依所選定的第一檢測項目而定。舉例而言,若第一檢測項目為黑眼圈或皮膚平滑度,則其對應的第一通道影像、第二通道影像及第三通道影像分別例如是Y通道影像、Cr通道影像及Cb通道影像。在此情況下,第一權重、第二權重及第三權重可設定為依序遞減。亦即,處理器106可對Y通道影像採用最高的權重,並對Cb通道影像採用最低的權重,但本發明可不限於此。In different embodiments, the above-mentioned first weight, second weight, and third weight may be determined according to the selected first detection item. For example, if the first detection item is dark circles or skin smoothness, the corresponding first channel image, second channel image, and third channel image are, for example, Y channel image, Cr channel image, and Cb channel image, respectively. In this case, the first weight, the second weight, and the third weight can be set to decrease sequentially. That is, the processor 106 may use the highest weight for the Y channel image and the lowest weight for the Cb channel image, but the invention is not limited to this.

舉另一例而言,若第一檢測項目為皺紋或斑點,則其對應的第一通道影像、第二通道影像及第三通道影像分別例如是R通道影像、G通道影像及B通道影像。在此情況下,第一權重、第二權重及第三權重可設定為皆為1,但本發明可不限於此。For another example, if the first detection item is wrinkles or spots, the corresponding first channel image, second channel image, and third channel image are, for example, R channel image, G channel image, and B channel image, respectively. In this case, the first weight, the second weight, and the third weight can all be set to 1, but the invention is not limited to this.

在不同的實施例中,由於人臉影像的品質可能會因拍攝時的亮度或其他環境因素而變化,因而可能使得所得出的檢測分數無法客觀且精準地反映出使用者的皮膚狀態。因此,本發明更提出了以下機制以對檢測分數進行適當地校正,從而得出更為客觀且精準的皮膚檢測結果。In different embodiments, since the quality of the face image may change due to the brightness at the time of shooting or other environmental factors, the obtained detection score may not objectively and accurately reflect the skin condition of the user. Therefore, the present invention further proposes the following mechanism to appropriately correct the detection score, so as to obtain a more objective and accurate skin detection result.

具體而言,在取得人臉影像在第一檢測項目的檢測分數之後,處理器106可執行步驟S270以依據多個歷史檢測分數及檢測分數計算對應於第一檢測項目的第一校正後分數。在本實施例中,前述歷史檢測分數例如是基於在各式環境中所拍攝的其他人臉影像而算出的多個檢測分數,但可不限於此。Specifically, after obtaining the detection score of the face image in the first detection item, the processor 106 may perform step S270 to calculate the first corrected score corresponding to the first detection item according to the multiple historical detection scores and the detection scores. In this embodiment, the aforementioned historical detection scores are, for example, multiple detection scores calculated based on other face images taken in various environments, but it is not limited to this.

在一實施例中,處理器106可計算前述歷史檢測分數的一平均值(以m表示)及一標準差(以

Figure 02_image003
表示),並將人臉影像在第一檢測項目的檢測分數輸入至一激勵函數以產生第一校正後分數。在本實施例中,所述激勵函數例如是:
Figure 02_image005
其中SC為第一校正後分數,RC為人臉影像在第一檢測項目的檢測分數。In one embodiment, the processor 106 may calculate an average value (represented by m) and a standard deviation (represented by
Figure 02_image003
Represents), and input the detection score of the face image in the first detection item into an excitation function to generate the first corrected score. In this embodiment, the excitation function is, for example:
Figure 02_image005
Where SC is the first corrected score, and RC is the detection score of the face image in the first detection item.

在透過上述激勵函數將第一檢測項目的檢測分數(即,RC)轉換為第一校正後分數(即,SC)之後,可讓第一校正後分數更為精準且客觀地呈現皮膚檢測結果,並弭平因不同的環境因素(例如,燈光)所造成的檢測誤差。After the detection score (ie, RC) of the first detection item is converted into the first corrected score (ie, SC) through the above-mentioned excitation function, the first corrected score can be used to present the skin detection result more accurately and objectively. And to eliminate the detection errors caused by different environmental factors (for example, lighting).

由上可知,本發明提出的方法及裝置僅需基於單一張人臉影像即可依需求而同時針對不同的檢測項目進行皮膚檢測,而不需如習知作法一般地針對各個局部臉部區域分別進行量測。藉此,可提供一種簡單且省時的皮膚檢測機制。It can be seen from the above that the method and device proposed by the present invention only need to be based on a single face image to perform skin detection for different detection items at the same time as required, instead of separately targeting each partial face area as in the conventional practice. Take measurements. In this way, a simple and time-saving skin detection mechanism can be provided.

在一實施例中,若使用者同時選定兩種以上的檢測項目,則處理器106可基於這些檢測項目分別計算對應的校正後分數,並透過使用者界面將這些檢測項目對應的校正後分數提供予使用者參考。In one embodiment, if the user selects more than two detection items at the same time, the processor 106 may calculate the corresponding corrected scores based on these detection items, and provide the corrected scores corresponding to these detection items through the user interface. For the user's reference.

此外,處理器106還可進一步基於各檢測項目的校正後分數產生一綜合性皮膚檢測分數,以綜合性地表徵使用者的皮膚檢測結果(例如,膚質年齡)。In addition, the processor 106 may further generate a comprehensive skin detection score based on the corrected score of each detection item to comprehensively characterize the user's skin detection result (for example, skin type and age).

在一實施例中,在處理器106依據先前實施例中的教示而產生對應於第一檢測項目的第一校正後分數之後,處理器106可再基於同一張人臉影像產生對應於第二檢測項目的第二校正後分數。之後,處理器106可經配置以:將第一校正後分數乘以第一特定權重以產生第一特定數值;將第二校正後分數乘以第二特定權重以產生第二特定數值;以及將第一特定數值及第二特定數值加總為上述綜合性皮膚檢測分數。簡言之,處理器106可將加權後的第一校正後分數及第二校正後分數加總為綜合性皮膚檢測分數,以綜合性地表徵使用者的皮膚檢測結果。In one embodiment, after the processor 106 generates the first corrected score corresponding to the first detection item according to the teaching in the previous embodiment, the processor 106 may then generate a second detection score corresponding to the same face image. The second corrected score of the item. Thereafter, the processor 106 may be configured to: multiply the first corrected score by a first specific weight to generate a first specific value; multiply the second corrected score by a second specific weight to generate a second specific value; and The sum of the first specific value and the second specific value is the aforementioned comprehensive skin test score. In short, the processor 106 may add the weighted first corrected score and the second corrected score to a comprehensive skin detection score to comprehensively characterize the user's skin detection result.

此外,雖以上實施例僅基於兩個檢測項目說明綜合性皮膚檢測分數的計算方式,但在其他實施例中,處理器106亦可基於更多檢測項目的校正後分數(不同的檢測項目可對應於不同的特定權重)來計算綜合性皮膚檢測分數。在一實施例中,若所選定的檢測項目中包括皺紋,則處理器106可將其對應的特定權重設定為最高,但本發明可不限於此。In addition, although the above embodiment only describes the calculation method of the comprehensive skin detection score based on two detection items, in other embodiments, the processor 106 can also be based on the corrected scores of more detection items (different detection items can correspond to Based on different specific weights) to calculate the comprehensive skin detection score. In an embodiment, if the selected detection item includes wrinkles, the processor 106 may set the corresponding specific weight to be the highest, but the present invention is not limited to this.

請參照圖7,其是依據本發明之一實施例繪示的皮膚檢測結果示意圖。圖7例如是由影像處理裝置100的使用者界面顯示的畫面,其提供了對應於不同檢測項目的校正後分數711、712、713、714、715,以及基於校正後分數711~715計算而得的綜合性皮膚檢測分數720。於其他實施例中,影像處理裝置100例如還包括一顯示單元(未繪示),耦接處理器106(如圖1所示),用以顯示如圖7所示的對應於不同檢測項目的校正後分數711、712、713、714、715,以及基於校正後分數711~715計算而得的綜合性皮膚檢測分數720的畫面。Please refer to FIG. 7, which is a schematic diagram of a skin detection result according to an embodiment of the present invention. FIG. 7 is, for example, a screen displayed by the user interface of the image processing device 100, which provides corrected scores 711, 712, 713, 714, and 715 corresponding to different detection items, and is calculated based on the corrected scores 711 to 715 The comprehensive skin test score of 720. In other embodiments, the image processing device 100, for example, further includes a display unit (not shown), coupled to the processor 106 (as shown in FIG. 1), for displaying the corresponding items corresponding to different detection items as shown in FIG. The screen of the corrected scores 711, 712, 713, 714, 715, and the comprehensive skin detection score 720 calculated based on the corrected scores 711 to 715.

綜上所述,本發明提出的皮膚檢測方法及影像處理裝置僅需基於單一張人臉影像即可依需求而同時針對不同的檢測項目進行皮膚檢測,並產生對應於不同檢測項目的校正後分數。藉此,可在不需使用特定檢測儀器的情況下,僅透過影像處理的方式以較低成本的方式簡易地完成皮膚檢測。In summary, the skin detection method and image processing device proposed by the present invention can perform skin detection for different detection items at the same time based on a single face image, and generate corrected scores corresponding to different detection items. . In this way, it is possible to easily complete skin detection at a lower cost through image processing without using a specific detection instrument.

並且,由於各檢測項目的校正後分數係經由考慮多個歷史檢測分數的特定函數轉換而得,因此能夠更為客觀且精準地呈現皮膚檢測結果。此外,本發明還可基於各檢測項目的校正後分數產生綜合性皮膚檢測分數,以綜合性地表徵使用者的皮膚檢測結果。In addition, since the corrected scores of each test item are converted by a specific function that considers multiple historical test scores, the skin test results can be presented more objectively and accurately. In addition, the present invention can also generate a comprehensive skin detection score based on the corrected score of each detection item to comprehensively characterize the user's skin detection result.

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

100:影像處理裝置102:影像擷取電路104:儲存電路106:處理器310:影像320:人臉影像320a:特徵點400:人臉影像411、412、413、414、415:遮罩411a、412a、413a、414a、415a、520a、610a:檢測區域510:第一遮罩520:檢測區域影像610:色彩通道影像620:通道影像711、712、713、714、715:校正後分數720:綜合性皮膚檢測分數S210~S270:步驟100: Image processing device 102: Image capture circuit 104: Storage circuit 106: Processor 310: Image 320: Face image 320a: Feature point 400: Face image 411, 412, 413, 414, 415: Mask 411a, 412a, 413a, 414a, 415a, 520a, 610a: detection area 510: first mask 520: detection area image 610: color channel image 620: channel image 711, 712, 713, 714, 715: corrected score 720: comprehensive Sexual skin test scores S210~S270: steps

圖1是依據本發明之一實施例繪示的影像處理裝置示意圖。 圖2是依據本發明之一實施例繪示的皮膚檢測方法流程圖。 圖3是依據本發明之一實施例繪示的取得人臉影像的示意圖。 圖4是依據本發明之一實施例繪示的基於不同檢測項目的遮罩定義檢測區域的示意圖。 圖5是依據本發明之一實施繪示的將遮罩與人臉影像結合以定義檢測區域的示意圖。 圖6是依據本發明第三實施例繪示的在通道影像中找出皮膚特徵的示意圖。 圖7是依據本發明之一實施例繪示的皮膚檢測結果示意圖。FIG. 1 is a schematic diagram of an image processing device according to an embodiment of the invention. Fig. 2 is a flowchart of a skin detection method according to an embodiment of the present invention. FIG. 3 is a schematic diagram of obtaining a face image according to an embodiment of the present invention. FIG. 4 is a schematic diagram illustrating a detection area defined based on masks of different detection items according to an embodiment of the present invention. FIG. 5 is a schematic diagram illustrating a combination of a mask and a face image to define a detection area according to an implementation of the present invention. FIG. 6 is a schematic diagram of finding skin features in channel images according to the third embodiment of the present invention. Fig. 7 is a schematic diagram of a skin detection result according to an embodiment of the present invention.

S210~S270:步驟 S210~S270: steps

Claims (26)

一種皮膚檢測方法,包括:取得一人臉影像;依據一第一檢測項目取得一第一遮罩,並基於該第一遮罩在該人臉影像中定義一檢測區域,其中該第一檢測項目包括皺紋檢測、皮膚平滑度檢測、皮膚油光檢測、膚色均勻度檢測、黑眼圈檢測、斑點檢測至少其中之一;將該人臉影像轉換為多個通道影像;在各該些通道影像的該檢測區域中找出對應於該第一檢測項目的一皮膚特徵;計算各該些通道影像的該檢測區域中該第一檢測項目的該皮膚特徵對應的一參考分數;依據該第一檢測項目的該皮膚特徵對應的該參考分數計算該人臉影像在該第一檢測項目的一檢測分數;依據多個歷史檢測分數及該檢測分數計算對應於該第一檢測項目的一第一校正後分數。 A skin detection method includes: obtaining a face image; obtaining a first mask according to a first detection item, and defining a detection area in the face image based on the first mask, wherein the first detection item includes At least one of wrinkle detection, skin smoothness detection, skin shine detection, skin color uniformity detection, dark circle detection, spot detection; convert the face image into multiple channel images; in the detection area of each of the channel images Find a skin feature corresponding to the first detection item; calculate a reference score corresponding to the skin feature of the first detection item in the detection area of each of the channel images; according to the skin of the first detection item The reference score corresponding to the feature calculates a detection score of the face image in the first detection item; and calculates a first corrected score corresponding to the first detection item according to a plurality of historical detection scores and the detection score. 如申請專利範圍第1項所述的方法,其中取得該人臉影像的步驟包括:取得一影像,並對該影像執行一人臉辨識操作,以在該影像中找出該人臉影像。 For the method described in item 1 of the scope of patent application, the step of obtaining the face image includes: obtaining an image, and performing a face recognition operation on the image to find the face image in the image. 如申請專利範圍第1項所述的方法,其中將該人臉影像轉換為該些通道影像的步驟包括: 依據該第一檢測項目決定一前處理機制及一色彩轉換機制;使用該色彩轉換機制將該人臉影像轉換為多個色彩通道影像;以及使用該前處理機制將該些色彩通道影像轉換為該些通道影像。 For the method described in item 1 of the scope of patent application, the step of converting the face image into the channel images includes: Determine a pre-processing mechanism and a color conversion mechanism according to the first detection item; use the color conversion mechanism to convert the face image into multiple color channel images; and use the pre-processing mechanism to convert the color channel images into the Some channel images. 如申請專利範圍第1項所述的方法,其中該皮膚特徵包括一皺紋,且計算各該些通道影像中該第一檢測項目的該皮膚特徵對應的該參考分數的步驟包括:對於該些通道影像中的一第一通道影像而言,計算該皺紋在該檢測區域中的一皺紋面積;計算該皺紋面積在該檢測區域的面積中所佔的一比例;以及將該比例定義為該第一通道影像的該參考分數。 The method according to claim 1, wherein the skin feature includes a wrinkle, and the step of calculating the reference score corresponding to the skin feature of the first detection item in each of the channel images includes: For a first channel image in the image, calculate a wrinkle area of the wrinkle in the detection area; calculate a ratio of the wrinkle area to the area of the detection area; and define the ratio as the first The reference score of the channel image. 如申請專利範圍第1項所述的方法,其中該皮膚特徵包括一非平滑皮膚,且計算各該些通道影像中該第一檢測項目的該皮膚特徵對應的該參考分數的步驟包括:對於該些通道影像中的一第一通道影像而言,計算該非平滑皮膚在該檢測區域中的一非平滑面積;計算該非平滑面積在該檢測區域的面積中所佔的一比例;以及將該比例定義為該第一通道影像的該參考分數。 The method according to claim 1, wherein the skin feature includes a non-smooth skin, and the step of calculating the reference score corresponding to the skin feature of the first detection item in each of the channel images includes: For a first channel image in the channel images, calculate a non-smooth area of the non-smooth skin in the detection area; calculate a ratio of the non-smooth area to the area of the detection area; and define the ratio Is the reference score of the first channel image. 如申請專利範圍第1項所述的方法,其中各該些通道影像更包括一參考區域,該皮膚特徵包括一皮膚油光,且計算各該些通道影像中該第一檢測項目的該皮膚特徵對應的該參考分數的步驟包括: 對於該些通道影像中的一第一通道影像而言,計算該皮膚油光在該檢測區域中的一第一亮度以及該皮膚油光在該參考區域中的一第二亮度;以該第一亮度減去該第二亮度以產生一差值;以及將該差值定義為該第一通道影像的該參考分數。 According to the method described in claim 1, wherein each of the channel images further includes a reference area, the skin feature includes a skin shiny, and the skin feature corresponding to the first detection item in each of the channel images is calculated The steps of this reference score include: For a first channel image among the channel images, calculate a first brightness of the skin oily light in the detection area and a second brightness of the skin oily light in the reference area; subtract the first brightness Removing the second brightness to generate a difference; and defining the difference as the reference score of the first channel image. 如申請專利範圍第1項所述的方法,其中該皮膚特徵包括一膚色,且計算各該些通道影像中該第一檢測項目的該皮膚特徵對應的該參考分數的步驟包括:對於該些通道影像中的一第一通道影像而言,計算該膚色在該檢測區域中的一膚色標準差,其中該檢測區域不包括該人臉影像中的五官;以及將該膚色標準差定義為該第一通道影像的該參考分數。 The method according to claim 1, wherein the skin feature includes a skin color, and the step of calculating the reference score corresponding to the skin feature of the first detection item in each of the channel images includes: For a first channel image in the image, calculate a skin color standard deviation of the skin color in the detection area, where the detection area does not include the facial features in the face image; and define the skin color standard deviation as the first The reference score of the channel image. 如申請專利範圍第1項所述的方法,其中各該些通道影像更包括一參考區域,該皮膚特徵包括一黑眼圈,且計算各該些通道影像中該第一檢測項目的該皮膚特徵對應的該參考分數的步驟包括:對於該些通道影像中的一第一通道影像而言,計算該黑眼圈在該檢測區域中的一第一亮度以及該參考區域的一第二亮度;以該第二亮度減去該第一亮度以產生一差值;以及將該差值定義為該第一通道影像的該參考分數。 According to the method described in claim 1, wherein each of the channel images further includes a reference area, the skin feature includes a dark circle, and the skin feature corresponding to the first detection item in each of the channel images is calculated The step of the reference score includes: for a first channel image of the channel images, calculating a first brightness of the dark circle in the detection area and a second brightness of the reference area; The first brightness is subtracted from the second brightness to generate a difference; and the difference is defined as the reference score of the first channel image. 如申請專利範圍第1項所述的方法,其中該些通道影像包括第一通道影像、第二通道影像及第三通道影像,且依據該第一 檢測項目的該皮膚特徵對應的該參考分數計算該人臉影像在該第一檢測項目的該檢測分數的步驟包括:將該第一通道影像的該參考分數乘以一第一權重以產生一第一數值;將該第二通道影像的該參考分數乘以一第二權重以產生一第二數值;將該第三通道影像的該參考分數乘以一第三權重以產生一第三數值;以及將該第一數值、該第二數值及該第三數值加總為該檢測分數。 For the method described in claim 1, wherein the channel images include a first channel image, a second channel image, and a third channel image, and according to the first channel image The step of calculating the detection score of the face image in the first detection item by the reference score corresponding to the skin feature of the detection item includes: multiplying the reference score of the first channel image by a first weight to generate a first weight A value; multiply the reference score of the second channel image by a second weight to generate a second value; multiply the reference score of the third channel image by a third weight to generate a third value; and The first value, the second value, and the third value are added to form the detection score. 如申請專利範圍第9項所述的方法,其中當該皮膚特徵為一黑眼圈或一非平滑皮膚時,該第一通道影像為一Y通道影像、該第二通道影像為一Cr通道影像,該第三通道影像為一Cb通道影像,且該第一權重、該第二權重及該第三權重依序遞減。 The method according to claim 9, wherein when the skin feature is a dark circle or a non-smooth skin, the first channel image is a Y channel image, and the second channel image is a Cr channel image, The third channel image is a Cb channel image, and the first weight, the second weight, and the third weight are sequentially decreased. 如申請專利範圍第9項所述的方法,其中當該皮膚特徵為一皺紋或一斑點時,該第一通道影像為一R通道影像、該第二通道影像為一G通道影像,該第三通道影像為一B通道影像,且該第一權重、該第二權重及該第三權重皆為1。 The method according to claim 9, wherein when the skin feature is a wrinkle or a spot, the first channel image is an R channel image, the second channel image is a G channel image, and the third channel image is The channel image is a B channel image, and the first weight, the second weight, and the third weight are all 1. 如申請專利範圍第1項所述的方法,其中依據該些歷史檢測分數及該檢測分數計算該第一校正後分數的步驟包括:計算該些歷史檢測分數的一平均值及一標準差;將該檢測分數輸入至一激勵函數以產生該第一校正後分數,其中該激勵函數為:
Figure 107147382-A0305-02-0032-1
,其中SC為該第一校正後分數,RC為該檢測分數,m為該平均值,σ為該標準差。
For the method described in claim 1, wherein the step of calculating the first corrected score based on the historical detection scores and the detection score includes: calculating an average value and a standard deviation of the historical detection scores; The detection score is input to an excitation function to generate the first corrected score, where the excitation function is:
Figure 107147382-A0305-02-0032-1
, Where SC is the first corrected score, RC is the detection score, m is the average, and σ is the standard deviation.
如申請專利範圍第1項所述的方法,更包括:基於該人臉影像產生對應於一第二檢測項目的一第二校正後分數;將該第一校正後分數乘以一第一特定權重以產生一第一特定數值;將該第二校正後分數乘以一第二特定權重以產生一第二特定數值;以及將該第一特定數值及該第二特定數值加總為一綜合性皮膚檢測分數。 The method described in item 1 of the scope of patent application further includes: generating a second corrected score corresponding to a second detection item based on the face image; and multiplying the first corrected score by a first specific weight To generate a first specific value; multiply the second corrected score by a second specific weight to generate a second specific value; and sum the first specific value and the second specific value to form a comprehensive skin Detection score. 一種影像處理裝置,包括:一影像擷取電路;一儲存電路,儲存多個模組;以及一處理器,耦接該影像擷取電路及該儲存電路,存取該些模組以執行下列步驟:控制該影像擷取電路取得一人臉影像;依據一第一檢測項目取得一第一遮罩,並基於該第一遮罩在該人臉影像中定義一檢測區域,其中該第一檢測項目包括皺紋檢測、皮膚平滑度檢測、皮膚油光檢測、膚色均勻度檢測、 黑眼圈檢測、斑點檢測至少其中之一;將該人臉影像轉換為多個通道影像;在各該些通道影像的該檢測區域中找出對應於該第一檢測項目的一皮膚特徵;計算各該些通道影像的該檢測區域中該第一檢測項目的該皮膚特徵對應的一參考分數;依據該第一檢測項目的該皮膚特徵對應的該參考分數計算該人臉影像在該第一檢測項目的一檢測分數;依據多個歷史檢測分數及該檢測分數計算對應於該第一檢測項目的一第一校正後分數。 An image processing device includes: an image capturing circuit; a storage circuit storing a plurality of modules; and a processor, coupled to the image capturing circuit and the storage circuit, accessing the modules to perform the following steps : Controlling the image capturing circuit to obtain a face image; obtaining a first mask according to a first detection item, and defining a detection area in the face image based on the first mask, wherein the first detection item includes Wrinkle detection, skin smoothness detection, skin shine detection, skin color uniformity detection, At least one of dark circle detection and spot detection; converting the face image into a plurality of channel images; finding a skin feature corresponding to the first detection item in the detection area of each of the channel images; calculating each A reference score corresponding to the skin feature of the first detection item in the detection area of the channel images; calculating the face image in the first detection item according to the reference score corresponding to the skin feature of the first detection item A detection score of a; a first corrected score corresponding to the first detection item is calculated based on a plurality of historical detection scores and the detection score. 如申請專利範圍第14項所述的影像處理裝置,其中該處理器經配置以:取得一影像,並對該影像執行一人臉辨識操作,以在該影像中找出該人臉影像。 For the image processing device described in claim 14, wherein the processor is configured to obtain an image and perform a face recognition operation on the image to find the face image in the image. 如申請專利範圍第14項所述的影像處理裝置,其中該處理器經配置以:依據該第一檢測項目決定一前處理機制及一色彩轉換機制;使用該色彩轉換機制將該人臉影像轉換為多個色彩通道影像;以及使用該前處理機制將該些色彩通道影像轉換為該些通道影像。 For example, the image processing device of claim 14, wherein the processor is configured to: determine a pre-processing mechanism and a color conversion mechanism according to the first detection item; use the color conversion mechanism to convert the face image Is a plurality of color channel images; and using the pre-processing mechanism to convert the color channel images into the channel images. 如申請專利範圍第14項所述的影像處理裝置,其中該皮膚特徵包括一皺紋,且該處理器經配置以: 對於該些通道影像中的一第一通道影像而言,計算該皺紋在該檢測區域中的一皺紋面積;計算該皺紋面積在該檢測區域的面積中所佔的一比例;以及將該比例定義為該第一通道影像的該參考分數。 The image processing device according to claim 14, wherein the skin feature includes a wrinkle, and the processor is configured to: For a first channel image of the channel images, calculate a wrinkle area of the wrinkle in the detection area; calculate a ratio of the wrinkle area to the area of the detection area; and define the ratio Is the reference score of the first channel image. 如申請專利範圍第14項所述的影像處理裝置,其中該皮膚特徵包括一非平滑皮膚,且該處理器經配置以:對於該些通道影像中的一第一通道影像而言,計算該非平滑皮膚在該檢測區域中的一非平滑面積;計算該非平滑面積在該檢測區域的面積中所佔的一比例;以及將該比例定義為該第一通道影像的該參考分數。 The image processing device according to claim 14, wherein the skin feature includes a non-smooth skin, and the processor is configured to: for a first channel image among the channel images, calculate the non-smooth skin A non-smooth area of the skin in the detection area; calculating a proportion of the non-smooth area in the area of the detection area; and defining the proportion as the reference score of the first channel image. 如申請專利範圍第14項所述的影像處理裝置,其中各該些通道影像更包括一參考區域,該皮膚特徵包括一皮膚油光,且該處理器經配置以:對於該些通道影像中的一第一通道影像而言,計算該皮膚油光在該檢測區域中的一第一亮度以及該皮膚油光在該參考區域中的一第二亮度;以該第一亮度減去該第二亮度以產生一差值;以及將該差值定義為該第一通道影像的該參考分數。 The image processing device according to claim 14, wherein each of the channel images further includes a reference area, the skin feature includes a skin shine, and the processor is configured to: for one of the channel images For the first channel image, calculate a first brightness of the skin oil in the detection area and a second brightness of the skin oil in the reference area; subtract the second brightness from the first brightness to generate a Difference; and define the difference as the reference score of the first channel image. 如申請專利範圍第14項所述的影像處理裝置,其中該皮膚特徵包括一膚色,且該處理器經配置以: 對於該些通道影像中的一第一通道影像而言,計算該膚色在該檢測區域中的一膚色標準差,其中該檢測區域不包括該人臉影像中的五官;以及將該膚色標準差定義為該第一通道影像的該參考分數。 The image processing device according to claim 14, wherein the skin feature includes a skin color, and the processor is configured to: For a first channel image among the channel images, calculate a skin color standard deviation of the skin color in the detection area, where the detection area does not include the facial features in the face image; and define the skin color standard deviation Is the reference score of the first channel image. 如申請專利範圍第14項所述的影像處理裝置,其中各該些通道影像更包括一參考區域,該皮膚特徵包括一黑眼圈,且該處理器經配置以:對於該些通道影像中的一第一通道影像而言,計算該黑眼圈在該檢測區域中的一第一亮度以及該參考區域的一第二亮度;以該第二亮度減去該第一亮度以產生一差值;以及將該差值定義為該第一通道影像的該參考分數。 The image processing device according to claim 14, wherein each of the channel images further includes a reference area, the skin feature includes a dark circle, and the processor is configured to: for one of the channel images For the first channel image, calculate a first brightness of the dark circle in the detection area and a second brightness of the reference area; subtract the first brightness from the second brightness to generate a difference; and The difference is defined as the reference score of the first channel image. 如申請專利範圍第14項所述的影像處理裝置,其中該些通道影像包括第一通道影像、第二通道影像及第三通道影像,且該處理器經配置以:將該第一通道影像的該參考分數乘以一第一權重以產生一第一數值;將該第二通道影像的該參考分數乘以一第二權重以產生一第二數值;將該第三通道影像的該參考分數乘以一第三權重以產生一第三數值;將該第一數值、該第二數值及該第三數值加總為該檢測分數。 For the image processing device described in claim 14, wherein the channel images include a first channel image, a second channel image, and a third channel image, and the processor is configured to: The reference score is multiplied by a first weight to generate a first value; the reference score of the second channel image is multiplied by a second weight to generate a second value; the reference score of the third channel image is multiplied A third weight is used to generate a third value; the first value, the second value, and the third value are added to form the detection score. 如申請專利範圍第22項所述的影像處理裝置,其中當該皮膚特徵為一黑眼圈或一非平滑皮膚時,該第一通道影像為一Y通道影像、該第二通道影像為一Cr通道影像,該第三通道影像為一Cb通道影像,且該第一權重、該第二權重及該第三權重依序遞減。 The image processing device according to claim 22, wherein when the skin is characterized by a dark circle or a non-smooth skin, the first channel image is a Y channel image, and the second channel image is a Cr channel Image, the third channel image is a Cb channel image, and the first weight, the second weight, and the third weight are sequentially decreased. 如申請專利範圍第22項所述的影像處理裝置,其中當該皮膚特徵為一皺紋或一斑點時,該第一通道影像為一R通道影像、該第二通道影像為一G通道影像,該第三通道影像為一B通道影像,且該第一權重、該第二權重及該第三權重皆為1。 For example, the image processing device of claim 22, wherein when the skin feature is a wrinkle or a spot, the first channel image is an R channel image, the second channel image is a G channel image, and the The third channel image is a B channel image, and the first weight, the second weight, and the third weight are all 1. 如申請專利範圍第14項所述的影像處理裝置,其中該處理器經配置以:計算該些歷史檢測分數的一平均值及一標準差;將該檢測分數輸入至一激勵函數以產生該第一校正後分數,其中該激勵函數為:
Figure 107147382-A0305-02-0036-2
,其中SC為該第一校正後分數,RC為該檢測分數,m為該平均值,σ為該標準差。
For the image processing device described in claim 14, wherein the processor is configured to: calculate an average value and a standard deviation of the historical detection scores; and input the detection scores into an excitation function to generate the first A corrected score, where the excitation function is:
Figure 107147382-A0305-02-0036-2
, Where SC is the first corrected score, RC is the detection score, m is the average, and σ is the standard deviation.
如申請專利範圍第14項所述的影像處理裝置,其中該處理器更經配置以:基於該人臉影像產生對應於一第二檢測項目的一第二校正後分數; 將該第一校正後分數乘以一第一特定權重以產生一第一特定數值;將該第二校正後分數乘以一第二特定權重以產生一第二特定數值;以及將該第一特定數值及該第二特定數值加總為一綜合性皮膚檢測分數。 The image processing device according to claim 14, wherein the processor is further configured to: generate a second corrected score corresponding to a second detection item based on the face image; Multiplying the first corrected score by a first specific weight to generate a first specific value; multiplying the second corrected score by a second specific weight to generate a second specific value; and the first specific weight The sum of the value and the second specific value is a comprehensive skin test score.
TW107147382A 2018-11-30 2018-12-27 Skin detection method and image processing device TWI729338B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811454316.2 2018-11-30
CN201811454316.2A CN111259683A (en) 2018-11-30 2018-11-30 Skin detection method and image processing apparatus

Publications (2)

Publication Number Publication Date
TW202022682A TW202022682A (en) 2020-06-16
TWI729338B true TWI729338B (en) 2021-06-01

Family

ID=70950127

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107147382A TWI729338B (en) 2018-11-30 2018-12-27 Skin detection method and image processing device

Country Status (2)

Country Link
CN (1) CN111259683A (en)
TW (1) TWI729338B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938672B (en) * 2021-09-16 2024-05-10 青岛信芯微电子科技股份有限公司 Signal identification method of signal source and terminal equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104299011A (en) * 2014-10-13 2015-01-21 吴亮 Skin type and skin problem identification and detection method based on facial image identification
CN105469100A (en) * 2015-11-30 2016-04-06 广东工业大学 Deep learning-based skin biopsy image pathological characteristic recognition method
US20170270348A1 (en) * 2016-03-21 2017-09-21 Xerox Corporation Interactive display for facial skin monitoring
TW201839718A (en) * 2017-04-27 2018-11-01 立特克科技股份有限公司 Skin detection device and the method therefor

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005157546A (en) * 2003-11-21 2005-06-16 Nippon Telegr & Teleph Corp <Ntt> Object detection method, device and program
CN106919911A (en) * 2008-07-30 2017-07-04 快图有限公司 Modified using the automatic face and skin of face detection
CN101996366A (en) * 2010-12-08 2011-03-30 山东浪潮齐鲁软件产业股份有限公司 Self-correcting early warning model for tobacco internal supervision system
TWI430776B (en) * 2011-05-30 2014-03-21 Univ Southern Taiwan Smart video skin test system and method of the same
CN104200431A (en) * 2014-08-21 2014-12-10 浙江宇视科技有限公司 Processing method and processing device of image graying
GB2540390A (en) * 2015-07-15 2017-01-18 Michelson Diagnostics Ltd Processing optical coherency tomography scans
CN107361768A (en) * 2017-06-27 2017-11-21 深圳市宏电技术股份有限公司 A kind of method and apparatus for detecting skin senescence degree
CN108184075B (en) * 2018-01-17 2019-05-10 百度在线网络技术(北京)有限公司 Method and apparatus for generating image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104299011A (en) * 2014-10-13 2015-01-21 吴亮 Skin type and skin problem identification and detection method based on facial image identification
CN105469100A (en) * 2015-11-30 2016-04-06 广东工业大学 Deep learning-based skin biopsy image pathological characteristic recognition method
US20170270348A1 (en) * 2016-03-21 2017-09-21 Xerox Corporation Interactive display for facial skin monitoring
TW201839718A (en) * 2017-04-27 2018-11-01 立特克科技股份有限公司 Skin detection device and the method therefor

Also Published As

Publication number Publication date
CN111259683A (en) 2020-06-09
TW202022682A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
JP6849824B2 (en) Systems and methods for guiding users to take selfies
CN105120747B (en) The obscure evaluating apparatus of skin and the obscure evaluation method of skin
CN108024719B (en) Skin gloss evaluation device, gloss evaluation method, and recording medium
JP6793325B2 (en) Skin diagnostic device and skin diagnostic method
WO2016121518A1 (en) Information processing device, information processing method, and program
KR20210084102A (en) Electronic apparatus, scalp care system and method for controlling the electronic apparatus and the server
US10517523B2 (en) Skin aging state assessment method and electronic device
CN111062891A (en) Image processing method, device, terminal and computer readable storage medium
CN110036407B (en) System and method for correcting digital image color based on human sclera and pupil
JP2009082338A (en) Skin discrimination method using entropy
TWI729338B (en) Skin detection method and image processing device
WO2021218696A1 (en) Skin color detection method and apparatus, terminal and storage medium
JP7234086B2 (en) Biometric information acquisition device and program
JP2017012384A (en) Wrinkle state analysis device and wrinkle state analysis method
US20220335252A1 (en) Method and system for anonymizing facial images
US20180116582A1 (en) Elasticity evaluation apparatus, elasticity evaluation method, and elasticity evaluation program
KR20180061629A (en) Evaluation method for skin condition using image and evaluation apparatus for skin condition using image
JP2005034424A (en) Method and apparatus for evaluating the state of skin surface
CN103971111B (en) Image processing method and terminal device
JP2021010652A (en) Information processing device, evaluation method, and information processing program
JP2017158921A (en) Skin condition evaluation method
CN116739978A (en) Stain detection method, electronic device, storage medium, and program product
Mehta et al. Selective quantifiable facial assessment of aging
JP2020187510A (en) Face image analysis apparatus and program thereof
CN117671037A (en) Skin detection method, device, mask and storage medium