CN111861981A - Image color space fat point detection and evaluation method based on point, line and surface - Google Patents
Image color space fat point detection and evaluation method based on point, line and surface Download PDFInfo
- Publication number
- CN111861981A CN111861981A CN202010474308.5A CN202010474308A CN111861981A CN 111861981 A CN111861981 A CN 111861981A CN 202010474308 A CN202010474308 A CN 202010474308A CN 111861981 A CN111861981 A CN 111861981A
- Authority
- CN
- China
- Prior art keywords
- point
- fat
- value
- pixel
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/40—Analysis of texture
- G06T7/41—Analysis of texture based on statistical description of texture
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
- G06T2207/30088—Skin; Dermal
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Radiology & Medical Imaging (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a point-line-surface-based image color space fat point detection and evaluation method, and belongs to the technical field of skin image processing application. Processing the skin microspur RGB digital image with the same resolution to obtain a plurality of index attribute values and comprehensive index values of the skin image fat points, and realizing the detection and evaluation of the fat point characteristics on the surface of the microspur skin image; the method disclosed by the invention has the advantages of high accuracy and high speed in fat point detection, and has good market application prospect and value.
Description
Technical Field
The invention relates to computer graphics and skin fat point detection technologies, in particular to an image color space fat point detection and evaluation method based on point, line and surface, and belongs to the technical field of skin image processing application.
Background
With the improvement of living standard of people, facial skin beauty and care have been widely paid attention to, and objective and quantitative detection and calculation of skin images are one of research hotspots in the field of skin image processing in recent years, and one of the important applications is detection of skin surface fat points and attribute index value calculation.
With the rapid development of computer image processing technology, the digital image processing technology is taken as a means, so that the skin surface condition evaluation method can be upgraded from the traditional qualitative analysis to the accurate quantitative analysis, and the evaluation accuracy is greatly improved.
The features of the skin image include pores, spots, textures, fat points, glossiness, etc., wherein the fat point features are an important skin metric, and the number and size and brightness of the fat points can measure the physiological condition of the skin. The current image processing methods for detecting and evaluating the fat points are few, and some machine learning algorithms exist, so that the accuracy is not high, a large number of learning samples are needed, and the speed is low; the numerical method for quantitatively calculating the characteristic indexes of the fat points on the surface of the skin image by the image processing method is only limited to simply analyzing and calculating points (pixels) according to the color values of the pixel points of the image, and has no line-surface attributes of the fat points, so that many indexes cannot be calculated, such as the number, the spacing and the size of the fat points.
Disclosure of Invention
The invention aims to realize a point-line-surface-based image color space fat point detection and evaluation method, which calculates the characteristic values of the size, the number, the brightness, the distance and the like of surface fat points of an image according to the color value information of all pixels in the RGB color space of a skin image, and realizes the skin image fat point detection and the quantitative evaluation of multiple attribute values.
In the present invention, the skin image is from a digital image acquisition device. At present, an RGB color space is mostly adopted in an image file, and the algorithm of the invention directly utilizes the pixel color value of the RGB color space to carry out fat point multi-attribute detection and evaluation, so that the fat point attribute of one skin image is quantitatively evaluated. By the method, a plurality of attribute values and comprehensive evaluation index values of all fat points can be calculated for a skin microspur RGB color image, and the fat point characteristics on the surface of the microspur skin image can be identified with high accuracy through the quantitative values.
The invention provides a method for detecting and evaluating an image color space fat point based on a point line surface, which can process an RGB digital image of skin microspur with the same resolution to obtain a plurality of index attribute values and comprehensive index values for measuring the fat point of a skin image, wherein the values can mark the fat point characteristics on the surface of the microspur skin image, and the method mainly comprises the following steps:
1) reading an RGB color matrix of all pixels of a skin image;
2) skin image preprocessing: graying to obtain a grayscale image img 1; removing hair, spots, pores, textures, fluorescent points and the like, and highlighting the characteristics of fat points;
3) Obtaining a fat point binary image img2 of an initial discontinuous pixel point level by adopting a threshold method;
4) filling gaps (sand holes) of fat points, obtaining fat points of continuous pixel point levels based on a circular template convolution method, and obtaining a result image as a binary image img 4;
5) traversing to obtain fat points of continuous line/surface characteristics based on an eight-connectivity method, wherein the result image is a three-valued image img 5;
6) and (4) calculating quantitative attribute values of the number, size, distance, brightness and proportion of fat points.
7) Calculating a comprehensive evaluation value of the fat points of the skin image;
specifically, the method of the present invention comprises the steps of:
A. reading an RGB color matrix of all pixels of the skin image, which comprises the following specific steps:
the skin image files may be stored locally, on a network or other media, and the image file formats include, but are not limited to, jpg, bmp, png, etc.; the invention only needs skin images, which are the only parameters of the method; each pixel point of the image has RGB three color components, the RGB value of the skin image file forms a pixel RGB color two-dimensional matrix, and the pixel RGB color matrix of the skin image is read into a computer memory and used as the basis of subsequent algorithm calculation;
B. skin image preprocessing: graying, removing hairs, spots, pores, textures and the like, and highlighting the characteristics of fat points, and the method comprises the following specific steps:
B1. Graying the color image to obtain a grayscale image img 1;
graying the RGB pixel value of each pixel in the two-dimensional matrix of the skin image in the memory according to the following formula (1), wherein V is a grayed value of one pixel, Green and Blue are Green and Blue components of three color components of the pixel respectively, the red component fat point feature of the pixel is weak, and the red component color value is not used for fat point feature calculation;
v is 0.2 XGreen +0.8 Xblue formula (1)
B2. Removing hair, spots, pores, textures, fluorescent points and the like;
b2.1, calculating a gray average value avg1 of each pixel point p1 in the gray image img 1;
traversing and calculating a gray average value avg1 of each pixel point p1 in a gray image img1, wherein the calculation range is a square area A1 taking the pixel point p1 as a central point, the average value of gray values of all the pixel points in the range of A1 on a gray image img1 is avg1, the side length (the number of pixels) of the square area A1 is a fixed value, for example, the side length of A1 is 51 pixels, if the p1 is at the boundary and there is no complete square area A1, the gray average value avg1 of the p1 point is calculated only by considering the pixels of the image img1 covered by the A1;
b2.2, setting a gray value avg2, and removing hairs, spots, pores, textures and highlight noise points on the skin in the image;
Traversing each pixel p2 in the square area a1, if the gray value of p2 is lower than avg1, the gray value of p2 point is assigned to avg1 on the gray image img1 (the gray mean value at p1 point, in fact, is the background pixel), and the method can eliminate the characteristics of hair, spots, pores, textures and the like which are visually dark (black); if the gray value of p2 is greater than the designated gray value avg2, such as avg2 ═ avg1+80, then the gray value of p2 point is assigned as avg1 (the average value of the gray values at p1 points, in fact, the background pixels), and the method can eliminate highlight noise points, such as fluorescence points;
b2.3, after all the pixel points of the gray image img1 are processed in a traversing mode, the gray value range of all the pixel points of the img1 is [ avg1, avg2 ];
B3. highlighting the characteristic of fat points, wherein the linear stretching gray scale range [ avg1, avg2] is a range [0,255 ];
C. obtaining a fat point binary image img2 of an initial discontinuous pixel point level by a threshold method, specifically operating as follows:
C1. setting a gray threshold Vt, such as Vt 70;
C2. comparing the gray value of each pixel of the gray image img1 with a gray threshold value Vt, and identifying each pixel as a fat point or a background point to obtain a binary image img 2;
specifically, traversing each pixel p3 of the gray level image img1, and calculating to obtain a binary image img2 according to the gray level v3 of p3, namely if v3 is greater than Vt, assigning a pixel point on img2 corresponding to a p3 point as 1 (fat point), otherwise assigning as 254 (background point);
An image img2 obtained after all pixel points of the gray image img1 are traversed is a discontinuous pixel point level fat point binary image: the 1 value is marked as a fat point pixel, the 254 value is marked as a background pixel, and pixel points with the fat point attribute (the value is 1) are independent and have no association;
D. filling gaps (sand holes) of fat points to obtain a binary image img4, and specifically comprising the following steps:
D1. setting a circular template for convolution calculation;
the convolution template K is a circular or approximately circular area B with the radius of R pixels (such as 5 pixels), all pixel point values in the area B are assigned to be 1, and the origin of the convolution template K is the center of the circle of the circular area B;
D2. traversing each pixel point p4 of the binarized image img2, and performing convolution calculation on the p4 points by using a convolution template K: placing the original point of the convolution template K at a pixel point p4 to obtain a convolution value N, wherein the N value is equal to the number of points with the pixel gray value of 1 in all pixel points in the range of the template K covering the binary image img2, and the range of the N value is [0,78 ];
D3. assigning a gray value of p4 point of the corresponding pixel on the new image (img3) as v4 according to the value of N, if N > a given threshold T (as for the binarized image img2, T ═ 20), then v4 is assigned as 1 (fat point), otherwise v4 is assigned as 254 (background);
D4. After traversing the binary image img2, obtaining a binary image img 3: 1 value is marked as a fat point pixel, 254 value is marked as a background pixel, and the method can fill up the noise of the fat point sand hole and is similar to the expansion operation of mathematical morphology;
D5. and for the obtained binary image img3, performing operations D2, D3 and D4, performing convolution on the image img3, and setting the value of the threshold T to be 60 to obtain a binary image img 4: the 1 value is marked as a fat point pixel, the 254 value is marked as a background pixel, the method can shrink the fat point and further fill small sand holes left in the fat point, and the method is similar to mathematical morphology corrosion operation;
E. the fat point three-valued image img4 of continuous line/surface features is obtained through traversal based on an eight-connectivity method, and the method comprises the following specific steps:
E1. traversing each pixel point p with the value of 1 of the binarized image img 4;
e2.p point stacking;
E3. popping one pixel point q, if all values of eight neighborhood pixel points of the q point are more than or equal to 1(1 is a fat point pixel, and 2 is a fat point internal pixel), assigning the q point to be 2 (the fat point internal pixel), otherwise, still setting the value of the q point to be 1, and not changing;
E4. processing eight neighborhood pixel points r of the q points respectively, if the value is more than or equal to 1, stacking the r, otherwise, not stacking the r;
E5. Repeating the steps E3 and E4 until the elements in the stack are empty, and obtaining the line-surface characteristics of a fat point at the moment, wherein the line-surface characteristics are as follows:
e5.1, the pixel value on the boundary line of the fat point is 1, the pixel value inside the fat point is 2, and the pixel value of the surrounding background is 254;
e5.2 record the center point of the fat spot: the central point of the outer wrapping rectangle;
e5.3 records the area of the fat spot: the number of pixels of which all values are 1 or 2;
e5.4 record the intensity of the fat spot: the gray level mean value of all pixels with 1 or 2 values of the fat point on the gray level image img 1;
E6. after traversing the binary image img4, the pixel values of part of the image are changed, the img4 is the ternary image img5, all the fat points on the ternary image have line-surface characteristics, and the number of the fat points can be counted in the traversing process, so that the number of the fat points is count;
F. calculating quantitative attribute values of fat point Size, distance Dis, brightness and proportion Ratio;
F1. respectively counting and calculating the area (E5.3) and the brightness (E5.4) average value of all the fat points to obtain the fat point Size and brightness attribute of the whole skin image;
F2. calculating the distance d between each fat point and the nearest fat point, wherein the average value of the d values of all the fat points is the fat point distance attribute Dis of the whole skin image;
F3. And obtaining the fat point Ratio attribute Ratio of the whole skin image by the sum of the areas (E5.3) of all the fat points/the number of pixels of the whole image.
G. Calculating a skin image fat point comprehensive evaluation Value which is a weighted average of 3 attribute values of the whole skin image, wherein before calculation, 3 attribute values (size, brightness and ratio) participating in calculation are respectively subjected to normalization processing, and the specific calculation is as shown in a formula (2), and the weighted average can well measure the comprehensive attribute of the skin image fat point:
value is 0.3 × Size +0.3 × Light +0.4 × Ratio (formula 2)
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a point-line-surface-based image color space fat point detection and evaluation method, which is used for calculating the number, size, brightness, distance and proportion characteristic values of surface fat points of an image according to RGB value information of color space pixels of a skin image, and realizing the detection and multi-attribute quantitative evaluation of the fat points of the skin image. The method has the advantages that the RGB color space is directly utilized to calculate the characteristic value of the fat point, the skin image is the only parameter, and the method has high accuracy and high speed for detecting the fat point, so the algorithm has good market application prospect and value.
Drawings
FIG. 1 is a block diagram of a system for detecting skin fat spots, in which the method of the present invention is embodied.
FIG. 2 is a block flow diagram of the method for detecting and quantitatively calculating skin fat spots provided by the present invention.
Fig. 3 is a partial skin image of detecting skin fat points in an embodiment of the present invention.
Fig. 4 is a diagram illustrating the effect of sorting skin images according to the fat point comprehensive evaluation value in the embodiment of the present invention.
Fig. 5 is an enlarged view of the 6 small pictures in the upper left corner of fig. 4.
Detailed Description
The invention will be further described by way of examples, without in any way limiting the scope of the invention, with reference to the accompanying drawings.
The invention provides a point, line and surface-based image color space fat point detection and evaluation method, which is used for calculating a plurality of attribute characteristic values of a surface fat point of an image according to RGB color space pixel color value information of a skin image so as to realize skin image fat point detection and quantitative evaluation. The method of the invention realizes the implementation of a set of skin detection system, and the system is configured as shown in table 1:
table 1 configuration of skin surface fat point detection evaluation system realized by implementing the present invention
Name (R) | Model of the device | Number of |
Skin imageDevice | A microspur skin image acquisition device for acquiring skin images with a resolution of 800 x 800 | 5 |
Cloud server | Windows server 2012、MySql5.7.16 | 1 |
Client terminal | Mobile phone Android client | 5 |
The skin detection system consists of skin image acquisition hardware equipment, a computer server end and a mobile phone client end, the structure diagram of the skin detection system is shown in figure 1, and the flow of skin fat point detection and quantitative calculation is shown in figure 2;
the skin fat point detection and evaluation method provided by the invention only needs one image as a parameter, and comprises the following steps: graying the image, removing black spots, pores, textures, hairs and the like by a simple threshold method, and highlighting the characteristics of fat points; obtaining an initial fat point binary image of discontinuous pixel point levels by adopting a threshold method; obtaining fat points of continuous pixel point levels based on a circular template convolution method; the fat points of the continuous line/surface characteristics are obtained through traversal based on an eight-connectivity method, and quantitative attribute values of the number, size, distance, brightness and proportion of the fat points can be calculated, so that the fat point attribute of one skin image is quantitatively evaluated. The specific implementation comprises the following steps:
A. reading an RGB color matrix of all pixels of the skin image, which comprises the following specific steps:
A1. the only parameter of the algorithm is the image file stored on the media medium;
A2. image files may be stored locally, on a network, or on other media;
A3. Reading the RGB value of the image file as a two-dimensional matrix to a computer memory to serve as the basis of subsequent algorithm calculation, wherein each pixel point has RGB three color components;
A4. image file formats include, but are not limited to, jpg, bmp, png, etc.;
B. skin image preprocessing: graying, removing hairs, spots, pores, textures and the like, and highlighting the characteristics of fat points, and the method comprises the following specific steps:
B1. graying the color image to obtain a grayscale image img 1;
graying the RGB pixel value of each pixel in the two-dimensional matrix of the skin image in the memory according to the following formula (1), wherein V is a grayed value of one pixel, Green and Blue are Green and Blue components of three color components of the pixel respectively, the red component fat point feature of the pixel is weak, and the red component color value is not used for fat point feature calculation;
v is 0.2 XGreen +0.8 Xblue formula (1)
B2. Removing hair, spots, pores, textures, fluorescent points and the like;
b2.1 traversing and calculating a gray average avg1 of each pixel point p1 of the gray image img1, wherein the calculation range is a square area A1 taking the pixel point p1 as a central point, the average of gray values of all the pixel points in the range of A1 on the gray image img1 is avg1, the side length (the number of pixels) of the square area A1 is a fixed value, for example, the side length of A1 is 51 pixels, if the p1 is at the boundary and does not have a complete square area A1, the p1 point gray average avg1 is calculated only by considering the pixels of the image img1 covered by the A1;
B2.2, traversing each pixel p2 in the square area A1, if the gray value of p2 is lower than avg1, assigning the gray value of p2 point on the gray image img1 as avg1 (the gray mean value at the p1 point is actually a background pixel), and the method can eliminate the characteristics of hair, spots, pores, textures and the like which are visually dark (black); if the gray value of p2 is greater than the designated gray value avg2, such as avg2 ═ avg1+80, then the gray value of p2 point is assigned as avg1 (the average value of the gray values at p1 points, in fact, the background pixels), and the method can eliminate highlight noise points, such as fluorescence points;
b2.3, after all the pixel points of the gray image Img1 are processed in a traversing mode, the gray value range of all the pixel values of the Img1 is [ avg1, avg2 ];
B3. highlighting the characteristic of fat points, wherein the linear stretching gray scale range [ avg1, avg2] is a range [0,255 ];
C. the threshold method obtains the fat point binary image img2 of the initial discontinuous pixel point level, and the specific content is as follows:
C1. setting a gray threshold Vt, such as Vt 70;
C2. traversing each pixel p3 of the gray level image img1, and obtaining a binary image img2 by calculation according to the gray level v3 of p3, namely if v3 is more than Vt, assigning a pixel point on the img2 corresponding to the p3 point as 1 (fat point), otherwise assigning the pixel point as 254 (background point);
C3. an image img2 obtained after all pixel points of the gray image img1 are traversed is a discontinuous pixel point level fat point binary image: the 1 value is marked as a fat point pixel, the 254 value is marked as a background pixel, and pixel points with the fat point attribute (the value is 1) are independent and have no association;
D. Filling gaps (sand holes) of fat points to obtain a binary image img4, and specifically comprising the following steps:
D1. setting a circular template for convolution calculation;
the convolution template K is an (approximately) circular area B with the radius of 5 (pixels), all pixel point values in the area B are assigned to be 1, and the origin of the convolution template K is the center of the circle of the circular area B;
D2. traversing each pixel point p4 of the binarized image img2, and performing convolution calculation on the p4 points by using a template K: placing the original point of the template K at a pixel point p4 to obtain a convolution value N, wherein the N value is equal to the number of points with the pixel gray value of 1 in all pixel points in the range of the template K covering the binary image img2, and the range of the N value is [0,78 ];
D3. assigning a gray value v4 of a corresponding pixel p4 point on the image img3 according to the value of N, if N > a given threshold T, for example, T is 20, then v4 is assigned as 1 (fat point), otherwise v4 is assigned as 254 (background);
D4. after traversing the binary image img2, obtaining a binary image img 3: 1 value is marked as a fat point pixel, 254 value is marked as a background pixel, and the method can fill up the noise of the fat point sand hole and is similar to the expansion operation of mathematical morphology;
D5. and D2, D3 and D4 are repeated, wherein the convolution on the image img2 is changed to be carried out on the image img3, the threshold value T is changed to be 60, and the binary image img4 is obtained: the 1 value is marked as a fat point pixel, the 254 value is marked as a background pixel, the method can shrink the fat point and further fill small sand holes left in the fat point, and the method is similar to mathematical morphology corrosion operation;
E. The fat point three-valued image img4 of continuous line/surface features is obtained through traversal based on an eight-connectivity method, and the method comprises the following specific steps:
E1. traversing each pixel point p with the value of 1 of the binarized image img 4;
e2.p point stacking;
E3. popping one pixel point q, if all values of eight neighborhood pixel points of the q point are more than or equal to 1 value (1 is a fat point pixel, and 2 is a fat point internal pixel), assigning the q point to be a 2 value (a fat point internal pixel), otherwise, assigning the q point to be a 1 value and not changing;
E4. processing eight neighborhood pixel points r of the q points respectively, if the value is more than or equal to 1, stacking the r, otherwise, not stacking the r;
E5. repeating the steps E3 and E4 until the elements in the stack are empty, and obtaining the line-surface characteristics of a fat point at the moment, wherein the line-surface characteristics are as follows:
e5.1, the pixel value on the boundary line of the fat point is 1, the pixel value inside the fat point is 2, and the pixel value of the surrounding background is 254;
e5.2 record the center point of the fat spot: the central point of the outer wrapping rectangle;
e5.3 records the area of the fat spot: the number of pixels of which all values are 1 or 2;
e5.4 record the intensity of the fat spot: the gray level mean value of all pixels with 1 or 2 values of the fat point on the gray level image img 1;
E6. after traversing the binary image img4, img4 is a three-valued image, all fat points on the three-valued image have line-surface characteristics, and counting can be performed in the traversing process, so that the number of the fat points is count;
F. Calculating quantitative attribute values of fat point Size, distance Dis, brightness and proportion Ratio;
F1. respectively counting and calculating the area (E5.3) and the brightness (E5.4) average value of all the fat points to obtain the fat point Size and brightness attribute of the whole skin image;
F2. calculating the distance d between each fat point and the nearest fat point, wherein the average value of the d values of all the fat points is the fat point distance attribute Dis of the whole skin image;
F3. and obtaining the fat point Ratio attribute Ratio of the whole skin image by the sum of the areas (E5.3) of all the fat points/the number of pixels of the whole image.
G. Calculating a skin image fat point comprehensive evaluation Value which is a weighted average of 3 attribute values of the whole skin image, wherein before calculation, 3 attribute values (size, brightness and ratio) participating in calculation are respectively subjected to normalization processing, and the specific calculation is as shown in a formula (2), and the weighted average can well measure the comprehensive attribute of the skin image fat point:
value is 0.3 × Size +0.3 × Light +0.4 × Ratio (formula 2)
The embodiment result shows that the skin surface fat point detection and evaluation method based on the RGB space of the image, which is realized by the method, has the advantages of quick detection result and high detection result accuracy. In this embodiment, the fat points of 180 pictures are sorted according to the quantitative values of different attributes, specifically, 5 different clients can log in, respectively acquire skin images by using an ultraviolet light source and a macro, and upload the skin images to a computer server, the computer server respectively calculates the fat point attribute value of each image by using the method of the present invention, fig. 3 is a graph of a portion of the image, with the corresponding fat point attribute calculated (normalized) values shown in table 2, sorting the skin image partial images according to the fat point comprehensive evaluation Value obtained by calculation (interface screenshot, the middle Value below each image is the fat point comprehensive evaluation Value), from the sorting result, the fat point attribute Value has high calculation accuracy, the sorting result is as shown in fig. 4, FIG. 5 is an enlarged view of 6 pictures at the upper left corner of FIG. 4. the algorithm of the present invention has a fast calculation speed, and the total calculation time of the fat points of 180 images is less than 1 minute.
TABLE 2 fat point multiple attribute values of each image calculated by the method of the present invention
Serial number | Skin image | Number of | Size and breadth | Ratio of occupation of | Distance between two adjacent plates | Brightness of light | Synthesis of |
1 | FIG. 3a | 158 | 0.17 | 0.41 | 0.41 | 0.45 | 0.35 |
2 | FIG. 3b | 86 | 0.15 | 0.39 | 0.25 | 0.36 | 0.31 |
3 | FIG. 3c | 160 | 0.17 | 0.24 | 0.43 | 0.31 | 0.24 |
4 | FIG. 3d | 115 | 0.19 | 0.11 | 0.31 | 0.46 | 0.24 |
5 | FIG. 3e | 121 | 0.12 | 0.19 | 0.37 | 0.29 | 0.20 |
6 | FIG. 3f | 128 | 0.12 | 0.03 | 0.39 | 0.31 | 0.14 |
7 | FIG. 3g | 179 | 0.13 | 0.03 | 0.52 | 0.27 | 0.13 |
8 | FIG. 3h | 117 | 0.09 | 0.10 | 0.30 | 0.21 | 0.13 |
9 | FIG. 3i | 25 | 0.19 | 0.11 | 0.09 | 0.06 | 0.12 |
10 | FIG. 3j | 40 | 0.21 | 0.08 | 0.11 | 0.08 | 0.12 |
It is noted that the disclosed embodiments are intended to aid in further understanding of the invention, but those skilled in the art will appreciate that: various substitutions and modifications are possible without departing from the spirit and scope of the invention and appended claims. Therefore, the invention should not be limited to the embodiments disclosed, but the scope of the invention is defined by the appended claims.
Claims (6)
1. A method for detecting and evaluating fat points in an image color space based on point, line and plane comprises the steps of processing an RGB digital image of skin microspur with the same resolution to obtain a plurality of index attribute values and comprehensive index values of the fat points of the skin image, and realizing detection and evaluation of the fat point characteristics on the surface of the microspur skin image; the method comprises the following steps:
1) reading RGB color two-dimensional matrixes of all pixels of a skin image file;
2) preprocessing a skin image, comprising the following steps:
B1. graying the color skin image to obtain a grayscale image img 1;
Specifically, the RGB pixel values of each pixel in the two-dimensional matrix of the skin image in the memory are grayed according to equation (1):
v is 0.2 XGreen +0.8 Xblue formula (1)
Wherein V is a value of pixel graying; green and Blue are respectively a Green component and a Blue component in the three color components of the pixel;
B2. removing hair, spots, pores, textures and highlight noise points; the method specifically comprises the following steps:
b2.1, calculating the gray average value of each pixel point p1 in the gray image img1, and marking as avg 1;
taking a square area A1 with the pixel point p1 as a central point as a calculation range; taking the mean value of the gray values of all pixel points in A1 on the gray image img1 as avg 1; wherein, the side length, namely the pixel number, of the square area A1 is a fixed value; if p1 is at the boundary, there is no complete square area A1, then calculate the mean grayscale value of the p1 point from the pixels A1 covers grayscale image img 1;
b2.2, setting a gray value avg2, and removing hairs, spots, pores, textures and highlight noise points on the skin in the image;
traversing each pixel p2 within the square area a 1;
if the gray value of p2 is lower than avg1, the gray value of p2 point on the gray image img1 is assigned as avg1, namely equal to the gray average value of p1 point, which is equivalent to the background pixel, so that the hairs, spots, pores and textures are removed;
If the gray value of p2 is greater than the set gray value avg2, the gray value of the p2 point is assigned as avg1, thereby eliminating highlight noise points including fluorescence points;
b2.3, after all the pixel points of the gray image img1 are processed in a traversing mode, the gray value range of all the pixels in the img1 is [ avg1, avg2 ];
B3. highlighting the fat point features, linearly stretching the gray value range [ avg1, avg2] of the pixels in img1 to a range [0,255 ];
3) obtaining a fat point binary image img2 of an initial discontinuous pixel point level by adopting a threshold method; the specific operation is as follows:
C1. setting a gray threshold value Vt;
C2. traversing each pixel p3 of the gray level image img1, comparing the gray level v3 of each pixel p3 with a gray level threshold value Vt, identifying each pixel as a fat point or a background point, and obtaining a binary image img 2; if v3 is greater than Vt, assigning the pixel point in img2 corresponding to the p3 point as 1, and representing that the point is a fat point; otherwise, the value is assigned to 254, which represents the point location background point;
C3. an image img2 obtained after all the pixel points of the gray level image img1 are traversed is a discontinuous pixel point level fat point binary image img2, wherein: the pixel value bit 1 indicates that the point is a fat point, and the pixel value bit 254 indicates that the point is a background; the pixel points with the value of 1 and the fat point attribute are independent and have no correlation;
4) Filling fat point gaps, namely sand holes, obtaining fat points of continuous pixel point levels based on a circular template convolution method, wherein the result image is a binary image img 4; the method comprises the following specific steps:
D1. setting a convolution template K for convolution calculation;
the convolution template K is a circular or approximately circular area B with the radius of R pixels; the original point of the convolution template K is the circle center of the B;
assigning all pixel point values in B to be 1;
D2. traversing each pixel point p4 of the binarized image img2, and performing convolution calculation on the p4 points by using a convolution template K: setting the original point of the convolution template K as a pixel point p4 to obtain a convolution value N; the value N is equal to the number of points with the pixel gray value of 1 in all the pixel points of the binary image img2 covered by the convolution template K;
D3. according to the N value, the gray value of the corresponding pixel p4 point in a new image img3 is assigned to v 4;
if N > a given threshold T, then v4 is assigned a value of 1, indicating that the point is a fat point; otherwise, v4 is assigned 254, indicating that the point is background;
D4. after traversing the binary image img2, obtaining a binary image img 3; a pixel value of 1 in img3 indicates that the point is a fat point pixel, and a pixel value of 254 indicates that the point is a background pixel; therefore, the filling of the noise of the sand holes of the fat dots is realized;
D5. Performing operations D2-D4 on the obtained binary image img3, and performing convolution on the image img3 to obtain a binary image img 4; a pixel value of 1 in img4 indicates that the point is a fat point pixel, and a pixel value of 254 indicates that the point is a background pixel; thereby contracting the fat points and further filling small sand holes left in the fat points;
5) traversing the binary image img4 based on an eight-way connection method to obtain fat points with continuous line/surface characteristics to obtain a ternary image img 5; the method comprises the following specific steps:
E1. traversing each pixel point p with the value of 1 of the binarized image img 4;
E2. putting the p points on a stack;
E3. popping one pixel point q;
if all the values of the eight neighborhood pixel points r of the q point are more than or equal to 1; if the value is 1, the fat point pixel is represented, and the q point is assigned to be 2; the value of 2 represents the internal pixel point of the fat point;
otherwise, the value of the point q is still 1;
E4. respectively processing eight neighborhood pixel points r of the q points: if the value is more than or equal to 1, pushing r into the stack; otherwise, not stacking;
E5. repeating the steps E3-E4 until the elements in the stack are empty, and obtaining the line-surface characteristics of the fat points;
the line-surface characteristics of the fat point specifically include:
e5.1, the pixel value on the boundary line of the fat point is 1, the pixel value inside the fat point is 2, and the pixel value of the surrounding background is 254;
The central point of the E5.2 fat point is the central point of the wrapping rectangle;
e5.3 the area of the fat point is the number of pixels of which all values are 1 or 2;
e5.4, the brightness of the fat point is the average gray level of all pixels with 1 or 2 values of the fat point in the gray level image img 1;
E6. after traversing the binary image img4, obtaining a ternary image img 5; all fat points on the three-valued image have line-surface characteristics; counting in the traversal process to obtain the number of fat points, and recording as count;
6) calculating quantitative attribute values of the number, size, distance, brightness and proportion of fat points; the method comprises the following steps:
F1. respectively calculating the average values of the areas and the brightness of all the fat points to obtain the fat point Size attribute Size and the brightness attribute Light of the whole skin image;
F2. calculating the distance d between each fat point and the nearest fat point; taking the average value of the distances of all the fat points as the fat point distance attribute Dis of the whole skin image;
F3. dividing the sum of the areas of all the fat points by the number of pixels of the whole image to obtain a fat point Ratio attribute Ratio of the whole skin image;
G. calculating a comprehensive evaluation Value of the fat points of the skin image; the method comprises the following steps:
firstly, respectively carrying out normalization processing on the size attribute value, the brightness attribute value and the ratio attribute value of the whole skin image;
Carrying out weighted average on the size attribute Value, the brightness attribute Value and the ratio attribute Value of the whole skin image, wherein the weighted average is a Value; specifically, the calculation is carried out by adopting the formula (2):
value is 0.3 × Size +0.3 × Light +0.4 × Ratio (formula 2)
The Value is used as a comprehensive evaluation Value for measuring the comprehensive attribute of the fat point of the skin image;
through the steps, the detection and evaluation of the fat points in the image color space based on the point, line and plane are realized.
2. The method for detecting and evaluating fat points in image color space based on points, lines and planes as claimed in claim 1, wherein the format of the skin image file in step a includes jpg, bmp and png.
3. The method for detecting and evaluating fat points in image color space based on point, line and plane as claimed in claim 1, wherein in step B2.2, the gray value avg2 ═ avg1+80 is set.
4. The method for detecting and evaluating fat points in image color space based on point, line and plane as claimed in claim 1, wherein in step D2, the value of N is [0,78 ].
5. The method for detecting and evaluating fat points in image color space based on point, line and plane as claimed in claim 4, wherein in step D3, a given threshold T is set to 20 for the binarized image img 2.
6. The method for detecting and evaluating fat points in image color space based on point, line and plane as claimed in claim 1, wherein the value of the threshold T is set to 60 in step D5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010474308.5A CN111861981B (en) | 2020-05-29 | 2020-05-29 | Image color space fat point detection and evaluation method based on dotted line and plane |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010474308.5A CN111861981B (en) | 2020-05-29 | 2020-05-29 | Image color space fat point detection and evaluation method based on dotted line and plane |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111861981A true CN111861981A (en) | 2020-10-30 |
CN111861981B CN111861981B (en) | 2023-05-30 |
Family
ID=72985861
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010474308.5A Active CN111861981B (en) | 2020-05-29 | 2020-05-29 | Image color space fat point detection and evaluation method based on dotted line and plane |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111861981B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6690822B1 (en) * | 2000-10-20 | 2004-02-10 | Eastman Kodak Company | Method for detecting skin color in a digital image |
CN101865899A (en) * | 2010-06-21 | 2010-10-20 | 邹运动 | Method for quantitative evaluation of artificial skin stratum corneum barrier function |
WO2015024383A1 (en) * | 2013-08-19 | 2015-02-26 | 成都品果科技有限公司 | Similarity acquisition method for colour distribution and texture distribution image retrieval |
-
2020
- 2020-05-29 CN CN202010474308.5A patent/CN111861981B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6690822B1 (en) * | 2000-10-20 | 2004-02-10 | Eastman Kodak Company | Method for detecting skin color in a digital image |
CN101865899A (en) * | 2010-06-21 | 2010-10-20 | 邹运动 | Method for quantitative evaluation of artificial skin stratum corneum barrier function |
WO2015024383A1 (en) * | 2013-08-19 | 2015-02-26 | 成都品果科技有限公司 | Similarity acquisition method for colour distribution and texture distribution image retrieval |
Non-Patent Citations (1)
Title |
---|
于铂;郑丽敏;田立军;: "基于颜色和纹理特征提取彩色图像的有意义区域", 计算机工程 * |
Also Published As
Publication number | Publication date |
---|---|
CN111861981B (en) | 2023-05-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
He et al. | A comparison of binarization methods for historical archive documents | |
CN107665492B (en) | Colorectal panoramic digital pathological image tissue segmentation method based on depth network | |
CN107169960A (en) | A kind of skin surface pore size detection method based on color of image space | |
CN104978578B (en) | Mobile phone photograph text image method for evaluating quality | |
KR100422709B1 (en) | Face detecting method depend on image | |
CN112215790A (en) | KI67 index analysis method based on deep learning | |
CN109859257B (en) | Skin image texture evaluation method and system based on texture directionality | |
WO2021147866A1 (en) | Ecg signal acquisition method and device, storage medium, and electronic device | |
CN111709305B (en) | Face age identification method based on local image block | |
Xiang et al. | Research on splicing image detection algorithms based on natural image statistical characteristics | |
CN111259792B (en) | DWT-LBP-DCT feature-based human face living body detection method | |
CN116052105A (en) | Pavement crack identification classification and area calculation method, system, equipment and terminal | |
CN115033721A (en) | Image retrieval method based on big data | |
CN111738984B (en) | Skin image spot evaluation method and system based on watershed and seed filling | |
CN114638958A (en) | Multi-feature fusion ternary positive electrode material roughness extraction method and device | |
Yang et al. | No‐reference image quality assessment via structural information fluctuation | |
CN114092456A (en) | Cell fluorescence image distinguishing method and system | |
CN111861981B (en) | Image color space fat point detection and evaluation method based on dotted line and plane | |
CN116109933B (en) | Dynamic identification method for ecological restoration of abandoned mine | |
CN116977895A (en) | Stain detection method and device for universal camera lens and computer equipment | |
CN115965613A (en) | Cross-layer connection construction scene crowd counting method based on cavity convolution | |
CN113065407B (en) | Financial bill seal erasing method based on attention mechanism and generation countermeasure network | |
CN112396638A (en) | Image processing method, terminal and computer readable storage medium | |
CN109949273B (en) | Skin image texture segmentation method and system based on texture symmetry | |
CN114241580A (en) | Face recognition method based on local binary characteristics and related device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |