CN114693573A - High-low frequency-based real-time spot and acne removing method, device, equipment and medium - Google Patents

High-low frequency-based real-time spot and acne removing method, device, equipment and medium Download PDF

Info

Publication number
CN114693573A
CN114693573A CN202210099303.8A CN202210099303A CN114693573A CN 114693573 A CN114693573 A CN 114693573A CN 202210099303 A CN202210099303 A CN 202210099303A CN 114693573 A CN114693573 A CN 114693573A
Authority
CN
China
Prior art keywords
low
frequency information
area
frequency
image
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
CN202210099303.8A
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.)
Shenzhen Zhenshi Technology Co ltd
Original Assignee
Shenzhen Zhenshi Technology 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 Shenzhen Zhenshi Technology Co ltd filed Critical Shenzhen Zhenshi Technology Co ltd
Priority to CN202210099303.8A priority Critical patent/CN114693573A/en
Publication of CN114693573A publication Critical patent/CN114693573A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration by the use of histogram techniques
    • G06T5/70
    • G06T5/77
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Abstract

The invention discloses a high-low frequency-based real-time freckle and acne removing method, device, equipment and medium, wherein the method comprises the following steps: acquiring an original image from an intelligent terminal device or remotely, acquiring low-frequency information of the image by using a variegated filter, detecting the low-frequency information, establishing a mask area, adjusting the brightness contrast by using the mask area, deducting the low-frequency information to acquire high-frequency information of the image, detecting a defective area, searching normal skin information around the defective area, repairing the defective area based on Poisson fusion, linearly fusing the adjusted high-frequency information and the adjusted low-frequency information, and outputting a result graph; according to the invention, speckles and pox are processed separately on different frequencies, low-frequency information is obtained through a low-pass filter, and pox marks and other superficial flaws are mainly removed from the low-frequency information; the high-frequency information is obtained by subtracting the low-frequency information from the original image, and the flaw expressions such as speckles, blackheads, wrinkles and the like are combined to perform recognition and removal technology, so that the accurate and natural removal effect is achieved under the condition of not influencing facial shadows.

Description

High-low frequency-based real-time spot and acne removing method, device, equipment and medium
Technical Field
The invention relates to the technical field of image real-time processing, in particular to a high-low frequency-based real-time spot and acne removing method, device, equipment and medium.
Background
Some buffing software or PS plug-ins on the market at present make the post processing skin become very swift or convenient, but all kinds of problems appear in installation or use, for example flash back, problem such as procedure incompatibility. Meanwhile, with the development of the mobile internet, various portrait skin-beautifying convenient apps also appear on the mobile equipment, but the real-time speckle acne removing effect of the skin-beautifying apps is often not accurate enough, and the smearing sense is too heavy. With the continuous change in mainstream aesthetics in recent years, people are not liking an overly beautified skin treatment effect, but rather desire a more natural and realistic removal effect. Therefore, the applicant provides a high-low frequency-based real-time spot and acne removing method.
The method comprises the following steps of searching when an item is established, and searching a comparison file; CN201711311729.0 applied by Beijing millet Mobile software of the applicant, an image processing method and equipment thereof, wherein the image processing method comprises the following steps: acquiring an image to be processed, and determining a defective area, wherein the defective area is an area where skin defects are located; deleting original pixels of the defective area, generating filling pixels according to pixels around the defective area, and filling the defective area with the filling pixels; selecting a texture area around the defect area, wherein the pixel color value closeness of the texture area and the defect area meets a preset condition; and fusing the pixel information of the texture region to the defect region. According to the technical scheme, on the basis of removing skin flaws, high-frequency information of the texture area is supplemented to the flaw area in a pixel fusion mode, so that the effect of texture restoration is achieved, and the beautifying effect is more natural. This application is comparatively close with this application, all adopts the high frequency information of image to restore the flaw region, all adopts pixel information to fuse and carries out final output to the image. But the difference is that the pixel information fusion of the application is the high-low frequency information fusion after adjustment; the high-frequency and low-frequency information processing modes are different; the application also discloses removing the spots and the acnes in real time; generally speaking, the high frequency layer stores texture details, the low frequency layer is used for controlling the color and light shadow of the image, and from the perspective of the high frequency layer, the defect repair is realized without any problem, but the defect repair is realized by simply using high frequency information, and all defects cannot be repaired. Especially, under the condition of real-time preview, some information such as dark stripes is difficult to distinguish under the influence of noise and the like in the high-frequency information processing process, and finally, the obtained result graph is not ideal. Meanwhile, the technical scheme of the comparison document solves the problem of removing acne and spots of a static image (please refer to the application specification 0066). The application can realize real-time freckle and acne removal, and focus on removing acne marks and other superficial flaws in low-frequency information; the original image is subtracted by low-frequency information to obtain high-frequency information, and recognition and removal technologies are combined with blemish expressions such as speckles, blackheads and wrinkles, so that the precise and natural removal effect is achieved under the condition that any face shadow is not influenced, and the blemishes can be repaired to the greatest extent under the condition of real-time preview.
Disclosure of Invention
Technical scheme (I)
The invention is realized by the following technical scheme: a real-time spot and acne removing method based on high and low frequency specifically comprises the following steps:
acquiring an original image from intelligent terminal equipment or remotely;
obtaining low-frequency information of an image by using variegated filtering, and detecting the low-frequency information to establish a mask area;
adjusting the brightness contrast by using the mask area;
deducting the low-frequency information to obtain high-frequency information of the image, and detecting a defect area;
searching normal skin information around the flaw area, and repairing the flaw area based on Poisson fusion;
and performing linear fusion on the adjusted high-frequency and low-frequency information, and outputting a result graph.
As a further explanation of the above scheme, the low frequency information is obtained by using a variegated filtering, and the formula is as follows:
Figure BDA0003491852060000031
in the formula SxyA set of coordinates representing a rectangular sub-image window centered at (x, y) and having a size of m x n; g (x, y) is the pixel information of the image at position (x, y). I islow(x, y) is the result of the median filtering.
As a further illustration of the above, the mask area includes dark and highlighted pox print areas;
the establishment of the acne mark area is as follows:
a. according to low-frequency information I of the imageLowCalculating gray information L of imageLowThe formula is as follows:
LLow0.3 red value +0.59 green value +0.11 blue value;
b. counting the gray information of the image to obtain a histogram statistic value;
c. processing the gray level image based on histogram equalization, wherein the formula is as follows:
Figure BDA0003491852060000032
where n is the sum of the pixels in the image, nkIs the number of pixels of the current gray level, L is the total number of possible gray levels in the image
d. Obtaining the FlawMask of the dark pox print areaDAnd highlight the pox print area FlawMaskLThe formula is as follows:
Figure BDA0003491852060000041
Figure BDA0003491852060000042
wherein L issrcIs LLow,LblurIs LsrcAfter guided filteringAs a result of (1), T is a division threshold set to T respectivelyD0.02 and TL=0.04。
As a further explanation of the above solution, the brightness contrast adjustment performed by using the mask region is calculated by using the following formula:
ref(i,j)=0.5*(1-contrast)+I(i,j)*brightness*contrast
I′low(i,j)=Ilow(i,j)*FlawMask(i,j)+ref(i,j)*(255-FlawMask(i,j))
wherein ref (i, j) is an adjustment parameter for the position (x, y); i (I, j) is original image information; in the calculation of dark pox printing area FlawMaskDThe parameter of brightness is 1.131, and the parameter of contrast is 1.158; in the calculation of the highlight acne mark area FlawMaskLThe brightness parameter is 979, while the contrast parameter is 0.639.
As a further explanation of the above scheme, the obtaining of high frequency information of the image, detecting the defective area specifically:
a. subtracting the low frequency information or the high frequency information from the original image, the formula is as follows:
IHigh(i,j)=(I(i,j)-Ilow(i,j)*0.5+128
in the formula IHigh(i, j) is high frequency information; i (I, j) is original image information; i islow(i, j) is low frequency information;
b. based on the strong light layer superposition principle, the high-frequency image is subjected to enhancement operation, and the formula is as follows:
Figure BDA0003491852060000051
c. and identifying the defective area based on the enhanced image in the following way:
gray(i,j)=max(IHigh(i,j).r,IHigh(i,j).g,IHigh(i,j).b)
Figure BDA0003491852060000052
wherein gray (i, j) represents the maximum color value of the three color channels r, g, b at the (i, j) position in the high frequency information; the FleckMask (i, j) formula is used for judging whether the position (i, j) in the high-frequency information is a defective area; in the formula TD64 and TL=230。
As a further explanation of the above solution, the finding of normal skin information around the defect area is specifically:
a. carrying out area marking on the defective area;
b. aiming at a single flaw mark region, calculating the Euclidean distance sum of region colors in an 8-neighborhood range of the flaw mark region, wherein a neighborhood with the minimum value is used as a reference region;
c. calculating gradient fields of the high-frequency image in a defect area and a reference area;
d. replacing the gradient field of the defect region with the gradient field of the reference region;
e. calculating the divergence field of the flaw area under the result of the step d;
f. and solving a Poisson equation by using the divergence field and the high-frequency image information to obtain a repaired high-frequency result.
As a further explanation of the above scheme, the adjusted high and low frequency information is linearly fused, and the output result diagram is specifically as follows:
I′(i,j)=I′low(i,j)+2*I′high(i,j)-255
wherein I' (I, j) represents the output result; i'low(i, j) represents the adjusted low frequency information; i'high(i, j) represents the adjusted high frequency information.
The invention also provides a high-low frequency-based real-time spot and acne removing method, which is characterized by comprising the following steps:
the acquisition unit is used for acquiring an image to be original;
a processing unit: the system comprises a mask area, a low-frequency filter area and a filter area, wherein the mask area is used for carrying out variegated filtering on an original image to obtain image low-frequency information and detecting the low-frequency information to establish the mask area; adjusting the brightness contrast by using the mask area; deducting the low-frequency information to obtain high-frequency information of the image, and detecting a defect area; searching normal skin information around the flaw area, and repairing the flaw area based on Poisson fusion; the adjusted high-frequency and low-frequency information is linearly fused, and a result graph is output
A preview unit: for previewing the result map output by the processing unit.
The invention also provides high-low frequency-based real-time spot and acne removing equipment, which comprises a processor, a memory and a computer program stored in the memory, wherein the computer program can be executed by the processor to realize a high-low frequency-based real-time spot and acne removing method.
The invention also provides a computer readable storage medium, which includes a stored computer program, wherein when the computer program runs, the apparatus where the computer readable storage medium is located is controlled to execute a high and low frequency-based real-time spot and acne removing method.
(III) advantageous effects
Compared with the prior art, the invention has the following beneficial effects: because flaws such as speckles, acne marks and the like are separately detected on different frequency information, the method can detect more flaws and is more accurate than a common identification scheme. Because the brightness contrast adjustment is carried out on the acne marks and the like on the low-frequency information, a cleaner removing effect can be achieved on shallower flaws. As the Poisson fusion filling is carried out on the high-frequency information by using the adjacent region, more natural and real repairing effect can be achieved without discomfort.
Detailed Description
Examples
The present invention is described in further detail below. It is to be noted that the following examples are only illustrative of the present invention, and do not limit the scope of the present invention. Likewise, the following examples are only some examples, not all examples, and all other examples obtained by those skilled in the art without any inventive work are within the scope of the present invention. The present invention will be described in detail with reference to the following examples.
A real-time spot and acne removing method based on high and low frequency specifically comprises the following steps:
acquiring an original image from intelligent terminal equipment or remotely; it needs to be further explained that the obtaining mode of the original image includes the obtaining of the intelligent terminal device; the intelligent terminal device may include a smart phone, a tablet computer, a notebook, a wearable device, a vehicle-mounted intelligent terminal, a video phone, a conference terminal, and the like. The present embodiment assumes that the terminal is a smartphone, but those skilled in the art will appreciate that the configuration according to the embodiment of the present invention can be applied to a fixed-type terminal in addition to elements particularly used for mobile purposes. The original image uses RGBA data. For an application scenario with high real-time requirement, the detection of the defective area can be performed by processing a brightness channel (such as a YUV format Y channel and a Lab format L channel) of the image, and then the repairing operation is performed on all the RGBA data of the image.
The low-frequency information of the image is obtained by the variegated filtering, specifically, the low-frequency information of the image is obtained by the variegated filtering reduction of the original image, and is named as ILow. The basic principle of the median filtering is to replace the value of one point in a digital image or a digital sequence by the median of all point values in a neighborhood of the point, and to make the surrounding pixel values close to the true values, thereby eliminating the isolated noise point. A median filter is therefore chosen that filters out noise while at the same time protecting the edges well. The calculation formula is as follows:
Figure BDA0003491852060000081
in the formula SxyA set of coordinates representing a rectangular sub-image window centered at (x, y) and having a size of m x n; g (x, y) is the pixel information of the image at position (x, y). I islow(x, y) is the result of the median filtering.
Detecting the low-frequency information and establishing a mask area, specifically detecting dark and bright acne mark areas of the obtained low-frequency information so as to obtain the corresponding maskBoard FlawMaskDAnd FlawMaskL
a. According to low-frequency information I of the imageLowCalculating gray information L of imageLowThe formula is as follows:
LLowred value + 0.3 red value +0.59 green value +0.11 blue value; it should be further noted that the red, green, and blue values mentioned herein refer to RGB color values
b. Counting the gray information of the image to obtain a histogram statistic value;
c. processing the gray level image based on histogram equalization, wherein the formula is as follows:
Figure BDA0003491852060000091
where n is the sum of the pixels in the image, nkIs the number of pixels of the current gray level, and L is the total number of possible gray levels in the image
d. Obtaining the FlawMask of the dark pox print areaDAnd highlight the pox print area FlawMaskLThe formula is as follows:
Figure BDA0003491852060000092
Figure BDA0003491852060000093
wherein L issrcIs LLow,LblurIs LsrcThe result after the guiding filtering, T is the segmentation threshold value and is set as T respectivelyD0.02 and TL0.04. It should be further noted that the method for detecting the area used herein adopts a threshold segmentation method, and the threshold segmentation has the advantages of simple calculation, high computational efficiency, and high speed.
Using the mask area to adjust brightness contrast, specifically using the obtained mask area, for ILowAdjusting brightness contrast to brighten dark poxA seal area and a shadow seal area.
The brightness contrast adjustment calculates the output adjustment result by the following formula:
ref(i,j)=0.5*(1-contrast)+I(i,j)*brightness*contrast
I′low(i,j)=Ilow(i,j)*FlawMask(i,j)+ref(i,j)*(255-FlawMask(i,j))
wherein ref (i, j) is an adjustment parameter for the position (x, y); i (I, j) is original image information; in the calculation of dark pox printing area FlawMaskDThe parameter of brightness is 1.131, and the parameter of contrast is 1.158; in the calculation of the highlight acne mark area FlawMaskLThe brightness parameter is 979, while the contrast parameter is 0.639.
Deducing the low-frequency information to obtain the high-frequency information of the image, detecting the defect area,
a. subtracting the low frequency information or the high frequency information from the original image, the formula is as follows:
IHigh(i,j)=(I(i,j)-Ilow(i,j)*0.5+128
in the formula IHigh(i, j) is high frequency information; i (I, j) is original image information; i islow(i, j) is low frequency information;
b. based on the strong light layer superposition principle, the high-frequency image is subjected to enhancement operation, and the formula is as follows:
Figure BDA0003491852060000101
c. and identifying the defective area based on the enhanced image in the following way:
gray(i,j)=max(IHigh(i,j).r,IHigh(i,j).g,IHigh(i,j).b)
Figure BDA0003491852060000102
wherein gray (i, j) represents the maximum color value of the three color channels r, g, b at the (i, j) position in the high frequency information; FleckMaThe sk (i, j) formula is used for judging whether the position (i, j) in the high-frequency information is a defective area; in the formula TD64 and TL=230。
Searching normal skin information around the flaw area, and repairing the flaw area based on Poisson fusion;
a. carrying out area marking on the defective area;
b. aiming at a single flaw mark region, calculating the Euclidean distance sum of region colors in an 8-neighborhood range of the flaw mark region, wherein a neighborhood with the minimum value is used as a reference region;
c. calculating gradient fields of the high-frequency image in a defect area and a reference area;
d. replacing the gradient field of the defect region with the gradient field of the reference region;
e. calculating the divergence field of the flaw area under the result of the step d;
f. and solving a Poisson equation by using the divergence field and the high-frequency image information to obtain a repaired high-frequency result.
And performing linear fusion on the adjusted high-frequency and low-frequency information, and outputting a result graph. The concrete steps are as follows:
I′(i,j)=I′low(i,j)+2*I′high(i,j)-255
wherein I' (I, j) represents the output result; i'low(i, j) represents the adjusted low frequency information; i'high(i, j) represents the adjusted high frequency information.
The embodiment has the advantages that: because flaws such as speckle, pox mark and the like are separately detected on different frequency information, the method can detect more flaws and is more accurate than a common identification scheme. Because the brightness contrast adjustment is carried out on the acne marks and the like on the low-frequency information, a cleaner removing effect can be achieved on shallower flaws. As the Poisson fusion filling is carried out on the high-frequency information by using the adjacent region, more natural and real repairing effect can be achieved without discomfort.
A real-time spot and acne removing method based on high and low frequency is characterized in that the device comprises:
the acquisition unit is used for acquiring an image to be original;
a processing unit: the system comprises a mask area, a low-frequency filter area and a filter area, wherein the mask area is used for carrying out variegated filtering on an original image to obtain image low-frequency information and detecting the low-frequency information to establish the mask area; adjusting the brightness contrast by using the mask area; deducting the low-frequency information to obtain high-frequency information of the image, and detecting a defect area; searching normal skin information around the flaw area, and repairing the flaw area based on Poisson fusion; the adjusted high-frequency and low-frequency information is linearly fused, and a result graph is output
A preview unit: for previewing the result map output by the processing unit.
A high-low frequency-based real-time spot and acne removing device includes a processor, a memory, and a computer program stored in the memory, where the computer program is executable by the processor to implement the high-low frequency-based real-time spot and acne removing method according to the above embodiments.
A computer-readable storage medium, which includes a stored computer program, wherein when the computer program runs, the computer-readable storage medium is controlled to implement a device on which the computer-readable storage medium is located to perform the high-low frequency-based real-time spot and acne removing method according to the above embodiment.
Illustratively, the computer program may be divided into one or more units, which are stored in the memory and executed by the processor to accomplish the present invention. The one or more units can be a series of instruction sections of a computer program capable of performing specific functions, and the instruction sections are used for describing the execution process of the computer program in the real-time freckle and acne removing device based on high and low frequency.
The high-low frequency based real-time speckle and acne removing device can comprise, but is not limited to, a processor and a memory.
It will be understood by those skilled in the art that the schematic diagram is merely an example of a real-time speckle removing and acne removing device based on high and low frequencies, and does not constitute a limitation of the real-time speckle removing and acne removing device based on high and low frequencies, and may include more or less components than those shown in the figure, or combine some components, or different components, for example, the real-time speckle removing and acne removing device based on high and low frequencies may further include an input and output device, a network access device, a bus, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general processor can be a microprocessor or the processor can be any conventional processor and the like, and the control center of the high-low frequency-based real-time freckle and acne removing device is connected with various interfaces and lines to various parts of the whole high-low frequency-based real-time freckle and acne removing device.
The memory can be used for storing the computer program and/or the module, and the processor realizes various functions of the high and low frequency-based real-time freckle and acne removing device by running or executing the computer program and/or the module stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The high-low frequency-based real-time spot and acne removing device integrated unit can be stored in a computer readable storage medium if the unit is realized in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc.
The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
The embodiments in the above embodiments can be further combined or replaced, and the embodiments are only used for describing the preferred embodiments of the present invention, and do not limit the concept and scope of the present invention, and various changes and modifications made to the technical solution of the present invention by those skilled in the art without departing from the design idea of the present invention belong to the protection scope of the present invention.

Claims (10)

1. A real-time spot and acne removing method based on high and low frequency is characterized by specifically comprising the following steps:
acquiring an original image from intelligent terminal equipment or remotely;
obtaining low-frequency information of an image by using variegated filtering, and detecting the low-frequency information to establish a mask area;
adjusting the brightness contrast by using the mask area;
deducting the low-frequency information to obtain high-frequency information of the image, and detecting a flaw area;
searching normal skin information around the flaw area, and repairing the flaw area based on Poisson fusion;
and performing linear fusion on the adjusted high-frequency and low-frequency information, and outputting a result graph.
2. The method for removing spots and acnes in real time based on high frequency according to claim 1,
the low-frequency information is obtained by adopting a variegated filtering mode, and the formula is as follows:
Figure FDA0003491852050000011
in the formula SxyA set of coordinates representing a rectangular sub-image window centered at (x, y) and having a size of m x n; g (x, y) is the pixel information of the image at position (x, y). I islow(x, y) is the result of the median filtering.
3. The method for removing spots and acnes in real time based on high frequency according to claim 1,
the mask area comprises dark and bright acne mark areas;
the establishment of the acne mark area is as follows:
a. according to low-frequency information I of the imageLowCalculating gray information L of imageLowThe formula is as follows:
LLowred value + 0.3 red value +0.59 green value +0.11 blue value;
b. counting the gray information of the image to obtain a histogram statistic value;
c. processing the gray level image based on histogram equalization, wherein the formula is as follows:
Figure FDA0003491852050000021
where n is the sum of the pixels in the image, nkIs the number of pixels of the current gray level, and L is the total number of possible gray levels in the image
d. Obtaining the FlawMask of the dark pox print areaDAnd highlight the pox print area FlawMaskLThe formula is as follows:
Figure FDA0003491852050000022
Figure FDA0003491852050000023
wherein L issrcIs LLow,LblurIs LsrcThe result after the guiding filtering, T is the segmentation threshold value and is set as T respectivelyD0.02 and TL=0.04。
4. The method for removing spots and acnes in real time based on high frequency according to claim 1,
and utilizing the mask area to adjust the brightness contrast, and calculating an output adjustment result by the following formula:
ref(i,j)=0.5*(1-contrast)+I(i,j)*brightness*contrast
I′low(i,j)=Ilow(i,j)*FlawMask(i,j)+ref(i,j)*(255-FlawMask(i,j))
wherein ref (i, j) is an adjustment parameter for the position (x, y); i (I, j) is original image information; in the calculation of dark pox printing area FlawMaskDThe parameter of brightness is 1.131, and the parameter of contrast is 1.158; in the calculation of the highlight acne mark area FlawMaskLThe brightness parameter is 979, while the contrast parameter is 0.639.
5. The method for removing spots and acnes in real time based on high frequency according to claim 1,
the obtaining of the high-frequency information of the image and the detection of the defect area are specifically as follows:
a. subtracting the low frequency information or the high frequency information from the original image, the formula is as follows:
IHigh(i,j)=(I(i,j)-Ilow(i,j)*0.5+128
in the formula IHigh(i, j) is high frequency information; i (I, j) is original image information; i islow(i, j) is low frequency information;
b. based on the strong light layer superposition principle, the high-frequency image is subjected to enhancement operation, and the formula is as follows:
Figure FDA0003491852050000031
c. and identifying the defective area based on the enhanced image in the following way:
gray(i,j)=max(IHigh(i,j).r,IHigh(i,j).g,IHigh(i,j).)
Figure FDA0003491852050000032
wherein gray (i, j) represents the maximum color value of the three color channels r, g, b at the (i, j) position in the high frequency information; the FleckMask (i, j) formula is used for judging whether the position (i, j) in the high-frequency information is a defective area;in the formula TD64 and TL=230。
6. The method for removing spots and acnes in real time based on high frequency according to claim 1,
the specific step of searching for normal skin information around the defect area is as follows:
a. carrying out area marking on the defective area;
b. aiming at a single flaw mark region, calculating the Euclidean distance sum of region colors in an 8-neighborhood range of the flaw mark region, wherein a neighborhood with the minimum value is used as a reference region;
c. calculating gradient fields of the high-frequency image in a defect area and a reference area;
d. replacing the gradient field of the defect region with the gradient field of the reference region;
e. calculating the divergence field of the flaw area under the result of the step d;
f. and solving a Poisson equation by using the divergence field and the high-frequency image information to obtain a repaired high-frequency result.
7. The method for removing spots and acnes in real time based on high frequency according to claim 1,
and performing linear fusion on the adjusted high-frequency and low-frequency information, and outputting a result diagram as follows:
I′(i,j)=I′low(i,j)+2*I′high(i,j)-255
wherein I' (I, j) represents the output result; i'low(i, j) represents the adjusted low frequency information; i'high(i, j) represents the adjusted high frequency information.
8. A high-low frequency-based real-time device for removing spots and acnes, the device comprising:
the acquisition unit is used for acquiring an image to be original;
a processing unit: the system comprises a mask area, a low-frequency filter area and a filter area, wherein the mask area is used for carrying out variegated filtering on an original image to obtain image low-frequency information and detecting the low-frequency information to establish the mask area; adjusting the brightness contrast by using the mask area; deducting the low-frequency information to obtain high-frequency information of the image, and detecting a defect area; searching normal skin information around the flaw area, and repairing the flaw area based on Poisson fusion; performing linear fusion on the adjusted high-frequency and low-frequency information, and outputting a result graph;
a preview unit: for previewing the result map output by the processing unit.
9. A high-low frequency-based real-time spot-removing and acne-removing apparatus, comprising a processor, a memory, and a computer program stored in the memory, wherein the computer program is executable by the processor to implement a high-low frequency-based real-time spot-removing and acne-removing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program runs, the computer-readable storage medium is controlled to execute a high-low frequency-based real-time spot and acne removing method according to any one of claims 1 to 7.
CN202210099303.8A 2022-01-27 2022-01-27 High-low frequency-based real-time spot and acne removing method, device, equipment and medium Pending CN114693573A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210099303.8A CN114693573A (en) 2022-01-27 2022-01-27 High-low frequency-based real-time spot and acne removing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210099303.8A CN114693573A (en) 2022-01-27 2022-01-27 High-low frequency-based real-time spot and acne removing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114693573A true CN114693573A (en) 2022-07-01

Family

ID=82137692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210099303.8A Pending CN114693573A (en) 2022-01-27 2022-01-27 High-low frequency-based real-time spot and acne removing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114693573A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116245754A (en) * 2022-12-29 2023-06-09 北京百度网讯科技有限公司 Image processing method, device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116245754A (en) * 2022-12-29 2023-06-09 北京百度网讯科技有限公司 Image processing method, device, electronic equipment and storage medium
CN116245754B (en) * 2022-12-29 2024-01-09 北京百度网讯科技有限公司 Image processing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US8131084B2 (en) Apparatus for improving sharpness of image
CN109272459A (en) Image processing method, device, storage medium and electronic equipment
EP3644599B1 (en) Video processing method and apparatus, electronic device, and storage medium
CN104486552B (en) A kind of method and electronic equipment obtaining image
CN111784605B (en) Image noise reduction method based on region guidance, computer device and computer readable storage medium
CN110691226B (en) Image processing method, device, terminal and computer readable storage medium
CN115631117B (en) Image enhancement method, device, detection system and storage medium for defect detection
KR20110124965A (en) Apparatus and method for generating bokeh in out-of-focus shooting
CN106570838A (en) Image brightness optimization method and device
CN112887693B (en) Image purple border elimination method, equipment and storage medium
CN106846271B (en) Method for removing reticulate pattern in identity card photo
Xiao et al. Fast image enhancement based on color space fusion
CN104504703A (en) Welding spot color image segmentation method based on chip element SMT (surface mounting technology)
CN113034509A (en) Image processing method and device
CN111815729B (en) Real-time skin beautifying method, device, equipment and computer storage medium
CN111383181A (en) Image enhancement method and device, storage medium and terminal
CN113808027A (en) Human body image processing method and device, electronic equipment and storage medium
CN114298985B (en) Defect detection method, device, equipment and storage medium
CN114693573A (en) High-low frequency-based real-time spot and acne removing method, device, equipment and medium
AU2015259903B2 (en) Segmentation based image transform
CN112446830A (en) Image color edge processing method and device, storage medium and electronic equipment
KR101089902B1 (en) Apparatus and method for estimating edge of digital image
AU2016273984A1 (en) Modifying a perceptual attribute of an image using an inaccurate depth map
CN110086997B (en) Face image exposure brightness compensation method and device
CN113610091A (en) Intelligent identification method and device for air switch state and 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