Mammary gland puncture positioning method

By using dynamic threshold entropy function and a lawful segmentation method based on grayscale variance in breast puncture positioning technology, the breast images are segmented and edge detection are solved, and the problem of low positioning accuracy in the existing technology is achieved, and more accurate lesion positioning and puncture point selection is achieved.

CN119837633AInactive Publication Date: 2025-04-18SHAOXING WOMEN & CHILDRENS HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411937297.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing breast puncture localization technology has low positioning accuracy when the lesion characteristics are not obvious or the background is complex.

Method used

The breast image is segmented using a dynamic threshold entropy function based on the grayscale entropy feature of the image to obtain the lesion subject image and the background image. The local image is processed by a law segmentation method based on grayscale variance, and the lesion edge binary image is obtained. The edge contour of the lesion edge is identified and the coordinates of the center point of the lesion are calculated.

Benefits of technology

Effectively distinguish the subject and background of the lesion, improve the accuracy of lesion area segmentation, ensure clear and visible edges of the lesion, calculate more accurate coordinates of the center point of the lesion, ensure accurate positioning of the lesion position, and help doctors accurately select puncture points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119837633A_ABST
    Figure CN119837633A_ABST
Patent Text Reader

Abstract

The invention discloses a mammary gland puncture positioning method and system, and relates to the technical field of mammary gland detection. Segmenting the mammary gland image by adopting a dynamic threshold entropy function based on image gray entropy features to obtain a focus main body image and a background image; calculating a first focus center point coordinate and a first rotation angle according to the segmented focus main body image; based on the first focus center point coordinate and the first rotation angle, collecting a local image of the focus; processing the local image by adopting a large law segmentation method based on gray variance to obtain a focus edge binary image; identifying the focus edge binary image by using an edge detection algorithm to obtain a focus edge contour; based on the lesion edge contour, calculating the center point coordinate of the lesion, and obtaining the second lesion center point coordinate, the lesion main body and the background can be effectively distinguished, the lesion edge is ensured to be clear and visible, and the lesion contour can be accurately extracted, so that the more accurate lesion center point coordinate can be calculated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of breast detection, in particular to a breast puncture positioning method. Background Art

[0002] With the development of medical imaging technology, early diagnosis and treatment of breast diseases have become increasingly important. Breast puncture (such as fine needle aspiration biopsy or core needle biopsy) is one of the important means to diagnose the nature of breast masses. However, in actual operation, it is still challenging to accurately locate the lesion and perform puncture, especially when the lesion is small, deep or irregular in shape.

[0003] In recent years, computer vision and image processing technologies have been increasingly used in the medical field, providing new solutions to improve the accuracy and safety of breast puncture. Existing breast puncture positioning technology is based on the method of geometric features, which uses the geometric features of the lesion (such as shape, size, etc.) for positioning. This method works better when the lesion features are obvious, but the positioning accuracy is low when the lesion features are not obvious or the background is complex. Summary of the invention

[0004] In order to solve the problem in the prior art of low positioning accuracy when the lesion features are not obvious or the background is complex, the present invention provides a breast puncture positioning method.

[0005] The technical solution adopted by the present invention is:

[0006] The first aspect of the present application provides a breast puncture positioning method, comprising the following contents:

[0007] Acquiring breast images;

[0008] Based on the grayscale entropy characteristics of the image, the dynamic threshold entropy function is used to segment the breast image to obtain the lesion main image and the background image.

[0009] Calculating the coordinates of the first lesion center point and the first rotation angle according to the segmented lesion main body image;

[0010] Based on the first lesion center point coordinates and the first rotation angle, collecting a local image of the lesion;

[0011] The local image is processed by a large-law segmentation method based on grayscale variance to obtain a binary image of the lesion edge;

[0012] The edge detection algorithm is used to identify the binary image of the lesion edge and obtain the lesion edge contour;

[0013] Based on the lesion edge contour, the coordinates of the center point of the lesion are calculated to obtain the coordinates of the second lesion center point.

[0014] Preferably, based on the image grayscale entropy feature, a dynamic threshold entropy function is used to segment the breast image, and the lesion main image and the background image are obtained, including the following contents:

[0015] The entropy of the lesion main image and the background image are

[0016]

[0017] Among them, H T is the entropy of the lesion main body image; H b is the entropy of the background image: P i is the pixel ratio with gray value i: t is the first segmentation threshold; P T is the ratio and sum of all pixel values ​​below the threshold t:

[0018]

[0019] After obtaining the entropy of the lesion and the background area, the entropy function S is constructed, and the threshold with the largest entropy function value is taken as the maximum entropy threshold.

[0020] S=H T +H b

[0021] The maximum entropy threshold is used to segment the breast image to obtain the lesion main image and the background image.

[0022] Preferably, according to the segmented lesion main body image, calculating the first lesion center point coordinates and the first rotation angle includes the following contents:

[0023] Extract all pixel points in the main image of the lesion to form a point sequence;

[0024] Through the point sequence, an image processing algorithm is used to find the smallest rectangle that can completely surround the main image of the lesion;

[0025] Calculate and store the coordinates of the four vertices of the minimum enclosing rectangle;

[0026] The coordinates of the center point of the first lesion are calculated by using the coordinates of the four vertices of the minimum circumscribed rectangle;

[0027] Determine the major axis and minor axis of the rectangle through the coordinates of the four vertices of the minimum circumscribed rectangle;

[0028] The angle between the long axis and the horizontal axis is calculated to obtain the first rotation angle.

[0029] Preferably, the local image is processed by a large law segmentation method based on grayscale variance to obtain a binary image of the lesion edge, including the following contents:

[0030] The local image includes a background area and a lesion edge area, and a demarcation threshold between the background area and the lesion edge area is set;

[0031] Based on the demarcation threshold, a first proportion of the background area in the local image is calculated by a first proportion formula, and based on the demarcation threshold, a second proportion of the lesion edge area in the local image is calculated by a second proportion formula;

[0032] The first average gray value of the background area is calculated by the first average gray value formula, and the second average gray value of the lesion edge area is calculated by the second average gray value formula;

[0033] Based on the first proportion, the second proportion, the first average grayscale value, and the second average grayscale value, the grayscale variance between the lesion edge area and the background area is calculated by using the grayscale variance formula, and the boundary threshold corresponding to the maximum grayscale variance is selected as the second segmentation threshold;

[0034] The lesion edge area and the background area are segmented based on the second segmentation threshold to obtain a lesion edge binary image.

[0035] Preferably, the first proportion formula and the second proportion formula are respectively:

[0036]

[0037] Among them, W0 is the first proportion of the background area in the local image, k is the boundary threshold between the background area and the lesion edge area, P i is the proportion of pixels with gray value i in the local image, W1 is the second proportion of the lesion edge area in the local image, and N represents the maximum gray level in the local image;

[0038] The first average gray value formula and the second average gray value formula are respectively:

[0039]

[0040] Wherein, U0 is the first average gray value of the background area, and U1 is the second average gray value of the lesion edge area;

[0041] The grayscale variance formula is:

[0042] δ(k) 2 =W0(U-U0) 2 +W1(U-U1) 2

[0043] Among them, δ(k) 2 is the grayscale variance between the lesion edge area and the background area, δ(k) 2 The boundary threshold k corresponding to the maximum is used as the second segmentation threshold.

[0044] Preferably, the step of identifying the lesion edge binary image using an edge detection algorithm to obtain the lesion edge contour includes the following:

[0045] Calculate the edge gradient change values ​​of the binary image of the lesion edge in the X direction and the Y direction;

[0046] Calculate the grayscale gradient amplitude and direction of the lesion edge binary image based on the edge gradient change value;

[0047] A gradient matrix of an edge detection algorithm is formed based on the edge gradient change value, the grayscale gradient amplitude and direction of the lesion edge binary image;

[0048] The edge of the lesion is detected by the gradient matrix of the edge detection algorithm to obtain the edge contour of the lesion.

[0049] Preferably, based on the lesion edge contour, the coordinates of the center point of the lesion are calculated, and after obtaining the coordinates of the second lesion center point, the method further comprises:

[0050] The breast puncture position is determined according to the coordinates of the center point of the second lesion, the edge contour of the lesion and the breast image.

[0051] A second aspect of the present application provides a breast puncture positioning system, comprising:

[0052] A first image acquisition module, used for acquiring breast images;

[0053] The first segmentation module is used to segment the breast image based on the image grayscale entropy feature and adopt a dynamic threshold entropy function to obtain a lesion main image and a background image;

[0054] A first calculation module, used for calculating the coordinates of the first lesion center point and the first rotation angle according to the segmented lesion main body image;

[0055] A second image acquisition module, used for acquiring a local image of the lesion based on the coordinates of the center point of the first lesion and the first rotation angle;

[0056] A second segmentation module is used to process the local image using a large-law segmentation method based on grayscale variance to obtain a binary image of the lesion edge;

[0057] The edge detection and contour recognition module is used to identify the binary image of the lesion edge using the edge detection algorithm to obtain the lesion edge contour;

[0058] A second calculation module calculates the coordinates of the center point of the lesion based on the edge contour of the lesion to obtain the coordinates of the center point of the second lesion;

[0059] The puncture position determination module is used to determine the breast puncture position according to the coordinates of the second lesion center point, the lesion edge contour and the breast image.

[0060] The beneficial effects of the present invention are as follows: the dynamic threshold entropy function is used to segment breast images, which can effectively distinguish the lesion body from the background, and the lesion area can be accurately extracted even in a complex background. The large law segmentation method based on grayscale variance further improves the segmentation accuracy of the local image, ensuring that the edge of the lesion is clearly visible. The edge detection algorithm is used to identify the binary image of the lesion edge, and the lesion contour can be accurately extracted, thereby calculating more accurate coordinates of the lesion center point, ensuring the accurate positioning of the lesion position, and helping doctors to accurately select the puncture point. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is a flow chart of a method according to Embodiment 1 of the present invention.

[0062] Figure 2 This is a system block diagram of the second embodiment of the invention. DETAILED DESCRIPTION

[0063] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0064] Embodiment 1

[0065] like Figure 1 As shown, this embodiment provides a breast puncture positioning method, including the following contents:

[0066] S1, collect breast images.

[0067] Among them, breast images can be collected by imaging equipment, such as ultrasound, MRI or X-ray, etc. The collected images are stored for subsequent processing and analysis.

[0068] S2, based on the image grayscale entropy features, the dynamic threshold entropy function is used to segment the breast image to obtain the lesion main image and the background image.

[0069] In a possible implementation, based on the image grayscale entropy feature, a dynamic threshold entropy function is used to segment the breast image, and the lesion main image and the background image are obtained, including the following contents:

[0070] The entropy of the lesion main image and the background image are

[0071]

[0072] Among them, H T is the entropy of the lesion main body image; H b is the entropy of the background image: P iis the pixel ratio with gray value i: t is the first segmentation threshold; P T is the ratio and sum of all pixel values ​​below the threshold t:

[0073]

[0074] After obtaining the entropy of the lesion and the background area, the entropy function S is constructed, and the threshold with the largest entropy function value is taken as the maximum entropy threshold.

[0075] S=H T +H b

[0076] The maximum entropy threshold is used to segment the breast image to obtain the lesion main image and the background image.

[0077] By calculating the entropy of different gray levels and selecting the threshold corresponding to the maximum entropy as the segmentation threshold, the lesion area can be effectively separated from the complex background. This method can adapt to the situation where the contrast between the lesion and the background is low, ensuring that the lesion area can be accurately extracted even in a complex background.

[0078] The entropy function is used to determine the optimal segmentation threshold. Compared with a fixed threshold or a simple global threshold method, it can more accurately capture the boundary between lesions and normal tissues, thereby improving the accuracy of lesion area segmentation.

[0079] S3, calculating the first lesion center point coordinates and the first rotation angle according to the segmented lesion main body image.

[0080] In a possible implementation, calculating the first lesion center point coordinates and the first rotation angle according to the segmented lesion main body image includes the following:

[0081] S3.1, extract all pixel points in the main image of the lesion to form a point sequence.

[0082] In the specific implementation process, the lesion main body image can be binarized first, and all pixels belonging to the lesion area (usually white and the background is black) can be identified from the binarized lesion main body image, and the position information of these pixels (i.e. the coordinates of each pixel) can be stored in a point sequence.

[0083] S3.2, using the point sequence, an image processing algorithm is used to find the smallest rectangle that can completely surround the main body image of the lesion.

[0084] In the specific implementation process, the coordinate information in the point sequence is used to apply image processing technology, such as the cvMinAreaRect2 function provided by EmguCV, to find a minimum area rectangle that can tightly wrap all the points in the lesion area. This rectangle may not be positive, which means that it can be rotated according to the actual shape of the lesion to achieve the effect of minimizing the area.

[0085] S3.3, calculate and store the coordinates of the four vertices of the minimum enclosing rectangle.

[0086] S3.4, calculate the coordinates of the center point of the first lesion using the coordinates of the four vertices of the minimum circumscribed rectangle.

[0087] In the specific implementation process, the geometric center point of the rectangle can be calculated using the coordinates of the four vertices of the minimum circumscribed rectangle. This center point represents the approximate center position of the lesion and provides a reference point for subsequent operations.

[0088] S3.5, determine the major axis and minor axis of the rectangle using the coordinates of the four vertices of the minimum circumscribed rectangle.

[0089] In a specific implementation, the directional characteristics of the rectangle, such as the direction of its main axis, can be further analyzed based on the coordinates of the four vertices, which helps to understand the overall orientation or tilt of the lesion.

[0090] S3.6, calculate the angle between the long axis and the horizontal axis to obtain a first rotation angle.

[0091] Finally, based on the known long axis direction, the angle difference relative to the horizontal axis of the image can be calculated. This angle represents the degree of rotation of the lesion relative to the standard horizontal line, which is very useful for subsequent image correction.

[0092] S4: Based on the first lesion center coordinates and the first rotation angle, a local image of the lesion is acquired.

[0093] It should be noted that if the size of the lesion is less than or equal to the preset size, the position and angle of the probe are adjusted to align it with the center point of the first lesion, and the direction of the probe is adjusted according to the first rotation angle to ensure that the imaging device can accurately align with the lesion area and that the direction of the image is consistent with the actual direction of the lesion, ensuring that the acquired local image can cover the entire lesion area and its edges.

[0094] If the size of the lesion is larger than a preset size, the lesion can be divided into multiple sub-areas, which are divided around the center point of the first lesion. The number of sub-areas to be divided is determined based on the size and shape of the lesion, and the coordinates of the center point of each sub-area are calculated. For the center point of each sub-area, the position and angle of the imaging device (such as an ultrasonic probe) are adjusted to align with the center point of the sub-area. The imaging device is used to capture a high-resolution local image in each sub-area. Each captured high-resolution local image is stored in a computer and necessary preprocessing is performed, such as denoising, contrast enhancement, etc. The images of multiple sub-areas are stitched into an image including the complete edge of the lesion using an image stitching algorithm (such as a method based on feature point matching) .

[0095] S5, processing the local image by a large-law segmentation method based on grayscale variance to obtain a binary image of the lesion edge.

[0096] It should be noted that, considering that the lesion may have an irregular shape or blurred edges, these details may not be fully reflected in the first segmentation. The first calculation of the center point coordinates is based on the segmented lesion main image, and the rough lesion center position is obtained at this time. The second calculation is performed on the local high-resolution image, which is collected after the approximate position of the lesion is known, so it can provide more detailed lesion information. Through this coarse-to-fine method, the accuracy of the lesion center point coordinates can be gradually improved.

[0097] The local image is processed by a large law segmentation method based on grayscale variance to obtain a binary image of the lesion edge, including the following contents:

[0098] The local image includes a background area and a lesion edge area, and a demarcation threshold between the background area and the lesion edge area is set;

[0099] Based on the demarcation threshold, a first proportion of the background area in the local image is calculated using a first proportion formula, and based on the demarcation threshold, a second proportion of the lesion edge area in the local image is calculated using a second proportion formula.

[0100] The first proportion formula and the second proportion formula are respectively:

[0101]

[0102] Among them, W0 is the first proportion of the background area in the local image, k is the boundary threshold between the background area and the lesion edge area, P i is the proportion of pixels with gray value i in the local image, W1 is the second proportion of the lesion edge area in the local image, and N represents the maximum gray level in the local image.

[0103] The first average gray value of the background area is calculated by the first average gray value formula, and the second average gray value of the lesion edge area is calculated by the second average gray value formula.

[0104] Among them, the first average gray value formula and the second average gray value formula are respectively.

[0105]

[0106] Among them, U0 is the first average gray value of the background area, and U1 is the second average gray value of the lesion edge area.

[0107] Based on the first proportion, the second proportion, the first average grayscale value, and the second average grayscale value, the grayscale variance between the lesion edge area and the background area is calculated using the grayscale variance formula, and the boundary threshold corresponding to the maximum grayscale variance is selected as the second segmentation threshold.

[0108] Wherein, the grayscale variance formula is:

[0109] δ(k) 2 =W0(U-U0) 2 +W1(U-U1) 2

[0110] Among them, δ(k) 2 is the grayscale variance between the lesion edge area and the background area, δ(k) 2 The boundary threshold k corresponding to the maximum is used as the second segmentation threshold.

[0111] The lesion edge area and the background area are segmented based on the second segmentation threshold to obtain a lesion edge binary image.

[0112] This embodiment uses a large law segmentation method based on grayscale variance to more accurately separate the background area and the lesion edge area, thereby improving the segmentation accuracy. The optimal segmentation threshold is determined using statistical information (such as proportion, average grayscale value, and grayscale variance), thereby ensuring the reliability of the segmentation result.

[0113] By maximizing the grayscale variance, noise and artifacts can be effectively removed and the clarity of the lesion edge can be improved. The generated binary image can clearly show the lesion edge, providing a high-quality data source for subsequent edge detection and contour extraction.

[0114] High-precision lesion edge segmentation helps doctors accurately identify the location and shape of lesions and reduce the risk of misdiagnosis and missed diagnosis.

[0115] S6, using an edge detection algorithm to identify the lesion edge binary image and obtain the lesion edge contour.

[0116] Among them, the edge detection algorithm can adopt Canny's edge detection algorithm.

[0117] In a possible implementation manner, the step of using an edge detection algorithm to identify a binary image of a lesion edge and obtaining a lesion edge contour includes the following:

[0118] S6.1, calculating the edge gradient change values ​​of the lesion edge binary image in the X direction and the Y direction.

[0119] In the specific implementation process, the first-order partial derivative function of the binary image of the lesion edge in the X direction and the Y direction is first calculated as a plane gradient change operator. The plane gradient change operator can detect the edge gradient change values ​​in the X direction and the Y direction, such as:

[0120]

[0121] P x [i, j] is the gradient operator of the pixel point [i, j] in the binary image of the lesion edge in the X direction; P y [i, j] is the gradient operator of the pixel point at the binary image coordinate [i, j] of the lesion edge in the Y direction, P x [i,j],P y [i,j] represents the degree of grayscale change in the X and Y directions respectively.

[0122] S6.2, calculating the grayscale gradient amplitude and direction of the binary image of the lesion edge based on the edge gradient change value.

[0123] According to the edge gradient change value P x With P y , calculate the image grayscale gradient amplitude and direction, that is

[0124]

[0125] Q(i,j)=arctan(P x / P y )

[0126] Where M(i,j) represents the gradient amplitude of the pixel point at the binary image coordinate [i,j] of the lesion edge; Q(i,j) represents the gradient direction of the pixel point at the binary image coordinate [i,j] of the lesion edge.

[0127] S6.3, forming a gradient matrix of an edge detection algorithm based on the edge gradient change value, the grayscale gradient amplitude and direction of the lesion edge binary image.

[0128] The above formulas together constitute the gradient matrix of the Canny edge detection gradient operator to detect the edge of the lesion.

[0129] S6.4, detecting the edge of the lesion by using the gradient matrix of the edge detection algorithm to obtain the edge contour of the lesion.

[0130] In this embodiment, by calculating the gradient change value and the grayscale gradient amplitude and direction, the edge in the image can be located more accurately. This method helps to reduce the impact of noise on edge detection and improves the accuracy of edge detection results.

[0131] S7, based on the lesion edge contour, calculate the center point coordinates of the lesion to obtain the second lesion center point coordinates.

[0132] Among them, in the previous step, the lesion edge binary image has been identified by the edge detection algorithm, and the lesion edge contour is obtained. These contour data are the pixel sets of the outer boundary of the lesion area. The coordinates of all boundary points are extracted from the lesion edge contour. These points constitute the boundary line of the lesion area, and the center point coordinates of the lesion can be recalculated using the method of the outer minimum rectangle in steps S3.1-S3.6 to the second lesion center point coordinates.

[0133] In a possible implementation, based on the lesion edge contour, calculating the coordinates of the center point of the lesion, and obtaining the coordinates of the second lesion center point further includes:

[0134] The breast puncture position is determined according to the coordinates of the center point of the second lesion, the edge contour of the lesion and the breast image.

[0135] In the specific implementation process, breast images can be collected multiple times from different angles or using different imaging technologies (such as ultrasound, MRI, etc.), and each image can be processed through steps S1 to S7 to obtain multiple lesion contour images and corresponding second lesion center point coordinates. The lesion edge contours and center point coordinates in the multiple images obtained in the above steps are used, combined with known imaging parameters (for example, the angle and depth of each image), to convert the two-dimensional coordinates into three-dimensional coordinates to construct a three-dimensional model. The Euclidean distance between each point in the coordinate set of the outer contour of the breast and each point in the coordinate set of the lesion area is calculated, and all Euclidean distances are sorted. The group with the smallest distance is selected as the path to be screened. Considering factors such as the vascular distribution, tissue type and density in the breast, each path to be screened is assigned a damage value to indicate the degree of damage that the path may cause to the surrounding tissue. Based on the distance value and the damage value, a path that is short and causes the least damage to the surrounding tissue is selected as the optimal path. According to the determined optimal path, the patient's position during the puncture process is designed to ensure that the puncture needle can accurately enter the lesion area along this path, and the position of the puncture point is marked on the patient's skin so that the doctor can accurately locate it during the actual operation.

[0136] In summary, in this embodiment, by segmenting the breast image using a dynamic threshold entropy function based on the image grayscale entropy feature, the lesion area can be more accurately separated from the complex background. This method can adapt to situations of different contrasts and ensure that the lesion area can be accurately extracted even in low contrast or complex backgrounds. The minimum circumscribed rectangle is used to determine the approximate center position of the lesion and its rotation angle relative to the horizontal axis, which provides an accurate position reference for subsequent high-resolution local image acquisition and helps to understand the overall orientation or tilt of the lesion. The position and angle of the imaging device are adjusted according to the actual size of the lesion to ensure that a high-quality local image covering the entire lesion and its edge is collected. For larger lesions, by dividing multiple sub-areas and collecting images separately and then splicing them, it is ensured that the complete lesion information is obtained while also improving efficiency. The grayscale variance-based large-law segmentation method is used to process the local image to obtain a binary image of the lesion edge, and the Canny edge detection algorithm is used to identify the lesion edge contour. This method effectively removes noise and artifacts, making the lesion edge more clearly visible, thereby providing doctors with a more reliable basis for diagnosis. By processing and analyzing multiple breast images obtained from different angles or using different imaging technologies, a three-dimensional model is constructed, the optimal path is calculated, and a reasonable puncture position is designed. Finally, the puncture point is marked, which greatly improves the safety and accuracy of breast puncture operations.

[0137] Embodiment 2

[0138] like Figure 2 As shown, this embodiment provides a breast puncture positioning system, including: a first image acquisition module, used to acquire breast images; a first segmentation module, used to segment the breast images based on the image grayscale entropy characteristics, using a dynamic threshold entropy function to obtain a lesion main image and a background image; a first calculation module, used to calculate the first lesion center point coordinates and a first rotation angle according to the segmented lesion main image; a second image acquisition module, used to acquire a local image of the lesion based on the first lesion center point coordinates and the first rotation angle; a second segmentation module, used to process the local image using a large law segmentation method based on grayscale variance to obtain a lesion edge binary image; an edge detection and contour recognition module, used to identify the lesion edge binary image using an edge detection algorithm to obtain a lesion edge contour; a second calculation module, based on the lesion edge contour, calculates the lesion center point coordinates to obtain the second lesion center point coordinates.

[0139] The above-mentioned embodiments only express the specific implementation of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A method for breast puncture positioning, characterized in that: Includes the following: Acquiring breast images; Based on the grayscale entropy characteristics of the image, the dynamic threshold entropy function is used to segment the breast image to obtain the lesion main image and the background image. Calculating the coordinates of the first lesion center point and the first rotation angle according to the segmented lesion main body image; Based on the first lesion center point coordinates and the first rotation angle, collecting a local image of the lesion; The local image is processed by a large-law segmentation method based on grayscale variance to obtain a binary image of the lesion edge; The edge detection algorithm is used to identify the binary image of the lesion edge and obtain the lesion edge contour; Based on the lesion edge contour, the coordinates of the center point of the lesion are calculated to obtain the coordinates of the second lesion center point.

2. A breast puncture positioning method according to claim 1, characterized in that: Based on the image grayscale entropy features, the dynamic threshold entropy function is used to segment the breast image, and the lesion main image and background image are obtained, including the following: The entropy of the lesion main image and the background image are Among them, H T is the entropy of the lesion main body image; H b is the entropy of the background image: P i is the pixel ratio with gray value i: t is the first segmentation threshold; P T is the ratio and sum of all pixel values ​​below the threshold t: After obtaining the entropy of the lesion and the background area, the entropy function S is constructed, and the threshold with the largest entropy function value is taken as the maximum entropy threshold. S=H T +H b The maximum entropy threshold is used to segment the breast image to obtain the lesion main image and the background image.

3. A breast puncture positioning method according to claim 1, characterized in that: According to the segmented lesion main body image, calculating the coordinates of the first lesion center point and the first rotation angle includes the following contents: Extract all pixel points in the main image of the lesion to form a point sequence; Through the point sequence, an image processing algorithm is used to find the smallest rectangle that can completely surround the main image of the lesion; Calculate and store the coordinates of the four vertices of the minimum enclosing rectangle; The coordinates of the center point of the first lesion are calculated by using the coordinates of the four vertices of the minimum circumscribed rectangle; Determine the major axis and minor axis of the rectangle through the coordinates of the four vertices of the minimum circumscribed rectangle; The angle between the long axis and the horizontal axis is calculated to obtain the first rotation angle.

4. A breast puncture positioning method according to claim 1, characterized in that: The local image is processed by a large law segmentation method based on grayscale variance to obtain a binary image of the lesion edge, including the following contents: The local image includes a background area and a lesion edge area, and a demarcation threshold between the background area and the lesion edge area is set; Based on the demarcation threshold, a first proportion of the background area in the local image is calculated by a first proportion formula, and based on the demarcation threshold, a second proportion of the lesion edge area in the local image is calculated by a second proportion formula; The first average gray value of the background area is calculated by the first average gray value formula, and the second average gray value of the lesion edge area is calculated by the second average gray value formula; Based on the first proportion, the second proportion, the first average grayscale value, and the second average grayscale value, the grayscale variance between the lesion edge area and the background area is calculated by using the grayscale variance formula, and the boundary threshold corresponding to the maximum grayscale variance is selected as the second segmentation threshold; The lesion edge area and the background area are segmented based on the second segmentation threshold to obtain a lesion edge binary image.

5. A breast puncture positioning method according to claim 4, characterized in that: The first proportion formula and the second proportion formula are respectively: Among them, W0 is the first proportion of the background area in the local image, k is the boundary threshold between the background area and the lesion edge area, P i is the proportion of pixels with gray value i in the local image, W1 is the second proportion of the lesion edge area in the local image, and N represents the maximum gray level in the local image; The first average gray value formula and the second average gray value formula are respectively: Wherein, U0 is the first average gray value of the background area, and U1 is the second average gray value of the lesion edge area; The grayscale variance formula is: δ(k) 2 =W0(U-U0) 2 +W1(U-U1) 2 Among them, δ(k) 2 is the grayscale variance between the lesion edge area and the background area, δ(k) 2 The boundary threshold k corresponding to the maximum is used as the second segmentation threshold.

6. A method for breast puncture positioning according to claim 1, characterized in that: The method of using an edge detection algorithm to identify a binary image of the lesion edge and obtain the lesion edge contour includes the following contents: Calculate the edge gradient change values ​​of the binary image of the lesion edge in the X direction and the Y direction; Calculate the grayscale gradient amplitude and direction of the lesion edge binary image based on the edge gradient change value; A gradient matrix of an edge detection algorithm is formed based on the edge gradient change value, the grayscale gradient amplitude and direction of the lesion edge binary image; The edge of the lesion is detected by the gradient matrix of the edge detection algorithm to obtain the edge contour of the lesion.

7. A method for breast puncture positioning according to claim 1, characterized in that: Based on the edge contour of the lesion, the coordinates of the center point of the lesion are calculated, and after the coordinates of the center point of the second lesion are obtained, the following step is further included: The breast puncture position is determined according to the coordinates of the center point of the second lesion, the edge contour of the lesion and the breast image.

8. A breast puncture positioning system, characterized in that: include: A first image acquisition module, used for acquiring breast images; The first segmentation module is used to segment the breast image based on the image grayscale entropy feature and adopt a dynamic threshold entropy function to obtain a lesion main image and a background image; A first calculation module, used for calculating the coordinates of the first lesion center point and the first rotation angle according to the segmented lesion main body image; A second image acquisition module, used for acquiring a local image of the lesion based on the coordinates of the center point of the first lesion and the first rotation angle; A second segmentation module is used to process the local image using a large-law segmentation method based on grayscale variance to obtain a binary image of the lesion edge; The edge detection and contour recognition module is used to identify the binary image of the lesion edge using the edge detection algorithm to obtain the lesion edge contour; The second calculation module calculates the coordinates of the center point of the lesion based on the lesion edge contour to obtain the coordinates of the second lesion center point.