Vagina wall mucosa wrinkle degree evaluation method and system based on image processing
By converting colposcopic images into LAB space and combining filtering and edge detection, using support vector machine and K-means algorithm, we achieved automated quantitative assessment of vaginal wall mucosal rugosity, solving the problem of inaccurate assessment in traditional methods and improving the accuracy and efficiency of assessment.
Patent Information
- Application Number
- CN202510951966.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-10-17
AI Technical Summary
Traditional methods are difficult to quantitatively evaluate the rugosity of the vaginal wall mucosa. There are subjective differences, it is time-consuming and labor-intensive, and the image processing algorithm fails to effectively extract the complete rugosity contours and features, resulting in inaccurate evaluation results.
Image processing technology was used to convert colposcopic images into LAB space. Continuous wrinkle contours were extracted through filtering and edge detection. The support vector machine classifier and K-means clustering algorithm were combined to quantify wrinkle features and evaluate wrinkle degree.
It realizes the automated and quantitative evaluation of the vaginal wall mucosal folds, eliminates human differences, improves the accuracy and efficiency of the evaluation, and adapts to the complex structure of the vaginal wall.
Smart Images

Figure CN120807461A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medical image processing, in particular to a vaginal wall mucosa fold degree evaluation method and system based on image processing. BACKGROUND
[0002] In the field of gynecological clinical diagnosis and female private health assessment, the fold shape of the vaginal wall mucosa is an important indicator reflecting the physiological state of the mucosa, and its richness is closely related to elasticity, health degree, etc.
[0003] The traditional evaluation method mainly relies on the subjective judgment of doctors after observing the colposcope, which has significant shortcomings. The experience difference of different doctors leads to high dispersion of evaluation results, lacks unified quantitative standard, and is difficult to perform longitudinal comparison or large-scale data analysis. Artificial observation requires frame-by-frame analysis of images, which is time-consuming and labor-intensive, and cannot meet the batch screening demand. The original colposcope image is affected by factors such as light, angle, and secretion, and has problems such as reflection, noise, and insufficient contrast, resulting in blurred fold boundaries and difficulty in manual recognition. The traditional method can only qualitatively describe the fold shape, and cannot accurately quantify it from multiple characteristics such as length, curvature, direction distribution, etc., making it difficult to establish relevance with clinical indicators. Although existing automatic evaluation technologies attempt to introduce image processing algorithms, some schemes only use simple edge detection without considering color space conversion and multi-scale filtering, resulting in incomplete contour extraction, single feature extraction dimension, and lack of combination of curve shape and global distribution characteristics. The classification model is not optimized for vaginal wall fold characteristics, and the reliability of the evaluation result is insufficient. SUMMARY
[0004] The purpose of the present application is to provide a vaginal wall mucosa fold degree evaluation method and system based on image processing to solve the problems in the prior art.
[0005] To achieve the above-mentioned purpose, the present application provides the following technical scheme: a vaginal wall mucosa fold degree evaluation method based on image processing, the method comprising: S1, converting the colposcope image from RGB space to LAB space and extracting the brightness channel, reducing interference through downsampling and filtering, enhancing the contrast of the fold boundary, and extracting continuous and significant fold contours using an edge detection algorithm; S2, regarding each boundary as a connected domain and assigning different values, drawing a binary image for a single connected domain, detecting end points using a sliding window, processing abnormal end points, recording curve coordinates according to the counterclockwise tracking algorithm, and completing boundary extraction using curvature adaptive downsampling; S3, extracting features of each fold curve; the curve features include curve length features, curvature features, convexity features, slope change features, angle change features, inflection point sharpness features, significant inflection point features, overall bending features, and direction features; S4, based on the curve data set, a support vector machine classifier is used for model training to classify the extracted wrinkle curves; the curve data set includes long straight lines, approximate short straight lines, standard arc lines, wavy arc lines and hill-type arc lines; S5, from a global perspective, the number, proportion and direction distribution of each type of curve in the image are counted, the comprehensive curve features are extracted, and the richness and distribution law of the vaginal wall wrinkle are comprehensively described; S6, a K-means clustering algorithm is used, and a typical sample is selected as a centroid, the typical sample includes the most hill-type arc line, the most wavy arc line, the most long straight line and the most short straight line feature distribution, and the feature vector of the image to be evaluated is divided into the nearest centroid category through iterative calculation, and the evaluation result of the vaginal wall mucosa wrinkle degree is output.
[0006] According to the above scheme, step S1 includes: S11, convert the RGB format color image shot by the colposcope to the LAB color space model, separate the brightness information and chroma information of the image through the color space conversion algorithm, and extract the L brightness channel image in the LAB space; S12, the extracted L brightness channel image is down-sampled, the image resolution is reduced by using an image interpolation algorithm, and the image data amount is reduced on the premise of retaining the main wrinkle features; S13, a mean filter is used to smooth the down-sampled image to eliminate small textures and random noise; an anisotropic diffusion filter is used to enhance the continuity of the wrinkle edges in the image; and a Gaussian filter is used to smooth the image; S13, the filtered image is subjected to gray scale transformation through a histogram equalization algorithm, the original gray scale interval is nonlinearly mapped to a full dynamic range based on the statistical characteristics of the image gray scale histogram, and the contrast difference between the wrinkle boundary and the background area is enhanced; S14, a Canny edge detection algorithm is used to accurately extract the wrinkle contour, a Gaussian kernel function is used to pre-smooth the image to suppress residual noise; the image gradient amplitude and direction are calculated to locate the gray scale mutation area; the non-maximum suppression algorithm is used to thin the edge to a single pixel width; a double-threshold algorithm is used in combination with a hysteresis tracking strategy to connect the continuous edge points to form a complete wrinkle contour curve; and the pseudo edge is effectively removed to retain the mucosa wrinkle boundary with physical meaning.
[0007] According to the above scheme, step S2 includes: S21, each wrinkle boundary obtained by edge detection is marked as an independent connected domain and is assigned a unique identification value; a corresponding binary image matrix is generated based on the independent connected domain, and the pixel points on the curve of the independent connected domain are assigned a value of 1, and the background area pixel points are assigned a value of 0; S22, each pixel point on the connected domain curve is traversed using a sliding window, endpoint determination is performed based on the spatial distribution characteristics of the neighborhood pixels, and endpoint effectiveness verification is established; S23, based on the reserved effective endpoint pairs, an improved eight-direction neighborhood search algorithm is used to start boundary tracking in a counterclockwise direction from the starting endpoint; the two-dimensional coordinates of each pixel point are dynamically recorded during the tracking process, and a complete curve coordinate sequence is constructed; S24, the recorded curve coordinates are down-sampled to optimize the data volume, and the complete boundary curve data after endpoint correction and coordinate optimization is output.
[0008] According to the above scheme, the establishment of endpoint effectiveness verification comprises: The number of endpoints is determined, a normal curve has two endpoints, and an abnormal curve has multiple endpoints or no endpoint; When the number of connected domain endpoints is 0, it is determined that a closed contour formed by a colposcope reflection point is a non-crease boundary, and the connected domain is directly removed; When the number of endpoints is greater than 2, the endpoints are combined two by two, the Euclidean distance between the two endpoints is calculated, the two endpoints with the largest distance are reserved, the values of the remaining endpoints are set to the background region, and the step S21 is re-entered to detect the endpoint position of the independent connected domain until the number of independent connected domain endpoints is 2.
[0009] According to the above scheme, the adaptive down-sampling comprises: The curvature change value of each segment of the curve is calculated, the curvature mutation region and the flat region are identified, a sparse sampling coefficient of 0.1 is used for the curvature change flat region, one coordinate point is reserved for every 10 pixel points, the mutation region with a curvature change exceeding a preset threshold value is kept at the original sampling density, and through dynamic sampling rate control, the key feature points of the curve form are reserved while reducing the data volume.
[0010] According to the above scheme, the curve length feature is obtained by accumulating the Euclidean distance between adjacent pixel points on the curve; the bending degree feature is obtained by calculating the ratio of the number of curve pixel points to the straight-line distance of the endpoints, which is used to quantify the bending degree of the curve; the convex feature is obtained by calculating the included angle between the midpoint of the curve and the line connecting the two endpoints, which is used to evaluate the convex height of the curve; the slope change feature is obtained by calculating the cumulative change value of the slope of the line connecting adjacent coordinate points, which is used to quantify the fluctuation degree of the curve; the angle change feature is obtained by counting the proportion and number of points whose slope change exceeds a preset threshold, which is used to evaluate the turning frequency of the curve; the inflection point sharpness feature is obtained by calculating the cosine value of the angle formed by each point on the curve and the previous and next points, and the maximum cosine value is extracted as the inflection point sharpness index; the significant inflection point feature is obtained by counting the number of inflection points whose cosine value exceeds a preset threshold, which is used to evaluate the local mutation feature of the curve; the overall bending feature is obtained by calculating the perpendicular distance from the maximum inflection point to the line connecting the endpoints, which is used to quantify the overall bending amplitude of the curve; and the direction feature is obtained by calculating the direction angle of the line connecting the two endpoints of the curve, which is used to analyze the spatial distribution direction of the curve.
[0011] According to the above scheme, step S4 includes: S41, labeling the extracted wrinkle curve and assigning a unique class label to construct a curve dataset, the curve dataset including long straight lines, approximate short straight lines, standard arcs, wavy arcs and hill-type arcs; S42, dividing the labeled curve dataset into a training set and a test set according to a preset proportion, the training set being used for model parameter learning and the test set being used for evaluating the model generalization ability; standardizing the extracted curve features in the curve data, mapping each feature value to a unified interval through linear transformation, and eliminating the influence of different feature dimensions on the classification result; S43, constructing a multi-classification model using a support vector machine algorithm, converting the feature vector to a high-dimensional space through a kernel function mapping, and iteratively solving an optimal classification hyperplane using the feature vector and label of the training set to learn the feature distribution rule of different curve shapes; S44, quantitatively evaluating the multi-classification model using the test set, the evaluation including accuracy, area under the curve and confusion matrix analysis; S45, inputting the feature vector of the wrinkle curve to be classified into the trained classification model, and outputting the corresponding curve shape category probability distribution; performing confidence test on the classification result, filtering low-confidence predictions, and ensuring the reliability of the final classification result.
[0012] According to the scheme, the comprehensive curve features include average length of all wrinkle curves, average length of five curves with the longest length, number of wave-shaped arcs, proportion of wave-shaped arcs in total curve number, number of hill-shaped arcs, proportion of hill-shaped arcs in total curve number, number of standard arcs, proportion of standard arcs in total curve number, number of approximate long straight lines, proportion of approximate long straight lines in total curve number, curve direction distribution, average number of significant inflection points of each curve, and total number of high-bending-angle curves.
[0013] According to the scheme, step S6 includes: S61, selecting a typical sample as an initial clustering centroid based on the comprehensive curve features; the typical sample includes feature distribution of the most hill-shaped arcs, the most wave-shaped arcs, the most long straight lines, and the most short straight lines; S62, standardizing the comprehensive curve features of the image to be evaluated to form a feature vector as input data of clustering analysis; S63, calculating the Euclidean distance between the feature vector of the image to be evaluated and each centroid, and dividing the feature vector into the nearest centroid category according to the nearest neighbor principle; S64, updating the centroid position of each category based on the mean value of the feature vector of all classified samples; S65, repeatedly performing steps S62 to S63 until the centroid position no longer changes significantly or the preset iteration number is reached; S66, corresponding the final converged four categories of clustering results to different evaluation grades respectively, and outputting the wrinkle degree evaluation grade of the image to be evaluated, the evaluation grade including high wrinkle degree, good wrinkle degree, general wrinkle degree, and low wrinkle degree.
[0014] The system includes an image preprocessing module, a boundary extraction module, a feature extraction module, a classification module, and an evaluation module. The image preprocessing module includes a color space conversion module, a degradation processing module, and an edge enhancement module; the color space conversion module is used to convert an RGB image to an LAB color space and extract an L brightness channel to eliminate color interference; the degradation processing module reduces image resolution through downsampling and eliminates noise by using multi-level filtering; and the edge enhancement module improves the contrast and continuity of wrinkle boundaries through histogram equalization and edge enhancement algorithms. The boundary extraction module includes a connected domain analysis module, an endpoint detection module, and a curve tracking module; the connected domain analysis module labels and numbers connected domains of edge detection results to generate a binary matrix; the endpoint detection module detects endpoints by using a sliding window method to handle closed curves and multi-endpoint abnormal situations; and the curve tracking module implements an eight-direction counterclockwise tracking algorithm to accurately record boundary coordinate sequences. The feature extraction module comprises a single curve feature module, a global feature module and a feature standard module; the single curve feature module acquires single curve local features and quantifies single curve shapes; the global feature module counts global features and describes global wrinkle features; the feature standard module is used for normalizing features; The classification module comprises a data set module, a classifier module and a classification evaluation module; the data set module constructs a standard curve database; the classifier module trains a support vector machine model to realize automatic classification of curve shapes; the classification evaluation module evaluates classification performance through cross-validation and optimizes model parameters; The evaluation module comprises a clustering analysis module, a grade mapping module and a result verification module; the clustering analysis module performs a K-means clustering algorithm to realize automatic division of a feature space; the grade mapping module maps clustering results into different evaluation grades; and the result verification module performs confidence analysis and reliability verification on evaluation results.
[0015] Compared with the prior art, the present application has the following advantages: 1. The present application realizes automatic extraction and quantification of wrinkle features through computer image processing technology, eliminating subjective differences in human evaluation; 2. The present application solves the problem of boundary breakage in colposcopy images caused by reflection and mucus through dynamic endpoint correction optimization; 3. The present application uses sparse sampling in regions with gentle curvature changes and dense sampling in regions with abrupt curvature changes through a curvature-adaptive downsampling algorithm, which reduces data volume while retaining key shape features, and is suitable for the characteristics of vaginal wall wrinkles, local abrupt changes and overall gentleness. BRIEF DESCRIPTION OF DRAWINGS
[0016] Fig. 1 The figure is a step flowchart of the vaginal wall mucosa wrinkle degree evaluation method of the present application based on image processing. Fig. 2 The figure is a structure schematic diagram of the vaginal wall mucosa wrinkle degree evaluation system of the present application based on image processing. Fig. 3 The figure is a wrinkle boundary extraction step flowchart of the vaginal wall mucosa wrinkle degree evaluation method of the present application based on image processing. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0018] Example: Figs. 1-3 As shown, the present invention provides a technical solution, a method for evaluating vaginal wall mucosal wrinkles based on image processing, the method comprising the steps of: S1. Convert the colposcopic image from RGB space to LAB space and extract the brightness channel. Reduce interference through downsampling and filtering, enhance the contrast of the fold boundary, and use the edge detection algorithm to extract continuous and significant fold contours. Specifically, step S1 includes: S11, converting the RGB format color image captured by the colposcope into a LAB color space model, separating the brightness information and chromaticity information of the image through a color space conversion algorithm, and extracting the L brightness channel image in the LAB space; S12, downsampling the extracted L brightness channel image, using an image interpolation algorithm to reduce the image resolution, thereby reducing the image data volume while retaining the main wrinkle features; S13, using a mean filter to smooth the downsampled image to eliminate fine textures and random noise; using an anisotropic diffusion filter to enhance the continuity of wrinkle edges in the image; and using a Gaussian filter to smooth the image; S13, performing grayscale transformation on the filtered image using a histogram equalization algorithm, nonlinearly mapping the original grayscale interval to the full dynamic range based on the statistical characteristics of the image grayscale histogram, and enhancing the contrast difference between the fold boundary and the background area; S14. The Canny edge detection algorithm is used to accurately extract the wrinkle contour. The image is pre-smoothed using the Gaussian kernel function to suppress residual noise. The image gradient amplitude and direction are calculated to locate the grayscale mutation area. The edge is refined to a single pixel width through non-maximum suppression. The dual-threshold algorithm is combined with a hysteresis tracking strategy to connect continuous edge points to form a complete wrinkle contour curve. Pseudo-edges are effectively eliminated to retain the physically meaningful mucosal wrinkle boundaries.
[0019] For example: collect vaginal wall images with a resolution of 1920×1080, select a typical area RGB image as input; convert the RGB image to LAB color space, extract the L channel with a brightness range of 0-100; downsample the L channel image by 0.4 times, and output a resolution of 768×432; A 5×5 mean filter was used to eliminate noise, and a Gaussian filter with σ=1.0 was used to smooth the image. After histogram equalization, the Canny operator was used to extract edges with a low threshold of 50 and a high threshold of 150. After processing, the contrast of the blurred wrinkle boundaries in the original image increased by 3 times, and the number of detected continuous boundary curves increased from 23 to 35. This is just an example and is not intended to be limiting.
[0020] S2, draw a binary image for a single connected domain by taking each boundary as a connected domain and assigning different values, detect endpoints using a sliding window, after processing abnormal endpoints, record the curve coordinates according to a counterclockwise tracking algorithm, and complete boundary extraction using curvature adaptive downsampling; Specifically, step S2 includes: S21, label each wrinkle boundary obtained by edge detection as an independent connected domain and assign a unique identification value; based on the independent connected domain, generate a corresponding binary image matrix, and assign a value of 1 to a pixel point on the curve of the independent connected domain and a value of 0 to a pixel point in the background region; for example, 42 boundary curves are marked out of the connected domain, and the longest curve contains 185 pixel points; S22, traverse each pixel point on the curve of the connected domain using a sliding window, determine the endpoints based on the spatial distribution characteristics of the neighborhood pixels, and establish endpoint validity verification; S23, based on the retained valid endpoint pairs, use an improved eight-direction neighborhood search algorithm to start from the starting endpoint and track the boundary in the counterclockwise direction; dynamically record the two-dimensional coordinates of each pixel point during the tracking process to construct a complete curve coordinate sequence; S24, downsample the recorded curve coordinates to optimize the data volume and output the complete boundary curve data after endpoint correction and coordinate optimization.
[0021] Further, establishing endpoint validity verification includes: judging the number of endpoints, a normal curve has two endpoints, and an abnormal curve has multiple endpoints or no endpoints; when the number of connected domain endpoints is 0, it is determined that a closed contour formed by a colposcope reflection point is a non-wrinkle boundary, and the connected domain is directly removed; when the number of endpoints is greater than 2, the endpoints are combined two by two, the Euclidean distance between the two endpoints is calculated, the two endpoints with the largest distance are retained, the values of the remaining endpoints are set to the background region, and the step S21 of detecting the endpoint position of the independent connected domain is re-entered until the number of independent connected domain endpoints is 2. For example, 3 closed curves are found and determined to be removed as reflection artifacts; 5 multi-endpoint curves are processed, for example, the original number of endpoints of curve A is 4, and the two farthest points are retained after distance calculation, with a distance of 89 pixels; Further, adaptive downsampling includes: calculating the curvature change value of each segment of the curve, identifying the curvature mutation region and the flat region, and using a sparse sampling coefficient of 0.1 for the flat region of the curvature change, retaining 1 coordinate point for every 10 pixel points; the mutation region with a curvature change exceeding a preset threshold maintains the original sampling density; through dynamic sampling rate control, the key feature points of the curve morphology are retained while reducing the data volume; for example, for a flat curve segment, the curvature cosine is greater than 0.85, and the sampling is performed at a coefficient of 0.1; for a mutation region, such as a curve inflection point, the curvature cosine is 0.72, and the original density is maintained.
[0022] S3, extract each wrinkle curve feature; the curve feature includes curve length feature, bending degree feature, convex feature, slope change feature, angle change feature, inflection point sharpness feature, significant inflection point feature, overall bending feature and direction feature; Specifically, the curve length feature is obtained by accumulating the Euclidean distance between adjacent pixel points on the curve; the bending degree feature is obtained by calculating the ratio of the number of curve pixel points to the distance of the straight line between the endpoints, which is used to quantify the bending degree of the curve; the convex feature is obtained by calculating the included angle between the midpoint of the curve and the line connecting the two endpoints, which is used to evaluate the convex height of the curve; the slope change feature is obtained by calculating the cumulative change value of the slope of the line connecting adjacent coordinate points, which is used to quantify the fluctuation degree of the curve; the angle change feature is obtained by counting the proportion and number of points whose slope change exceeds a predetermined threshold, which is used to evaluate the turning frequency of the curve; the inflection point sharpness feature is obtained by calculating the cosine value of the included angle formed by each point on the curve and the previous and next points, and the maximum cosine value is extracted as the inflection point sharpness index; the significant inflection point feature is obtained by counting the number of inflection points whose cosine value exceeds a predetermined threshold, which is used to evaluate the local mutation feature of the curve; the overall bending feature is obtained by calculating the perpendicular distance from the maximum inflection point to the line connecting the endpoints, which is used to quantify the overall bending amplitude of the curve; the direction feature is obtained by calculating the direction angle of the line connecting the two endpoints of the curve, which is used to analyze the spatial distribution direction of the curve. For example: a typical hill-shaped arc: length feature: cumulative length 148.6 pixels; bending degree: 156 pixel number / 105.2 endpoint distance = 1.48; convex feature: midpoint included angle 112°; slope change: cumulative change value 285° (of which the significant change point ratio > 20° is 61%); inflection point sharpness: maximum cosine value -0.95 (threshold -0.92); S4, based on the curve data set, a support vector machine classifier is used for model training to classify the extracted wrinkle curve; the curve data set includes long straight line, approximate short straight line, standard arc line, wave-shaped arc line and hill-shaped arc line; Specifically, step S4 includes: S41, label the extracted wrinkle curve and assign a unique class label to construct a curve data set, the curve data set includes long straight line, approximate short straight line, standard arc line, wave-shaped arc line and hill-shaped arc line; for example: construct a labeled data set of 500 curves, 100 of each type, the average length of the long straight line is 162±35 pixels, and the hill-shaped arc line has 4.2±1.3 inflection points; S42, divide the labeled curve data set into training set and test set according to a predetermined proportion, the training set is used for model parameter learning, and the test set is used for evaluating the generalization ability of the model; the curve features extracted in the curve data are standardized, and each feature value is mapped to a unified interval through linear transformation, so as to eliminate the influence of different feature dimensions on the classification result; S43, a multi-classification model is constructed by using a support vector machine algorithm, a feature vector is converted to a high-dimensional space by kernel function mapping, and an optimal classification hyperplane is solved by using a feature vector and a label of a training set for iteration to learn feature distribution rules of different morphological curves; S44, a test set is used to quantitatively evaluate the multi-classification model, and the evaluation includes an accuracy value, an area under a curve, and a confusion matrix analysis; S45, a feature vector of a wrinkle curve to be classified is input into the trained classification model, and a corresponding curve morphological category probability distribution is output; a confidence test is performed on a classification result, low-confidence prediction is filtered, and the reliability of a final classification result is ensured.
[0023] S5, the number, proportion and direction distribution of each curve in the image are counted from a global perspective, comprehensive curve features are extracted, and the richness and distribution rules of the vaginal wall wrinkle are comprehensively described; Specifically, the comprehensive curve features include an average length of all wrinkle curves, an average length of five curves with the longest length, a number of wave-shaped arc lines, a proportion of the wave-shaped arc lines in the total number of curves, a number of hill-shaped arc lines, a proportion of the hill-shaped arc lines in the total number of curves, a number of standard arc lines, a proportion of the standard arc lines in the total number of curves, a number of approximate long straight lines, a proportion of the approximate long straight lines in the total number of curves, a curve direction distribution, an average number of significant inflection points of each curve, and a total number of high-curvature-angle curves.
[0024] S6, a K-means clustering algorithm is used, typical samples are selected as centroids, the typical samples include feature distributions of the most hill-shaped arc lines, the most wave-shaped arc lines, the most long straight lines and the most short straight lines, a feature vector of an image to be evaluated is divided into a nearest centroid category by iterative calculation, and an evaluation result of the vaginal wall mucosal rugosity is output.
[0025] Specifically, step S6 includes: S61, based on the comprehensive curve features, typical samples are selected as initial clustering centroids; the typical samples include feature distributions of the most hill-shaped arc lines, the most wave-shaped arc lines, the most long straight lines and the most short straight lines; S62, after the comprehensive curve features of the image to be evaluated are standardized, a feature vector is formed and used as input data for clustering analysis; S63, the Euclidean distances between the feature vector of the image to be evaluated and the centroids are calculated, and the feature vector is divided into the nearest centroid category according to the nearest neighbor principle; S64, based on the mean values of the feature vectors of all classified samples, the centroid positions of the categories are updated; S65, steps S62 to S63 are repeatedly executed until the centroid positions no longer change significantly or a preset iteration number is reached; S66, correspond the final converged four categories of clustering results to different evaluation grades respectively, and output the wrinkle degree evaluation grade of the image to be evaluated, the evaluation grade including high wrinkle degree, good wrinkle degree, general wrinkle degree and low wrinkle degree.
[0026] The application provides another technical scheme, a vagina wall mucosa wrinkle degree evaluation method based on image processing, wrinkle boundary extraction; Each wrinkle boundary obtained through edge detection is marked as an independent connected domain and is assigned a unique identification value; a corresponding binary image matrix is generated based on the independent connected domain, and the pixel points on the curve of the independent connected domain are assigned a value of 1, and the pixel points in the background region are assigned a value of 0; Each point on the curve is traversed by using a 3*3 sliding window; (1) when the sum of the 3*3 sliding window is 2, it is determined that the point is an end point, for example: , it is determined that the point is an end point; (2) when the sum of the 3*3 sliding window is 3, and the distance between the other two points is 1 except the center point, it is determined that the point is an end point, for example: , it is determined that the point is an end point; (3) when the sum of the 3*3 sliding window is 4, and the four points are distributed in a 2*2 matrix, it is determined that the point is an end point, for example: , it is determined that the point is an end point; (4) when the sum of the 3*3 sliding window is 4, and the other three points are in the same row or the same column except the center point, it is determined that the point is an end point, for example: , it is determined that the point is an end point; The number of end points is determined, and two end points exist in a normal curve, and multiple end points or no end point exist in an abnormal curve; when the number of end points of the connected domain is 0, it is determined that the connected domain is a closed contour formed by a colposcope reflection point and is not a wrinkle boundary, and the connected domain is directly removed; when the number of end points is greater than 2, the end points are combined two by two, the Euclidean distance between the two end points is calculated respectively, the two end points with the maximum distance are reserved, the values of the remaining end points are set as background regions, and the position of the end point of the independent connected domain is detected by using the 3*3 sliding window again until the number of end points of the independent connected domain is 2.
[0027] Based on the reserved effective end point pair, an improved eight-direction neighborhood search algorithm is used to start boundary tracking in a counterclockwise direction from the starting end point; the two-dimensional coordinates of each pixel point are dynamically recorded in the tracking process, and a complete curve coordinate sequence is constructed. The recorded polar coordinates are down-sampled, the data amount is optimized, and the complete boundary curve data after end point correction and coordinate optimization is output. The curvature change value of each section of the curve is calculated, and the curvature mutation area and the gentle area are identified. A sparse sampling coefficient of 0.1 is used for the curvature change gentle area, and 1 coordinate point is reserved for every 10 pixel points. The original sampling density is maintained for the mutation area with a curvature change exceeding a preset threshold. Through dynamic sampling rate control, the key feature points of the curve shape are retained while the data amount is reduced. For example, the curvatures of each section of the curve are calculated, and the curvature threshold is set to 0.8. For the gentle area with a curvature less than 0.8, the sampling coefficient is 0.1, and 8 points are reserved for 80 points. For the mutation area with a curvature greater than or equal to 0.8, all 20 points are reserved. After down-sampling, 120 coordinate points are reserved for the curve, and the data amount is reduced by 85%. This is only an example for illustration, and is not limited.
[0028] The present application provides another technical solution, a vaginal wall mucosa fold degree evaluation method based on image processing, single fold curve feature extraction; The curve length feature is obtained by accumulating the Euclidean distance between adjacent pixel points on the curve. The curve length reflects the continuity of the fold. After fold detection, the curve length of the poor vaginal mirror image is short and similar to a straight line, while the long curve length represents rich folds and good vaginal wall folds. The curvature feature is obtained by calculating the ratio of the number of curve pixel points to the distance between the end points, which is used to quantify the bending degree of the curve. The more curved the fold curve is, the higher the number of pixel points detected by the fold curve is, that is, the higher the ratio of the number of fold curve pixels to the distance between the end points, the more curved the fold curve is, the larger the fold curvature is, and the better the vaginal wall fold is. The convex feature is obtained by calculating the angle between the midpoint of the curve and the line connecting the two end points, which is used to evaluate the convex height of the curve. The angle between the midpoint of the fold curve and the end points reflects the convex degree of the fold curve. The more convex the fold wall is, the smaller the angle is, and the better the vaginal wall fold is. The slope change feature is obtained by calculating the cumulative change value of the slope of the connecting line of adjacent coordinate points, which is used to quantify the fluctuation degree of the curve. The slope of the straight line connecting the two points in front of and behind the curve is calculated, that is, the angle between the straight line and the horizontal axis. The straight line connecting the two curve points in front of and behind is calculated, the slope of the straight line is calculated, the slope is converted to an angle, the angle of the entire curve is counted, and the difference between the two angles in front of and behind is calculated, and the absolute value is taken. The sum of the absolute values of the difference between the angles in front of and behind the entire curve is counted. The curve angle represents the direction of different positions of the curve, the absolute value of the difference between the angles in front of and behind represents the fluctuation degree of the curve, the larger the sum of the absolute values of all angle differences is, the larger the fluctuation degree is, the faster the trend change of the fold curve is, the more curved the fold is, and the richer the fold is. The formula is as follows: ; Wherein, y i represents the vertical coordinate of the i th point, x irepresents the horizontal coordinate of the i-th point, α i It represents the slope angle of the straight line connecting two points, α represents the sum of the absolute values of all angle differences of the curve; i represents the index of the curve point; The angle change feature is obtained by counting the proportion and number of points where the slope change exceeds a preset threshold, and is used to evaluate the turning frequency of the curve. The ratio of points where the absolute value of the difference between the front and back angles is greater than the threshold to the total number of points on the entire curve is calculated. A larger ratio indicates more fluctuating points. The number of points where the angle of each wrinkle curve is greater than a certain threshold is counted. Because the wrinkles of the vaginal wall present a wavy curve, this feature can effectively reflect the number of inflection points of the curve. The threshold is determined by historical data analysis or expert experience analysis. The inflection point sharpness feature is characterized by calculating the cosine value of the angle formed by each point on the curve with the previous and next points, and extracting the maximum cosine value as the inflection point sharpness index. The larger the maximum cosine value, the sharper the inflection point of the curve, and the greater the probability that the wrinkle curve is granulation tissue. The formula is as follows: ; Where cosθ is the cosine of the angle between the point on the calculated curve and the previous and next points. Significant inflection point features are obtained by counting the number of inflection points whose cosine values exceed a preset threshold. This is used to evaluate the local mutation characteristics of the curve. Points with cosine values greater than the threshold are considered inflection points of the curve. More inflection points indicate a wavy curve and better vaginal wall folds. The threshold is set to -0.92 based on the analysis of multiple curvature curves. The overall curvature characteristic is obtained by calculating the vertical distance from the maximum inflection point to the line connecting the endpoints, which is used to quantify the overall curvature of the curve. The larger the distance value, the greater the curvature of the wrinkle curve and the fuller the wrinkles. The formula is as follows: ; Distance is the distance from the point with the maximum cosine value to the straight line connecting the first and last points of the curve; (x q ,y q ,) and (x p ,y p ) are represented as the two endpoints of the curve; (x m ,y m ) represents the point where the maximum cosine value is located; Directional characteristics are obtained by calculating the direction angle of the line connecting the two end points of the curve. They are used to analyze the spatial distribution direction of the curve. The formula is as follows: ; Among them, β i Expressed as the slope of the curve at the starting and ending points.
[0029] The application provides another technical scheme, a vaginal wall mucosa rugosity evaluation system based on image processing, which comprises an image preprocessing module, a boundary extraction module, a feature extraction module, a classification module and an evaluation module. The image preprocessing module comprises a color space conversion module, a degradation processing module and an edge enhancement module; the color space conversion module is used for converting an RGB image into an LAB color space and extracting an L luminance channel to eliminate color interference; the degradation processing module is used for reducing image resolution through down-sampling and eliminating noise through multi-stage filtering; and the edge enhancement module is used for improving the contrast and continuity of the rugosity boundary through histogram equalization and an edge enhancement algorithm. The boundary extraction module comprises a connected domain analysis module, an endpoint detection module and a curve tracking module; the connected domain analysis module is used for performing connected domain labeling and numbering on the edge detection result to generate a binary matrix; the endpoint detection module is used for detecting endpoints by using a sliding window method and processing closed curves and multi-endpoint abnormal conditions; and the curve tracking module is used for implementing an eight-direction counterclockwise tracking algorithm to accurately record a boundary coordinate sequence. The feature extraction module comprises a single curve feature module, a global feature module and a feature standard module; the single curve feature module is used for acquiring single curve local features and quantifying single curve shapes; the global feature module is used for counting global features and describing global rugosity features; and the feature standard module is used for normalizing features. The classification module comprises a data set module, a classifier module and a classification evaluation module; the data set module is used for constructing a standard curve database; the classifier module is used for training a support vector machine model to realize automatic classification of curve shapes; and the classification evaluation module is used for evaluating classification performance through cross-validation and optimizing model parameters. The evaluation module comprises a clustering analysis module, a grade mapping module and a result verification module; the clustering analysis module is used for performing a K-means clustering algorithm to realize automatic division of a feature space; the grade mapping module is used for mapping clustering results into different evaluation grades; and the result verification module is used for performing confidence analysis and reliability verification on evaluation results.
[0030] It is apparent for those skilled in the art that the present application is not limited to the details of the foregoing exemplary embodiments, and the present application can be implemented in other concrete forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be considered as exemplary and non-restrictive in any respect, and the scope of the present application is defined by the appended claims rather than the foregoing description, and all changes falling within the meaning and range of equivalent elements of the claims are intended to be embraced in the present application. Any reference signs in the claims should not be considered as limiting the claims involved.
Claims
1. A method for evaluating vaginal wall mucosal wrinkles based on image processing, characterized by: The method includes: S1. Convert the colposcopic image from RGB space to LAB space and extract the brightness channel. Reduce interference through downsampling and filtering, enhance the contrast of the fold boundary, and use the edge detection algorithm to extract continuous and significant fold contours. S2: Treat each boundary as a connected domain and assign different values. Draw a binary graph for each connected domain, use a sliding window to detect endpoints, process abnormal endpoints, record curve coordinates using a counterclockwise tracking algorithm, and use curvature adaptive downsampling to complete boundary extraction. S3. Extracting the features of each wrinkle curve; the curve features include curve length features, curvature features, convexity features, slope change features, angle change features, inflection point sharpness features, significant inflection point features, overall curvature features, and direction features; S4. Based on the curve dataset, a support vector machine classifier is used to perform model training and morphological classification of the extracted wrinkle curves; the curve dataset includes long straight lines, approximate short straight lines, standard arcs, wavy arcs, and hilly arcs; S5. Count the number, proportion, and direction distribution of various curves in the image from a global perspective, extract comprehensive curve features, and comprehensively describe the richness and distribution patterns of vaginal wall folds; S6. Use the K-means clustering algorithm to select typical samples as the centroid. The typical samples include the characteristic distributions with the most hilly arcs, the most wavy arcs, the most long straight lines, and the most short straight lines. Through iterative calculation, the feature vectors of the image to be evaluated are divided into the nearest centroid category, and the evaluation results of the vaginal wall mucosal wrinkles are output.
2. The method for evaluating vaginal wall mucosal wrinkles based on image processing according to claim 1, characterized in that: Step S1 includes: S11, converting the RGB format color image captured by the colposcope into a LAB color space model, separating the brightness information and chromaticity information of the image through a color space conversion algorithm, and extracting the L brightness channel image in the LAB space; S12, downsampling the extracted L brightness channel image, using an image interpolation algorithm to reduce the image resolution, thereby reducing the image data volume while retaining the main wrinkle features; S13, using a mean filter to smooth the downsampled image to eliminate fine textures and random noise; using an anisotropic diffusion filter to enhance the continuity of wrinkle edges in the image; and using a Gaussian filter to smooth the image; S13, performing grayscale transformation on the filtered image using a histogram equalization algorithm, nonlinearly mapping the original grayscale interval to the full dynamic range based on the statistical characteristics of the image grayscale histogram, and enhancing the contrast difference between the fold boundary and the background area; S14. Use the Canny edge detection algorithm to identify the intensity gradient changes in the image and accurately extract the potential wrinkle boundary contours.
3. The method for evaluating vaginal wall mucosal wrinkles based on image processing according to claim 1, wherein: Step S2 includes: S21, marking each wrinkle boundary obtained by edge detection as an independent connected domain and assigning a unique identification value; generating a corresponding binary image matrix based on the independent connected domain, assigning a value of 1 to pixels on the curve of the independent connected domain and a value of 0 to pixels in the background area; S22, using a sliding window to traverse each pixel point on the connected domain curve, performing endpoint determination based on the spatial distribution characteristics of the neighborhood pixels, and establishing endpoint validity verification; S23. Based on the retained valid endpoint pairs, an improved eight-direction neighborhood search algorithm is used to track the boundary in a counterclockwise direction starting from the starting endpoint; during the tracking process, the two-dimensional coordinates of each pixel point are dynamically recorded to construct a complete curve coordinate sequence; S24. Adaptively downsample the recorded curve coordinates to optimize the data volume, and output complete boundary curve data after endpoint correction and coordinate optimization.
4. The method and system for evaluating vaginal wall mucosal wrinkles based on image processing according to claim 3, characterized in that: The establishment of endpoint validity verification includes: Determine the number of endpoints. A normal curve has two endpoints, while an abnormal curve has multiple endpoints or no endpoints. When the number of endpoints in the connected domain is 0, it is determined to be a closed contour formed by the colposcope's reflective points, not a wrinkle boundary, and the connected domain is directly removed; When the number of endpoints is greater than 2, the endpoints are combined in pairs, and the Euclidean distance between the two endpoints is calculated respectively. The two endpoints with the largest distance are retained, and the values of the remaining endpoints are set as the background area. Then, step S21 is re-entered to detect the endpoint positions of the independent connected domain until the number of endpoints of the independent connected domain is 2.
5. The method for evaluating vaginal wall mucosal wrinkles based on image processing according to claim 3, wherein: The adaptive downsampling comprises: Calculate the curvature change value of each segment of the curve to identify the areas with sudden changes in curvature and the areas with gentle changes in curvature. Use a sparse sampling coefficient of 0.1 for the areas with gentle changes in curvature, and retain one coordinate point for every 10 pixels. Maintain the original sampling density for the sudden changes in curvature that exceed the preset threshold.
6. The method for evaluating vaginal wall mucosal wrinkles based on image processing according to claim 1, wherein: The curve length feature is obtained by accumulating the Euclidean distance between adjacent pixels on the curve; the curvature feature is obtained by calculating the ratio of the number of pixels on the curve to the straight-line distance between the endpoints, and is used to quantify the curvature of the curve; the convexity feature is obtained by calculating the angle between the midpoint of the curve and the line connecting the two endpoints, and is used to evaluate the convexity height of the curve; The slope change feature is obtained by calculating the cumulative change value of the slope of the line connecting adjacent coordinate points, and is used to quantify the degree of fluctuation of the curve; the angle change feature is obtained by counting the proportion and number of points whose slope changes exceed a preset threshold, and is used to evaluate the turning frequency of the curve; the inflection point sharpness feature is obtained by calculating the cosine value of the angle formed by each point on the curve with the previous point and the next point, and extracting the maximum cosine value as the inflection point sharpness index; the significant inflection point feature is obtained by counting the number of inflection points whose cosine value exceeds a preset threshold, and is used to evaluate the local mutation feature of the curve; the overall curvature feature is obtained by calculating the vertical distance from the maximum inflection point to the line connecting the endpoints, and is used to quantify the overall curvature amplitude of the curve; the direction feature is obtained by calculating the direction angle of the line connecting the two end points of the curve, and is used to analyze the spatial distribution direction of the curve.
7. The method for evaluating vaginal wall mucosal wrinkles based on image processing according to claim 1, wherein: Step S4 includes: S41. Annotate the extracted wrinkle curves and assign unique category labels to construct a curve dataset, where the curve dataset includes long straight lines, approximate short straight lines, standard arcs, wavy arcs, and hilly arcs. S42, dividing the annotated curve data set into a training set and a test set according to a preset ratio, wherein the training set is used for model parameter learning, and the test set is used for evaluating the generalization ability of the model; normalizing the curve features extracted from the curve data, mapping each feature value to a unified interval through linear transformation, and eliminating the influence of different feature dimensions on the classification results; S43. Use the support vector machine algorithm to build a multi-classification model, transform the feature vector into a high-dimensional space through kernel function mapping, use the training set feature vector and label to iteratively solve the optimal classification hyperplane, and learn the characteristic distribution law of different morphological curves; S44, using a test set to perform a quantitative evaluation of the multi-classification model, wherein the evaluation includes accuracy, area under the curve, and confusion matrix analysis; S45. Input the feature vector of the wrinkle curve to be classified into the trained classification model and output the corresponding curve morphology category probability distribution; perform confidence test on the classification result, filter low confidence predictions, and ensure the reliability of the final classification result.
8. The method for evaluating vaginal wall mucosal wrinkles based on image processing according to claim 1, wherein: The comprehensive curve characteristics include the average length of all wrinkle curves, the average length of the five longest curves, the number of wavy arcs, the proportion of wavy arcs to the total number of curves, the number of hilly arcs, the proportion of hilly arcs to the total number of curves, the number of standard arcs, the proportion of standard arcs to the total number of curves, the number of approximate long straight lines, the proportion of approximate long straight lines to the total number of curves, the curve direction distribution, the average number of significant inflection points per curve and the total number of curves with high bending angles.
9. The method for evaluating vaginal wall mucosal wrinkles based on image processing according to claim 1, wherein: Step S6 includes: S61. Based on the comprehensive curve characteristics, select typical samples as initial cluster centroids; the typical samples include characteristic distributions with the most hilly arcs, the most wavy arcs, the most long straight lines, and the most short straight lines; S62, normalizing the comprehensive curve features of the image to be evaluated to form a feature vector as input data for cluster analysis; S63, calculating the Euclidean distance between the feature vector of the image to be evaluated and each centroid, and classifying the feature vector into the centroid category closest to the feature vector according to the nearest neighbor principle; S64. Based on the mean of the feature vectors of all classified samples, update the centroid position of each category; S65, repeating steps S62 to S63 until the centroid position no longer changes significantly or a preset number of iterations is reached; S66. Correspond the four finally converged clustering results to different evaluation levels, and output the wrinkle evaluation level of the image to be evaluated, where the evaluation levels include high wrinkle, good wrinkle, average wrinkle and low wrinkle.
10. A vaginal wall mucosal wrinkle assessment system based on image processing, characterized by: The system includes an image preprocessing module, a boundary extraction module, a feature extraction module, a classification module and an evaluation module; The image preprocessing module includes a color space conversion module, a degradation processing module and an edge enhancement module; the color space conversion module is used to convert the RGB image into the LAB color space and extract the L brightness channel to eliminate color interference; the degradation processing module reduces the image resolution by downsampling and uses multi-stage filtering to eliminate noise; The edge enhancement module improves the contrast and continuity of the wrinkle boundary through histogram equalization and edge enhancement algorithm; The boundary extraction module includes a connected domain analysis module, an endpoint detection module and a curve tracking module; the connected domain analysis module marks and numbers the connected domains of the edge detection results to generate a binary matrix; The endpoint detection module uses a sliding window method to detect endpoints and handle closed curves and multi-endpoint anomalies; the curve tracking module implements an eight-direction counterclockwise tracking algorithm to accurately record the boundary coordinate sequence; The feature extraction module includes a single curve feature module, a global feature module and a feature standard module; the single curve feature module obtains the local features of the single curve and quantifies the single curve morphology; the global feature module counts the global features and describes the global wrinkle features; The feature standard module is used to normalize the features; The classification module includes a data set module, a classifier module and a classification evaluation module; the data set module constructs a standard curve database; the classifier module trains a support vector machine model to achieve automatic classification of curve morphology; the classification evaluation module evaluates classification performance through cross-validation and optimizes model parameters; The evaluation module includes a cluster analysis module, a level mapping module and a result verification module; the cluster analysis module performs a K-means clustering algorithm to realize automatic division of the feature space; the level mapping module maps the clustering results to different evaluation levels; the result verification module performs confidence analysis and reliability verification on the evaluation results.
Citation Information
Cited By
Automatic segmentation system for colorectal tumor CT image
CN121073823A