# Intelligent Segmentation and Recognition Method of Breast Cancer Based on Digital Image Processing Technology

Authors: Xiaochen Tang; Yunbo An; Congshan Li
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

With the development of digital image technology, judging diseases by medical image plays an important role in medical diagnosis. Mammography is the most effective imaging examination method for breast cancer at present. Intelligent segmentation and identification of breast cancer images and judging their size and classification by digital image processing technology can promote the development of clinical medicine. This paper introduces the preprocessing technology of breast cancer pathological image and medical image recognition technology of breast cancer. In order to improve the segmentation accuracy of image processing and optimize, the segmentation recognition ability in digital mammography was improved. Based on the technical basis of pathological image analysis of breast cancer, the architecture of intelligent segmentation and recognition system for breast cancer was constructed, and each functional module of intelligent system was introduced in detail. Based on digital image processing technology, filtering technology is used to reduce dryness and improve the clarity of the image. Public datasets INBreast and DDSM-BCRP were used to verify system’s performance, and it was tested on the breast cancer image test set. The experiment shows that the comprehensive performance of the intelligent segmentation and recognition system can realize the segmentation and recognition of breast cancer and has higher accuracy and interpretability, which is helpful to improve the diagnosis of doctors.


---

## Body

## 1. Introduction

With the development of medical and health services, the digital application of pathological samples has become more and more wide in large hospitals equipped with pathological full-section scanning equipment, and the intelligent segmentation recognition and detection of digital pathological images has gradually become one of the research hotspots in the field of modern medical images [1]. Biopsy pathology can effectively evaluate the nature of the lesion and the extent of tumour metastasis. The appropriate surgical resection range was effectively diagnosed. This test ensures that patients receive adequate, effective treatment and retain as much tissue as possible. The pathological analysis of the process is mainly by the electronic scanning electron microscope scanning first out of pathological image of high resolution, by department doctor again detailed observations in pathological image analysis with the naked eye, and the doctor through the pathological observation can judge to check the lesion site for tumour lesions and judge the malignant degree and, in the final analysis, the extent to which the malignant tumour invasion pathological diagnosis can be improved step by step. However, each pathological section image contains a large amount of data, and the search and diagnosis of lesions and cancer cells alone requires a large workload. Doctors may miss some diseases due to fatigue or lack of experience, resulting in false negatives and false positives [2, 3]. Eventually, the corresponding treatment may be miss elected, resulting in the disease cannot be effectively treated.With the rapid development of computer technology, digital image processing technology, and artificial intelligence technology, digital pathological image processing technology has gradually become a research focus. Through automatic detection and recognition of pathological images, the burden of manual film reading can be significantly reduced. In addition, the detection and recognition of pathological sections of breast cancer by ARTIFICIAL intelligence can provide medical personnel with accurate data of lesion areas or areas of interest, which is of far-reaching significance to improve the utilization value of medical images and greatly help to improve the accuracy and rapidity of pathological diagnosis [4]. The early development of digital image processing technology is to get high-definition images. Since the quality of the image sensor in the early stage is not up to the ideal demand, the captured image will have a lot of noise, so the early image processing is to remove the noise and get clear images to meet the needs of various scenes in the industrial field.With the demand of industrialization development, there are more and more requirements for image processing. At present, image processing methods include filtering, coding, segmentation, image digitization, enhancement and restoration, compression, detection, and image recognition technology [5]. With the rapid development of science and technology, needing more and more applications of image processing, the traditional digital image processing technology in the process does not consider that scenarios can meet the demand of real time, but to require real-time processing of the image, requiring time delay is small, the traditional computer image processing technology to reach requirement. Then, the next development direction of digital image is to complete real-time and effective image processing with low delay. Under the background of machine vision system being widely used, improving the timeliness of system image processing has great application prospect. Digital image segmentation technology is mainly based on the similarity degree of some features and feature sets of the image itself; the image is replanned. In the process of planning, the planning needs to be completed in accordance with a certain proportion, which can improve the image pixel sharpness, so as to effectively improve the image quality. In addition, the resegmented part needs to be properly connected, and on this basis, it cannot be superimposed or repeated. At the same time, it is necessary to ensure that the segmented image has a high consistency, and the picture cannot be substantially changed.


## 2. Related Work

With the rapid rise of deep learning, computer-aided medical diagnosis has gradually begun to develop. The application of digital pathology has made rapid development of pathological examination [6]. Virtual microscope transmission technology can transform living tissue sections into digital images and observe pathological tissues more intuitively on the computer. Digital pathology is known as one of the most valuable directions to provide more effective and cheaper treatment for cancer and other severe disease diagnosis [7]. By working to integrate digital image and pathology process, advanced algorithm and computer-aided diagnosis technology extend pathologist’s field of vision, such as Hariraj et al. mathematical model to realize computer-aided diagnosis system is used to diagnose cancer, machine learning as the main content, the synapses series slice image threshold segmentation, and morphological operation is applied to segment the synaptic structure. Then, image registration is carried out to achieve the preliminary detection of synapses [8]. Devakumari and Punithavathi successfully detected cancer through deep convolution neural network, and deep learning also performed well in pathological section image segmentation [9]. Kaur et al. processed the nuclei in the pathological images and generated the nuclear probability map using multiscale convolution network, which was divided to separate the single nuclei from the graph [10].During most pathological analyses, the pathologist is interested in identifying specific parts of the anatomical area. Using the dictionary learning framework, Durgadevi and Shekhar designed a dual C GAN network to identify tumor regions in the pathological images of cancer patients [11]. Sinha based on convolution neural network to colonic gland pathological image segmentation, by studying the characteristics of the colonic gland pathological image, so as to realize the automatic segmentation of the gland area, proposed method that can detect the target area, but the split between different gland adhesion situation and design of network structure remains to be optimized [12]. Suresh et al. discussed the value of computer-aided quantitative analysis in the differential diagnosis of different invasive lung Aden carcinoma, semiautomatic segmentation of CT images with computer-aided software, and quantitative analysis of the invasive CT images of patients with lung Aden carcinoma [13]. Jimenez and Racoceanu realized the classification of subtypes of non-small-cell carcinoma by processing images of digital pathological sections of non-small-cell carcinoma and training classifiers according to their morphological characteristics [14]. The experimental results obtained the classification of lung Aden carcinoma and lung squalor carcinoma. The pathologically assisted diagnosis of breast cancer remains to be studied, and the accuracy and speed of detection still need to be improved.


## 3. Basic Techniques of Pathological Image Processing of Breast Cancer

### 3.1. Pathological Diagnosis of Breast Neoplasm

The pathological diagnosis of breast tumours is an indispensable basis for surgical treatment. Tumour self-exploration and analysis can provide a basis for the treatment and prognosis of patients, and it is of great significance to formulate a comprehensive treatment plan and evaluate the prognosis after surgery. The diagnosis mainly includes cytological diagnosis and histological diagnosis. The purpose of cytological diagnosis of breast tumours is to divide breast cells into benign epithelial cells, suspicious cancer cells, and typical cancer cells by cytological diagnosis methods such as needle aspiration or nipple discharge. The purpose of histological diagnosis of breast tumour is to determine the histological type of breast tumour by excision biopsy, excision biopsy, and needle aspiration biopsy.From occurrence frequency, above 99% of mammary gland malignant tumour is epithelial malignant tumour, namely, breast cancer. The commonly used classification standard of breast cancer in China divides breast cancer into noninvasive cancer, early invasive cancer, invasive nonspecific cancer, and invasive special cancer, and each type can also be subdivided into different subtypes. The types of breast cancer are closely related to prognosis. For example, the prognosis of carcinoma in situ is better than that of invasive carcinoma, and the prognosis of myeloid carcinoma infiltrated by juvenile lymphocytes is better in invasive special carcinoma. Therefore, a correct classification of breast cancer is crucial. In the images of breast cancer, pathologists usually classify breast cancer by the morphology of histological structure. If intraductal carcinoma originates from ducal epithelium, the ducts are seen as cords or small nodules on the section, and the cancer cells are located in the expanded ducts, and the basement membrane is intact. Lobular carcinoma in situ originates from the ducal epithelium within lobules, with proliferative cells lacking chromatin, round nuclei, light staining, and uniform size [15]. Compared with noninvasive breast cancer, invasive breast cancer is more harmful. The histological grade of invasive breast cancer is an important prognostic factor. A number of studies have shown that there is a clear correlation between histological grade and prognosis in invasive breast cancer. Therefore, correct histological grade of invasive breast cancer plays an important role. At present, the most authoritative and extensive grading system of netted breast cancer is an improved grading system, which mainly classifies cancers according to the proportion of glandular tube formation and nuclear atypical and mitotic count. Independent scores of the three indicators were added to classify invasive breast cancer into high, medium, and low grades. Evaluation of mitosis by manual counting by nonauthoritative pathologists often results in misdiagnosis or misdiagnosis due to the different morphology of mitotic cells, the presence of suspected substances caused by impurities, etc. In the evaluation of nuclear atypical, pathologists mainly take the size of the target cell and the normal cell as the evaluation basis and also take the nuclear size and chromatin density in the local area as reference to comprehensively evaluate nuclear atypical.


### 3.2. Technical Basis of Pathological Image Analysis of Breast Cancer

Medical features such as morphology, texture, and space are important basis for pathologists to describe and classify histology. Morphological features are the basic representation method of the target pathological image, which represents the shape and density of the target. For example, in the evaluation of nuclear atypical in invasive breast cancer, the comparison of the size of target cells and normal cells and the size and shape of the target nucleus are the evaluation basis. Texture feature is a way to describe the local patterns and arrangement rules of images based on statistics, model, structure, signal processing, and other methods, which can characterize the stability of image gray changes and the depth of the furrows. Common description methods include gray cooccurrence matrix, gray stroke statistics, Markov model, and feature filter. A spatial feature is a quantitative representation of the arrangement and distribution between cells. Nuclei do not exist independently, but depend on each other to form a certain shape, which has a pathological relationship in a certain sense. However, due to the different subjective evaluation criteria of different pathologists and the large quantitative dimension of pathological images, pathologists have a huge workload to make relevant diagnosis based on these features, resulting in low consistency. Therefore, the introduction of digital image processing technology to describe the features of pathological images can effectively avoid subjective judgment, reduce the labor burden of pathologists, and greatly improve the diagnostic efficiency.


### 3.3. Reprocessing of Breast Cancer Pathological Images

Breast cancer image reprocessing is mainly to achieve the balance of staining. Due to the influence of the thickness of the stained slices, dyeing time and temperature, the difference of dye manufacturers, scanning platform, and image Mosaic algorithm, the phenomenon of huge difference in the appearance of the same tissue appears, which needs to be eliminated through normalization of relevant algorithms [16]. The traditional dyeing equalization method based on optics and matrix decomposition has good performance in the case of small amount of data, but the effect is poor in the case of large amount of data and large difference due to the need to set a large number of parameters manually. Therefore, deep learning based on automatic learning of organizational characteristics to adjust the region colour algorithm is gradually proposed. Deep learning-based dyeing equalization method mainly uses extract tissue feature to find the most suitable feature space. It is an unsupervised learning method which is mainly used for dimension reduction or feature extraction of data. Since the neural network does not know the role of initial weight in training when it initializes weights, it needs an initialization method that can learn appropriate feature expression through unlabeled samples. It is such a data reconstruction method. Representational reconstruction is output. By minimizing the reconstruction error, it is proved that the original data can be restored from the potential spatial representation, that is, this representation can fully represent the characteristics of the original data. Pathological image staining equalization method seeks potential spatial representations of various tissues through sparse and then uses them as features for clustering to distinguish different tissues and carry out staining equalization. Compared with traditional methods, image processing technology can automatically extract tissue features without manual parameter setting. It has strong generalization ability and can achieve better correction effect in different pathological images.


### 3.4. Cell Segmentation Technique of Breast Cancer Pathological Image

Cell segmentation is an indispensable step in breast cancer pathologic image classification and mitotic cell detection. Traditional cell segmentation methods include segmentation techniques based on region, edge, energy functional, clustering, and graph theory. The basic idea of region-based segmentation is to divide the image space into nonoverlapping regions according to the characteristics of the image, and these usually come from the information of pixel points, such as gray value, or the data transformation from the original image. The commonly used region-based segmentation method is threshold segmentation. The basic idea of the segmentation method based on edge detection is to determine the edge pixels in the image first and then connect these pixels together to form the required regional boundaries. The commonly used edge-based detection methods include edge detection and contour tracking. The segmentation method based on energy functional is mainly based on active contour model and related segmentation algorithm, and its basic idea is to segment the image by obtaining a constrained variability model [17]. Clustering-based segmentation is to gather the pixels in the image into several categories, including hard clustering and soft clustering. The commonly used clustering segmentation models include connectivity model, centred model, distribution model, and density model. The main idea of segmentation based on graph theory is to represent the image to be segmented as a weighted graph, in which each node corresponds to an image pixel or block.


### 3.5. Image Segmentation Technology

Image segmentation technology is to replan the set of some similar features and features of the image and proceed in accordance with the corresponding proportion, so as to get a clearer image. In the process of image segmentation, there are many points to pay attention to [18]. For example, to ensure that the segmented places are connected properly, the segmented places are different, the segmented images are coherent, and the image content before and after segmentation has not changed, because of the image processing requirements, and to achieve different effects, the use of image segmentation methods are different. Image segmentation technology includes many unique image segmentation methods. For example, the use of coarse segmentation method and fine segmentation method will get different pixels of the image; gray image segmentation method and colour image segmentation method can be used to segment black and white image and colour image, respectively. Static image segmentation method and dynamic image segmentation method can be used to segment static image and dynamic image, respectively. There are different requirements for different industries for the use of image segmentation technology to deal with the different image types, such as the need to the human body structure in medicine image segmentation, in terms of transportation need image segmentation processing of various important crossroads, in the military to military base of image segmentation. In a word, there are a lot of content of image segmentation technology; you can choose the right image segmentation technology to use according to different needs.


## 3.1. Pathological Diagnosis of Breast Neoplasm

The pathological diagnosis of breast tumours is an indispensable basis for surgical treatment. Tumour self-exploration and analysis can provide a basis for the treatment and prognosis of patients, and it is of great significance to formulate a comprehensive treatment plan and evaluate the prognosis after surgery. The diagnosis mainly includes cytological diagnosis and histological diagnosis. The purpose of cytological diagnosis of breast tumours is to divide breast cells into benign epithelial cells, suspicious cancer cells, and typical cancer cells by cytological diagnosis methods such as needle aspiration or nipple discharge. The purpose of histological diagnosis of breast tumour is to determine the histological type of breast tumour by excision biopsy, excision biopsy, and needle aspiration biopsy.From occurrence frequency, above 99% of mammary gland malignant tumour is epithelial malignant tumour, namely, breast cancer. The commonly used classification standard of breast cancer in China divides breast cancer into noninvasive cancer, early invasive cancer, invasive nonspecific cancer, and invasive special cancer, and each type can also be subdivided into different subtypes. The types of breast cancer are closely related to prognosis. For example, the prognosis of carcinoma in situ is better than that of invasive carcinoma, and the prognosis of myeloid carcinoma infiltrated by juvenile lymphocytes is better in invasive special carcinoma. Therefore, a correct classification of breast cancer is crucial. In the images of breast cancer, pathologists usually classify breast cancer by the morphology of histological structure. If intraductal carcinoma originates from ducal epithelium, the ducts are seen as cords or small nodules on the section, and the cancer cells are located in the expanded ducts, and the basement membrane is intact. Lobular carcinoma in situ originates from the ducal epithelium within lobules, with proliferative cells lacking chromatin, round nuclei, light staining, and uniform size [15]. Compared with noninvasive breast cancer, invasive breast cancer is more harmful. The histological grade of invasive breast cancer is an important prognostic factor. A number of studies have shown that there is a clear correlation between histological grade and prognosis in invasive breast cancer. Therefore, correct histological grade of invasive breast cancer plays an important role. At present, the most authoritative and extensive grading system of netted breast cancer is an improved grading system, which mainly classifies cancers according to the proportion of glandular tube formation and nuclear atypical and mitotic count. Independent scores of the three indicators were added to classify invasive breast cancer into high, medium, and low grades. Evaluation of mitosis by manual counting by nonauthoritative pathologists often results in misdiagnosis or misdiagnosis due to the different morphology of mitotic cells, the presence of suspected substances caused by impurities, etc. In the evaluation of nuclear atypical, pathologists mainly take the size of the target cell and the normal cell as the evaluation basis and also take the nuclear size and chromatin density in the local area as reference to comprehensively evaluate nuclear atypical.


## 3.2. Technical Basis of Pathological Image Analysis of Breast Cancer

Medical features such as morphology, texture, and space are important basis for pathologists to describe and classify histology. Morphological features are the basic representation method of the target pathological image, which represents the shape and density of the target. For example, in the evaluation of nuclear atypical in invasive breast cancer, the comparison of the size of target cells and normal cells and the size and shape of the target nucleus are the evaluation basis. Texture feature is a way to describe the local patterns and arrangement rules of images based on statistics, model, structure, signal processing, and other methods, which can characterize the stability of image gray changes and the depth of the furrows. Common description methods include gray cooccurrence matrix, gray stroke statistics, Markov model, and feature filter. A spatial feature is a quantitative representation of the arrangement and distribution between cells. Nuclei do not exist independently, but depend on each other to form a certain shape, which has a pathological relationship in a certain sense. However, due to the different subjective evaluation criteria of different pathologists and the large quantitative dimension of pathological images, pathologists have a huge workload to make relevant diagnosis based on these features, resulting in low consistency. Therefore, the introduction of digital image processing technology to describe the features of pathological images can effectively avoid subjective judgment, reduce the labor burden of pathologists, and greatly improve the diagnostic efficiency.


## 3.3. Reprocessing of Breast Cancer Pathological Images

Breast cancer image reprocessing is mainly to achieve the balance of staining. Due to the influence of the thickness of the stained slices, dyeing time and temperature, the difference of dye manufacturers, scanning platform, and image Mosaic algorithm, the phenomenon of huge difference in the appearance of the same tissue appears, which needs to be eliminated through normalization of relevant algorithms [16]. The traditional dyeing equalization method based on optics and matrix decomposition has good performance in the case of small amount of data, but the effect is poor in the case of large amount of data and large difference due to the need to set a large number of parameters manually. Therefore, deep learning based on automatic learning of organizational characteristics to adjust the region colour algorithm is gradually proposed. Deep learning-based dyeing equalization method mainly uses extract tissue feature to find the most suitable feature space. It is an unsupervised learning method which is mainly used for dimension reduction or feature extraction of data. Since the neural network does not know the role of initial weight in training when it initializes weights, it needs an initialization method that can learn appropriate feature expression through unlabeled samples. It is such a data reconstruction method. Representational reconstruction is output. By minimizing the reconstruction error, it is proved that the original data can be restored from the potential spatial representation, that is, this representation can fully represent the characteristics of the original data. Pathological image staining equalization method seeks potential spatial representations of various tissues through sparse and then uses them as features for clustering to distinguish different tissues and carry out staining equalization. Compared with traditional methods, image processing technology can automatically extract tissue features without manual parameter setting. It has strong generalization ability and can achieve better correction effect in different pathological images.


## 3.4. Cell Segmentation Technique of Breast Cancer Pathological Image

Cell segmentation is an indispensable step in breast cancer pathologic image classification and mitotic cell detection. Traditional cell segmentation methods include segmentation techniques based on region, edge, energy functional, clustering, and graph theory. The basic idea of region-based segmentation is to divide the image space into nonoverlapping regions according to the characteristics of the image, and these usually come from the information of pixel points, such as gray value, or the data transformation from the original image. The commonly used region-based segmentation method is threshold segmentation. The basic idea of the segmentation method based on edge detection is to determine the edge pixels in the image first and then connect these pixels together to form the required regional boundaries. The commonly used edge-based detection methods include edge detection and contour tracking. The segmentation method based on energy functional is mainly based on active contour model and related segmentation algorithm, and its basic idea is to segment the image by obtaining a constrained variability model [17]. Clustering-based segmentation is to gather the pixels in the image into several categories, including hard clustering and soft clustering. The commonly used clustering segmentation models include connectivity model, centred model, distribution model, and density model. The main idea of segmentation based on graph theory is to represent the image to be segmented as a weighted graph, in which each node corresponds to an image pixel or block.


## 3.5. Image Segmentation Technology

Image segmentation technology is to replan the set of some similar features and features of the image and proceed in accordance with the corresponding proportion, so as to get a clearer image. In the process of image segmentation, there are many points to pay attention to [18]. For example, to ensure that the segmented places are connected properly, the segmented places are different, the segmented images are coherent, and the image content before and after segmentation has not changed, because of the image processing requirements, and to achieve different effects, the use of image segmentation methods are different. Image segmentation technology includes many unique image segmentation methods. For example, the use of coarse segmentation method and fine segmentation method will get different pixels of the image; gray image segmentation method and colour image segmentation method can be used to segment black and white image and colour image, respectively. Static image segmentation method and dynamic image segmentation method can be used to segment static image and dynamic image, respectively. There are different requirements for different industries for the use of image segmentation technology to deal with the different image types, such as the need to the human body structure in medicine image segmentation, in terms of transportation need image segmentation processing of various important crossroads, in the military to military base of image segmentation. In a word, there are a lot of content of image segmentation technology; you can choose the right image segmentation technology to use according to different needs.


## 4. Intelligent Segmentation Recognition System

### 4.1. Architecture Design

The intelligent segmentation and recognition system of breast cancer medical image based on digital image processing technology is mainly divided into image segmentation and recognition subsystem, data subsystem, and model subsystem. Experimental data are annotated by data processing users and stored in the database, so data processing users are mainly involved in the data subsystem. The overall architecture of the system is shown in Figure1.Figure 1
Image intelligent segmentation and recognition system architecture diagram.The figure above contains three subsystems of the system. The data subsystem is the part that injects annotation files and original images and preprocesses data. The part of model training and model parameter generation is model subsystem. Slice recognition is carried out by the image recognition subsystem. Data images and annotation files are stored in python environment. Meanwhile, data preprocessing is built based on Python OpenSlide function library, which contains a series of methods such as medical image processing and parsing. The image recognition subsystem mainly calls the parameters completed by the model subsystem to test the real slices and display the results, which are displayed through the front page.The realization of the system needs to start from the acquisition of medical images. The first step is to document the image. The image is converted into a data format that can be stored in the database. Then, feature extraction, early noise removal, and feature reduction are carried out. The obtained medical images are sample sets, and the storage of medical images after digitization is the process of sample set documentation, which will affect the classification effect of the model. Then, the recorded data is divided into two categories, the first is training set, and the other is test set. After the training, enter the test module for testing. If the accuracy is high, it can be used with real data. The structure design block diagram of the system is mainly composed of three parts: front-end browser, photo server, and image processing program. The client sends image requests through Hyper Text Transfer Protocol (HTTP) to the World Wide Web (Web) server. The Web server then determines whether to allocate child processes for image processing based on the shared memory status. If the currently requested image is in shared memory, the image is sent directly to the foreground for viewing. When the currently requested image does not exist in shared memory, the image processing subprocess is allocated and processed according to the Digital Imaging and Communications in Medical file 32 in the protocol string. Request the DICOM file stream from the data file storage service, and send the DICOM file stream to be stored in the shared storage area. The web client receives and returns images from the server over HTTP.


### 4.2. System Function Modules

The breast cancer intelligent image segmentation and recognition system based on digital image processing technology includes user management module, data pretreatment module, document management module, and recognition and segmentation module. The system function module diagram is shown in Figure2.Figure 2
System function display diagram.The main system role in the data subsystem is the data user, and the data user needs to collect breast cancer slices. The original slice is processed into A WSI format RGB image that can be stored in a computer database. The image is segmented, and the key information points are mined; the noise in the image is removed by image filtering technology; the sharpness of the image is enhanced by interpolation technology, and finally, the image is converted into a digital form. The digital matrix is standardized, and the pixel numbers of the picture are changed into the same distribution form. According to the data user, the data subsystem after the data processing can become a training set, validation set, and test set for the user of the model subsystem.The model subsystem obtains the data processed by the data subsystem, designs and completes the corresponding algorithm model, and trains, verifies, and tests the model. The subsystem needs to set reasonable hyperparameters according to the actual situation of data [19, 20]. The model subsystem consists of algorithm users and test users. Algorithm users need to build algorithm models and set corresponding hyperparameters for each model. The test user uses the algorithm model trained by the algorithm user and the data in the data subsystem to verify the model. The algorithm model with the highest current accuracy, specificity, and accuracy is selected as a practical application, and its performance in unknown data is tested.Ordinary users use the breast cancer image recognition system for breast cancer slice analysis and obtain the analysis results from the system, requiring users to hold breast cancer slice images in the corresponding format. Data users use each data processing algorithm allocated by the system to preprocess the original data of the original system and process the data into a state that can be calculated by the model. Algorithm users build, modify, and train the model of the system, set the initialization of parameters of each layer of the model, and set the model superparameters. Test users verify and test the trained algorithm of the system and use test set data to test the fitting degree of the model on unknown data. The administrator sets accounts, passwords, and permissions for all users in the system. Administrators can upgrade regular users to data users, algorithm users, and test users and administrators. Ordinary users input the original breast cancer slice and get the diagnosis through image recognition.


### 4.3. System Data Design

The dataset is all in WSI format, with a total of 400 images. Each image is approximately 1.5 gigabyte (GB) in size. There are 420,000 pixel images extracted from the data, 230,000 images of normal tissue and 190,000 images of tumor tissue. The data storage of this system is mainly divided into five parts: user data, original picture data, annotation file data, picture data, and model hyperparameter data. The data relation diagram of the system is shown in Figure3.Figure 3
Data diagram of the system.The user data module contains the USER ID, password information, and permissions, including ordinary users, data users, algorithm users, test users, and administrators of these permissions. The original image data store contains the image ID and the image name. The information stored in the picture includes the ID, name, and classification label of the picture. The information contained in the annotation data includes the ID of the annotation data and the corresponding name of the original picture. Parameter data stores hyperparameters of the model and weights and biases in the network. The stored information includes the parameter type, parameter value, and parameter name.


### 4.4. Digitized Image Data

The experiment results removed most of the background pixels of the image and used the same fixed value to remove the background pixels of any original image. In machine learning and deep learning, it is called noise. The goal of data preprocessing module is to process images into high-resolution data which can be learned by neural network. The module first determines whether the image has more noise; if so, use filtering technology to dry. After that, the sharpness of the image is judged [21]. If the image is not clear enough, interpolation technology is used to enhance the sharpness of the image. In the process of image noise elimination and image recognition, image features are extracted without damaging image contour and edge. At the same time, to make the image look better, we need to use image filtering technology to preserve the details of the image as much as possible. This is an essential process in image preprocessing, its processing effect will directly affect the effectiveness and reliability of subsequent image processing and analysis. Eliminating noise in an image is called smoothing or filtering. Signal or image energy is usually concentrated in the middle and low band of the amplitude spectrum, while in the high band, the information of interest is usually covered by the presence of noise. Thus, a filter that reduces the amplitude of the high-frequency component can reduce the effect of noise. Smoothing is an improved low frequency spatial filtering technique. It applies to two types: one is fuzzy, and the other is noise cancelling. Smoothing filtering techniques in space are usually performed using a simple averaging method, which is to find the average brightness value of adjacent pixels. Neighborhood size is directly related to the effect of uniformity. The larger the neighborhood, the better the smoothing effect is; the larger the neighborhood, the greater the loss of edge information and the smoothness of the image. Therefore, it is necessary to reasonably determine the size of neighborhood and filter within a reasonable range.


### 4.5. Data Processing

In the field of computer vision, noise reduction is usually achieved by filtering, that is, in the process of digital signal processing, useful frequencies are extracted or useless frequencies are filtered out. In the process of image processing, image filtering is realized by convolution operation. The tissues and lesions to be segmented in the image have obvious characteristics, which are low echo and different from surrounding tissues. However, traditional isotropic filter, although it can smooth the influence of noise, will also destroy the texture features of the image, erase some details, and weaken the performance of edges in the image. Image filtering has the following two requirements: one is not to remove the edge contour of the image and other details; the second is to improve the clarity of the image and enhance the contrast of the image.For an input imageP, the output image is obtained after filtering by guiding image I, where P and I are the input of the algorithm. Guided filtering defines a linear filtering process as shown below. For the pixel at position I, the filtered output is a weighted average:
(1)qi=∑jWijIpj,where i and j represent pixel subscripts, respectively. Wij is a filter kernel that is only related to the guide image I.Suppose there is a local linear relationship between the output imageq and the guide image I in the filtering window Wk:
(2)qi=aIi−b,∀i∈wk.For a deterministic windowwk with radius r, a,b will also be a uniquely deterministic constant coefficient.In order to find linear correlation, the loss function defined by windowWK is:
(3)Ea,b=∑i∈wkaIi−bk+p2−εa2.Wk means that regularization compensation is adopted when a value is too large. Among them, ε can adjust the edge detection accuracy and fuzzy level, and εa2 indicates that the suppression value is too large. If the guide image I has no edge, the output is mean fuzzy. If the guide image I has edges, the output retains edge information.Formula (3) is regarded as a linear regression problem and solved as follows:
(4)a=1/w∑i∈wkIipi+μpδ2+ε,(5)b=p+aμ,(6)p=1w∑i∈wkpi+μ,where W represents the number of pixels in window WK, μ and δ2 represent the mean value and variance of guided image I in window WK, and P represents the mean value of input image in window Wk. Taking linear correlation parameters a,b, the output image can be obtained through the linear model of Formula (1).Differentqi values will be obtained for different window sizes, and its mean value will be used as the final output result:
(7)qi=1wk∑i∈wkaIi+b=a¯Ii+b¯.For this algorithm, whenI=p, that is, the input image and the guide image are the same image, the algorithm becomes the edge preserving filter. Equivalent to the threshold defining the smooth region and the edge region, the solution of the equation can be expressed as follows:
(8)a=δ2δ2−ε,(9)b=1+ap.Consider two cases: keep the value constant in the region with large variance and use adjacent pixel averaging (degraded to ordinary mean filtering) in the smooth region.Case 1.
High variance area, that is, imageI changes greatly in window WK.
(10)a≈1,b≈0.Case 2.
Smooth area (with small variance), that is, imageI remains basically fixed in window KW.
(11)a≈0,b≈μ.


### 4.6. Experimental Results and Analysis

Public datasets INBreast and DDSM-BCRP were used to verify the proposed intelligent segmentation recognition system for breast cancer. In order to verify the performance of the system more comprehensively, it was tested on the breast cancer image test set. Sensitivity, specificity, overall pixel accuracy, and average cross ratio were used to evaluate the analysis. The comparison of experimental results of relevant segmentation effects is shown in Figure4.Figure 4
Contrast diagram of segmentation effect.The comparison of four evaluation indexes in the pathological image dataset of cancer is given in figure. Among them, the higher the sensitivity and specificity is, the better the segmentation performance of the network. With the advent of digital image processing technology, the segmentation and recognition method based on digital image processing technology has significantly improved compared with the traditional machine learning method for breast tumor segmentation.Figure5 is the comparison of two datasets, which is a comprehensive indicator reflecting the continuous variables of network sensitivity and specificity. The different areas are the values of AUC, and we can say that the area of the system is close to 1. These experiments fully prove that the comprehensive performance of the system can realize intelligent segmentation and recognition of breast cancer well.Figure 5
A comparison diagram of datasets.Figure6 visually shows the segmentation results of the intelligent segmentation and recognition method for breast cancer in the dataset INBreast. The results show the segmentation results on INBreast in the left dataset. The dark area is the segmented tumor area, and the yellow area is the tissue background. The input image after the dataset is preprocessed, the image on the right is the lump segmentation label image, the yellow area is the breast lump area segmented by hand, and the dark area is the tissue background. The intelligent segmentation and recognition method of breast cancer can realize the segmentation of breast tumor in mammography image and obtain a clearer segmentation result and can have a more accurate division of the boundary of breast tumor.Figure 6
Image of intelligent segmentation and recognition result of breast cancer.For the intelligent segmentation and recognition system of breast cancer, the method of training and testing was used to carry out the experiment. The line chart of the segmentation accuracy rate of the model and the change of the segmentation Dice coefficient was drawn, respectively, and the corresponding smoothing process was done. Figure7 shows the changes of experimental segmentation accuracy rate and segmentation Dice coefficient in the process of model training.Figure 7
Segmentation accuracy changes and segmentation Dice coefficient changes.As can be seen from the figure, in the training process, the loss of the training set converges faster and better, and in terms of segmentation accuracy and Dice coefficient, the results of the training set are also higher than those of the test set, both within the explanatory range. During the experiment, the changes of the results were relatively smooth and stable, and there was no big fluctuation. The experiment reached convergence after nearly 2500 iterations, and the final experimental results reached the expectation and also had good performance in the test set.


## 4.1. Architecture Design

The intelligent segmentation and recognition system of breast cancer medical image based on digital image processing technology is mainly divided into image segmentation and recognition subsystem, data subsystem, and model subsystem. Experimental data are annotated by data processing users and stored in the database, so data processing users are mainly involved in the data subsystem. The overall architecture of the system is shown in Figure1.Figure 1
Image intelligent segmentation and recognition system architecture diagram.The figure above contains three subsystems of the system. The data subsystem is the part that injects annotation files and original images and preprocesses data. The part of model training and model parameter generation is model subsystem. Slice recognition is carried out by the image recognition subsystem. Data images and annotation files are stored in python environment. Meanwhile, data preprocessing is built based on Python OpenSlide function library, which contains a series of methods such as medical image processing and parsing. The image recognition subsystem mainly calls the parameters completed by the model subsystem to test the real slices and display the results, which are displayed through the front page.The realization of the system needs to start from the acquisition of medical images. The first step is to document the image. The image is converted into a data format that can be stored in the database. Then, feature extraction, early noise removal, and feature reduction are carried out. The obtained medical images are sample sets, and the storage of medical images after digitization is the process of sample set documentation, which will affect the classification effect of the model. Then, the recorded data is divided into two categories, the first is training set, and the other is test set. After the training, enter the test module for testing. If the accuracy is high, it can be used with real data. The structure design block diagram of the system is mainly composed of three parts: front-end browser, photo server, and image processing program. The client sends image requests through Hyper Text Transfer Protocol (HTTP) to the World Wide Web (Web) server. The Web server then determines whether to allocate child processes for image processing based on the shared memory status. If the currently requested image is in shared memory, the image is sent directly to the foreground for viewing. When the currently requested image does not exist in shared memory, the image processing subprocess is allocated and processed according to the Digital Imaging and Communications in Medical file 32 in the protocol string. Request the DICOM file stream from the data file storage service, and send the DICOM file stream to be stored in the shared storage area. The web client receives and returns images from the server over HTTP.


## 4.2. System Function Modules

The breast cancer intelligent image segmentation and recognition system based on digital image processing technology includes user management module, data pretreatment module, document management module, and recognition and segmentation module. The system function module diagram is shown in Figure2.Figure 2
System function display diagram.The main system role in the data subsystem is the data user, and the data user needs to collect breast cancer slices. The original slice is processed into A WSI format RGB image that can be stored in a computer database. The image is segmented, and the key information points are mined; the noise in the image is removed by image filtering technology; the sharpness of the image is enhanced by interpolation technology, and finally, the image is converted into a digital form. The digital matrix is standardized, and the pixel numbers of the picture are changed into the same distribution form. According to the data user, the data subsystem after the data processing can become a training set, validation set, and test set for the user of the model subsystem.The model subsystem obtains the data processed by the data subsystem, designs and completes the corresponding algorithm model, and trains, verifies, and tests the model. The subsystem needs to set reasonable hyperparameters according to the actual situation of data [19, 20]. The model subsystem consists of algorithm users and test users. Algorithm users need to build algorithm models and set corresponding hyperparameters for each model. The test user uses the algorithm model trained by the algorithm user and the data in the data subsystem to verify the model. The algorithm model with the highest current accuracy, specificity, and accuracy is selected as a practical application, and its performance in unknown data is tested.Ordinary users use the breast cancer image recognition system for breast cancer slice analysis and obtain the analysis results from the system, requiring users to hold breast cancer slice images in the corresponding format. Data users use each data processing algorithm allocated by the system to preprocess the original data of the original system and process the data into a state that can be calculated by the model. Algorithm users build, modify, and train the model of the system, set the initialization of parameters of each layer of the model, and set the model superparameters. Test users verify and test the trained algorithm of the system and use test set data to test the fitting degree of the model on unknown data. The administrator sets accounts, passwords, and permissions for all users in the system. Administrators can upgrade regular users to data users, algorithm users, and test users and administrators. Ordinary users input the original breast cancer slice and get the diagnosis through image recognition.


## 4.3. System Data Design

The dataset is all in WSI format, with a total of 400 images. Each image is approximately 1.5 gigabyte (GB) in size. There are 420,000 pixel images extracted from the data, 230,000 images of normal tissue and 190,000 images of tumor tissue. The data storage of this system is mainly divided into five parts: user data, original picture data, annotation file data, picture data, and model hyperparameter data. The data relation diagram of the system is shown in Figure3.Figure 3
Data diagram of the system.The user data module contains the USER ID, password information, and permissions, including ordinary users, data users, algorithm users, test users, and administrators of these permissions. The original image data store contains the image ID and the image name. The information stored in the picture includes the ID, name, and classification label of the picture. The information contained in the annotation data includes the ID of the annotation data and the corresponding name of the original picture. Parameter data stores hyperparameters of the model and weights and biases in the network. The stored information includes the parameter type, parameter value, and parameter name.


## 4.4. Digitized Image Data

The experiment results removed most of the background pixels of the image and used the same fixed value to remove the background pixels of any original image. In machine learning and deep learning, it is called noise. The goal of data preprocessing module is to process images into high-resolution data which can be learned by neural network. The module first determines whether the image has more noise; if so, use filtering technology to dry. After that, the sharpness of the image is judged [21]. If the image is not clear enough, interpolation technology is used to enhance the sharpness of the image. In the process of image noise elimination and image recognition, image features are extracted without damaging image contour and edge. At the same time, to make the image look better, we need to use image filtering technology to preserve the details of the image as much as possible. This is an essential process in image preprocessing, its processing effect will directly affect the effectiveness and reliability of subsequent image processing and analysis. Eliminating noise in an image is called smoothing or filtering. Signal or image energy is usually concentrated in the middle and low band of the amplitude spectrum, while in the high band, the information of interest is usually covered by the presence of noise. Thus, a filter that reduces the amplitude of the high-frequency component can reduce the effect of noise. Smoothing is an improved low frequency spatial filtering technique. It applies to two types: one is fuzzy, and the other is noise cancelling. Smoothing filtering techniques in space are usually performed using a simple averaging method, which is to find the average brightness value of adjacent pixels. Neighborhood size is directly related to the effect of uniformity. The larger the neighborhood, the better the smoothing effect is; the larger the neighborhood, the greater the loss of edge information and the smoothness of the image. Therefore, it is necessary to reasonably determine the size of neighborhood and filter within a reasonable range.


## 4.5. Data Processing

In the field of computer vision, noise reduction is usually achieved by filtering, that is, in the process of digital signal processing, useful frequencies are extracted or useless frequencies are filtered out. In the process of image processing, image filtering is realized by convolution operation. The tissues and lesions to be segmented in the image have obvious characteristics, which are low echo and different from surrounding tissues. However, traditional isotropic filter, although it can smooth the influence of noise, will also destroy the texture features of the image, erase some details, and weaken the performance of edges in the image. Image filtering has the following two requirements: one is not to remove the edge contour of the image and other details; the second is to improve the clarity of the image and enhance the contrast of the image.For an input imageP, the output image is obtained after filtering by guiding image I, where P and I are the input of the algorithm. Guided filtering defines a linear filtering process as shown below. For the pixel at position I, the filtered output is a weighted average:
(1)qi=∑jWijIpj,where i and j represent pixel subscripts, respectively. Wij is a filter kernel that is only related to the guide image I.Suppose there is a local linear relationship between the output imageq and the guide image I in the filtering window Wk:
(2)qi=aIi−b,∀i∈wk.For a deterministic windowwk with radius r, a,b will also be a uniquely deterministic constant coefficient.In order to find linear correlation, the loss function defined by windowWK is:
(3)Ea,b=∑i∈wkaIi−bk+p2−εa2.Wk means that regularization compensation is adopted when a value is too large. Among them, ε can adjust the edge detection accuracy and fuzzy level, and εa2 indicates that the suppression value is too large. If the guide image I has no edge, the output is mean fuzzy. If the guide image I has edges, the output retains edge information.Formula (3) is regarded as a linear regression problem and solved as follows:
(4)a=1/w∑i∈wkIipi+μpδ2+ε,(5)b=p+aμ,(6)p=1w∑i∈wkpi+μ,where W represents the number of pixels in window WK, μ and δ2 represent the mean value and variance of guided image I in window WK, and P represents the mean value of input image in window Wk. Taking linear correlation parameters a,b, the output image can be obtained through the linear model of Formula (1).Differentqi values will be obtained for different window sizes, and its mean value will be used as the final output result:
(7)qi=1wk∑i∈wkaIi+b=a¯Ii+b¯.For this algorithm, whenI=p, that is, the input image and the guide image are the same image, the algorithm becomes the edge preserving filter. Equivalent to the threshold defining the smooth region and the edge region, the solution of the equation can be expressed as follows:
(8)a=δ2δ2−ε,(9)b=1+ap.Consider two cases: keep the value constant in the region with large variance and use adjacent pixel averaging (degraded to ordinary mean filtering) in the smooth region.Case 1.
High variance area, that is, imageI changes greatly in window WK.
(10)a≈1,b≈0.Case 2.
Smooth area (with small variance), that is, imageI remains basically fixed in window KW.
(11)a≈0,b≈μ.


## 4.6. Experimental Results and Analysis

Public datasets INBreast and DDSM-BCRP were used to verify the proposed intelligent segmentation recognition system for breast cancer. In order to verify the performance of the system more comprehensively, it was tested on the breast cancer image test set. Sensitivity, specificity, overall pixel accuracy, and average cross ratio were used to evaluate the analysis. The comparison of experimental results of relevant segmentation effects is shown in Figure4.Figure 4
Contrast diagram of segmentation effect.The comparison of four evaluation indexes in the pathological image dataset of cancer is given in figure. Among them, the higher the sensitivity and specificity is, the better the segmentation performance of the network. With the advent of digital image processing technology, the segmentation and recognition method based on digital image processing technology has significantly improved compared with the traditional machine learning method for breast tumor segmentation.Figure5 is the comparison of two datasets, which is a comprehensive indicator reflecting the continuous variables of network sensitivity and specificity. The different areas are the values of AUC, and we can say that the area of the system is close to 1. These experiments fully prove that the comprehensive performance of the system can realize intelligent segmentation and recognition of breast cancer well.Figure 5
A comparison diagram of datasets.Figure6 visually shows the segmentation results of the intelligent segmentation and recognition method for breast cancer in the dataset INBreast. The results show the segmentation results on INBreast in the left dataset. The dark area is the segmented tumor area, and the yellow area is the tissue background. The input image after the dataset is preprocessed, the image on the right is the lump segmentation label image, the yellow area is the breast lump area segmented by hand, and the dark area is the tissue background. The intelligent segmentation and recognition method of breast cancer can realize the segmentation of breast tumor in mammography image and obtain a clearer segmentation result and can have a more accurate division of the boundary of breast tumor.Figure 6
Image of intelligent segmentation and recognition result of breast cancer.For the intelligent segmentation and recognition system of breast cancer, the method of training and testing was used to carry out the experiment. The line chart of the segmentation accuracy rate of the model and the change of the segmentation Dice coefficient was drawn, respectively, and the corresponding smoothing process was done. Figure7 shows the changes of experimental segmentation accuracy rate and segmentation Dice coefficient in the process of model training.Figure 7
Segmentation accuracy changes and segmentation Dice coefficient changes.As can be seen from the figure, in the training process, the loss of the training set converges faster and better, and in terms of segmentation accuracy and Dice coefficient, the results of the training set are also higher than those of the test set, both within the explanatory range. During the experiment, the changes of the results were relatively smooth and stable, and there was no big fluctuation. The experiment reached convergence after nearly 2500 iterations, and the final experimental results reached the expectation and also had good performance in the test set.


## 5. Conclusion

With the development of digital image technology, judging diseases by medical image plays an important role in medical diagnosis. However, with the wide application of this technology and the increase of the population, the amount of medical imaging and biopsy data has increased significantly. Using digital image processing technology to segment and recognize breast cancer images intelligently, judging their general position, size, and classification can promote the development of clinical medicine. This paper introduces the preprocessing technology of breast cancer pathological image and medical image recognition technology of breast cancer. Based on the technical basis of pathological image analysis of breast cancer, the architecture of intelligent segmentation and recognition system for breast cancer was constructed, and each functional module of intelligent system was introduced in detail. Based on digital image processing technology, filtering technology is used to reduce dryness and improve the clarity of the image. Compared with the breast tumor segmentation method based on traditional machine learning method, the segmentation and recognition method based on digital image processing technology has improved significantly. The intelligent segmentation and recognition method of breast cancer can realize the segmentation of breast tumor image, get clear segmentation results, and can have a more accurate division of the boundary of breast tumor. Digital image processing technology has its own limitations, so continuous optimization of image processing methods can accurately identify tumors in uneven breast images. The algorithm has high computational complexity and many calculation parameters. It is necessary to further optimize the algorithm to improve its operation speed and reduce the dependence on hardware.



---

*Source: 2256316-2021-12-10.xml*