Method, device and equipment for detecting puncture area of endoscopic image and storage medium
By preprocessing and identifying lesions on endoscopic ultrasound images, and calculating exploratory elasticity values, the problem of insufficient accuracy in detecting puncture areas of pancreatic lesions in the existing technology is solved, and more accurate lesion identification and puncture area determination are achieved.
Patent Information
- Application Number
- CN202410842841.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-01
AI Technical Summary
Existing endoscopic ultrasound technology has insufficient accuracy in identifying pancreatic lesions. Especially when distinguishing cancerous and non-cancerous masses, it is greatly affected by the operator's subjective judgment and semi-quantitative analysis methods, resulting in inaccurate detection of the puncture area. .
By acquiring the endoscopic images collected by endoscopic ultrasound, preprocessing is performed to remove invalid information, identify the lesion area, calculate the exploration elasticity value of the lesion area, and determine the puncture area based on the exploration elasticity value to achieve automatic identification and accurate judgment.
It improves the puncture area detection accuracy of lesions, reduces the subjective impact on the operator, enhances the accuracy of lesion identification under elastography, and provides a more reliable puncture area determination.
Smart Images

Figure CN118736199A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical auxiliary technology, and in particular to a method, device, electronic device and storage medium for detecting a puncture area of an endoscopic image. Background Art
[0002] Endoscopic ultrasonography (EUS) combines endoscopy and ultrasound. It is a type of technology that uses endoscopy to insert a miniature ultrasound probe into the digestive tract lumen to scan the digestive tract and adjacent organs at close range, and transmits high-resolution ultrasound images in real time. In recent years, endoscopic ultrasound has become the most sensitive method for detecting pancreatic diseases, especially small pancreatic cancers, with the advantages of short detection distance, low interference, high resolution, and strong real-time performance.
[0003] However, in conventional EUS imaging, benign and malignant pancreatic lesions are mostly low-density, which makes it very limited in application when distinguishing cancerous or non-cancerous masses. Therefore, endoscopic ultrasound elastography (EUS-E) has emerged to supplement EUS lesion imaging information with additional information to improve detection accuracy. However, due to the working principle of EUS-E technology, judgments are made based on color tone differences, which makes it very susceptible to the subjective judgment of the operator. The semi-quantitative analysis method introduced later uses two parameters, strain histogram (SH) and strain ratio (SR), to analyze. The operating doctor needs to mark the entire lesion area and the softest tissue area in the field of view, resulting in inaccurate definition of SH and SR values, which has a great impact on subsequent data, and thus affects the detection and judgment of the puncture area of the lesion in the endoscopic image.
[0004] Therefore, there is an urgent need for a puncture area detection method of an endoscopic image that can improve the accuracy of detecting the puncture area of a lesion. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for detecting the puncture area of an endoscopic image, so as to solve the technical problem in the related art that the puncture area of the lesion contained in the endoscopic image cannot be accurately detected.
[0006] In a first aspect, an embodiment of the present application provides a method for detecting a puncture area of an endoscopic image, comprising:
[0007] Acquiring an endoscopic image collected by an ultrasonic endoscope, and processing the endoscopic image to obtain an image to be processed;
[0008] Performing lesion recognition processing on the image to be processed to obtain the lesion area of the endoscopic image;
[0009] Acquiring pixel values of pixel points in the lesion area, and calculating the exploration elasticity value of the lesion area according to the pixel values;
[0010] The puncture area of the lesion contained in the endoscopic image is determined according to the exploration elasticity value.
[0011] In a second aspect, an embodiment of the present application provides a puncture area detection device for an endoscopic image, comprising:
[0012] An image processing module is used to obtain an endoscopic image collected by an ultrasonic endoscope and process the endoscopic image to obtain an image to be processed;
[0013] A lesion recognition module, used for performing lesion recognition processing on the image to be processed to obtain the lesion area of the endoscopic image;
[0014] A calculation processing module, used for obtaining pixel values of pixel points in the lesion area, and calculating the exploration elasticity value of the lesion area according to the pixel values;
[0015] The region determination module is used to determine the puncture region of the lesion contained in the endoscopic image according to the exploration elasticity value.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned methods for detecting the puncture area of an endoscopic image when executing the computer program.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the puncture area detection method of an endoscopic image described in any one of the above are implemented.
[0018] The embodiment of the present application provides a method, device, electronic device and storage medium for detecting the puncture area of an endoscopic image. When analyzing and processing the endoscopic image collected by an ultrasonic endoscope, the endoscopic image is first preprocessed to obtain an image to be processed that does not contain invalid information, and then the lesion contained in the image to be processed is identified to obtain the corresponding lesion area, and then the pixel value of each pixel point in the lesion area is obtained to calculate the corresponding exploration elasticity value, and finally the puncture area of the lesion contained in the endoscopic image is determined according to the exploration elasticity value. The lesion is automatically identified under elastic imaging, and the exploration elasticity value of the entire lesion area is calculated using the color pixel value, and then according to the obtained exploration elasticity value and the elasticity value threshold obtained in advance, when it is determined that the endoscopic image contains a lesion, the puncture area is accurately determined on the lesion. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of a method for detecting a puncture area of an endoscopic image provided in an embodiment of the present application;
[0020] Figure 2 is a flow chart of a process of obtaining an image change of a lesion area provided in an embodiment of the present application;
[0021] Figure 3 is a flowchart of steps for obtaining an exploration elasticity value provided in an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of image processing of the minimum rectangular frame in the lesion area provided in an embodiment of the present application;
[0023] Figure 5 It is a structural schematic diagram of a puncture area detection device for an endoscopic image provided in an embodiment of the present application;
[0024] Figure 6 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0025] Figure 7 This is another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0029] In the related technology, although endoscopic ultrasound elastography (EUS-E) can provide additional information to the lesion imaging information collected based on EUS technology to improve the detection accuracy, due to the working principle of EUS-E technology, it makes judgments based on color tone differences, which makes it very susceptible to the subjective judgment of the operator. The semi-quantitative analysis method introduced later uses two parameters, strain histogram (SH) and strain ratio (SR), to analyze. The doctor needs to mark the entire lesion area and the softest tissue area in the field of view, resulting in inaccurate definition of SH and SR values, which makes it impossible to accurately diagnose and detect lesions in later use.
[0030] In order to solve the technical problems existing in the related art, the present application embodiment provides a puncture area detection method for an endoscopic image, see Figure 1 , Figure 1 It is a flow chart of a method for detecting a puncture area in an endoscopic image provided in an embodiment of the present application. The method includes steps 101 to 104.
[0031] Step 101, acquiring an endoscopic image collected by an ultrasonic endoscope, and processing the endoscopic image to obtain an image to be processed.
[0032] In one embodiment, when detecting and judging the lesion, the ultrasonic endoscope is used to collect image information to obtain the currently collected endoscopic image, and the endoscopic image is processed to obtain a to-be-processed image for detection and judgment.
[0033] Exemplarily, during the application process, the EUS-E technology is used to acquire corresponding images, and then the obtained endoscopic images are processed. Specifically, when the endoscopic image is acquired, the endoscopic image will contain relevant annotation data, such as equipment information, parameter information, etc. Therefore, after the endoscopic image is obtained, the endoscopic image is processed accordingly to obtain an image to be processed that does not contain useless information.
[0034] Furthermore, when the collected endoscopic image is processed to obtain the image to be processed, it includes: acquiring the endoscopic image collected by the ultrasonic endoscope, and performing information recognition on the endoscopic image to obtain invalid information and image information; cropping the invalid information in the endoscopic image to obtain the image to be processed containing the image information.
[0035] Specifically, when processing an endoscopic image, the information contained in the endoscopic image is identified to determine the invalid information and image information contained in the endoscopic image, wherein the invalid information includes device information and parameter information on the endoscopic image, and the image information is the image corresponding to the organ, such as the pancreas, etc. Then, the invalid information in the endoscopic image is cropped and removed to obtain a to-be-processed image containing only image information for subsequent detection and judgment.
[0036] Step 102, performing lesion recognition processing on the image to be processed to obtain the lesion area of the endoscopic image.
[0037] In one embodiment, after obtaining the image to be processed, the lesion contained in the image to be processed is identified and processed to obtain the lesion region of the lesion contained in the image to be processed. When performing lesion detection on the image to be processed, a pre-trained lesion segmentation detection model can be used for processing, and the specific lesion region can be determined by identifying and segmenting the lesion contained in the image to be processed.
[0038] Furthermore, when performing lesion identification processing on the image to be processed, it includes: determining the midline in the image to be processed, and dividing the image to be processed into regions according to the midline to obtain a conventional imaging area and an elastic imaging area; performing lesion identification on the elastic imaging area to obtain the elastic imaging area to determine the lesion area of the image to be processed.
[0039] Specifically, when processing the image to be processed to obtain the lesion area, the center line is determined in the image to be processed, and the image to be processed is divided into regions according to the center line to obtain a conventional imaging area and an elastic imaging area, and then the lesion is detected and identified in the elastic imaging area, and the lesion area contained in the elastic imaging area is obtained as the lesion area of the image to be processed.
[0040] In the actual processing process, when the image to be processed is identified and processed to obtain the included lesion area, the lesion can be identified in the conventional imaging area first, and then the lesion area in the elastic imaging area is determined according to the mirror processing in the image to be processed, and then the lesion area in the elastic imaging area is used as the lesion area of the image to be processed. The specific processing process of processing the endoscopic image to obtain the lesion area can be referred to Figure 2 , Figure 2 It is a flowchart of the process of obtaining the image change of the lesion area provided in the embodiment of the present application.
[0041] For example, the endoscopic image obtained by ultrasound endoscopy is as follows: Figure 2 The left image in the figure contains invalid information such as equipment information and parameter information. At this time, the image segmentation neural network model built and trained based on nnUnet can be used to identify and obtain the valid image area in the endoscopic image, and the horizontal circumscribed rectangle of the valid image area is taken to crop the endoscopic image with the rectangle to obtain the image to be processed. In the image to be processed, lesion identification and detection are performed by setting a midline in the remaining rectangular valid area to divide the valid area into a conventional imaging area on the left and an elastic imaging area on the right, and then lesion detection is performed in the elastic imaging area to obtain the lesion area.
[0042] In addition, during processing, lesion processing can be performed in the conventional imaging area. At the same time, since the conventional imaging area and the elastic imaging area are symmetrical based on the midline, the lesion area in the elastic imaging area can be determined by the lesion area in the conventional imaging area. In the actual processing process, processing based on this method can improve the accuracy of lesion identification. Since the conventional imaging area is a colorless image (such as a black and white image), and the elastic imaging area is an image with various colors, in actual detection, color will affect the detection of lesions. By first performing detection in the conventional imaging area and then performing symmetric or mirror processing, the accuracy of detection and identification of the lesion area can be improved.
[0043] Step 103, obtaining pixel values of pixel points in the lesion area, and calculating the exploration elasticity value of the lesion area according to the pixel values.
[0044] In one embodiment, after lesion detection and identification processing are performed on the image to be processed to obtain the lesion area, the pixel value of each pixel point in the lesion area is obtained, and then the exploration elasticity value of the lesion area is calculated based on the obtained pixel value, wherein the exploration elasticity value is used to analyze the dangerous situation of the lesion.
[0045] For example, when analyzing and processing the lesion area, reference may be made to Figure 3 , Figure 3It is a flowchart of the steps of obtaining the exploration elasticity value provided in an embodiment of the present application, wherein the steps include steps 301 to 305.
[0046] Step 301, determining the minimum rectangular frame of the lesion area in the image to be processed, and acquiring the pixel values of the color pixels contained in the minimum rectangular frame to obtain the pixel values of the color pixels;
[0047] Step 302, calculating according to the pixel values to obtain the average pixel value of the lesion area;
[0048] Step 303, determining a first coordinate corresponding to the average pixel value in the HSV coordinate system according to the correspondence between the RGB coordinate system and the HSV coordinate system;
[0049] Step 304, performing coordinate system conversion on the first coordinate to obtain a second coordinate in the RGB coordinate system;
[0050] Step 305: Obtain the exploration elasticity value of the lesion area according to the second coordinate.
[0051] Specifically, after identifying the lesion area, the minimum rectangular frame of the lesion area is determined, and the pixel values of the colored pixels contained in the minimum rectangular frame are obtained to obtain the pixel values of each colored pixel in the minimum rectangular frame. Then, calculations are performed based on the obtained pixel values to obtain the average pixel value of the lesion area. Then, based on the correspondence between the RGB coordinate system and the HSV (Hue, Saturation, Value) coordinate system, the first coordinate corresponding to the average pixel value is determined in the HSV coordinate system. Then, the coordinate system is transformed for the first coordinate to obtain the second coordinate in the RGB coordinate system. Finally, the exploration elasticity value of the lesion area is obtained based on the second coordinate.
[0052] For example, when analyzing a lesion, the risk level of the lesion is determined based on the analysis of the pixel values of the lesion area. Therefore, when performing the analysis, the lesion area specifically used for analysis is first determined. The more accurate the determination of the lesion area is, the more accurate the analysis of the lesion will be. Then, the analysis is performed after the lesion area is determined. In the actual processing process, the lesion area is minimized in the elastic imaging area to obtain the smallest rectangular area containing the entire lesion area, which can be referred to Figure 4 , Figure 4 It is a schematic diagram of image processing of the minimum rectangular frame in the lesion area provided in an embodiment of the present application.
[0053] Next, for the obtained minimum rectangular frame containing the lesion area, the pixel values of all the color pixels contained therein are obtained. When determining the color pixels, the specific pixel value (RGB channel value) of each pixel can be used to determine, for example, a threshold is set to determine which pixels belong to the color pixels. For details, refer to Figure 4 , if the pixel points of the minimum rectangular frame are specified, such as the number of pixels contained is 16, and according to the actual analysis, the color pixel points are determined to be Figure 4 All other pixels except point A (area represents pixel points for easy display). Then, the average pixel value is obtained by averaging the pixel values of all color pixels, where the average pixel value is the pixel coordinate composed of the average values corresponding to the three channels R, G, and B.
[0054] Furthermore, when continuing to process according to the obtained average pixel value, the RGB color bar coordinate axis can be obtained. Specifically, the three channels R, G, and B can be used as the three axes of the coordinate axis, and the conversion relationship between the RGB coordinate system and the HSV coordinate system can be established. Then, the first coordinate of the average pixel value can be determined in the HSV coordinate axis.
[0055] Specifically, when calculating to obtain the average pixel value, the calculation formula is:
[0056] R mean =(R1+R 2 +...+R n ) / n;
[0057] G mean =(G1+G 2 +...+G n ) / n;
[0058] B mean =(B1+B 2 +...+B n ) / n;
[0059] Among them, R n , G n , B n Respectively represent the three-channel values of the nth color pixel.
[0060] Furthermore, when converting the average pixel value into the first coordinate in the HSV coordinate system, the conversion method is first determined, wherein the specific conversion method is: let (R, G, B) be the red, green and blue coordinates of a color, respectively, and their values are real numbers between 0 and 1, max is the maximum value of the R, G, B values, and min is the minimum value of the R, G, B values. At this time, the conversion formula is:
[0061]
[0062]
[0063] v=max.
[0064] Then, through the conversion process, the first coordinate can be obtained as (H r ,S g ,V b ), then find the nearest coordinate (expressed by the middle coordinate) (H0, S0, V0) in the HSV coordinate system, and finally perform coordinate conversion based on the correspondence between the RGB coordinate system and the HSV coordinate system to obtain the second coordinate (R0, G0, B0) of the first coordinate in the RGB coordinate system.
[0065] When determining the intermediate coordinates in the HSV coordinate system, it includes: determining the third coordinate of the average pixel value in the RGB coordinate system, and determining the fourth coordinate corresponding to the third coordinate in the HSV coordinate system according to the corresponding relationship; performing distance calculation in the HSV coordinate system, and setting the coordinate closest to the fourth coordinate as the first coordinate. By determining the coordinates of the calculated average pixel value in the RGB coordinate system, and then obtaining the coordinates of the average pixel value in the HSV coordinate system according to the conversion method of the two coordinate systems, since the mapped coordinates are not necessarily at the marked position, the coordinates corresponding to the minimum distance in the HSV coordinate system are found through the minimum distance as the first coordinate corresponding to the average pixel value in the HSV coordinate system.
[0066] Furthermore, when converting the first coordinate to the second coordinate, the conversion method may be as follows:
[0067] 0≤H0<360, 0≤S0≤1, 0≤V0≤1;
[0068] C0=V0*S0;
[0069]
[0070] M0=V0*C;
[0071]
[0072] (R0,G0,B0)=((R ′ +M0)*255,(G ′ +M0)*255,(B ′ +M0)*255).
[0073] Finally, the exploration elasticity value of the currently detected lesion area is determined according to the obtained second coordinate. Specifically, it includes: determining the position information of the second coordinate in the RGB color card, and calculating the exploration elasticity value of the lesion area according to the position information. That is, when determining the exploration elasticity value, the position of the second coordinate can be determined in the 255 color card, and then the exploration elasticity value is determined according to the position.
[0074] For example, find the position of the second coordinate in the 255-color card, assuming it is the pth position, then the exploration elasticity value γ determined at this time is γ=p / 255, γ∈[0,1].
[0075] Step 104: determining the puncture area of the lesion contained in the endoscopic image according to the exploration elasticity value.
[0076] In one embodiment, after determining the exploratory elasticity value of the lesion contained in the currently acquired endoscopic image through analysis and calculation, the puncture area of the lesion contained in the endoscopic image can be determined by comparison based on the exploratory elasticity value. Further, when determining the puncture area of the lesion, the danger level of the lesion can be determined first, and then when it is determined that the puncture area needs to be determined, the puncture area of the lesion can be determined again based on the exploratory elasticity value, wherein the danger level includes at least benign and malignant.
[0077] Furthermore, when determining the position in the lesion area that can be used for puncture, it specifically includes: determining the lesion risk level of the lesion contained in the endoscopic image according to the exploration elasticity value; when it is determined that the lesion risk level is higher than the preset level, equidistantly dividing the minimum rectangular frame to obtain a plurality of sub-areas; calculating the elastic exploration value corresponding to the sub-area, and determining the puncture area in the sub-area according to the exploration elasticity value.
[0078] Specifically, by obtaining the cutoff value between benign and malignant, the obtained exploration elasticity value is compared with the cutoff value. If the exploration elasticity value is greater than the cutoff value, it is determined to be benign, otherwise it is determined to be malignant. Of course, for the danger level, in addition to the binary classification of benign and malignant, more levels can be set according to actual needs, and there is no specific limitation.
[0079] As for the dividing values of different levels, they can be obtained through pre-training and different levels can be set according to needs. For example, only two levels, malignant and benign, are needed for binary classification. For three or more classifications, corresponding labeling processing is required. By labeling the risk level of lesions in the training data, the constructed classification model is trained and optimized, and different classification processing can be achieved, that is, the division of different risk levels can be completed.
[0080] When determining the puncture area, the obtained exploration elasticity value is first compared with the preset comparison data, wherein the comparison data may be a preset level. When it is determined that the current danger level is higher than the preset level, the minimum rectangular frame containing the lesion area is divided into several sub-areas by equal intervals. For details, please refer to Figure 4 Then, the elastic exploration value corresponding to each sub-region is determined, and the puncture area is determined in the sub-region.
[0081] That is, when further processing is performed, the lesion area is further refined, such as block processing, and then the exploration elasticity values of different area blocks are calculated again to complete the determination of the position where the lesion area can be punctured. Specifically, when judging the sub-areas, taking the judgment scenario of benign and malignant classification as an example, the boundary value of the exploration elasticity value between benign and malignant is γ0, γ m is the exploration elasticity value of the mth sub-region, if γ m >γ0, it indicates that it is more likely to obtain a negative tissue strip by puncturing in this compartment. At the same time, this area can be represented by blue, which means it is negative. m ≤γ0, it indicates that the possibility of obtaining a positive tissue strip by puncturing in this compartment is greater, and this area can be represented by red, indicating that it is positive.
[0082] Based on this, the lesion area is segmented into blocks to obtain several small blocks, and then more accurate puncture recommendations can be provided by analyzing and processing each small block.
[0083] In summary, the present application discloses a method for detecting the puncture area of an endoscopic image. When analyzing and processing the endoscopic image collected by an ultrasonic endoscope, the endoscopic image is first preprocessed to obtain an image to be processed that does not contain invalid information, and then the lesion contained in the image to be processed is identified to obtain the corresponding lesion area, and then the pixel value of each pixel point in the lesion area is obtained to calculate the corresponding exploration elasticity value, and finally the puncture area of the lesion contained in the endoscopic image is determined according to the exploration elasticity value. The lesion is automatically identified under elastic imaging, and the exploration elasticity value of the entire lesion area is calculated using the color pixel value, and then according to the obtained exploration elasticity value and the elasticity value threshold obtained in advance, when it is determined that the endoscopic image contains a lesion, the puncture area is accurately determined on the lesion.
[0084] According to the method described in the above embodiment, this embodiment will be further described from the perspective of the puncture area detection device of the endoscopic image. The puncture area detection device of the endoscopic image can be implemented as an independent entity or integrated in an electronic device, such as a terminal. The terminal may include a mobile phone, a tablet computer, etc.
[0085] See also Figure 5 , Figure 5 is a structural schematic diagram of a puncture area detection device for an endoscopic image provided in an embodiment of the present application, such as Figure 5 As shown, the puncture area detection device 500 of the endoscopic image provided in the embodiment of the present application includes:
[0086] The image processing module 501 is used to obtain the endoscopic image collected by the ultrasonic endoscope and process the endoscopic image to obtain an image to be processed;
[0087] The lesion recognition module 502 is used to perform lesion recognition processing on the image to be processed to obtain the lesion area of the endoscopic image;
[0088] The calculation processing module 503 is used to obtain the pixel values of the pixel points in the lesion area, and calculate the exploration elasticity value of the lesion area according to the pixel values;
[0089] The region determination module 504 is used to determine the puncture region of the lesion contained in the endoscopic image according to the exploration elasticity value.
[0090] In one embodiment, the image processing module 501 is further used for:
[0091] Acquire the endoscopic image collected by the ultrasonic endoscope, and perform information recognition on the endoscopic image to obtain invalid information and image information;
[0092] Invalid information is cropped from the endoscopic image to obtain an image to be processed containing image information.
[0093] In one embodiment, the lesion identification module 502 is further used to:
[0094] Determine the center line in the image to be processed, and divide the image to be processed into regions according to the center line to obtain a conventional imaging region and an elastic imaging region;
[0095] The lesion is identified in the elastic imaging area to obtain the lesion area of the image to be processed.
[0096] In one embodiment, the calculation processing module 503 is further used for:
[0097] Determine the minimum rectangular frame of the lesion area in the image to be processed, and obtain the pixel values of the color pixels contained in the minimum rectangular frame to obtain the pixel values of the color pixels;
[0098] Calculate according to the pixel value to obtain the average pixel value of the lesion area;
[0099] According to the correspondence between the RGB coordinate system and the HSV coordinate system, determine the first coordinate corresponding to the average pixel value in the HSV coordinate system;
[0100] Perform coordinate system transformation on the first coordinate to obtain a second coordinate in the RGB coordinate system;
[0101] According to the second coordinate, the exploration elasticity value of the lesion area is obtained.
[0102] In one embodiment, the calculation processing module 503 is further used for:
[0103] Determine a third coordinate of the average pixel value in the RGB coordinate system, and determine a fourth coordinate corresponding to the third coordinate in the HSV coordinate system according to the corresponding relationship;
[0104] When calculating the distance in the HSV coordinate system, the coordinate closest to the fourth coordinate is set as the first coordinate.
[0105] In one embodiment, the calculation processing module 503 is further used for:
[0106] The position information of the second coordinate in the RGB color card is determined, and the exploration elasticity value of the lesion area is calculated based on the position information.
[0107] In one embodiment, the region determination module 504 is further configured to:
[0108] According to the exploration elasticity value, the lesion risk level of the lesion included in the endoscopic image is determined;
[0109] When it is determined that the risk level of the lesion is higher than the preset level, the minimum rectangular frame is segmented equidistantly to obtain several sub-regions;
[0110] The elastic exploration value corresponding to the sub-region is calculated, and the puncture region is determined in the sub-region according to the exploration elastic value.
[0111] Also, see Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device may be a mobile terminal such as a smart phone, a tablet computer, or the like. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 602. The processor 601 is electrically connected to the memory 602.
[0112] The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 600 and processes data by running or loading applications stored in the memory 602 and calling data stored in the memory 602, thereby monitoring the electronic device 600 as a whole.
[0113] In this embodiment, the processor 601 in the electronic device 600 will load the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 will run the application stored in the memory 602, thereby implementing any step in the puncture area detection method of the endoscopic image provided in the above embodiment.
[0114] The electronic device 600 can implement the steps in any embodiment of the puncture area detection method of the endoscopic image provided in the embodiments of the present application. Therefore, it can achieve the beneficial effects that can be achieved by any puncture area detection method of the endoscopic image provided in the embodiments of the present application. Please refer to the previous embodiments for details and will not be repeated here.
[0115] See also Figure 7 , Figure 7 is another structural schematic diagram of an electronic device provided in an embodiment of the present application, such as Figure 7 As shown, Figure 7 The specific structural block diagram of the electronic device provided in the embodiment of the present application is shown, and the electronic device can be used to implement the puncture area detection method of the endoscopic image provided in the above embodiment. The electronic device 700 can be a mobile terminal such as a smart phone or a laptop computer.
[0116] The RF circuit 710 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 710 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 710 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.
[0117] The memory 720 can be used to store software programs and modules, such as the program instructions / modules corresponding to the puncture area detection method of the endoscopic image in the above-mentioned embodiment. The processor 780 executes various functional applications and the puncture area detection method of the endoscopic image by running the software programs and modules stored in the memory 720.
[0118] The memory 720 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 720 may further include a memory remotely arranged relative to the processor 780, and these remote memories may be connected to the electronic device 700 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0119] The input unit 730 can be used to receive uploaded digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 730 may include a touch-sensitive surface 731 and other input devices 732. The touch-sensitive surface 731, also known as a touch display screen or touchpad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 731), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 731 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch-sensitive surface 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
[0120] The display unit 740 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 700, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 740 may include a display panel 741, and optionally, the display panel 741 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 731 may cover the display panel 741, and when the touch-sensitive surface 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of the touch event, and then the processor 780 provides corresponding visual output on the display panel 741 according to the type of the touch event. Although in the figure, the touch-sensitive surface 731 and the display panel 741 are implemented as two independent components to implement input and output functions, in some embodiments, the touch-sensitive surface 731 and the display panel 741 can be integrated to implement input and output functions.
[0121] The electronic device 700 may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may generate an interrupt when the flip cover is closed or closed. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 700, they will not be repeated here.
[0122] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the electronic device 700. The audio circuit 760 can transmit the electrical signal converted from the received audio data to the speaker 761, which is converted into a sound signal for output; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, and then the audio data is output to the processor 780 for processing, and then sent to another terminal through the RF circuit 710, or the audio data is output to the memory 720 for further processing. The audio circuit 760 may also include an earplug jack to provide communication between an external headset and the electronic device 700.
[0123] The electronic device 700 can help the user receive requests, send information, etc. through the transmission module 770 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 770 is shown in the figure, it is understandable that it is not a necessary component of the electronic device 700 and can be omitted as needed without changing the essence of the invention.
[0124] The processor 780 is the control center of the electronic device 700. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 720, and calling data stored in the memory 720, it executes various functions of the electronic device 700 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 780 may include one or more processing cores; in some embodiments, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 780.
[0125] The electronic device 700 also includes a power supply 790 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 790 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0126] Although not shown, the electronic device 700 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors to implement any step of the puncture area detection method of the endoscopic image provided in the above embodiment.
[0127] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.
[0128] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present application provides a storage medium, which stores multiple instructions, and when the instructions are executed by the processor, any step in the puncture area detection method of the endoscopic image provided in the above embodiments can be implemented.
[0129] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0130] Since the instructions stored in the storage medium can execute the steps in any embodiment of the puncture area detection method for endoscopic images provided in the embodiments of the present application, the beneficial effects that can be achieved by any puncture area detection method for endoscopic images provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0131] The above is a detailed introduction to the puncture area detection method, device, electronic device and storage medium of an endoscopic image provided by the embodiment of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for technicians in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application. In addition, for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made, and these improvements and modifications are also regarded as the scope of protection of the present application.
Claims
1. A method for detecting puncture areas in endoscopic images, It is characterized in that include: Acquiring an endoscopic image collected by an ultrasonic endoscope, and processing the endoscopic image to obtain an image to be processed; Performing lesion recognition processing on the image to be processed to obtain the lesion area of the endoscopic image; Acquiring pixel values of pixel points in the lesion area, and calculating the exploration elasticity value of the lesion area according to the pixel values; The puncture area of the lesion contained in the endoscopic image is determined according to the exploration elasticity value.
2. The method according to claim 1, It is characterized in that The step of acquiring an endoscopic image collected by an ultrasonic endoscope and processing the endoscopic image to obtain an image to be processed includes: Acquire an endoscopic image collected by an ultrasonic endoscope, and perform information recognition on the endoscopic image to obtain invalid information and image information; The invalid information is cropped in the endoscopic image to obtain an image to be processed containing the image information.
3. The method according to claim 1, It is characterized in that The step of performing lesion recognition processing on the image to be processed to obtain the lesion area of the endoscopic image includes: Determining a center line in the image to be processed, and dividing the image to be processed into regions according to the center line to obtain a conventional imaging region and an elastic imaging region; Lesion identification is performed on the elastic imaging area to obtain the lesion area of the image to be processed.
4. The method according to claim 1, It is characterized in that The step of obtaining pixel values of pixel points in the lesion area and calculating the exploration elasticity value of the lesion area according to the pixel values includes: Determine a minimum rectangular frame of the lesion area in the image to be processed, and obtain pixel values of color pixels contained in the minimum rectangular frame to obtain pixel values of the color pixels; Calculating according to the pixel values to obtain an average pixel value of the lesion area; According to the correspondence between the RGB coordinate system and the HSV coordinate system, determining a first coordinate corresponding to the average pixel value in the HSV coordinate system; Performing coordinate system conversion on the first coordinate to obtain a second coordinate in the RGB coordinate system; According to the second coordinate, the exploration elasticity value of the lesion area is obtained.
5. The method according to claim 4, It is characterized in that The determining the first coordinate corresponding to the average pixel value in the HSV coordinate system includes: Determine a third coordinate of the average pixel value in the RGB coordinate system, and determine a fourth coordinate corresponding to the third coordinate in the HSV coordinate system according to the corresponding relationship; Distance calculation is performed in the HSV coordinate system, and the coordinate closest to the fourth coordinate is set as the first coordinate.
6. The method according to claim 1, It is characterized in that The step of obtaining the exploration elasticity value of the lesion area according to the second coordinate includes: The position information of the second coordinate in the RGB color card is determined, and the exploration elasticity value of the lesion area is calculated according to the position information.
7. The method according to claim 4, It is characterized in that Determining the puncture area of the lesion contained in the endoscopic image according to the exploration elasticity value includes: determining a lesion risk level of a lesion included in the endoscopic image according to the exploration elasticity value; When it is determined that the risk level of the lesion is higher than a preset level, the minimum rectangular frame is segmented equidistantly to obtain a plurality of sub-regions; The elastic exploration value corresponding to the sub-region is calculated, and the puncture region is determined in the sub-region according to the exploration elasticity value.
8. A puncture area detection device for an endoscopic image, It is characterized in that include: An image processing module is used to obtain an endoscopic image collected by an ultrasonic endoscope and process the endoscopic image to obtain an image to be processed; A lesion recognition module, used for performing lesion recognition processing on the image to be processed to obtain the lesion area of the endoscopic image; A calculation processing module, used for obtaining pixel values of pixel points in the lesion area, and calculating the exploration elasticity value of the lesion area according to the pixel values; The region determination module is used to determine the puncture region of the lesion contained in the endoscopic image according to the exploration elasticity value.
9. An electronic device, It is characterized in that The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 7 are implemented.
