An ovarian mass medical image-based boundary recognition method
By performing unified grayscale processing and multi-scale gradient feature encoding on medical images of ovarian masses, combined with spatial topological constraints and anatomical morphology optimization, accurate boundaries of ovarian masses are generated, solving the problem of unclear boundary recognition in existing technologies and achieving high-precision and high-reliability boundary recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TONGJI HOSPITAL ATTACHED TO TONGJI MEDICAL COLLEGE HUAZHONG SCI TECH
- Filing Date
- 2026-05-27
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, the ability to capture the boundaries of medical images of ovarian masses with irregular shapes and small volumes is weak, which can easily lead to missed detection of boundaries and unclear outlines.
By performing voxel grayscale normalization and spatial interlayer registration on medical images of ovarian masses, a unified grayscale image sequence is generated. A multi-scale neighborhood gradient direction feature response matrix is constructed, boundary seed points are selected, path growth operation is performed, an initial boundary contour line is generated, and the final closed boundary recognition result is output through sub-pixel level fitting and ovarian anatomical morphology constraint optimization.
It improves the accuracy and anti-interference ability of ovarian mass boundary recognition, generates closed boundaries that fit the true shape of the lesion, and outputs the recognition confidence level to reduce human recognition bias.
Smart Images

Figure CN122289700A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, specifically to a boundary recognition method based on medical images of ovarian masses. Background Technology
[0002] Ovarian masses refer to cystic or solid space-occupying lesions in the ovarian region. They are a common gynecological problem and can occur at any age. Most are benign, such as follicular cysts, corpus luteum cysts, teratomas, and chocolate cysts, while a small number may be malignant tumors.
[0003] Patent application No. 202211009842.4 discloses a method and program for identifying ovarian cysts based on ultrasound medical images. This application aims to address the problem that "most ovarian cysts can disappear spontaneously, but in severe cases, if not diagnosed and treated in time, they may lead to secondary infections, cyst rupture, torsion, etc., which can adversely affect the patient's life and work, and even threaten their life. In particular, the prognosis of malignant cysts is related to their stage, the size of the residual lesion after the initial surgery, and the pathological type."
[0004] However, existing technologies have weak ability to capture the boundaries of medical images of ovarian masses with irregular shapes and small volumes, which can easily lead to missed detection of boundaries and unclear outlines.
[0005] To address this, we propose a boundary recognition method based on medical images of ovarian masses. Summary of the Invention
[0006] In view of the above-mentioned shortcomings of the existing technology, the present invention provides a boundary recognition method based on medical images of ovarian masses, which can effectively solve the problems of the existing technology.
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions; This invention discloses a boundary recognition method based on medical images of ovarian masses, comprising: The process involves acquiring medical tomographic images of the ovarian mass to be processed, performing voxel grayscale normalization and spatial inter-layer registration to generate a single-channel grayscale image sequence with uniform spatial dimensions and standardized grayscale distribution. For the standardized single-channel grayscale image sequence, multi-scale neighborhood gradient direction feature encoding is performed to construct feature response matrices corresponding to different voxel neighborhood ranges. Boundary seed point selection is performed on the feature response matrices, marking voxel points that simultaneously satisfy gradient magnitude threshold constraints and gradient direction consistency constraints to establish an initial boundary candidate point set. For the initial boundary candidate point set, a path growth operation based on spatial topological constraints is performed. Following a preset gradient direction continuity and voxel spatial adjacency judgment logic, ordered connections and isolated noise point removal are executed for the candidate points to generate an initial boundary contour. Subpixel-level contour fitting is performed on the initial boundary contour. Based on the grayscale distribution characteristics of the contour's neighboring voxels, the spatial coordinate deviation of the contour is corrected, and discontinuous segments of the contour are filled in to generate a complete boundary contour. Closure verification and ovarian anatomical morphology constraint optimization are performed on the complete boundary contour, outputting the mass closed boundary recognition result.
[0008] Furthermore, in the registration process, the intermediate layer image of the ovarian mass medical tomographic image is used as the registration reference layer, and the spatial coordinate system of the reference layer is determined to be a standard spatial coordinate system that is unified throughout the entire sequence. For the remaining layers of images to be registered, a six-degree-of-freedom three-dimensional rigid space transformation based on voxel gray-level mutual information is performed. The rigid space transformation is a three-dimensional spatial translation transformation and rotation transformation. With the goal of maximizing the voxel gray-level mutual information between the image to be registered and the reference layer image, the optimal transformation parameters are obtained. Based on the optimal transformation parameters, the spatial coordinate mapping of all voxels in the image to be registered is completed, so that the spatial coordinate systems of all tomographic images are completely unified and aligned, and a tomographic image sequence with unified spatial dimensions is generated. For the tomographic image sequence of the registered spatial coordinate system, a normalization process is performed that takes into account both the consistency of grayscale distribution within the layer and the correlation of grayscale between layers, to obtain a single-channel grayscale image sequence.
[0009] Furthermore, when constructing the feature response matrix, for each voxel in the standardized single-channel grayscale image sequence, at least three sets of three-dimensional neighborhoods with different spatial radii are constructed to form a multi-scale neighborhood set; For each voxel neighborhood at each scale, the three-dimensional spatial gradient vector of each voxel in the neighborhood is calculated. Based on the direction distribution and spatial position distribution of the gradient vector, gradient direction feature encoding is performed to obtain the feature response value of the voxel at the corresponding scale. Traverse all voxels in the entire sequence, and concatenate the feature response values of each voxel according to the scale dimension to generate a feature response matrix that matches the spatial dimension of the image sequence and corresponds to the neighborhood range of different voxels.
[0010] Furthermore, after constructing the feature response matrices corresponding to different voxel neighborhood ranges, and before performing the boundary seed point selection operation, the process also includes performing cross-scale feature fusion processing on the feature response matrices corresponding to multiple scales to generate a unified fused feature response matrix: For the feature response matrix corresponding to each scale, the gradient direction distribution dispersion of the feature response value of the voxel within a preset neighborhood at the corresponding scale is calculated on a per-voxel basis. Based on the gradient direction distribution dispersion, the fusion weight coefficient of the scale corresponding to the voxel position is determined. Based on the fusion weight coefficient of each voxel position at different scales, a voxel-by-voxel nonlinear fusion process is performed on the multi-scale feature response matrix to generate the fused feature response matrix.
[0011] Furthermore, when establishing the initial boundary candidate point set, for each voxel in the feature response matrix, a gradient magnitude threshold constraint determination is first performed, and voxels with feature response values not lower than a preset magnitude threshold are retained to generate a magnitude screening candidate voxel set. For each voxel in the magnitude screening candidate voxel set, a gradient direction consistency constraint determination is performed, and the deviation distribution between the gradient direction of all voxels in the preset neighborhood of the voxel and the main gradient direction of the voxel is calculated. Voxels whose deviations meet the preset consistency requirements are marked as boundary seed points. Finally, all boundary seed points that meet the requirements are summarized to establish the initial boundary candidate point set.
[0012] Furthermore, the initial boundary contour generation operation conforms to: From the initial set of candidate boundary points, select the voxel with the best gradient direction consistency as the starting seed point for path growth; Starting from the initial seed point, search for adjacent candidate points within a preset spatial adjacency range along the orthogonal tangent direction of the principal gradient direction of the voxel. Based on the gradient direction continuity constraint and the spatial position continuity constraint, calculate the growth cost of the candidate points. Incorporate candidate points with growth costs lower than the preset cost threshold into the current boundary path and use the candidate point as a new growth starting point to iteratively execute the growth operation. When iterative growth fails to include new candidate points, complete the growth of a single boundary path, traverse the remaining voxels in the initial boundary candidate point set that have not been included in any path, repeat the above growth operation, and generate several initial boundary paths. Perform path length filtering on all initial boundary paths, remove isolated noise paths with path lengths lower than a preset length threshold, and connect the remaining boundary paths end to end according to spatial adjacency to generate the initial boundary outline. The growth cost of the candidate points is: ; In the formula: Let p be the growth cost from the current growth point p to the candidate point q. This is the direction vector of the boundary tangent at the current growth point p; Let q be the spatial position vector of the candidate point relative to the current growth point p; These are the three-dimensional gradient vectors of the growth point p and the candidate point q, respectively.
[0013] Furthermore, in the stage of generating the complete boundary contour, the initial boundary contour line is subjected to equally spaced discrete sampling to extract a number of contour control points. Each contour control point corresponds to a discrete coordinate point on the initial boundary contour line. For each contour control point, the voxel gray value and corresponding spatial coordinates in the preset neighborhood range in the normal direction of the control point are extracted to construct a spatial distribution model of gray gradient. Based on the spatial distribution extreme value characteristics of gray-level gradient, the sub-pixel level precise coordinates of the control point are calculated to complete the spatial coordinate deviation correction of the contour line. For the discontinuous segments in the corrected contour, spline interpolation is performed to complete the contour based on the continuity of the tangent direction and gradient direction of the contour at both ends of the discontinuous segment and the spatial topological constraints, so as to obtain a continuous sub-pixel level contour. Global smoothing is performed on continuous subpixel-level contour lines to generate complete boundary contours.
[0014] Furthermore, when performing closure verification on the complete boundary contour, the spatial distance between the beginning and end endpoints of the contour line is calculated. If the spatial distance is lower than the preset closure threshold, the beginning and end endpoints are directly connected to generate a closed contour. If the spatial distance is not lower than the preset closure threshold, closure completion processing is performed based on the gradient direction of the contour line and the spatial topological constraints to obtain the initial closed contour. The initial closed contour is optimized based on the anatomical morphology constraints of the ovary. Based on the prior anatomical morphology of the ovary and the mass, the curvature distribution of the contour line is smoothed and constrained. The contour distortion segments that do not conform to the preset curvature range are removed. The optimized contour line is refitted to obtain the optimized closed contour. The optimized closed contour is then output as the mass closure boundary recognition result. The curvature constraint optimization term of the contour line is calculated using the following formula: ; In the formula: Optimize the energy term for the curvature of the contour line; The path for the initial closed contour; This represents the curvature value of the contour line at arc length l; The global average curvature of the contour line; The derivative of the arc length of the contour line.
[0015] Furthermore, when outputting the results of tumor closure boundary identification, the confidence quantification result of the identification of the closure boundary is also output simultaneously: ; In the formula: The overall confidence score for identifying the closed boundary of the mass; M is the total number of contour control points on the closed boundary; Let be the coordinates of the m-th contour control point; This is the fused characteristic response value at this control point; This is the gradient direction consistency quantization value at this control point; These are the subpixel level coordinates of the control point; These are the initial integer coordinates of the control point; This is the preset maximum coordinate deviation threshold.
[0016] Compared with the known prior art, the technical solution provided by this invention has the following beneficial effects: In this invention, the method first performs spatial registration and grayscale normalization on the medical tomographic image of the ovarian mass to unify the image dimension and grayscale distribution. A feature response matrix is constructed through multi-scale neighborhood gradient direction feature encoding. Then, cross-scale feature fusion is used to enhance the effective response of the real boundary and weaken non-boundary random fluctuations. Boundary seed points are selected based on the dual constraints of gradient magnitude and direction to accurately eliminate invalid interference points. Path growth is carried out in combination with spatial topological constraints to orderly connect candidate points and eliminate isolated noise points, forming an initial boundary contour. The coordinate deviation is corrected and discontinuous segments are filled through sub-pixel contour fitting. The contour is then optimized through closure check and ovarian anatomical morphology constraints to make the recognition boundary fit the real shape of the lesion. At the same time, the recognition confidence is output simultaneously, which improves the overall accuracy and anti-interference ability of boundary recognition. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0018] Figure 1 This is a flowchart illustrating a boundary recognition method based on medical images of ovarian masses. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] The present invention will be further described below with reference to embodiments.
[0021] Example: This embodiment presents a boundary recognition method based on medical images of ovarian masses, such as... Figure 1 As shown, it includes: Acquire medical tomographic images of the ovarian mass to be processed, perform voxel grayscale normalization and spatial interlayer registration on the images, and generate a single-channel grayscale image sequence with uniform spatial dimensions and standardized grayscale distribution. During the registration process, the intermediate layer of the ovarian mass medical tomographic image is used as the registration reference layer, and the spatial coordinate system of the reference layer is determined to be a standard spatial coordinate system that is unified throughout the entire sequence. For the remaining layers of images to be registered, a six-degree-of-freedom three-dimensional rigid space transformation based on voxel gray-level mutual information is performed. The rigid space transformation is a three-dimensional spatial translation transformation and rotation transformation. With the goal of maximizing the voxel gray-level mutual information between the image to be registered and the reference layer image, the optimal transformation parameters are obtained. Based on the optimal transformation parameters, the spatial coordinate mapping of all voxels in the image to be registered is completed, so that the spatial coordinate systems of all tomographic images are completely unified and aligned, and a tomographic image sequence with unified spatial dimensions is generated. For the tomographic image sequence of the registered spatial coordinate system one, a normalization process that takes into account both the consistency of gray-level distribution within the layer and the correlation of gray-level between layers is performed to obtain a single-channel gray-level image sequence. For the standardized single-channel grayscale image sequence, multi-scale neighborhood gradient direction feature encoding is performed to construct feature response matrices corresponding to different voxel neighborhood ranges; When constructing the feature response matrix, for each voxel in the standardized single-channel grayscale image sequence, at least three sets of three-dimensional neighborhoods with different spatial radii are constructed to form a multi-scale neighborhood set. For each voxel neighborhood at each scale, the three-dimensional spatial gradient vector of each voxel in the neighborhood is calculated. Based on the direction distribution and spatial position distribution of the gradient vector, gradient direction feature encoding is performed to obtain the feature response value of the voxel at the corresponding scale. Traverse all voxels in the entire sequence, and concatenate the feature response values of each voxel according to the scale dimension to generate a feature response matrix that matches the spatial dimension of the image sequence and corresponds to the neighborhood range of different voxels. The formula for calculating the feature response value of a single voxel at a single scale is as follows: ; In the formula: Let (x, y, z) be the characteristic response value of the voxel at coordinates (x, y, z) at scale s; Let s be the three-dimensional neighborhood space of the voxel at scale s; The three-dimensional gradient vector of the voxel at coordinates (u,v,w) in the neighborhood; is the spatial position vector of a voxel in the neighborhood relative to the central voxel, and × is the vector cross product operation; The total number of voxels in the neighborhood of this scale; The above formula can accurately quantify the boundary feature response intensity of the central voxel at different scales by taking the mean absolute value after performing a cross product operation on the gradient vector and the relative position vector in the three-dimensional neighborhood of the voxel. Based on the joint calculation logic of gradient and spatial position, it can effectively distinguish between boundary voxels and non-boundary voxels, and maximize the boundary discrimination and anti-interference ability of multi-scale feature extraction. After constructing the feature response matrices corresponding to different voxel neighborhood ranges, and before performing the boundary seed point selection operation, the process also includes performing cross-scale feature fusion processing on the feature response matrices corresponding to multiple scales to generate a unified fused feature response matrix. For the feature response matrix corresponding to each scale, the gradient direction distribution dispersion of the feature response value of the voxel within the preset neighborhood at the corresponding scale is calculated on a per-voxel basis. Based on the gradient direction distribution dispersion, the fusion weight coefficient of the scale corresponding to the voxel position is determined. The lower the gradient direction distribution dispersion, the higher the stability of the feature response direction at the voxel position at that scale, which means that the corresponding fusion weight coefficient is larger. Based on the fusion weight coefficient of each voxel position at different scales, a voxel-by-voxel nonlinear fusion process is performed on the multi-scale feature response matrix to enhance the effective feature response of the voxel position corresponding to the real boundary, weaken the random feature fluctuations in the non-boundary region, and generate a fused feature response matrix. This provides a unified feature basis with better boundary discrimination and stronger anti-interference ability for the subsequent boundary seed point selection operation. Perform a boundary seed point screening operation on the feature response matrix, mark the voxel points that simultaneously satisfy the gradient magnitude threshold constraint and the gradient direction consistency constraint, and establish an initial boundary candidate point set; When establishing the initial boundary candidate point set, for each voxel in the feature response matrix, a gradient magnitude threshold constraint is first performed to retain voxels whose feature response values are not lower than the preset magnitude threshold, generating a magnitude screening candidate voxel set. For each voxel in the magnitude screening candidate voxel set, a gradient direction consistency constraint is performed to calculate the deviation distribution between the gradient direction of all voxels in the preset neighborhood of the voxel and the main gradient direction of the voxel. Voxels whose deviations meet the preset consistency requirements are marked as boundary seed points. Finally, all boundary seed points that meet the requirements are summarized to establish the initial boundary candidate point set. For the initial set of candidate boundary points, a path growth operation based on spatial topological constraints is performed. According to the preset gradient direction continuity and voxel space adjacency judgment logic, the candidate points are ordered and isolated noise points are removed to generate the initial boundary contour line. The initial boundary contour generation operation follows the following rules: From the initial set of candidate boundary points, select the voxel with the best gradient direction consistency as the starting seed point for path growth; Starting from the initial seed point, search for adjacent candidate points within a preset spatial adjacency range along the orthogonal tangent direction of the principal gradient direction of the voxel. Based on the gradient direction continuity constraint and the spatial position continuity constraint, calculate the growth cost of the candidate points. Incorporate candidate points with growth costs lower than the preset cost threshold into the current boundary path and use the candidate point as a new growth starting point to iteratively execute the growth operation. When iterative growth fails to include new candidate points, complete the growth of a single boundary path, traverse the remaining voxels in the initial boundary candidate point set that have not been included in any path, repeat the above growth operation, and generate several initial boundary paths. Perform path length filtering on all initial boundary paths, remove isolated noise paths with path lengths lower than a preset length threshold, and connect the remaining boundary paths end to end according to spatial adjacency to generate the initial boundary outline. The growth cost of the candidate points is: ; In the formula: Let p be the growth cost from the current growth point p to the candidate point q. The boundary tangent direction vector at the current growth point p is obtained orthogonally to the principal gradient direction at that point. Let q be the spatial position vector of the candidate point relative to the current growth point p; These are the three-dimensional gradient vectors of the growth point p and the candidate point q, respectively. The above formula sums the angle between the boundary tangent direction and the spatial position vector, and the angle between the gradient vectors of the two points, in order to quantify the rationality of the boundary path growth. At the same time, it takes into account the dual constraints of gradient direction continuity and spatial adjacency, which can accurately select the optimal growth point and eliminate invalid noise paths, ensuring the coherence and accuracy of boundary contour generation. Subpixel-level contour fitting is performed on the initial boundary contour. Based on the gray-scale distribution characteristics of the neighborhood voxels of the contour, the spatial coordinate deviation of the contour is corrected, the discontinuous segments of the contour are filled in, and a complete boundary contour is generated. In the stage of generating the complete boundary contour, the initial boundary contour line is sampled at equal intervals to extract several contour control points. Each contour control point corresponds to a discrete coordinate point on the initial boundary contour line. For each contour control point, the voxel gray value and corresponding spatial coordinates in the preset neighborhood range in the normal direction of the control point are extracted to construct a spatial distribution model of gray gradient. Based on the spatial distribution extreme value characteristics of gray-level gradient, the sub-pixel level precise coordinates of the control point are calculated to complete the spatial coordinate deviation correction of the contour line. For the discontinuous segments in the corrected contour, spline interpolation is performed to complete the contour based on the continuity of the tangent direction and gradient direction of the contour at both ends of the discontinuous segment and the spatial topological constraints, so as to obtain a continuous sub-pixel level contour. Perform global smoothing on continuous subpixel-level contour lines to generate complete boundary contours; The calculation process for sub-pixel level precise coordinates is as follows: ; In the formula: t is the position offset along the unit normal vector of the boundary; t represents the voxel gradient magnitude at the position corresponding to the offset t; a, b, and c are the coefficients obtained from the quadratic polynomial fitting. This is the optimal offset when the gradient magnitude reaches its extreme value; The corrected subpixel level contour control point coordinate vector; The initial integer coordinate vector of the contour control points; This is the boundary unit normal vector at this control point; This formula fits the gray-level gradient distribution of the boundary normal using a quadratic polynomial, finds the optimal offset corresponding to the extreme value of the gradient magnitude, and corrects the initial coordinates of the contour control points to achieve sub-pixel level precise boundary positioning, making up for the accuracy deviation of integer coordinate positioning, and making the boundary contour more closely match the true edge shape of the ovarian mass. Perform closure verification and ovarian anatomical morphology constraint optimization on the complete boundary contour, and output the results of the closed boundary recognition of the mass. When performing a closure check on a complete boundary contour, the spatial distance between the beginning and end endpoints of the contour line is calculated. If the spatial distance is lower than the preset closure threshold, the beginning and end endpoints are directly connected to generate a closed contour. If the spatial distance is not lower than the preset closure threshold, closure completion processing is performed based on the gradient direction of the contour line and the spatial topological constraints to obtain the initial closed contour. The initial closed contour is optimized based on the anatomical morphology constraints of the ovary. Based on the prior anatomical morphology of the ovary and the mass, the curvature distribution of the contour line is smoothed and constrained. The contour distortion segments that do not conform to the preset curvature range are removed. The optimized contour line is refitted to obtain the optimized closed contour. The optimized closed contour is then output as the mass closure boundary recognition result. The curvature constraint optimization term of the contour line is calculated using the following formula: ; In the formula: Optimize the energy term for the curvature of the contour line; The path for the initial closed contour; This represents the curvature value of the contour line at arc length l; The global average curvature of the contour line; The differential of the arc length of the contour line; The above formula quantifies the degree of distortion of the contour curvature by calculating the integral of the square of the difference between the curvature of each point of the contour and the global average curvature. Combined with the prior knowledge of ovarian anatomy for constraint optimization, it can smooth the distribution of contour curvature, eliminate abnormal distortion segments, and make the boundary of the identified mass more consistent with the characteristics of human anatomical structure. When outputting the results of tumor closure boundary identification, the confidence quantification result of the identification of the closure boundary is also output simultaneously: ; In the formula: The overall confidence score for identifying the closed boundary of the mass is defined, with a value range of [0,1]; M is the total number of contour control points on the closed boundary. Let be the coordinates of the m-th contour control point; This is the fused characteristic response value at this control point; This is the gradient direction consistency quantization value at this control point; These are the subpixel level coordinates of the control point; These are the initial integer coordinates of the control point; This is the preset maximum coordinate deviation threshold.
[0022] In the confidence calculation process, three core indicators are integrated: feature response value of contour control points, gradient direction consistency, and coordinate correction deviation. The overall recognition confidence is quantified through mean calculation, which intuitively reflects the reliability of the boundary recognition results and provides quantifiable credibility support for medical image analysis of ovarian masses. In this embodiment, when the above method is applied to the medical image boundary recognition scenario of ovarian masses, it can first unify the spatial dimension and grayscale distribution of the image, and then effectively remove noise and generate an initial contour through multi-scale gradient feature encoding, precise selection of boundary seed points, and spatial topology path growth. After sub-pixel fitting, closure verification, and ovarian anatomical morphology optimization, a complete and closed mass boundary is accurately generated. It can also output the recognition confidence level simultaneously, effectively improving the accuracy, stability, and anti-interference ability of boundary recognition, reducing human recognition bias, and providing effective support for the clinical diagnosis, accurate measurement of lesions, and disease assessment of ovarian masses.
[0023] Regarding the system in the above embodiments, when applied to the medical image processing scenario of ovarian masses: In clinical settings involving MRI images of pelvic and ovarian masses in women, this method enables precise extraction of the mass boundaries. The specific implementation process is as follows: First, MRI tomographic images of the patient's ovarian mass are acquired. The middle layer of the image is used as the registration reference layer. Three-dimensional rigid spatial transformation and spatial registration are performed on the remaining layers. Then, grayscale normalization processing is carried out to generate a single-channel grayscale image sequence with uniform spatial dimensions and standardized grayscale distribution.
[0024] Subsequently, three sets of three-dimensional neighborhoods with different spatial radii are constructed for each voxel in the sequence to complete multi-scale gradient direction feature encoding and generate corresponding feature response matrices. By calculating the dispersion of gradient direction distribution at different scales of each voxel, the fusion weights are determined, cross-scale feature fusion is completed, and a unified feature response matrix with stronger anti-interference ability is obtained.
[0025] Next, voxels with satisfactory feature response values and consistent gradient directions are selected to form an initial set of candidate boundary points. The voxel with the best gradient direction consistency is selected as the starting seed point. Adjacent candidate points are searched along the orthogonal tangent direction. After calculating the growth cost, the path growth is iteratively completed. Short-distance noise paths are eliminated and effective paths are connected to generate the initial boundary contour line.
[0026] Then, control points are extracted by sampling the initial contour line at equal intervals, and the sub-pixel level accurate coordinates of each control point are calculated to correct the contour deviation. Interpolation and global smoothing are performed on the discontinuous sections of the contour to generate a complete boundary contour.
[0027] Finally, the contour closure is checked, the beginning and end points are connected to form an initial closed contour, the curvature is optimized by combining the anatomical morphology of the ovary, the contour distortion segment is removed, and the final result of the closed boundary recognition of the mass is obtained. The confidence of the boundary recognition is calculated to be 0.92.
[0028] In summary, the method described above constructs a feature response matrix through multi-scale neighborhood gradient direction feature encoding, then enhances the effective response of the real boundary and weakens non-boundary random fluctuations through cross-scale feature fusion. Based on the dual constraints of gradient magnitude and direction, boundary seed points are selected to accurately eliminate invalid interference points. Path growth is carried out in combination with spatial topological constraints to orderly connect candidate points and eliminate isolated noise points, forming an initial boundary contour. The coordinate deviation is corrected and discontinuous segments are filled through sub-pixel contour fitting. The contour is then optimized through closure verification and ovarian anatomical morphology constraints to make the recognition boundary fit the real shape of the lesion. At the same time, the recognition confidence is output simultaneously, which improves the overall accuracy and anti-interference ability of boundary recognition.
[0029] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A boundary recognition method based on medical images of ovarian masses, characterized in that, include: Acquire medical tomographic images of the ovarian mass to be processed, perform voxel grayscale normalization and spatial interlayer registration on the images, and generate a single-channel grayscale image sequence with uniform spatial dimensions and standardized grayscale distribution. For the standardized single-channel grayscale image sequence, multi-scale neighborhood gradient direction feature encoding is performed to construct feature response matrices corresponding to different voxel neighborhood ranges; Perform a boundary seed point screening operation on the feature response matrix, mark the voxel points that simultaneously satisfy the gradient magnitude threshold constraint and the gradient direction consistency constraint, and establish an initial boundary candidate point set; For the initial set of candidate boundary points, a path growth operation based on spatial topological constraints is performed. According to the preset gradient direction continuity and voxel space adjacency judgment logic, the candidate points are ordered and isolated noise points are removed to generate the initial boundary contour line. Subpixel-level contour fitting is performed on the initial boundary contour. Based on the gray-scale distribution characteristics of the neighborhood voxels of the contour, the spatial coordinate deviation of the contour is corrected, the discontinuous segments of the contour are filled in, and a complete boundary contour is generated. The complete boundary contour is subjected to closure verification and ovarian anatomical morphology constraint optimization, and the results of the mass closure boundary recognition are output.
2. The boundary recognition method based on medical images of ovarian masses according to claim 1, characterized in that, In the registration process, the intermediate layer image of the ovarian mass medical tomographic image is used as the registration reference layer, and the spatial coordinate system of the reference layer is determined to be a standard spatial coordinate system that is unified throughout the entire sequence. For the remaining layers of images to be registered, a six-degree-of-freedom three-dimensional rigid space transformation based on voxel gray-level mutual information is performed. The rigid space transformation is a three-dimensional spatial translation transformation and rotation transformation. With the goal of maximizing the voxel gray-level mutual information between the image to be registered and the reference layer image, the optimal transformation parameters are obtained. Based on the optimal transformation parameters, the spatial coordinate mapping of all voxels in the image to be registered is completed, so that the spatial coordinate systems of all tomographic images are completely unified and aligned, and a tomographic image sequence with unified spatial dimensions is generated. For the tomographic image sequence of the registered spatial coordinate system, a normalization process is performed that takes into account both the consistency of grayscale distribution within the layer and the correlation of grayscale between layers, to obtain a single-channel grayscale image sequence.
3. The boundary recognition method based on medical images of ovarian masses according to claim 1, characterized in that, When constructing the feature response matrix, for each voxel in the standardized single-channel grayscale image sequence, at least three sets of three-dimensional neighborhoods with different spatial radii are constructed to form a multi-scale neighborhood set. For each voxel neighborhood at each scale, the three-dimensional spatial gradient vector of each voxel in the neighborhood is calculated. Based on the direction distribution and spatial position distribution of the gradient vector, gradient direction feature encoding is performed to obtain the feature response value of the voxel at the corresponding scale. Traverse all voxels in the entire sequence, and concatenate the feature response values of each voxel according to the scale dimension to generate a feature response matrix that matches the spatial dimension of the image sequence and corresponds to the neighborhood range of different voxels.
4. The boundary recognition method based on medical images of ovarian masses according to claim 3, characterized in that, After constructing the feature response matrices corresponding to different voxel neighborhood ranges, and before performing the boundary seed point selection operation, the process also includes performing cross-scale feature fusion processing on the feature response matrices corresponding to multiple scales to generate a unified fused feature response matrix. For the feature response matrix corresponding to each scale, the gradient direction distribution dispersion of the feature response value of the voxel within a preset neighborhood at the corresponding scale is calculated on a per-voxel basis. Based on the gradient direction distribution dispersion, the fusion weight coefficient of the scale corresponding to the voxel position is determined. Based on the fusion weight coefficient of each voxel position at different scales, a voxel-by-voxel nonlinear fusion process is performed on the multi-scale feature response matrix to generate the fused feature response matrix.
5. The boundary recognition method based on medical images of ovarian masses according to claim 1, characterized in that, When establishing the initial boundary candidate point set, for each voxel in the feature response matrix, a gradient magnitude threshold constraint determination is first performed, and voxels with feature response values not lower than a preset magnitude threshold are retained to generate a magnitude screening candidate voxel set. For each voxel in the magnitude screening candidate voxel set, a gradient direction consistency constraint determination is performed, and the deviation distribution between the gradient direction of all voxels in the preset neighborhood of the voxel and the main gradient direction of the voxel is calculated. Voxels whose deviations meet the preset consistency requirements are marked as boundary seed points. Finally, all boundary seed points that meet the requirements are summarized to establish the initial boundary candidate point set.
6. The boundary recognition method based on medical images of ovarian masses according to claim 1, characterized in that, The initial boundary contour generation operation follows the following: From the initial set of candidate boundary points, select the voxel with the best gradient direction consistency as the starting seed point for path growth; Starting from the initial seed point, search for adjacent candidate points within a preset spatial adjacency range along the orthogonal tangent direction of the principal gradient direction of the voxel. Based on the gradient direction continuity constraint and the spatial position continuity constraint, calculate the growth cost of the candidate points. Incorporate candidate points with growth costs lower than the preset cost threshold into the current boundary path and use the candidate point as a new growth starting point to iteratively execute the growth operation. When iterative growth fails to include new candidate points, complete the growth of a single boundary path, traverse the remaining voxels in the initial boundary candidate point set that have not been included in any path, repeat the above growth operation, and generate several initial boundary paths. Perform path length filtering on all initial boundary paths, remove isolated noise paths with path lengths lower than a preset length threshold, and connect the remaining boundary paths end to end according to spatial adjacency to generate the initial boundary outline. The growth cost of the candidate points is: ; In the formula: Let p be the growth cost from the current growth point p to the candidate point q. This is the direction vector of the boundary tangent at the current growth point p; Let q be the spatial position vector of the candidate point relative to the current growth point p; These are the three-dimensional gradient vectors of the growth point p and the candidate point q, respectively.
7. The boundary recognition method based on medical images of ovarian masses according to claim 1, characterized in that, In the generation stage of the complete boundary contour, the initial boundary contour line is sampled at equal intervals to extract a number of contour control points. Each contour control point corresponds to a discrete coordinate point on the initial boundary contour line. For each contour control point, the voxel gray value and corresponding spatial coordinates in the preset neighborhood range in the normal direction of the control point are extracted to construct a spatial distribution model of gray gradient. Based on the spatial distribution extreme value characteristics of gray-level gradient, the sub-pixel level precise coordinates of the control point are calculated to complete the spatial coordinate deviation correction of the contour line. For the discontinuous segments in the corrected contour, spline interpolation is performed to complete the contour based on the continuity of the tangent direction and gradient direction of the contour at both ends of the discontinuous segment and the spatial topological constraints, so as to obtain a continuous sub-pixel level contour. Global smoothing is performed on continuous subpixel-level contour lines to generate complete boundary contours.
8. The boundary recognition method based on medical images of ovarian masses according to claim 1, characterized in that, When performing a closure check on the complete boundary contour, the spatial distance between the beginning and end endpoints of the contour line is calculated. If the spatial distance is lower than the preset closure threshold, the beginning and end endpoints are directly connected to generate a closed contour. If the spatial distance is not lower than the preset closure threshold, then based on the gradient direction of the contour line and the spatial topological constraints, the closure completion process is performed to obtain the initial closed contour. The initial closed contour is optimized based on the anatomical morphology constraints of the ovary. Based on the prior anatomical morphology of the ovary and the mass, the curvature distribution of the contour line is smoothed and constrained. The contour distortion segments that do not conform to the preset curvature range are removed. The optimized contour line is refitted to obtain the optimized closed contour. The optimized closed contour is then output as the mass closure boundary recognition result. The curvature constraint optimization term of the contour line is calculated using the following formula: ; In the formula: Optimize the energy term for the curvature of the contour line; The path for the initial closed contour; This represents the curvature value of the contour line at arc length l; The global average curvature of the contour line; The derivative of the arc length of the contour line.
9. The boundary recognition method based on medical images of ovarian masses according to claim 1, characterized in that, When outputting the results of tumor closure boundary identification, the confidence quantification result of the identification of the closure boundary is also output simultaneously: ; In the formula: The overall confidence score for identifying the closed boundary of the mass; M is the total number of contour control points on the closed boundary; Let be the coordinates of the m-th contour control point; This is the fused characteristic response value at this control point; This is the gradient direction consistency quantization value at this control point; These are the subpixel level coordinates of the control point; These are the initial integer coordinates of the control point; This is the preset maximum coordinate deviation threshold.