CN109299634A - Spot detection method, system, equipment and storage medium - Google Patents

Spot detection method, system, equipment and storage medium Download PDF

Info

Publication number
CN109299634A
CN109299634A CN201710609686.8A CN201710609686A CN109299634A CN 109299634 A CN109299634 A CN 109299634A CN 201710609686 A CN201710609686 A CN 201710609686A CN 109299634 A CN109299634 A CN 109299634A
Authority
CN
China
Prior art keywords
image
spot
face
pixel
threshold
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
CN201710609686.8A
Other languages
Chinese (zh)
Inventor
罗丽程
李俊毅
胡勇
巩彩兰
柴刚
苏锦程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhongke Top Faith Medical Imaging Technology Co Ltd
Original Assignee
Shanghai Zhongke Top Faith Medical Imaging 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 Shanghai Zhongke Top Faith Medical Imaging Technology Co Ltd filed Critical Shanghai Zhongke Top Faith Medical Imaging Technology Co Ltd
Priority to CN201710609686.8A priority Critical patent/CN109299634A/en
Publication of CN109299634A publication Critical patent/CN109299634A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/2163Partitioning the feature space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis

Abstract

The application provides a kind of spot detection method, system, equipment and storage medium, wherein the spot detection method, comprising: the acquired face-image based on ultraviolet light wave band is carried out gray scale pretreatment;By pretreated face-image piecemeal, and determine the spot segmentation threshold of each image block;Each image block is filtered respectively according to spot segmentation threshold corresponding to each image block, to obtain each candidate spot image in the face-image;The target spot image in the face-image is screened from each candidate spot image.The characteristics of the application does not have unified standard using the feature of the gray scale of spot and skin mutation and the gray scale about spot of each tester, carries out the spot extraction process of piecemeal, to face-image to effectively reduce the missing inspection of spot;Simultaneously because avoiding great amount of samples image required for sample training using the detection based on gray scale, software cost performance is effectively increased.

Description

Spot detection method, system, equipment and storage medium
Technical field
This application involves technical field of image processing more particularly to a kind of spot detection method, system, equipment and storage to be situated between Matter.
Background technique
With the raising of people's quality of the life, people increasingly pay close attention to skin quality, especially facial skin quality. For example, long spot, spot distribution situation etc. all reflect the skin quality of people's face.Medical treatment and beauty treatment fields in profession, spot inspection Survey the melanin distribution for being applied not only to reflection skin of face and precipitation status or doctor carry out spot pathological analysis, spot it is potential The reference of lesion.For this purpose, carrying out spot detection to user, and carry out to user according to testing result for medical treatment and beauty Treatment and beauty can provide more accurate medical and beauty treatment service.Currently, detection such as application number of the face detection equipment to spot The 201610798036.8 a large amount of skin-likes of the use obtained spot feature originally, and then detected in face-image and meet individual features Region to be determined as spot.The program need to carry out feature training using great amount of samples, it is clear that software cost is relatively high.
Summary of the invention
The application provides a kind of spot detection method, system, equipment and storage medium, to realize that efficiently simple spot detects mesh 's.
To achieve the above object and other purposes, the application first aspect provide a kind of spot detection method, comprising: will be obtained The face-image based on ultraviolet light wave band taken carries out gray scale pretreatment;By pretreated face-image piecemeal, and determine each The spot segmentation threshold of image block;Each image block is filtered respectively according to spot segmentation threshold corresponding to each image block, with Each candidate spot image into the face-image;The target spot in the face-image is screened from each candidate spot image Image.
In the certain embodiments of the first aspect, the method also includes: it shoots under comprising ultraviolet light environments The step of face-image.
It is described by the acquired face-image based on ultraviolet light wave band in the certain embodiments of the first aspect The mode for carrying out gray scale pretreatment includes: using the gray difference in face-image between spot and skin, and prominent includes spot image Pixel grey scale.
It is described by pretreated face-image piecemeal in the certain embodiments of the first aspect, and determine each The mode of the spot segmentation threshold of image block includes: that pretreated face-image is down-sampled according to the image block progress divided Processing;With threshold window traversal it is down-sampled after image, by the pixel assignment in the threshold window be spot point during traversal Cut threshold value.
In the certain embodiments of the first aspect, it is described according to spot segmentation threshold corresponding to each image block to each The mode that image block is filtered respectively includes: the position based on each image block in down-sampled rear each pixel and the face-image Corresponding relationship is filtered corresponding image block using each pixel after assignment.
In the certain embodiments of the first aspect, the mode packet of the spot segmentation threshold of each image block of determination It includes: one by one determining the spot segmentation threshold of each described image block based on Da-Jin algorithm thresholding algorithm.
In the certain embodiments of the first aspect, the method also includes: each spot calculated to institute divides threshold The step of value compensates.
It is described to be screened in the face-image from each candidate spot image in the certain embodiments of the first aspect The mode of target spot image include: the kick-out condition based on preset shape and/or size, screened from each candidate spot image Target spot image.
The application second aspect also provides a kind of spot detection system, comprising: preprocessing module, for by it is acquired based on The face-image of ultraviolet light wave band carries out gray scale pretreatment;Spot image zooming-out module, for dividing pretreated face-image Block determines the spot segmentation threshold of each image block, and distinguishes according to spot segmentation threshold corresponding to each image block each image block It is filtered to obtain each candidate spot image in the face-image;Screening module, for from each candidate spot image Screen the target spot image in the face-image.
In the certain embodiments of the second aspect, the system also includes: photographing module, for comprising ultraviolet Face-image is obtained under luminous environment.
In the certain embodiments of the second aspect, the preprocessing module is used to utilize spot and skin in face-image Gray difference between skin, prominent includes the pixel grey scale of spot image.
In the certain embodiments of the second aspect, the spot image zooming-out module is by pretreated face-image Piecemeal, the mode for determining the spot segmentation threshold of each image block include: by pretreated face-image according to the image divided Block carries out down-sampled processing;With the down-sampled rear image of threshold window traversal, by the picture in the threshold window during traversal Element is assigned a value of spot segmentation threshold.
In the certain embodiments of the second aspect, the spot image zooming-out module is according to corresponding to each image block The mode that spot segmentation threshold is filtered each image block respectively includes: based in down-sampled rear each pixel and the face-image The position corresponding relationship of each image block is filtered correspondence image block in the face-image using each pixel after assignment.
In the certain embodiments of the second aspect, the spot image zooming-out module determines the spot segmentation of each image block The mode of threshold value includes: the spot segmentation threshold that each described image block is one by one determined based on Da-Jin algorithm thresholding algorithm.
In the certain embodiments of the second aspect, the spot image zooming-out module is also used to calculated to institute each Spot segmentation threshold compensates.
In the certain embodiments of the second aspect, the screening module is based on preset shape and/or size Kick-out condition screens target spot image from each candidate spot image.
The application third aspect provides a kind of face detection equipment, comprising: storage device, for storing face-image and use In the program for executing spot detection method;Processing unit is connect with the storage device, for executing described program to execute as above Any spot detection method.
In the certain embodiments of the third aspect, the equipment further include: photographic device, for absorbing facial figure Picture simultaneously saves in the storage device.
In the certain embodiments of the third aspect, the equipment further include: shooting suggestion device is located at camera shooting dress Before setting, for prompting tester to put on the head in photographic device intake direction.
In the certain embodiments of the third aspect, the equipment further include: light supply apparatus, for being mentioned to tester For the shooting environmental comprising ultraviolet light.
In the certain embodiments of the third aspect, the equipment further include: display device is marked for showing The face-image of detected spot image.
The application fourth aspect provides a kind of storage medium, is stored with face-image and the journey for carrying out spot detection Sequence;Wherein, described program is schemed when being executed by processor according to the step detection face in any detection method as above Target spot image as in.
Spot detection method, system, equipment and storage medium provided herein utilizes the mutation of the gray scale of spot and skin The characteristics of feature and the gray scale about spot of each tester do not have unified standard carries out the spot of piecemeal to face-image Extraction process, to effectively reduce the missing inspection of spot;Simultaneously because being avoided required for sample training using the detection based on gray scale Great amount of samples image effectively increases software cost performance.
In addition, the melanin deposition for not being apparent in facial surface can be obtained using the face-image of ultraviolet light wave band, into And the distribution situation of spot, potentially even spot is obtained comprehensively.
In addition, using down-sampled processing, can the class of effectively improving separate the calculating speed of threshold value, the operation for reducing processor is negative Load.
It can effectively prevent that spot proportion in image block is too small and band in addition, compensating to obtained spot segmentation threshold The case where threshold value unreasonable distribution come.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the application spot detection method in one embodiment.
Fig. 2 is the pixel schematic diagram of candidate spot image in the image block of the application.
Fig. 3 is the pixel schematic diagram for the candidate spot image that the multiple images block of the application splices.
Fig. 4 is the flow diagram of the application spot detection method in yet another embodiment.
Fig. 5 is the configuration diagram of the application spot detection system in one embodiment.
Fig. 6 is the configuration diagram of the application spot detection system in yet another embodiment.
Fig. 7 is the structural schematic diagram of the application face detection equipment in one embodiment.
Fig. 8 is the structural schematic diagram of the application face detection equipment in yet another embodiment.
Specific embodiment
Illustrate presently filed embodiment below by way of specific specific example, those skilled in the art can be by this specification Disclosed content understands other advantages and effect of the application easily.The application can also pass through in addition different specific realities The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints and application, without departing from Various modifications or alterations are carried out under spirit herein.
It should be noted that this specification structure depicted in this specification institute accompanying drawings, ratio, size etc., only to cooperate The bright revealed content of book is not limited to the enforceable limit of the application so that those skilled in the art understands and reads Fixed condition, therefore do not have technical essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size, not It influences still fall in techniques disclosed in this application content under the effect of the application can be generated and the purpose that can reach and obtain In the range of capable of covering.Meanwhile it is cited such as "upper", "lower", "left", "right", " centre " and " one " in this specification Term is merely convenient to being illustrated for narration, rather than to limit the enforceable range of the application, the change of relativeness or tune It is whole, under the content of no substantial changes in technology, when being also considered as the enforceable scope of the application.
Referring to Fig. 1, the application provides a kind of spot detection method.The spot detection method is mainly held by computer equipment Row.The computer equipment is the electronic equipment for referring to carry out numerical value calculating and data logical process based on instruction comprising But it is not limited to: professional spot detection device, intelligent terminal, server-side, PC device etc..Wherein, professional spot detection device It is exemplified as being set to the face detection equipment of beauty parlor, hospital.The intelligent terminal is exemplified as tablet computer or smart mobile phone.Institute Stating server-side includes but is not limited to: single server, server cluster, server-side based on cloud framework etc..The individual calculus Machine equipment is exemplified as laptop, desktop computer terminal etc..
Wherein, the spot detection method mainly for detection of tester's face spot, for this purpose, the method use to test The mode that person's face-image carries out image procossing carries out spot detection.The face-image can be provided by photographic device, or via net Network is obtained from other equipment.Wherein, spot detection is accurately relevant to face-image readability, so in order to scheme to face As carrying out accurate spot detection, used photographic device need to be adjusted to ensure to take clearly face-image.Example Such as, clearly face is obtained at a distance of the distance etc. of photographic device by adjusting the aperture of photographic device, focal position and user Portion's image.In addition to this, the interference that background detects spot in order to prevent, acquired face-image is also with pure color, light background It is preferred, it is not intended that face-image used in this application is necessarily pure color or light background.Those skilled in the art can benefit Background is handled with stingy diagram technology, is not described in detail herein.
Since the melanin precipitated in skin is easy to be apparent under ultraviolet light environments, so, in the shooting area of photographic device Ultraviolet light is added in domain, to shoot the face-image based on ultraviolet light wave band.For the face figure shot under natural light environment Picture, the application can extract ultraviolet light wave band in acquired face-image in advance.For example, according to preset ultraviolet light color area Between, pixel RGB values each in face-image are filtered to obtain the face-image based on ultraviolet light wave band.
In step s 110, the face-image by acquired based on ultraviolet light wave band carries out gray scale pretreatment.Specifically, The computer equipment extracts the gray value of the face-image to obtain the image array being made of gray value.Then, it utilizes Gray difference in face-image between spot and skin, prominent includes the pixel grey scale of spot image.Specifically it can be used to the image Matrix carries out at least one of gray scale stretching, median filtering etc. gray scale pretreatment, on the one hand inhibits in face-image as background Image section gray scale, the image section gray scale including on the other hand highlighting comprising spot.
Here, a kind of mode of the dynamic range of the gray level when gray scale stretching processing is raising image procossing, For improving comprising the gap between the gray scale and skin and background gray scale including spot, be conducive to more complete when gray scale filters Retain spot image.Here, the computer equipment can utilize preset piecewise linear transform function or histogram equalization algorithm pair Face-image carries out whole gray scale stretching processing.For example, carrying out the gray value of pixel each in whole picture face-image based on line Property stretching conversion, thus stretch entire image gray scale.For another example, a gray scale stretching window is set, by the gray scale stretching window time Entire image is gone through, and gray scale stretching processing is carried out to pixel each in window, to obtain the face-image after gray scale stretching.Wherein, The gray scale stretching processing citing uses formula:Wherein, x is the pixel ash before the adjustment of a certain pixel Angle value, xminTo adjust the minimum value in preceding each pixel gray value, xmaxTo adjust in preceding each pixel gray value most Big value,For the minimum value after adjustment in each pixel gray value,For the maximum in each pixel gray value after adjustment Value, x*For pixel pixel gray value adjusted.
It should be noted that the mode of above-mentioned gray scale stretching is only for example, rather than the limitation to the application.In fact, this Application is for pixel grey scale in the prominent image section comprising including spot while to inhibit as back using the purpose of gray scale stretching Thus pixel grey scale in the skin image part of scape improves spot Detection accuracy.Other gray scale stretching modes can be used in the application To reach above-mentioned purpose.
Here, the median filter process is intended to filter out the noise in face-image.For example, by preset filter window time It filters whole picture face-image with going through formula, and each matrix in filter window is subjected to average value processing, so inhibit and make an uproar Interference of the sound to face-image.Wherein, the size of the filter window can not be limited by spot size.Wherein, at the mean value The mode of reason is illustrated are as follows: calculates the average value of the gray value of M pixel in a filter window;Judge M pixel Whether gray value is equal with the average value of the gray value of M pixel;If so, determining any one picture in M pixel The gray value of vegetarian refreshments is the intermediate value of the gray value of the pixel in the filter window;If it is not, M pixel is divided into two collection It closes, judges whether the number of the pixel in this two set is respectively less than the half of pixel quantity in filter window;If so, when should The number of the pixel in a set in two set is greater than or equal to the picture in another set in this two set The number of vegetarian refreshments determines that the gray value of s-th of pixel in another set is intermediate value, s according to sequence from large to small For the number of the pixel in this set, when the number of the pixel in this set is less than in this another set The number of pixel determines that the gray value of t-th of pixel in this set is intermediate value, t according to sequence from small to large For the number of the pixel in another set;If it is not, the number of the pixel for including in this two set is more Pixel in set continues to be divided into two set, until the number of the pixel in two set finally separated is respectively less than and filters The half of pixel quantity in wave window.
It should be noted that the mode of above-mentioned median filtering is only for example, rather than the limitation to the application.In fact, this Application is thus to improve spot Detection accuracy to filter out the noise in image using the purpose of median filtering.The application can adopt With other median filtering modes (such as Fast Median Filtering algorithm) to reach above-mentioned purpose.
In the step s 120, by pretreated face-image piecemeal, and the spot segmentation threshold of each image block is determined.Its In, it can be divided equally according to the Pixel Dimensions of face-image, or the face-image is carried out according to preset block size Piecemeal processing.
In some embodiments, pixel in each image block can be carried out gray-scale statistical, and root by the computer equipment Result chooses the spot segmentation threshold of correspondence image block according to statistics.Wherein, choosing the mode of spot segmentation threshold, can be used will be with image Gray scale relative scale in block and set.
In other embodiments, the computer equipment one by one determines each figure based on Da-Jin algorithm thresholding algorithm As the spot segmentation threshold of block.Here, the Da-Jin algorithm is also referred to as maximum kind differences method, according to the gamma characteristic of image, by image It is divided into background and prospect two parts.Because variance is a kind of measurement of intensity profile uniformity, side between the class between background and prospect Difference is bigger, illustrates that the two-part difference for constituting image is bigger, and when part, prospect mistake is divided into background or before part background mistake is divided into Jing Douhui causes two parts difference to become smaller.Therefore, the maximum segmentation of inter-class variance is made to mean misclassification probability minimum.In this step In, threshold calculations, obtained spot segmentation threshold are carried out to the pixel grey scale in each image block using Da-Jin algorithm thresholding algorithm It will be as the screening conditions for further suppressing background.The application uses face-image piecemeal and the spot segmentation of each image block is arranged The mode of threshold value efficiently solves the problems, such as the detection inaccuracy of spot brought by spot brightness irregularities.
During portion's image carries out piecemeal processing over there, technical staff is had found for full skin image block or comprising smaller The image block of spot size, using above-mentioned Da-Jin algorithm calculate threshold value will appear the too low situation of spot segmentation threshold, for this purpose, this step into One step includes: the step of compensating to the calculated each spot segmentation threshold of institute.
Specifically, an offset delta, bottom threshold th_min and upper threshold th_max are preset, which can press Experience is obtained or is obtained based on machine learning.It is th_ according to the threshold value that Da-Jin algorithm thresholding algorithm obtains corresponding to each image block Ostu, the spot segmentation threshold of each image block are set as th=th_ostu+delta, and by each th respectively with th_min and th_ Max compares, as th<th_min, then th=th_min, and as th>th_max, then th=th_max, spot point in the case of other Cutting threshold value is th_ostu+delta.
Spot segmentation threshold spot segmentation threshold in step s 130, according to spot segmentation threshold corresponding to each image block to each figure As block is filtered respectively, to obtain each candidate spot image in the face-image.
Specifically, this step can be in the spot segmentation threshold for determining each image block, or is determining all image blocks After spot segmentation threshold, retains the gray value for being lower than the spot segmentation threshold in corresponding image block and improve more than or equal to the spot point Cut the gray value of threshold value.Or the gray value of pixel each in corresponding image block is carried out by binary conversion treatment based on spot segmentation threshold.Example Such as, the gray value that corresponding spot segmentation threshold is lower than in image block is set as 0 (regarding this gray value as retained pixel), and will Gray value more than or equal to the spot segmentation threshold is set as 255.Wherein, it is retained the region quilt that the pixel of gray value is practiced As candidate spot image.Obtained candidate's spot image may be in an image block, it is also possible to spliced by adjacent image block and At.So the determination of candidate's spot image is based on obtained from whole picture face-image, rather than only in accordance with single image block. For example, being located in image block A as shown in Fig. 2, being retained region composed by each neighbor pixel of gray scale in image block A Portion is around surrounded by the pixel of low ash angle value (such as gray value is 0), it is determined that the institute encloses region for candidate spot image.For another example, It is handed over as shown in figure 3, being retained region composed by each neighbor pixel of gray scale in image block B and being located at image block B and image block C Place is met, then computer equipment extends the gray scale of detection pixel point from image block C with the joint image block B to image block C simultaneously Value, to obtain complete candidate spot image.
In other specific examples, this step can be according to the area surrounded based on the pixel being filtered off in face-image Domain is determined as candidate spot image.Here, in a manner of being used in this example using face-image as analysis object, the phase that will be filtered off Adjacent pixel (such as remaining with the neighbor pixel of gray value) area defined is as candidate spot image.
In step S140, the target spot image in the face-image is screened from each candidate spot image.Specifically Each candidate spot image is matched, is tied according to matching based on the preset shape for meeting spot and/or size condition by ground Fruit determines target spot image in the face-image.Here, the computer equipment can be according to pixel in candidate spot image Number and position determine the shape and size of candidate spot image.For example, being waited using single pixel point as unit area by statistics The pixel number in spot image is selected, determines the area of each candidate spot image.For another example, according to pixel in each candidate spot image The position of point determines the profile of candidate spot image.Area can be less than the candidate spot figure of preset area threshold value by the computer equipment Retained as being retained, and/or by chamfered shape close to circular candidate spot image, thus obtains the mesh in face-image Mark spot image.
Since the shape of spot is not necessarily circle, size is also without exact range, therefore, in some embodiments, Kick-out condition based on preset shape and/or size screens target spot image from each candidate spot image.For example, being preset with The kick-out condition of the shapes such as corresponding pore, wrinkle and/or size will form the pixel quantity and/or profile of candidate spot image It is matched respectively with corresponding kick-out condition, if meeting kick-out condition, confirms corresponding candidate spot image and non-targeted spot image, By filtering one by one to candidate spot image, the spot image retained is target spot image.
Further, obtained target spot image is stackable on original facial image, and is shown to tester and doctor It is raw, the position of spot, shape, size, the label of especially potential spot and display thus are observed convenient for tester and doctor, can be helped The more accurate carry out pathological diagnosis of doctor.
Referring to Fig. 4, the application also provides a kind of spot detection method.The spot detection method executes following steps:
In step S210, the acquired face-image based on ultraviolet light wave band is subjected to gray scale pretreatment.
It should be noted that the specific executive mode of step S210 can be identical as the executive mode of step S110 in Fig. 1 Or it is similar, this will not be detailed here.Even be further included in includes the step of shooting face-image under ultraviolet light environments, to obtain The face-image based on ultraviolet light wave band, is quoted in this together.
In step S220, pretreated face-image is subjected to down-sampled processing according to the image block divided.? Pretreated face-image is carried out down-sampled processing to improve the computational efficiency of spot segmentation threshold by this.Due to down-sampled The gray value of image afterwards represents the average gray value of down-sampled preceding correspondence image block, thus it is down-sampled after image spy Sign can still represent the feature of down-sampled preceding image block.
For example, a default down-sampled window (should be regarded as the window for segmented image block), wherein the down-sampled window Size be less than spot image size, to avoid the Character losing of spot image.Wherein, the size of spot image can be empirical The diameter of average spot image.The down-sampled window is traversed into the face-image without overlapping, according to preset during traversal The weight for each pixel being arranged in the window each grey scale pixel value in window is calculated with obtain it is down-sampled after Pixel value the pixel value is arranged on the location of pixels of down-sampled rear image.An image block in the location of pixels and original image Position is corresponding.
It, will be in the threshold window during traversal with the down-sampled rear image of threshold window traversal in step S230 Pixel assignment be spot segmentation threshold.
Specifically, the threshold window is traversed into entire down-sampled rear image using pixel as offset.During traversal, The pixel region covered to each threshold window carries out threshold calculations and obtained threshold value is assigned in the pixel region A pixel.For example, the size of the threshold window, which can be preset, is set to n*n size, wherein n is odd number, right during traversal The pixel region that each threshold window is covered carries out threshold calculations and obtained threshold value is assigned to position in the pixel region In the pixel (hereinafter referred to as central pixel point) of regional center;The threshold window is traversed by step-length of a pixel, it will Assignment, institute's assignment are set as spot segmentation threshold to each pixel again in image after down-sampled.
In some embodiments, pixel in each threshold window can be carried out gray-scale statistical by the computer equipment, and The pixel choosing corresponding spot segmentation threshold according to statistical result and being assigned in the threshold window.Wherein, spot point is chosen The mode for cutting threshold value can be used and will be set with the gray scale relative scale in threshold window.
In other embodiments, the computer equipment is determined in each threshold window based on Da-Jin algorithm thresholding algorithm Spot segmentation threshold and the pixel (such as central pixel point) that is assigned in respective threshold window.Here, the Da-Jin algorithm is also referred to as Maximum kind differences method divides the image into background and prospect two parts according to the gamma characteristic of image.Because variance is intensity profile A kind of measurement of uniformity, the inter-class variance between background and prospect is bigger, illustrates that the two-part difference for constituting image is bigger, When part, prospect mistake is divided into background or part background mistake is divided into prospect and all two parts difference can be caused to become smaller.Therefore, make side between class The maximum segmentation of difference means misclassification probability minimum.In this step, using Da-Jin algorithm thresholding algorithm in each threshold window Pixel grey scale carry out threshold calculations and assignment again.Image after assignment is referred to as threshold binary image.
During carrying out assignment processing to threshold window, technical staff's discovery, which calculates threshold value using above-mentioned Da-Jin algorithm, will appear The too low situation of spot segmentation threshold, for this purpose, this step further comprises: to calculated each spot segmentation threshold compensate Step.
Specifically, an offset delta, bottom threshold th_min and upper threshold th_max are preset, which can press Experience is obtained or is obtained based on machine learning.It is th_ according to the threshold value that Da-Jin algorithm thresholding algorithm obtains corresponding to each image block Ostu, the spot segmentation threshold of each image block are set as th=th_ostu+delta, and by each th respectively with th_min and th_ Max compares, as th<th_min, then th=th_min, and as th>th_max, then th=th_max, spot point in the case of other Cutting threshold value is th_ostu+delta.
Spot segmentation threshold spot segmentation threshold is in step S240, based on each in down-sampled rear each pixel and the face-image The position corresponding relationship of image block is filtered corresponding image block using each pixel after assignment.
Specifically, the computer equipment is reduced during down-sampled according to the face-image after gray scale pretreatment Image block and position region, each pixel corresponds to each tool in the face-image after gray scale pretreatment in threshold value image Body image block.For example, the face-image A1 after gray scale pretreatment isDown-sampled face-image A2 isImage block in pixel a11' correspondence image A1 in image A2For another example, by threshold binary image according to down-sampled When the down-sampled window that is divided carry out a liter sampling processing, i.e., it is down-sampled each pixel value in threshold binary image to be assigned to correspondence The all pixels point of window, and according to the positional relationship of pixel each in threshold binary image and down-sampled window traversal, obtain a liter sampling Threshold binary image (after restoring) afterwards.Pixel in threshold binary image and face-image after reduction corresponds.Thus it obtains Each image block has corresponding spot segmentation threshold in face-image.
Then, using pixel value each in threshold binary image (i.e. spot segmentation threshold) by correspondence image block in the face-image It is filtered.Specifically, grey scale pixel value each in image block is compared with corresponding spot segmentation threshold, if grey scale pixel value is small Then retained or be all set to minimum gray value (such as 0) in corresponding spot segmentation threshold, and the spot segmentation that will be greater than or equal to Each pixel grey scale of threshold value is set as gray scale maximum value (such as 255).Wherein, it is retained the region quilt that the pixel of gray value is linked to be As candidate spot image, obtained candidate's spot image may be in an image block, it is also possible to spliced by adjacent image block and At.So the determination of candidate's spot image is based on obtained from whole picture face-image, rather than only in accordance with single image block. For example, being located in image block A as shown in Fig. 2, being retained region composed by each neighbor pixel of gray scale in image block A Portion is around surrounded by the pixel of low ash angle value (such as gray value is 0), it is determined that the institute encloses region for candidate spot image.For another example, It is handed over as shown in figure 3, being retained region composed by each neighbor pixel of gray scale in image block B and being located at image block B and image block C Place is met, then computer equipment extends the gray scale of detection pixel point from image block C with the joint image block B to image block C simultaneously Value, to obtain complete candidate spot image.
In other specific examples, this step can be according to based on all neighbor pixel institutes being retained in face-image The region surrounded is determined as candidate spot image.Here, in a manner of being used in this example using whole picture face-image as analysis object, Using retained neighbor pixel (such as remaining with the neighbor pixel of gray value) area defined as candidate spot image.
In step S260, the target spot image in the face-image is screened from each candidate spot image.
It should be noted that the specific executive mode of step S260 can be identical as the executive mode of step S140 in Fig. 1 Or it is similar, this will not be detailed here.The step of even can also including by the display of obtained target spot image, draw in this together With.
Referring to Fig. 5, the application also provides a kind of spot detection system.The spot detection system 4 includes: preprocessing module 41, spot image zooming-out module 42, screening module 43.
Wherein, the spot detection system 4 mainly for detection of tester's face spot, for this purpose, the spot detection system 4 is adopted Spot detection is carried out with the mode for carrying out image procossing to tester's face-image.The face-image can be provided by photographic device, Or it is obtained via network from other equipment.Wherein, spot detection is accurately relevant to face-image readability, so in order to Accurate spot detection is carried out to face-image, used photographic device need to be adjusted clearly facial to ensure to take Image.For example, by adjusting photographic device aperture, focal position and user at a distance of the distance etc. of photographic device, obtain clear Clear face-image.In addition to this, the interference that background detects spot in order to prevent, acquired face-image is also with pure color, shallow Color background is preferred, it is not intended that face-image used in this application is necessarily pure color or light background.Those skilled in the art Member can be handled background using stingy diagram technology, be not described in detail herein.
Since the melanin precipitated in skin is easy to be apparent under ultraviolet light environments, so, the spot detection system 4 is also wrapped Include photographing module.The photographing module is to be arranged in photographic device or be integrated in image interception software in computer equipment, is being taken the photograph As device shooting area in add ultraviolet light, the photographing module is to shoot the face-image based on ultraviolet light wave band.For The face-image shot under natural light environment, the application can extract ultraviolet light wave band in acquired face-image in advance.Example Such as, pixel RGB values each in face-image are filtered according to preset ultraviolet light color interval to obtain by the photographing module Face-image based on ultraviolet light wave band.
The preprocessing module 41 is used for the face-image by acquired based on ultraviolet light wave band and carries out gray scale pretreatment. Specifically, the preprocessing module 41 extracts the gray value of face-image to obtain the image array being made of gray value.Then, Using the gray difference in face-image between spot and skin, prominent includes the pixel grey scale of spot image.Specifically it can be used to this Image array carries out at least one of gray scale stretching, median filtering etc. gray scale pretreatment, on the one hand inhibits conduct in face-image The image section gray scale of background, the image section gray scale including on the other hand highlighting comprising spot.
Here, a kind of mode of the dynamic range of the gray level when gray scale stretching processing is raising image procossing, For improving comprising the gap between the gray scale and skin and background gray scale including spot, be conducive to more complete when gray scale filters Retain spot image.Here, the preprocessing module 41 can utilize preset piecewise linear transform function or histogram equalization algorithm Whole gray scale stretching processing is carried out to face-image.For example, the preprocessing module 41 is by pixel each in whole picture face-image Gray value carry out based on linear stretching conversion, thus stretch the gray scale of entire image.For another example, a gray scale stretching window is set, The gray scale stretching window is traversed entire image by the preprocessing module 41, and is carried out at gray scale stretching to pixel each in window Reason, to obtain the face-image after gray scale stretching.Wherein, the gray scale stretching processing citing uses formula:Wherein, x is the pixel gray value before the adjustment of a certain pixel, xminTo adjust preceding each pixel ash Minimum value in angle value, xmaxTo adjust the maximum value in preceding each pixel gray value,For each pixel gray level after adjustment Minimum value in value,For the maximum value in each pixel gray value after adjustment, x*For pixel pixel adjusted Gray value.
It should be noted that the mode of above-mentioned gray scale stretching is only for example, rather than the limitation to the application.In fact, this Application is for pixel grey scale in the prominent image section comprising including spot while to inhibit as back using the purpose of gray scale stretching Thus pixel grey scale in the skin image part of scape improves spot Detection accuracy.Other gray scale stretching modes can be used in the application To reach above-mentioned purpose.
Here, the median filter process is intended to filter out the noise in face-image.For example, by preset filter window time It filters whole picture face-image with going through formula, and each matrix in filter window is subjected to average value processing, so inhibit and make an uproar Interference of the sound to face-image.Wherein, the size of the filter window can not be limited by spot size.Wherein, at the mean value The mode of reason is illustrated are as follows: calculates the average value of the gray value of M pixel in a filter window;Judge M pixel Whether gray value is equal with the average value of the gray value of M pixel;If so, determining any one picture in M pixel The gray value of vegetarian refreshments is the intermediate value of the gray value of the pixel in the filter window;If it is not, M pixel is divided into two collection It closes, judges whether the number of the pixel in this two set is respectively less than the half of pixel quantity in filter window;If so, when should The number of the pixel in a set in two set is greater than or equal to the picture in another set in this two set The number of vegetarian refreshments determines that the gray value of s-th of pixel in another set is intermediate value, s according to sequence from large to small For the number of the pixel in this set, when the number of the pixel in this set is less than in this another set The number of pixel determines that the gray value of t-th of pixel in this set is intermediate value, t according to sequence from small to large For the number of the pixel in another set;If it is not, the number of the pixel for including in this two set is more Pixel in set continues to be divided into two set, until the number of the pixel in two set finally separated is respectively less than and filters The half of pixel quantity in wave window.
It should be noted that the mode of above-mentioned median filtering is only for example, rather than the limitation to the application.In fact, this Application is thus to improve spot Detection accuracy to filter out the noise in image using the purpose of median filtering.The application can adopt With other median filtering modes (such as Fast Median Filtering algorithm) to reach above-mentioned purpose.
The spot image zooming-out module 42 is used for pretreated face-image piecemeal, and determines the spot point of each image block Cut threshold value.Wherein, can be divided equally according to the Pixel Dimensions of face-image, or according to preset block size to the face Image carries out piecemeal processing.
In some embodiments, pixel in each image block can be carried out gray scale system by the spot image zooming-out module 42 Meter, and according to the spot segmentation threshold of statistical result selection correspondence image block.Wherein, choose spot segmentation threshold mode can be used by It is set with the gray scale relative scale in image block.
In other embodiments, the spot image zooming-out module 42 is one by one determined each based on Da-Jin algorithm thresholding algorithm The spot segmentation threshold of described image block.Here, the Da-Jin algorithm is also referred to as maximum kind differences method, according to the gamma characteristic of image, Divide the image into background and prospect two parts.Because variance is a kind of measurement of intensity profile uniformity, between background and prospect Inter-class variance is bigger, illustrates that the two-part difference for constituting image is bigger, prospect mistake is divided into background when part or part background is wrong Being divided into prospect all can cause two parts difference to become smaller.Therefore, the maximum segmentation of inter-class variance is made to mean misclassification probability minimum.? In this step, threshold calculations, obtained spot point are carried out to the pixel grey scale in each image block using Da-Jin algorithm thresholding algorithm Cutting threshold value will be as the screening conditions for further suppressing background.The application uses face-image piecemeal and each image block is arranged The mode of spot segmentation threshold efficiently solves the problems, such as the detection inaccuracy of spot brought by spot brightness irregularities.
During portion's image carries out piecemeal processing over there, technical staff is had found for full skin image block or comprising smaller The image block of spot size, using above-mentioned Da-Jin algorithm calculate threshold value will appear the too low situation of spot segmentation threshold, for this purpose, this step into One step includes: the step of compensating to the calculated each spot segmentation threshold of institute.
Specifically, an offset delta, bottom threshold th_min and upper threshold th_max are preset, which can press Experience is obtained or is obtained based on machine learning.It is th_ according to the threshold value that Da-Jin algorithm thresholding algorithm obtains corresponding to each image block Ostu, the spot segmentation threshold of each image block are set as th=th_ostu+delta, and by each th respectively with th_min and th_ Max compares, as th<th_min, then th=th_min, and as th>th_max, then th=th_max, spot point in the case of other Cutting threshold value is th_ostu+delta.
Spot image zooming-out module 42 described in spot segmentation threshold spot segmentation threshold is also used to according to spot corresponding to each image block Segmentation threshold is filtered each image block respectively, to obtain each candidate spot image in the face-image.
Specifically, the spot image zooming-out module 42 can be in the spot segmentation threshold for determining each image block, or true After the spot segmentation threshold of fixed all image blocks, retains the gray value for being lower than the spot segmentation threshold in corresponding image block and improve big In the gray value for being equal to the spot segmentation threshold.Or the gray value of pixel each in corresponding image block is carried out based on spot segmentation threshold Binary conversion treatment.For example, the gray value for being lower than corresponding spot segmentation threshold in image block is set as 0, and the spot that will be greater than or equal to The gray value of segmentation threshold is set as 255.Wherein, the region that the pixel of retained gray value is practiced is by as candidate spot figure Picture.Obtained candidate's spot image may be in an image block, it is also possible to is spliced by adjacent image block.So described The determination of candidate spot image is based on obtained from whole picture face-image, rather than only in accordance with single image block.For example, such as Fig. 2 institute Show, the middle part that region composed by each neighbor pixel of gray scale is located at image block A is retained in image block A, around by low ash The pixel of angle value (such as gray value is 0) surrounds, it is determined that the institute encloses region for candidate spot image.For another example, as shown in figure 3, figure The region as composed by each neighbor pixel for being retained gray scale in block B is located at image block B and the junction image block C, then spot figure Extend the gray value of detection pixel point to image block C with the joint image block B as extraction module 42 while from image block C, with Obtain complete candidate spot image.
In other specific examples, the spot image zooming-out module 42 can be according to based on the picture being filtered off in face-image Vegetarian refreshments area defined is determined as candidate spot image.Here, being used in this example using face-image as the side of analysis object Formula, using the neighbor pixel being filtered off (such as remaining with the neighbor pixel of gray value) area defined as candidate spot figure Picture.
The screening module 43 is used to screen the target spot image in the face-image from each candidate spot image. Specifically, based on the preset shape for meeting spot and/or size condition, each candidate spot image is matched, according to Target spot image in the face-image is determined with result.Here, the screening module 43 can be according to pixel in candidate spot image The number of point and position determine the shape and size of candidate spot image.For example, passing through system using single pixel point as unit area The pixel number in candidate spot image is counted, determines the area of each candidate spot image.For another example, according in each candidate spot image The position of pixel determines the profile of candidate spot image.Area can be less than the candidate of preset area threshold value by the screening module 43 Spot image is retained, and/or chamfered shape is retained close to circular candidate spot image, is thus obtained in face-image Target spot image.
Since the shape of spot is not necessarily circle, size is also without exact range, therefore, in some embodiments, Kick-out condition based on preset shape and/or size screens target spot image from each candidate spot image.For example, being preset with The kick-out condition of the shapes such as corresponding pore, wrinkle and/or size will form the pixel quantity and/or profile of candidate spot image It is matched respectively with corresponding kick-out condition, if meeting kick-out condition, confirms corresponding candidate spot image and non-targeted spot image, By filtering one by one to candidate spot image, the spot image retained is target spot image.
Further, obtained target spot image is stackable on original facial image, and is shown to tester and doctor It is raw, the position of spot, shape, size, the label of especially potential spot and display thus are observed convenient for tester and doctor, can be helped The more accurate carry out pathological diagnosis of doctor.
Referring to Fig. 5, the application also provides a kind of spot detection system.The spot detection system 5 includes: preprocessing module 51, Spot image zooming-out module 52, screening module 53.
The preprocessing module 51 is used for the face-image by acquired based on ultraviolet light wave band and carries out gray scale pretreatment.
It should be noted that the specific executive mode of the preprocessing module 51 can be with the execution of preprocessing module 41 in Fig. 5 Mode is same or similar, and this will not be detailed here.It can also even be used for comprising photographing module (being unillustrated) comprising ultraviolet light Face-image is shot under environment, to obtain the face-image based on ultraviolet light wave band, is quoted in this together.
Described image extraction module 52 is used to pretreated face-image carrying out down-sampled processing.Here, in order to mention Pretreated face-image is carried out down-sampled processing by the computational efficiency of high spot segmentation threshold.Due to the image after down-sampled Gray value represent the average gray value of down-sampled preceding corresponding region, therefore it is down-sampled after the feature of image still can be with Represent the feature of down-sampled preceding image.
For example, a default down-sampled window (should be regarded as the window for segmented image block), wherein the down-sampled window Size be less than spot image size, to avoid the Character losing of spot image.Wherein, the size of spot image can be empirical The diameter of average spot image.Described image extraction module 52, which passes through, traverses the face-image for the down-sampled window, is traversing Period according to the weight of each pixel being arranged in the preset window to each grey scale pixel value in window calculated with Obtain it is down-sampled after pixel value, by the pixel value be arranged in it is down-sampled after image location of pixels on.The location of pixels with A tile location is corresponding in original image.
The spot image zooming-out module 52 is used for the down-sampled rear image of threshold window traversal, will be described during traversal Pixel assignment in threshold window is spot segmentation threshold.
Specifically, the threshold window is traversed entire drop as offset using pixel and adopted by the spot image zooming-out module 52 Image after sample.During traversal, the pixel region covered to each threshold window carries out threshold calculations and by obtained threshold Value is assigned to the pixel in the pixel region.For example, the size of the threshold window, which can be preset, is set to n*n size, wherein n For odd number, during traversal, the pixel region that the spot image zooming-out module 52 covers each threshold window carries out threshold value It calculates and obtained threshold value is assigned to pixel (the hereinafter referred to as center pixel for being located at regional center in the pixel region Point);Traverse the threshold window by step-length of a pixel, will be down-sampled after image in each pixel assignment again, Institute's assignment is set as spot segmentation threshold.
In some embodiments, pixel in each threshold window can be carried out gray scale system by the spot image zooming-out module 52 Meter, and the pixel that corresponding spot segmentation threshold is chosen according to statistical result and is assigned in the threshold window.Wherein, it chooses The mode of spot segmentation threshold, which can be used, to be set with the gray scale relative scale in threshold window.
In other embodiments, the spot image zooming-out module 52 determines each threshold value based on Da-Jin algorithm thresholding algorithm Spot segmentation threshold in window and the pixel (such as central pixel point) being assigned in respective threshold window.Here, the big saliva Method is also referred to as maximum kind differences method, according to the gamma characteristic of image, divides the image into background and prospect two parts.Because variance is ash A kind of measurement of distributing homogeneity is spent, the inter-class variance between background and prospect is bigger, illustrates the two-part difference for constituting image Not bigger, when part, prospect mistake is divided into background or part background mistake is divided into prospect and all two parts difference can be caused to become smaller.Therefore, make The maximum segmentation of inter-class variance means misclassification probability minimum.In spot image zooming-out module 52, Da-Jin algorithm thresholding algorithm is utilized Threshold calculations and again assignment are carried out to the pixel grey scale in each threshold window.Image after assignment is referred to as threshold binary image.
During carrying out assignment processing to threshold window, technical staff's discovery, which calculates threshold value using above-mentioned Da-Jin algorithm, will appear The too low situation of spot segmentation threshold, for this purpose, further each spot segmentation threshold calculated to institute carries out spot image zooming-out module 52 Compensation.
Specifically, an offset delta, bottom threshold th_min and upper threshold th_max are preset, which can press Experience is obtained or is obtained based on machine learning.It is th_ according to the threshold value that Da-Jin algorithm thresholding algorithm obtains corresponding to each image block Ostu, the spot segmentation threshold of each image block are set as th=th_ostu+delta, and by each th respectively with th_min and th_ Max compares, as th<th_min, then th=th_min, and as th>th_max, then th=th_max, spot point in the case of other Cutting threshold value is th_ostu+delta.
Then, the position corresponding relationship based on each image block in down-sampled rear each pixel and the face-image, utilizes tax Each pixel after value is filtered corresponding image block.
Specifically, the spot image zooming-out module 52 is according to the face-image after gray scale pretreatment in down-sampled institute in the process The image block of reduction and position region, each pixel corresponds in the face-image after gray scale pretreatment in threshold value image Each specific image block.For example, the face-image A1 after gray scale pretreatment isDown-sampled face-image A2 ForImage block in pixel a11' correspondence image A1 in image A2For another example, threshold binary image is adopted according to drop The down-sampled window divided when sample carries out a liter sampling processing, i.e., each pixel value in threshold binary image is assigned to corresponding drop and adopted The all pixels point of sample window, and according to the positional relationship of pixel each in threshold binary image and down-sampled window traversal, it obtains rising and adopt Threshold binary image after sample (after restoring).Pixel in threshold binary image and face-image after reduction corresponds.Thus Into face-image, each image block has corresponding spot segmentation threshold.
Then, spot image zooming-out module 52 is using each pixel value (i.e. spot segmentation threshold) in threshold binary image by the face Correspondence image block is filtered in image.Specifically, grey scale pixel value each in image block and corresponding spot segmentation threshold are compared Compared with being retained if grey scale pixel value is less than corresponding spot segmentation threshold or be all set to minimum gray value (such as 0), and will be big Gray scale maximum value (such as 255) are set as in each pixel grey scale for being equal to the spot segmentation threshold.Wherein, it is retained the pixel of gray value By as candidate spot image, obtained candidate's spot image may be in an image block in point be linked to be region, it is also possible to by Adjacent image block is spliced.So the determination of candidate's spot image is based on obtained from whole picture face-image, rather than only According to single image block.For example, as shown in Fig. 2, being retained the position of region composed by each neighbor pixel of gray scale in image block A In the middle part of image block A, around surrounded by the pixel of low ash angle value (such as gray value is 0), it is determined that the institute encloses region to wait Select spot image.For another example, as shown in figure 3, being retained region composed by each neighbor pixel of gray scale in image block B is located at image Block B and the junction image block C, then spot image zooming-out module 52 simultaneously from image block C with the joint image block B to image block C Extend the gray value of detection pixel point, to obtain complete candidate spot image.
In other specific examples, spot image zooming-out module 52 can be according to based on all phases being retained in face-image Adjacent pixel area defined is determined as candidate spot image.Here, being used in this example using whole picture face-image as analysis The mode of object, using retained neighbor pixel (such as remaining with the neighbor pixel of gray value) area defined as time Select spot image.
The screening module 53 is used to screen the target spot image in the face-image from each candidate spot image.
It should be noted that the specific executive mode of the screening module 53 can be with the executive mode of screening module 43 in Fig. 5 Same or similar, this will not be detailed here.The step of even can also including by the display of obtained target spot image, in this together Reference.
Referring to Fig. 7, the application also provides a kind of face detection equipment.The face detection equipment 3 includes: storage device 31, processing unit 32.
The storage device 31 is for storing face-image and the program for executing spot detection method.Wherein, the face Image available photographic device being connected with face detection equipment in portion's shoots and obtains, or obtains via network from other electronic equipments It takes.
The storage device 31 may include high-speed random access memory, and may also include nonvolatile memory, example Such as one or more disk storage equipments, flash memory device or other non-volatile solid-state memory devices.In certain embodiments, it deposits Storage device 31 can also include the memory far from one or more processors, such as the network building-out via communication network access Memory, wherein the communication network can be internet, one or more intranets, local area network (LAN), wide area network (WLAN), storage area network (SAN) etc. or its is appropriately combined.It further include Memory Controller in storage device 31, the storage Device controller can control access of the other assemblies of such as CPU and Peripheral Interface etc to memory.It is stored in storage device 31 In component software include operating system, communication module (or instruction set), contact/motion module (or instruction set), figure module (or instruction set), haptic feedback module (or instruction set), text input module (or instruction set) and program (or instruction set).
In addition, the face-image can be provided by photographic device, or provided by the other equipment in network.For being exclusively used in The equipment of face detection, in order to obtain enough clearly face-images, the face detection equipment further includes photographic device 33.As shown in Figure 8.
The photographic device 33 can be a part being built in face-image processing equipment, as built in mobile terminal Photographic device 33.Or the photographic device 33 is individual digital camera, and passes through I/O subsystem phase with processing unit 32 Even.Wherein, the I/O subsystem can be packaged together with processing unit 32 comprising but be not limited to: the serial line interfaces such as USB.Institute Stating photographic device 33 includes lens group, imaging sensor, picture processing chip etc..Wherein, lens group is made of muti-piece eyeglass, benefit Change the entity scene imaging that will be absorbed to optical path with eyeglass on an imaging sensor.The imaging sensor is by optical imagery It is converted into electronic signal.It is distinguished with product category, imaging sensor product is broadly divided into CCD, CMOS and CIS sensor three Kind.Gained image is transferred to picture processing chip (ISP, Image Signal Processing) to carry out by the imaging sensor The image procossings such as image rectification, noise removal, bad point repairing, color interpolation, white balance correction, exposure correction.
For example, by adjusting photographic device 33 aperture, focal position and user at a distance of photographic device distance etc., Obtain clearly face-image.In addition to this, the interference that background detects spot in order to prevent, acquired face-image is also with pure Color, light background are preferred, it is not intended that face-image used in this application is necessarily pure color or light background.This field skill Art personnel can be handled background using stingy diagram technology, be not described in detail herein.
Since the melanin precipitated in skin is easy to be apparent under ultraviolet light environments, so, in the shooting of photographic device 33 Light supply apparatus is additionally provided in region.The light supply apparatus is used to provide the shooting environmental comprising ultraviolet light to tester.For example, 33 surrounding of photographic device arranges ultraviolet lamp tube, the face figure captured under ultraviolet light environments in photosensitivity test person of photographic device 33 Picture.
The face-image absorbed in order to ensure photographic device 33 is clear and is easy to medicine detection, the face detection equipment 3 further include: shooting suggestion device 34.
Before the shooting suggestion device 34 is located at photographic device 33, for prompting tester to absorb in the photographic device 33 It puts on the head in direction.Here, the shooting suggestion device 34 can be a specific shooting prompt pattern, point, prompt are such as prompted Line etc..In some embodiments, it includes the first support member for being used to support user's lower jaw and fixed photographic devices 33 Second support member, spacing between two support members is depending on ratio of the face-image in entire image.First The height of support part part is related to the complete face-image that photographic device 33 can be shot.First support member is adjustable.Example Such as, first support member includes an elevating lever and locking part, and a jaw support is equipped on the elevating lever.User can use The height of the first support member of preceding adjustment, so that the photographic device 33 takes complete face-image.
The processing unit 32 is for executing described program to carry out spot detection to face-image.
Here, the processing unit 32 includes processor, the processor operationally with memory and/or non-volatile Memory coupling.More specifically, the instruction stored in memory and/or nonvolatile memory can be performed in terms of in processor It calculates in equipment and executes operation, such as generate image data and/or image data is transferred to display circuit.In this way, processor can It is patrolled including one or more general purpose microprocessors, one or more application specific processors (ASIC), one or more field-programmables Collect array (FPGA) or any combination of them.
Processing unit 32 is also operationally coupled with network interface, will be calculated equipment and is communicatively coupled to either network. For example, network interface, which can will calculate equipment, is connected to personal area network (PAN) (such as blueteeth network), local area network (LAN) (such as 802.11x Wi-Fi network), and/or wide area network (WAN).In addition, processing unit 32 is operatively coupled to power supply, the power supply Electric power can be provided to the various parts calculated in equipment such as electronic console.In this way, power supply may include any suitable energy, Such as rechargeable lighium polymer (Li-poly) battery and/or alternating current (AC) power adapter.
The processing unit 32 is also operatively coupled to the port I/O and input structure, which may make calculating to set It is standby to be interacted with various other electronic equipments (such as dedicated for the instrument of skin detection or mobile terminal), the input knot Structure aloows user to interact with equipment is calculated.Therefore, input structure may include button, keyboard, mouse, Trackpad Deng.
The processing unit 32 is also operationally coupled with network interface, will be calculated equipment and is communicatively coupled to either net Network.For example, network interface, which can will calculate equipment, is connected to personal area network (PAN) (such as blueteeth network), local area network (LAN) (such as 802.11x Wi-Fi network), and/or wide area network (WAN) (injection 4G or LTE cellular network).
In this application, the processing unit 32 can call described program based on the enabled instruction that input structure is inputted, And then when executing described program the 31 septum reset image of storage device is carried out spot detection.
In some embodiments, the processing unit 32 is when executing program, according to the step in method as shown in Figure 1 Suddenly the target spot image in the face-image is detected.
In step s 110, the face-image by acquired based on ultraviolet light wave band carries out gray scale pretreatment.Wherein, institute State the face-image that processing unit 32 can be directly based upon ultraviolet light environments and shoot.Or the face for being shot under natural light environment Portion's image, the processing unit 32 can extract ultraviolet light wave band in acquired face-image in advance.For example, according to preset purple Pixel RGB values each in face-image are filtered to obtain the face-image based on ultraviolet light wave band by outer light color section.
After obtaining the face-image based on ultraviolet light wave band, the processing unit 32 extract the gray value of face-image with Obtain the image array being made of gray value.Then, using the gray difference in face-image between spot and skin, protrusion includes The pixel grey scale of spot image.It specifically can be used pre- at least one of image array progress gray scale stretching, median filtering etc. gray scale Processing, on the one hand inhibits the image section gray scale in face-image as background, on the other hand highlights comprising including spot Image section gray scale.
Here, a kind of mode of the dynamic range of the gray level when gray scale stretching processing is raising image procossing, For improving comprising the gap between the gray scale and skin and background gray scale including spot, be conducive to more complete when gray scale filters Retain spot image.Here, the processing unit 32 can utilize preset piecewise linear transform function or histogram equalization algorithm pair Face-image carries out whole gray scale stretching processing.For example, the processing unit 32 is by the ash of pixel each in whole picture face-image Angle value carries out thus stretching the gray scale of entire image based on linear stretching conversion.For another example, a gray scale stretching window is set, it is described The gray scale stretching window is traversed entire image by processing unit 32, and carries out gray scale stretching processing to pixel each in window, with Face-image after to gray scale stretching.Wherein, the gray scale stretching processing citing uses formula:Wherein, x For the pixel gray value before the adjustment of a certain pixel, xminTo adjust the minimum value in preceding each pixel gray value, xmaxFor Maximum value before adjusting in each pixel gray value,For the minimum value after adjustment in each pixel gray value,To adjust Maximum value after whole in each pixel gray value, x*For pixel pixel gray value adjusted.
It should be noted that the mode of above-mentioned gray scale stretching is only for example, rather than the limitation to the application.In fact, this Application is for pixel grey scale in the prominent image section comprising including spot while to inhibit as back using the purpose of gray scale stretching Thus pixel grey scale in the skin image part of scape improves spot Detection accuracy.Other gray scale stretching modes can be used in the application To reach above-mentioned purpose.
Here, the median filter process is intended to filter out the noise in face-image.For example, by preset filter window time It filters whole picture face-image with going through formula, and each matrix in filter window is subjected to average value processing, so inhibit and make an uproar Interference of the sound to face-image.Wherein, the size of the filter window can not be limited by spot size.Wherein, at the mean value The mode of reason is illustrated are as follows: calculates the average value of the gray value of M pixel in a filter window;Judge M pixel Whether gray value is equal with the average value of the gray value of M pixel;If so, determining any one picture in M pixel The gray value of vegetarian refreshments is the intermediate value of the gray value of the pixel in the filter window;If it is not, M pixel is divided into two collection It closes, judges whether the number of the pixel in this two set is respectively less than the half of pixel quantity in filter window;If so, when should The number of the pixel in a set in two set is greater than or equal to the picture in another set in this two set The number of vegetarian refreshments determines that the gray value of s-th of pixel in another set is intermediate value, s according to sequence from large to small For the number of the pixel in this set, when the number of the pixel in this set is less than in this another set The number of pixel determines that the gray value of t-th of pixel in this set is intermediate value, t according to sequence from small to large For the number of the pixel in another set;If it is not, the number of the pixel for including in this two set is more Pixel in set continues to be divided into two set, until the number of the pixel in two set finally separated is respectively less than and filters The half of pixel quantity in wave window.
It should be noted that the mode of above-mentioned median filtering is only for example, rather than the limitation to the application.In fact, this Application is thus to improve spot Detection accuracy to filter out the noise in image using the purpose of median filtering.The application can adopt With other median filtering modes (such as Fast Median Filtering algorithm) to reach above-mentioned purpose.
In the step s 120, the processing unit 32 is by pretreated face-image piecemeal, and determines each image block Spot segmentation threshold.Wherein, can be divided equally according to the Pixel Dimensions of face-image, or according to preset block size to described Face-image carries out piecemeal processing.
In some embodiments, pixel in each image block can be carried out gray-scale statistical, and root by the processing unit 32 Result chooses the spot segmentation threshold of correspondence image block according to statistics.Wherein, choosing the mode of spot segmentation threshold, can be used will be with image Gray scale relative scale in block and set.
In other embodiments, the processing unit 32 one by one determines each figure based on Da-Jin algorithm thresholding algorithm As the spot segmentation threshold of block.Here, the Da-Jin algorithm is also referred to as maximum kind differences method, according to the gamma characteristic of image, by image It is divided into background and prospect two parts.Because variance is a kind of measurement of intensity profile uniformity, side between the class between background and prospect Difference is bigger, illustrates that the two-part difference for constituting image is bigger, and when part, prospect mistake is divided into background or before part background mistake is divided into Jing Douhui causes two parts difference to become smaller.Therefore, the maximum segmentation of inter-class variance is made to mean misclassification probability minimum.It is filled in processing It sets in 32, threshold calculations, obtained spot segmentation is carried out to the pixel grey scale in each image block using Da-Jin algorithm thresholding algorithm Threshold value will be as the screening conditions for further suppressing background.The application uses face-image piecemeal and the spot of each image block is arranged The mode of segmentation threshold efficiently solves the problems, such as the detection inaccuracy of spot brought by spot brightness irregularities.
During portion's image carries out piecemeal processing over there, technical staff is had found for full skin image block or comprising smaller The image block of spot size, calculating threshold value using above-mentioned Da-Jin algorithm will appear the too low situation of spot segmentation threshold, for this purpose, processing unit 32 further comprise: the step of compensating to the calculated each spot segmentation threshold of institute.
Specifically, an offset delta, bottom threshold th_min and upper threshold th_max are preset, which can press Experience is obtained or is obtained based on machine learning.It is th_ according to the threshold value that Da-Jin algorithm thresholding algorithm obtains corresponding to each image block Ostu, the spot segmentation threshold of each image block are set as th=th_ostu+delta, and by each th respectively with th_min and th_ Max compares, as th<th_min, then th=th_min, and as th>th_max, then th=th_max, spot point in the case of other Cutting threshold value is th_ostu+delta.
In step s 130, the processing unit 32 is according to spot segmentation threshold corresponding to each image block to each image block point It is not filtered, to obtain each candidate spot image in the face-image.
Specifically, processing unit 32 can be in the spot segmentation threshold for determining each image block, or is determining all images After the spot segmentation threshold of block, retains the gray value for being lower than the spot segmentation threshold in corresponding image block and improve more than or equal to described The gray value of spot segmentation threshold.Or the gray value of pixel each in corresponding image block is carried out at binaryzation based on spot segmentation threshold Reason.For example, the gray value for being lower than corresponding spot segmentation threshold in image block, which is set as 0, (regards this gray value as retained pixel Point), and the gray value for the spot segmentation threshold that will be greater than or equal to is set as 255.Wherein, the pixel for being retained gray value is practiced into Region by as candidate spot image.Obtained candidate's spot image may be in an image block, it is also possible to by adjacent image Block is spliced.So the determination of candidate's spot image is based on obtained from whole picture face-image, rather than only in accordance with single Image block.For example, as shown in Fig. 2, being retained region composed by each neighbor pixel of gray scale in image block A is located at image block The middle part of A is around surrounded by the pixel of low ash angle value (such as gray value is 0), it is determined that the institute encloses region for candidate spot image. For another example, as shown in figure 3, being retained region composed by each neighbor pixel of gray scale in image block B is located at image block B and image The junction block C, then processing unit 32 extends detection pixel point to image block C with the joint image block B from image block C simultaneously Gray value, to obtain complete candidate spot image.
In other specific examples, processing unit 32 can be surrounded according to based on the pixel being filtered off in face-image Region be determined as candidate spot image.Here, will be filtered off in a manner of being used in this example using face-image as analysis object Neighbor pixel (such as remaining with the neighbor pixel of gray value) area defined as candidate spot image.
In step S140, the processing unit 32 screens the mesh in the face-image from each candidate spot image Mark spot image.Specifically, based on the preset shape for meeting spot and/or size condition, by each candidate spot image progress Match, target spot image in the face-image is determined according to matching result.Here, the processing unit 32 can be according to candidate spot figure The number of pixel and position determine the shape and size of candidate spot image as in.For example, using single pixel point as unit face Product determines the area of each candidate spot image by counting the pixel number in candidate spot image.For another example, according to each time The position of pixel in spot image is selected to determine the profile of candidate spot image.Area can be less than preset area by the processing unit 32 The candidate spot image of threshold value is retained, and/or chamfered shape is retained close to circular candidate spot image, is thus obtained Target spot image in face-image.
Since the shape of spot is not necessarily circle, size is also without exact range, therefore, in some embodiments, Kick-out condition based on preset shape and/or size screens target spot image from each candidate spot image.For example, being preset with The kick-out condition of the shapes such as corresponding pore, wrinkle and/or size will form the pixel quantity and/or profile of candidate spot image It is matched respectively with corresponding kick-out condition, if meeting kick-out condition, confirms corresponding candidate spot image and non-targeted spot image, By filtering one by one to candidate spot image, the spot image retained is target spot image.
Further, obtained target spot image is stackable on original facial image, and aobvious by display device 35 Show to tester and doctor, thus observes the position of spot, shape, size, the mark of especially potential spot convenient for tester and doctor Note and display, can help the carry out pathological diagnosis that doctor is more accurate.Wherein, the display device 35 includes but is not limited to: aobvious Show device, the processor being connected with display etc., wherein the processor can be it is being separately configured or in processing unit Processor shares.
It, can also be according in addition, the program that the storage device 31 is saved is when being called and being executed by processing unit 32 Step in method as shown in Figure 4 detects the target spot image in the face-image.
In step S210, the acquired face-image based on ultraviolet light wave band is subjected to gray scale pretreatment.
It should be noted that the specific executive mode of step S210 can be identical as the executive mode of step S110 in Fig. 1 Or it is similar, this will not be detailed here.Even be further included in includes the step of shooting face-image under ultraviolet light environments, to obtain The face-image based on ultraviolet light wave band, is quoted in this together.
In step S220, pretreated face-image is subjected to down-sampled processing according to the image block divided.? Pretreated face-image is carried out down-sampled processing to improve the computational efficiency of spot segmentation threshold by this.Due to down-sampled The gray value of image afterwards represents the average gray value of down-sampled preceding correspondence image block, thus it is down-sampled after image spy Sign can still represent the feature of down-sampled preceding image block.
For example, a default down-sampled window (should be regarded as the window for segmented image block), wherein the down-sampled window Size be less than spot image size, to avoid the Character losing of spot image.Wherein, the size of spot image can be empirical The diameter of average spot image.The down-sampled window is traversed into the face-image without overlapping, according to preset during traversal In the window weight of each pixel each grey scale pixel value in window is calculated with obtain it is down-sampled after pixel value, The pixel value is arranged on the location of pixels of down-sampled rear image.The location of pixels is opposite with a tile location in original image It answers.
In step S230,
With a threshold window traversal it is down-sampled after image, during traversal by the pixel assignment in the threshold window be spot Segmentation threshold.
Specifically, the threshold window is traversed into entire down-sampled rear image using pixel as offset.During traversal, The pixel region covered to each threshold window carries out threshold calculations and obtained threshold value is assigned in the pixel region A pixel.For example, the size of the threshold window, which can be preset, is set to n*n size, wherein n is odd number, right during traversal The pixel region that each threshold window is covered carries out threshold calculations and obtained threshold value is assigned to position in the pixel region In the pixel (hereinafter referred to as central pixel point) of regional center;The threshold window is traversed by step-length of a pixel, it will Assignment, institute's assignment are set as spot segmentation threshold to each pixel again in image after down-sampled.
In some embodiments, pixel in each threshold window can be carried out gray-scale statistical by the computer equipment, and The pixel choosing corresponding spot segmentation threshold according to statistical result and being assigned in the threshold window.Wherein, spot point is chosen The mode for cutting threshold value can be used and will be set with the gray scale relative scale in threshold window.
In other embodiments, the computer equipment is determined in each threshold window based on Da-Jin algorithm thresholding algorithm Spot segmentation threshold and the pixel (such as central pixel point) that is assigned in respective threshold window.Here, the Da-Jin algorithm is also referred to as Maximum kind differences method divides the image into background and prospect two parts according to the gamma characteristic of image.Because variance is intensity profile A kind of measurement of uniformity, the inter-class variance between background and prospect is bigger, illustrates that the two-part difference for constituting image is bigger, When part, prospect mistake is divided into background or part background mistake is divided into prospect and all two parts difference can be caused to become smaller.Therefore, make side between class The maximum segmentation of difference means misclassification probability minimum.In this step, using Da-Jin algorithm thresholding algorithm in each threshold window Pixel grey scale carry out threshold calculations and assignment again.Image after assignment is referred to as threshold binary image.
During carrying out assignment processing to threshold window, technical staff's discovery, which calculates threshold value using above-mentioned Da-Jin algorithm, will appear The too low situation of spot segmentation threshold, for this purpose, this step further comprises: to calculated each spot segmentation threshold compensate Step.
Specifically, an offset delta, bottom threshold th_min and upper threshold th_max are preset, which can press Experience is obtained or is obtained based on machine learning.It is th_ according to the threshold value that Da-Jin algorithm thresholding algorithm obtains corresponding to each image block Ostu, the spot segmentation threshold of each image block are set as th=th_ostu+delta, and by each th respectively with th_min and th_ Max compares, as th<th_min, then th=th_min, and as th>th_max, then th=th_max, spot point in the case of other Cutting threshold value is th_ostu+delta.
Spot segmentation threshold spot segmentation threshold is in step S240, based on each in down-sampled rear each pixel and the face-image The position corresponding relationship of image block is filtered corresponding image block using each pixel after assignment.
Specifically, the computer equipment is reduced during down-sampled according to the face-image after gray scale pretreatment Image block and position region, each pixel corresponds to each tool in the face-image after gray scale pretreatment in threshold value image Body image block.For example, the face-image A1 after gray scale pretreatment isDown-sampled face-image A2 isPixel in image A2a11' image block in correspondence image A1For another example, by threshold binary image according to it is down-sampled when The down-sampled window divided carries out a liter sampling processing, i.e., each pixel value in threshold binary image is assigned to corresponding down-sampled window The all pixels point of mouth, and according to the positional relationship of pixel each in threshold binary image and down-sampled window traversal, after obtaining liter sampling The threshold binary image of (after restoring).Pixel in threshold binary image and face-image after reduction corresponds.Thus face is obtained Each image block has corresponding spot segmentation threshold in portion's image.
Then, using pixel value each in threshold binary image (i.e. spot segmentation threshold) by correspondence image block in the face-image It is filtered.Specifically, grey scale pixel value each in image block is compared with corresponding spot segmentation threshold, if grey scale pixel value is small Then retained or be all set to minimum gray value (such as 0) in corresponding spot segmentation threshold, and the spot segmentation that will be greater than or equal to Each pixel grey scale of threshold value is set as gray scale maximum value (such as 255).Wherein, it is retained the region quilt that the pixel of gray value is linked to be As candidate spot image, obtained candidate's spot image may be in an image block, it is also possible to spliced by adjacent image block and At.So the determination of candidate's spot image is based on obtained from whole picture face-image, rather than only in accordance with single image block. For example, being located in image block A as shown in Fig. 2, being retained region composed by each neighbor pixel of gray scale in image block A Portion is around surrounded by the pixel of low ash angle value (such as gray value is 0), it is determined that the institute encloses region for candidate spot image.For another example, It is handed over as shown in figure 3, being retained region composed by each neighbor pixel of gray scale in image block B and being located at image block B and image block C Place is met, then computer equipment extends the gray scale of detection pixel point from image block C with the joint image block B to image block C simultaneously Value, to obtain complete candidate spot image.
In other specific examples, this step can be according to based on all neighbor pixel institutes being retained in face-image The region surrounded is determined as candidate spot image.Here, in a manner of being used in this example using whole picture face-image as analysis object, Using retained neighbor pixel (such as remaining with the neighbor pixel of gray value) area defined as candidate spot image.
In step S260, the target spot image in the face-image is screened from each candidate spot image.
It should be noted that the specific executive mode of step S260 can be identical as the executive mode of step S140 in Fig. 1 Or it is similar, this will not be detailed here.The step of even can also including by the display of obtained target spot image, draw in this together With.
By the description of above each embodiment, those skilled in the art can be understood that the part of the application Or it can all be realized by software and in conjunction with required general hardware platform.Based on this understanding, the technical side of the application Substantially the part that contributes to existing technology can be embodied in the form of software products case in other words, and the computer is soft Part product may include the one or more machine readable medias for being stored thereon with machine-executable instruction, these instructions are by such as The one or more machine such as computer, computer network or other electronic equipments may make the one or more machine root when executing Operation is executed according to embodiments herein.Such as each step in the parking stall reserving method of execution user terminal, and execute Each step etc. in the parking stall reserving method of server-side.Machine readable media may include, but be not limited to, floppy disk, CD, CD- ROM (compact-disc-read-only memory), magneto-optic disk, ROM (read-only memory), RAM (random access memory), EPROM are (erasable Except programmable read only memory), EEPROM (electrically erasable programmable read-only memory), magnetic or optical card, flash memory or suitable for depositing Store up other kinds of medium/machine readable media of machine-executable instruction.Wherein, the storage medium can be located at terminal device (such as face detection equipment or intelligent terminal) may be alternatively located in third-party server, is such as located at and provides certain clothes for applying store It is engaged in device.With no restrictions to concrete application store at this, such as millet applies store, Huawei to apply store using store, apple.
The application can be used in numerous general or special purpose computing system environments or configuration.Such as: personal computer, service Device computer, handheld device or portable device, laptop device, multicomputer system, microprocessor-based system, top set Box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer, including any of the above system or equipment Distributed computing environment etc..
The application can describe in the general context of computer-executable instructions executed by a computer, such as program Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group Part, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environments, by Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with In the local and remote computer storage media including storage equipment.
Although the application has been described by way of example and in terms of the preferred embodiments, but it is not for limiting the application, any this field Technical staff is not departing from spirit and scope, may be by the methods and technical content of the disclosure above to this Shen Please technical solution make possible variation and modification, therefore, all contents without departing from technical scheme, according to the application Technical spirit any simple modifications, equivalents, and modifications to the above embodiments, belong to technical scheme Protection scope.

Claims (22)

1. a kind of spot detection method characterized by comprising
The acquired face-image based on ultraviolet light wave band is subjected to gray scale pretreatment;
By pretreated face-image piecemeal, and determine the spot segmentation threshold of each image block;
Each image block is filtered respectively according to spot segmentation threshold corresponding to each image block, to obtain in the face-image Each candidate spot image;
The target spot image in the face-image is screened from each candidate spot image.
2. spot detection method according to claim 1, which is characterized in that further include: it is shot under comprising ultraviolet light environments The step of face-image.
3. spot detection method according to claim 1, which is characterized in that it is described by acquired based on ultraviolet light wave band The mode that face-image carries out gray scale pretreatment includes: the prominent packet using the gray difference in face-image between spot and skin The pixel grey scale of the image containing spot.
4. spot detection method according to claim 1, which is characterized in that it is described by pretreated face-image piecemeal, And the mode of the spot segmentation threshold of determining each image block includes:
Pretreated face-image is subjected to down-sampled processing according to the image block divided;
With a threshold window traversal it is down-sampled after image, during traversal by the pixel assignment in the threshold window be spot divide Threshold value.
5. spot detection method according to claim 4, which is characterized in that described to divide according to spot corresponding to each image block The mode that threshold value is filtered each image block respectively includes:
Based on the position corresponding relationship of each image block in down-sampled rear each pixel and the face-image, each picture after assignment is utilized Element is filtered corresponding image block.
6. spot detection method according to claim 1 or 4, which is characterized in that the spot of each image block of determination divides threshold The mode of value includes: the spot segmentation threshold that each described image block is one by one determined based on Da-Jin algorithm thresholding algorithm.
7. spot detection method according to claim 6, which is characterized in that further include: each spot calculated to institute divides threshold The step of value compensates.
8. spot detection method according to claim 1, which is characterized in that described to screen the face from each candidate spot image The mode of target spot image in portion's image includes: the kick-out condition based on preset shape and/or size, from each candidate spot figure Target spot image is screened as in.
9. a kind of spot detection system characterized by comprising
Preprocessing module, for the acquired face-image based on ultraviolet light wave band to be carried out gray scale pretreatment;
Spot image zooming-out module determines the spot segmentation threshold of each image block for by pretreated face-image piecemeal, and Each image block is filtered respectively according to spot segmentation threshold corresponding to each image block each in the face-image to obtain Candidate spot image;
Screening module, for screening the target spot image in the face-image from each candidate spot image.
10. spot detection system according to claim 9, which is characterized in that further include: photographing module, for including purple Outer reticle circle obtains face-image under border.
11. spot detection system according to claim 9, which is characterized in that the preprocessing module is used to utilize face figure Gray difference as between spot and skin, prominent includes the pixel grey scale of spot image.
12. spot detection system according to claim 9, which is characterized in that after the spot image zooming-out module will pre-process Face-image piecemeal, determine that the mode of the spot segmentation threshold of each image block includes:
Pretreated face-image is subjected to down-sampled processing according to the image block divided;
With a threshold window traversal it is down-sampled after image, during traversal by the pixel assignment in the threshold window be spot divide Threshold value.
13. spot detection system according to claim 12, which is characterized in that the spot image zooming-out module is according to each image The mode that spot segmentation threshold is filtered each image block respectively corresponding to block include: based on each pixel after down-sampled with it is described The position corresponding relationship of each image block in face-image, using each pixel after assignment to correspondence image block in the face-image It is filtered.
14. the spot detection system according to claim 9 or 12, which is characterized in that the spot image zooming-out module determines each The mode of the spot segmentation threshold of image block includes: that the spot segmentation of each described image block is one by one determined based on Da-Jin algorithm thresholding algorithm Threshold value.
15. spot detection system according to claim 14, which is characterized in that the spot image zooming-out module is also used to institute Calculated each spot segmentation threshold compensates.
16. spot detection system according to claim 9, which is characterized in that the screening module be based on preset shape and/ Or the kick-out condition of size, target spot image is screened from each candidate spot image.
17. a kind of face detection equipment characterized by comprising
Storage device, the program for storing face-image and for executing spot detection method;
Processing unit is connect with the storage device, for executing described program to execute as described in any in claim 1-8 Spot detection method.
18. face detection equipment according to claim 17, which is characterized in that further include: photographic device, for the face of absorbing Portion's image simultaneously saves in the storage device.
19. face detection equipment according to claim 18, which is characterized in that further include: shooting suggestion device, positioned at taking the photograph As before device, the head for prompting tester to absorb direction in the photographic device is put.
20. face detection equipment according to claim 18, which is characterized in that further include: light supply apparatus is used for test Person provides the shooting environmental comprising ultraviolet light.
21. face detection equipment according to claim 17, which is characterized in that further include: display device, for showing mark The face-image of detected spot image is remembered.
22. a kind of storage medium, which is characterized in that be stored with face-image and the program for carrying out spot detection;Wherein, institute Program is stated when being executed by processor, according to the face as described in the step detection in detection method any in claim 1-8 Target spot image in image.
CN201710609686.8A 2017-07-25 2017-07-25 Spot detection method, system, equipment and storage medium Pending CN109299634A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710609686.8A CN109299634A (en) 2017-07-25 2017-07-25 Spot detection method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710609686.8A CN109299634A (en) 2017-07-25 2017-07-25 Spot detection method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109299634A true CN109299634A (en) 2019-02-01

Family

ID=65167714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710609686.8A Pending CN109299634A (en) 2017-07-25 2017-07-25 Spot detection method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109299634A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110570445A (en) * 2019-09-09 2019-12-13 上海联影医疗科技有限公司 Image segmentation method, device, terminal and readable medium
CN111681193A (en) * 2020-06-12 2020-09-18 电子科技大学 Optimization of FPGA-based infrared image dead pixel correction system
CN111768357A (en) * 2019-03-29 2020-10-13 银河水滴科技(北京)有限公司 Image detection method and device
CN112749708A (en) * 2021-01-28 2021-05-04 深圳艾摩米智能科技有限公司 Facial freckle detection and analysis method and device, computer equipment and storage medium
CN114565517A (en) * 2021-12-29 2022-05-31 骨圣元化机器人(深圳)有限公司 Image denoising method and device for infrared camera and computer equipment
CN115063613A (en) * 2022-08-09 2022-09-16 海纳云物联科技有限公司 Method and device for verifying commodity label

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080060260A (en) * 2005-10-04 2008-07-01 엘브이엠에이취 러쉐르쉐 Method and apparatus for characterizing skin blemishes and method for assessing the anti-aging effect of a cosmetic product
CN104299011A (en) * 2014-10-13 2015-01-21 吴亮 Skin type and skin problem identification and detection method based on facial image identification
CN105787929A (en) * 2016-02-15 2016-07-20 天津大学 Skin rash point extraction method based on spot detection
CN106056092A (en) * 2016-06-08 2016-10-26 华南理工大学 Gaze estimation method for head-mounted device based on iris and pupil
CN106469300A (en) * 2016-08-31 2017-03-01 广州莱德璞检测技术有限公司 A kind of mottle detection recognition method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080060260A (en) * 2005-10-04 2008-07-01 엘브이엠에이취 러쉐르쉐 Method and apparatus for characterizing skin blemishes and method for assessing the anti-aging effect of a cosmetic product
CN104299011A (en) * 2014-10-13 2015-01-21 吴亮 Skin type and skin problem identification and detection method based on facial image identification
CN105787929A (en) * 2016-02-15 2016-07-20 天津大学 Skin rash point extraction method based on spot detection
CN106056092A (en) * 2016-06-08 2016-10-26 华南理工大学 Gaze estimation method for head-mounted device based on iris and pupil
CN106469300A (en) * 2016-08-31 2017-03-01 广州莱德璞检测技术有限公司 A kind of mottle detection recognition method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
余永强等: "《现代医院诊疗常规(内科、儿科分册)》", 30 September 2012, 安徽科学技术出版社 *
刘喜凤: "基于图像分析的皮肤色斑检测技术研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
匡纲要等: "《合成孔径雷达目标检测理论、算法及应用》", 30 November 2007, 国防科技大学出版社 *
王一丁等: "《数字图像处理》", 31 August 2015, 西安电子科技大学出版社 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768357A (en) * 2019-03-29 2020-10-13 银河水滴科技(北京)有限公司 Image detection method and device
CN111768357B (en) * 2019-03-29 2024-03-01 银河水滴科技(北京)有限公司 Image detection method and device
CN110570445A (en) * 2019-09-09 2019-12-13 上海联影医疗科技有限公司 Image segmentation method, device, terminal and readable medium
CN110570445B (en) * 2019-09-09 2022-03-25 上海联影医疗科技股份有限公司 Image segmentation method, device, terminal and readable medium
CN111681193A (en) * 2020-06-12 2020-09-18 电子科技大学 Optimization of FPGA-based infrared image dead pixel correction system
CN112749708A (en) * 2021-01-28 2021-05-04 深圳艾摩米智能科技有限公司 Facial freckle detection and analysis method and device, computer equipment and storage medium
CN112749708B (en) * 2021-01-28 2024-04-23 深圳艾摩米智能科技有限公司 Face freckle detection and analysis method and device, computer equipment and storage medium
CN114565517A (en) * 2021-12-29 2022-05-31 骨圣元化机器人(深圳)有限公司 Image denoising method and device for infrared camera and computer equipment
CN114565517B (en) * 2021-12-29 2023-09-29 骨圣元化机器人(深圳)有限公司 Image denoising method and device of infrared camera and computer equipment
CN115063613A (en) * 2022-08-09 2022-09-16 海纳云物联科技有限公司 Method and device for verifying commodity label

Similar Documents

Publication Publication Date Title
CN109299634A (en) Spot detection method, system, equipment and storage medium
WO2019223069A1 (en) Histogram-based iris image enhancement method, apparatus and device, and storage medium
JP7422825B2 (en) Focus-weighted machine learning classifier error prediction for microscope slide images
US9881373B2 (en) Image generating apparatus and image generating method
CN103098078B (en) Smile&#39;s detecting system and method
US9305375B2 (en) High-quality post-rendering depth blur
CN107862663A (en) Image processing method, device, readable storage medium storing program for executing and computer equipment
CN110149482A (en) Focusing method, device, electronic equipment and computer readable storage medium
CN107507173A (en) A kind of full slice image without refer to intelligibility evaluation method and system
TW202014984A (en) Image processing method, electronic device, and storage medium
CN107911625A (en) Light measuring method, device, readable storage medium storing program for executing and computer equipment
CN109363699A (en) A kind of method and device of breast image lesion identification
CN104021382A (en) Eye image collection method and system
CN108428214A (en) A kind of image processing method and device
CN105447879B (en) The method and device of chest muscle is detected in breast image
CN109299632A (en) Skin detecting method, system, equipment and storage medium
CN108629293B (en) Self-adaptive near-infrared iris image acquisition method with feedback mechanism
CN103460254B (en) Method and device for automatically detecting brightness based on image content
CN110879131B (en) Imaging quality testing method and imaging quality testing device for visual optical system, and electronic apparatus
CN109363697A (en) A kind of method and device of breast image lesion identification
CN109859155A (en) Image distortion detection method and system
CN104000593A (en) Color card and skin test method and system
CN109978810A (en) Detection method, system, equipment and the storage medium of mole
Vodrahalli et al. TrueImage: a machine learning algorithm to improve the quality of telehealth photos
Jin et al. Learning to see through reflections

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190201