IP Library Granted Patent US 11,989,885
Granted Patent B2
US 11,989,885 · App. 17/260,855 · Granted May 21, 2024

Speckle detection method and electronic device

Inventors: Zhizhi Guo (Shenzhen, CN); Henghui Lu (Beijing, CN); Wenmei Gao (Beijing, CN)
Assignee: HONOR DEVICE CO., LTD.
G06T7/11G06F18/241G06T7/0012G06T7/514G06V10/56G06V40/10G06V40/171G06T2207/10024G06T2207/30088G06V2201/03
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,989,885
App. No.
17/260,855
Granted
May 21, 2024
Kind
B2
Abstract

A speckle detection method includes: obtaining a to-be-detected image; converting the to-be-detected image into Lab color space to obtain a Lab image; extracting a speckle feature from the Lab image to obtain a speckle feature image, where the speckle feature image includes a skin speckle feature and a subcutaneous speckle feature; and determining a skin speckle and a subcutaneous speckle in the speckle feature image.

Claims (128)

1. A speckle detection method, comprises:

obtaining a to-be-detected image;

converting the to-be-detected image into Lab color space to obtain a Lab image;

extracting a speckle feature from the Lab image to obtain a speckle feature image, comprising separately extracting detail feature components of a channel L, a channel a, and a channel b in the Lab image to obtain the speckle feature image, wherein the speckle feature image comprises a skin speckle feature and a subcutaneous speckle feature; and

determining a skin speckle and a subcutaneous speckle in the speckle feature image, comprising

determining one or more speckle regions in the speckle feature image,

for each of the one or more speckle regions, determining a channel b average value of pixel points of the respective speckle region, determining the respective speckle region whose channel b average value is greater than a first threshold as the skin speckle, and determining the respective speckle region whose channel b average value is less than or equal to the first threshold as the subcutaneous speckle.

2. The method of claim 1 , extracting the speckle feature to obtain the speckle feature image further comprises:

determining a channel L difference between the channel L and the extracted detail feature component of the channel L, a channel a difference between the channel a and the extracted detail feature component of the channel a, and a channel b difference between the channel b and the extracted detail feature component of the channel b; and

obtaining the speckle feature image based on the channel L difference, the channel a difference, and the channel b difference, wherein the channel L in the speckle feature image is the channel L difference, the channel a in the speckle feature image is the channel a difference, and the channel b in the speckle feature image is the channel b difference.

3. The method of claim 2 , wherein the method further comprises:

separately performing bilateral filtering processing on the channel L, the channel a, and the channel b in the Lab image, to obtain the detail feature component of the channel L, the detail feature component of the channel a, and the detail feature component of the channel b.

4. The method of claim 2 , wherein determining the one or more speckle regions further comprises:

determining a first pixel point in a detection frame, wherein a length of the detection frame is less than a length of the speckle feature image, a width of the detection frame is less than a width of the speckle feature image, the detection frame moves in the speckle feature image at a preset step, and a pixel value of the first pixel point satisfies the following formula:

r 1<( a 1− T 1× b 1), wherein

r1 is the pixel value of the first pixel point, a1 is an average value of pixel values of pixel points in the detection frame, T1 is a preset value, and b1 is a variance of the pixel values of the pixel points in the detection frame;

determining a second pixel point in the speckle feature image, wherein a pixel value of the second pixel point satisfies the following formula:

r 2<( a 2− T 2× b 2), wherein

r2 is the pixel value of the second pixel point, a2 is an average value of pixel values of pixel points in the speckle feature image, T2 is a preset value, and b2 is a variance of the pixel values of the pixel points in the speckle feature image;

determining the first pixel point and the second pixel point as speckles; and

performing an expansion operation on one of the speckles, and performing a corrosion operation on that speckle on which the expansion operation is performed, to obtain the speckle region.

5. The method of claim 2 , wherein the method further comprises:

removing the respective speckle region whose area is less than a second threshold and/or whose area is greater than a third threshold, wherein the second threshold is less than the third threshold; and/or

removing the respective speckle region whose ratio of an area to a circumference is less than a fourth threshold.

6. The method of claim 1 , wherein the method further comprises:

determining a first feature set, and quantizing a score of the skin speckle based on the first feature set, wherein the first feature set comprises at least one of the following features: a uniformity value, a quantity of skin speckles, a speckle area of the skin speckle, or a contrast value of the skin speckle, the uniformity value is used to represent pigment uniformity of the speckle feature image, and the contrast value of the skin speckle is used to represent color contrast of the skin speckle;

determining a second feature set, and quantizing a score of the subcutaneous speckle based on the second feature set, wherein the second feature set comprises at least one of the following features: the uniformity value, a quantity of subcutaneous speckles, a speckle area of the subcutaneous speckle, or a contrast value of the subcutaneous speckle, and the contrast value of the subcutaneous speckle is used to represent color contrast of the subcutaneous speckle;

determining a comprehensive score of speckle detection based on the score of the skin speckle and the score of the subcutaneous speckle; and

displaying the comprehensive score, or displaying the score of the skin speckle, the score of the subcutaneous speckle, and the comprehensive score.

7. The method of claim 6 , wherein the score of the skin speckle is determined according to the following formula:

H

1

=

w

1

×

A

+

w

2

×

B

1

+

w

3

×

C

1

×

D

1

E

,

 wherein

H 1 is the score of the skin speckle, A is the uniformity value, B 1 is the quantity of skin speckles, C 1 is a sum of contrast values of all the skin speckles, D 1 is a sum of areas of all the skin speckles, E is an area of the speckle feature image, and w 1 , w 2 , and w 3 are all preset parameters;

the score of the subcutaneous speckle is determined according to the following formula:

H

2

=

w

1

×

A

+

w

4

×

B

2

+

w

5

×

C

2

×

D

2

E

,

 wherein

H 2 is the score of the subcutaneous speckle, B 2 is the quantity of subcutaneous speckles, C 2 is a sum of contrast values of all the subcutaneous speckles, D 2 is a sum of areas of all the subcutaneous speckles, and both w 3 and w 4 are preset parameters; and

the comprehensive score is determined according to the following formula:

H=y 1 ×H 1 +y 2 ×H 1 , wherein

H is the comprehensive score, and both y 1 and y 2 are preset parameters.

8. The method of claim 6 , wherein the uniformity value in the first feature set or the second feature set is determined in the following manner:

dividing the speckle feature image into several overlapping rectangular regions;

determining a standard deviation of pixel values of pixel points in each rectangular region; and

determining an average value of the standard deviations of the pixel values of all the rectangular regions, to obtain the uniformity value.

9. The method of claim 6 , wherein the contrast value of the skin speckle in the first feature set is determined in the following manner:

determining an average value of first pixel values of pixel points in each skin speckle and an average value of second pixel values of pixel points in the speckle feature image; and

determining a ratio of the average value of the first pixel values to the average value of the second pixel values, to obtain the contrast value of the skin speckle; and

the contrast value of the subcutaneous speckle in the second feature set is determined in the following manner:

determining an average value of third pixel values of pixel points in each subcutaneous speckle, and the average value of the second pixel values; and

determining a ratio of the average value of the third pixel values to the average value of the second pixel values, to obtain the contrast value of the subcutaneous speckle.

10. The method of claim 1 , wherein the method further comprises:

converting the to-be-detected image into a grayscale image; and

removing a pixel point whose pixel value is greater than a fifth threshold from the grayscale image.

11. An electronic device, comprising:

a non-transitory memory comprising instructions; and

a processor coupled to the non-transitory memory, the instructions being executed by the processor to cause the electronic device to:

obtain a to-be-detected image;

convert the to-be-detected image into Lab color space to obtain a Lab image;

extract a speckle feature from the Lab image to obtain a speckle feature image, to extract the speckle feature comprising separately extracting detail feature components of a channel L, a channel a, and a channel b in the Lab image to obtain the speckle feature image, wherein the speckle feature image comprises a skin speckle feature and a subcutaneous speckle feature; and

determine a skin speckle and a subcutaneous speckle in the speckle feature image, wherein to determine the skin speckle and the subcutaneous speckle comprises to

determine one or more speckle regions in the speckle feature image,

for each of the one or more speckle regions, determine a channel b average value of pixel points of the respective speckle region, determine the respective speckle region whose channel b average value is greater than a first threshold as the skin speckle, and determine the respective speckle region whose channel b average value is less than or equal to the first threshold as the subcutaneous speckle.

12. The electronic device of claim 11 , wherein to extract the speckle feature to obtain the speckle feature image further comprises to:

determine a channel L difference between the channel L and the extracted detail feature component of the channel L, a channel a difference between the channel a and the extracted detail feature component of the channel a, and a channel b difference between the channel b and the extracted detail feature component of the channel b; and

obtain the speckle feature image based on the channel L difference, the channel a difference, and the channel b difference, wherein the channel L in the speckle feature image is the channel L difference, the channel a in the speckle feature image is the channel a difference, and the channel b in the speckle feature image is the channel b difference.

13. The electronic device of claim 12 , the instructions further cause the electronic device to:

separately perform bilateral filtering processing on the channel L, the channel a, and the channel b in the Lab image, to obtain the detail feature component of the channel L, the detail feature component of the channel a, and the detail feature component of the channel b.

14. The electronic device of claim 11 , the instructions further cause the electronic device to:

convert the to-be-detected image into a grayscale image; and

remove a pixel point whose pixel value is greater than a fifth threshold from the grayscale image.

15. A computer program product for speckle detecting, the computer program product being embodied in a non-transitory computer readable medium and comprising computer instructions for:

obtaining a to-be-detected image;

converting the to-be-detected image into Lab color space to obtain a Lab image;

extracting a speckle feature from the Lab image to obtain a speckle feature image, comprising separately extracting detail feature components of a channel L, a channel a and a channel b in the Lab image to obtain the speckle feature image, wherein the speckle feature image comprises a skin speckle feature and a subcutaneous speckle feature; and

determining a skin speckle and a subcutaneous speckle in the speckle feature image, comprising

determining one or more speckle regions in the speckle feature image,

for each of the one or more speckle regions, determining a channel b average value of pixel points of the respective speckle region, determining the respective speckle region whose channel b average value is greater than a first threshold as the skin speckle, and determining the respective speckle region whose channel b average value is less than or equal to the first threshold as the subcutaneous speckle.

16. The computer program product of claim 15 , wherein extracting the speckle feature to obtain the speckle feature image further comprises:

determining a channel L difference between the channel L and the extracted detail feature component of the channel L, a channel a difference between the channel a and the extracted detail feature component of the channel a, and a channel b difference between the channel b and the extracted detail feature component of the channel b; and

obtaining the speckle feature image based on the channel L difference, the channel a difference, and the channel b difference, wherein the channel L in the speckle feature image is the channel L difference, the channel a in the speckle feature image is the channel a difference, and the channel b in the speckle feature image is the channel b difference.

17. The computer program product of claim 16 , the computer program product further comprises computer instructions for:

separately performing bilateral filtering processing on the channel L, the channel a, and the channel b in the Lab image, to obtain the detail feature component of the channel L, the detail feature component of the channel a, and the detail feature component of the channel b.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 13, 2021
From: HUAWEI TECHNOLOGIES CO., LTD.
To: HONOR DEVICE CO., LTD.
Reel/Frame 055919/0344 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 22, 2021
From: GUO, ZHIZHI; LU, HENGHUI; GAO, WENMEI
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 055350/0640 →