CN108053377A - Image processing method and equipment - Google Patents

Image processing method and equipment Download PDF

Info

Publication number
CN108053377A
CN108053377A CN201711311729.0A CN201711311729A CN108053377A CN 108053377 A CN108053377 A CN 108053377A CN 201711311729 A CN201711311729 A CN 201711311729A CN 108053377 A CN108053377 A CN 108053377A
Authority
CN
China
Prior art keywords
defect areas
region
pixel
texture region
color value
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
CN201711311729.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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201711311729.0A priority Critical patent/CN108053377A/en
Publication of CN108053377A publication Critical patent/CN108053377A/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/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The disclosure, which provides image processing method and equipment, image processing method, to be included:Pending image is obtained, determines defect areas, the defect areas is skin blemishes region;The original pixels of the defect areas are deleted, filler pixels are generated according to the pixel around the defect areas, the defect areas is filled with the filler pixels;Texture region is selected around the defect areas, the texture region and the pixel color value degree of closeness of the defect areas meet preset condition;The Pixel Information of the texture region is fused to the defect areas.The high-frequency information of texture region is added to defect areas by way of pixel fusion, plays the role of texture repairing by the technical solution on the basis of skin blemishes are removed so that U.S. face effect is more natural.

Description

Image processing method and equipment
Technical field
This disclosure relates to technical field of image processing more particularly to image processing method and equipment.
Background technology
U.S. face function has the effect of removal acne print, however after U.S. face function treatment, the skin of original acne print position Lack dermatoglyph so that U.S. face effect is simultaneously unnatural.
The content of the invention
Embodiment of the disclosure provides image processing method and equipment, technical solution are as follows:
According to the embodiment of the present disclosure in a first aspect, provide a kind of image processing method, including:
Pending image is obtained, determines defect areas, the defect areas is skin blemishes region;
The original pixels of the defect areas are deleted, filler pixels are generated according to the pixel around the defect areas, with The filler pixels fill the defect areas;
Texture region, the texture region and the pixel color of the defect areas are selected around the defect areas Value degree of closeness meets preset condition;
The Pixel Information of the texture region is fused to the defect areas.
The technical solution that the disclosure provides is generated filler pixels according to the pixel around defect areas, is filled out with filler pixels Defect areas is filled to remove the skin blemishes of defect areas, on this basis, selection and defect areas around defect areas The Pixel Information of texture region is fused to defect areas by the close region of pixel color value, i.e. texture region.Pixel Information bag High-frequency information is included, high-frequency information forms the edge and details of image, and the Pixel Information of texture region is fused to defect areas High-frequency information can be supplemented to defect areas, to enhance the dermatoglyph details of defect areas, play the role of texture repairing, make It is more natural to obtain U.S. face effect.
In one embodiment, it is described that texture region is selected around the defect areas, including:
Centered on the defect areas, the neighboring area that size is preset value delimited;
In the neighboring area, select that size and shape is identical with the defect areas and pixel color value degree of closeness Meet the region of the preset condition, selection area is determined as the texture region.
In one embodiment, the selected size and shape is identical with the defect areas and pixel color value is close to journey Degree meets the region of the preset condition, including:
The neighboring area is traveled through with the size and shape sliding window identical with the defect areas;
Calculate the color value distance between the sliding window region and the defect areas;
Region during selected color value distance minimum where the sliding window.
In one embodiment, the Pixel Information by the texture region is fused to the defect areas, including:
The pixel of the texture region is fused to the defect areas according to fusion coefficients α;
Wherein, 0 < α < 1, and the color value between α and the texture region and the defect areas is apart from positive correlation.
In one embodiment, the definite defect areas, including:
Detect the skin blemishes of portrait area;
Determine skin blemishes border.
According to the second aspect of the embodiment of the present disclosure, a kind of image processing equipment is provided, including:
Detection module for obtaining pending image, determines defect areas, and the defect areas is skin blemishes location Domain;
Module is filled, for deleting the original pixels of the defect areas, is given birth to according to the pixel around the defect areas Into filler pixels, the defect areas is filled with the filler pixels;
Chosen module, for selecting texture region, the texture region and the flaw around the defect areas The pixel color value degree of closeness in region meets preset condition;
Fusion Module, for the Pixel Information of the texture region to be fused to the defect areas.
In one embodiment, the chosen module includes:
Submodule delimited in candidate region, for centered on the defect areas, delimiting the peripheral region that size is preset value Domain;
With reference to selected submodule, in the neighboring area, it is identical with the defect areas to select size and shape And pixel color value degree of closeness meets the region of the preset condition, and selection area is determined as the texture region.
In one embodiment, it is described to include with reference to selected submodule:
Traversal Unit, for traveling through the peripheral region with the size and shape sliding window identical with the defect areas Domain;
Computing unit, for calculating the color value distance between the sliding window region and the defect areas;
Comparing unit, for select color value distance it is minimum when the sliding window where region.
In one embodiment, the Fusion Module includes:
Ratio merges submodule, for the pixel of the texture region to be fused to the flaw area according to fusion coefficients α Domain;
Wherein, 0 < α < 1, and the color value between α and the texture region and the defect areas is apart from positive correlation.
In one embodiment, the detection module includes:
Defect Detection submodule, for detecting the skin blemishes of portrait area;
Submodule is positioned, for determining skin blemishes border.
According to the third aspect of the embodiment of the present disclosure, a kind of image processing equipment is provided, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Pending image is obtained, determines defect areas, the defect areas is skin blemishes region;
The original pixels of the defect areas are deleted, filler pixels are generated according to the pixel around the defect areas, with The filler pixels fill the defect areas;
Texture region, the texture region and the pixel color of the defect areas are selected around the defect areas Value degree of closeness meets preset condition;
The Pixel Information of the texture region is fused to the defect areas.
According to the fourth aspect of the embodiment of the present disclosure, a kind of computer readable storage medium is provided, is stored thereon with calculating Machine instructs, and the step of first aspect provides image processing method is realized when which is executed by processor.
It should be appreciated that above general description and following detailed description are only exemplary and explanatory, not The disclosure can be limited.
Description of the drawings
Attached drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the disclosure Example, and for explaining the principle of the disclosure together with specification.
Fig. 1 is the flow chart according to the image processing method shown in an exemplary embodiment.
Fig. 2 is the flow chart according to the image processing method shown in an exemplary embodiment.
Fig. 3 is the block diagram according to the electronic equipment shown in an exemplary embodiment.
Fig. 4 is the block diagram according to the electronic equipment shown in an exemplary embodiment.
Fig. 5 is the block diagram according to the electronic equipment shown in an exemplary embodiment.
Fig. 6 is the block diagram according to the electronic equipment shown in an exemplary embodiment.
Fig. 7 is the block diagram according to the electronic equipment shown in an exemplary embodiment.
Fig. 8 is the block diagram according to the electronic equipment shown in an exemplary embodiment.
Fig. 9 is the block diagram according to the terminal device shown in an exemplary embodiment.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, example is illustrated in the accompanying drawings.Following description is related to During attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
U.S. face function is widely used in the various electronic products with photography and vedio recording function, common such as hand in life Machine, digital camera etc..U.S. face function can remove the flaw on skin, such as removal acne print, color spot etc..However pass through U.S. face After function treatment, the skin of original flaw position lacks dermatoglyph and causes U.S. face effect and unnatural.
The disclosure provides a kind of image processing method and equipment, it is therefore intended that on the basis of skin blemishes are removed, in original The texture of first flaw position supplement normal skin, so that U.S. face effect is more natural.
Fig. 1 is according to a kind of flow chart of image processing method shown in an exemplary embodiment, and this method is applied to figure As processing equipment, image processing equipment includes the equipment such as digital camera, mobile phone, tablet with U.S. face function.Image processing method Method includes step 101-104:
In a step 101, pending image is obtained, determines defect areas.
Pending image can be the photo of shooting gained, from the photo or figure received by network either other equipment Piece etc., usually with character image, such as self-timer obtained photo, personage's poster etc..
Defect areas is skin blemishes region.Skin blemishes include acne print, color spot etc..
By taking skin blemishes is the situations of acne print as an example, can the acne print on skin be identified by grader.Skin blemishes Species and the training method of grader can there are many, for example, training to obtain acne print detector by adaboost methods, lead to It crosses the detector and detects acne print on face.
After determining skin blemishes by grader, the border of skin blemishes can be done and further portrayed, accurately to delimit the flaw The scope in defect region.In one embodiment, after identifying skin blemishes by grader, skin blemishes position color is calculated The Grad of value determines that the position (pixel) that the Grad is more than predetermined threshold value is skin blemishes border.By skin blemishes border The enclosed region of connection composition is defect areas.
In a step 102, the original pixels of defect areas are deleted, according to the pixel generation filling picture around defect areas Element fills defect areas with filler pixels.
The original pixels of defect areas are deleted, defect areas becomes white space.According to the pixel around white space come Fill the white space.
For example, using inpaint algorithms, by taking a blank pixel of white space and peripheral region boundary as an example, take A neighborhood around the pixel, the neighborhood include several known pixels of peripheral region, according to the color value of known pixels, with And weight function, the color value of blank pixel is calculated.
Wherein weight function is default Weights-selected Algorithm, for limiting in neighborhood each known pixels to blank pixel color value Contribution.It is usually bigger for the color value contribution of blank pixel apart from the blank pixel nearer known pixels of distance, i.e., The nearer corresponding weights of known pixels of distance are bigger.
It is filled in the blanks pixel with the color value being calculated, which becomes known pixels.Similarly, from clear area The edge in domain gradually promotes layer by layer to center, whole pixels until having filled white space.
In step 103, the pixel color of texture region, texture region and defect areas is selected around defect areas Value degree of closeness meets preset condition.
In one embodiment, centered on defect areas, the neighboring area that size is preset value delimited, neighboring area Size is more than defect areas.In neighboring area, select that size and shape is identical with defect areas and pixel color value is close to journey Degree meets the region of preset condition, and selection area is determined as texture region.
Preset condition is used to limit the color value degree of closeness of texture region and defect areas.For example, preset condition is:Difference Value ratio is no more than default ratio value.
Wherein, difference ratio is the sum of color difference of texture region and defect areas same position pixel, with flaw area The ratio of the sum of each pixel color value in domain.Default ratio value takes the value between 0 to 1, and the value is smaller, texture region and flaw area The color value in domain is closer.
At step 104, the Pixel Information of texture region is fused to defect areas.
Image information includes low-frequency information and high-frequency information, and low-frequency information forms the basic tonal gradation of image, high frequency Information forms the edge and details of image.Filler pixels are generated according to the pixel around defect areas, parts of images can be lost Information.
The main component of image information is low-frequency information, and filler pixels more remain low-frequency information relatively, and lose High-frequency information on image detail.It can be to defect areas by the way that the Pixel Information of texture region is fused to defect areas High-frequency information is supplemented, to enhance the dermatoglyph details of defect areas, plays the role of texture repairing so that U.S. face effect is more It is natural
The image processing method that the embodiment of the present disclosure provides generates filler pixels according to the pixel around defect areas, with Filler pixels fill defect areas to remove the skin blemishes of defect areas, on this basis, around defect areas selection with The close region of the pixel color value of defect areas, i.e. texture region, defect areas is fused to by the Pixel Information of texture region. Pixel Information includes high-frequency information, and high-frequency information forms the edge and details of image, and the Pixel Information of texture region is merged High-frequency information can be supplemented to defect areas to defect areas, to enhance the dermatoglyph details of defect areas, play texture and repair Multiple effect so that U.S. face effect is more natural.
Based on the image processing method that the corresponding embodiments of above-mentioned Fig. 1 provide, Fig. 2 is shown according to an exemplary embodiment A kind of image processing method flow chart.In the corresponding embodiments of Fig. 2, further supplement is done to texture repairing process and has been said Bright, the step in content embodiment corresponding with Fig. 1 in which part step is same or like, below only to different in step Part elaborates.With reference to shown in Fig. 2, image processing method provided in this embodiment includes step 201-205:
In step 201, pending image is obtained, determines defect areas.
In step 202, the original pixels of defect areas are deleted, according to the pixel generation filling picture around defect areas Element fills defect areas with filler pixels.
In one embodiment, filler pixels are generated using patchmatch algorithms.Patchmatch algorithms are with block (English Text:Patch it is) unit, determines that defect areas marginal portion most matches the region of (match) with picture other parts, utilize this The pixel of matching area fills up defect areas edge, reaches natural effect.
In step 203, centered on defect areas, the neighboring area that size is preset value delimited.
Neighboring area is for selecting the range of choice of texture region.In one embodiment, neighboring area is with flaw Centered on region, size is the region of L*L, and L can be the quantity of pixel.The size of neighboring area is more than defect areas.Such as L Value be K times of defect areas diameter, K is the positive number more than 1.
In step 204, in neighboring area, selected size and shape is identical with defect areas and color value distance is minimum Region.
In one embodiment, neighboring area is traveled through with the size and shape sliding window identical with defect areas, calculated Color value distance between sliding window region and defect areas, when selecting color value distance minimum where sliding window Region.
Wherein, color value distance is:Sliding window region and the color difference of same position pixel in defect areas The sum of, the business with number of pixels.
In step 205, the pixel of texture region is fused to defect areas according to fusion coefficients.
The pixel of fusion gained is represented with P, with S1The pixel of defect areas after expression removal skin blemishes, with S2It represents The pixel of texture region, in one embodiment, P=α * S1+ (1- α) * S2.Wherein, α is fusion coefficients, 0 < α < 1.
In one embodiment, the value of α is preset value.
In one embodiment, color value distance between texture region and defect areas, α values and D positives are represented with D It closes.
D is smaller, represents that the color value between texture region and defect areas is closer, at this time S2Weight (1- α) it is higher, S1Weight α it is lower.
D is bigger, represents that the color data error between texture region and defect areas is bigger, at this time S2Weight (1- α) more It is low, S1Weight α it is higher.
The image processing method that the embodiment of the present disclosure provides generates filler pixels according to the pixel around defect areas, with Filler pixels fill defect areas to remove the skin blemishes of defect areas, on this basis, around defect areas selection with The close region of the pixel color value of defect areas, i.e. texture region, defect areas is fused to by the Pixel Information of texture region. Pixel Information includes high-frequency information, and high-frequency information forms the edge and details of image, and the Pixel Information of texture region is merged High-frequency information can be supplemented to defect areas to defect areas, to enhance the dermatoglyph details of defect areas, play texture and repair Multiple effect so that U.S. face effect is more natural.
Following is disclosure apparatus embodiments, can be used for performing embodiments of the present disclosure.
Fig. 3 is according to the block diagram of a kind of electronic equipment shown in an exemplary embodiment, which can be by software, hard Part or both is implemented in combination with its some or all of function, for performing described in the corresponding embodiments of Fig. 1-Fig. 2 Image processing method.As shown in figure 3, electronic equipment includes:
Detection module 31 for obtaining pending image, determines defect areas, and defect areas is skin blemishes location Domain.
Module 32 is filled, for deleting the original pixels of defect areas, filling is generated according to the pixel around defect areas Pixel fills defect areas with filler pixels.
Chosen module 33, for selecting the pixel of texture region, texture region and defect areas around defect areas Color value degree of closeness meets preset condition.
Fusion Module 34, for the Pixel Information of texture region to be fused to defect areas.
As shown in figure 4, in one embodiment, chosen module 33 includes:
Submodule 331 delimited in candidate region, for centered on defect areas, delimiting the peripheral region that size is preset value Domain.
With reference to selected submodule 332, in neighboring area, selecting, size and shape is identical with defect areas and pixel Color value degree of closeness meets the region of preset condition, and selection area is determined as texture region.
As shown in figure 5, in one embodiment, include with reference to selected submodule 332:
Traversal Unit 3321, for traveling through neighboring area with the size and shape sliding window identical with defect areas.
Computing unit 3322, for calculating the color value distance between sliding window region and defect areas.
Comparing unit 3323, for select color value distance it is minimum when sliding window where region.
As shown in fig. 6, in one embodiment, Fusion Module 34 includes:
Ratio merges submodule 341, for the pixel of texture region to be fused to defect areas according to fusion coefficients α.
Wherein, 0 < α < 1, and the color value between α and texture region and defect areas is apart from positive correlation.
As shown in fig. 7, in one embodiment, detection module 31 includes:
Defect Detection submodule 311, for detecting the skin blemishes of portrait area.
Submodule 312 is positioned, for determining skin blemishes border.
The electronic equipment that the embodiment of the present disclosure provides generates filler pixels, with filling according to the pixel around defect areas Pixel filling defect areas is to remove the skin blemishes of defect areas, on this basis, selection and flaw around defect areas The close region of the pixel color value in region, i.e. texture region, defect areas is fused to by the Pixel Information of texture region.Pixel Information includes high-frequency information, and high-frequency information forms the edge and details of image, the Pixel Information of texture region is fused to the flaw Defect region can supplement high-frequency information to defect areas, to enhance the dermatoglyph details of defect areas, play texture repairing Effect so that U.S. face effect is more natural.
Fig. 8 is according to the block diagram of a kind of electronic equipment shown in an exemplary embodiment, which can be by software, hard Part or both is implemented in combination with as some or all of of electronic equipment, which is used to perform above-mentioned Fig. 1-Fig. 2 Image processing method described in corresponding embodiment.As shown in figure 8, electronic equipment 80 includes:
Processor 801.
For storing the memory 802 of 801 executable instruction of processor.
Wherein, processor 801 is configured as:
Pending image is obtained, determines defect areas, defect areas is skin blemishes region.
The original pixels of defect areas are deleted, filler pixels are generated according to the pixel around defect areas, with filler pixels Fill defect areas.
The pixel color value degree of closeness of the selected texture region around defect areas, texture region and defect areas expires Sufficient preset condition.
The Pixel Information of texture region is fused to defect areas.
In one embodiment, above-mentioned processor 801 is also configured to:
Centered on defect areas, the neighboring area that size is preset value delimited.
In neighboring area, selected size and shape is identical with defect areas and pixel color value degree of closeness satisfaction is default Selection area is determined as texture region by the region of condition.
In one embodiment, above-mentioned processor 801 is also configured to:
Neighboring area is traveled through with the size and shape sliding window identical with defect areas.
Calculate the color value distance between sliding window region and defect areas.
Region during selected color value distance minimum where sliding window.
In one embodiment, above-mentioned processor 801 is also configured to:
The pixel of texture region is fused to defect areas according to fusion coefficients α.
Wherein, 0 < α < 1, and the color value between α and texture region and defect areas is apart from positive correlation.
In one embodiment, above-mentioned processor 801 is also configured to:
Detect the skin blemishes of portrait area.
Determine skin blemishes border.
The electronic equipment that the embodiment of the present disclosure provides generates filler pixels, with filling according to the pixel around defect areas Pixel filling defect areas is to remove the skin blemishes of defect areas, on this basis, selection and flaw around defect areas The close region of the pixel color value in region, i.e. texture region, defect areas is fused to by the Pixel Information of texture region.Pixel Information includes high-frequency information, and high-frequency information forms the edge and details of image, the Pixel Information of texture region is fused to the flaw Defect region can supplement high-frequency information to defect areas, to enhance the dermatoglyph details of defect areas, play texture repairing Effect so that U.S. face effect is more natural.
The electronic equipment that the embodiment of the present disclosure provides can be a terminal device as shown in Figure 9, and Fig. 9 is shown according to one The block diagram of a kind of terminal device that example property implementation exemplifies, the terminal device 90 can be smart mobile phone, tablet computer etc., the end End equipment 90 is used to perform the image processing method described in the corresponding embodiments of above-mentioned Fig. 1-Fig. 2.
Terminal device 90 can include following one or more assemblies:Processing component 901, memory 902, power supply module 903, multimedia component 904, audio component 905, the interface 906 of input/output (I/O), sensor module 907 and communication Component 908.
The integrated operation of 901 usual control terminal equipment 90 of processing component, such as with display, call, data communication, Camera operation and record operate associated operation.Processing component 901 can be performed including one or more processors 9011 Instruction, to perform all or part of the steps of the methods described above.In addition, processing component 901 can include one or more modules, Convenient for the interaction between processing component 901 and other assemblies.For example, processing component 901 can include multi-media module, with convenient Interaction between multimedia component 904 and processing component 901.
Memory 902 is configured as storing various types of data to support the operation in terminal device 90.These data Example include for the instruction of any application program or method that are operated on terminal device 90, contact data, telephone directory Data, message, picture, video etc..Memory 902 can by any kind of volatibility or non-volatile memory device or it Combination realize, such as static RAM (English full name:Static Random Access Memory, English letter Claim:SRAM), electrically erasable programmable read-only memory (English full name:Electrically Erasable Programmable Read Only Memory, English abbreviation:EEPROM), Erasable Programmable Read Only Memory EPROM (English full name:Erasable Programmable Read Only Memory, English abbreviation:EPROM), programmable read only memory (English full name: Programmable Read Only Memory, English abbreviation:PROM), read-only memory (English full name:Read Only Memory, English abbreviation:ROM), magnetic memory, flash memory, disk or CD.
Power supply module 903 provides electric power for the various assemblies of terminal device 90.Power supply module 903 can include power management System, one or more power supplys and other generate, manage and distribute electric power associated component with for terminal device 90.
Multimedia component 904 is included in the screen of one output interface of offer between terminal device 90 and user.One In a little embodiments, screen can include liquid crystal display (English full name:Liquid Crystal Display, English abbreviation: ) and touch panel (English full name LCD:Touch Panel, English abbreviation:TP).If screen includes touch panel, screen can To be implemented as touch-screen, to receive input signal from the user.Touch panel include one or more touch sensors with Sense the gesture on touch, slide, and touch panel.Touch sensor can not only sense the boundary of a touch or slide action, and And also detection and touch or the relevant duration and pressure of slide.In some embodiments, multimedia component 904 includes One front camera and/or rear camera.When terminal device 90 is in operation mode, such as screening-mode or video mode When, front camera and/or rear camera can receive external multi-medium data.Each front camera and postposition camera shooting Head can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 905 is configured as output and/or input audio signal.For example, audio component 905 includes a Mike Wind (English full name:Microphone, English abbreviation:MIC), when terminal device 90 is in operation mode, such as call model records When pattern and speech recognition mode, microphone is configured as receiving external audio signal.The received audio signal can by into One step is stored in memory 902 or is sent via communication component 908.In some embodiments, audio component 905 further includes one Loud speaker, for exports audio signal.
I/O interfaces 906 provide interface between processing component 901 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor module 907 includes one or more sensors, for providing the state of various aspects for terminal device 90 Assessment.For example, sensor module 907 can detect opening/closed state of terminal device 90, the relative positioning of component, example Such as the display and keypad that component is terminal device 90, sensor module 907 can be set with detection terminal equipment 90 or terminal The position of standby 90 1 components changes, the existence or non-existence that user contacts with terminal device 90,90 orientation of terminal device or plus Speed/deceleration and the temperature change of terminal device 90.Sensor module 907 can include proximity sensor, be configured to do not having It is detected the presence of nearby objects when having any physical contact.Sensor module 907 can also include optical sensor, such as complementary gold Belong to oxide semiconductor (English full name:Complementary Metal Oxide Semiconductor, English abbreviation: ) or charge coupled cell (English full name CMOS:Charge Coupled Device, English abbreviation:CCD) imaging sensor is used In being used in imaging applications.In some embodiments, which can also include acceleration transducer, gyro Instrument sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 908 is configured to facilitate the communication of wired or wireless way between terminal device 90 and other equipment. Terminal device 90 can access the wireless network based on communication standard, such as Wireless Fidelity (English full name:Wireless- Fidelity, English abbreviation:WiFi), 2G or 3G or combination thereof.In one exemplary embodiment, communication component 908 Broadcast singal or broadcast related information from external broadcasting management system are received via broadcast channel.In an exemplary implementation In example, communication component 908 further includes near-field communication (English full name:Near Field Communication, English abbreviation: NFC) module, to promote short range communication.For example, the NFC module can be based on radio frequency identification (English full name:Radio Frequency Identification, English abbreviation:RFID) technology, Infrared Data Association's (English full name:Infrared Data Association, English abbreviation:IrDA) technology, ultra wide band (English full name:Ultra Wideband, English abbreviation:UWB) skill Art, bluetooth (English full name:Bluetooth, English abbreviation:BT) technology and other technologies are realized.
In the exemplary embodiment, terminal device 90 can be by one or more application application-specific integrated circuit (English full name: Application Specific Integrated Circuit, English abbreviation:ASIC), (English is complete for digital signal processor Claim:Digital Signal Processing, English abbreviation:DSP), digital signal processing appts (English full name:Digital Signal Processing Device, English abbreviation:DSPD), programmable logic device (English full name:Programmable Logic Device, English abbreviation:PLD), field programmable gate array (English full name:Field Programmable Gate Array, English abbreviation:FPGA), controller, microcontroller, microprocessor or other electronic components are realized, above-mentioned for performing Image processing method described in the corresponding embodiments of Fig. 1-Fig. 2.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 902 of instruction, above-metioned instruction can be performed to complete the above method by the processing component 901 of terminal device 90. For example, non-transitorycomputer readable storage medium can be ROM, random access memory (English full name:Random Access Memory, English abbreviation:RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..When in storage medium When instruction is performed by the processing component 901 of terminal device 90 so that terminal device 90 is able to carry out the corresponding realities of above-mentioned Fig. 1-Fig. 2 The image processing method described in example is applied, this method includes:
Pending image is obtained, determines defect areas, defect areas is skin blemishes region.
The original pixels of defect areas are deleted, filler pixels are generated according to the pixel around defect areas, with filler pixels Fill defect areas.
The pixel color value degree of closeness of the selected texture region around defect areas, texture region and defect areas expires Sufficient preset condition.
The Pixel Information of texture region is fused to defect areas.
In one embodiment, this method includes:
Centered on defect areas, the neighboring area that size is preset value delimited.
In neighboring area, selected size and shape is identical with defect areas and pixel color value degree of closeness satisfaction is default Selection area is determined as texture region by the region of condition.
In one embodiment, this method includes:
Neighboring area is traveled through with the size and shape sliding window identical with defect areas.
Calculate the color value distance between sliding window region and defect areas.
Region during selected color value distance minimum where sliding window.
In one embodiment, this method includes:
The pixel of texture region is fused to defect areas according to fusion coefficients α.
Wherein, 0 < α < 1, and the color value between α and texture region and defect areas is apart from positive correlation.
In one embodiment, this method includes:
Detect the skin blemishes of portrait area.
Determine skin blemishes border.
The terminal device and storage medium that the embodiment of the present disclosure provides generate filling according to the pixel around defect areas Pixel fills defect areas to remove the skin blemishes of defect areas, on this basis, around defect areas with filler pixels The selection region close with the pixel color value of defect areas, i.e. texture region, the flaw is fused to by the Pixel Information of texture region Defect region.Pixel Information includes high-frequency information, and high-frequency information forms the edge and details of image, and the pixel of texture region is believed Breath, which is fused to defect areas, to supplement high-frequency information to defect areas, to enhance the dermatoglyph details of defect areas, play The effect of texture repairing so that U.S. face effect is more natural.
Those skilled in the art will readily occur to the disclosure its after considering specification and putting into practice disclosure disclosed herein Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as illustratively, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be appreciated that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by appended claim.

Claims (12)

1. a kind of image processing method, which is characterized in that including:
Pending image is obtained, determines defect areas, the defect areas is skin blemishes region;
The original pixels of the defect areas are deleted, filler pixels are generated according to the pixel around the defect areas, with described Filler pixels fill the defect areas;
Texture region is selected around the defect areas, the texture region and the pixel color value of the defect areas connect Short range degree meets preset condition;
The Pixel Information of the texture region is fused to the defect areas.
2. image processing method according to claim 1, which is characterized in that described to be selected around the defect areas Texture region, including:
Centered on the defect areas, the neighboring area that size is preset value delimited;
In the neighboring area, selected size and shape is identical with the defect areas and pixel color value degree of closeness meets Selection area is determined as the texture region by the region of the preset condition.
3. image processing method according to claim 2, which is characterized in that the selected size and shape and the flaw Region is identical and pixel color value degree of closeness meets the region of the preset condition, including:
The neighboring area is traveled through with the size and shape sliding window identical with the defect areas;
Calculate the color value distance between the sliding window region and the defect areas;
Region during selected color value distance minimum where the sliding window.
4. image processing method according to claim 3, which is characterized in that the Pixel Information by the texture region The defect areas is fused to, including:
The pixel of the texture region is fused to the defect areas according to fusion coefficients α;
Wherein, 0 < α < 1, and the color value between α and the texture region and the defect areas is apart from positive correlation.
5. image processing method according to claim 1, which is characterized in that the definite defect areas, including:
Detect the skin blemishes of portrait area;
Determine skin blemishes border.
6. a kind of image processing equipment, which is characterized in that including:
Detection module for obtaining pending image, determines defect areas, and the defect areas is skin blemishes region;
Module is filled, for deleting the original pixels of the defect areas, is filled out according to the pixel generation around the defect areas Pixel is filled, the defect areas is filled with the filler pixels;
Chosen module, for selecting texture region, the texture region and the defect areas around the defect areas Pixel color value degree of closeness meet preset condition;
Fusion Module, for the Pixel Information of the texture region to be fused to the defect areas.
7. image processing equipment according to claim 6, which is characterized in that the chosen module includes:
Submodule delimited in candidate region, for centered on the defect areas, delimiting the neighboring area that size is preset value;
With reference to selected submodule, in the neighboring area, selecting, size and shape is identical with the defect areas and picture Plain color value degree of closeness meets the region of the preset condition, and selection area is determined as the texture region.
8. image processing equipment according to claim 7, which is characterized in that described to include with reference to selected submodule:
Traversal Unit, for traveling through the neighboring area with the size and shape sliding window identical with the defect areas;
Computing unit, for calculating the color value distance between the sliding window region and the defect areas;
Comparing unit, for select color value distance it is minimum when the sliding window where region.
9. image processing equipment according to claim 8, which is characterized in that the Fusion Module includes:
Ratio merges submodule, for the pixel of the texture region to be fused to the defect areas according to fusion coefficients α;
Wherein, 0 < α < 1, and the color value between α and the texture region and the defect areas is apart from positive correlation.
10. image processing equipment according to claim 6, which is characterized in that the detection module includes:
Defect Detection submodule, for detecting the skin blemishes of portrait area;
Submodule is positioned, for determining skin blemishes border.
11. a kind of image processing equipment, which is characterized in that including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Pending image is obtained, determines defect areas, the defect areas is skin blemishes region;
The original pixels of the defect areas are deleted, filler pixels are generated according to the pixel around the defect areas, with described Filler pixels fill the defect areas;
Texture region is selected around the defect areas, the texture region and the pixel color value of the defect areas connect Short range degree meets preset condition;
The Pixel Information of the texture region is fused to the defect areas.
12. a kind of computer readable storage medium, is stored thereon with computer instruction, which is characterized in that the instruction is by processor The step of any one of claim 1-5 described image processing method is realized during execution.
CN201711311729.0A 2017-12-11 2017-12-11 Image processing method and equipment Pending CN108053377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711311729.0A CN108053377A (en) 2017-12-11 2017-12-11 Image processing method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711311729.0A CN108053377A (en) 2017-12-11 2017-12-11 Image processing method and equipment

Publications (1)

Publication Number Publication Date
CN108053377A true CN108053377A (en) 2018-05-18

Family

ID=62124072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711311729.0A Pending CN108053377A (en) 2017-12-11 2017-12-11 Image processing method and equipment

Country Status (1)

Country Link
CN (1) CN108053377A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109003236A (en) * 2018-06-29 2018-12-14 上海本趣网络科技有限公司 A kind of adaptive mill skin method and system separated based on face tone with shadow
CN109151425A (en) * 2018-09-10 2019-01-04 青岛海信电器股份有限公司 A kind of color spot minimizing technology, device and display device
CN109194886A (en) * 2018-08-31 2019-01-11 小黄鹿(杭州)科技有限公司 A kind of multifunctional entertainment interactive terminal
CN110111245A (en) * 2019-05-13 2019-08-09 Oppo广东移动通信有限公司 Image processing method, device, terminal and computer readable storage medium
CN110215693A (en) * 2019-05-13 2019-09-10 北京乐信圣文科技有限责任公司 The method and device of image procossing
CN110580688A (en) * 2019-08-07 2019-12-17 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN110855897A (en) * 2019-12-20 2020-02-28 维沃移动通信有限公司 Image shooting method and device, electronic equipment and storage medium
CN110866488A (en) * 2019-11-13 2020-03-06 维沃移动通信有限公司 Image processing method and device
CN110874824A (en) * 2019-10-11 2020-03-10 稿定(厦门)科技有限公司 Image restoration method and device
CN110895789A (en) * 2018-09-13 2020-03-20 杭州海康威视数字技术股份有限公司 Face beautifying method and device
CN111127352A (en) * 2019-12-13 2020-05-08 北京达佳互联信息技术有限公司 Image processing method, device, terminal and storage medium
CN111340691A (en) * 2020-03-27 2020-06-26 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN111353946A (en) * 2018-12-21 2020-06-30 腾讯科技(深圳)有限公司 Image restoration method, device, equipment and storage medium
CN111739013A (en) * 2020-06-30 2020-10-02 北京酷豹科技有限公司 Image optimization method based on image processing and related device
CN111754424A (en) * 2020-06-05 2020-10-09 北京有竹居网络技术有限公司 Method and device for processing face and skin beautification in picture and electronic equipment
CN111815729A (en) * 2020-07-09 2020-10-23 厦门真景科技有限公司 Real-time skin beautifying method, device, equipment and computer storage medium
CN112235650A (en) * 2020-10-19 2021-01-15 广州酷狗计算机科技有限公司 Video processing method, device, terminal and storage medium
CN112529805A (en) * 2020-12-14 2021-03-19 北京达佳互联信息技术有限公司 Image restoration method and device, electronic equipment and storage medium
CN112529793A (en) * 2020-11-25 2021-03-19 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN113496470A (en) * 2020-04-02 2021-10-12 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN113808027A (en) * 2020-06-16 2021-12-17 北京达佳互联信息技术有限公司 Human body image processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777913A (en) * 2003-03-20 2006-05-24 欧姆龙株式会社 Image processing device
CN105719250A (en) * 2016-01-19 2016-06-29 厦门美图之家科技有限公司 Image inpainting method based on simple background, system and shooting camera
CN105741231A (en) * 2016-02-02 2016-07-06 深圳中博网络技术有限公司 Skin beautifying processing method and device of image
CN105956576A (en) * 2016-05-18 2016-09-21 广东欧珀移动通信有限公司 Image beautifying method and device and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777913A (en) * 2003-03-20 2006-05-24 欧姆龙株式会社 Image processing device
CN105719250A (en) * 2016-01-19 2016-06-29 厦门美图之家科技有限公司 Image inpainting method based on simple background, system and shooting camera
CN105741231A (en) * 2016-02-02 2016-07-06 深圳中博网络技术有限公司 Skin beautifying processing method and device of image
CN105956576A (en) * 2016-05-18 2016-09-21 广东欧珀移动通信有限公司 Image beautifying method and device and mobile terminal

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109003236A (en) * 2018-06-29 2018-12-14 上海本趣网络科技有限公司 A kind of adaptive mill skin method and system separated based on face tone with shadow
CN109003236B (en) * 2018-06-29 2021-05-07 上海本趣网络科技有限公司 Self-adaptive buffing method and system based on separation of human face tone and light and shadow
CN109194886A (en) * 2018-08-31 2019-01-11 小黄鹿(杭州)科技有限公司 A kind of multifunctional entertainment interactive terminal
CN109151425A (en) * 2018-09-10 2019-01-04 青岛海信电器股份有限公司 A kind of color spot minimizing technology, device and display device
CN110895789B (en) * 2018-09-13 2023-05-02 杭州海康威视数字技术股份有限公司 Face beautifying method and device
CN110895789A (en) * 2018-09-13 2020-03-20 杭州海康威视数字技术股份有限公司 Face beautifying method and device
CN111353946A (en) * 2018-12-21 2020-06-30 腾讯科技(深圳)有限公司 Image restoration method, device, equipment and storage medium
US11908105B2 (en) 2018-12-21 2024-02-20 Tencent Technology (Shenzhen) Company Limited Image inpainting method, apparatus and device, and storage medium
CN110111245A (en) * 2019-05-13 2019-08-09 Oppo广东移动通信有限公司 Image processing method, device, terminal and computer readable storage medium
CN110215693A (en) * 2019-05-13 2019-09-10 北京乐信圣文科技有限责任公司 The method and device of image procossing
CN110111245B (en) * 2019-05-13 2023-12-08 Oppo广东移动通信有限公司 Image processing method, device, terminal and computer readable storage medium
CN110215693B (en) * 2019-05-13 2020-03-24 北京乐信圣文科技有限责任公司 Image processing method and device
CN110580688A (en) * 2019-08-07 2019-12-17 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN110874824A (en) * 2019-10-11 2020-03-10 稿定(厦门)科技有限公司 Image restoration method and device
CN110866488A (en) * 2019-11-13 2020-03-06 维沃移动通信有限公司 Image processing method and device
CN111127352A (en) * 2019-12-13 2020-05-08 北京达佳互联信息技术有限公司 Image processing method, device, terminal and storage medium
CN110855897A (en) * 2019-12-20 2020-02-28 维沃移动通信有限公司 Image shooting method and device, electronic equipment and storage medium
CN111340691A (en) * 2020-03-27 2020-06-26 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN111340691B (en) * 2020-03-27 2024-06-04 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium
CN113496470B (en) * 2020-04-02 2024-04-09 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN113496470A (en) * 2020-04-02 2021-10-12 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN111754424A (en) * 2020-06-05 2020-10-09 北京有竹居网络技术有限公司 Method and device for processing face and skin beautification in picture and electronic equipment
CN111754424B (en) * 2020-06-05 2024-02-20 北京有竹居网络技术有限公司 Face beautifying processing method and device in picture and electronic equipment
CN113808027B (en) * 2020-06-16 2023-10-17 北京达佳互联信息技术有限公司 Human body image processing method and device, electronic equipment and storage medium
CN113808027A (en) * 2020-06-16 2021-12-17 北京达佳互联信息技术有限公司 Human body image processing method and device, electronic equipment and storage medium
CN111739013B (en) * 2020-06-30 2024-04-23 北京酷豹科技有限公司 Image optimization method and related device based on image processing
CN111739013A (en) * 2020-06-30 2020-10-02 北京酷豹科技有限公司 Image optimization method based on image processing and related device
CN111815729B (en) * 2020-07-09 2023-11-03 厦门真景科技有限公司 Real-time skin beautifying method, device, equipment and computer storage medium
CN111815729A (en) * 2020-07-09 2020-10-23 厦门真景科技有限公司 Real-time skin beautifying method, device, equipment and computer storage medium
CN112235650A (en) * 2020-10-19 2021-01-15 广州酷狗计算机科技有限公司 Video processing method, device, terminal and storage medium
CN112529793A (en) * 2020-11-25 2021-03-19 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN112529805A (en) * 2020-12-14 2021-03-19 北京达佳互联信息技术有限公司 Image restoration method and device, electronic equipment and storage medium
CN112529805B (en) * 2020-12-14 2024-04-30 北京达佳互联信息技术有限公司 Image restoration method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108053377A (en) Image processing method and equipment
CN105809704B (en) Identify the method and device of image definition
CN105631797B (en) Watermark adding method and device
CN106228556B (en) image quality analysis method and device
WO2017031901A1 (en) Human-face recognition method and apparatus, and terminal
CN105635567A (en) Shooting method and device
CN107122679A (en) Image processing method and device
CN110992327A (en) Lens contamination state detection method and device, terminal and storage medium
CN106408603A (en) Camera method and device
CN105512605A (en) Face image processing method and device
CN104918107A (en) Video file identification processing method and device
CN106355549A (en) Photographing method and equipment
CN106980840A (en) Shape of face matching process, device and storage medium
CN104361558B (en) Image processing method, device and equipment
CN108122212A (en) Image repair method and device
CN105528765A (en) Method and device for processing image
CN104284240A (en) Video browsing method and device
CN105635452A (en) Mobile terminal and contact person identification method thereof
CN107944367A (en) Face critical point detection method and device
CN104460185A (en) Automatic focusing method and device
EP3975046A1 (en) Method and apparatus for detecting occluded image and medium
CN104301610A (en) Image shooting control method and device
CN104867112B (en) Photo processing method and device
CN110399934A (en) A kind of video classification methods, device and electronic equipment
CN108154466A (en) Image processing method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180518

RJ01 Rejection of invention patent application after publication