A breast cancer image information recognition and marking method and system
Patent Information
- Application Number
- CN202311706906.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-13
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]本发明提供了一种乳腺癌图像信息识别与标记方法与系统,用以解决现有技术中的图像信息识别效率较低且准确性较差的问题,所采取的技术方案如下:
[0081]本发明提出了一种乳腺癌图像信息识别与标记方法和系统通过阈值分割方法,该方法能够自动识别和分割乳腺图像中的异常区域,减轻了医生的工作负担,提高了分析的效率。将分割结果可视化展示在原始图像上,有助于医生或分析人员更容易地识别和标记潜在的乳腺癌区域。通过自动分割和可视化标记,该方法有助于早期发现乳腺癌或其他异常,提高了乳腺癌筛查的准确性和及时性。
Smart Images

Figure CN122990181A_ABST
Abstract
Description
Technical Field
[0001] This invention proposes a method and system for breast cancer image information recognition and labeling, belonging to the field of image recognition technology. Background Technology
[0002] Breast cancer is a common malignant tumor, and medical imaging is frequently used for its early detection and diagnosis. Mammography (mammography or breast imaging) and breast ultrasound are common diagnostic methods, while magnetic resonance imaging (MRI) and mammography are used for more detailed evaluation. Medical image processing techniques are used to extract information about diseases or abnormalities from medical images. This includes operations such as image enhancement, segmentation, feature extraction, and classification to help doctors identify signs of disease. However, existing technologies suffer from low efficiency and accuracy in image information recognition. Summary of the Invention
[0003] This invention provides a method and system for breast cancer image information recognition and labeling, to solve the problems of low efficiency and poor accuracy in image information recognition in the prior art. The technical solution adopted is as follows:
[0004] A method for breast cancer image information recognition and labeling, the method comprising:
[0005] Real-time acquisition of breast image data, and preprocessing of the breast image data to obtain processed breast images;
[0006] The breast image is segmented using a threshold segmentation method to obtain abnormal breast regions, and these abnormal regions are further segmented to obtain abnormal region segmentation results.
[0007] The segmentation results are visualized and labeled on the original image. The differences between the visualized and labeled image and the original image are analyzed to control whether the original image is preserved. The specific steps include:
[0008] Step A1: Use formula (1) to obtain the number of pixels that distinguish the image after visualization and labeling from the original image.
[0009]
[0010] Where M represents the number of pixels that distinguish the visualized and labeled image from the original image; [R(a),G(a),B(a)] represents the RGB value of the a-th pixel in the visualized and labeled image; [r(a),g(a),b(a)] represents the RGB value of the a-th pixel in the original image; Z[] represents the normalization function, which has a value of 1 if the value inside the parentheses is not 0, and a value of 0 if the value inside the parentheses is 0; n represents the total number of pixels in the image; || represents the absolute value.
[0011] Step A2: Use formula (2) to obtain the total color value with the largest pixel difference between the visualized and labeled image and the original image.
[0012]
[0013] Where D y This represents the total color value with the largest pixel difference between the visualized and labeled image and the original image; max[,,] represents finding the maximum value among the three comma-separated values in parentheses;
[0014] Step A3: Using formula (3), control whether to retain the original image based on the number of pixels that differ from the original image after visualization and labeling, as well as the total pixel difference value.
[0015]
[0016] Where E represents the control value for whether the original image is retained; This means substituting the values of a from 1 to n into the parentheses to get the maximum value inside the parentheses; ∨ represents logical OR; ∧ represents logical AND;
[0017] If E=1, it means that the original image needs to be preserved to prevent the image after visualization and labeling from obscuring the original image too much.
[0018] If E = 0, it means that the original image does not need to be retained.
[0019] Furthermore, real-time acquisition of breast image data and preprocessing of the breast image data to obtain processed breast images include:
[0020] Real-time acquisition of breast image data;
[0021] The breast image data is preprocessed to obtain a processed breast image; wherein the preprocessing includes denoising, enhancement and histogram equalization.
[0022] Furthermore, the breast image is segmented using a threshold segmentation method to obtain abnormal breast regions, and these abnormal regions are further segmented to obtain abnormal region segmentation results, including:
[0023] Set a global threshold for identifying abnormal breast regions;
[0024] Each pixel of the breast image is sequentially traversed, and the gray value of each pixel is compared with the global threshold in turn.
[0025] When the gray value of the pixel is greater than a preset global threshold, the pixel whose gray value is greater than the global threshold is classified as a normal tissue category, and the gray value of the pixel classified as a normal tissue category is adjusted to the first target gray value.
[0026] When the grayscale value of the pixel is less than or equal to a preset global threshold, the pixel whose grayscale value is less than or equal to the global threshold is classified as an abnormal organization category, and the grayscale of the pixel classified as an abnormal organization category is adjusted to the second target grayscale.
[0027] By segmenting the image regions of the first target gray level and the second target gray level, the abnormal region segmentation result is obtained.
[0028] Furthermore, a global threshold is set for identifying abnormal breast regions, including:
[0029] Retrieve breast cancer image data from the database;
[0030] Histogram analysis is performed on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data;
[0031] The histogram is analyzed to obtain one or more peak values.
[0032] When there is only one peak information, the global threshold is set to 0.77P using the peak information, where P represents the value corresponding to the peak information;
[0033] When there are multiple peak information, the global threshold is set to 0.68×1 / n×(P1+P2+……+Pn) using the multiple peak information; where n represents the number of peak information, and P1, P1……Pn represent the specific values corresponding to the multiple peak information respectively.
[0034] Furthermore, the process of setting the first target grayscale value and the second target grayscale value includes:
[0035] Retrieve breast cancer image data from the database;
[0036] Histogram analysis is performed on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data;
[0037] The histogram is analyzed to obtain one or more peak values and one or more valley values.
[0038] When there is only one peak information, the global threshold is set to 0.36P using the second target grayscale, where P represents the value corresponding to the peak information;
[0039] When there are multiple peak information, the gray level of the second target is set to 0.34×1 / n×(P1+P2+……+Pn) using the multiple peak information; where n represents the number of peak information, and P1, P1……Pn represent the specific values corresponding to the multiple peak information respectively;
[0040] When there is only one valley value, the global threshold is set to 0.15G using the first target grayscale, where G represents the value corresponding to the valley value.
[0041] When there are multiple valley value information, the first target grayscale is set to 0.17×1 / m×(G1+G2+……+Gm) using the multiple valley value information; where m represents the number of valley value information, and G1, G1……Gn represent the specific values corresponding to the multiple valley value information respectively.
[0042] A breast cancer image information recognition and labeling system, the breast cancer image information recognition and labeling system comprising:
[0043] The real-time acquisition module is used to acquire breast image data in real time and preprocess the breast image data to obtain processed breast images.
[0044] The segmentation module is used to segment the breast image using a threshold segmentation method to obtain abnormal breast regions, and to segment the abnormal breast regions to obtain abnormal region segmentation results.
[0045] The labeling and display module is used to visualize and label the segmentation results on the original image, analyze the differences between the visualized and labeled image and the original image, and control whether the original image is retained. Its specific steps include...
[0046] Step A1: Use formula (1) to obtain the number of pixels that distinguish the image after visualization and labeling from the original image.
[0047]
[0048] Where M represents the number of pixels that distinguish the visualized and labeled image from the original image; [R(a),G(a),B(a)] represents the RGB value of the a-th pixel in the visualized and labeled image; [r(a),g(a),b(a)] represents the RGB value of the a-th pixel in the original image; Z[] represents the normalization function, which has a value of 1 if the value inside the parentheses is not 0, and a value of 0 if the value inside the parentheses is 0; n represents the total number of pixels in the image; || represents the absolute value.
[0049] Step A2: Use formula (2) to obtain the total color value with the largest pixel difference between the visualized and labeled image and the original image.
[0050]
[0051] Where D y This represents the total color value with the largest pixel difference between the visualized and labeled image and the original image; max[,,] represents finding the maximum value among the three comma-separated values in parentheses;
[0052] Step A3: Using formula (3), control whether to retain the original image based on the number of pixels that differ from the original image after visualization and labeling, as well as the total pixel difference value.
[0053]
[0054] Where E represents the control value for whether the original image is retained; This means substituting the values of a from 1 to n into the parentheses to get the maximum value inside the parentheses; ∨ represents logical OR; ∧ represents logical AND;
[0055] If E=1, it means that the original image needs to be preserved to prevent the image after visualization and labeling from obscuring the original image too much.
[0056] If E = 0, it means that the original image does not need to be retained.
[0057] Furthermore, the real-time acquisition module includes:
[0058] The data acquisition module is used to acquire breast image data in real time;
[0059] The preprocessing module is used to preprocess the breast image data to obtain a processed breast image; wherein the preprocessing includes denoising, enhancement and histogram equalization.
[0060] Furthermore, the segmentation module includes:
[0061] The global threshold setting module is used to set the global threshold for abnormal breast areas;
[0062] The comparison module is used to sequentially traverse each pixel of the breast image and compare the gray value of each pixel with the global threshold in turn.
[0063] The normal region acquisition module is used to classify pixels whose gray values are greater than a preset global threshold into the normal tissue category when the gray value of the pixel is greater than a preset global threshold, and to adjust the gray value of the pixels classified into the normal tissue category to the first target gray value.
[0064] An abnormal region acquisition module is used to classify pixels whose grayscale value is less than or equal to a preset global threshold as an abnormal organization category when the grayscale value of the pixel is less than or equal to a preset global threshold, and adjust the grayscale of the pixels classified as abnormal organization categories to a second target grayscale.
[0065] The region segmentation module is used to segment the image regions of the first target gray level and the second target gray level to obtain the abnormal region segmentation result.
[0066] Furthermore, the global threshold setting module includes:
[0067] The retrieval module is used to retrieve breast cancer image data from the database;
[0068] The histogram acquisition module is used to perform histogram analysis on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data;
[0069] The histogram analysis module is used to analyze the histogram and obtain one or more peak information in the histogram;
[0070] The first setting module is used to set the global threshold to 0.77P using the peak information when there is only one peak information, where P represents the value corresponding to the peak information;
[0071] The second setting module is used to set the global threshold to 0.68×1 / n×(P1+P2+……+Pn) when there are multiple peak information; where n represents the number of peak information, and P1, P1……Pn represent the specific values corresponding to the multiple peak information respectively.
[0072] Furthermore, the process of setting the first target grayscale value and the second target grayscale value includes:
[0073] Step 1: Retrieve breast cancer image data from the database;
[0074] Step 2: Perform histogram analysis on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data;
[0075] Step 3: Analyze the histogram to obtain one or more peak values and one or more valley values from the histogram;
[0076] Step 4: When there is only one peak information, the global threshold is set to 0.36P using the second target grayscale, where P represents the value corresponding to the peak information.
[0077] Step 5: When there are multiple peak information, the gray level of the second target is set to 0.34×1 / n×(P1+P2+……+Pn) using the multiple peak information; where n represents the number of peak information, and P1, P1……Pn represent the specific values corresponding to the multiple peak information respectively;
[0078] Step 6: When there is only one valley value, the global threshold is set to 0.15G using the first target grayscale, where G represents the value corresponding to the valley value.
[0079] Step 7: When there are multiple valley value information, the first target grayscale is set to 0.17×1 / m×(G1+G2+……+Gm) using the multiple valley value information; where m represents the number of valley value information, and G1, G1……Gn represent the specific values corresponding to the multiple valley value information respectively.
[0080] Beneficial effects of this invention:
[0081] This invention proposes a method and system for breast cancer image information recognition and labeling. Through a threshold segmentation method, this approach can automatically identify and segment abnormal regions in breast images, reducing the workload of physicians and improving analysis efficiency. Visualizing the segmentation results on the original image helps physicians or analysts more easily identify and label potential breast cancer areas. Through automatic segmentation and visual labeling, this method facilitates the early detection of breast cancer or other abnormalities, improving the accuracy and timeliness of breast cancer screening. Attached Figure Description
[0082] Figure 1 This is a flowchart of the method described in this invention;
[0083] Figure 2 This is a system block diagram of the system described in this invention. Detailed Implementation
[0084] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0085] This invention proposes a method for breast cancer image information recognition and labeling, such as... Figure 1 As shown, the breast cancer image information recognition and labeling method includes:
[0086] S1. Real-time acquisition of breast image data, and preprocessing of the breast image data to obtain processed breast images;
[0087] S2. The breast image is segmented using a threshold segmentation method to obtain abnormal breast regions, and the abnormal breast regions are segmented to obtain abnormal region segmentation results.
[0088] S3. Visualize and label the segmentation results on the original image, analyze the differences between the visualized and labeled image and the original image, and control whether to retain the original image. Specific steps include:
[0089] Step A1: Use formula (1) to obtain the number of pixels that distinguish the image after visualization and labeling from the original image.
[0090]
[0091] Where M represents the number of pixels that distinguish the visualized and labeled image from the original image; [R(a),G(a),B(a)] represents the RGB value of the a-th pixel in the visualized and labeled image; [r(a),g(a),b(a)] represents the RGB value of the a-th pixel in the original image; Z[] represents the normalization function, which has a value of 1 if the value inside the parentheses is not 0, and a value of 0 if the value inside the parentheses is 0; n represents the total number of pixels in the image; || represents the absolute value.
[0092] Step A2: Use formula (2) to obtain the total color value with the largest pixel difference between the visualized and labeled image and the original image.
[0093]
[0094] Where D y This represents the total color value with the largest pixel difference between the visualized and labeled image and the original image; max[,,] represents finding the maximum value among the three comma-separated values in parentheses;
[0095] Step A3: Using formula (3), control whether to retain the original image based on the number of pixels that differ from the original image after visualization and labeling, as well as the total pixel difference value.
[0096]
[0097] Where E represents the control value for whether the original image is retained; This means substituting the values of a from 1 to n into the parentheses to get the maximum value inside the parentheses; ∨ represents logical OR; ∧ represents logical AND;
[0098] If E=1, it means that the original image needs to be preserved to prevent the image after visualization and labeling from obscuring the original image too much.
[0099] If E = 0, it means that the original image does not need to be retained.
[0100] The working principle of the above technical solution is as follows: Real-time data acquisition: First, the method acquires breast image data in real time. This data may come from breast cancer screening or other related medical examinations. This data may include mammography, breast ultrasound imaging, etc.
[0101] Preprocessing: The acquired breast image data undergoes preprocessing steps to improve image quality and clarity. Preprocessing may include noise reduction, contrast enhancement, and brightness and contrast adjustment to prepare the images for subsequent analysis.
[0102] Thresholding Segmentation: Next, thresholding segmentation is used to segment the breast image. Thresholding segmentation is an image processing technique that divides pixels in an image into two or more distinct regions based on whether the pixel's grayscale value meets a certain threshold condition. In this case, abnormal breast regions are separated from normal tissue regions.
[0103] Abnormal region segmentation: In the results of abnormal region segmentation of the breast, abnormal regions may include potential breast cancer lesions or other abnormalities. These abnormal regions are further segmented to determine their location and shape, which helps in further analysis and evaluation.
[0104] Visualization and Labeling: Finally, the segmentation results are combined with the original image for visualization and labeling. This allows doctors or analysts to visually view and understand abnormal areas in the image, providing information for subsequent diagnosis and decision-making.
[0105] The advantages of the above technical solution are as follows: This embodiment proposes a breast cancer image information recognition and labeling system using a threshold segmentation method. This method can automatically identify and segment abnormal regions in breast images, reducing the workload of doctors and improving analysis efficiency. Visualizing the segmentation results on the original image helps doctors or analysts more easily identify and label potential breast cancer areas. Through automatic segmentation and visual labeling, this method helps in the early detection of breast cancer or other abnormalities, improving the accuracy and timeliness of breast cancer screening.
[0106] Meanwhile, the number of distinguishing pixels between the image after visualization and marking and the original image is obtained using formula (1) in step A1, thus knowing the number of occluded pixels in the image after visualization and marking, laying the foundation for subsequent control; then, the total color value with the maximum pixel difference between the image after visualization and marking and the original image is obtained using formula (2) in step A2, thus knowing the color difference situation, laying the foundation for subsequent control; finally, formula (3) in step A3 is used to control whether the original image is retained based on the number of distinguishing pixels between the image after visualization and marking and the original image and the total pixel difference value, to prevent the image after visualization and marking from being too severely occluded and affecting the original image;
[0107] In summary, this technical solution provides an automated and assisted approach to breast cancer screening through image segmentation and visualization, and is expected to improve the early diagnosis and management of breast cancer.
[0108] One embodiment of the present invention involves real-time acquisition of breast image data and preprocessing the breast image data to obtain a processed breast image, including:
[0109] S101. Real-time acquisition of breast image data;
[0110] S102. Preprocess the breast image data to obtain a processed breast image; wherein, the preprocessing includes denoising, enhancement and histogram equalization.
[0111] The working principle of the above technical solution is as follows: Real-time acquisition of breast image data (S101): This method first acquires breast image data in real time during medical examinations or breast cancer screenings. This data typically comes from different breast imaging techniques, such as mammography or breast ultrasound imaging.
[0112] Preprocessing of breast image data (S102): The acquired breast image data needs to undergo preprocessing to improve image quality, clarity, and usability. The main preprocessing steps include:
[0113] Denoising: Denoising aims to remove random noise from an image to improve image quality. This may include applying filters or other denoising techniques to smooth the image and reduce noise.
[0114] Enhancement processing: Enhancement processing is used to improve the contrast and detail of an image. This may include enhancing features such as brightness, contrast, edges, and texture to better display structures in the image.
[0115] Histogram equalization: Histogram equalization is a technique used to adjust the brightness distribution of an image, which can help to better display details in an image, especially in cases of uneven lighting.
[0116] The effects of the above technical solution are as follows: Improved image quality: Through preprocessing steps such as denoising, enhancement, and histogram equalization, the quality of breast images is significantly improved, which helps doctors or analysts to more accurately identify and analyze structures and abnormalities in the images.
[0117] Information visualization: Preprocessing makes key information in the image more clearly visible, which is very important for the early detection of breast abnormalities or lesions and helps improve the accuracy of breast cancer screening.
[0118] Reduce misdiagnosis: By improving image quality and contrast, preprocessing helps reduce the subjectivity of image interpretation, thereby lowering the risk of misdiagnosis, especially in breast cancer screening.
[0119] In summary, this technical solution improves the quality and visualization of breast images by acquiring and preprocessing breast image data in real time, which is expected to improve the early diagnosis and management of breast cancer.
[0120] In one embodiment of the present invention, a threshold segmentation method is used to segment the breast image to obtain abnormal breast regions, and the abnormal breast regions are further segmented to obtain abnormal region segmentation results, including:
[0121] S201. Set a global threshold for abnormal breast regions;
[0122] S202. Iterate through each pixel of the breast image in sequence, and compare the gray value of each pixel with the global threshold in sequence;
[0123] S203. When the gray value of the pixel is greater than a preset global threshold, the pixel whose gray value is greater than the global threshold is classified as a normal tissue category, and the gray value of the pixel classified as a normal tissue category is adjusted to the first target gray value.
[0124] S204. When the gray value of the pixel is less than or equal to a preset global threshold, the pixels whose gray value is less than or equal to the global threshold are classified as abnormal organization categories, and the gray value of the pixels classified as abnormal organization categories is adjusted to the second target gray value.
[0125] S205. The image regions of the first target gray level and the second target gray level are segmented to obtain the abnormal region segmentation result.
[0126] The working principle of the above technical solution is as follows: Setting a global threshold (S201): First, before processing the breast image, a global threshold is set for segmenting abnormal breast regions. This global threshold is a preset grayscale value used to classify pixels in the image into normal tissue and abnormal tissue categories.
[0127] Pixel Traversal and Comparison (S202): Next, each pixel of the breast image is traversed. For each pixel, its grayscale value is compared with a preset global threshold.
[0128] Pixel classification and grayscale adjustment (S203 and S204): Based on the comparison results, perform the following operations:
[0129] If the grayscale value of a pixel is greater than a preset global threshold (S203), the pixel is classified as normal tissue and its grayscale value is adjusted to the first target grayscale value. This indicates that the pixel is considered normal breast tissue.
[0130] If the grayscale value of a pixel is less than or equal to a preset global threshold (S204), the pixel is classified as an abnormal tissue category, and its grayscale value is adjusted to the second target grayscale value. This indicates that the pixel is considered abnormal tissue in the breast image.
[0131] Abnormal region segmentation (S205): After completing pixel classification and grayscale adjustment, pixel regions with the second target grayscale value are segmented as abnormal regions. This produces the abnormal region segmentation result for the breast image.
[0132] The above technical solution achieves the following effect: Automatic segmentation of abnormal regions: Through the global threshold segmentation method, this method can automatically separate abnormal tissue regions from normal tissue regions in breast images, thereby realizing automatic segmentation of abnormal regions.
[0133] Grayscale adjustment: For pixels classified as abnormal tissue, their grayscale values are adjusted to a second target grayscale value, which helps to further highlight the abnormal area and makes it easier for doctors or analysts to identify.
[0134] Visualization of segmentation results: By segmenting abnormal regions, pixel regions with different gray values can be obtained, which helps to visualize the abnormal regions so that doctors can make further diagnoses and analyses.
[0135] In summary, this technical solution achieves automatic segmentation and visualization of abnormal regions in breast images through a threshold segmentation method, which is expected to improve the efficiency and accuracy of breast cancer screening and diagnosis.
[0136] In one embodiment of the present invention, setting a global threshold for abnormal breast regions includes:
[0137] S2011. Retrieve breast cancer image data from the database;
[0138] S2012. Perform histogram analysis on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data.
[0139] S2013. Analyze the histogram to obtain one or more peak information in the histogram;
[0140] S2014. When there is only one peak information, the global threshold is set to 0.77P using the peak information, where P represents the value corresponding to the peak information.
[0141] S2015. When there are multiple peak information, the global threshold is set to 0.68×1 / n×(P1+P2+……+Pn) using the multiple peak information; where n represents the number of peak information, and P1, P1……Pn represent the specific values corresponding to the multiple peak information respectively.
[0142] The working principle of the above technical solution is as follows: Retrieve breast cancer image data (S2011): First, retrieve the stored breast cancer image data from the database. These images are used for subsequent threshold settings.
[0143] Histogram Analysis (S2012): Histogram analysis is performed on the retrieved breast cancer image data to obtain the histogram corresponding to the breast cancer image data. A histogram is a table representing the number of pixels at different gray levels, reflecting the distribution of pixels at different gray levels in the image.
[0144] Peak Information Analysis (S2013): The obtained histogram is analyzed to identify one or more peak information points. Peak information represents the gray level at which the number of pixels in the histogram peaks. These peaks typically correspond to major features or structures in the image.
[0145] Threshold settings (S2014 and S2015): Based on the peak information obtained from the analysis, a global threshold is set to segment abnormal breast regions. The specific setting method is as follows:
[0146] If there is only one peak, the global threshold is set to 0.77 multiplied by the value of that peak (S2014).
[0147] If there are multiple peak values, the global threshold is set to 0.68 multiplied by the average of the values corresponding to all peak values (S2015). This takes into account the case of multiple peak values to better accommodate the complexity of the image.
[0148] The advantages of the above technical solution are: Adaptive threshold setting: Through histogram analysis and peak information extraction, this method can adaptively set a global threshold according to the characteristics of image data, rather than relying on a fixed threshold. This helps to better adapt to the characteristics of different images.
[0149] Improved segmentation accuracy: Adaptive threshold settings can better reflect the features and structures in the image, thereby improving the segmentation accuracy of abnormal breast regions.
[0150] Suitable for multi-peak scenarios: When an image contains multiple peaks, this method can reasonably integrate information from multiple peaks to set the threshold more accurately, thereby improving the robustness of segmentation.
[0151] In summary, this technical solution achieves adaptive global threshold setting by analyzing the histogram and peak information of breast cancer image data, which is expected to improve the segmentation quality and accuracy of breast images. This is highly valuable for the identification and analysis of abnormal breast regions.
[0152] In one embodiment of the present invention, the process of setting the first target grayscale value and the second target grayscale value includes:
[0153] Step 1: Retrieve breast cancer image data from the database;
[0154] Step 2: Perform histogram analysis on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data;
[0155] Step 3: Analyze the histogram to obtain one or more peak values and one or more valley values from the histogram;
[0156] Step 4: When there is only one peak information, the global threshold is set to 0.36P using the second target grayscale, where P represents the value corresponding to the peak information.
[0157] Step 5: When there are multiple peak information, the gray level of the second target is set to 0.34×1 / n×(P1+P2+……+Pn) using the multiple peak information; where n represents the number of peak information, and P1, P1……Pn represent the specific values corresponding to the multiple peak information respectively;
[0158] Step 6: When there is only one valley value, the global threshold is set to 0.15G using the first target grayscale, where G represents the value corresponding to the valley value.
[0159] Step 7: When there are multiple valley value information, the first target grayscale is set to 0.17×1 / m×(G1+G2+……+Gm) using the multiple valley value information; where m represents the number of valley value information, and G1, G1……Gn represent the specific values corresponding to the multiple valley value information respectively.
[0160] The working principle of the above technical solution is as follows: retrieve breast cancer image data (step 1): retrieve the stored breast cancer image data from the database, which will be used for subsequent histogram analysis.
[0161] Histogram Analysis (Step 2): Perform histogram analysis on the acquired breast cancer image data to obtain the histogram of the data. A histogram is a table that contains information about the number of pixels at different gray levels.
[0162] Peak and trough information extraction (step 3): Analyze the obtained histogram to extract peak information (representing the gray level of the peak pixel count) and trough information (representing the gray level of the trough pixel count). This information reflects the distribution characteristics of pixels at different gray levels in the image.
[0163] Threshold setting (steps 4 to 7): Based on the extracted peak and trough information, a global threshold is set for segmenting abnormal breast regions. The specific setting method is as follows:
[0164] If there is only one peak value, then the gray value of the second target is set to 0.36 multiplied by the value of that peak value (step 4).
[0165] If there are multiple peak values, the second target grayscale value is set to 0.34 multiplied by the average value of all peak values (step 5).
[0166] If there is only one valley value, then the first target grayscale value is set to 0.15 multiplied by the value of that valley value (step 6).
[0167] If there are multiple valley values, the first target grayscale value is set to 0.17 multiplied by the average value of all valley values (step 7).
[0168] The effect of the above technical solution is as follows: Adaptive threshold setting: Based on the peak and valley information in the histogram, the method can adaptively set the first target gray value and the second target gray value, thereby better adapting to the characteristics of different images.
[0169] By integrating multiple pieces of information: When there are multiple peak or valley values, this method takes all of these information into account to set the target gray value more accurately, thereby improving the robustness of segmentation.
[0170] Improving segmentation accuracy: The adaptive target gray value setting is expected to improve the segmentation accuracy of abnormal breast regions, which will help to better identify breast cancer areas.
[0171] In summary, this technical solution achieves adaptive target grayscale value setting by analyzing the peak and valley information in the histogram of breast cancer images, which is expected to improve the quality and accuracy of breast image segmentation and thus has important value for breast cancer diagnosis.
[0172] This invention proposes a breast cancer image information recognition and labeling system, such as... Figure 2 As shown, the breast cancer image information recognition and labeling system includes:
[0173] The real-time acquisition module is used to acquire breast image data in real time and preprocess the breast image data to obtain processed breast images.
[0174] The segmentation module is used to segment the breast image using a threshold segmentation method to obtain abnormal breast regions, and to segment the abnormal breast regions to obtain abnormal region segmentation results.
[0175] The labeling and display module is used to visualize and label the segmentation results on the original image, analyze the differences between the visualized and labeled image and the original image, and control whether the original image is retained. Its specific steps include...
[0176] Step A1: Use formula (1) to obtain the number of pixels that distinguish the image after visualization and labeling from the original image.
[0177]
[0178] Where M represents the number of pixels that distinguish the visualized and labeled image from the original image; [R(a),G(a),B(a)] represents the RGB value of the a-th pixel in the visualized and labeled image; [r(a),g(a),b(a)] represents the RGB value of the a-th pixel in the original image; Z[] represents the normalization function, which has a value of 1 if the value inside the parentheses is not 0, and a value of 0 if the value inside the parentheses is 0; n represents the total number of pixels in the image; || represents the absolute value.
[0179] Step A2: Use formula (2) to obtain the total color value with the largest pixel difference between the visualized and labeled image and the original image.
[0180]
[0181] Where D y This represents the total color value with the largest pixel difference between the visualized and labeled image and the original image; max[,,] represents finding the maximum value among the three comma-separated values in parentheses;
[0182] Step A3: Using formula (3), control whether to retain the original image based on the number of pixels that differ from the original image after visualization and labeling, as well as the total pixel difference value.
[0183]
[0184] Where E represents the control value for whether the original image is retained; This means substituting the values of a from 1 to n into the parentheses to get the maximum value inside the parentheses; ∨ represents logical OR; ∧ represents logical AND;
[0185] If E=1, it means that the original image needs to be preserved to prevent the image after visualization and labeling from obscuring the original image too much.
[0186] If E = 0, it means that the original image does not need to be retained.
[0187] The working principle of the above technical solution is as follows: Real-time data acquisition: First, the method acquires breast image data in real time. This data may come from breast cancer screening or other related medical examinations. This data may include mammography, breast ultrasound imaging, etc.
[0188] Preprocessing: The acquired breast image data undergoes preprocessing steps to improve image quality and clarity. Preprocessing may include noise reduction, contrast enhancement, and brightness and contrast adjustment to prepare the images for subsequent analysis.
[0189] Thresholding Segmentation: Next, thresholding segmentation is used to segment the breast image. Thresholding segmentation is an image processing technique that divides pixels in an image into two or more distinct regions based on whether the pixel's grayscale value meets a certain threshold condition. In this case, abnormal breast regions are separated from normal tissue regions.
[0190] Abnormal region segmentation: In the results of abnormal region segmentation of the breast, abnormal regions may include potential breast cancer lesions or other abnormalities. These abnormal regions are further segmented to determine their location and shape, which helps in further analysis and evaluation.
[0191] Visualization and Labeling: Finally, the segmentation results are combined with the original image for visualization and labeling. This allows doctors or analysts to visually view and understand abnormal areas in the image, providing information for subsequent diagnosis and decision-making.
[0192] The advantages of the above technical solution are as follows: This embodiment proposes a breast cancer image information recognition and labeling system using a threshold segmentation method. This method can automatically identify and segment abnormal regions in breast images, reducing the workload of doctors and improving analysis efficiency. Visualizing the segmentation results on the original image helps doctors or analysts more easily identify and label potential breast cancer areas. Through automatic segmentation and visual labeling, this method helps in the early detection of breast cancer or other abnormalities, improving the accuracy and timeliness of breast cancer screening.
[0193] Meanwhile, the number of distinguishing pixels between the image after visualization and marking and the original image is obtained using formula (1) in step A1, thus knowing the number of occluded pixels in the image after visualization and marking, laying the foundation for subsequent control; then, the total color value with the maximum pixel difference between the image after visualization and marking and the original image is obtained using formula (2) in step A2, thus knowing the color difference situation, laying the foundation for subsequent control; finally, formula (3) in step A3 is used to control whether the original image is retained based on the number of distinguishing pixels between the image after visualization and marking and the original image and the total pixel difference value, to prevent the image after visualization and marking from being too severely occluded and affecting the original image;
[0194] In summary, this technical solution provides an automated and assisted approach to breast cancer screening through image segmentation and visualization, and is expected to improve the early diagnosis and management of breast cancer.
[0195] In one embodiment of the present invention, the real-time acquisition module includes:
[0196] The data acquisition module is used to acquire breast image data in real time;
[0197] The preprocessing module is used to preprocess the breast image data to obtain a processed breast image; wherein the preprocessing includes denoising, enhancement and histogram equalization.
[0198] The working principle of the above technical solution is as follows: Real-time acquisition of breast image data: This method first acquires breast image data in real time during medical examinations or breast cancer screenings. This data typically comes from different breast imaging techniques, such as mammography or breast ultrasound imaging.
[0199] Preprocessing of breast image data: Acquired breast image data requires preprocessing to improve image quality, clarity, and usability. The main preprocessing steps include:
[0200] Denoising: Denoising aims to remove random noise from an image to improve image quality. This may include applying filters or other denoising techniques to smooth the image and reduce noise.
[0201] Enhancement processing: Enhancement processing is used to improve the contrast and detail of an image. This may include enhancing features such as brightness, contrast, edges, and texture to better display structures in the image.
[0202] Histogram equalization: Histogram equalization is a technique used to adjust the brightness distribution of an image, which can help to better display details in an image, especially in cases of uneven lighting.
[0203] The effects of the above technical solution are as follows: Improved image quality: Through preprocessing steps such as denoising, enhancement, and histogram equalization, the quality of breast images is significantly improved, which helps doctors or analysts to more accurately identify and analyze structures and abnormalities in the images.
[0204] Information visualization: Preprocessing makes key information in the image more clearly visible, which is very important for the early detection of breast abnormalities or lesions and helps improve the accuracy of breast cancer screening.
[0205] Reduce misdiagnosis: By improving image quality and contrast, preprocessing helps reduce the subjectivity of image interpretation, thereby lowering the risk of misdiagnosis, especially in breast cancer screening.
[0206] In summary, this technical solution improves the quality and visualization of breast images by acquiring and preprocessing breast image data in real time, which is expected to improve the early diagnosis and management of breast cancer.
[0207] In one embodiment of the present invention, the segmentation module includes:
[0208] The global threshold setting module is used to set the global threshold for abnormal breast areas;
[0209] The comparison module is used to sequentially traverse each pixel of the breast image and compare the gray value of each pixel with the global threshold in turn.
[0210] The normal region acquisition module is used to classify pixels whose gray values are greater than a preset global threshold into the normal tissue category when the gray value of the pixel is greater than a preset global threshold, and to adjust the gray value of the pixels classified into the normal tissue category to the first target gray value.
[0211] An abnormal region acquisition module is used to classify pixels whose grayscale value is less than or equal to a preset global threshold as an abnormal organization category when the grayscale value of the pixel is less than or equal to a preset global threshold, and adjust the grayscale of the pixels classified as abnormal organization categories to a second target grayscale.
[0212] The region segmentation module is used to segment the image regions of the first target gray level and the second target gray level to obtain the abnormal region segmentation result.
[0213] The working principle of the above technical solution is as follows: Setting a global threshold: First, before processing the breast image, a global threshold is set for segmenting abnormal breast regions. This global threshold is a preset grayscale value used to classify pixels in the image into normal tissue and abnormal tissue categories.
[0214] Pixel Traversal and Comparison: Next, each pixel of the breast image is traversed. For each pixel, its grayscale value is compared with a preset global threshold.
[0215] Pixel classification and grayscale adjustment: Based on the comparison results, perform the following operations:
[0216] If a pixel's grayscale value is greater than a preset global threshold, the pixel is classified as normal tissue, and its grayscale value is adjusted to the first target grayscale value. This indicates that the pixel is considered normal breast tissue.
[0217] If a pixel's grayscale value is less than or equal to a preset global threshold, the pixel is classified as abnormal tissue, and its grayscale value is adjusted to the second target grayscale value. This indicates that the pixel is considered abnormal tissue in the breast image.
[0218] Abnormal region segmentation: After pixel classification and grayscale adjustment, pixel regions with the second target grayscale value are segmented as abnormal regions. This produces the abnormal region segmentation results for breast images.
[0219] The above technical solution achieves the following effect: Automatic segmentation of abnormal regions: Through the global threshold segmentation method, this method can automatically separate abnormal tissue regions from normal tissue regions in breast images, thereby realizing automatic segmentation of abnormal regions.
[0220] Grayscale adjustment: For pixels classified as abnormal tissue, their grayscale values are adjusted to a second target grayscale value, which helps to further highlight the abnormal area and makes it easier for doctors or analysts to identify.
[0221] Visualization of segmentation results: By segmenting abnormal regions, pixel regions with different gray values can be obtained, which helps to visualize the abnormal regions so that doctors can make further diagnoses and analyses.
[0222] In summary, this technical solution achieves automatic segmentation and visualization of abnormal regions in breast images through a threshold segmentation method, which is expected to improve the efficiency and accuracy of breast cancer screening and diagnosis.
[0223] In one embodiment of the present invention, the global threshold setting module includes:
[0224] The retrieval module is used to retrieve breast cancer image data from the database;
[0225] The histogram acquisition module is used to perform histogram analysis on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data;
[0226] The histogram analysis module is used to analyze the histogram and obtain one or more peak information in the histogram;
[0227] The first setting module is used to set the global threshold to 0.77P using the peak information when there is only one peak information, where P represents the value corresponding to the peak information;
[0228] The second setting module is used to set the global threshold to 0.68×1 / n×(P1+P2+……+Pn) when there are multiple peak information; where n represents the number of peak information, and P1, P1……Pn represent the specific values corresponding to the multiple peak information respectively.
[0229] The working principle of the above technical solution is as follows: Retrieving breast cancer image data: First, retrieve the stored breast cancer image data from the database. These images are used for subsequent threshold settings.
[0230] Histogram analysis: Histogram analysis is performed on the retrieved breast cancer image data to obtain the corresponding histograms. A histogram is a table representing the number of pixels at different gray levels, reflecting the pixel distribution at different gray levels in the image.
[0231] Peak information analysis: The obtained histogram is analyzed to identify one or more peaks. Peak information represents the gray level at which the number of pixels in the histogram peaks. These peaks typically correspond to major features or structures in the image.
[0232] Threshold setting: Based on the peak information obtained from the analysis, a global threshold is set to segment abnormal breast regions. The specific setting method is as follows:
[0233] If there is only one peak value, the global threshold is set to 0.77 multiplied by the value of that peak value.
[0234] If there are multiple peak values, the global threshold is set to 0.68 multiplied by the average of the values corresponding to all peak values. This takes into account the case of multiple peaks and better accommodates the complexity of the image.
[0235] The advantages of the above technical solution are: Adaptive threshold setting: Through histogram analysis and peak information extraction, this method can adaptively set a global threshold according to the characteristics of image data, rather than relying on a fixed threshold. This helps to better adapt to the characteristics of different images.
[0236] Improved segmentation accuracy: Adaptive threshold settings can better reflect the features and structures in the image, thereby improving the segmentation accuracy of abnormal breast regions.
[0237] Suitable for multi-peak scenarios: When an image contains multiple peaks, this method can reasonably integrate information from multiple peaks to set the threshold more accurately, thereby improving the robustness of segmentation.
[0238] In summary, this technical solution achieves adaptive global threshold setting by analyzing the histogram and peak information of breast cancer image data, which is expected to improve the segmentation quality and accuracy of breast images. This is highly valuable for the identification and analysis of abnormal breast regions.
[0239] In one embodiment of the present invention, the process of setting the first target grayscale value and the second target grayscale value includes:
[0240] Step 1: Retrieve breast cancer image data from the database;
[0241] Step 2: Perform histogram analysis on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data;
[0242] Step 3: Analyze the histogram to obtain one or more peak values and one or more valley values from the histogram;
[0243] Step 4: When there is only one peak information, the global threshold is set to 0.36P using the second target grayscale, where P represents the value corresponding to the peak information.
[0244] Step 5: When there are multiple peak information, the gray level of the second target is set to 0.34×1 / n×(P1+P2+……+Pn) using the multiple peak information; where n represents the number of peak information, and P1, P1……Pn represent the specific values corresponding to the multiple peak information respectively;
[0245] Step 6: When there is only one valley value, the global threshold is set to 0.15G using the first target grayscale, where G represents the value corresponding to the valley value.
[0246] Step 7: When there are multiple valley value information, the first target grayscale is set to 0.17×1 / m×(G1+G2+……+Gm) using the multiple valley value information; where m represents the number of valley value information, and G1, G1……Gn represent the specific values corresponding to the multiple valley value information respectively.
[0247] The working principle of the above technical solution is as follows: retrieve breast cancer image data: retrieve the stored breast cancer image data from the database, which will be used for subsequent histogram analysis.
[0248] Histogram analysis: Histogram analysis is performed on the acquired breast cancer image data to obtain the histogram of the data. A histogram is a table that contains information about the number of pixels at different gray levels.
[0249] Peak and trough information extraction: The obtained histogram is analyzed to extract peak information (representing the gray level of the peak pixel count) and trough information (representing the gray level of the trough pixel count). This information reflects the distribution characteristics of pixels at different gray levels in the image.
[0250] Threshold setting: Based on the extracted peak and trough information, a global threshold is set for segmenting abnormal breast regions. The specific setting method is as follows:
[0251] If there is only one peak value, then the grayscale value of the second target is set to 0.36 multiplied by the value of that peak value.
[0252] If there are multiple peak values, the second target grayscale value is set to 0.34 multiplied by the average of the values corresponding to all peak values.
[0253] If there is only one valley value, then the first target grayscale value is set to 0.15 multiplied by the value of that valley value.
[0254] If there are multiple valley values, the first target grayscale value is set to 0.17 multiplied by the average value of all valley values.
[0255] The effect of the above technical solution is as follows: Adaptive threshold setting: Based on the peak and valley information in the histogram, the method can adaptively set the first target gray value and the second target gray value, thereby better adapting to the characteristics of different images.
[0256] By integrating multiple pieces of information: When there are multiple peak or valley values, this method takes all of these information into account to set the target gray value more accurately, thereby improving the robustness of segmentation.
[0257] Improving segmentation accuracy: The adaptive target gray value setting is expected to improve the segmentation accuracy of abnormal breast regions, which will help to better identify breast cancer areas.
[0258] In summary, this technical solution achieves adaptive target grayscale value setting by analyzing the peak and valley information in the histogram of breast cancer images, which is expected to improve the quality and accuracy of breast image segmentation and thus has important value for breast cancer diagnosis.
[0259] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for identifying and labeling breast cancer image information, characterized in that, The breast cancer image information recognition and labeling method includes: Real-time acquisition of breast image data, and preprocessing of the breast image data to obtain processed breast images; The breast image is segmented using a threshold segmentation method to obtain abnormal breast regions, and these abnormal regions are further segmented to obtain abnormal region segmentation results. The segmentation results are visualized and labeled on the original image. The differences between the visualized and labeled image and the original image are analyzed to control whether the original image is retained.
2. The method for breast cancer image information recognition and labeling according to claim 1, characterized in that, Real-time acquisition of breast image data and preprocessing of the breast image data to obtain processed breast images, including: Real-time acquisition of breast image data; The breast image data is preprocessed to obtain a processed breast image; wherein the preprocessing includes denoising, enhancement and histogram equalization.
3. The method for breast cancer image information recognition and labeling according to claim 1, characterized in that, The breast image is segmented using a threshold segmentation method to obtain abnormal breast regions, and these abnormal regions are further segmented to obtain abnormal region segmentation results, including: Set a global threshold for identifying abnormal breast regions; Each pixel of the breast image is sequentially traversed, and the gray value of each pixel is compared with the global threshold in turn. When the gray value of the pixel is greater than a preset global threshold, the pixel whose gray value is greater than the global threshold is classified as a normal tissue category, and the gray value of the pixel classified as a normal tissue category is adjusted to the first target gray value. When the grayscale value of the pixel is less than or equal to a preset global threshold, the pixel whose grayscale value is less than or equal to the global threshold is classified as an abnormal organization category, and the grayscale of the pixel classified as an abnormal organization category is adjusted to the second target grayscale. By segmenting the image regions of the first target gray level and the second target gray level, the abnormal region segmentation result is obtained.
4. The breast cancer image information recognition and labeling method according to claim 3, characterized in that, Set global thresholds for identifying abnormal breast regions, including: Retrieve breast cancer image data from the database; Histogram analysis is performed on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data; The histogram is analyzed to obtain one or more peak values. When there is only one peak information, the global threshold is set to 0.77P using the peak information, where P represents the value corresponding to the peak information; When there are multiple peak values, the global threshold is set to 0.68 × 1 / n × (P1 + P2 + ... + P) using these multiple peak values. n ); where n represents the number of peak information points, P1, P2...P1 n Each of these represents a specific numerical value corresponding to one of the aforementioned peak values.
5. The method for breast cancer image information recognition and labeling according to claim 3, characterized in that, The process of setting the first target grayscale value and the second target grayscale value includes: Retrieve breast cancer image data from the database; Histogram analysis is performed on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data; The histogram is analyzed to obtain one or more peak values and one or more valley values. When there is only one peak information, the global threshold is set to 0.36P using the second target grayscale, where P represents the value corresponding to the peak information; When there are multiple peak information values, the second target grayscale is set to 0.34×1 / n×(P1+P2+……+P) using these multiple peak information values. n ); where n represents the number of peak information points, P1, P2...P1 n Each of the aforementioned peak values represents a specific numerical value; When there is only one valley value, the global threshold is set to 0.15G using the first target grayscale, where G represents the value corresponding to the valley value. When there are multiple valley values, the first target grayscale is set to 0.17×1 / m×(G1+G2+……+G) using these multiple valley values. m ); where m represents the number of valley value information, G1, G1...G n Each of these represents a specific numerical value corresponding to one of the valley values.
6. A breast cancer image information recognition and labeling system, characterized in that, The breast cancer image information recognition and labeling system includes: The real-time acquisition module is used to acquire breast image data in real time and preprocess the breast image data to obtain processed breast images. The segmentation module is used to segment the breast image using a threshold segmentation method to obtain abnormal breast regions, and to segment the abnormal breast regions to obtain abnormal region segmentation results. The labeling and display module is used to visualize and label the segmentation results on the original image, analyze the differences between the visualized and labeled image and the original image, and control whether the original image is retained.
7. The breast cancer image information recognition and labeling system according to claim 6, characterized in that, The real-time acquisition module includes: The data acquisition module is used to acquire breast image data in real time; The preprocessing module is used to preprocess the breast image data to obtain a processed breast image; wherein the preprocessing includes denoising, enhancement and histogram equalization.
8. The breast cancer image information recognition and labeling system according to claim 6, characterized in that, The segmentation module includes: The global threshold setting module is used to set the global threshold for abnormal breast areas; The comparison module is used to sequentially traverse each pixel of the breast image and compare the gray value of each pixel with the global threshold in turn. The normal region acquisition module is used to classify pixels whose gray values are greater than a preset global threshold into the normal tissue category when the gray value of the pixel is greater than a preset global threshold, and to adjust the gray value of the pixels classified into the normal tissue category to the first target gray value. An abnormal region acquisition module is used to classify pixels whose grayscale value is less than or equal to a preset global threshold as an abnormal organization category when the grayscale value of the pixel is less than or equal to a preset global threshold, and adjust the grayscale of the pixels classified as abnormal organization categories to a second target grayscale. The region segmentation module is used to segment the image regions of the first target gray level and the second target gray level to obtain the abnormal region segmentation result.
9. The breast cancer image information recognition and labeling system according to claim 8, characterized in that, The global threshold setting module includes: The retrieval module is used to retrieve breast cancer image data from the database; The histogram acquisition module is used to perform histogram analysis on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data; The histogram analysis module is used to analyze the histogram and obtain one or more peak information in the histogram; The first setting module is used to set the global threshold to 0.77P using the peak information when there is only one peak information, where P represents the value corresponding to the peak information; The second setting module is used to set the global threshold to 0.68×1 / n×(P1+P2+……+P when there are multiple peak information points.) n ); where n represents the number of peak information points, P1, P2...P1 n Each of these represents a specific numerical value corresponding to one of the aforementioned peak values.
10. The breast cancer image information recognition and labeling system according to claim 8, characterized in that, The process of setting the first target grayscale value and the second target grayscale value includes: Step 1: Retrieve breast cancer image data from the database; Step 2: Perform histogram analysis on the breast cancer image data to obtain the histogram corresponding to the breast cancer image data, wherein the histogram is a table of the number of pixels at each gray level in the breast cancer image data; Step 3: Analyze the histogram to obtain one or more peak values and one or more valley values from the histogram; Step 4: When there is only one peak information, the global threshold is set to 0.36P using the second target grayscale, where P represents the value corresponding to the peak information. Step 5: When there are multiple peak information values, the grayscale of the second target is set to 0.34 × 1 / n × (P1 + P2 + ... + P) using these multiple peak information values. n ); where n represents the number of peak information points, P1, P2...P1 n Each of the aforementioned peak values represents a specific numerical value; Step 6: When there is only one valley value, the global threshold is set to 0.15G using the first target grayscale, where G represents the value corresponding to the valley value. Step 7: When there are multiple valley values, the first target grayscale is set to 0.17 × 1 / m × (G1 + G2 + ... + G) using these multiple valley values. m ); where m represents the number of valley value information, G1, G1...G n Each of these represents a specific numerical value corresponding to one of the valley values.