Data processing method for detecting lesion regions in auxiliary skin images

By calculating the degree of grayscale abnormality of each pixel point in the skin image and identifying the boundaries, the problem of inaccurate identification of minor lesions is solved, and accurate identification of lesions and contrast enhancement is achieved.

CN119831994BActive Publication Date: 2025-06-20陕西青叶海棠网络科技有限责任公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510307513.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-06-20
Estimated Expiration
2045-03-17

AI Technical Summary

Technical Problem

The prior art is difficult to accurately obtain boundaries when identifying mild lesions in skin images, resulting in inaccurate detection and inaccurate identification.

Method used

By calculating the degree of grayscale abnormality of each pixel point, and using the difference in grayscale abnormality of pixel points on the left and right sides of the peer, the boundaries of the area to be enhanced are identified, and then contrast enhancement is performed to achieve accurate identification of the lesion area.

Benefits of technology

Accurate identification of mild lesions is achieved, error detection is avoided, and the accuracy of identification of lesions is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831994B_ABST
    Figure CN119831994B_ABST
Patent Text Reader

Abstract

The present invention relates to a data processing method for assisting in the detection of lesion regions in skin images, belonging to the technical field of image data processing. The steps of the method include: obtaining a skin image to be recognized, calculating the gray anomaly degree of each pixel point in the skin image to be recognized, and calculating the enhancement degree of each region to be enhanced according to the gray anomaly degrees of all the pixels to be enhanced in each region to be enhanced; calculating the contrast increment of each region to be enhanced from the enhancement degree and the contrast difference of each region to be enhanced; increasing the contrast increment on the basis of the contrast of each region to be enhanced, and enhancing each region to be enhanced to obtain an enhanced image; according to the gray anomaly degree of each pixel point, the present invention identifies the boundary of the region to be enhanced, and after accurately identifying the boundary of the region to be enhanced, enhances the contrast of each region to be enhanced to obtain an enhanced image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image data processing, and particularly relates to a data processing method for assisting in the detection of lesion regions in skin images. Background Art

[0002] Phototherapy is mainly used for treating skin tissue. Since the sizes and severities of lesion regions vary, it usually requires a physician to make a judgment independently, which has a high requirement for the physician's experience. To assist the physician in identifying lesion regions, computer vision is generally used to recognize different-sized lesion regions existing in skin images at present. For relatively mild lesion regions, their features are less obvious. Therefore, the computer cannot directly obtain the position information of the lesion regions, and it is necessary to enhance the collected skin images to facilitate the recognition of lesion regions from the enhanced skin images.

[0003] Before enhancing the lesion region, it is necessary to accurately obtain the boundary of the lesion region. For lesion regions with large differences, the boundary of the lesion region can be directly obtained by means such as threshold segmentation. Since the color difference between mild lesion regions and normal skin is small, it is difficult to obtain a clear boundary of mild lesion regions, and the gray difference between them and normal skin is small. Directly using the threshold segmentation method to obtain the boundary of the lesion region will divide the weak differences of the skin itself into the interior of the lesion region boundary, resulting in misdetection of the lesion region and thus unable to accurately identify the lesion region. Summary of the Invention

[0004] When enhancing the skin image to be recognized, the present invention calculates the gray anomaly degree of each pixel point in the skin image to be recognized according to the frequency of the gray value corresponding to each pixel point appearing in the skin image to be recognized, and identifies the boundary of the region to be enhanced according to the gray anomaly degree of each pixel point. After accurately identifying the boundary of the region to be enhanced, the contrast of each region to be enhanced is enhanced to obtain an enhanced image, realizing the accurate identification of the lesion region in the enhanced image.

[0005] The data processing method for assisting in the detection of lesion regions in skin images of the present invention adopts the following technical solutions:

[0006] Obtain the skin image to be recognized;

[0007] Calculate the gray anomaly degree of each pixel point in the skin image to be recognized according to the frequency of the gray value corresponding to each pixel point appearing in the skin image to be recognized;

[0008] Take the difference value of the gray anomaly degree between the pixel point and the pixel points on the left and right sides of the same row of each pixel point in the skin image to be recognized as the difference value of each pixel point in the skin image to be recognized;

[0009] Obtain the average value of the absolute differences of each row of pixel points in the skin image to be recognized. Select the pixel points in each row whose absolute differences are greater than the average value of the absolute differences of that row as edge points, and classify the edge points into starting points and ending points according to the positive or negative of the corresponding differences of the edge points;

[0010] Mark the pixel points between the starting point and the ending point as pixel points to be enhanced in the order from the starting point to the ending point;

[0011] Form multiple regions to be enhanced from all the pixel points to be enhanced, and calculate the enhancement degree of each region to be enhanced according to the gray anomaly degree of all the pixel points to be enhanced in each region to be enhanced;

[0012] Calculate the contrast difference between each region to be enhanced and the skin image to be recognized, and calculate the contrast increment of each region to be enhanced from the enhancement degree and the contrast difference of each region to be enhanced;

[0013] Increase the contrast increment on the basis of the contrast of each region to be enhanced, and enhance each region to be enhanced to obtain the enhanced image;

[0014] Identify the lesion area in the enhanced image.

[0015] Further, the steps of calculating the gray anomaly degree of each pixel point in the skin image to be recognized include:

[0016] Calculate the first ratio of the number of pixel points with the same gray value as each pixel point in the skin image to be recognized to the total number of pixel points in the skin image to be recognized;

[0017] Select the maximum value from all the obtained first ratios as the maximum ratio, and select the minimum value from all the obtained first ratios as the minimum ratio;

[0018] Select any pixel point in the skin image to be recognized as the target pixel point;

[0019] Calculate the second ratio of the number of pixel points with the same gray value as the target pixel point in the skin image to be recognized to the total number of pixel points in the skin image to be recognized;

[0020] Calculate the first difference between the maximum ratio and the second ratio, and at the same time calculate the second difference between the maximum ratio and the minimum ratio;

[0021] Take the third ratio of the first difference to the second difference as the gray anomaly degree of the target pixel point in the skin image to be recognized, and calculate the gray anomaly degree of each pixel point in the skin image to be recognized according to the calculation method of the gray anomaly degree of the target pixel point.

[0022] Further, the calculation steps for the difference value of each pixel point in the skin image to be recognized include:

[0023] Subtract the gray anomaly degree of the pixel point on the left side of the same row from the gray anomaly degree of the pixel point on the right side of the same row in the skin image to be recognized, to obtain the difference value of each pixel point in the skin image to be recognized.

[0024] Further, the steps of classifying the edge points into starting points and ending points according to the positive and negative of the corresponding difference values of the edge points include:

[0025] Take the edge points with negative difference values as starting points, and take the edge points with positive difference values as ending points.

[0026] Further, the steps of marking the pixel points between the starting point and the ending point as pixel points to be enhanced in the order from the starting point to the ending point include:

[0027] Start traversing from the first starting point in each row from left to right until another starting point appears and stop traversing, and take all the ending points traversed as ending points to be matched;

[0028] Calculate the third difference value between the absolute value of the difference value of the first starting point and the absolute value of the difference value of each ending point to be matched, and take the ending point to be matched with the smallest third difference value as the final matched ending point;

[0029] Pair the first starting point with the final matched ending point to obtain a set of starting and ending points, start traversing from another starting point in the same row to obtain another set of starting and ending points, and similarly obtain multiple sets of starting and ending points in the same row;

[0030] Mark the pixel points between multiple sets of starting and ending points in the same row as pixel points to be enhanced.

[0031] Further, the steps of calculating the enhancement degree of each region to be enhanced include:

[0032] Obtain the gray anomaly degree sum and value of all pixel points to be enhanced in each region to be enhanced;

[0033] Obtain the total number of pixel points to be enhanced in each region to be enhanced;

[0034] Take the normalized value of the ratio of the gray anomaly degree sum to the total number as the enhancement degree of each region to be enhanced.

[0035] Further, the steps of calculating the contrast increment of each region to be enhanced include:

[0036] Take the product of the contrast difference between each region to be enhanced and the skin image to be recognized and the enhancement degree of the corresponding region to be enhanced as the contrast increment of the region to be enhanced.

[0037] The beneficial effects of the present invention are as follows:

[0038] The present invention provides a data processing method for assisting in the detection of lesion areas in skin images. According to the frequency of occurrence of the gray value corresponding to each pixel point in the skin image to be recognized, the gray abnormality degree of each pixel point in the skin image to be recognized is calculated. When recognizing the lesion area, the present invention does not depend on the gray value of the pixel point, but converts the gray value of the pixel point into the gray abnormality degree of the pixel point; since the gray values of the edge pixel points in the lesion area are not very different from those of the normal skin, but the gray values of the edge pixel points in the lesion area will not be exactly the same as those of the normal skin and there will be slight differences, and the frequency of occurrence of the gray values of the edge pixel points is smaller than the number of occurrences of the gray values of the normal skin, the abnormality degree calculated by using the gray abnormality degree calculation formula is large. Therefore, the gray value of the pixel point is converted into the gray abnormality degree of the pixel point, and the pixel points to be enhanced are accurately obtained through the difference in the gray abnormality degree between the pixel points on the left and right sides of the same row of each pixel point in the skin image to be recognized, realizing the accurate recognition of the edge of the lesion area; after obtaining the pixel points to be enhanced, the area to be enhanced is composed of all the pixel points that need to be enhanced. According to the contrast of the area to be enhanced and the gray abnormality degree of all the pixel points in the area to be enhanced, the contrast increment of each area to be enhanced is calculated. The present invention enhances the contrast of the image to obtain the enhanced image. The enhancement through the contrast can realize the significant enhancement of the slight lesion area, facilitating the accurate recognition of the lesion area in the enhanced image. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0040] Figure 1 It is a schematic flowchart of the overall steps of the embodiment of the data processing method for assisting in the detection of lesion areas in skin images according to the present invention;

[0041] Figure 2 It is a schematic diagram of the change curve of the gray abnormality degree value of any row of pixel points in the present invention;

[0042] Figure 3 It is a schematic diagram of making a secant line in the horizontal row direction for a circular lesion area in the present invention;

[0043] Figure 4 It is a schematic diagram of the binary image of the area to be enhanced in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0045] An embodiment of the data processing method for detecting the lesion area in the auxiliary skin image of the present invention is as Figure 1 shown. The method includes:

[0046] S1. Obtain the skin image to be recognized.

[0047] The phototherapy device has fixed time gears. Obtain the skin image at the moment that is half of the irradiation duration of the current time gear, and use it as the original image for subsequent processing. Filter and denoise the original image, and perform weighted grayscale conversion to obtain the skin image to be recognized.

[0048] S2. Calculate the gray anomaly degree of each pixel point in the skin image to be recognized according to the frequency of the gray value corresponding to each pixel point appearing in the skin image to be recognized.

[0049] The absorption of infrared light by the lesion tissue and normal skin tissue on the skin is different. Therefore, the thermal effect of the infrared rays of the phototherapy device will generate different heating degrees on the two tissues. After the lesion tissue and normal tissue are heated, they will present different colors. According to the gray anomaly degree of the pixel points in the skin image to be measured, the area to be enhanced is obtained. Skin lesions will appear as areas that are whiter or blacker than the normal skin tissue in the grayscale image. Therefore, calculate the gray anomaly degree of each pixel point in the skin image to be recognized according to the frequency of the gray value corresponding to each pixel point appearing in the skin image to be recognized.

[0050] Since the gray values of the pixel points at the edge of the lesion area are not very different from those of the normal skin, but the gray values of the pixel points at the edge of the lesion area will not be exactly the same as those of the normal skin and there will be slight differences. The frequency of the gray values of the edge pixel points appears less than that of the gray values of the normal skin. The anomaly degree calculated by using the gray anomaly degree calculation formula is large. Therefore, convert the gray value of the pixel point into the gray anomaly degree of the pixel point, and accurately obtain the pixel points to be enhanced through the difference in the gray anomaly degrees of the pixel points on the left and right sides of the same row of each pixel point in the skin image to be recognized, realizing the accurate recognition of the edge of the lesion area.

[0051] The steps for calculating the gray - scale abnormality degree of each pixel point in the skin image to be recognized include: calculating the first ratio of the number of pixel points with the same gray - scale value as each pixel point in the skin image to be recognized to the total number of pixel points in the skin image to be recognized; selecting the maximum value from all the obtained first ratios as the maximum ratio, and selecting the minimum value from all the obtained first ratios as the minimum ratio; selecting any pixel point in the skin image to be recognized as the target pixel point; calculating the second ratio of the number of pixel points with the same gray - scale value as the target pixel point in the skin image to be recognized to the total number of pixel points in the skin image to be recognized; calculating the first difference between the maximum ratio and the second ratio, and at the same time calculating the second difference between the maximum ratio and the minimum ratio; taking the third ratio of the first difference to the second difference as the gray - scale abnormality degree of the target pixel point in the skin image to be recognized, and calculating the gray - scale abnormality degree of each pixel point in the skin image to be recognized according to the calculation method of the gray - scale abnormality degree of the target pixel point.

[0052] The calculation formula for the gray - scale abnormality degree of the target pixel point in the skin image to be recognized is:

[0053]

[0054] Where, represents selecting the th pixel point in the skin image to be recognized as the target pixel point; represents the gray - scale abnormality degree of the target pixel point in the skin image to be recognized; represents the number of pixel points with the same gray - scale value as the target pixel point in the skin image to be recognized gray - scale value in the skin image to be recognized; is the number of pixel points in the skin image to be recognized whose gray - scale value is equal to the gray - scale value ; represents the total number of pixel points in the skin image to be recognized; represents the second ratio of the number of pixel points with the same gray - scale value as the target pixel point gray - scale value in the skin image to be recognized to the total number of pixel points in the skin image to be recognized; represents the maximum ratio, that is, the maximum value among the first ratios of the number of pixel points with the same gray - scale value as each pixel point in the skin image to be recognized to the total number of pixel points in the skin image to be recognized; represents the minimum ratio, that is, the minimum value among the first ratios of the number of pixel points with the same gray - scale value as each pixel point in the skin image to be recognized to the total number of pixel points in the skin image to be recognized.

[0055] In the calculation formula of the gray - scale abnormality degree of the target pixel point in the skin image to be recognized, when the skin image to be recognized is determined, that is, the maximum value of the first ratio of the number of pixel points with the same gray - scale value as each pixel point in the skin image to be recognized to the total number of pixel points in the skin image to be recognized is determined and unchanged, that is is a non - variable; at the same time, the minimum value of the first ratio of the number of pixel points with the same gray - scale value as each pixel point in the skin image to be recognized to the total number of pixel points in the skin image to be recognized is also determined and unchanged, that is is a non - variable; represents the target pixel point corresponding gray - scale value The frequency of occurrence in the skin image to be recognized. The larger this ratio is, the more it indicates that the gray - scale value of the target pixel point appears more times, which means that the gray - scale value of the target pixel point appears more prevalently, that is, the greater the degree that the gray - scale value of the target pixel point is the background. The smaller this ratio is, the more it indicates that the gray - scale value of the target pixel point appears fewer times, that is, the greater the possibility that the gray - scale value of the target pixel point is the lesion area or the edge of the lesion area, and the greater the possibility that the target pixel point is the pixel point that needs to be enhanced subsequently.

[0056] S3. Use the difference in the gray - scale abnormality degree between the pixel points on the left and right sides of each pixel point in the same row of the skin image to be recognized as the difference value of each pixel point in the skin image to be recognized.

[0057] The calculation steps of the difference value of each pixel point in the skin image to be recognized include: subtracting the gray - scale abnormality degree of the pixel point on the left side of the same row from the gray - scale abnormality degree of the pixel point on the right side of the same row in the skin image to be recognized to obtain the difference value of each pixel point in the skin image to be recognized.

[0058] In step S2, the gray - scale abnormality degree of each pixel point is obtained. Replace the gray - scale value of each pixel point in the skin image to be recognized with the gray - scale abnormality degree of this pixel point to obtain an abnormal feature matrix, and use the abnormal feature matrix to locate the area that needs to be enhanced; through the gray - scale abnormality degree of the pixel point, arrange it according to the position corresponding to the pixel point in the image as the abnormal feature matrix of the image.

[0059] There is a gray - scale difference between the edge of the lesion area and the normal skin area. There are also certain differences between the detailed parts of the skin itself and the ordinary skin. To avoid misjudgment, compared with the skin details, the skin details are distributed in a point - shape on the skin, and the area occupied by the skin details in the skin image to be recognized is larger than the area occupied by the lesion area in the skin image to be recognized.

[0060] Judge the change trend of the gray anomaly degree in the row direction of the obtained anomaly feature matrix. Set the coordinate system as the method of establishing the coordinate system at the lower left corner of the image in the prior art. The row direction of the anomaly feature matrix is the positive direction of the axis in the image coordinate system. As Figure 2 shown, it is a schematic diagram of the change curve of the gray anomaly degree value of any row of pixel points in the present invention.

[0061] As Figure 3 shown, it is a schematic diagram of making a secant line in the horizontal row direction for a circular lesion area in the present invention. The secant line must have two intersections with the area edge, that is, the position where there is a large difference in the anomaly degree before and after is used as the judgment basis for the dual situation. The position where the difference in the anomaly degree before and after is small may be the internal position of the abnormal lesion area. Therefore, by judging the difference value of the anomaly degree value before and after each pixel point in this row , the change situation of the anomaly degree of the pixel points is quantified, which is convenient for subsequent positioning of the abnormal pixel points.

[0062] In order to obtain the starting point and ending point of each row of the lesion area, first subtract the gray anomaly degree of the pixel point on the left side of the same row of each pixel point from the gray anomaly degree of the pixel point on the right side of the same row to obtain the difference value of each pixel point in the skin image to be recognized.

[0063] The calculation formula for the difference value of each pixel point in the skin image to be recognized is:

[0064]

[0065] Among them, represents the difference value of the th pixel point; represents the coordinate of the th pixel point in the skin image to be recognized; represents the gray anomaly degree of the pixel point on the right side of the same row of the th pixel point; represents the gray anomaly degree of the pixel point on the left side of the same row of the th pixel point, and calculate the difference value of each pixel point in each row of the skin image to be recognized;

[0066] Among them, in the calculation formula for the difference value of each pixel point in the skin image to be recognized, subtracting the gray anomaly degree of the pixel point on the left side of the same row of each pixel point from the gray anomaly degree of the pixel point on the right side of the same row to obtain the difference value of each pixel point in the skin image to be recognized is because for the edge pixel points of the lesion area, the gray anomaly degrees of the pixel points on the left and right sides of the edge pixel points will change suddenly. Based on this, the pixel points with a large difference in the gray anomaly degree can be screened out as edge points.

[0067] S4. Obtain the average value of the absolute differences of the pixel points in each row of the skin image to be recognized. Select the pixel points in each row whose absolute difference values are greater than the average value of the absolute difference values of that row as edge points, and classify the edge points into starting points and ending points according to the positive or negative of the corresponding difference values of the edge points.

[0068] Since the larger the difference value corresponding to each pixel point, the greater the difference in the gray-scale abnormality degree of the pixel points on the left and right sides when taking this pixel point as the central pixel point. Based on this, the pixel points with a large difference in the gray-scale abnormality degree can be screened out as edge points, and then the starting points and ending points are selected from the edge points.

[0069] After obtaining the difference values of the pixel points in each row, sort the difference values of the pixel points in each row in the order from left to right to obtain the difference value sequence of each row , and set hyperparameters for partitioning. The hyperparameter is the average value of the absolute difference values of the pixel points in each row , select of the pixel points as edge points. The edge points are the starting points and ending points of the possible abnormal positions.

[0070] The step of classifying the edge points into starting points and ending points according to the positive or negative of the corresponding difference values of the edge points includes: taking the edge points with negative difference values as starting points and the edge points with positive difference values as ending points; since for the starting point at the edge of the lesion area, the left side is the normal skin area and the right side is the lesion area, the gray-scale abnormality degree of the pixel points in the normal skin area is small, while the gray-scale abnormality degree of the pixel points in the lesion area is large. When subtracting the gray-scale abnormality degree of the pixel points on the right side of the same row from the gray-scale abnormality degree of the pixel points on the left side of the same row in the skin image to be recognized, the obtained difference value is negative; similarly, for the ending point at the edge of the lesion area, the left side is the lesion area and the right side is the normal skin area. When subtracting the gray-scale abnormality degree of the pixel points on the right side of the same row from the gray-scale abnormality degree of the pixel points on the left side of the same row in the skin image to be recognized, the obtained difference value is positive. Therefore, take the edge points with negative difference values as starting points and the edge points with positive difference values as ending points.

[0071] S5. Mark the pixel points located between the starting point and the ending point as pixel points to be enhanced in the order from the starting point to the ending point.

[0072] The step of marking the pixel points between the starting point and the end point as the pixel points to be enhanced in the order from the starting point to the end point includes: starting from the first starting point of each row, traversing from left to right until another starting point appears, and stopping the traversal, and taking all the traversed end points as the end points to be matched; calculating the third difference between the absolute value of the difference value of the first starting point and the absolute value of the difference value of each end point to be matched, and taking the end point to be matched with the smallest third difference as the final matching end point; pairing the first starting point with the final matching end point to obtain a group of start and end points, starting from another starting point in the same row to traverse to obtain another group of start and end points, and similarly obtaining multiple groups of start and end points in the same row; marking the pixel points between the multiple groups of start and end points in the same row as the pixel points to be enhanced.

[0073] like Figure 2 As shown in FIG. 1 , if the corresponding difference values ​​of the edge points selected in step S4 are -15 and 18, it can be inferred that the curve The position indicates the previous pixel The value is slightly lower than A smaller value means that the grayscale anomaly at the latter point is more severe, which may be the starting point of the area that needs to be enhanced.

[0074] The curve is The position indicates the previous pixel The value is slightly lower than A larger value indicates that the grayscale abnormality of the previous point is more severe, which may be the end point of the edge of the area that needs to be enhanced. The position represents the left edge of the lesion area in this row; for the end point, it is the point where the downward change occurs. The position area represents the right edge of the lesion area, based on which the starting and ending points of the lesion area of ​​the row can be located.

[0075] If the number of start and end points selected for a row is different:

[0076] For example, if the difference value of a row of pixels is sequence for:

[0077]

[0078] The starting points in the row are selected as -18 and -20, and the ending points in the row are selected as 14, 15, and 21. Then the number of starting points and ending points is not equal, that is, there may be noise points, and the noise points cannot be matched; the step of pairing all the starting points and ending points of each row to obtain multiple groups of starting and ending points includes traversing from the first starting point of each row from left to right until another starting point appears, then the points that can match the first starting point -18 are 14 and 15, which are both ending points to be matched.

[0079] Calculate the difference between the absolute value of the first starting point difference value and the absolute value of each difference value of the termination points to be matched. The absolute value difference between the starting point and the 14th position is ; the absolute value difference between the starting point and the 15th position is ; then the first -18th position is the starting point. First, select the 15th position with the smallest absolute value difference as the final matching termination point; similarly, obtain multiple sets of starting and ending points in the same row.

[0080] Mark the pixel points within the range between the starting and ending points of each group in the same row as 1, and mark the pixel points outside the starting and ending point range in that row as 0, and judge each row in the skin image to be recognized.

[0081] S6. Form multiple regions to be enhanced from all the pixels to be enhanced, and calculate the enhancement degree of each region to be enhanced according to the gray - level abnormality degree of all the pixels to be enhanced in each region to be enhanced.

[0082] The steps of calculating the enhancement degree of each region to be enhanced include: obtaining the gray - level abnormality degree and value of all the pixels to be enhanced in each region to be enhanced; obtaining the total number of pixels to be enhanced in each region to be enhanced; taking the normalized value of the ratio of the gray - level abnormality degree and value to the total number as the enhancement degree of each region to be enhanced.

[0083] After obtaining all the pixels to be enhanced, form multiple regions to be enhanced from all the pixels to be enhanced. As Figure 4 shown, it is a schematic diagram of the binary image of the region to be enhanced in the present invention; after obtaining all the regions to be enhanced, the difference degree between each region and its surrounding area is different, representing different severity levels of the lesion area of the patient's skin. The gray - level abnormality degree between the two and the normal skin surface Calculate the regions with the possibility of enhancement of the enhancement degree , and evaluate the enhancement degree of each region.

[0084] The calculation formula for the enhancement degree of each region to be enhanced is:

[0085]

[0086] Among them, represents the enhancement degree of the th region to be enhanced; represents the gray - level abnormality degree of the rd pixel point in the th region to be enhanced; represents the total number of pixel points in the th region to be enhanced; represents the existing normalization function.

[0087] In the calculation formula for the enhancement degree of each area to be enhanced, is the average value of the abnormal degree of the gray values of the pixel points in area , representing the overall abnormal degree of the pixel points in area . The larger this value is, the more abnormal the pixel points in area are, and the more likely area is to be the target area that needs to be enhanced. Through the function for normalization, the data falls into the interval.

[0088] S7. Calculate the contrast difference between each area to be enhanced and the skin image to be recognized. From the enhancement degree and the contrast difference of each area to be enhanced, calculate the contrast increment of each area to be enhanced.

[0089] Obtain the contrast of the skin image to be recognized and the contrast of the area to be enhanced, and calculate the contrast difference between each area to be enhanced and the skin image to be recognized.

[0090] In the skin image to be recognized, the gray value of the severe lesion area is quite different from that of the normal skin tissue, and its contour edge can be clearly judged. For the mild lesion area, it is closer to the normal skin tissue; the severe lesion area requires a longer irradiation time than the mild lesion area. However, if the irradiation time is further extended after the mild lesion area has received sufficient irradiation time, it will cause damage to other skin tissues. Therefore, the lesion of the mild lesion area limits the irradiation time of phototherapy. In the present invention, the contrast of each area to be enhanced is obtained. Since the contrast of the mild lesion area is small while the contrast of the severe lesion area is large, the present invention can identify the mild lesion area and the severe lesion area according to the contrast.

[0091] At the same time, because the color difference between the mild lesion area and the normal skin is small, it is difficult to obtain a clear boundary of the mild lesion area. The mild lesion area needs to be strengthened more on the image than the severe lesion area to achieve the purpose of highlighting it from the image; the contrast represents the difference between the darkest black and the brightest white between areas. Enhancing the contrast is more intuitive for the performance of the image than directly enhancing the gray scale.

[0092] The steps for calculating the contrast increment of each area to be enhanced include: multiplying the contrast difference between each area to be enhanced and the skin image to be recognized by the enhancement degree of the corresponding area to be enhanced as the contrast increment of this area to be enhanced.

[0093] Calculate the contrast increment of each area to be enhanced , so as to enhance this area, and calculate the area The contrast increment of the formula for calculating the contrast increment of the

[0094]

[0095] where represents the contrast increment of the th region to be enhanced; represents the contrast of the skin image to be recognized; represents the contrast of the region to be enhanced.

[0096] In the formula for calculating the contrast increment of each region to be enhanced where represents the contrast difference between the th region to be enhanced and the skin image to be recognized. The larger this value is, the greater the amount of regional contrast enhancement. By weighting, it represents enhancing both the enhancement degree and the contrast enhancement amount. For slightly diseased regions, their original contrast is relatively low. By weighting the enhancement amount with the enhancement degree, the contrast after enhancement is made larger than the original, indicating that slightly diseased regions have been more importantly enhanced.

[0097] S8. Based on the contrast of each region to be enhanced, add the contrast increment to enhance each region to be enhanced to obtain the enhanced image.

[0098] After obtaining the contrast increment of each region to be enhanced, based on the contrast of each region to be enhanced, add the contrast increment to enhance each region to be enhanced to obtain the enhanced image.

[0099] S9. Identify the diseased regions in the enhanced image.

[0100] Through step S8, the enhanced image is obtained. In the enhanced image, the image of the diseased region has been specifically enhanced compared to before processing. After obtaining the enhanced image, use existing technologies to identify the diseased regions.

[0101] The data processing method for assisting in the detection of lesion regions in skin images provided by the present invention, when enhancing the skin image to be recognized, calculates the gray-scale abnormality degree of each pixel point in the skin image to be recognized according to the frequency of occurrence of the gray-scale value corresponding to each pixel point in the skin image to be recognized, and identifies the boundary of the region to be enhanced according to the gray-scale abnormality degree of each pixel point. After accurately identifying the boundary of the region to be enhanced, the contrast of each region to be enhanced is enhanced to obtain the enhanced image, achieving the accurate identification of the lesion region in the enhanced image.

[0102] The foregoing are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A data processing method for assisting the detection of lesion areas in skin images, characterized in that: The method includes: Acquire a skin image to be identified; According to the frequency of occurrence of the grayscale value corresponding to each pixel in the skin image to be identified, the grayscale abnormality degree of each pixel in the skin image to be identified is calculated, the grayscale abnormality degree of the target pixel in the skin image to be identified is the third ratio, the target pixel is any pixel in the skin image to be identified, the third ratio is the ratio between the first difference and the second difference, the first difference is the difference between the maximum ratio and the second ratio, the second difference is the difference between the maximum ratio and the minimum ratio, the maximum ratio is the maximum value of all the first ratios, the minimum ratio is the minimum value of all the first ratios, the first ratio is the ratio between the number of pixels in the skin image to be identified that have the same grayscale value as each pixel and the total number of pixels in the skin image to be identified, and the second ratio is the ratio between the number of pixels in the skin image to be identified that have the same grayscale value as the target pixel and the total number of pixels in the skin image to be identified; The difference in grayscale abnormality between each pixel in the skin image to be identified and the pixels on the left and right sides of the same row is used as the difference value of each pixel in the skin image to be identified; Obtain the mean absolute value of the difference values ​​of each row of pixels in the skin image to be identified, select the pixels in each row whose absolute value of the difference value is greater than the mean absolute value of the difference value of the row as edge points, and divide the edge points into starting points and ending points according to the positive and negative corresponding difference values ​​of the edge points; Mark the pixels between the starting point and the ending point as pixels to be enhanced in the order from the starting point to the ending point; All the pixels to be enhanced form a plurality of regions to be enhanced, and according to the grayscale abnormality of all the pixels to be enhanced in each region to be enhanced, the enhancement degree of each region to be enhanced is calculated; Calculate the contrast difference between each area to be enhanced and the skin image to be identified, and calculate the contrast increment of each area to be enhanced based on the enhancement degree and the contrast difference of each area to be enhanced; A contrast increment is added based on the contrast of each area to be enhanced, and each area to be enhanced is enhanced to obtain an enhanced image; Identify the lesion area in the enhanced image.

2. The data processing method for assisting the detection of lesion areas in skin images according to claim 1, characterized in that: The steps for calculating the difference value of each pixel in the skin image to be identified include: The grayscale abnormality level of the pixel on the left side of each pixel in the skin image to be identified is subtracted from the grayscale abnormality level of the pixel on the right side of the same row to obtain the difference value of each pixel in the skin image to be identified.

3. The data processing method for assisting the detection of lesion areas in skin images according to claim 2, characterized in that: The steps of dividing the edge points into starting points and ending points according to the positive and negative values ​​of the corresponding difference values ​​of the edge points include: The edge points with negative difference values ​​are taken as the starting points, and the edge points with positive difference values ​​are taken as the ending points.

4. The data processing method for assisting the detection of lesion areas in skin images according to claim 1, characterized in that: The step of marking the pixels between the starting point and the ending point as pixels to be enhanced in the order from the starting point to the ending point comprises: Start from the first starting point of each row and traverse from left to right until another starting point appears, and stop traversing. All the traversed end points are used as the end points to be matched; Calculate the third difference between the absolute value of the difference value of the first starting point and the absolute value of the difference value of each to-be-matched termination point, and take the to-be-matched termination point with the smallest third difference as the final matching termination point; Pair the first starting point with the final matching ending point to get a set of starting and ending points, and traverse from another starting point in the same row to get another set of starting and ending points. Similarly, get multiple sets of starting and ending points in the same row. The pixels between multiple groups of start and end points in the same row are marked as pixels to be enhanced.

5. The data processing method for assisting the detection of lesion areas in skin images according to claim 1, characterized in that: The steps of calculating the enhancement degree of each area to be enhanced include: Obtain the grayscale abnormality degree and value of all pixels to be enhanced in each area to be enhanced; Obtain the total number of pixels to be enhanced in each area to be enhanced; The normalized value of the ratio of the grayscale abnormality level and value to the total number is used as the enhancement degree of each area to be enhanced.

6. The data processing method for assisting the detection of lesion areas in skin images according to claim 1, characterized in that: The steps of calculating the contrast increment of each area to be enhanced include: The product of the contrast difference between each region to be enhanced and the skin image to be identified and the enhancement degree of the corresponding region to be enhanced is taken as the contrast increment of the region to be enhanced.

Citation Information

Patent Citations

  • Mining intelligent water pump impeller fault image detail enhancement method

    CN117437129A

  • Apple quality analysis and evaluation method based on image recognition

    CN118691690A