CN110310252A - Blackhead absorbs method, apparatus and computer readable storage medium - Google Patents

Blackhead absorbs method, apparatus and computer readable storage medium Download PDF

Info

Publication number
CN110310252A
CN110310252A CN201910369566.4A CN201910369566A CN110310252A CN 110310252 A CN110310252 A CN 110310252A CN 201910369566 A CN201910369566 A CN 201910369566A CN 110310252 A CN110310252 A CN 110310252A
Authority
CN
China
Prior art keywords
blackhead
image
absorbs
information
target
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
CN201910369566.4A
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 I4season Hongsheng Technology Co Ltd
Original Assignee
Shenzhen I4season Hongsheng 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 I4season Hongsheng Technology Co Ltd filed Critical Shenzhen I4season Hongsheng Technology Co Ltd
Priority to CN201910369566.4A priority Critical patent/CN110310252A/en
Publication of CN110310252A publication Critical patent/CN110310252A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61MDEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
    • A61M1/00Suction or pumping devices for medical purposes; Devices for carrying-off, for treatment of, or for carrying-over, body-liquids; Drainage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/30004Biomedical image processing
    • G06T2207/30088Skin; Dermal

Abstract

The invention discloses a kind of blackheads to absorb method.It includes: that the target image for instructing and obtaining to gettering region is absorbed according to the blackhead when receiving blackhead absorption instruction that the blackhead, which absorbs method,;The target image is handled based on default processing rule, obtains blackhead information;It determines that corresponding blackhead absorbs parameter according to the blackhead information, and state modulator pore cleanser instrument is absorbed according to the blackhead and is absorbed.The invention also discloses a kind of blackhead absorption device and computer readable storage mediums.The present invention can absorb parameter according to the suitable blackhead of blackhead situation intelligent selection of user, to avoid causing skin damage or blackhead to absorb sordid problem because user's selection is unreasonable.

Description

Blackhead absorbs method, apparatus and computer readable storage medium
Technical field
The present invention relates to beauty apparatus technical field more particularly to a kind of blackheads to absorb method, apparatus and computer-readable Storage medium.
Background technique
Blackhead is also known as blackhead, is open comedones, one kind " bolt " sample being made of sebum, cell bits and bacterium Object is blocked at hair follicle opening and is formed, in addition dust, dirt and oxidation in air, make the one of its ingress of air Head gradually blackening.Traditional blackhead-removing mode, generally by using acne needle or hand to be squeezed, struck off;Or use is gone Blackhead nose patch, removes blackhead by way of tearing.Aforesaid way can stimulate pore, and pore is made to become larger, and can give user's skin tape Carry out biggish injury.
, there is a kind of pore cleanser instrument on the market in injury for mitigation pore cleanser to skin, can using vacuum suction technology Blackhead, acne are easily sucked out, can simply and easily remove blackhead convenient for user.However, current pore cleanser instrument is all only several The absorption gear of a fixation, difference absorb gear and correspond to different suction sizes, and user when in use, needs oneself to judge and select Gear is selected to be absorbed, inevitably will appear that gear selection is unreasonable, skin damage or blackhead is caused to absorb sordid situation.
Summary of the invention
The main purpose of the present invention is to provide a kind of blackheads to absorb method, apparatus and computer readable storage medium, purport The suitable blackhead absorption parameter of blackhead situation intelligent selection according to user is being realized, to avoid due to user's selection is unreasonable Skin damage or blackhead is caused to absorb sordid problem.
To achieve the above object, the present invention provides a kind of blackhead absorption method, and the blackhead absorbs method and includes:
When receiving blackhead absorption instruction, target image of the instruction acquisition to gettering region is absorbed according to the blackhead;
The target image is handled based on default processing rule, obtains blackhead information;
It determines that corresponding blackhead absorbs parameter according to the blackhead information, and state modulator de-black is absorbed according to the blackhead Head instrument is absorbed.
Optionally, the described the step of target image is handled, blackhead information is obtained based on default processing rule Include:
Binary conversion treatment is carried out to the target image, obtains binary image;
Contour detecting is carried out to the binary image, and according to testing result by there are profiles in the target image Region is as doubtful blackhead target;
The target image is split based on the doubtful blackhead target, obtains the segmentation comprising doubtful blackhead target Image;
Feature extraction is carried out to the segmented image, obtains image feature information, and based on default detected rule to described Image feature information carries out detection identification, obtains blackhead information.
Optionally, it before described the step of carrying out binary conversion treatment to the target image, obtaining binary image, also wraps It includes:
Image enhancement processing is carried out to the target image;
Described to carry out binary conversion treatment to the target image, the step of obtaining binary image, includes:
Binary conversion treatment is carried out to the target image through image enhancement processing, obtains binary image.
Optionally, described that detection identification is carried out to described image characteristic information based on default detected rule, obtain blackhead letter The step of breath includes:
Whether detection described image characteristic information meets preset condition;
If described image characteristic information meets preset condition, determine that the doubtful blackhead target in the segmented image is black Head;
The quantity that image feature information meets the segmented image of preset condition is obtained, to obtain blackhead quantity, and according to institute It states image feature information and obtains each blackhead size.
Optionally, described that detection identification is carried out to described image characteristic information based on default detected rule, obtain blackhead letter The step of breath includes:
Image feature vector is constructed according to described image characteristic information, and calculates described image feature vector and default feature Similarity value between vector;
Judge whether the similarity value is less than preset threshold;
If the similarity value is less than preset threshold, determine that the doubtful blackhead target in the segmented image is blackhead;
The quantity that similarity value is less than the segmented image of preset threshold is obtained, to obtain blackhead quantity, and according to the figure As characteristic information obtains each blackhead size.
Optionally, described image characteristic information includes one of color characteristic, shape feature and textural characteristics or a variety of.
Optionally, the blackhead information includes blackhead quantity and blackhead size, and it includes that suction is big that the blackhead, which absorbs parameter, Small and absorption frequency, it is described to determine that corresponding blackhead absorbs parameter according to the blackhead information, and absorbed and joined according to the blackhead Counting the step of control pore cleanser instrument is absorbed includes:
According to the blackhead quantity and the blackhead size respectively where the default mapping relations in section and first, determine pair The suction size and absorption frequency answered;
It is absorbed according to the suction size and absorption frequency control pore cleanser instrument.
Optionally, described to determine that corresponding blackhead absorbs parameter according to the blackhead information, and absorbed according to the blackhead The step of state modulator pore cleanser instrument is absorbed further include:
The mean size of blackhead is calculated according to the blackhead quantity and the blackhead size;
The default mapping relations in section and second where the mean size, determine corresponding suction size and absorption Frequency;
It is absorbed according to the suction size and absorption frequency control pore cleanser instrument.
In addition, to achieve the above object, the present invention also provides a kind of blackhead absorption device, the blackhead absorption device packet Include: the blackhead that memory, processor and being stored in can be run on the memory and on the processor absorbs program, described Blackhead is absorbed when program is executed by the processor and realizes the step of blackhead as described above absorbs method.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium It is stored with blackhead on storage medium and absorbs program, the blackhead is absorbed when program is executed by processor and realizes blackhead as described above The step of absorption method.
The present invention provides a kind of blackhead and absorbs method, apparatus and computer readable storage medium, absorbs receiving blackhead When instruction, the target image to gettering region is obtained;Then, image is handled based on default processing rule, obtains blackhead Information;And then determine that blackhead absorbs parameter according to blackhead information, and state modulator pore cleanser instrument is absorbed according to blackhead and is absorbed. By the above-mentioned means, the present invention can be achieved to identify the intelligent and high-efficiency of blackhead, while also achieving according to blackhead information to de-black Head instrument is accurately controlled, and is adsorbed with absorbing parameter using suitable blackhead, can avoid leading because user's selection is unreasonable Skin damage or blackhead is caused to absorb sordid problem.
Detailed description of the invention
Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram that blackhead of the present invention absorbs method first embodiment;
Fig. 3 is the refinement flow diagram that blackhead of the present invention absorbs step S20 in method first embodiment.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
The terminal of that embodiment of the invention can be pore cleanser instrument, be also possible to server, smart phone, PC (personal Computer, personal computer), tablet computer, the terminal devices such as portable computer.
As shown in Figure 1, the terminal may include: processor 1001, such as CPU (Central Processing Unit, Central processing unit), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 for realizing the connection communication between these components.User interface 1003 may include display screen (Display), input list First such as keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network connects Mouth 1004 may include optionally standard wireline interface and wireless interface (such as Wireless Fidelity Wireless-Fidelity, Wi-Fi Interface).Memory 1005 can be high speed RAM memory, be also possible to stable memory (non-volatile ), such as magnetic disk storage memory.Memory 1005 optionally can also be the storage dress independently of aforementioned processor 1001 It sets.
Optionally, terminal can also include photographing module, communication module etc..Wherein, photographing module can be used for shoot to The target image of gettering region, communication module can be wireless communication module, for establishing communication connection between other terminals, Wireless communication module can be bluetooth module, Wi-Fi (Wireless Fidelity) module and 2.4G module.Certainly, terminal can also include Transmission port, for being communicated to connect by being established between USB data line and other terminals, to realize data exchanging function.Certainly, Terminal can also configure other modules such as voice module, and details are not described herein.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium Believe that module, Subscriber Interface Module SIM and blackhead absorb program.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, carries out with background server Data communication;User interface 1003 is mainly used for connecting client, carries out data communication with client;And processor 1001 can be with For calling the blackhead stored in memory 1005 to absorb program, and execute following operation:
When receiving blackhead absorption instruction, target image of the instruction acquisition to gettering region is absorbed according to the blackhead;
The target image is handled based on default processing rule, obtains blackhead information;
It determines that corresponding blackhead absorbs parameter according to the blackhead information, and state modulator de-black is absorbed according to the blackhead Head instrument is absorbed.
Further, processor 1001 can call the blackhead stored in memory 1005 to absorb program, also execute following Operation:
Binary conversion treatment is carried out to the target image, obtains binary image;
Contour detecting is carried out to the binary image, and according to testing result by there are profiles in the target image Region is as doubtful blackhead target;
The target image is split based on the doubtful blackhead target, obtains the segmentation comprising doubtful blackhead target Image;
Feature extraction is carried out to the segmented image, obtains image feature information, and based on default detected rule to described Image feature information carries out detection identification, obtains blackhead information.
Further, processor 1001 can call the blackhead stored in memory 1005 to absorb program, also execute following Operation:
Image enhancement processing is carried out to the target image;
Described to carry out binary conversion treatment to the target image, the step of obtaining binary image, includes:
Binary conversion treatment is carried out to the target image through image enhancement processing, obtains binary image.
Further, processor 1001 can call the blackhead stored in memory 1005 to absorb program, also execute following Operation:
Whether detection described image characteristic information meets preset condition;
If described image characteristic information meets preset condition, determine that the doubtful blackhead target in the segmented image is black Head;
The quantity that image feature information meets the segmented image of preset condition is obtained, to obtain blackhead quantity, and according to institute It states image feature information and obtains each blackhead size.
Further, processor 1001 can call the blackhead stored in memory 1005 to absorb program, also execute following Operation:
Image feature vector is constructed according to described image characteristic information, and calculates described image feature vector and default feature Similarity value between vector;
Judge whether the similarity value is less than preset threshold;
If the similarity value is less than preset threshold, determine that the doubtful blackhead target in the segmented image is blackhead;
The quantity that similarity value is less than the segmented image of preset threshold is obtained, to obtain blackhead quantity, and according to the figure As characteristic information obtains each blackhead size.
Further, described image characteristic information includes one of color characteristic, shape feature and textural characteristics or more Kind.
Further, the blackhead information includes blackhead quantity and blackhead size, and it includes suction that the blackhead, which absorbs parameter, Size and absorption frequency, processor 1001 can call the blackhead stored in memory 1005 to absorb program, also execute following behaviour Make:
According to the blackhead quantity and the blackhead size respectively where the default mapping relations in section and first, determine pair The suction size and absorption frequency answered;
It is absorbed according to the suction size and absorption frequency control pore cleanser instrument.
Further, processor 1001 can call the blackhead stored in memory 1005 to absorb program, also execute following Operation:
The mean size of blackhead is calculated according to the blackhead quantity and the blackhead size;
The default mapping relations in section and second where the mean size, determine corresponding suction size and absorption Frequency;
It is absorbed according to the suction size and absorption frequency control pore cleanser instrument.
Based on above-mentioned hardware configuration, propose that blackhead of the present invention absorbs each embodiment of method.
The present invention provides a kind of blackhead absorption method.
It is the flow diagram that blackhead of the present invention absorbs method first embodiment referring to Fig. 2, Fig. 2.
In the present embodiment, blackhead absorption method includes:
Step S10 absorbs mesh of the instruction acquisition to gettering region according to the blackhead when receiving blackhead absorption instruction Logo image;
The terminal of the embodiment of the present invention can be smart phone, server, PC etc., can also be pore cleanser instrument.Wherein, should It include control module, photographing module and communication module in pore cleanser instrument, wherein photographing module is used to shoot the mesh to gettering region Logo image, control module are shot for controlling photographing module, are then analyzed and processed to target image, and determination obtains black Head absorbs parameter, and then absorbs parameter (such as suction size and absorb frequency) control vacuum air pump according to blackhead, with carry out blackhead, The absorption of the dirts such as acne, communication module with other terminals for being attached, to carry out data exchange.
When the present invention is applied to the terminals such as smart phone, server, PC, i.e., executing subject be smart phone, server, When the terminals such as PC, the communication connection between terminal and pore cleanser instrument can be established, and then receives the blackhead that pore cleanser instrument is sent and absorbs Instruction can absorb instruction to the blackhead and parse, obtain when the blackhead that terminal receives the transmission of pore cleanser instrument absorbs instruction The blackhead absorbs the target image to gettering region entrained in instruction, certainly, if the blackhead, which is absorbed in instruction, does not carry mesh Logo image, can also to pore cleanser instrument send shooting instruction, with receive pore cleanser instrument based on the shooting instruction return wait absorb The target image in region.Certainly, when present invention can also apply to pore cleanser instrument, i.e. executing subject can also be pore cleanser instrument, At this point, what blackhead absorption instruction triggered when can move in detecting pore cleanser instrument use process, it can also be and detecting Triggered when opening intelligent control mode to pore cleanser instrument, it is of course also possible to be after pore cleanser instrument starts intelligent control, every Preset time automatic trigger, at this point, instruction control photographing module can be absorbed according to the blackhead, obtained with shooting to gettering region Target image.
Step S20 handles the target image based on default processing rule, obtains blackhead information;
It is getting when the target image of gettering region, image is handled based on default processing rule, is obtained black Head information.Wherein, image feature information includes one of color characteristic, shape feature and textural characteristics or a variety of, blackhead letter Breath includes that blackhead information includes blackhead quantity and blackhead size, and blackhead diameter can be used to characterize in blackhead size.Specifically, can be first Binary conversion treatment is carried out to target image, obtains binary image, contour detecting then is carried out to binary image, and according to inspection Result is surveyed using there are the regions of profile in target image as doubtful blackhead target, based on doubtful blackhead target to target image into Row segmentation, obtains the segmented image comprising doubtful blackhead target;And then feature extraction is carried out to each segmented image respectively, it obtains Image feature information, and detection identification is carried out to image feature information based on default detected rule, obtain blackhead information.Specifically Treatment process can refer to following second embodiments, not repeat herein.
Step S30 determines that corresponding blackhead absorbs parameter according to the blackhead information, and absorbs parameter according to the blackhead Control pore cleanser instrument is absorbed.
After obtaining blackhead information, determine that blackhead absorbs parameter according to blackhead information, and state modulator is absorbed according to blackhead Pore cleanser instrument is absorbed.Wherein, it includes blackhead quantity and blackhead size that blackhead information, which includes blackhead information, and blackhead absorbs parameter Including suction size and frequency is absorbed, step S30 may include:
Step a1, according to the blackhead quantity and the blackhead size, respectively the section at place and the first default mapping are closed System determines corresponding suction size and absorbs frequency;
Step a2 is absorbed according to the suction size and absorption frequency control pore cleanser instrument.
Parameter method of determination is absorbed as one of blackhead, the corresponding quantity section of blackhead quantity can be preset, it is black The corresponding big minizone of head size is (it should be noted that the big minizone of the present embodiment and following another blackheads absorb parameter Big minizone is not substantially identical in method of determination, and the big minizone in the present embodiment is set for blackhead size , and the big minizone in following methods is set for the mean size of blackhead after calculating, it, will to distinguish Big minizone herein is denoted as the first big minizone) and different quantity sections, the first big minizone and suction size, absorption Mapping relations (the i.e. first default mapping relations) between frequency.Wherein, which can be the shape of table Formula, for example, settable different quantity section, the first big minizone respectively correspond different suction sizes and absorb frequency;When So, which is also possible to the form of calculation formula, and different quantity sections, the first big minizone correspond to same root evidence The calculation formula and same root data bulk section and the first big cell of quantity section and the first size interval computation suction size Between calculate absorb frequency calculation formula or different quantity sections, the first big minizone correspond to different calculation formula, and Do not limit the present invention.Wherein, specific interval division mode, each quantity section, the corresponding suction size in the first big minizone and The specific value and calculation formula for absorbing frequency can flexible settings as the case may be.
In the present embodiment, after obtaining blackhead information, first according to blackhead quantity and blackhead size and preset quantity Section, big minizone determine respectively and obtain the section where blackhead quantity and the section where blackhead size and first default reflect Penetrate relationship, determine corresponding suction size and absorb frequency, and then according to suction size and absorb frequency control pore cleanser instrument into Row is absorbed.By according to aforesaid way, it can be achieved that accurate control to pore cleanser instrument, absorbs parameter using suitable blackhead and carries out Absorption.
Further, step S30 can also include:
Step a3 calculates the mean size of blackhead according to the blackhead quantity and the blackhead size;
Step a4, the default mapping relations in section and second where the mean size, determines that corresponding suction is big Small and absorption frequency;
Step a5 is absorbed according to the suction size and absorption frequency control pore cleanser instrument.
Parameter method of determination is absorbed as another blackhead, the corresponding big minizone of mean size can be preset and (be denoted as The second largest minizone) and major minizone and suction size, (the i.e. second default mapping is closed for the mapping relations of absorbing between frequency System).Wherein, which can be the form of table, for example, settable different second largest minizone difference Corresponding different suction size and absorption frequency;Certainly, which is also possible to the form of calculation formula, and different second Big minizone corresponds to same root and calculates according to the calculation formula and same root of mean size calculating suction size according to mean size The calculation formula or the different second largest minizones for absorbing frequency correspond to different calculation formula, do not limit the present invention.Its In, it specific interval division mode, the corresponding suction size in each second largest minizone and absorbs the specific value of frequency and calculates Formula can flexible setting as the case may be.
In the present embodiment, after obtaining blackhead information, the flat of blackhead is first calculated according to blackhead quantity and blackhead size Then mean size is matched with preset big minizone, determines the big minizone where the mean size by equal size, into And according to where mean size section and the second default mapping relations, determine corresponding suction size and absorb frequency, in turn It is absorbed according to suction size and absorption frequency control pore cleanser instrument.Specifically, in control process, it can be by controlling de-black The voltage of vacuum air pump in head instrument carrys out controlled suction size, absorbs frequency by controlling the presence or absence of voltage of vacuum air pump to control Rate, such as absorbing frequency is every 2 seconds 1 time, can be powered every control in 2 seconds to vacuum air pump, every time power supply 1 second, i.e. control is absorbed 1 second Then clock stops 1 second, be further continued for executing and inhale 1 second, stop 1 second process, carries out intermittent suction according to absorption frequency by above-mentioned The mode removed is, it can be achieved that extrusion deformation to skin, so that preferably blackhead and acne be sucked out.In the present embodiment, by upper Mode is stated, it can be achieved that accurate control to pore cleanser instrument, absorbs parameter using suitable blackhead and adsorbed.
It, can be according to blackhead information (including blackhead number in addition, it should be noted that, if the only fixed gear of pore cleanser instrument Amount and blackhead size) and preset quantity section, big minizone and gear between mapping relations, to determine target gear, into And it controls pore cleanser instrument and is absorbed with the target gear.
The embodiment of the present invention provides a kind of blackhead absorption method, when receiving blackhead absorption instruction, obtains area to be absorbed The target image in domain;Then, image is handled based on default processing rule, obtains blackhead information;And then believed according to blackhead It ceases and determines that blackhead absorbs parameter, and state modulator pore cleanser instrument is absorbed according to blackhead and is absorbed.By the above-mentioned means, of the invention It can be achieved to identify the intelligent and high-efficiency of blackhead, while also achieving and pore cleanser instrument is accurately controlled according to blackhead information, with Parameter is absorbed using suitable blackhead to be adsorbed, and can avoid causing skin damage or blackhead to be absorbed because user's selection is unreasonable Sordid problem.
It further, is the refinement process that blackhead of the present invention absorbs step S20 in method first embodiment referring to Fig. 3, Fig. 3 Schematic diagram.Specifically, step S20 includes:
Step S21 carries out binary conversion treatment to the target image, obtains binary image;
In the present embodiment, after getting to the target image of gettering region, binaryzation first is carried out to target image Processing, obtains binary image.Wherein, binary conversion treatment refers to that the gray value by the pixel on gray level image to be detected is set It is set to 0 or 255, so that whole image be made to show apparent black and white effect, corresponding bianry image is obtained, in the present embodiment In, as a preferred embodiment, this method of adaptive threshold can be used and carry out binary conversion treatment, wherein adaptive threshold is really Surely the binarization threshold on the location of pixels can be determined according to the pixel Distribution value of the neighborhood block of pixel, the benefit done so It is that the binarization threshold of each pixel position is not fixed and invariable, but is determined by the distribution of its surrounding neighbors pixel 's.The binarization threshold of the higher image-region of brightness would generally be higher, and the binarization threshold of the lower image-region of brightness Then can adaptably it become smaller.As another preferred embodiment, binary conversion treatment can also be carried out using following methods: pass through figure As function reading imread () function reading target image, numpy (a kind of scientific algorithm library of open source of Python) number is obtained Then each pixel of group, i.e. target image corresponding RGB (RGB) value traverses numpy array, to the target figure extracted The rgb value of picture carries out color statistics, rgb value corresponding to statistical value maximum in statistical result is determined as colour of skin rgb value, in turn By the conversion formula between rgb value and gray value, gray value is converted by RGB corresponding to the maximum statistical value, and will The gray value is set as targets threshold, and carries out binary conversion treatment according to the targets threshold, wherein between rgb value and gray value Conversion formula can be with are as follows: gray value=(R*30+G*59+B*11+50)/100.
Step S22 carries out contour detecting to the binary image, and will deposit in the target image according to testing result In the region of profile as doubtful blackhead target;
Then, contour detecting is carried out to binary image, and according to testing result by the area in target image there are profile Domain is as doubtful blackhead target.Wherein, contour detecting refers in the digital picture comprising target and background, ignores background and mesh The influence of texture and noise jamming inside mark, the process of contour extraction of objects is realized using certain technology and methods, In simple terms, it can be understood as the set of the continuity point positioned at boundary with same color or density in image.Contour detecting It can be by OpenCV (Open Source Computer Vision Library, computer vision library of increasing income) Profile is calculated in findContours () function.The profile obtained by contour detecting is to be different from normal skin in image The dirt of skin, such as the thing of blackhead and acne or other doubtful blackheads, such as mole can be according to testing result by target image It is middle that there are the regions of profile as doubtful blackhead target.
Step S23 is split the target image based on the doubtful blackhead target, obtains comprising doubtful blackhead mesh Target segmented image;
After determining the doubtful blackhead target in target image, target image is divided based on doubtful blackhead target It cuts, obtains the segmented image comprising doubtful blackhead target.Wherein, the quantity of segmented image is the number for being equal to doubtful blackhead target It measures, includes a doubtful blackhead target in each segmented image, when being split, can be intercepted according to the shape of each profile The boundary rectangle of each profile, as segmented image.
Step S24 carries out feature extraction to the segmented image, obtains image feature information, and based on default detection rule Detection identification then is carried out to described image characteristic information, obtains blackhead information.
Then, feature extraction is carried out to each segmented image respectively, obtains image feature information, and based on default detection rule Detection identification then is carried out to image feature information, obtains blackhead information.Wherein, image feature information includes color characteristic, shape One of feature and textural characteristics are a variety of, and specific feature extracting method can refer to the prior art, do not repeat herein.When So, in addition to features described above, in a particular embodiment, other characteristic informations can also be extracted, believed then in conjunction with various correlated characteristics Breath is to carry out detection identification to image feature information.It is understood that the feature selected is more, the accuracy of recognition result is got over It is high.In addition, it should be noted that, each feature can be made of one or more index parameters, color characteristic includes that master color (compares The highest color of example) ratio shared in whole picture segmented image, the HSV (color of RGB (RGB) value of master color, master color Adjust H, saturation degree S, lightness V) index parameters such as value it is one or more, shape feature includes perimeter, area, the longest axis, orientation The index parameters such as angle, boundary matrix, form factor, eccentricity, circularity it is one or more, textural characteristics include energy, entropy, One of index parameters such as contrast and correlation are a variety of.It is, of course, understood that index included by features described above Parameter is not limited to above-mentioned enumerate.Wherein, step " detects described image characteristic information based on default detected rule Identification, obtains blackhead information " may include:
Whether step b1, detection described image characteristic information meet preset condition;
As one of blackhead information acquiring pattern, whether preset condition can be met by detection image characteristic information, To judge whether doubtful blackhead target is blackhead.Wherein, preset condition can be set as the feature item that each characteristic information need to meet Part, characteristic condition can be set as in certain threshold range, if each characteristic information meets its corresponding condition or each feature respectively When information meets its respective conditions quantity and reaches preset value, then determine that image feature information meets preset condition.Preset condition root Set according to actual conditions, image feature information whether meet preset condition decision procedure can also according to the actual situation into Row setting, is not especially limited herein.
Step b2 determines the doubtful blackhead in the segmented image if described image characteristic information meets preset condition Target is blackhead;
Step b3 obtains the quantity that image feature information meets the segmented image of preset condition, to obtain blackhead quantity, and Each blackhead size is obtained according to described image characteristic information.
If it is determined that image feature information meets preset condition, at this point, then determining that the doubtful blackhead target in segmented image is Blackhead, it is then also possible to the quantity that image feature information meets the segmented image of preset condition is obtained, to obtain blackhead quantity, Blackhead quantity is to be equal to the quantity for the segmented image that image feature information meets preset condition.Then, according to image feature information Obtain each blackhead size, wherein blackhead diameter can be used to characterize in blackhead size, specifically, can be according to the week in shape feature Long or area obtains blackhead diameter, and when calculating, default blackhead is a regular circle shapes, to be obtained according to perimeter or areal calculation Blackhead diameter.
Specifically, step " carries out detection identification to described image characteristic information based on default detected rule, obtains blackhead letter Cease " can also include:
Step b4, according to described image characteristic information construct image feature vector, and calculate described image feature vector with Similarity value between default feature vector;
As another blackhead information acquiring pattern, image feature vector can also be constructed according to image feature information, and The similarity value between image feature vector and default feature vector is calculated, doubtful blackhead mesh is then judged according to similarity value Whether mark is blackhead.Specifically, can construct to obtain characteristics of image by preset order according to index parameter each in image feature information Vector, such as { v1,v2,…,vn, wherein v1, v2..., vnRespectively indicate each index parameter.In addition, default feature vector is basis The index parameter of real blackhead is preset, and construction method is similar to the construction method of image feature vector, presets spy Levying vector may include one or more, when to be multiple, can determine whether in the multiple similarity values being calculated with the presence or absence of small In the similarity value of preset threshold, and if it exists, then judge the doubtful blackhead target in segmented image for blackhead.For similarity value Calculation, phase between the two can be characterized by cosine similarity or Jie Kade Jaccard distance, Euclidean distance etc. Like angle value.
Step b5, judges whether the similarity value is less than preset threshold;
Step b6 determines the doubtful blackhead target in the segmented image if the similarity value is less than preset threshold For blackhead;
Step b7 obtains the quantity that similarity value is less than the segmented image of preset threshold, to obtain blackhead quantity, and according to Described image characteristic information obtains each blackhead size.
Both then judge whether the similarity value is less than preset threshold, if the similarity value is less than preset threshold, illustrate It is more similar, at this point, then determining that the doubtful blackhead target in segmented image is blackhead, and then obtains similarity value and be less than default threshold The quantity of the segmented image of value, to obtain blackhead quantity.If the similarity value is greater than or equal to preset threshold, illustrate the two difference It is larger, at this point, then determining that the doubtful blackhead target in segmented image is not blackhead.Then, it is obtained according to image feature information each Blackhead size.Wherein, blackhead diameter can be used to characterize in blackhead size, specifically, can according in shape feature perimeter or face Product is to obtain blackhead diameter, and when calculating, default blackhead is a regular circle shapes, straight to obtain blackhead according to perimeter or areal calculation Diameter.
By the above-mentioned means, the present embodiment can realize the intelligent recognition to blackhead, and detect that obtain blackhead information (including black Head quantity and blackhead size), it can determine that blackhead absorbs parameter according to blackhead information convenient for subsequent, and then control pore cleanser instrument and carry out It absorbs.
Further, before above-mentioned steps S21, the blackhead absorb method can also include: to the target image into Row image enhancement processing;
It is doubtful black convenient for subsequent acquisition to improve the contrast in target image between doubtful blackhead target and normal skin Head's mark improves the accuracy of subsequent blackhead recognition result, and then accurate determining blackhead absorbs parameter, in the present embodiment, After getting target image, image enhancement processing is carried out to the target image, wherein image enhancement is gone using a series of technologies Improve the visual effect of image, or converts images into a kind of form analyzed and handled more suitable for machine.Image increases Strength reason is that selectively prominent certain interested information, some unwanted information of inhibition improve the use value of image. Wherein, specific image enhancement processes can refer to the prior art, and details are not described herein again.In addition, in a particular embodiment, figure Image intensifying processing method is not limited to the above-mentioned conspicuousness detection method based on frequency coordination, can also be for based on spatial domain Conspicuousness detection method and other can enhance the method for image interior zone contrast.
At this point, step S21 includes: to carry out binary conversion treatment to the target image through image enhancement processing, binaryzation is obtained Image.
Then, the target image through image enhancement processing is handled, obtains the doubtful blackhead target in target image, And then subsequent step is continued to execute, implementation procedure can refer to above-mentioned the first and second embodiments, not repeat herein.
The present invention also provides a kind of blackhead absorption device, which includes memory, processor and is stored in On the memory and the blackhead that can run on the processor absorbs program, and the blackhead absorbs program by the processor The step of blackhead as described in any of the above item embodiment absorbs method is realized when execution.
The specific embodiment of blackhead absorption device of the present invention and above-mentioned blackhead absorption each embodiment of method are essentially identical, herein It does not repeat.
The present invention also provides a kind of computer readable storage medium, blackhead suction is stored on the computer readable storage medium Except program, the blackhead, which is absorbed, realizes that the blackhead as described in any of the above item embodiment absorbs method when program is executed by processor The step of.
The specific embodiment of computer readable storage medium of the present invention absorbs the basic phase of each embodiment of method with above-mentioned blackhead Together, therefore not to repeat here.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of blackhead absorbs method, which is characterized in that the blackhead absorb method the following steps are included:
When receiving blackhead absorption instruction, target image of the instruction acquisition to gettering region is absorbed according to the blackhead;
The target image is handled based on default processing rule, obtains blackhead information;
It determines that corresponding blackhead absorbs parameter according to the blackhead information, and state modulator pore cleanser instrument is absorbed according to the blackhead It is absorbed.
2. blackhead as described in claim 1 absorbs method, which is characterized in that described regular to the target based on default processing The step of image is handled, and blackhead information is obtained include:
Binary conversion treatment is carried out to the target image, obtains binary image;
Contour detecting is carried out to the binary image, and according to testing result by the region in the target image there are profile As doubtful blackhead target;
The target image is split based on the doubtful blackhead target, obtains the segmentation figure comprising doubtful blackhead target Picture;
Feature extraction is carried out to the segmented image, obtains image feature information, and based on default detected rule to described image Characteristic information carries out detection identification, obtains blackhead information.
3. blackhead as claimed in claim 2 absorbs method, which is characterized in that described to be carried out at binaryzation to the target image Before the step of managing, obtaining binary image, further includes:
Image enhancement processing is carried out to the target image;
Described to carry out binary conversion treatment to the target image, the step of obtaining binary image, includes:
Binary conversion treatment is carried out to the target image through image enhancement processing, obtains binary image.
4. blackhead as claimed in claim 2 absorbs method, which is characterized in that described to be based on default detected rule to described image The step of characteristic information carries out detection identification, obtains blackhead information include:
Whether detection described image characteristic information meets preset condition;
If described image characteristic information meets preset condition, determine that the doubtful blackhead target in the segmented image is blackhead;
The quantity that image feature information meets the segmented image of preset condition is obtained, to obtain blackhead quantity, and according to the figure As characteristic information obtains each blackhead size.
5. blackhead as claimed in claim 2 absorbs method, which is characterized in that described to be based on default detected rule to described image The step of characteristic information carries out detection identification, obtains blackhead information include:
Image feature vector is constructed according to described image characteristic information, and calculates described image feature vector and default feature vector Between similarity value;
Judge whether the similarity value is less than preset threshold;
If the similarity value is less than preset threshold, determine that the doubtful blackhead target in the segmented image is blackhead;
The quantity that similarity value is less than the segmented image of preset threshold is obtained, to obtain blackhead quantity, and according to described image spy Levy each blackhead size of acquisition of information.
6. the blackhead as described in any one of claims 1 to 5 absorbs method, which is characterized in that described image characteristic information packet Include one of color characteristic, shape feature and textural characteristics or a variety of.
7. the blackhead as described in any one of claims 1 to 5 absorbs method, which is characterized in that the blackhead information includes black Head quantity and blackhead size, the blackhead absorbs parameter and includes suction size and absorb frequency, described according to the blackhead information It determines that corresponding blackhead absorbs parameter, and the step of state modulator pore cleanser instrument is absorbed is absorbed according to the blackhead and includes:
According to the blackhead quantity and the blackhead size respectively where the default mapping relations in section and first, determine corresponding Suction size and absorption frequency;
It is absorbed according to the suction size and absorption frequency control pore cleanser instrument.
8. blackhead as claimed in claim 7 absorbs method, which is characterized in that it is described determined according to the blackhead information it is corresponding Blackhead absorbs parameter, and absorbs the step of state modulator pore cleanser instrument is absorbed according to the blackhead further include:
The mean size of blackhead is calculated according to the blackhead quantity and the blackhead size;
The default mapping relations in section and second where the mean size determine corresponding suction size and absorb frequency Rate;
It is absorbed according to the suction size and absorption frequency control pore cleanser instrument.
9. a kind of blackhead absorption device, which is characterized in that the blackhead absorption device includes: memory, processor and is stored in On the memory and the blackhead that can run on the processor absorbs program, and the blackhead absorbs program by the processor The step of absorbing method such as blackhead described in any item of the claim 1 to 8 is realized when execution.
10. a kind of computer readable storage medium, which is characterized in that be stored with blackhead suction on the computer readable storage medium Except program, the blackhead is absorbed and realizes that blackhead described in any item of the claim 1 to 8 such as is absorbed when program is executed by processor The step of method.
CN201910369566.4A 2019-04-30 2019-04-30 Blackhead absorbs method, apparatus and computer readable storage medium Pending CN110310252A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910369566.4A CN110310252A (en) 2019-04-30 2019-04-30 Blackhead absorbs method, apparatus and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910369566.4A CN110310252A (en) 2019-04-30 2019-04-30 Blackhead absorbs method, apparatus and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110310252A true CN110310252A (en) 2019-10-08

Family

ID=68075354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910369566.4A Pending CN110310252A (en) 2019-04-30 2019-04-30 Blackhead absorbs method, apparatus and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110310252A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106875391A (en) * 2017-03-02 2017-06-20 深圳可思美科技有限公司 The recognition methods of skin image and electronic equipment
CN108323203A (en) * 2017-07-17 2018-07-24 深圳和而泰智能控制股份有限公司 A kind of method, apparatus and intelligent terminal quantitatively detecting face skin quality parameter
CN109330449A (en) * 2018-10-23 2019-02-15 北京小米移动软件有限公司 Face cleaning method and device
CN109544516A (en) * 2018-11-05 2019-03-29 深圳和而泰数据资源与云技术有限公司 Image detecting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106875391A (en) * 2017-03-02 2017-06-20 深圳可思美科技有限公司 The recognition methods of skin image and electronic equipment
CN108323203A (en) * 2017-07-17 2018-07-24 深圳和而泰智能控制股份有限公司 A kind of method, apparatus and intelligent terminal quantitatively detecting face skin quality parameter
CN109330449A (en) * 2018-10-23 2019-02-15 北京小米移动软件有限公司 Face cleaning method and device
CN109544516A (en) * 2018-11-05 2019-03-29 深圳和而泰数据资源与云技术有限公司 Image detecting method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王俊: ""基于马氏距离的皮肤图像症状识别系统的设计"", 《视频技术应用与工程》 *

Similar Documents

Publication Publication Date Title
US9076029B2 (en) Low threshold face recognition
US8358813B2 (en) Image preprocessing
US20110299774A1 (en) Method and system for detecting and tracking hands in an image
EP1353516A1 (en) A method and apparatus for detecting and/or tracking one or more colour regions in an image or sequence of images
KR20150024769A (en) Imaging apparatus and imaging method thereof, image processing apparatus and image processing method thereof, and program
US20110181746A1 (en) Image Preprocessing
US8358812B2 (en) Image Preprocessing
CN103455790A (en) Skin identification method based on skin color model
CN106056064A (en) Face recognition method and face recognition device
CN104574285B (en) One kind dispels the black-eyed method of image automatically
WO2017092431A1 (en) Human hand detection method and device based on skin colour
CN109272459A (en) Image processing method, device, storage medium and electronic equipment
CN107016324B (en) Fingerprint image processing method and fingerprint detection equipment
CN108174185A (en) A kind of photographic method, device and terminal
Abate et al. Kurtosis and skewness at pixel level as input for SOM networks to iris recognition on mobile devices
US8244004B2 (en) Image preprocessing
CN111240612A (en) Method and terminal for adjusting screen resolution
US8948469B2 (en) Information processing device, information processing method, and program
CN103729624A (en) Photometry method and system based on skin color recognition
CN110310252A (en) Blackhead absorbs method, apparatus and computer readable storage medium
WO2016075978A1 (en) Information processing device, information processing method, and program
KR20130111021A (en) Device and method for processing image
CN109086724A (en) A kind of method for detecting human face and storage medium of acceleration
Low et al. Experimental study on multiple face detection with depth and skin color
CN108234882B (en) Image blurring method and mobile terminal

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