A method and system for detecting scar areas in skin plastic surgery data

CN122714366APending Publication Date: 2026-09-08THE FIRST AFFILIATED HOSPITAL ZHEJIANG UNIV COLLEGE OF MEDICINE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610861206.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

[0004]针对现有技术因视场范围限制难以同时兼顾疤痕的全局定位与局部精细分析进而影响评估结果可靠性的问题,本发明提供一种皮肤整形数据的疤痕区域检测方法及系统

Benefits of technology

[0020] 1. This application combines clinical wide-area images with dermoscopic images through cross-scale alignment and blind source separation, ensuring accurate localization and precise assessment of scar areas at both global and local scales, thereby improving the accuracy and robustness of detection. In addition, by decomposing the global pigment component map and the local pigment component map, pigment information can be effectively separated from morphological information, thus solving the mutual interference between color abnormalities and depression changes, and improving the accuracy of type discrimination and depth assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122714366A_ABST
    Figure CN122714366A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for scar region detection in dermatological plastic surgery data, relating to the field of image detection. The method includes: acquiring a clinical wide-area image and a dermoscopic dual-frame image of the region to be evaluated; determining the region of interest (ROI) in the clinical wide-area image based on the dermoscopic image; subsequently performing blind source separation on the ROI and the dermoscopic image to decompose them into corresponding global pigment component maps and local pigment component maps; obtaining a scar mask by locally correcting the global pigment component map using the local pigment component map, thereby obtaining the scar type; calculating the initial depth response of the dermoscopic image, correcting the initial depth response using the local pigment component map, and obtaining the depth level by referring to the corresponding level mapping relationship; fusing the depth level and scar type using consistency rules to obtain the evaluation result and output it. This application can effectively separate pigment information from morphological information, solve the mutual interference between color abnormalities and depression changes, and improve the evaluation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of scar image detection technology, specifically to a method and system for detecting scar areas in skin plastic surgery data. Background Technology

[0002] Skin scars are a common outcome of wound healing. With the development of dermatologic plastic surgery, cosmetic medicine, and postoperative follow-up management, how to objectively, stably, and quantitatively detect and evaluate scar areas has become an important technical issue in clinical diagnosis and treatment and efficacy assessment. Due to the advantages of dermoscopy images, such as high magnification and good reflection suppression, some existing techniques utilize this image for skin scar analysis. Using a single dermoscopy image, local analysis of scars or pigmented lesions is performed, typically focusing on color, blood vessels, or surface texture features, conducting feature analysis, and providing detection results.

[0003] However, relying solely on dermoscopic images is limited by a small field of view, making it difficult to reflect the spatial location and global characteristics of scars within the overall skin area. This results in detection results that are unsuitable for follow-up and overall assessment after plastic surgery. Furthermore, due to the small field of view of dermoscopic images, the local limitation increases the misjudgment rate for color darkening caused by pigmentation and shadow changes caused by depressions or morphological changes. It is difficult to accurately distinguish the influence of color and morphological factors on the image, potentially leading to contradictory results between type identification and morphological assessment. This increases the difficulty of clinical interpretation and fails to meet the needs of the fields of dermatological plastic surgery and medical aesthetics for objective and consistent assessment results. Summary of the Invention

[0004] To address the problem that existing technologies, due to limitations in the field of view, cannot simultaneously achieve both global scar localization and detailed local analysis, thus affecting the reliability of evaluation results, this invention provides a scar area detection method and system for skin plastic surgery data.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] In a first aspect, this application discloses a method for detecting scar areas in skin plastic surgery data, comprising the following steps:

[0007] Acquire clinical wide-field images and dermoscopic images of the area to be evaluated; wherein, the dermoscopic images are two-frame images taken from different illumination directions within the same field of view;

[0008] After preprocessing and cross-scale alignment of the clinical wide-field image and the dermoscopy image, the region of interest of the clinical wide-field image is determined based on the dermoscopy image. Then, blind source separation is performed on the region of interest and the dermoscopy image respectively to decompose and obtain the corresponding global pigment component map and local pigment component map.

[0009] A reference threshold is obtained by performing normal skin band statistics on the region of interest. Candidates with values ​​higher than the reference threshold are selected from the global pigment component map and locally corrected by the local pigment component map to obtain a scar mask. The pigment component index of the scar mask is calculated, and the scar type is determined based on the calculation result and the preset first threshold.

[0010] The differential shadow and gradient projection consistent with the illumination direction of the dermoscopy image are calculated and weighted to obtain the initial depth response. Then, the initial depth response is corrected by the local pigment component map, and the corrected depth response is referenced to the corresponding level mapping relationship to obtain the depth level.

[0011] The depth level and scar type are fused using a consistency rule to obtain the evaluation result and output it.

[0012] Secondly, this application introduces a scar area detection system for skin plastic surgery data, including an image acquisition module, a decomposition module, a type discrimination module, a depth discrimination module, and an evaluation output module.

[0013] The image acquisition module is used to acquire clinical wide-field images and dermoscopic images of the area to be evaluated; wherein, the dermoscopic images are two-frame images taken from different illumination directions under the same field of view;

[0014] The decomposition module is used to preprocess and perform cross-scale alignment on the clinical wide-area image and the dermoscopy image. Based on the dermoscopy image, the region of interest of the clinical wide-area image is determined. Then, blind source separation is performed on the region of interest and the dermoscopy image respectively to decompose the corresponding global pigment component map and local pigment component map.

[0015] The type discrimination module is used to perform normal skin band statistics on the region of interest to obtain a reference threshold, filter candidates that are higher than the reference threshold from the global pigment component map, and perform local correction on the candidates through the local pigment component map to obtain a scar mask. The pigment component index is calculated on the scar mask, and the scar type is determined based on the calculation result and the preset first threshold.

[0016] The depth discrimination module is used to calculate the differential shadow and gradient projection consistent with the illumination direction of the dermoscopy image, and weighted fusion to obtain the initial depth response. Then, the initial depth response is corrected by the local pigment component map, and the corrected depth response is referenced to the corresponding level mapping relationship to obtain the depth level.

[0017] The assessment output module is used to fuse depth level and scar type according to consistency rules to obtain assessment results and output them.

[0018] Thirdly, this application introduces a computer terminal, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the scar area detection method for skin plastic surgery data as described above.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0020] 1. This application combines clinical wide-area images with dermoscopic images through cross-scale alignment and blind source separation, ensuring accurate localization and precise assessment of scar areas at both global and local scales, thereby improving the accuracy and robustness of detection. In addition, by decomposing the global pigment component map and the local pigment component map, pigment information can be effectively separated from morphological information, thus solving the mutual interference between color abnormalities and depression changes, and improving the accuracy of type discrimination and depth assessment.

[0021] 2. This application, through a consistency rule fusion mechanism, can unify and merge scar type determination and depth assessment results, avoiding the problem of contradiction between type and depth determination, ensuring the consistency and interpretability of the final assessment results, and improving the reliability of clinical operation. Attached Figure Description

[0022] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein:

[0023] Figure 1 This is a flowchart of a scar area detection method for skin plastic surgery data as described in Embodiment 1 of the present invention;

[0024] Figure 2 Based on Figure 1 A logic diagram of a scar area detection method for skin plastic surgery data;

[0025] Figure 3 Based on Figure 1 A flowchart illustrating the process of performing normal skin band statistics on the region of interest to obtain a reference threshold;

[0026] Figure 4 Based on Figure 3 The flowchart describes how to filter candidates with higher than the reference threshold from the global pigment component map and perform local correction on the candidates using the local pigment component map to obtain the scar mask.

[0027] Figure 5 Based on Figure 1 A flowchart for dynamically adjusting the boundaries of the scar mask;

[0028] Figure 6This is a block diagram of a scar area detection system for skin plastic surgery data, as described in Example 2.

[0029] Figure 7 This is a schematic diagram of the structure of a computer terminal as described in Example 3. Detailed Implementation

[0030] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.

[0031] In existing technologies, the core challenge in skin scar assessment lies in data fragmentation and feature obfuscation: single clinical wide-area images lack microscopic texture details, while traditional dermoscopy images struggle to provide reliable depth information. This makes scar area detection susceptible to interference from natural skin pigmentation and photographic shadows, resulting in inaccurate segmentation. Simultaneously, the determination of scar type (pigmented) and physical morphology (concavity / convexity) are isolated from each other, lacking collaborative analysis methods that can simultaneously resolve pigment deposition and three-dimensional morphology. Ultimately, this leads to automated assessments being one-dimensional and having low reliability.

[0032] To address the aforementioned issues, this application proposes a design scheme centered on macro-micro dual-image collaboration and texture-depth dual-information decoupling. On one hand, global and local pigment features are decoupled from wide-area and dermoscopic images, respectively, and these features are cross-verified and corrected to jointly generate the scar type. On the other hand, the initial depth is estimated by calculating its inherent differential shadow and gradient projection, and this depth estimate is cleverly corrected using the decoupled local pigment component map, thereby eliminating the deceptive influence of pigment distribution on depth perception. Finally, the scar type and depth level, independently derived from the pigment and geometric channels respectively, are fused using medical knowledge-based consistency rules to output a multi-dimensional, collaborative, and cross-verified comprehensive evaluation result. This achieves collaborative, mutually verifying, and unified evaluation of scar region color and morphological information, improving the accuracy, stability, and clinical usability of the detection results.

[0033] After introducing the basic concept of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0034] Example 1

[0035] like Figure 1 and Figure 2 The diagram illustrates a method for detecting scar areas in skin plastic surgery data, including the following steps:

[0036] S100. Acquire a clinical wide-field image and a dermoscopic image of the region to be evaluated; wherein the dermoscopic image is a two-frame image obtained by taking pictures of different illumination directions under the same field of view;

[0037] S200. After preprocessing and cross-scale alignment of the clinical wide-area image and dermoscopy image, the region of interest of the clinical wide-area image is determined based on the dermoscopy image. Then, blind source separation is performed on the region of interest and the dermoscopy image respectively to decompose and obtain the corresponding global pigment component map and local pigment component map.

[0038] S300. Perform normal skin band statistics on the region of interest to obtain a reference threshold, filter candidates higher than the reference threshold from the global pigment component map and perform local correction on the candidates through the local pigment component map to obtain a scar mask, calculate the pigment component index of the scar mask, and determine the scar type based on the calculation result and the preset first threshold.

[0039] S400. Calculate the differential shadow and gradient projection consistent with the illumination direction of the dermoscopy image, and weightedly fuse them to obtain the initial depth response. Then, correct the initial depth response through the local pigment component map, and obtain the depth level by referring to the corresponding level mapping relationship of the corrected depth response.

[0040] S500. The depth level and scar type are fused using a consistency rule to obtain the evaluation result and output it.

[0041] In step S100, the acquisition of the clinical wide-area image Ic is performed using a mobile terminal camera or a clinical camera, covering at least the entire scar area and the normal skin extending beyond the scar boundary (to form a statistically significant ring area). During acquisition, the viewing angle should be as perpendicular as possible to the skin surface, and shooting parameters such as resolution, focal length, exposure, and shooting timestamp should be recorded.

[0042] To facilitate alignment between the clinical wide-field image Ic and the dermoscopic image Id, before taking the image, an identifiable positioning marker (such as a color sticker or a geometric pattern sticker) is attached to the normal skin near the scar. The clinical wide-field image includes this positioning marker, which is located in a position that can be covered or partially covered by the dermoscopic lens, ensuring that the edge of the positioning marker or part of the pattern enters the dermoscopic field of view.

[0043] Place the dermoscope over the scar area, ensuring that the dermoscope's imaging field of view covers typical areas of the scar (such as incision lines, areas of concentrated pigmentation, or areas of significant depression), while also including at least a small amount of surrounding normal skin (for local thresholding / correction of the dermoscope). Fix the relative position of the dermoscope and the skin, and define the dermoscope image as... .

[0044] The illumination direction set is defined to include at least two different directions, L1 and L2, such as the light sources in opposite quadrants of an LED ring. Without moving the dermoscope or changing the focal length and field of view, illumination in direction L1 is activated, and the first frame of the dermoscope image (Id1) is acquired. Then, illumination in direction L2 is switched, and the second frame of the dermoscope image (Id2) is acquired. Illumination direction information from both frames is recorded, such as direction identifiers, resolution, and timestamps. Furthermore, acquisition-side constraints are applied to ensure consistency between the two frames, with the time interval between the two frames not exceeding a preset threshold (50~200ms) to reduce the impact of movement changes. The exposure parameters of the two frames are also kept as consistent as possible, or differences are recorded for subsequent normalization.

[0045] For dermoscopic images Id1, Id2 and clinical wide-area images Ic, acquisition quality can be verified. For example, whether the scar area in the clinical wide-area image Ic is completely covered and whether there is large-area overexposure, and whether there is large-area reflection occlusion or obvious motion blur in dermoscopic images Id1 and Id2. If any condition is not met, the corresponding image can be prompted to be reacquired.

[0046] In step S200, preprocessing operations such as white balance correction, brightness normalization, reflection suppression, and noise suppression are performed on the clinical wide-area image Ic. Preprocessing operations such as brightness consistency normalization and reflection suppression are performed on the dermoscopic images Id1 and Id2. Brightness consistency normalization specifically involves converting Id1 and Id2 to Lab or YCbCr, extracting the brightness channel, and performing mean / histogram matching to reduce exposure differences.

[0047] Detecting localization patch feature set in preprocessed wide-area clinical images Ic Detect the localization feature point set in the preprocessed dermoscopy image Id1 or Id2 ,Establish and The correspondence is determined. Before formally solving the mapping, obviously erroneous or falsely detected localization markers are removed to improve model stability. Specifically, it is determined whether the number of corresponding point pairs N meets the minimum requirement, i.e., N≥3. If not, a re-collection is prompted. Simultaneously, the relative distance ratio between corresponding points on the dermoscope end is calculated and compared with the ratio of corresponding points on the clinical end. If the ratio difference exceeds a preset range of 30%, it is judged as an abnormal match point and is not included in subsequent estimation.

[0048] Using an affine transformation model, at the corresponding point set { ↔ Randomly select the smallest sample set in} to estimate the candidate mapping model. Substitute all corresponding points Calculate the reprojection error: If reprojection error If the error is less than a preset error threshold (3–8 pixels, adjusted according to resolution), it is considered an interior point. The number of interior points and the average error are counted and used as the model scoring metric. The above sampling and estimation process is repeated until the required number of iterations or confidence level is reached. The model with the largest number of interior points and the smallest average error is selected as the final mapping model. In practical applications, for For each pixel coordinate (u, v) in the image, apply a mapping model. The projection area of ​​the dermoscopic ROI in the clinical image coordinate system is obtained. The projected coordinate set is rasterized to form a binary mask. Closure operations or hole-filling are then performed on the mask edges to ensure... Continuous and complete.

[0049] Compare The consistency of the spatial distribution of clinical image texture with dermoscopy image texture, and the examination If the alignment fails, the alignment is marked as failed and a re-acquisition is triggered. If the alignment passes, the mapping model is output. as well as .

[0050] by As the core area of ​​a clinical ROI, its outer expansion creates a buffer zone. (Ensure that the boundaries and normal skin are included): ,in, Indicates the outer radius.

[0051] Take the preprocessed wide-area clinical image Ic in For a set of pixels, perform a color space transformation, specifically, convert from RGB space to an intermediate representation for pigment decomposition, preferably performing an optical density (OD) transformation:

[0052] ;

[0053] Wherein, OD represents optical density. Indicates pixel channel intensity; For normalized reference values ​​(such as 1 or 255); A tiny constant to prevent logarithmic overflow.

[0054] Blind source separation of optical density (OD) can be performed using the ICA (Independent Color Allocation) method, which treats the OD vector as a multidimensional mixed signal and separates it into several statistically independent components. Alternatively, non-multiplexed matrix factorization (NMF) or binary or multivariate decomposition models based on optical density can be used. Based on the response characteristics of the separated components in each color channel, the separation results are semantically annotated, and components matching the absorption characteristics of melanin are mapped to a global melanin component map. Components that match the absorption characteristics of hemoglobin are mapped to a global hemoglobin component map. Then the component image is mapped back to Spatial location, for , After performing amplitude normalization, the global pigment component map is obtained. , .

[0055] From Id1 and Id2, select the frame with the smaller reflective area, or perform a weighted average or robust fusion on the two frames and select the fused frame. Apply the same method as for the clinical wide-field image Ic to the selected image to obtain the local melanin component map. Local hemoglobin content diagram After performing amplitude normalization, the local pigment component map is obtained. , .

[0056] To facilitate subsequent local correction and consistency fusion, the local component maps are projected onto clinical coordinates:

[0057] .

[0058] The obtained global pigment component map and local pigment component map are used in subsequent steps.

[0059] In step S300, as Figure 3 As shown, the specific steps for obtaining the reference threshold by performing normal skin ring statistics on the region of interest are as follows:

[0060] S301. Construct a skin ring at the outer edge of the region of interest according to a preset length, and determine whether the skin ring has continuous texture and uniform color. If so, it is considered a normal skin ring.

[0061] The buffer band constructed as described above The region is constructed with a width of [missing information]. Skin rings: ; This represents the outer radius. After removing invalid pixels from the skin ring, two metrics are calculated: texture continuity and color uniformity, and compared with a threshold.

[0062] Specifically, the brightness gradient direction is calculated within the effective skin ring, and the gradient direction dispersion is obtained by circular statistics as a direction consistency index. The edge map is then analyzed for connectivity to obtain the breakage rate. When the direction dispersion is less than the first texture threshold and the breakage rate is less than the second texture threshold, the ring texture is determined to be continuous.

[0063] Fracture rate The calculation formula is: Where j represents the j-th edge connected region detected within the skin ring region; This represents the length of the j-th edge connected component (the number of edge pixels); This represents the minimum effective connectivity threshold, which is set proportionally to the skin ring width. Indicates the total number of edge connected components; This represents the zero-constant. When the fracture rate... Approximately 0 indicates that the edge structure is mainly composed of continuous long edges, and the overall texture is continuous; when the breakage rate is close to 0, it indicates that the edge structure is mainly composed of continuous long edges, and the overall texture is continuous; A value close to 1 indicates that the texture is discontinuous or affected by scars, hair, noise, etc.

[0064] The first texture threshold and the second texture threshold can be set empirically or based on historical data. In this embodiment, the range of the first texture threshold is set to 0.2–0.6, preferably 0.3–0.5. The range of the second texture threshold is 0.2–0.7, preferably 0.3–0.6.

[0065] Color uniformity is determined by calculating the coefficient of variation (CV) within the skin rings, using the following formula:

[0066] ;

[0067] Indicates skin circumference Mean value of melanin content in the endothelium; Indicates skin circumference Standard deviation of melanin component; Indicates skin circumference Mean hemoglobin levels; Indicates skin circumference Standard deviation of hemoglobin levels; This represents the zero constant. The coefficient of variation represents the melanin component. The coefficient of variation represents the amount of hemoglobin.

[0068] The melanin uniformity threshold and the hemoglobin uniformity threshold both range from 0.1 to 0.6, with the melanin uniformity threshold preferably ranging from 0.2 to 0.4 and the hemoglobin uniformity threshold preferably ranging from 0.25 to 0.45. These thresholds are adaptively adjusted based on image resolution, skin band width, or historical statistical data.

[0069] When the coefficient of variation is below the corresponding color uniformity threshold, the skin ring color distribution is considered uniform. If both texture continuity and color uniformity are true, the current ring is defined as a normal skin ring.

[0070] S302. Otherwise, reconstruct a new skin ring at the outer edge of the skin ring until the new skin ring has a continuous texture and uniform color or reaches the maximum number of reconstructions.

[0071] If S301 determines that the current skin ring does not meet the requirements of texture continuity and color uniformity, then initialize the reconstruction calculation, reconstruct a new skin ring according to the set expansion step size. The expansion step size can be a fixed pixel value or set proportionally to the ring width and image resolution. Re-evaluate the texture continuity and color uniformity of the new skin ring. If the determination is true, output the reconstructed skin ring; otherwise, continue iterating until the maximum number of reconstructions is reached, which does not exceed 3.

[0072] S303. If the skin rings constructed by the maximum number of reconstructions still do not satisfy the requirements of texture continuity and color uniformity, then the constructed skin rings are sliced ​​and the segments that satisfy texture continuity and color uniformity are retained and merged into normal skin rings.

[0073] If the reconstructed skin ring still does not satisfy the requirements of texture continuity and color uniformity when the maximum number of reconstructions is reached, then the geometric center of the last skin ring is used as a reference, and the ring is divided into K fan-shaped segments according to the angle to obtain the segment set.

[0074] After removing reflections from each segment, the texture continuity and color uniformity indices are calculated using the same method as S301. If each segment meets the index conditions and is larger than the minimum effective area (5% to 30% of the total area of ​​the skin ring), then the segment is retained as a valid segment. All valid segments are then merged into a union, and hole filling and connectivity operations are performed to ensure the continuity of the statistical region, thus obtaining the normal skin ring.

[0075] S304. Calculate the mean melanin concentration in normal skin rings. Standard deviation and the mean value of hemoglobin Standard deviation The mean and standard deviation are combined to calculate the corresponding melanin reference threshold and hemoglobin reference threshold.

[0076] Among them, melanin reference threshold The calculation formula is: ;

[0077] hemoglobin reference threshold The calculation formula is: .

[0078] , This is an empirical coefficient, with a value range of 1 to 2.5.

[0079] By dynamically constructing skin rings at the outer edge of the region of interest and combining texture continuity and color uniformity discrimination mechanisms, adaptive screening and multiple reconstruction of normal skin regions can be achieved. Even in complex skin backgrounds, high-quality reference regions can still be obtained through slicing and fragment fusion, enabling individualized and adaptive pigment baseline modeling. This improves the stability and noise resistance of threshold calculation, provides a reliable benchmark for subsequent scar candidate region screening and type discrimination, reduces false positive and false negative rates, and improves the accuracy, consistency, and clinical usability of scar assessment results.

[0080] The above describes how to obtain the reference threshold, such as Figure 4 As shown, the specific steps for obtaining a scar mask by filtering candidates with values ​​higher than the reference threshold from the global pigment component map and performing local correction on the candidates using the local pigment component map are as follows:

[0081] S311. Select pigmentation candidates and redness candidates that are higher than the melanin reference threshold and hemoglobin reference threshold from the global pigment component map, merge the two and perform morphological processing to obtain the global candidate mask.

[0082] From the global pigment component map , Filter out those greater than , The candidate colors and redness candidates are merged to form a global candidate mask. Closure operations, small connected component removal, and appropriate boundary dilation are then performed on these candidates to obtain the global candidate mask. .

[0083] S312. Select local candidate masks from the local pigment component map where the pigment and local texture variance all exceed the threshold, and calculate their confidence level.

[0084] Local pigment component map , In the process, pigments at the 85th to 95th percentiles are used as pigment thresholds. Pigments above the threshold are considered pigment candidates and discarded for reflection. Dermoscopic images are then obtained. Luminance channel in window Intra-texture local variance is calculated in dermoscopy images. The local texture variance median offset is used to obtain the local texture threshold. Pixels with local texture variance greater than the local texture threshold are used as texture candidates. The pigment candidates and texture candidates are combined to form a local candidate mask. .

[0085] For pixels in the local candidate mask, calculate pigment consistency confidence, texture consistency confidence, and reflection confidence. Pigment consistency confidence is used to characterize the significance of local pigment component anomalies, and texture consistency confidence is used to characterize the stability of local texture anomalies. By weighting and fusing the two and combining them with the reflection confidence factor, a comprehensive confidence Conf for local candidate correction is obtained.

[0086] The formula for calculating the confidence level of pigment consistency is: ;

[0087] , These represent the local melanin threshold and the local hemoglobin threshold, respectively, based on dermoscopy images. The statistical results of normal skin inside the body were obtained adaptively. Represents the pigment normalization scaling parameter, which is and In dermoscopy images Quantile difference within; Indicates the zero constant; This represents the truncation function.

[0088] The formula for calculating texture consistency confidence is: ;

[0089] in, Indicates local texture variance; Indicates the local threshold of the texture; This represents the texture normalization scale parameter.

[0090] The reflectivity confidence factor is calculated by taking the area ratio of the reflective region within the region of interest (ROI) and using the complement of this ratio as the reflectivity confidence factor. When the reflective region accounts for a smaller percentage of the ROI in the dermoscopy, the reflectivity confidence factor is larger, indicating less interference from reflections and more reliable imaging results in that region. Conversely, when the reflective region accounts for a larger percentage, the reflectivity confidence factor is smaller, indicating lower imaging reliability in that region.

[0091] S313. Based on confidence, the local candidate mask and the global candidate mask are weighted and fused to obtain the scar mask.

[0092] Combine confidence level and local candidate mask Project onto the clinical coordinate system, and define the weights in the clinical coordinate system. If the projected coordinates are located at Outside, the weight =0. If located at Inside, then weight ; This represents the overall confidence level projected onto the clinical coordinate system; Configure the lower / upper limits to prevent extreme weighting.

[0093] The local and global candidate masks are converted into probabilistic form and then fused.

[0094] ;

[0095] in, This represents a local candidate mask projected onto the clinical coordinate system.

[0096] Throttling yields the final scar mask: Threshold The value is 0.5.

[0097] Scar mask Internal statistical melanin intensity (Mean melanin content), hemoglobin intensity (Mean hemoglobin level). Simultaneously, the corresponding baseline value was recorded within the normal skin ring. , Construct the pigment component index:

[0098] ;

[0099] Calculate the red-black dominance ratio Its value range is approximately (-1, 1), which facilitates threshold discrimination.

[0100] The first threshold includes a red scar discrimination threshold and a black scar discrimination threshold. The red scar discrimination threshold ranges from 0.15 to 0.50, and the black scar discrimination threshold ranges from -0.50 to -0.15. If... If the value is greater than or equal to the red scar detection threshold, it is judged as a red scar; if If the value is less than or equal to the black scar detection threshold, it is judged as a black scar; if If the scar falls between the red scar discrimination threshold and the black scar discrimination threshold, it is classified as a mixed scar.

[0101] The global and local candidate masks are weighted and fused based on confidence level to achieve synergistic complementarity between macroscopic pigment distribution and microscopic texture features. This improves the boundary accuracy and regional integrity of the scar mask, reduces false candidates and missed detections, and enhances the accuracy, robustness and cross-scene generalization ability of scar region extraction. This provides a highly reliable input basis for subsequent scar type discrimination and depth assessment.

[0102] In step S400, the formula for calculating the differential shading of the preprocessed Id1 and Id2 is as follows:

[0103] ;

[0104] in, This represents the brightness value under dual illumination directions. In addition, by reducing the weight of reflective areas, the impact of overall brightness variation and specular reflection on differential shadow calculation can be effectively reduced.

[0105] exist Choose the frame with less reflection as the reference brightness frame. For the reference brightness frame Calculated using Sobel, Scharr, or other gradient operators Gradient components in the horizontal and vertical directions , forming gradient vector .

[0106] Map the illumination directions L1 and L2 to unit vectors of the image plane direction. , and gradient vector The dot product operation yields the gradient projection along the illumination direction. The absolute values ​​of these two projections are then superimposed, and the weighting of the reflective areas is reduced to obtain a gradient projection consistent with the illumination direction. .

[0107] Normalized and Weighted fusion yields the initial depth response. .

[0108] The specific steps for correcting the initial depth response using local pigment component maps are as follows:

[0109] Extract the hemoglobin layer and melanin layer from the local pigment component map, adjust the weight of differential shadows based on the hemoglobin layer, and construct a correction term for color pigmentation correction based on the melanin layer.

[0110] The initial depth response is corrected by combining the correction term and the adjusted weights to obtain the corrected depth response.

[0111] Normal skin sub-regions (e.g.) Baseline (mean) values ​​of hemoglobin and melanin were calculated separately for the marginal region. Then, the intensity of color abnormalities is constructed, where the intensity of hemoglobin abnormalities (indicator of inflammation / congestion) is: ;

[0112] Abnormal melanin intensity (chromic index): .

[0113] Set the base shadow weight based on experience. For example, setting it to 0.5 allows for the construction of pixel-level weighted modulation factors based on the intensity of hemoglobin abnormalities.

[0114] ;

[0115] in, ∈(0,1) is the inhibition coefficient.

[0116] A correction term for color correction was constructed based on the melanin layer. , This represents the color correction factor, ranging from 0.2 to 0.5.

[0117] Therefore, the corrected depth response is obtained as follows: .

[0118] It can correct the depth response Perform robust normalization, mapping to 0 to 1, to obtain a deep normalized value. Normalize the depth value The mapping relationship between depth levels can be found in the table below:

[0119] .

[0120] in, , , In this embodiment, to exclude noise and minor undulations, and to distinguish between perceptible and obvious depressions, the set of level mapping thresholds is set to 0.25, 0.45, and 0.7. This ultimately yields the depth levels. .

[0121] In step S500, the specific steps for fusing depth level and scar type using consistency rules to obtain the evaluation result are as follows:

[0122] The effective range of depth information of the region of interest is determined based on the corrected depth response of the dermoscopy image, and then the region of interest is divided into a depth evaluation region and a non-depth evaluation region.

[0123] In the depth assessment region, connected component segmentation is performed to obtain sub-regions. The scar type with the highest proportion in each sub-region is taken as the representative type. The depth level of the maximum modified depth response mapping of the sub-region is judged. If the maximum depth level exceeds the threshold, the sub-region is a concave representative type. If it does not exceed the threshold and is not zero, it is a transitional representative type. If the maximum depth level is zero, it is a flat representative type.

[0124] Furthermore, it will correct the depth response. Projecting onto the clinical coordinate system, we obtain Depth level Projecting onto the clinical coordinate system, we obtain .in, This represents the corrected depth response in clinical coordinates; Indicates the depth level projected onto the clinical coordinate system; This represents the mapping transformation from dermatoscopy to clinical practice.

[0125] In the clinical coordinate system, the validity of the amplitude of the corrected depth response is determined for each pixel location. When the corrected depth response value corresponding to the pixel is not less than a preset validity threshold, the depth information at that pixel is deemed valid and marked as a valid pixel. When the corrected depth response value is less than the validity threshold, the depth information at that pixel is deemed invalid. The validity threshold can be taken as the statistical quantile value of the corrected depth response within the dermoscopic projection area, for example, the 60th percentile value.

[0126] In the clinical coordinate system, the region of interest The system divides the region into depth evaluation areas and non-depth evaluation areas. When a pixel location belongs to a scar area and its corresponding depth information is deemed valid, the pixel location is included in the depth evaluation area. When a pixel location belongs to a scar area but its corresponding depth information is not valid, the pixel location is included in the non-depth evaluation area.

[0127] The depth assessment area is used to determine and grade the depth of scar depressions; the non-depth assessment area is only used to assess the color or type of scars and does not participate in the determination of depression depth, so as to avoid misjudgment due to unreliable depth information.

[0128] In the depth evaluation region, connective domains are marked (4-connected or 8-connected) to obtain a set of sub-regions. For each sub-region, area filtering is performed: if the area of ​​a sub-region is less than the minimum sub-region area threshold, the sub-region is considered to have no reliable evaluation significance, and the sub-region is deleted or merged into its adjacent sub-regions.

[0129] For the sub-regions filtered by area, the number of pixels of each type within the sub-region is counted, including the number of red scar pixels, black scar pixels, and mixed scar pixels. The ratios of these numbers to the total number of pixels in the sub-region are calculated, and the type with the highest ratio is selected as the representative type. If the difference between the highest and second-highest ratios is less than a threshold (e.g., 0.1), the representative type can be set to "mixed scar" to improve robustness.

[0130] Simultaneously, for each sub-region, the maximum corrected depth response value within that sub-region is obtained. The corrected depth responses of all pixel locations are compared, and the maximum value is selected as the maximum corrected depth response of that sub-region. Based on this, the depth level of the pixel location corresponding to the maximum corrected depth response is taken as the depth level of that sub-region, or the maximum value among the depth levels of all pixels within the sub-region is directly selected as the depth level of that sub-region. Preferably, the maximum depth level within the sub-region is used as the depth level of the sub-region to improve the robustness of the evaluation results.

[0131] The consistency rules that are integrated into the specific rules to be executed include:

[0132] 1. When the depression depth of a scar area is zero, and the scar area shows obvious abnormalities in color composition, the scar area is determined to be a color-dominant flat scar based on the dominant component of the color abnormality. If the abnormal melanin component is dominant, it is a pigmented flat scar; if the abnormal hemoglobin component is dominant, it is a redness / inflammation-dominant flat scar.

[0133] 2. When the depth of the scar area is not lower than the depth grade threshold, the scar area is classified as a depressed scar. Further classification is based on whether the color composition of the scar area is significantly abnormal, distinguishing between color-related depressed scars and shape-dominant depressed scars. If redness or pigmentation is significant, it is a red / black-dominant depressed scar; if the color composition is close to normal, it is a shape-dominant depressed scar (mature stage, atrophic scars, etc.).

[0134] 3. When the depression depth level of the scar area is greater than zero and lower than the depth level threshold, and there is abnormal color composition at the same time, the scar area is judged as a transitional scar with the combined effect of color and shape.

[0135] In addition, if the depth of the scar area is below the depth level threshold and there is no obvious color abnormality, it is classified as a flat / transitional scar without obvious abnormalities.

[0136] In this embodiment, the depth level threshold can be set to Level 2.

[0137] The final evaluation results use connected sub-regions as the basic output unit, providing representative scar types and corresponding depth levels for each sub-region. At the same time, the evaluation results of sub-regions within the region of interest are summarized to obtain the overall evaluation results at the region of interest level.

[0138] The summary results include: the maximum depth grade of all sub-regions as the depth grade of the scar area, the area ratio of each type of sub-region, the number and total area of ​​depressed sub-regions and / or the overall ROI assessment label.

[0139] The main scheme of this application has been introduced above. The following section describes the dynamic adjustment of the scar mask's boundary before calculating the pigment component index. Figure 5 As shown, the specific steps are as follows:

[0140] S701. Perform dilation and erosion operations on the scar mask boundary a preset number of times and take the difference to obtain the boundary band. Calculate the extreme response values ​​of the pixels in the boundary band in the multi-scale space as the optimal scale.

[0141] The preset number of iterations ranges from 1 to 4. For the brightness channel of the boundary band, smoothing is performed for different scale parameters, and the spatial gradient is calculated on the smoothed image. The magnitude of the gradient vector at the pixel location is used as the response value of that pixel at the corresponding scale, thus characterizing the boundary or structural saliency of that pixel at that scale. The extreme value in the scale dimension is taken as the optimal scale, and the intensity of the extreme value is recorded as an auxiliary quantity for boundary saliency.

[0142] S702. Convert the optimal scale into the dynamic bandwidth allowed for that pixel, perform consistency judgment on each pixel in the boundary band within its dynamic bandwidth neighborhood, reconstruct the boundary for pixels that meet the consistency and generate a fine-tuning mask.

[0143] For pixels located within the boundary band, their optimal scale is mapped to dynamic bandwidth. The formula is:

[0144] ;

[0145] in, , For mapping coefficients, For optimal scale; This represents the lower / upper limit of bandwidth.

[0146] With dynamic bandwidth Constructing a pixel neighborhood can A strip neighborhood is constructed using either the neighborhood radius or along the normal direction, and consistency is assessed within this neighborhood. Consistency conditions include sequentially evaluating width consistency, directional consistency, and cross-layer consistency, forming a funnel-shaped sieve; among which,

[0147] Width consistency is used to filter out pixels whose projected width within the boundary band is less than a preset ratio of dynamic bandwidth.

[0148] Directional consistency is used to filter out pixels whose local main direction consistency is lower than a preset second threshold;

[0149] Cross-layer consistency is used to assign boundary confidence to the remaining pixels based on the global pigment component map, and to perform retention, downweighting or removal operations on the pixels based on the boundary confidence.

[0150] First, determine the normal direction of the pixel to be judged at the boundary of the scar mask. The normal direction can be determined by the distance transformation gradient direction of the scar mask or by the gradient direction of the brightness channel. Then, with the pixel as the center, perform one-dimensional sampling of the boundary candidate pixels along the normal direction within the neighborhood corresponding to its dynamic bandwidth. Count the number of pixels that continuously satisfy the boundary response condition or boundary candidate condition in this normal direction, and use the number of consecutive pixels as the projection length of the pixel in the normal direction.

[0151] When the projected length is not less than the product of the dynamic bandwidth and the preset scaling factor, the pixel is considered to meet the consistency condition in the width dimension; when the projected length is less than the product, the pixel is considered not to meet the consistency condition in the width dimension and is removed from the boundary candidates. The preset scaling factor ranges from 0.3 to 0.7.

[0152] For pixels that meet the width consistency condition, the gradient direction distribution of neighboring pixels is statistically analyzed within the neighborhood corresponding to the dynamic bandwidth of the pixel to be judged. By mapping each gradient direction to a unit circle and calculating the strength of its composite vector, a direction consistency index is obtained to characterize the consistency of the main neighborhood direction. When the direction consistency index is not less than a preset second threshold, the pixel is determined to meet the consistency condition in the direction dimension; when the direction consistency index is less than the second threshold, the pixel is determined not to meet the consistency condition in the direction dimension and is removed from the boundary candidate pixels. The second threshold ranges from 0.5 to 0.8.

[0153] For pixels that satisfy directional consistency, the mean of global pigment components is sampled in their neighborhood, both inside and outside the boundary. Taking the inner / outer side strips as an example, half of the dynamic bandwidth is shifted towards the scar and half of the dynamic bandwidth is shifted towards the normal skin. The pigment cross-boundary contrast is then calculated.

[0154] ;

[0155] ;

[0156] in, Indicates the sampling area inside the boundary; Indicates the sampling area outside the boundary; Operator for calculating the mean of a region; Indicates the contrast of melanin across its boundaries; This indicates the contrast of hemoglobin across the boundary.

[0157] Boundary confidence The calculation formula is:

[0158] ;

[0159] in, Represents the normalization operator; , This represents the pigment contrast weighting coefficient, which must sum to 1 and can be determined based on the pigment proportion.

[0160] The processing rules are as follows:

[0161] like If so, then retain it;

[0162] like If so, the weight will be reduced;

[0163] like If so, then remove it.

[0164] This represents the retention threshold, with a value range of 0.7 to 0.85. This represents the weighting threshold, with a value ranging from 0.4 to 0.55.

[0165] The specific steps for reconstructing the boundaries of pixels that meet the consistency requirements and generating a refinement mask are as follows:

[0166] The dynamic bandwidth of pixels that meet the consistency requirements is divided into multiple bandwidth buckets according to a preset range. Morphological closing operations are performed on different bandwidth buckets, and the processing results of each bandwidth bucket are merged to obtain a fine-tuning mask.

[0167] The preset number of intervals is 4 to 8. For each bandwidth bucket, select the radius of the structuring element that matches the bandwidth of that bucket. The calculation formula is as follows: ; This represents the representative bandwidth of the m-th bandwidth bucket, i.e., the median bandwidth or center bandwidth of the m-th bandwidth bucket.

[0168] The candidate pixels within each bandwidth bucket are used as input. Morphological closing operations are performed on these pixels using the structuring element radius to fill boundary breaks, eliminate small gaps, and smooth boundary contours, thus obtaining the boundary processing result for that bandwidth bucket. After completing the morphological closing operations for each bandwidth bucket, the boundary processing results for each bucket are merged. The merging method includes taking the union of the processing results to form a comprehensive boundary result covering boundary structures at different scales. Through the above bucketing and merging operations, adaptive reconstruction and refinement of scar boundaries of different widths are achieved.

[0169] The merged boundaries are converted into closed contours and filled into region masks. The final refined mask is obtained by culling small connected components and filling holes.

[0170] S703. Use the refined mask as a scar mask for calculating the pigment component index.

[0171] By performing multiple dilation and erosion operations on the scar mask boundary and constructing a boundary band, explicit modeling of uncertain boundary regions is achieved. The optimal pixel-level scale is determined by combining the response extrema in multi-scale space, upgrading boundary adjustment from fixed-scale processing to adaptive scale optimization. This effectively avoids the problems of overly smoothed boundaries or loss of detail caused by a single scale. Furthermore, the optimal scale is mapped to the dynamic bandwidth of pixels, and consistency judgment is performed within the dynamic bandwidth neighborhood. This enables fine-tuning and reconstruction of boundary pixels, making the reconstructed boundary more closely resemble the real scar morphology and reducing false boundaries caused by hair, noise, and local texture interference. Finally, pigment component index calculation is performed through refined masking, reducing the sensitivity of the index results to boundary errors and improving the accuracy and stability of scar region characterization. This provides a more reliable quantitative basis and higher clinical credibility for subsequent scar type identification.

[0172] To facilitate understanding of the above embodiments, a specific application scenario of the above embodiments will be used as an example for illustration below:

[0173] Approximately three months after the patient's accidental cut, a linear scar was found on the abdomen. Clinical wide-area images and dermoscopic images were acquired. Affine alignment was performed using a positioning sticker to obtain the projection area of ​​the dermoscopic ROI on the clinical image.

[0174] Statistics were collected within the skin ring (from the global pigment component map):

[0175] Mean melanin component: 0.22;

[0176] Standard deviation of melanin component: 0.06;

[0177] Mean hemoglobin level: 0.18;

[0178] Standard deviation of hemoglobin levels: 0.05;

[0179] Coefficient of variation (CV) within the skin rings: ; .

[0180] Since the melanin uniformity threshold is 0.35 and the hemoglobin uniformity threshold is 0.40, then <0.35 and If the value is <0.4, the ring is considered to be of uniform color and can be regarded as a normal skin ring.

[0181] Let empirical coefficients be set Melanin reference threshold =0.22 + 1.6 × 0.06 = 0.316; Hemoglobin reference threshold =0.18+1.6×0.05=0.26.

[0182] After fusing global and local candidate confidence scores to obtain the scar mask, the following statistical results were obtained within the scar mask: the mean melanin value within the scar was 0.45, and the mean hemoglobin value within the scar was 0.3. Corresponding baseline values, namely the mean melanin and hemoglobin components, were statistically analyzed within the normal skin ring, with zero constants prevented. If the value is 10−6, then the pigment component index is: , Therefore, red and black dominate. .

[0183] Let the threshold for detecting black scars be -0.15, since A value no greater than -0.15 indicates that melanin is dominant (dark scar / pigmentation is dominant), which is within the dark scar discrimination threshold range and is judged as a dark scar.

[0184] Select the average pixel value of the ROI, and the brightness values ​​of the two frames (brightness consistency has been normalized): (Lighting direction L1) (Lighting direction L2), therefore differential shadow .

[0185] The reference brightness frame is the one with less reflection. The gradient vector is obtained using Sobel. =(0.10, 0.04); Let the unit vector of the lighting direction be... The gradient projections, which are projected onto (1, 0) and (−1, 0) along the illumination direction and superimposed, are obtained with the same illumination direction. =∣0.10∣+∣−0.10∣=0.20. Basic shadow weight. The initial depth response is 0.5. =0.5×0.068965+0.5×0.20=0.1344825. ≈0.10、 ≈0.08. =0.5×(1−0.6×sigmoid(0.10))≈0.3425, therefore the corrected depth response is =0.3425×0.1344825−0.30×0.08≈0.022. Within this scar ROI, the minimum / maximum depth response was statistically found to be -0.05 / 0.3. Therefore, after normalization, the depth normalized value is obtained. The value is 0.206. Since 0.206 < 0.25, the depth level is Level 0. According to the consistency rule fusion, when the depth level is 0 but the color is abnormally obvious, the output is "color-dominant flat scar", and it is labeled as pigmentation type or redness type according to the dominant component. Therefore, the comprehensive result can be output as: pigmentation type flat scar (black scar dominant, Level 0).

[0186] This technical solution achieves cross-scale alignment and collaborative analysis by fusing clinical wide-area images with dermoscopic images from multiple illumination directions. It also combines blind source separation to construct global and local pigment component representations, effectively suppressing the impact of illumination variations, skin color differences, and reflection interference on scar recognition. Through an adaptive reference threshold based on normal skin rings and a mask generation mechanism combining global screening and local correction, the localization and boundary extraction of scar areas become more accurate, reducing false positives and false negatives. Simultaneously, it transforms traditional experience-based subjective judgment into a calculable pigment component index, enabling objective and quantitative differentiation of scar types.

[0187] Further, depth response is constructed using differential shadows and gradient projection from dual-frame images, and a stable and reliable depth level representation is obtained through local chromaticity component correction and level mapping, enabling a more accurate depiction of the depth characteristics of scar morphology. By fusing depth level and scar type with consistency rules, a multi-dimensional mutually verifying evaluation mechanism is formed, effectively reducing the risk of misjudgment caused by abnormalities in a single indicator, and improving the robustness and reliability of the evaluation results. This provides more stable and widely applicable technical support for the refined classification of scars, efficacy evaluation, and clinical decision-making.

[0188] Example 2

[0189] like Figure 6 As shown in the figure, this embodiment introduces a scar area detection system for skin plastic surgery data, including an image acquisition module 1, a decomposition module 2, a type discrimination module 3, a depth discrimination module 4, and an evaluation output module 5.

[0190] Image acquisition module 1 is used to acquire clinical wide-field images and dermoscopic images of the area to be evaluated; wherein, the dermoscopic image is a two-frame image obtained by taking pictures from different illumination directions under the same field of view;

[0191] The decomposition module 2 is used to preprocess and perform cross-scale alignment on the clinical wide-area image and the dermoscopy image, and then determine the region of interest of the clinical wide-area image based on the dermoscopy image. Subsequently, blind source separation is performed on the region of interest and the dermoscopy image respectively to decompose the corresponding global pigment component map and local pigment component map.

[0192] The type discrimination module 3 is used to perform normal skin band statistics on the region of interest to obtain a reference threshold, filter candidates that are higher than the reference threshold from the global pigment component map and perform local correction on the candidates through the local pigment component map to obtain a scar mask, calculate the pigment component index of the scar mask, and determine the scar type based on the calculation result and the preset first threshold.

[0193] The depth discrimination module 4 is used to calculate the differential shadow and gradient projection consistent with the illumination direction of the dermoscopy image, and weighted fuse them to obtain the initial depth response. Then, the initial depth response is corrected by the local pigment component map, and the corrected depth response is referenced to the corresponding level mapping relationship to obtain the depth level.

[0194] The assessment output module 5 is used to fuse depth level and scar type according to consistency rules to obtain assessment results and output them.

[0195] Image acquisition module 1 receives images from a clinical wide-field imaging device and a dermatoscope imaging device. The clinical wide-field imaging device can be a digital camera, a mobile phone / tablet camera, or a dedicated skin imaging instrument; preferably, it has automatic exposure / automatic white balance locking capability and a resolution ≥8MP (preferably ≥12MP). The dermatoscope imaging device can be a handheld dermatoscope or a dermatoscope clamp + camera / mobile phone combination; its illumination component includes at least two sets of light sources with different incident directions (e.g., ring light source with partitioned illumination or symmetrical left and right light sources) for acquiring two frames of images with different illumination directions in the same field of view.

[0196] The system utilizes a CPU+GPU architecture for batch processing. CPU: ≥4 cores (preferably ≥8 cores); Memory: ≥8GB (preferably ≥16GB); supports matrix operation acceleration; Storage: ≥64GB (preferably ≥256GB, including image and result database). Communication interfaces include USB / Bluetooth / Wi-Fi / wired Ethernet for camera / dermatoscope data transmission and result feedback. Final results are displayed on a screen. The preferred operating system is Windows; the preferred runtime environment is Web services; and the preferred acceleration library is OpenCV.

[0197] This embodiment has the same beneficial effects as Embodiment 1.

[0198] Example 3

[0199] like Figure 7 As shown, this embodiment introduces a computer terminal, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the aforementioned scar area detection method for skin plastic surgery data.

[0200] There can be one processor or multiple processors. Figure 7 Taking one example, in this embodiment, the processor and memory can be connected via a bus or other means, wherein, Figure 7 Taking the example of a bus connection, the corresponding input and output devices are also shown.

[0201] A scar area detection method based on skin plastic surgery data can be applied in software form, such as as a standalone program installed on a computer terminal (e.g., a computer or smartphone). Alternatively, it can be designed as an embedded program installed on a computer terminal, such as a microcontroller.

[0202] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.

Claims

1. A method of detecting a scar region of skin plastic data, characterized by, Includes the following steps: Acquire clinical wide-field images and dermoscopic images of the area to be evaluated; wherein, the dermoscopic images are two-frame images taken from different illumination directions under the same field of view; After preprocessing and cross-scale alignment of the clinical wide-field image and the dermoscopy image, the region of interest of the clinical wide-field image is determined based on the dermoscopy image. Then, blind source separation is performed on the region of interest and the dermoscopy image respectively to decompose and obtain the corresponding global pigment component map and local pigment component map. A reference threshold is obtained by performing normal skin band statistics on the region of interest. Candidates with values ​​higher than the reference threshold are selected from the global pigment component map and locally corrected by the local pigment component map to obtain a scar mask. The pigment component index of the scar mask is calculated, and the scar type is determined based on the calculation result and the preset first threshold. The differential shadow and gradient projection consistent with the illumination direction of the dermoscopy image are calculated and weighted to obtain the initial depth response. Then, the initial depth response is corrected by the local pigment component map, and the corrected depth response is referenced to the corresponding level mapping relationship to obtain the depth level. The depth level and scar type are fused using a consistency rule to obtain the evaluation result and output it.

2. The scar area detection method of dermatoplastic data according to claim 1, characterized in that, The specific steps for performing normal skin band statistics on the region of interest to obtain the reference threshold are as follows: A skin ring of preset length is constructed at the outer edge of the region of interest. The skin ring is judged to see if the texture is continuous and the color is uniform. If so, it is considered a normal skin ring. Otherwise, reconstruct a new skin ring at the outer edge of the skin ring until the new skin ring has a continuous texture and uniform color or reaches the maximum number of reconstructions. If the skin rings constructed by the maximum number of reconstructions still do not satisfy the requirements of texture continuity and color uniformity, then the constructed skin rings are sliced ​​and the segments that satisfy texture continuity and color uniformity are retained and merged into normal skin rings. The mean and standard deviation of melanin and hemoglobin were calculated for normal skin rings. The mean and standard deviation were then combined to calculate the corresponding melanin reference threshold and hemoglobin reference threshold.

3. The method for detecting scar areas in skin plastic surgery data according to claim 2, characterized in that, The specific steps for obtaining a scar mask by filtering candidates with values ​​higher than the reference threshold from the global pigment component map and performing local correction on the candidates using the local pigment component map are as follows: From the global pigment component map, pigmentation candidates and redness candidates that are higher than the melanin reference threshold and hemoglobin reference threshold are screened out respectively. The two are then merged and morphologically processed to obtain the global candidate mask. Local candidate masks are selected from the local pigment component map where the pigment and local texture variance both exceed the threshold, and their confidence scores are calculated. The scar mask is obtained by weighted fusion of local and global candidate masks based on confidence level.

4. The method for detecting scar areas in skin plastic surgery data according to claim 1, characterized in that, The specific steps for correcting the initial depth response using local pigment component maps are as follows: Extract the hemoglobin layer and melanin layer from the local pigment component map, adjust the weight of differential shadows based on the hemoglobin layer, and construct a correction term for color pigmentation correction based on the melanin layer. The initial depth response is corrected by combining the correction term and the adjusted weights to obtain the corrected depth response.

5. The method for detecting scar areas in skin plastic surgery data according to claim 1, characterized in that, Before calculating the pigment component index of the scar mask, the boundary of the scar mask is dynamically adjusted. The specific steps are as follows: Perform a preset number of dilation and erosion operations on the scar mask boundary and take the difference to obtain the boundary band. Calculate the extreme response values ​​of the pixels in the boundary band in multi-scale space as the optimal scale. The optimal scale is converted into the dynamic bandwidth allowed for that pixel. For each pixel within the boundary band, a consistency judgment is made in the neighborhood of its dynamic bandwidth. Pixels that meet the consistency are used to reconstruct the boundary and generate a fine-tuning mask. The refined mask was used as a scar mask for calculating the pigment component index.

6. The method for detecting scar areas in skin plastic surgery data according to claim 5, characterized in that, When performing consistency checks on each pixel within the boundary band in its dynamic bandwidth neighborhood, the consistency conditions include sequentially judging width consistency, directional consistency, and cross-layer consistency, forming a funnel-shaped sieving process; among which, Width consistency is used to filter out pixels whose projected width within the boundary band is less than a preset ratio of dynamic bandwidth. Directional consistency is used to filter out pixels whose local main direction consistency is lower than a preset second threshold; Cross-layer consistency is used to assign boundary confidence to the remaining pixels based on the global pigment component map, and to perform retention, downweighting or removal operations on the pixels based on the boundary confidence.

7. The method for detecting scar areas in skin plastic surgery data according to claim 5, characterized in that, The specific steps for reconstructing the boundaries of pixels that meet the consistency requirements and generating a refinement mask are as follows: The dynamic bandwidth of pixels that meet the consistency requirements is divided into multiple bandwidth buckets according to a preset range. Morphological closing operations are performed on different bandwidth buckets, and the processing results of each bandwidth bucket are merged to obtain a fine-tuning mask.

8. The method for detecting scar areas in skin plastic surgery data according to claim 1, characterized in that, The specific steps for fusing depth grade and scar type using consistency rules to obtain the assessment result are as follows: The effective range of depth information of the region of interest is determined based on the corrected depth response of the dermoscopy image, and then the region of interest is divided into a depth evaluation region and a non-depth evaluation region. In the depth evaluation region, connected component segmentation is performed to obtain sub-regions. The scar type with the highest proportion in each sub-region is taken as the representative type. The depth level of the maximum modified depth response mapping of the sub-region is judged. If the maximum depth level exceeds the threshold, the sub-region is a concave representative type. If it does not exceed the threshold and is not zero, it is a transitional representative type.

9. A scar area detection system for skin plastic surgery data, characterized in that, It includes: The image acquisition module is used to acquire clinical wide-field images and dermoscopic images of the area to be evaluated; wherein, the dermoscopic images are two-frame images taken from different illumination directions under the same field of view. The decomposition module is used to preprocess and perform cross-scale alignment on the clinical wide-area image and the dermoscopy image, determine the region of interest in the clinical wide-area image based on the dermoscopy image, and then perform blind source separation on the region of interest and the dermoscopy image respectively to decompose the corresponding global pigment component map and local pigment component map. The type discrimination module is used to perform normal skin band statistics on the region of interest to obtain a reference threshold, filter candidates with higher than the reference threshold from the global pigment component map and perform local correction on the candidates through the local pigment component map to obtain a scar mask, calculate the pigment component index of the scar mask, and determine the scar type based on the calculation result and the preset first threshold. The depth discrimination module is used to calculate the differential shadow and gradient projection consistent with the illumination direction of the dermoscopy image, and then weighted fuse them to obtain the initial depth response. Subsequently, the initial depth response is corrected by the local pigment component map, and the corrected depth response is referenced to the corresponding level mapping relationship to obtain the depth level. The assessment output module is used to fuse depth level and scar type according to consistency rules to obtain assessment results and output them.

10. A computer terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the scar area detection method for skin plastic surgery data as described in any one of claims 1-8.