Lesion area marking method, device, computer system and readable storage medium

Through image processing, calibration, filtering and region growing processing, automatic identification and accurate annotation of breast lesion areas are achieved, solving the problems of low annotation efficiency and low accuracy in the existing technology, especially when annotating tiny calcification points. Improved accuracy.

CN110880169BActive Publication Date: 2024-09-06PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910983274.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-16
Publication Date
2024-09-06
Estimated Expiration
2039-10-16

AI Technical Summary

Technical Problem

Existing methods for labeling breast lesions are inefficient and inaccurate. It is especially difficult to accurately and quickly label tiny calcifications, and the quality is uneven due to the different experience of labelers.

Method used

The image processing module performs grayscale processing, the image calibration module performs calibration, the image filtering module performs filtering processing, and the region growing module performs region growing processing to generate a seed image with closed lines to achieve automatic identification of the lesion area.

Benefits of technology

It improves the efficiency and accuracy of lesion area identification, avoids uneven identification quality caused by different experience of annotators, and can accurately label tiny calcification points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110880169B
    Figure CN110880169B
Patent Text Reader

Abstract

The present invention discloses a method, device, computer system and readable storage medium for marking lesion regions, which are based on artificial intelligence and include the following steps: receiving a case image, graying the case image to generate a processed image, and outputting it to a client; receiving calibration information, calibrating the processed image according to the calibration information to generate a calibrated image, and outputting it to a client; receiving a filtering threshold, filtering the calibrated image according to the filtering threshold to generate a filtered image and outputting it to a client; receiving seed coordinate data and a similarity threshold, performing region growth processing on the filtered image according to the seed coordinate data and the similarity threshold to generate a seed image with closed lines, and outputting it to a client. The present invention realizes the technical effect of automatically identifying lesion regions and generating closed lines that depict the contour of the lesion region, which not only improves the efficiency of lesion region identification, but also improves the accuracy of identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method and device for marking a lesion area, a computer system and a readable storage medium. Background Art

[0002] Breast cancer is one of the most common malignant tumors in women. In terms of examination and treatment, it is common to use imaging methods to conduct clinical diagnosis of breast cancer. For example, breast ultrasound, mammography CR and other methods have achieved relatively good diagnostic results.

[0003] However, the current labeling of breast lesions is usually done manually, which is not only inefficient and time-consuming, but also has different accuracy depending on the experience of the labeler, resulting in uneven quality of lesion labeling. Especially for tiny calcification points, existing methods are difficult to accurately and quickly label. Summary of the invention

[0004] The purpose of the present invention is to provide a method, device, computer system and readable storage medium for marking a lesion area, so as to solve the problems existing in the prior art.

[0005] To achieve the above object, the present invention provides a method for marking a lesion area, comprising the following steps:

[0006] S1: receiving a case image, graying the case image to generate a processed image, and outputting the processed image to a client;

[0007] S2: receiving calibration information of the processed image from the client, calibrating the processed image according to the calibration information to generate a calibrated image, and outputting the calibrated image to the client;

[0008] S3: receiving a filtering threshold of the calibration image from the client, filtering the calibration image according to the filtering threshold to generate a filtered image, and outputting the filtered image to the client;

[0009] S4: receiving the seed coordinate data and the similarity threshold outputted by the client according to the filtered image, performing region growing processing on the filtered image according to the seed coordinate data and the similarity threshold to generate a seed image with closed lines, and outputting the seed image to the client.

[0010] In the above scheme, in S1, graying the case image to obtain a processed image includes the following steps:

[0011] S11: extracting RGB components of pixels in the case image;

[0012] S12: Calculate the RGB components according to the grayscale conversion method to obtain a grayscale value;

[0013] S13: loading the grayscale value onto the pixel and changing the RGB component of the pixel to 0 to obtain a processed pixel; storing the processed pixel in a processing stack;

[0014] S14: Obtaining a processed pixel of each pixel in the case image according to the method of S11-S13, and storing it in a processing stack;

[0015] S15: Generate a processed image through the processed pixels in the processing stack and output it to the client.

[0016] In the above scheme, S2 comprises the following steps:

[0017] S21: receiving calibration information generated after circling a calibration area on the image; the calibration information is a coordinate set;

[0018] S22: extracting the coordinates of each processed pixel in the processing stack, and setting the processed pixel whose coordinates are within the calibration information as a calibration pixel;

[0019] S23: creating a calibration stack and color parameters, and storing the calibration pixels in the calibration stack;

[0020] S24: assigning values ​​to RGB components of all calibration pixels in the calibration image according to the color parameters;

[0021] S25: Generate a calibration image through the processed pixels in the processing stack and the calibrated pixels in the calibration stack, and output it to the client.

[0022] In the above scheme, the filtering threshold includes an upper threshold and a lower threshold, and filtering the calibration image according to the filtering threshold and outputting it to the client to generate a filtered image includes the following steps:

[0023] S31: providing a filter stack, extracting the grayscale values ​​of all calibration pixels in the calibration stack;

[0024] S32: Determine whether the grayscale value of the calibration pixel is greater than the upper threshold value;

[0025] If yes, the RGB components of the calibration pixel are changed to 0 and stored in the calibration stack;

[0026] If not, enter S33;

[0027] S33: Determine whether the grayscale value of the calibration pixel is less than the lower threshold;

[0028] If yes, the gray value of the calibration pixel is changed to 0 and stored in the calibration stack;

[0029] If not, setting the calibration pixel as a filter pixel and storing it in the filter stack;

[0030] S34: generating a filtered image through the processed pixels in the processing stack, the calibrated pixels in the calibration stack, and the filtered pixels in the filtering stack, and outputting the filtered image to the client.

[0031] In the above scheme, S4 comprises the following steps:

[0032] S41: receiving seed coordinate data generated by the client by clicking or circling on the filter image;

[0033] S42: acquiring pixels in the filtered image whose coordinates are consistent with the seed coordinate data, setting the pixels as seed pixels, and storing the seed pixels in a seed stack;

[0034] S43: extracting the gray value of the seed pixel, obtaining similar pixels from the filtered image according to the gray value and a similarity threshold, and storing the similar pixels in a seed stack;

[0035] S44: extracting a seed pixel at a boundary in the seed stack, and setting the seed pixel as a seed boundary pixel;

[0036] S45: creating a line stack, and creating line pixels in the line stack whose coordinates are consistent with the coordinates of the seed boundary pixels;

[0037] S46: Generate a seed image by combining the seed pixels in the seed stack, the line pixels in the line stack, the processed pixels in the processed stack, the calibrated pixels in the calibration stack, and the filtered pixels in the filter stack, and output the seed image to the client.

[0038] The above solution may further include S5, which includes: receiving an adjustment signal output by the client, and adjusting the position of the closed line in the seed image according to the adjustment signal.

[0039] In the above scheme, the adjustment signal includes a start signal and an arrival signal, and S5 includes the following steps:

[0040] S51: The cursor of the client moves to a line pixel and selects it, generating a start signal with start coordinate information; receiving a selection signal output by the client, and obtaining a line pixel whose coordinates are consistent with the start coordinate information from the line stack according to the start coordinate information of the selection signal and setting it as a sampling pixel;

[0041] S52: in the line stack, setting the line pixels on both sides of the sampling pixel as adjustment pixels;

[0042] S53: the cursor of the client moves to a certain position in the seed image and clicks it, generating an in-position signal with in-position coordinate information; receiving the in-position signal output by the client, changing the coordinates of the sampled pixel to the in-position coordinate information of the in-position signal, and storing the sampled pixel in the line stack;

[0043] S54: calculating the straight-line distance between the starting coordinate information and the arriving coordinate information, and obtaining the moving distance according to the straight-line distance and the interval between the sampling pixel and the adjustment pixel;

[0044] S55: adjusting the coordinates of the adjusted pixels according to the moving direction of the sampled pixels and the moving distance, and storing the adjusted pixels in a line stack;

[0045] S56: Outputting the pixels in the line stack to the client to achieve the effect of adjusting the position of the closed line in the seed image.

[0046] To achieve the above object, the present invention further provides a lesion region marking device, comprising:

[0047] An image processing module is used to receive a case image, perform grayscale processing on the case image to generate a processed image, and output the processed image to a client;

[0048] An image calibration module, configured to receive calibration information of the processed image from a client, calibrate the processed image according to the calibration information to generate a calibrated image, and output the calibrated image to the client;

[0049] An image filtering module, configured to receive a filtering threshold value of the calibration image from the client, filter the calibration image according to the filtering threshold value to generate a filtered image, and output the filtered image to the client;

[0050] The region growing module is used to receive the seed coordinate data and similarity threshold output by the client according to the filtered image, perform region growing processing on the filtered image according to the seed coordinate data and the similarity threshold to generate a seed image with closed lines, and output it to the client.

[0051] To achieve the above objectives, the present invention also provides a computer system, which includes multiple computer devices, each of which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processors of the multiple computer devices execute the computer program, they jointly implement the steps of the above-mentioned lesion area marking method.

[0052] To achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, which includes multiple storage media, each storage medium stores a computer program, and when the computer programs stored in the multiple storage media are executed by a processor, they jointly implement the steps of the above-mentioned lesion area marking method.

[0053] The lesion area marking method, device, computer system and readable storage medium provided by the present invention perform grayscale processing on the case image through an image processing module to generate a processed image, and output it to a client; the grayscale processing reduces noise interference in the case image and improves the accuracy of image recognition; the processed image is calibrated by an image calibration module and outputted to a client to generate a calibrated image; therefore, the user can view the specified area according to his needs, thereby expanding the scope of application of the present technology; the calibrated image is filtered according to a filtering threshold by an image filtering module to generate a filtered image and output it to a client; therefore, by filtering the processed image, the influence of normal areas in the case image is further reduced. or organ area, thereby improving the accuracy of lesion area identification; performing region growing processing on the filtered image according to the seed coordinate data and the similarity threshold through the region growing module to generate a seed image with closed lines and output it to the client; realizing the technical effect of automatically identifying the lesion area and generating closed lines depicting the outline of the lesion area, providing great convenience for users to search and confirm the lesion area, not only improving the efficiency of lesion area identification, but also improving the accuracy of identification, avoiding the situation where the lesion identification and annotation quality are uneven due to different experience of the annotators; and for tiny calcification points, the present application can accurately annotate them, eliminating the defect that the existing manual method is difficult to annotate tiny areas. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a flow chart of Embodiment 1 of the method for marking a lesion area of ​​the present invention;

[0055] Figure 2 This is a workflow diagram between a lesion region labeling device and a client in Embodiment 1 of the lesion region labeling method of the present invention;

[0056] Figure 3 This is a schematic diagram of a program module of a second embodiment of a device for marking a lesion region according to the present invention;

[0057] Figure 4 Schematic diagram of the hardware structure of the computer device in the third embodiment of the computer system of the present invention.

[0058] Reference numerals:

[0059] 1. Lesion area marking device 2. Client 3. Computer equipment

[0060] 11. Image processing module 12. Image calibration module 13. Image filtering module

[0061] 14. Region growing module 15. Line adjustment module 51. Memory 52. ​​Processor DETAILED DESCRIPTION

[0062] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0063] The lesion region labeling method, device, computer system and readable storage medium provided by the present invention are applicable to the field of communications, and provide a lesion region labeling method based on an image processing module, an image calibration module, an image filtering module and a region growing module. The present invention grayscales the case image through the image processing module to generate a processed image and outputs it to the client; calibrates the processed image through the image calibration module to generate a calibrated image and outputs it to the client; filters the calibrated image according to the filtering threshold through the image filtering module to generate a filtered image and output it to the client; and performs region growing processing on the filtered image according to the seed coordinate data and the similarity threshold through the region growing module to generate a seed image with closed lines and output it to the client.

[0064] Embodiment 1

[0065] See also Figure 1 and Figure 2 A lesion area marking method of this embodiment includes the following steps:

[0066] S1: receiving a case image, graying the case image to generate a processed image, and outputting the processed image to the client 2. In this step, receiving the case image may include receiving the case image output by the client 2; the graying process reduces noise interference in the case image and improves the accuracy of image recognition.

[0067] Specifically, in S1, graying the case image to obtain a processed image includes the following steps:

[0068] S11: Extracting RGB components of pixels in the case image.

[0069] S12: Calculate the RGB components according to a grayscale conversion method to obtain a grayscale value;

[0070] In this step, the grayscale conversion method is a floating point algorithm, an integer algorithm, a shift algorithm, an average algorithm, or a single value algorithm;

[0071] Specifically, the floating point algorithm obtains the gray value through the formula Gray=R*0.3+G*0.59+B*0.11;

[0072] Among them, R is the R value in the RGB component, G is the G value in the RGB component, B is the B value in the RGB component, and Gray is the gray value;

[0073] The integer method obtains the gray value by the formula Gray=(R*30+G*59+B*11) / 100;

[0074] Among them, R is the R value in the RGB component, G is the G value in the RGB component, B is the B value in the RGB component, and Gray is the gray value;

[0075] The shift method obtains the gray value by the formula Gray=(R*76+G*151+B*28)>>8;

[0076] Among them, R is the R value in the RGB component, G is the G value in the RGB component, B is the B value in the RGB component, and Gray is the gray value;

[0077] The average value method obtains the gray value through the formula Gray=(R+G+B) / 3;

[0078] Among them, R is the R value in the RGB component, G is the G value in the RGB component, B is the B value in the RGB component, and Gray is the gray value;

[0079] The single value method obtains the gray value through the formula Gray=G;

[0080] Among them, G is the G value in the RGB component, and Gray is the grayscale value.

[0081] S13: Loading the grayscale value onto the pixel and changing the RGB components of the pixel to 0 to obtain a processed pixel; storing the processed pixel in a processing stack.

[0082] S14: Obtain the processed pixel of each pixel in the case image according to the method of S11-S13, and store it in the processing stack.

[0083] S15: Generate a processed image through the processed pixels in the processing stack and output it to the client 2.

[0084] S2: receiving calibration information of the processed image from the client, calibrating the processed image according to the calibration information to generate a calibrated image, and outputting the calibrated image to the client 2.

[0085] In this step, the user can view the specified area according to his needs, which expands the scope of application of this technology.

[0086] In a preferred embodiment, S2 comprises the following steps:

[0087] S21: receiving calibration information generated after circling a calibration area on the image; the calibration information is a coordinate set;

[0088] S22: extracting the coordinates of each processed pixel in the processing stack, and setting the processed pixel whose coordinates are within the calibration information as a calibration pixel;

[0089] S23: creating a calibration stack and color parameters, and storing the calibration pixels in the calibration stack;

[0090] In this step, the color parameters include R value, G value and B value;

[0091] S24: assigning values ​​to RGB components of all calibration pixels in the calibration image according to the color parameters;

[0092] S25: Generate a calibration image through the processed pixels in the processing stack and the calibration pixels in the calibration stack, and output it to the client 2; therefore, a color difference is generated between the calibration image and the processed image, so that the user can observe and distinguish the calibration image and the processed image.

[0093] S3: receiving a filtering threshold of the calibration image from the client, filtering the calibration image according to the filtering threshold to generate a filtered image, and outputting the filtered image to the client 2.

[0094] In this step, the filtering threshold includes an upper threshold limit and a lower threshold limit, and the upper threshold limit and the lower threshold limit can be adjusted as needed; by filtering the processed image, the interference from normal areas or organ areas in the case image is further reduced, and the accuracy of lesion area identification is improved.

[0095] In a preferred embodiment, in S3, filtering the calibration image according to the filtering threshold and outputting it to the client 2 to generate a filtered image includes the following steps:

[0096] S31: providing a filter stack, extracting the grayscale values ​​of all calibration pixels in the calibration stack;

[0097] S32: Determine whether the grayscale value of the calibration pixel is greater than the upper threshold value;

[0098] If yes, the RGB components of the calibration pixel are changed to 0 and stored in the calibration stack;

[0099] If not, proceed to S33;

[0100] S33: Determine whether the grayscale value of the calibration pixel is less than the lower threshold;

[0101] If yes, the gray value of the calibration pixel is changed to 0 and stored in the calibration stack;

[0102] If not, setting the calibration pixel as a filter pixel and storing it in the filter stack;

[0103] S34 : generating a filtered image through the processed pixels in the processing stack, the calibrated pixels in the calibration stack, and the filtered pixels in the filtering stack, and outputting the filtered image to the client 2 .

[0104] S4: receiving the seed coordinate data and the similarity threshold outputted by the client 2 according to the filtered image, performing region growing processing on the filtered image according to the seed coordinate data and the similarity threshold to generate a seed image with closed lines, and outputting it to the client 2.

[0105] This step achieves the technical effect of automatically identifying the lesion area and generating closed lines that depict the outline of the lesion area, which provides great convenience for users to find and confirm the lesion area. It not only improves the efficiency of lesion area identification, but also improves the accuracy of identification, avoiding the situation where the quality of lesion identification and annotation is uneven due to different experiences of annotators.

[0106] In a preferred embodiment, the S4 comprises the following steps:

[0107] S41: receiving seed coordinate data generated by the client 2 by clicking or circling on the filter image;

[0108] In this step, the client 2 can generate seed coordinate data for describing the coordinates of the pixel by clicking any pixel on the processed image, wherein the seed coordinate data is the coordinates of the pixel;

[0109] In this step, the client 2 may also generate seed coordinate data for describing the coordinates of each pixel in the target area by circling the target area on the processed image, wherein the seed coordinate data is a coordinate set of each pixel in the target area.

[0110] S42: Obtain pixels in the filtered image whose coordinates are consistent with the seed coordinate data, set the pixels as seed pixels, and store the seed pixels in a seed stack.

[0111] S43: extracting the gray value of the seed pixel, obtaining similar pixels from the filtered image according to the gray value and a similarity threshold, and storing the similar pixels in a seed stack;

[0112] Further, the S43 comprises the following steps:

[0113] S43-1: extracting the grayscale value of the seed pixel in the seed stack, and setting the grayscale value as the calculated value;

[0114] In this step, if there is one seed pixel, the grayscale value of the seed pixel is extracted and set as the calculated value;

[0115] If there are two or more seed pixels, the grayscale values ​​of various sub-pixels are extracted, the grayscale values ​​are added and divided by the number of seed pixels to obtain an average grayscale value, and the average grayscale value is set as the calculated value;

[0116] S43-2: extracting a filtered pixel in the filter stack, subtracting the calculated value from the grayscale value of the filtered pixel to obtain a difference value, and determining whether the difference value is greater than the similarity threshold;

[0117] If yes, store the filtered pixel in the filter stack;

[0118] If not, the filtered pixel is set as a seed pixel and stored in the seed stack.

[0119] S44: extracting the seed pixels at the boundary in the seed stack, and setting the seed pixels as seed boundary pixels.

[0120] S45: Create a line stack, and create line pixels in the line stack whose coordinates are consistent with the coordinates of the seed boundary pixels.

[0121] S46: generating a seed image by combining the seed pixels in the seed stack, the line pixels in the line stack, the processed pixels in the processed stack, the calibration pixels in the calibration stack, and the filtered pixels in the filter stack, and outputting the seed image to the client 2;

[0122] The line pixels will form a closed line around the seed pixels on the seed image, and the area surrounded by the closed line is the lesion area.

[0123] It should be noted that the so-called boundary refers to the set of pixels whose surrounding pixel grayscale changes sharply, which is the most basic feature of the image. The boundary exists between the target, background and region, so it is the most important basis for image segmentation; therefore, those skilled in the art can use edge detection or region division as an image segmentation method based on the prior art to detect and identify the boundary of the seed pixel to obtain the seed boundary pixel, that is, extract the seed pixel at the boundary in the seed stack, and set the seed pixel as the seed boundary pixel; since the technical solution is mainly to identify the coordinates of the seed boundary pixel, and then generate a seed image with closed lines based on the coordinates, therefore, how the seed boundary pixel is identified and extracted is not described here.

[0124] In a preferred embodiment, S5 may also be included, and S5 includes:

[0125] receiving an adjustment signal output by the client 2, and adjusting the position of the closed line in the seed image according to the adjustment signal;

[0126] In this step, the adjustment signal includes a start signal and an arrival signal. By adjusting the position of the closed line in the seed image, the accuracy of the closed line in delineating the lesion area is improved.

[0127] In a preferred embodiment, S5 comprises the following steps:

[0128] S51: The cursor of the client 2 moves to the line pixel and selects it, generating a start signal with start coordinate information; receiving a selection signal output by the client 2, and obtaining a line pixel whose coordinates are consistent with the start coordinate information from the line stack according to the start coordinate information of the selection signal and setting it as a sampling pixel;

[0129] In this step, the line pixels selected by the cursor are set as sampling pixels.

[0130] S52: in the line stack, setting the line pixels on both sides of the sampling pixel as adjustment pixels;

[0131] In this step, the number of pixels to be adjusted can be set as needed.

[0132] S53: The cursor of the client 2 moves to a certain position in the seed image and clicks it, generating an in-position signal with in-position coordinate information; receiving the in-position signal output by the client 2, changing the coordinates of the sampled pixel to the in-position coordinate information of the in-position signal, and storing the sampled pixel in the line stack.

[0133] S54: calculating the straight-line distance between the starting coordinate information and the arriving coordinate information, and obtaining the moving distance according to the straight-line distance and the interval between the sampling pixel and the adjustment pixel;

[0134] In this step, the moving coordinates of the adjustment pixel are adjusted according to the attenuation function D(s)=D0e^(-a(s+1)), where a is the scaling factor, s is the distance between the current adjustment pixel and the sampling pixel, D0 is the straight line distance, and D(s) is the distance moved by the adjustment pixel;

[0135] For example, if the spacing between the current sampling pixel and the adjustment pixel is 3 and the straight-line distance is 10 pixel values, then the moving distance of the current adjustment pixel is 10e^(-4a), and its moving direction is consistent with the moving direction of the sampling pixel.

[0136] Therefore, the coordinates of the adjustment pixels are adjusted using the attenuation function so that the adjustment pixels can move with the sampling pixels to ensure that the entire closed line can smoothly and accurately delineate the lesion area, thereby improving the accuracy and smoothness of the delineation.

[0137] S55: adjusting the coordinates of the adjusted pixels according to the moving direction of the sampled pixels and the moving distance, and storing the adjusted pixels in a line stack.

[0138] S56: Outputting the pixels in the line stack to the client 2 to achieve the effect of adjusting the position of the closed line in the seed image.

[0139] Embodiment 2

[0140] See also Figure 3 , a lesion region marking device 1 of this embodiment includes:

[0141] The image processing module 11 is used to receive the case image, perform grayscale processing on the case image to generate a processed image, and output it to the client 2;

[0142] An image calibration module 12, configured to receive calibration information of the processed image from the client 2, calibrate the processed image according to the calibration information to generate a calibrated image, and output the calibrated image to the client 2;

[0143] An image filtering module 13, configured to receive a filtering threshold of the calibration image from the client 2, filter the calibration image according to the filtering threshold to generate a filtered image, and output the filtered image to the client 2;

[0144] The region growing module 14 is used to receive the seed coordinate data and similarity threshold output by the client 2 according to the filtered image, perform region growing processing on the filtered image according to the seed coordinate data and the similarity threshold to generate a seed image with closed lines, and output it to the client 2.

[0145] In this embodiment, there is also a line adjustment module 15, which is used to receive an adjustment signal output by the client 2, and adjust the position of the closed line in the seed image according to the adjustment signal.

[0146] This technical solution is based on the image detection technology in the field of artificial intelligence. The case image is grayed out by an image processing module and outputted to the client to generate a processed image; the processed image is calibrated by an image calibration module and outputted to the client to generate a calibrated image; the calibrated image is filtered according to a filtering threshold by an image filtering module, and outputted to the client to generate a filtered image; the filtered image is region grown according to the seed coordinate data and the similarity threshold by a region growing module, and outputted to the client to generate a seed image with closed lines, thereby realizing the technical effect of image processing of the case image based on graying and filtering, and region extraction of the image based on the region growing algorithm.

[0147] Embodiment three:

[0148] To achieve the above-mentioned purpose, the present invention further provides a computer system, which includes a plurality of computer devices 3. The components of the lesion area marking device 1 of the second embodiment can be dispersed in different computer devices, and the computer devices can be smart phones, tablet computers, laptop computers, desktop computers, rack servers, blade servers, tower servers or cabinet servers (including independent servers, or server clusters composed of multiple servers) that execute programs. The computer devices of this embodiment include at least but are not limited to: a memory 31 and a processor 32 that can be interconnected through a system bus, such as Figure 4 It should be pointed out that Figure 4 Only a computer device with components is shown, but it should be understood that implementing all of the components shown is not a requirement and more or fewer components may alternatively be implemented.

[0149] In this embodiment, the memory 31 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 31 may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 31 may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Of course, the memory 31 may also include both an internal storage unit of a computer device and an external storage device thereof. In this embodiment, the memory 31 is generally used to store an operating system and various application software installed on a computer device, such as the program code of the lesion area marking device of the first embodiment, etc. In addition, the memory 31 may also be used to temporarily store various types of data that have been output or are to be output.

[0150] The processor 32 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 32 is generally used to control the overall operation of the computer device. In this embodiment, the processor 32 is used to run the program code stored in the memory 31 or process data, such as running the lesion area marking device to implement the lesion area marking method of embodiment 1.

[0151] Embodiment 4:

[0152] To achieve the above purpose, the present invention also provides a computer-readable storage system, which includes multiple storage media, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, CD, server, App application mall, etc., on which a computer program is stored, and the program realizes the corresponding function when executed by the processor 32. The computer-readable storage medium of this embodiment is used to store the lesion area marking device, and when executed by the processor 32, the lesion area marking method of embodiment 1 is realized.

[0153] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0154] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0155] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for marking a lesion region, characterized in that: The following steps are involved: S1: receiving a case image, graying the case image to generate a processed image, and outputting the processed image to a client; S2: receiving calibration information of the processed image from the client, calibrating the processed image according to the calibration information to generate a calibrated image, and outputting the calibrated image to the client; S3: receiving a filtering threshold of the calibration image from the client, filtering the calibration image according to the filtering threshold to generate a filtered image, and outputting the filtered image to the client; S4: receiving seed coordinate data and a similarity threshold outputted by the client according to the filtered image, performing region growing processing on the filtered image according to the seed coordinate data and the similarity threshold to generate a seed image with closed lines, and outputting the seed image to the client; The S4 comprises the following steps: S41: receiving seed coordinate data generated by the client by clicking or circling on the filter image; S42: acquiring pixels in the filtered image whose coordinates are consistent with the seed coordinate data, setting the pixels as seed pixels, and storing the seed pixels in a seed stack; S43: extracting the gray value of the seed pixel, obtaining similar pixels from the filtered image according to the gray value and a similarity threshold, and storing the similar pixels in a seed stack; S44: extracting a seed pixel at a boundary in the seed stack, and setting the seed pixel as a seed boundary pixel; S45: creating a line stack, and creating line pixels in the line stack whose coordinates are consistent with the coordinates of the seed boundary pixels; S46: generating a seed image by combining the seed pixels in the seed stack, the line pixels in the line stack, the processed pixels in the processed stack, the calibration pixels in the calibration stack, and the filtered pixels in the filter stack, and outputting the seed image to the client; The S43 comprises the following steps: S43-1: extracting the grayscale value of the seed pixel in the seed stack, and setting the grayscale value as the calculated value; If there is one seed pixel, the grayscale value of the seed pixel is extracted and set as the calculated value; if there are two or more seed pixels, the grayscale values ​​of various sub-pixels are extracted, the grayscale values ​​are added and divided by the number of seed pixels to obtain an average grayscale value, and the average grayscale value is set as the calculated value; S43-2: Extract the filter pixel in the filter stack, subtract the calculated value from the grayscale value of the filter pixel to obtain a differential value, and determine whether the differential value is greater than the similarity threshold; if so, store the filter pixel in the filter stack; if not, set the filter pixel as a seed pixel and store it in the seed stack.

2. The method for marking lesion areas according to claim 1, characterized in that: In S1, graying the case image to obtain a processed image includes the following steps: S11: extracting RGB components of pixels in the case image; S12: Calculate the RGB components according to the grayscale conversion method to obtain a grayscale value; S13: loading the grayscale value onto the pixel and changing the RGB component of the pixel to 0 to obtain a processed pixel; storing the processed pixel in a processing stack; S14: Obtaining a processed pixel of each pixel in the case image according to the method of S11-S13, and storing it in a processing stack; S15: Generate a processed image through the processed pixels in the processing stack and output it to the client.

3. The method for marking lesion areas according to claim 1, characterized in that: The S2 comprises the following steps: S21: receiving calibration information generated after circling a calibration area on the image; the calibration information is a coordinate set; S22: extracting the coordinates of each processed pixel in the processing stack, and setting the processed pixel whose coordinates are within the calibration information as a calibration pixel; S23: creating a calibration stack and color parameters, and storing the calibration pixels in the calibration stack; S24: assigning values ​​to RGB components of all calibration pixels in the calibration image according to the color parameters; S25: Generate a calibration image through the processed pixels in the processing stack and the calibrated pixels in the calibration stack, and output it to the client.

4. The method for marking lesion areas according to claim 1, characterized in that: The filtering threshold includes an upper threshold and a lower threshold. The filtering process of the calibration image according to the filtering threshold to generate a filtered image and outputting the filtered image to the client includes the following steps: S31: providing a filter stack, extracting the grayscale values ​​of all calibration pixels in the calibration stack; S32: Determine whether the grayscale value of the calibration pixel is greater than the upper threshold value; If yes, the RGB components of the calibration pixel are changed to 0 and stored in the calibration stack; If not, proceed to S33; S33: Determine whether the grayscale value of the calibration pixel is less than the lower threshold; If yes, the gray value of the calibration pixel is changed to 0 and stored in the calibration stack; If not, setting the calibration pixel as a filter pixel and storing it in the filter stack; S34: generating a filtered image through the processed pixels in the processing stack, the calibrated pixels in the calibration stack, and the filtered pixels in the filtering stack, and outputting the filtered image to the client.

5. The method for marking lesion areas according to claim 1, characterized in that: The method may further include S5, which includes: receiving an adjustment signal output by the client, and adjusting the position of the closed line in the seed image according to the adjustment signal.

6. The method for marking lesion regions according to claim 5, characterized in that: The adjustment signal includes a start signal and an arrival signal, and S5 includes the following steps: S51: The cursor of the client moves to a line pixel and selects it, generating a start signal with start coordinate information; receiving a selection signal output by the client, and obtaining a line pixel whose coordinates are consistent with the start coordinate information from the line stack according to the start coordinate information of the selection signal and setting it as a sampling pixel; S52: in the line stack, setting the line pixels on both sides of the sampling pixel as adjustment pixels; S53: the cursor of the client moves to a certain position in the seed image and clicks it, generating an in-position signal with in-position coordinate information; receiving the in-position signal output by the client, changing the coordinates of the sampled pixel to the in-position coordinate information of the in-position signal, and storing the sampled pixel in the line stack; S54: calculating the straight-line distance between the starting coordinate information and the arriving coordinate information, and obtaining the moving distance according to the straight-line distance and the interval between the sampling pixel and the adjustment pixel; S55: adjusting the coordinates of the adjusted pixels according to the moving direction of the sampled pixels and the moving distance, and storing the adjusted pixels in a line stack; S56: Outputting the pixels in the line stack to the client to achieve the effect of adjusting the position of the closed line in the seed image.

7. A lesion area marking device, characterized in that: include: An image processing module is used to receive a case image, perform grayscale processing on the case image to generate a processed image, and output the processed image to a client; An image calibration module, configured to receive calibration information of the processed image from a client, calibrate the processed image according to the calibration information to generate a calibrated image, and output the calibrated image to the client; An image filtering module, configured to receive a filtering threshold value of the calibration image from the client, filter the calibration image according to the filtering threshold value to generate a filtered image, and output the filtered image to the client; A region growing module, used for receiving seed coordinate data and a similarity threshold outputted by the client according to the filtered image, performing region growing processing on the filtered image according to the seed coordinate data and the similarity threshold to generate a seed image with closed lines, and outputting the seed image to the client; The method comprises: receiving seed coordinate data and a similarity threshold value outputted by a client according to the filtered image, performing a region growing process on the filtered image according to the seed coordinate data and the similarity threshold value to generate a seed image with closed lines, and outputting the seed image to the client, including: receiving seed coordinate data generated by the client by clicking or circling the filtered image; obtaining pixels in the filtered image whose coordinates are consistent with the seed coordinate data, setting the pixels as seed pixels, and storing the seed pixels in a seed stack; extracting grayscale values ​​of the seed pixels, obtaining similar pixels from the filtered image according to the grayscale values ​​and the similarity threshold value, and storing the similar pixels in a seed stack; extracting seed pixels at the boundary in the seed stack, and setting the seed pixels as seed boundary pixels; creating a line stack, creating line pixels in the line stack with coordinates consistent with the coordinates of the seed boundary pixels; The invention relates to a method for generating a seed image by using the processed pixels, the calibrated pixels in the calibration stack and the filtered pixels in the filter stack, and outputting the seed image to the client; extracting the grayscale value of the seed pixel, obtaining similar pixels from the filtered image according to the grayscale value and the similarity threshold, and storing the similar pixels in the seed stack, including: extracting the grayscale value of the seed pixel in the seed stack, and setting the grayscale value as the calculated value; wherein, if the seed pixel is one, extracting the grayscale value of the seed pixel and setting it as the calculated value; if the seed pixel is two or more, extracting the grayscale values ​​of various sub-pixels, adding the grayscale values ​​and dividing them by the number of seed pixels, obtaining an average grayscale value, and setting the average grayscale value as the calculated value; extracting the filtered pixel in the filter stack, subtracting the calculated value from the grayscale value of the filtered pixel to obtain a difference value, and judging whether the difference value is greater than the similarity threshold; if so, storing the filtered pixel in the filter stack; if not, setting the filtered pixel as the seed pixel and storing it in the seed stack.

8. A computer system comprising a plurality of computer devices, each of which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: The processors of the multiple computer devices jointly implement the steps of the lesion area marking method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, comprising a plurality of storage media, each storage medium storing a computer program, characterized in that: The computer programs stored in the multiple storage media, when executed by a processor, jointly implement the steps of the lesion area marking method according to any one of claims 1 to 6.