CN117409220A - Skin color change detection method, device, electronic equipment and computer storage medium - Google Patents

Skin color change detection method, device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN117409220A
CN117409220A CN202310671398.0A CN202310671398A CN117409220A CN 117409220 A CN117409220 A CN 117409220A CN 202310671398 A CN202310671398 A CN 202310671398A CN 117409220 A CN117409220 A CN 117409220A
Authority
CN
China
Prior art keywords
skin color
target image
detected
pixel value
skin
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310671398.0A
Other languages
Chinese (zh)
Inventor
张虹
赖宇舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202310671398.0A priority Critical patent/CN117409220A/en
Publication of CN117409220A publication Critical patent/CN117409220A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/44Detecting, measuring or recording for evaluating the integumentary system, e.g. skin, hair or nails
    • A61B5/441Skin evaluation, e.g. for skin disorder diagnosis
    • A61B5/443Evaluating skin constituents, e.g. elastin, melanin, water
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Abstract

The embodiment of the application discloses a skin color change detection method, a skin color change detection device, electronic equipment and a computer storage medium; in the embodiment of the application, at least two target images shot at different times are acquired, wherein each target image comprises a skin color region to be detected and a reference object; acquiring a corresponding skin color pixel value of the skin color region to be detected in each target image, and acquiring a corresponding reference pixel value of the reference object in each target image; according to the corresponding skin color pixel value and the reference pixel value in each target image, determining the corresponding skin color value of the skin color region to be detected in each target image; and determining the skin color change condition corresponding to the skin color region to be detected according to the skin color value corresponding to the skin color region to be detected in each target image. The embodiment of the application can automatically detect the skin color change condition.

Description

Skin color change detection method, device, electronic equipment and computer storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a skin color change detection method, a skin color change detection device, an electronic device, and a computer storage medium.
Background
With the improvement of living standard of people, people pay more and more attention to the change of own skin color, for example, people pay more and more attention to whether the own skin color is blackened.
At present, people usually judge whether the skin color of the people is blackened according to the feeling of the people, but the accuracy of judging whether the skin color of the people is blackened according to the feeling of the people is low.
Disclosure of Invention
The embodiment of the application provides a skin color change detection method, a skin color change detection device, electronic equipment and a computer storage medium, which can solve the technical problem of low accuracy in judging whether skin colors of people turn black according to the feeling of people.
The embodiment of the application provides a skin color change detection method, which comprises the following steps:
acquiring at least two target images shot at different times, wherein the target images comprise a skin color region to be detected and a reference object;
acquiring a corresponding skin color pixel value of the skin color region to be detected in each target image, and acquiring a corresponding reference pixel value of the reference object in each target image;
according to the corresponding skin color pixel value and the reference pixel value in each target image, determining the corresponding skin color value of the skin color region to be detected in each target image;
And determining the skin color change condition corresponding to the skin color region to be detected according to the skin color value corresponding to the skin color region to be detected in each target image.
Accordingly, an embodiment of the present application provides a skin color change detection apparatus, including:
the first acquisition module is used for acquiring at least two target images shot at different times, wherein the target images comprise a skin color region to be detected and a reference object;
the second acquisition module is used for acquiring the corresponding skin color pixel value of the skin color region to be detected in each target image and acquiring the corresponding reference pixel value of the reference object in each target image;
the first determining module is used for determining the corresponding skin color value of the skin color region to be detected in each target image according to the corresponding skin color pixel value and the reference pixel value in each target image;
and the second determining module is used for determining the skin color change condition corresponding to the skin color region to be detected according to the skin color value corresponding to the skin color region to be detected in each target image.
In addition, the embodiment of the application also provides electronic equipment, which comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used for running the computer program in the memory to realize the skin color change detection method provided by the embodiment of the application.
In addition, the embodiment of the application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute any skin color change detection method provided by the embodiment of the application.
In addition, the embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program is executed by a processor to realize any skin color change detection method provided by the embodiment of the application.
In the embodiment of the application, at least two target images shot at different times are acquired, wherein each target image comprises a skin color region to be detected and a reference object; acquiring a skin color pixel value corresponding to a skin color region to be detected in each target image, and acquiring a reference pixel value corresponding to a reference object in each target image; according to the corresponding skin color pixel value and the reference pixel value in each target image, determining the corresponding skin color value of the skin color region to be detected in each target image; according to the skin color value corresponding to the skin color region to be detected in each target image, the skin color change condition corresponding to the skin color region to be detected is determined, the skin color change condition of the region to be detected is automatically detected, the skin color change condition of the region to be detected is not required to be judged by means of human feeling, and the accuracy of detecting the skin color change condition of the region to be detected is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a skin color change detection method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a first target image and a second target image provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of an image including gray values provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a skin color change detecting device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides a skin color change detection method, a skin color change detection device, electronic equipment and a computer storage medium. The skin color change detection device may be integrated in an electronic device, which may be a server or a terminal.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligent platform.
The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
In addition, "plurality" in the embodiments of the present application means two or more. "first" and "second" and the like in the embodiments of the present application are used for distinguishing descriptions and are not to be construed as implying relative importance.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
In this embodiment, description will be made from the viewpoint of a skin tone variation detecting device, and for convenience, a skin tone variation detecting method of the present application will be described in detail below with the skin tone variation detecting device integrated in a terminal, that is, with the terminal as an execution subject.
Referring to fig. 1, fig. 1 is a flowchart of a skin color change detection method according to an embodiment of the present application. The skin color change detection method may include:
s101, acquiring at least two target images shot at different times, wherein each target image comprises a skin color region to be detected and a reference object.
The interval between the different times may be selected according to practical situations, for example, the different times may include a first time and a second time, and the interval between the first time and the second time may be one month or one week.
The target image refers to an image obtained by shooting a skin color region to be detected and a reference object. The type of the target image may be selected according to practical situations, for example, the target image may be an RGB image or a black-and-white image, which is not limited herein.
The skin color region to be detected refers to a region where skin to be detected is located, for example, the skin color region to be detected may be a region where a face is located or a region where an arm is located.
The reference object refers to an object for calculating a skin color value of a skin color region to be detected, and the type of the reference object may be selected according to practical situations, for example, the reference object may be white paper or a standard color card, which is not limited herein.
Alternatively, when the reference object is white paper, in order to improve the accuracy of the obtained skin color change condition, the reference object and the skin color region to be detected may be photographed in the same environment, thereby obtaining the target image. When the reference object is a standard color chart, since the pixel values on the standard color chart are known, the reference object and the skin color region to be detected may not be photographed in the same environment.
S102, obtaining a corresponding skin color pixel value of a skin color region to be detected in each target image, and obtaining a corresponding reference pixel value of a reference object in each target image.
If the yellow change condition of the skin color region to be detected is determined, the corresponding skin color pixel value of the skin color region to be detected in each target image may be an RGB value corresponding to the skin color region to be detected in each target image, and the corresponding reference pixel value of the reference object in each target image may be an RGB pixel value corresponding to the reference object in each target image.
If the change condition of the blackness of the skin color region to be detected is determined, the corresponding skin color pixel value of the skin color region to be detected in each target image can be the corresponding gray value of the skin color region to be detected in each target image, and the corresponding reference pixel value of the reference object in each target image can be the corresponding gray value of the reference object in each target image.
The reference pixel value corresponding to the reference object in each target image may refer to the reference pixel value corresponding to the region in which the reference object is located in the target image.
The region where the reference object is located in the target image may be referred to as a total region corresponding to the reference object in the target image, where the total region corresponding to the reference object in the target image may include at least one sub-region, for example, as shown in fig. 2, the reference object is white paper, the skin color region to be detected is an arm, and the region corresponding to the reference object in the target image includes a lower left corner region of the arm and an upper right corner region of the arm, that is, where the total region corresponding to the reference object in the target image includes two sub-regions, where the two sub-regions are respectively a lower left corner region of the arm and an upper right corner region of the arm.
When the total area corresponding to the reference object in the target image comprises a sub-area, the total area can be directly used as the reference area corresponding to the reference object, and then the pixel value corresponding to the reference area in each target image is used as the reference pixel value corresponding to the reference object in each target image. Or when the total area corresponding to the reference object in the target image includes a sub-area, the reference area corresponding to the reference object may be screened out from the total area, and then the pixel value corresponding to the reference area in each target image is used as the reference pixel value corresponding to the reference object in each target image.
When the total area corresponding to the reference object in the target image comprises a plurality of sub-areas, the reference area corresponding to the reference object can be screened from the total area, then the pixel value corresponding to the reference area in each target image is used as the reference pixel value corresponding to the reference object in each target image, and at the moment, the reference area corresponding to the reference object is screened from the total area, and the screening of one sub-area from the total area can be understood as the screening of the reference area corresponding to the reference object.
The process of screening a sub-region from the total region as a reference region corresponding to the reference object may be: and randomly taking any one sub-area as a reference area corresponding to the reference object.
For example, when the reference object is a standard color chart, since the pixel value of the standard color chart is known, any one of the sub-areas can be randomly used as the reference area to which the reference object corresponds.
Alternatively, the process of screening a sub-area from the total area as the reference area corresponding to the reference object may also be: displaying a target image, responding to the selection operation of a user on the subarea corresponding to the reference object in the target image, and taking the subarea corresponding to the selection operation as the reference area corresponding to the reference object.
Or, the process of screening a sub-area from the total area as the reference area corresponding to the reference object may also be:
determining a corresponding color characteristic value of the subarea in each target image;
determining a color change value of the subarea according to the corresponding color characteristic value of the subarea in each target image;
and taking the subregion corresponding to the color change value meeting the preset difference condition as a reference region corresponding to the reference object.
The color characteristic value corresponding to the subarea in each target image can be determined through the color histogram of the subarea, or the color characteristic value corresponding to the subarea in each target image can be obtained through characteristic extraction of the subarea.
According to the color characteristic value corresponding to the subarea in each target image, the process of determining the color change value of the subarea can be as follows: and taking the difference value (the difference value can also be a ratio) between the corresponding color characteristic values of the subareas in each target image as the color change value of the subareas.
The color change value satisfying the preset difference condition may refer to a smaller color change value among the plurality of color change values.
In the embodiment of the application, determining a corresponding color characteristic value of the subarea in each target image; determining a color change value of the subarea according to the corresponding color characteristic value of the subarea in each target image; and taking the subregion corresponding to the color change value meeting the preset difference condition as a reference region corresponding to the reference object, so that the reference pixel values of the reference object in different target images are kept consistent as much as possible, namely, the difference value between the reference pixel values of the reference object in different target images is in a preset range, and improving the accuracy of obtaining the corresponding reference pixel value of the reference object in the target image, thereby improving the accuracy of obtaining the skin color change condition of the skin color region to be detected according to the corresponding reference pixel value of the reference object in the target image.
For example, as shown in fig. 2, the target image includes a first target image and a second target image, the reference object is white paper, the skin color region to be detected is a region on the arm, that is, the skin color region to be detected is the region to be detected B1 and the region to be detected B2 in fig. 2, the sub-region includes a lower left corner region and an upper right corner region of the arm, and since the color change value between the color feature value corresponding to the lower left corner region of the arm in the first target image and the color feature value corresponding to the second target image is larger, the color change value between the color feature value corresponding to the upper right corner region of the arm in the first target image and the color feature value corresponding to the second target image is smaller, the upper right corner region of the arm is taken as the reference region corresponding to the white paper, and at this time, the reference region may be the reference region A1 and the reference region A2 shown in fig. 2.
In some embodiments, the size of the corresponding sub-region of the reference object in the target image may be determined according to the size of the skin color region to be detected, for example, the difference between the size of the sub-region and the size of the skin color region to be detected is smaller than a preset difference, that is, the embodiment of the present application may divide the total region of the reference object corresponding to the target image according to the size of the skin color region to be detected, so as to obtain the corresponding sub-region of the reference object in the target image.
In other embodiments, the skin tone variation condition includes a skin tone blackness variation condition, and acquiring a skin tone pixel value corresponding to a skin tone region to be detected in each target image, and acquiring a reference pixel value corresponding to a reference object in each target image includes:
acquiring a first gray value corresponding to a skin color region to be detected in each target image, and taking the first gray value as a skin color pixel value corresponding to the skin color region to be detected in each target image;
and acquiring a second gray value corresponding to the reference object in each target image, and taking the second gray value as a reference pixel value corresponding to the reference object in each target image.
If the target image is an RGB image, the RGB image may be converted into an image containing gray values (for example, the target image includes a first target image and a second target image, which may be RGB images as shown in fig. 2, and the RGB image may be converted into an image containing gray values as shown in fig. 3), and then a first gray value corresponding to the skin color region to be detected and a second gray value corresponding to the reference object are obtained from the image containing gray values.
The format of the image containing the gray value may be selected according to practical situations, for example, the image containing the gray value may be a YUV image, a binary image or a YCbCr image, which is not limited herein.
S103, determining the corresponding skin color value of the skin color region to be detected in each target image according to the corresponding skin color pixel value and the reference pixel value in each target image.
The terminal can conduct division fusion processing on the corresponding skin tone pixel value and the reference pixel value in each target image to obtain the ratio between the skin tone pixel value and the reference pixel value in each target image, and then the ratio between the skin tone pixel value and the reference pixel value in each target image is used as the corresponding skin tone value of the skin tone region to be detected in each target image.
For example, the target image includes a first target image and a second target image, where a corresponding skin color pixel value in the first target image is b1, a corresponding reference pixel value in the first target image is a1, a corresponding skin color pixel value in the second target image is b2, a corresponding reference pixel value in the first target image is a2, a corresponding skin color value of the skin color region to be detected in the first target image is c1, c1=b1/a 1, and a corresponding skin color value of the skin color region to be detected in the second target image is c2, c2=b2/a 2.
Or, the terminal may also perform subtraction fusion processing on the corresponding skin tone pixel value and the reference pixel value in each target image to obtain a difference value between the skin tone pixel value and the reference pixel value in each target image, and then use the difference value between the skin tone pixel value and the reference pixel value in each target image as the corresponding skin tone value of the skin tone region to be detected in each target image.
Optionally, since the skin tone region to be detected corresponds to a plurality of pixel points in each target image, that is, the corresponding skin tone pixel value in each target image may refer to the pixel value of each pixel point corresponding to the skin tone region to be detected in each target image, the terminal may perform fusion processing on the corresponding skin tone pixel value in each target image to obtain a fused skin tone pixel value; carrying out fusion processing on the corresponding reference pixel value in each target image to obtain a fused reference pixel value; and determining a skin color value corresponding to the skin color region to be detected in each target image according to the fused skin color pixel value and the fused reference pixel value.
The performing fusion processing on the corresponding skin color pixel value in each target image may refer to performing addition fusion processing on the corresponding skin color pixel value in each target image to obtain a fused skin color pixel value corresponding to each target image, and performing fusion processing on the corresponding reference pixel value in each target image may refer to performing addition fusion processing on the corresponding reference pixel value in each target image to obtain a fused reference pixel value corresponding to each target image.
For example, the target image includes a first target image and a second target image, the corresponding skin tone pixel values in the first target image are subjected to addition fusion processing to obtain the fused skin tone pixel values corresponding to the first target image, the corresponding skin tone pixel values in the second target image are subjected to addition fusion processing to obtain the fused skin tone pixel values corresponding to the second target image, the corresponding reference pixel values in the first target image are subjected to addition fusion processing to obtain the fused reference pixel values corresponding to the first target image, and the corresponding reference pixel values in the second target image are subjected to addition fusion processing to obtain the fused reference pixel values corresponding to the second target image.
Or, performing fusion processing on the corresponding skin tone pixel value in each target image may refer to performing addition fusion processing on the corresponding skin tone pixel value in each target image to obtain a candidate fused skin tone pixel value corresponding to each target image, dividing the candidate fused skin tone pixel value by the number of first pixel points to obtain a fused skin tone pixel value, where the number of first pixel points refers to the number of pixel points corresponding to a skin tone region to be detected in each target image, performing fusion processing on the corresponding reference pixel value in each target image, or performing addition fusion processing on the corresponding reference pixel value in each target image to obtain a candidate fused reference pixel value corresponding to each target image, and dividing the candidate fused reference pixel value by the number of second pixel points to obtain a fused reference pixel value, where the number of second pixel points refers to the number of corresponding pixel points of the reference object in each target image.
For example, the target image includes a first target image and a second target image, the number of corresponding pixels in the first target image and the second target image of the skin color region to be detected is m, and the number of corresponding pixels in the first target image and the second target image of the reference object is n.
And adding and fusing the corresponding skin tone pixel values in the first target image to obtain candidate fused skin tone pixel values corresponding to the first target image, and dividing the candidate fused skin tone pixel values corresponding to the first target image by m to obtain fused skin tone pixel values corresponding to the first target image.
And adding and fusing the corresponding skin tone pixel values in the second target image to obtain candidate fused skin tone pixel values corresponding to the second target image, and dividing the candidate fused skin tone pixel values corresponding to the second target image by m to obtain fused skin tone pixel values corresponding to the second target image.
And adding and fusing the corresponding reference pixel values in the first target image to obtain candidate fused reference pixel values corresponding to the first target image, and dividing the candidate fused reference pixel values corresponding to the first target image by n to obtain fused reference pixel values corresponding to the first target image.
And adding and fusing the corresponding reference pixel values in the second target image to obtain candidate fused reference pixel values corresponding to the second target image, and dividing the candidate fused reference pixel values corresponding to the second target image by n to obtain fused reference pixel values corresponding to the second target image.
At this time, the terminal may perform division fusion processing on the fused skin tone pixel value and the fused reference pixel value corresponding to each target image to obtain a ratio between the fused skin tone pixel value and the fused reference pixel value in each target image, and then use the ratio between the fused skin tone pixel value and the fused reference pixel value in each target image as the skin tone value corresponding to the skin tone region to be detected in each target image.
Or, the terminal may perform subtraction fusion processing on the fused skin tone pixel value and the fused reference pixel value corresponding to each target image to obtain a difference value between the fused skin tone pixel value and the fused reference pixel value in each target image, and then use the difference value between the fused skin tone pixel value and the fused reference pixel value in each target image as the skin tone value corresponding to the skin tone region to be detected in each target image.
S104, according to the skin color value corresponding to the skin color region to be detected in each target image, determining the skin color change condition corresponding to the skin color region to be detected.
The skin tone change condition may refer to a skin tone blackness change condition and/or a skin tone yellow change condition. After obtaining the skin color value corresponding to the skin color region to be detected in each target image, the terminal can calculate the skin color change condition corresponding to the skin color region to be detected according to the skin color value corresponding to the skin color region to be detected in each target image.
In the embodiment of the application, when the skin color region to be detected is shot, the skin color region to be detected and the reference object are shot together to obtain the target image, so that the skin color value of the skin color region to be detected can be calculated according to the corresponding skin color pixel value of the skin color region to be detected in the target image and the corresponding reference pixel value of the reference object in the target image, finally, the skin color change condition of the skin color region to be detected is determined according to the skin color of the skin color region to be detected, the skin color change condition of the skin color region to be detected is automatically calculated, and the accuracy of obtaining the skin color change condition of the skin color to be detected is improved.
Optionally, according to the skin color value corresponding to the skin color region to be detected in each target image, the process of determining the skin color change condition corresponding to the skin color region to be detected may be:
According to the skin color value corresponding to the skin color region to be detected in each target image, determining the skin color difference value of the skin color region to be detected;
and determining a skin color difference value and determining a skin color change condition corresponding to the skin color region to be detected.
The skin color difference value may be a difference value between skin color values corresponding to the skin color region to be detected in each target image, or may be a ratio value between skin color values corresponding to the skin color region to be detected in each target image.
When the skin color difference value is obtained by subtracting the skin color value corresponding to the skin color region to be detected in the target image with the earlier shooting time from the skin color value corresponding to the skin color region to be detected in the target image with the later shooting time, or when the skin color difference value is obtained by dividing the skin color value corresponding to the skin color region to be detected in the target image with the earlier shooting time by the skin color value corresponding to the skin color region to be detected in the target image with the later shooting time, the process of determining the skin color change condition corresponding to the skin color region to be detected may be as follows:
if the skin color difference value is smaller than zero (smaller than 1), determining that the skin color change condition of the skin color region to be detected is blacking and/or yellowing;
If the skin color difference value is larger than zero (larger than 1), the skin color change condition of the skin color region to be detected is determined to be white.
Optionally, in order to enable the user to intuitively understand the skin color change condition of the user, the process of determining the skin color difference value and determining the skin color change condition corresponding to the skin color region to be detected may be:
determining a change grade corresponding to the skin color difference value;
and determining the skin color change condition corresponding to the skin color region to be detected according to the change grade.
For example, when the skin color change condition is a skin color blackness change condition, the skin color difference value is obtained by subtracting the skin color value corresponding to the skin color region to be detected in the target image with the earlier shooting time from the skin color value corresponding to the skin color region to be detected in the target image with the later shooting time, or when the skin color difference value is obtained by dividing the skin color value corresponding to the skin color region to be detected in the target image with the earlier shooting time by the skin color value corresponding to the skin color region to be detected in the target image with the later shooting time, the change level corresponding to d1 is blackness e1, d1 is smaller than d2, and the change level corresponding to d2 is blackness e1 when the skin color difference value is d1, and when the skin color difference value is d1 is smaller than d2, the change level corresponding to the skin color difference value is blackness e2, and therefore, when the skin color difference value is larger, the more and when the skin color difference value is smaller, the more the skin color difference value is the more the skin color difference value is the less the more the skin color difference value.
From the above, in the embodiment of the present application, at least two target images captured at different times are acquired, where each target image includes a skin color region to be detected and a reference object; acquiring a skin color pixel value corresponding to a skin color region to be detected in each target image, and acquiring a reference pixel value corresponding to a reference object in each target image; according to the corresponding skin color pixel value and the reference pixel value in each target image, determining the corresponding skin color value of the skin color region to be detected in each target image; according to the skin color value corresponding to the skin color region to be detected in each target image, the skin color change condition corresponding to the skin color region to be detected is determined, the skin color change condition of the region to be detected is automatically detected, the skin color change condition of the region to be detected is not required to be judged by means of human feeling, and the accuracy of detecting the skin color change condition of the region to be detected is improved.
In order to facilitate better implementation of the skin color change detection method provided by the embodiment of the application, the embodiment of the application also provides a device based on the skin color change detection method. The meaning of the nouns is the same as that in the skin color change detection method, and specific implementation details can be referred to the description in the embodiment of the method.
For example, as shown in fig. 4, the skin tone variation detecting apparatus may include:
the first obtaining module 401 is configured to obtain at least two target images that are captured at different times, where each target image includes a skin color region to be detected and a reference object.
The second obtaining module 402 is configured to obtain a skin tone pixel value corresponding to a skin tone region to be detected in each target image, and obtain a reference pixel value corresponding to a reference object in each target image.
The first determining module 403 is configured to determine a skin tone value corresponding to the skin tone region to be detected in each target image according to the corresponding skin tone pixel value and the reference pixel value in each target image.
The second determining module 404 is configured to determine, according to the skin color value corresponding to the skin color region to be detected in each target image, a skin color change condition corresponding to the skin color region to be detected.
Optionally, the second obtaining module 402 is specifically configured to perform:
determining a corresponding total area of a reference object in each target image;
screening a reference area corresponding to the reference object from the total area;
and taking the pixel value corresponding to the reference area in each target image as the reference pixel value corresponding to the reference object in each target image.
Optionally, the total area includes at least two sub-areas, and accordingly, the second obtaining module 402 is specifically configured to perform:
determining a corresponding color characteristic value of the subarea in each target image;
determining a color change value of the subarea according to the corresponding color characteristic value of the subarea in each target image;
and taking the subregion corresponding to the color change value meeting the preset difference condition as a reference region corresponding to the reference object.
Optionally, the skin tone variation condition includes a skin tone blackness variation condition, and accordingly, the second obtaining module 402 is specifically configured to perform:
acquiring a first gray value corresponding to a skin color region to be detected in each target image, and taking the first gray value as a skin color pixel value corresponding to the skin color region to be detected in each target image;
and acquiring a second gray value corresponding to the reference object in each target image, and taking the second gray value as a reference pixel value corresponding to the reference object in each target image.
Optionally, the first determining module 403 is specifically configured to perform:
fusion processing is carried out on the corresponding skin color pixel values in each target image, and fused skin color pixel values are obtained;
carrying out fusion processing on the corresponding reference pixel value in each target image to obtain a fused reference pixel value;
And determining a skin color value corresponding to the skin color region to be detected in each target image according to the fused skin color pixel value and the fused reference pixel value.
Optionally, the first determining module 403 is specifically configured to perform:
performing division fusion processing on the corresponding skin tone pixel value and the reference pixel value in each target image to obtain the ratio between the skin tone pixel value and the reference pixel value in each target image;
and determining a corresponding skin color value of the skin color region to be detected in each target image according to the ratio between the skin color pixel value and the reference pixel value in each target image.
Optionally, the second determining module 404 is specifically configured to perform:
according to the skin color value corresponding to the skin color region to be detected in each target image, determining the skin color difference value of the skin color region to be detected;
and determining a skin color difference value and determining a skin color change condition corresponding to the skin color region to be detected.
In the specific implementation, each module may be implemented as an independent entity, or may be combined arbitrarily, and implemented as the same entity or a plurality of entities, and the specific implementation and the corresponding beneficial effects of each module may be referred to the foregoing method embodiments, which are not described herein again.
The embodiment of the application also provides an electronic device, which may be a server or a terminal, as shown in fig. 5, and shows a schematic structural diagram of the electronic device according to the embodiment of the application, specifically:
the electronic device may include one or more processing cores 'processors 501, one or more computer-readable storage media's memory 502, a power supply 503, and an input unit 504, among other components. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 5 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
the processor 501 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing computer programs and/or modules stored in the memory 502, and invoking data stored in the memory 502. Optionally, processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 501.
The memory 502 may be used to store computer programs and modules, and the processor 501 performs various functional applications and data processing by executing the computer programs and modules stored in the memory 502. The memory 502 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a computer program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide access to the memory 502 by the processor 501.
The electronic device further comprises a power supply 503 for powering the various components, preferably the power supply 503 is logically connected to the processor 501 via a power management system, whereby the functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 503 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 504, which input unit 504 may be used for receiving input digital or character information and for generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 501 in the electronic device loads executable files corresponding to the processes of one or more computer programs into the memory 502 according to the following instructions, and the processor 501 executes the computer programs stored in the memory 502, so as to implement various functions, for example:
acquiring at least two target images shot at different times, wherein the target images comprise a skin color region to be detected and a reference object;
acquiring a skin color pixel value corresponding to a skin color region to be detected in each target image, and acquiring a reference pixel value corresponding to a reference object in each target image;
according to the corresponding skin color pixel value and the reference pixel value in each target image, determining the corresponding skin color value of the skin color region to be detected in each target image;
And determining the skin color change condition corresponding to the skin color region to be detected according to the skin color value corresponding to the skin color region to be detected in each target image.
The specific embodiments and the corresponding beneficial effects of the above operations can be referred to the above detailed description of the skin color change detection method, and will not be described herein.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a computer program that is capable of being loaded by a processor to perform the steps of any of the skin tone variation detection methods provided by embodiments of the present application. For example, the computer program may perform the steps of:
acquiring at least two target images shot at different times, wherein the target images comprise a skin color region to be detected and a reference object;
acquiring a skin color pixel value corresponding to a skin color region to be detected in each target image, and acquiring a reference pixel value corresponding to a reference object in each target image;
According to the corresponding skin color pixel value and the reference pixel value in each target image, determining the corresponding skin color value of the skin color region to be detected in each target image;
and determining the skin color change condition corresponding to the skin color region to be detected according to the skin color value corresponding to the skin color region to be detected in each target image.
The specific embodiments and the corresponding beneficial effects of each of the above operations can be found in the foregoing embodiments, and are not described herein again.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the computer program stored in the computer readable storage medium may execute the steps in any skin color change detection method provided in the embodiments of the present application, the beneficial effects that any skin color change detection method provided in the embodiments of the present application may be achieved are detailed in the previous embodiments, and are not described herein.
Among other things, according to one aspect of the present application, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the above skin tone variation detection method.
The foregoing describes in detail a skin color change detection method, apparatus, electronic device and computer storage medium provided in the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the foregoing description of the embodiments is only for helping to understand the method and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A skin tone variation detection method, comprising:
acquiring at least two target images shot at different times, wherein each target image comprises a skin color region to be detected and a reference object;
acquiring a corresponding skin color pixel value of the skin color region to be detected in each target image, and acquiring a corresponding reference pixel value of the reference object in each target image;
according to the corresponding skin color pixel value and the reference pixel value in each target image, determining the corresponding skin color value of the skin color region to be detected in each target image;
And determining the skin color change condition corresponding to the skin color region to be detected according to the skin color value corresponding to the skin color region to be detected in each target image.
2. The skin tone variation detection method according to claim 1, wherein the acquiring the reference pixel value corresponding to the reference object in each of the target images includes:
determining a corresponding total area of the reference object in each target image;
screening out a reference area corresponding to the reference object from the total area;
and taking the pixel value corresponding to the reference area in each target image as the reference pixel value corresponding to the reference object in each target image.
3. The skin tone variation detection method according to claim 2, wherein the total area includes at least two sub-areas, and the step of screening the reference area corresponding to the reference object from the total area includes:
determining a corresponding color characteristic value of the subarea in each target image;
determining a color change value of the subarea according to the corresponding color characteristic value of the subarea in each target image;
And taking the subregion corresponding to the color change value meeting the preset difference condition as a reference region corresponding to the reference object.
4. The skin tone variation detection method according to claim 1, wherein the skin tone variation condition includes a skin tone blackness variation condition, the acquiring a skin tone pixel value corresponding to the skin tone region to be detected in each of the target images, and acquiring a reference pixel value corresponding to the reference object in each of the target images, includes:
acquiring a first gray value corresponding to the skin color region to be detected in each target image, and taking the first gray value as a skin color pixel value corresponding to the skin color region to be detected in each target image;
and obtaining a second gray value corresponding to the reference object in each target image, and taking the second gray value as a reference pixel value corresponding to the reference object in each target image.
5. The skin tone variation detection method according to claim 1, wherein the determining the skin tone value corresponding to the skin tone region to be detected in each of the target images according to the corresponding skin tone pixel value and the reference pixel value in each of the target images includes:
Carrying out fusion processing on the corresponding skin color pixel values in each target image to obtain fused skin color pixel values;
carrying out fusion processing on the corresponding reference pixel value in each target image to obtain a fused reference pixel value;
and determining a skin color value corresponding to the skin color region to be detected in each target image according to the fused skin color pixel value and the fused reference pixel value.
6. The skin tone variation detection method according to claim 1, wherein the determining the skin tone value corresponding to the skin tone region to be detected in each of the target images according to the corresponding skin tone pixel value and the reference pixel value in each of the target images includes:
performing division fusion processing on the corresponding skin color pixel value and the reference pixel value in each target image to obtain a ratio between the skin color pixel value and the reference pixel value in each target image;
and determining the corresponding skin color value of the skin color region to be detected in each target image according to the ratio between the skin color pixel value and the reference pixel value in each target image.
7. The skin tone variation detection method according to any one of claims 1 to 6, wherein the determining, according to the skin tone value corresponding to the skin tone region to be detected in each of the target images, a skin tone variation condition corresponding to the skin tone region to be detected includes:
According to the skin color values corresponding to the skin color areas to be detected in each target image, determining skin color difference values of the skin color areas to be detected;
and determining the skin color difference value and determining the skin color change condition corresponding to the skin color region to be detected.
8. A skin tone variation detecting apparatus comprising:
the first acquisition module is used for acquiring at least two target images shot at different times, wherein the target images comprise a skin color region to be detected and a reference object;
the second acquisition module is used for acquiring a corresponding skin color pixel value of the skin color region to be detected in each target image and acquiring a corresponding reference pixel value of the reference object in each target image;
the first determining module is used for determining the skin color value corresponding to the skin color region to be detected in each target image according to the corresponding skin color pixel value and the reference pixel value in each target image;
and the second determining module is used for determining the skin color change condition corresponding to the skin color region to be detected according to the skin color value corresponding to the skin color region to be detected in each target image.
9. An electronic device comprising a processor and a memory, the memory storing a computer program, the processor configured to execute the computer program in the memory to perform the skin tone variation detection method of any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program adapted to be loaded by a processor for performing the skin tone variation detection method of any one of claims 1 to 7.
CN202310671398.0A 2023-06-07 2023-06-07 Skin color change detection method, device, electronic equipment and computer storage medium Pending CN117409220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310671398.0A CN117409220A (en) 2023-06-07 2023-06-07 Skin color change detection method, device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310671398.0A CN117409220A (en) 2023-06-07 2023-06-07 Skin color change detection method, device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN117409220A true CN117409220A (en) 2024-01-16

Family

ID=89495098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310671398.0A Pending CN117409220A (en) 2023-06-07 2023-06-07 Skin color change detection method, device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN117409220A (en)

Similar Documents

Publication Publication Date Title
CN108550101B (en) Image processing method, device and storage medium
CN109951627B (en) Image processing method, image processing device, storage medium and electronic equipment
CN113409296B (en) Core-pulling detection method of winding battery cell, electronic equipment and storage medium
CN112163174B (en) Message display method and device, storage medium and computer equipment
CN106355182A (en) Methods and devices for object detection and image processing
CN114764821B (en) Moving object detection method, moving object detection device, electronic equipment and storage medium
CN112257729A (en) Image recognition method, device, equipment and storage medium
CN117409220A (en) Skin color change detection method, device, electronic equipment and computer storage medium
CN109672829A (en) Method of adjustment, device, storage medium and the terminal of brightness of image
CN114187172A (en) Image fusion method and device, computer equipment and computer readable storage medium
CN114416005A (en) Interface display method and device and computer readable storage medium
CN110704656A (en) Picture processing method and device, storage medium and terminal
CN114374798A (en) Scene recognition method and device, electronic equipment and computer-readable storage medium
CN115601606B (en) Store state detection method, device, equipment and storage medium
CN117409219A (en) Image matching method, device, electronic equipment and computer storage medium
CN117412182A (en) Image processing method, device, electronic equipment and computer storage medium
CN117116176A (en) Content display method, apparatus, electronic device, and computer-readable storage medium
CN117435751A (en) Content display method, content display device, electronic equipment and computer storage medium
CN117412013A (en) Image quality adjustment method, image quality adjustment device, electronic device, and computer storage medium
CN117437134A (en) Image processing method, device, electronic equipment and computer storage medium
CN116977533A (en) Mapping budget method, mapping budget device, electronic equipment and computer readable storage medium
CN117726629A (en) Image processing method, apparatus, electronic device, and computer-readable storage medium
CN117978989A (en) Image color adjustment method and device, storage medium and electronic equipment
CN117058298A (en) Texture tiling method, texture tiling device, computer-readable storage medium and computer device
CN117440178A (en) Video processing method, video processing device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination