Breast tumor area identification method and system based on ultrasonic image and storage medium
By pre-processing and meshing the breast ultrasound image, and using image separation algorithm to perform preliminary processing and grayscale analysis on the breast area, the problem of inaccurate area division in the prior art is solved, and the accuracy and reliability of tumor area identification are improved.
Patent Information
- Application Number
- CN202510254375.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2045-03-05
AI Technical Summary
The existing tumor area recognition technology is inaccurately divided into areas within the image, resulting in errors in tumor area recognition results.
By obtaining breast ultrasound images, pre-processing and meshing, using the image separation algorithm to perform preliminary processing and grayscale analysis on the image area, the accurate division of the breast area is obtained, and then the homologous area is extracted and analyzed to determine whether it is a tumor area.
It improves the reliability and accuracy of tumor area identification, reduces the inaccuracy of contour extraction, provides a more reliable data basis, and provides more accurate features for subsequent analysis.
Smart Images

Figure CN119762732A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tumor region recognition, and in particular to a method, system and storage medium for breast tumor region recognition based on ultrasound images. Background Art
[0002] Tumor region recognition technology refers to a technology in the field of medical image analysis, which is used to automatically or semi-automatically identify and mark the tumor tissue area in the patient's body in medical images (such as MRI, CT, ultrasound, etc.). This technology usually involves methods in fields such as image processing, pattern recognition and machine learning, and aims to assist doctors in diagnosing, locating and tracking tumors.
[0003] Existing tumor region recognition technologies usually analyze the entire breast image, analyze and identify the tumor region based on the entire breast, and the extraction of the tumor region usually involves contour extraction. The contour extraction technology will make the contour division more blurred in larger images, which will lead to inaccurate region division. In the subsequent feature extraction, incorrect features will be extracted, further leading to errors in the recognition results of the tumor region. For example, in the patent application with application publication number: CN111311553A, a breast tumor recognition method, device and storage medium based on the region of interest are disclosed. The scheme recognizes the region of interest after edge detection, but the origin of the region of interest is unclear, so the delineation of the tumor region does not have a data basis. The existing tumor region recognition technology also has the problem of inaccurate division of the region in the image, which leads to errors in the recognition results of the tumor region. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems in the prior art to a certain extent, by acquiring a breast ultrasound image, preprocessing the breast ultrasound image to obtain a preprocessed image, then dividing the preprocessed image into regions through an image segmentation algorithm to obtain breast regions, integrating the breast regions to obtain homologous regions, extracting features from the homologous regions to obtain regional features of the homologous regions, and finally analyzing the regional features to determine whether the homologous regions are tumor regions, so as to solve the problem that the existing tumor region recognition technology still has inaccurate division of regions within the image, resulting in errors in the recognition results of the tumor region.
[0005] To achieve the above objectives, in a first aspect, the present application provides a method for identifying a breast tumor region based on ultrasound images, comprising the following steps: Acquire breast ultrasound images, preprocess the breast ultrasound images, and obtain preprocessed images; The pre-processed image is divided into regions by an image segmentation algorithm to obtain the breast region; Integrate the mammary gland regions to obtain homologous regions, extract features from the homologous regions, and obtain regional features of the homologous regions; The regional features are analyzed to determine whether the homologous region is a tumor region.
[0006] Further, obtaining a breast ultrasound image and preprocessing the breast ultrasound image to obtain a preprocessed image includes the following sub-steps: Obtain breast ultrasound images; Grayscale processing is performed on the breast ultrasound image to obtain a breast grayscale image; The mammary grayscale image is contrast enhanced to obtain a preprocessed image.
[0007] Furthermore, the pre-processed image is divided into regions by an image segmentation algorithm to obtain the breast region, which includes the following sub-steps: Divide the preprocessed image into grids, and perform preliminary processing on the divided image areas to obtain partial breast areas; Grayscale analysis is performed on the remaining image area to obtain the remaining breast area.
[0008] Further, the preprocessed image is gridded, and the image region obtained by the division is preliminarily processed to obtain a partial breast region, including the following sub-steps: Obtaining a pixel resolution of the preprocessed image, where the pixel resolution includes the number of horizontal pixels and the number of vertical pixels in the preprocessed image, represented by symbols n and m respectively; Divide n by the first number and mark the result as the first grid number; divide m by the first number and mark the result as the second grid number; Multiply the first grid number by the second grid number to get the number of areas; Divide the preprocessed image into a number of image regions, where the image regions are in a positive direction and include a first number of pixels times a first number of pixels in the image regions; Mark the pixels in the image area as regional pixels, and mark the grayscale values of the regional pixels as regional pixel values; Count the regional pixel values in the image area, and count the proportion of regional pixel values with the same value in all regional pixel values in the image area, which is marked as grayscale proportion; Obtain the maximum value of the grayscale proportion, mark it as the maximum proportion value, compare the maximum proportion value with the first proportion threshold, if the maximum proportion value is greater than or equal to the first proportion threshold, output the grayscale filling signal; if the maximum proportion value is less than the first proportion threshold, output the grayscale analysis signal; If a grayscale filling signal is output, the regional pixel values of all regional pixels in the image area are changed to the regional pixel values corresponding to the maximum proportion value, and the filled image area is named the breast area; if a grayscale analysis signal is output, the image area is grayscale analyzed to obtain the breast area.
[0009] Further, grayscale analysis is performed on the remaining image area to obtain the remaining breast area, including the following sub-steps: Count the number of different area pixel values and mark them as the same color number; The pixel values in the image area are sorted and numbered in ascending order, and the symbol P is used to represent the pixel values in the image area. i Represents, where i is a non-zero natural number and i is the serial number of P; P i The i in the figure is the X-axis, and the color number is the Y-axis to establish a plane rectangular coordinate system, named color value distribution line chart, and P i Enter the corresponding number of the same color into the color value distribution line chart, and put P i The coordinate points formed by the corresponding same color numbers in the color value distribution line graph are marked as color value distribution points; Connect adjacent color value distribution points through straight lines, name the straight lines as point-to-point straight lines, name the angle formed between two adjacent point-to-point straight lines as trend angle, and the trend angle is less than or equal to 180°; Calculate P i The average value of the color value distribution is marked as the average color value. Based on the average color value, the color value distribution line graph is divided into two areas on the left and right, named the first area and the second area respectively. The sum of the same color numbers of all color value distribution points in the first area is calculated, and the calculation result is named the first color number. The sum of the same color numbers of all color value distribution points in the second area is calculated, and the calculation result is named the second color number. Compare the first color number with the second color number, if the first color number is less than the second color number, output a first processing signal; if the first color number is equal to the second color number, output a second processing signal; if the first color number is greater than the second color number, output a third processing signal; The color value of the image area is processed based on the output signal to obtain the breast area.
[0010] Further, the color value of the image area is processed based on the output signal to obtain the breast area, including the following sub-steps: If the first processed signal is output, the second area is marked as a color value analysis area; if the third processed signal is output, the first area is marked as a color value analysis area; Obtain the trend angle adjacent to the color value analysis area. If the trend angle opens downward, a valid color value signal is output; if the trend angle opens upward, an invalid color value signal is output; If a valid color value signal is output, the color value distribution points on the trend angle are included in the color value analysis area, and the next trend angle is searched for analysis; if an invalid color value signal is output, the search is stopped; Sum up all pixel values in the color value analysis area and calculate the average value, and mark the calculation result as the filling color value; If the second processed signal is output, the average value of the regional pixel values of all regional pixel points in the image area is calculated, and the calculation result is marked as the filling color value; The pixel values of all the pixels in the image area are changed to the fill color value, and the image area is marked as the breast area.
[0011] Further, integrating the mammary gland regions to obtain homologous regions, extracting features from the homologous regions, and obtaining regional features of the homologous regions include the following sub-steps: The graph composed of breast regions is named as a regional graph, and contour extraction is performed on the regional graph to obtain different contour regions; Mark the area corresponding to the contour area in the preprocessed graph as a homologous area, extract the contour of the homologous area, and obtain the contour to be analyzed; The shape features and texture features of the contour to be analyzed are obtained, wherein the shape features and texture features constitute regional features.
[0012] Furthermore, analyzing the regional features to determine whether the homologous region is a tumor region includes the following sub-steps: Establish a tumor region recognition model and train the tumor region recognition model through the regional features of big data; After the training is completed, the extracted regional features are input into the tumor region recognition model. If the output result is yes, the contour to be analyzed in the homologous region is marked as a tumor region; if the output result is no, the contour to be analyzed in the homologous region is marked as a normal region.
[0013] In a second aspect, the present application provides a breast tumor region recognition system based on ultrasound images, comprising a preprocessing module, a region division module, a feature extraction module and a tumor recognition module; the preprocessing module, the feature extraction module and the tumor recognition module are respectively connected to the region division module data; The preprocessing module is used to obtain breast ultrasound images, preprocess the breast ultrasound images, and obtain preprocessed images; The region division module is used to divide the pre-processed image into regions by using an image segmentation algorithm to obtain breast regions; The feature extraction module is used to integrate the mammary gland regions to obtain homologous regions, extract features from the homologous regions, and obtain regional features of the homologous regions; The tumor recognition module is used to analyze regional features and determine whether a homologous region is a tumor region.
[0014] In a third aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are performed.
[0015] Beneficial effects of the present invention: The present invention obtains breast ultrasound images, pre-processes the breast ultrasound images to obtain pre-processed images, then grids the pre-processed images, and preliminarily processes the image regions obtained by the division to obtain partial breast regions, and then performs grayscale analysis on the remaining image regions to obtain the remaining breast regions. The advantages of the present invention are that, unlike directly performing edge detection on the entire pre-processed image to obtain the contours of multiple regions, grid division is first performed, and then the image regions are processed to a certain extent, and the grayscale values of the image regions are unified to obtain the breast regions. Several breast regions represent the approximate distribution of grayscale values in the pre-processed images, which provides a reliable data basis for subsequent analysis and improves the reliability and effectiveness of tumor region identification. The present invention integrates breast regions to obtain homologous regions, extracts features from the homologous regions, obtains regional features of the homologous regions, and finally analyzes the regional features to determine whether the homologous regions are tumor regions. The present invention has the advantage of performing contour extraction on regional images composed of breast regions. Since edge detection is performed on several regions rather than pixel points, the color values that need to be processed are greatly reduced, so the contour extraction becomes more accurate. The subsequent feature extraction of the homologous regions can extract the regional features that are closest to reality, thereby improving the accuracy and reliability of the tumor region. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a functional block diagram of the system of the present invention; Figure 2 is the preprocessed image of the present invention; Figure 3 It is a color value distribution line graph of the present invention; Figure 4 is the profile to be analyzed of the present invention; Figure 5 The figure is a flow chart of the steps of the method of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] Example 1, please refer to Figure 1 As shown, the present application provides a breast tumor region recognition system based on ultrasound images, including a preprocessing module, a region division module, a feature extraction module and a tumor recognition module; the preprocessing module, the feature extraction module and the tumor recognition module are respectively connected to the region division module data; See also Figure 2 As shown, the preprocessing module is used to obtain breast ultrasound images, preprocess the breast ultrasound images, and obtain preprocessed images; The preprocessing module is configured with preprocessing strategies, which include: Obtain breast ultrasound images; Grayscale processing is performed on the breast ultrasound image to obtain a breast grayscale image; Perform contrast enhancement on the mammary grayscale image to obtain a preprocessed image; In practical applications, a breast ultrasound image is obtained, the breast ultrasound image is grayed to obtain a breast grayscale image, and then the breast grayscale image is contrast enhanced to obtain a preprocessed image such as Figure 2 shown.
[0019] The region division module is used to divide the pre-processed image into regions by using an image segmentation algorithm to obtain breast regions; the region division module includes a preliminary division unit, a secondary division unit and a final processing unit; The preliminary division unit is used to perform grid division on the preprocessed image and perform preliminary processing on the image area obtained by division to obtain a partial breast area; The preliminary partitioning unit is configured with a preliminary partitioning strategy, which includes: Obtaining the pixel resolution of the preprocessed image, where the pixel resolution includes the number of horizontal pixels and the number of vertical pixels in the preprocessed image, which are represented by symbols n and m respectively; Divide n by the first number and mark the result as the first grid number; divide m by the first number and mark the result as the second grid number; Multiply the first grid number by the second grid number to get the number of areas; Divide the preprocessed image into a number of image regions, where the image region is in a positive direction and includes a first number of pixels times a first number of pixels in the image region; In practical applications, the pixel resolution is 600×350, that is, n=600, m=350; the first number is set to divide the preprocessed image into a number of grid areas, so as to enhance the accuracy of subsequent edge detection. The first number is usually in the range of 10 to 40. In this embodiment, the first number is set to 20, and the first grid number is calculated to be 30, and the second grid number is 18. The calculation result uses the round-up method to retain the integer; since 350 cannot be divided by 20, the size of the image area of the 18th column is 20×10, not 20×20, and the image areas except the 18th column are all 20×20; the number of areas is calculated to be 540, and the preprocessed image is divided into 540 grid image areas, wherein the image area size of the 18th column is 20×10, and the sizes of the remaining image areas are all 20×20; Mark the pixels in the image area as regional pixels, and mark the grayscale values of the regional pixels as regional pixel values; Count the regional pixel values in the image area, and count the proportion of regional pixel values with the same value in all regional pixel values in the image area, which is marked as grayscale proportion; Obtain the maximum value of the grayscale proportion, mark it as the maximum proportion value, compare the maximum proportion value with the first proportion threshold, if the maximum proportion value is greater than or equal to the first proportion threshold, output the grayscale filling signal; if the maximum proportion value is less than the first proportion threshold, output the grayscale analysis signal; If a grayscale filling signal is output, the regional pixel values of all regional pixels in the image area are all changed to the regional pixel values corresponding to the maximum proportion value, and the filled image area is named the breast area; if a grayscale analysis signal is output, the image area is grayscale analyzed to obtain the breast area; In practical applications, the image area in the first column and the first row and the image area in the first column and the second row are taken as examples, and the first image area and the second image area are referred to in this embodiment; in the first image area, the regional pixel values have multiple values such as 255, 238, 216, 168, 242, 253, 155 and 58, among which the grayscale proportion of 255 is the maximum proportion and is 0.8, and the first proportion threshold is set to 0.5, that is, the regional pixel values of half of the pixels in the image area are the same, then the image area is directly filled with the corresponding regional pixel value; by comparison, the maximum proportion is greater than the first proportion threshold, and a grayscale filling signal is output, and the regional pixel values of all pixels in the first image area are changed to 255 to obtain the first breast area; for the second image area, the regional pixel value corresponding to the maximum proportion is still 255, but the maximum proportion is 0.27, and by comparison, the maximum proportion is less than the first proportion threshold, and a grayscale analysis signal is output to perform grayscale analysis on the second image area; The secondary division unit is used to perform grayscale analysis on the remaining image area to obtain the remaining breast area; The secondary partitioning unit is configured with a secondary partitioning strategy, which includes: Count the number of different area pixel values and mark them as the same color number; The pixel values in the image area are sorted and numbered in ascending order, and the symbol P is used to represent the pixel values in the image area. i Represents, where i is a non-zero natural number and i is the serial number of P; See also Figure 3 As shown, P i The i in the figure is the X-axis, and the color number is the Y-axis to establish a plane rectangular coordinate system, named color value distribution line chart, and P i Enter the corresponding number of the same color into the color value distribution line chart, and put P i The coordinate points formed by the corresponding same color numbers in the color value distribution line graph are marked as color value distribution points; Connect adjacent color value distribution points with straight lines, name the straight lines as point-to-point straight lines, and name the angle between two adjacent point-to-point straight lines as trend angle, which is less than or equal to 180°; In practical applications, for the second image area, the number of same colors with a regional pixel value of 255 is 108, the number of same colors with a regional pixel value of 0 is 9, and the remaining numbers of same colors are omitted in this embodiment. For details, please refer to Figure 3 As shown; Calculate P i The average value of the color value distribution is marked as the average color value. Based on the average color value, the color value distribution line graph is divided into two areas on the left and right, named the first area and the second area respectively. The sum of the same color numbers of all color value distribution points in the first area is calculated, and the calculation result is named the first color number. The sum of the same color numbers of all color value distribution points in the second area is calculated, and the calculation result is named the second color number. Compare the first color number with the second color number, if the first color number is less than the second color number, output a first processing signal; if the first color number is equal to the second color number, output a second processing signal; if the first color number is greater than the second color number, output a third processing signal; The color value of the image area is processed based on the output signal to obtain the breast area; In practical applications, Figure 3 As shown, P i , 1≤i≤20, where P1 to P 20 They are 0, 5, 9, 18, 34, 56, 73, 88, 96, 105, 115, 124, 153, 169, 185, 196, 225, 242, 253 and 255 respectively. The average value is 120, and the result is an integer. The average color value 120 is between 115 and 124, that is, P 11 With P 12Based on the average color value, the color value distribution line graph is divided into two areas, namely, the first area includes P1 to P 11 , the second region includes P 12 To P 20 , the first color number is 182 and the second color number is 218. By comparison, the first color value is smaller than the second color value, and the first processed signal is output; The final processing unit is configured with a final processing strategy, which includes: If the first processed signal is output, the second area is marked as a color value analysis area; if the third processed signal is output, the first area is marked as a color value analysis area; Obtain the trend angle adjacent to the color value analysis area. If the trend angle opens downward, a valid color value signal is output; if the trend angle opens upward, an invalid color value signal is output; If a valid color value signal is output, the color value distribution points on the trend angle are included in the color value analysis area, and the next trend angle is searched for analysis; if an invalid color value signal is output, the search is stopped; Sum up all pixel values in the color value analysis area and calculate the average value, and mark the calculation result as the filling color value; If the second processed signal is output, the average value of the regional pixel values of all regional pixel points in the image area is calculated, and the calculation result is marked as the filling color value; Change the regional pixel values of all regional pixel points in the image area to the filling color value, and mark the image area as the breast area; In actual application, the first processed signal is output, and the second area is marked as a color value analysis area. At this time, the color value analysis area includes P 12 To P 20 At this time, the trend angle adjacent to the color value analysis area is P 11 The trend angle at the corresponding color value distribution point. If the opening of this trend angle is upward, an invalid color value signal is output and the search stops; if the opening is downward, it means that P 11 To P 12 There is a downward trend, P 11 Greater than P 12 In this case, P 11 With P 12 The regional pixel values are usually close and correlated to a certain extent, so they need to be included in the color value analysis area. The color value analysis area is only used to analyze the parts that are strongly correlated with the image pixel values in the image area, that is, the overall trend of the color. The weaker parts are ignored to better fit the color of this image area in the naked eye; all regional pixel values in the color value analysis area are summed up and the average value is calculated to obtain a fill color value of 213, then the regional pixel values of all regional pixels in the second image area are changed to 213 to obtain a second breast area.
[0020] The feature extraction module is used to integrate the breast regions to obtain homologous regions, extract features from the homologous regions, and obtain regional features of the homologous regions; The feature extraction module is configured with feature extraction strategies, which include: The graph composed of breast regions is named as a regional graph, and contour extraction is performed on the regional graph to obtain different contour regions; See also Figure 4 As shown, the area corresponding to the contour area in the preprocessing graph is marked as a homologous area, and the contour of the homologous area is extracted to obtain the contour to be analyzed; Obtaining shape features and texture features of the contour to be analyzed, wherein the shape features and texture features constitute regional features; In practical applications, the regional image is the preprocessed image after color value filling. At this time, each grid can be regarded as a pixel point. At this time, edge detection is performed on the regional image to extract the contour to narrow the detection range. The contour area is obtained by extraction, and the contour area corresponds to the homologous area in the preprocessed image. Figure 4 As shown, the contour of the homologous region is extracted to obtain the contour to be analyzed as shown in Figure 4 As shown, the existing tumor feature extraction technology is used to extract Figure 4 The regional features of the shape include contour and area. The contour is Figure 4 , area is 7.24mm 2 , extracted by gray-level co-occurrence matrix technique Figure 4 The texture features have a contrast ratio of 2.1. Texture features include not only contrast but also other features. However, the focus of this embodiment is on the division of image areas and the extraction of contours. Since the extraction and analysis of image features use existing technologies, they are not described in detail in this embodiment.
[0021] The tumor recognition module is used to analyze regional features and determine whether a homologous region is a tumor region; The tumor recognition module is configured with a tumor recognition strategy, which includes: Establish a tumor region recognition model and train the tumor region recognition model through the regional features of big data; After the training is completed, the extracted regional features are input into the tumor region recognition model. If the output result is yes, the contour to be analyzed in the homologous region is marked as a tumor region; if the output result is no, the contour to be analyzed in the homologous region is marked as a normal region; In practical applications, the tumor region recognition model adopts convolutional neural network technology, and the tumor region recognition model is trained through the regional features of big data, that is, breast images with existing diagnostic results are obtained through big data, and the model is trained based on the actual judgment results. For contour training, the similarity calculation method is used to analyze whether the input contour is a tumor region, and the area and texture features are analyzed by probability calculation method. For the tumor recognition model, the technologies used are all existing technologies. This embodiment is intended to optimize the results of contour extraction and make the subsequent extracted image features more accurate, thereby improving the accuracy of tumor recognition. Therefore, the specific training process of the tumor recognition model is not described in detail; after the training is completed, the extracted regional features are input into the tumor region recognition model. If the output result is yes, the contour to be analyzed in the homologous region is marked as a tumor region; if the output result is no, the contour to be analyzed in the homologous region is marked as a normal region.
[0022] Example 2, please refer to Figure 5 As shown, the present application provides a method for identifying breast tumor regions based on ultrasound images, comprising the following steps: Step S1, obtaining a breast ultrasound image, preprocessing the breast ultrasound image, and obtaining a preprocessed image; Step S1 includes the following sub-steps: Step S101, obtaining breast ultrasound images; Step S102, graying the breast ultrasound image to obtain a breast grayscale image; Step S103, performing contrast enhancement on the mammary grayscale image to obtain a preprocessed image; Step S2, dividing the preprocessed image into regions by an image segmentation algorithm to obtain breast regions; Step S2 includes the following sub-steps: Step S201, gridding the preprocessed image, and performing preliminary processing on the image area obtained by the division to obtain a partial breast area; Step S201 includes the following sub-steps: Step S2011, obtaining the pixel resolution of the preprocessed image, where the pixel resolution includes the number of horizontal pixels and the number of vertical pixels in the preprocessed image, which are represented by symbols n and m respectively; Step S2012, dividing n by the first number, marking the result as the first grid number, dividing m by the first number, marking the result as the second grid number; Step S2013, multiplying the first grid number by the second grid number to obtain the number of regions; Step S2014, dividing the pre-processed image into a number of image regions, where the image region is in a positive direction and includes a first number of pixels times a first number of pixels; Step S2015, marking the pixels in the image region as regional pixels, and marking the grayscale values of the regional pixels as regional pixel values; Step S2016, counting the regional pixel values in the image region, and counting the proportion of regional pixel values with the same value in all regional pixel values in the image region, which is marked as grayscale proportion; Step S2017, obtaining the maximum value of the grayscale proportion, marking it as the maximum proportion value, comparing the maximum proportion value with the first proportion threshold value, and outputting a grayscale filling signal if the maximum proportion value is greater than or equal to the first proportion threshold value; if the maximum proportion value is less than the first proportion threshold value, outputting a grayscale analysis signal; Step S2018: if a grayscale filling signal is output, the regional pixel values of all regional pixel points in the image area are all changed to the regional pixel values corresponding to the maximum proportion value, and the filled image area is named the breast area; if a grayscale analysis signal is output, grayscale analysis is performed on the image area to obtain the breast area; Step S202, performing grayscale analysis on the remaining image area to obtain the remaining breast area; Step S202 includes the following sub-steps: Step S2021, counting the number of different area pixel values and marking them as the same color number; Step S2022: sort and number the pixel values in the image region in ascending order, using the symbol P i Represents, where i is a non-zero natural number and i is the serial number of P; Step S2023, with P i The i in the figure is the X-axis, and the color number is the Y-axis to establish a plane rectangular coordinate system, named color value distribution line chart, and P i Enter the corresponding number of the same color into the color value distribution line chart, and put P i The coordinate points formed by the corresponding same color numbers in the color value distribution line graph are marked as color value distribution points; Step S2024, connecting adjacent color value distribution points with straight lines, naming the straight lines as point-to-point straight lines, naming the angle formed by two adjacent point-to-point straight lines as trend angle, and the trend angle is less than or equal to 180°; Step S2025, calculate P i The average value of the color value distribution is marked as the average color value. Based on the average color value, the color value distribution line graph is divided into two areas on the left and right, named the first area and the second area respectively. The sum of the same color numbers of all color value distribution points in the first area is calculated, and the calculation result is named the first color number. The sum of the same color numbers of all color value distribution points in the second area is calculated, and the calculation result is named the second color number. Step S2026, comparing the first color number with the second color number, if the first color number is less than the second color number, outputting a first processing signal; if the first color number is equal to the second color number, outputting a second processing signal; if the first color number is greater than the second color number, outputting a third processing signal; Step S2027, processing the color value of the image area based on the output signal to obtain the breast area; Step S2027 includes the following sub-steps: Step S2027.a, if the first processed signal is output, the second area is marked as a color value analysis area; if the third processed signal is output, the first area is marked as a color value analysis area; Step S2027.b, obtaining the trend angle adjacent to the color value analysis area, if the trend angle opens downward, outputting a color value valid signal; if the trend angle opens upward, outputting a color value invalid signal; Step S2027.c, if a valid color value signal is output, the color value distribution points on the trend angle are included in the color value analysis area, and the next trend angle is searched for analysis; if an invalid color value signal is output, the search is stopped; Step S2027.d, summing up the pixel values of all areas in the color value analysis area and calculating the average value, and marking the calculation result as the filling color value; Step S2027.e, if the second processed signal is output, the average value of the regional pixel values of all regional pixel points in the image area is calculated, and the calculation result is marked as the filling color value; Step S2027.f, changing the regional pixel values of all regional pixels in the image area to a filling color value, and marking the image area as a breast area; Step S3, integrating the mammary gland regions to obtain homologous regions, extracting features from the homologous regions to obtain regional features of the homologous regions; Step S3 includes the following sub-steps: Step S301, naming a graph composed of breast regions as a regional graph, performing contour extraction on the regional graph, and obtaining different contour regions; Step S302, marking the area corresponding to the contour area in the preprocessed graph as a homologous area, extracting the contour of the homologous area, and obtaining the contour to be analyzed; Step S303, obtaining shape features and texture features of the contour to be analyzed, wherein the shape features and texture features constitute regional features; Step S4, analyzing the regional features to determine whether the homologous region is a tumor region; Step S4 includes the following sub-steps: Step S401, establishing a tumor region recognition model, and training the tumor region recognition model through regional features of big data; Step S402, after the training is completed, the extracted regional features are input into the tumor region recognition model. If the output result is yes, the contour to be analyzed in the homologous region is marked as a tumor region; if the output result is no, the contour to be analyzed in the homologous region is marked as a normal region.
[0023] Embodiment 3, this embodiment provides an electronic device, which may include: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the method for identifying breast tumor regions based on ultrasound images are executed to achieve the following functions: obtaining breast ultrasound images, preprocessing the breast ultrasound images to obtain preprocessed images; dividing the preprocessed images into regions through an image segmentation algorithm to obtain breast regions; integrating the breast regions to obtain homologous regions, extracting features from the homologous regions to obtain regional features of the homologous regions; analyzing the regional features to determine whether the homologous regions are tumor regions.
[0024] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0025] Embodiment 4. The present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the breast tumor region identification method based on ultrasound images provided by the above-mentioned methods, and the method includes: acquiring a breast ultrasound image, preprocessing the breast ultrasound image, and obtaining a preprocessed image; dividing the preprocessed image into regions through an image segmentation algorithm to obtain breast regions; integrating the breast regions to obtain homologous regions, extracting features from the homologous regions to obtain regional features of the homologous regions; analyzing the regional features to determine whether the homologous regions are tumor regions.
[0026] Embodiment 5, the present application also provides a computer-readable storage medium, the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed by the processor, the steps in the above-mentioned method for identifying breast tumor regions based on ultrasound images are executed. Through the above-mentioned technical scheme, when the computer program is executed by the processor, the method in any optional implementation of the above-mentioned embodiment is executed to achieve the following functions: acquiring a breast ultrasound image, preprocessing the breast ultrasound image, and obtaining a preprocessed image; dividing the preprocessed image into regions through an image segmentation algorithm to obtain a breast region; integrating the breast region to obtain a homologous region, extracting features from the homologous region, and obtaining regional features of the homologous region; analyzing the regional features to determine whether the homologous region is a tumor region.
[0027] Through the description of the above implementation methods, the embodiments of the present invention can be provided as methods, systems or computer program products. Based on such an understanding, the above technical solutions can be essentially or partly contributed to the prior art in the form of software products, which can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and include several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0028] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for identifying breast tumor regions based on ultrasound images, characterized in that: The steps include: Acquire breast ultrasound images, preprocess the breast ultrasound images, and obtain preprocessed images; The pre-processed image is divided into regions by an image segmentation algorithm to obtain the breast region; Integrate the mammary gland regions to obtain homologous regions, extract features from the homologous regions, and obtain regional features of the homologous regions; The regional features are analyzed to determine whether the homologous region is a tumor region.
2. The method for identifying breast tumor regions based on ultrasound images according to claim 1, characterized in that: Acquiring a breast ultrasound image and preprocessing the breast ultrasound image to obtain a preprocessed image includes the following sub-steps: Obtain breast ultrasound images; Grayscale processing is performed on the breast ultrasound image to obtain a breast grayscale image; The mammary gland grayscale image is contrast enhanced to obtain a preprocessed image.
3. The method for identifying breast tumor regions based on ultrasound images according to claim 2, characterized in that: The pre-processed image is divided into regions by an image segmentation algorithm to obtain the breast region, which includes the following sub-steps: Divide the preprocessed image into grids, and perform preliminary processing on the divided image areas to obtain partial breast areas; Grayscale analysis is performed on the remaining image area to obtain the remaining breast area.
4. The method for identifying breast tumor regions based on ultrasound images according to claim 3, characterized in that: The preprocessed image is gridded and the image area obtained by the division is preliminarily processed to obtain a partial breast area, which includes the following sub-steps: Obtaining a pixel resolution of the preprocessed image, where the pixel resolution includes the number of horizontal pixels and the number of vertical pixels in the preprocessed image, represented by symbols n and m respectively; Divide n by the first number and mark the result as the first grid number; divide m by the first number and mark the result as the second grid number; Multiply the first grid number by the second grid number to get the number of areas; Divide the preprocessed image into a number of image regions, where the image regions are in a positive direction and include a first number of pixels times a first number of pixels in the image regions; Mark the pixels in the image area as regional pixels, and mark the grayscale values of the regional pixels as regional pixel values; Count the regional pixel values in the image area, and count the proportion of regional pixel values with the same value in all regional pixel values in the image area, which is marked as grayscale proportion; Obtain the maximum value of the grayscale proportion, mark it as the maximum proportion value, compare the maximum proportion value with the first proportion threshold, if the maximum proportion value is greater than or equal to the first proportion threshold, output the grayscale filling signal; if the maximum proportion value is less than the first proportion threshold, output the grayscale analysis signal; If a grayscale filling signal is output, the regional pixel values of all regional pixels in the image area are changed to the regional pixel values corresponding to the maximum proportion value, and the filled image area is named the breast area; if a grayscale analysis signal is output, the image area is grayscale analyzed to obtain the breast area.
5. The method for identifying breast tumor regions based on ultrasound images according to claim 4, characterized in that: Grayscale analysis of the remaining image area to obtain the remaining breast area includes the following sub-steps: Count the number of different area pixel values and mark them as the same color number; The pixel values in the image area are sorted and numbered in ascending order, and the symbol P is used to represent the pixel values in the image area. i Represents, where i is a non-zero natural number and i is the serial number of P; P i The i in the figure is the X-axis, and the color number is the Y-axis to establish a plane rectangular coordinate system, named color value distribution line chart, and P i Enter the corresponding number of the same color into the color value distribution line chart, and put P i The coordinate points formed by the corresponding same color numbers in the color value distribution line graph are marked as color value distribution points; Connect adjacent color value distribution points through straight lines, name the straight lines as point-to-point straight lines, name the angle formed between two adjacent point-to-point straight lines as trend angle, and the trend angle is less than or equal to 180°; Calculate P i The average value of the color value distribution is marked as the average color value. Based on the average color value, the color value distribution line graph is divided into two areas on the left and right, named the first area and the second area respectively. The sum of the same color numbers of all color value distribution points in the first area is calculated, and the calculation result is named the first color number. The sum of the same color numbers of all color value distribution points in the second area is calculated, and the calculation result is named the second color number. Compare the first color number with the second color number, if the first color number is less than the second color number, output a first processing signal; if the first color number is equal to the second color number, output a second processing signal; if the first color number is greater than the second color number, output a third processing signal; The color value of the image area is processed based on the output signal to obtain the breast area.
6. The method for identifying breast tumor regions based on ultrasound images according to claim 5, characterized in that: Processing the color value of the image area based on the output signal to obtain the breast area includes the following sub-steps: If the first processed signal is output, the second area is marked as a color value analysis area; if the third processed signal is output, the first area is marked as a color value analysis area; Obtain the trend angle adjacent to the color value analysis area, and if the trend angle opens downward, output a color value valid signal; If the trend angle opens upward, an invalid color value signal is output; If a valid color value signal is output, the color value distribution points on the trend angle are included in the color value analysis area, and the next trend angle is searched for analysis; If the output color value is invalid, the search stops; Sum up all pixel values in the color value analysis area and calculate the average value, and mark the calculation result as the filling color value; If the second processed signal is output, the average value of the regional pixel values of all regional pixel points in the image area is calculated, and the calculation result is marked as the filling color value; The pixel values of all the pixels in the image area are changed to the fill color value, and the image area is marked as the breast area.
7. The method for identifying breast tumor regions based on ultrasound images according to claim 6, characterized in that: Integrating the mammary gland regions to obtain homologous regions, extracting features from the homologous regions, and obtaining regional features of the homologous regions include the following sub-steps: The graph composed of breast regions is named as a regional graph, and contour extraction is performed on the regional graph to obtain different contour regions; Mark the area corresponding to the contour area in the preprocessed graph as a homologous area, extract the contour of the homologous area, and obtain the contour to be analyzed; The shape features and texture features of the contour to be analyzed are obtained, wherein the shape features and texture features constitute regional features.
8. The method for identifying breast tumor regions based on ultrasound images according to claim 7, characterized in that: Analyzing the regional features and determining whether the homologous region is a tumor region includes the following sub-steps: Establish a tumor region recognition model and train the tumor region recognition model through the regional features of big data; After the training is completed, the extracted regional features are input into the tumor region recognition model. If the output result is yes, the contour to be analyzed in the homologous region is marked as a tumor region; if the output result is no, the contour to be analyzed in the homologous region is marked as a normal region.
9. A breast tumor region recognition system based on ultrasound imaging, used to implement the breast tumor region recognition method based on ultrasound imaging according to any one of claims 1 to 8, characterized in that: It includes a preprocessing module, a region division module, a feature extraction module and a tumor recognition module; the preprocessing module, the feature extraction module and the tumor recognition module are respectively connected with the region division module data; The preprocessing module is used to obtain breast ultrasound images, preprocess the breast ultrasound images, and obtain preprocessed images; The region division module is used to divide the pre-processed image into regions by using an image segmentation algorithm to obtain breast regions; The feature extraction module is used to integrate the mammary gland regions to obtain homologous regions, extract features from the homologous regions, and obtain regional features of the homologous regions; The tumor recognition module is used to analyze regional features and determine whether a homologous region is a tumor region.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Breast tumor recognition method and device based on region of interest and storage medium
CN111311553A
Display screen monitoring system and method
CN105810139A
Method and apparatus for extracting image character region
CN108205676A
Method and device for recognizing nidi through breast images
CN109363697A
Method and device for identifying breast image signs
CN109363698A