Endoscope diagnosis system and method based on image analysis
Through image analysis technology, the endoscopy is evaluated and defect positioning is carried out, and combined with the repair plan of the big data network, the problem of defect diagnosis and repair in the use of endoscopy is solved, and medical efficiency and diagnostic accuracy are improved.
Patent Information
- Application Number
- CN202411350562.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-26
AI Technical Summary
During use, endoscopes are prone to physical damage, chemical corrosion and aging wear, resulting in a decline in image quality. It is difficult for the existing technology to quickly and accurately diagnose and repair defects, affecting medical efficiency.
The diagnostic method based on image analysis is adopted to locate and classify defects through structural participation evaluation, surface image acquisition, image preprocessing and feature extraction, and repair them according to the big data network retrieval and repair methods.
It realizes rapid and accurate diagnosis and repair of endoscopic defects, improves the reliability of medical tools and the work efficiency of doctors, and ensures the accuracy of diagnosis.
Smart Images

Figure CN119251187A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of endoscope abnormality diagnosis, and in particular to an endoscope diagnosis system and a diagnosis method based on image analysis. Background Art
[0002] An endoscope is a medical instrument used to examine and treat internal organs or structures of the human body. It usually consists of a long, flexible tube with a small camera and light source at the front end and a display at the back end. Doctors can observe real-time images of the body through the endoscope to perform diagnosis, biopsy, surgery and other operations. In the process of endoscope operation, physical damage is inevitable. For example, when using an endoscope, if the endoscope lens or housing collides or rubs against a hard object, it may cause scratches, cracks or other physical damage; or excessive bending or twisting of the endoscope may cause fiber breakage or damage to the endoscope structure. Chemical corrosion may also occur. For example, if inappropriate chemicals are used during the disinfection or cleaning process of the endoscope, the lens, housing or internal optical components may be corroded, resulting in coating shedding or material deterioration. Or long-term exposure to a humid environment, especially if it is not fully dried after use, may cause oxidation and corrosion of the lens surface or internal optical components, thereby affecting image quality. Since the endoscope is a medical device, if defects occur during use, resulting in deviations during the endoscope process, it may affect the doctor's diagnosis of the patient, so it is necessary to diagnose defects in the endoscope. Image analysis methods can observe whether the endoscope has physical damage, chemical corrosion, or aging wear after use. It is more accurate and efficient than manual inspection to check whether the endoscope has defects. Summary of the invention
[0003] The present invention overcomes the deficiencies of the prior art and provides an endoscopic diagnosis system and a diagnosis method based on image analysis.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is:
[0005] A first aspect of the present invention provides an endoscopic diagnosis method based on image analysis, comprising the following steps:
[0006] determining a usage arrangement of a target endoscope, performing a structural engagement assessment on the target endoscope based on the usage arrangement of the target endoscope, and structurally classifying the target endoscope after the structural engagement assessment;
[0007] Acquiring a surface image of a necessary structure of a target endoscope in a target endoscope, and performing image preprocessing and image feature extraction processing on the surface image of the necessary structure of the target endoscope after the surface image is acquired, so as to obtain surface image feature data of the necessary structure of the target endoscope;
[0008] Based on the surface image feature data of the necessary structure of the target endoscope, the necessary structure of the target endoscope is defect located, defect analyzed and defect classified, and the necessary structure of the target endoscope is defect repaired after the defect analysis and defect classification results.
[0009] Further, in a preferred embodiment of the present invention, the use arrangement of the target endoscope is determined, the target endoscope is evaluated for structural participation based on the use arrangement of the target endoscope, and the target endoscope is structurally classified after the structural participation evaluation, specifically:
[0010] The endoscope that needs to be subjected to image analysis and diagnosis is calibrated as the target endoscope, and the usage scenario of the target endoscope is obtained;
[0011] Obtaining instructions for use of a target endoscope, and obtaining a structure of the target endoscope based on the instructions for use of the target endoscope;
[0012] In a usage scenario of a target endoscope, obtaining a usage arrangement of the target endoscope, wherein the usage arrangement of the target endoscope includes an endoscopy position, an endoscopy scheme, and an endoscopy time of the target endoscope;
[0013] Obtaining a big data network, and obtaining functions of different structures of the target endoscope in the instructions for use of the target endoscope, importing the functions of the different structures of the endoscope and the use arrangement of the endoscope into the big data network for combination, and after the combination, retrieving the participation of the different structures of the target endoscope in the use arrangement through the big data network, and marking it as the first participation;
[0014] A first participation standard threshold is preset, and the relationship between the first participation of different structures of the target endoscope and the first participation standard threshold is determined; the target endoscope structure whose first participation is greater than the first participation standard threshold is calibrated as a necessary structure of the target endoscope; and the target endoscope structure whose first participation is less than the first participation standard threshold is calibrated as a non-essential structure of the target endoscope.
[0015] Further, in a preferred embodiment of the present invention, the surface image of the necessary structure of the target endoscope is acquired in the target endoscope, and after the surface image is acquired, the surface image of the necessary structure of the target endoscope is subjected to image preprocessing and image feature extraction processing to obtain the surface image feature data of the necessary structure of the target endoscope, specifically:
[0016] Acquire an image acquisition device, and based on the image acquisition device, acquire a surface image of a necessary structure of a target endoscope, calibrate it as a target surface image, and simultaneously calculate pixel values of all pixel points in the target surface image;
[0017] Introducing a median filter, wherein the median filter includes a median filter sliding window, and importing the target surface image into the median filter;
[0018] The target surface image is traversed through a median filter sliding window in a median filter, and based on the pixel values of all the pixel points in the target surface image, a median value of the pixel values of the pixel points of the target surface image in the median filter sliding window is used as a filter output value during the process of the median filter sliding window traversing the target surface image, and the filter output value is applied to the target surface image to obtain a median filter surface image;
[0019] Acquire a CLAHE algorithm, apply the CLAHE algorithm to the median filter surface image, obtain an adaptive histogram of the median filter surface image, simultaneously obtain an image contrast of the median filter surface image, and preset an image contrast threshold;
[0020] The image contrast of the median filter surface image is analyzed. If there is an area in the median filter surface image where the image contrast is not within the image contrast threshold, the adaptive histogram of the median filter surface image is adaptively stretched so that there is no area in the median filter surface image where the image contrast is not within the image contrast threshold, thereby obtaining a median filter surface image with qualified contrast.
[0021] The median filter contrast qualified surface image is subjected to image correction and image feature extraction processing to obtain the surface image feature data of the necessary structure of the target endoscope.
[0022] Further, in a preferred embodiment of the present invention, the median filter contrast qualified surface image is subjected to image correction and image feature extraction processing to obtain the surface image feature data of the necessary structure of the target endoscope, specifically:
[0023] Acquire an image color temperature correction device, obtain the color temperature parameters of the median filter contrast qualified surface image in the image color temperature correction device, and retrieve the color clarity of the image under different color temperature parameters when performing image analysis on the endoscope based on the big data network;
[0024] Based on the color clarity of the image at different color temperatures when the endoscope is analyzed, the color temperature parameters of the image of the endoscope when the color clarity is the highest are obtained, calibrated as the optimal color temperature parameters, and the image correction device is controlled to adjust the color temperature parameters of the median filter contrast qualified surface image to the optimal color temperature parameters, so as to obtain the surface image of the necessary structure of the target endoscope;
[0025] An edge detection algorithm is introduced, an image gradient of a target endoscope necessary structure surface image is calculated based on the edge detection algorithm, and a standard image gradient threshold of the target endoscope necessary structure surface image is preset;
[0026] In the target endoscope necessary structure surface image, the target endoscope necessary structure surface image whose image gradient is not maintained within the image standard gradient threshold is calibrated as a background image, and the target endoscope necessary structure surface image whose image gradient is maintained within the image standard gradient threshold is calibrated as a foreground image;
[0027] The shape features of the foreground image within the target endoscope necessary structure surface image are calculated, wherein the shape features include the number of pixels, boundary length and geometric moment of the foreground image, and the target endoscope necessary structure surface image feature data is obtained according to the shape features of the foreground image.
[0028] Further, in a preferred embodiment of the present invention, based on the surface image feature data of the necessary structure of the target endoscope, the necessary structure of the target endoscope is defect-located, defect-analyzed and defect-classified, and the necessary structure of the target endoscope is defect-repaired after the defect analysis and defect classification results are obtained, specifically:
[0029] Based on the instructions for use of the target endoscope, obtain structural specification parameters of the necessary structure of the target endoscope, and based on the structural specification parameters of the necessary structure of the target endoscope, obtain surface image feature standard data of the necessary structure of the target endoscope;
[0030] Calculating the Mahalanobis distance between the target endoscope necessary structure surface image feature data and the target endoscope necessary structure surface image feature standard data, and presetting the Mahalanobis distance interval;
[0031] If the Mahalanobis distance between the target endoscope necessary structure surface image feature data and the target endoscope necessary structure surface image feature standard data is maintained within the Mahalanobis distance interval, the target endoscope necessary structure is calibrated as a qualified endoscope necessary structure, and the target endoscope corresponding to the qualified endoscope necessary structure is evaluated as a qualified endoscope;
[0032] If the Mahalanobis distance between the target endoscope necessary structure surface image feature data and the target endoscope necessary structure surface image feature standard data is not maintained within the Mahalanobis distance interval, the target endoscope necessary structure is calibrated as a surface defect endoscope necessary structure, and the target endoscope necessary structure surface image feature data is calibrated as feature data to be analyzed;
[0033] Based on the target endoscope necessary structure surface image, a foreground image of the surface image of the surface defect endoscope necessary structure is obtained, and the foreground image is analyzed in combination with the feature data to be analyzed to locate the defect position of the surface defect endoscope necessary structure and mark it as the target defect position;
[0034] Based on the feature data to be analyzed, the shape features of the foreground image of the surface image of the necessary structure of the surface defect endoscope are analyzed to obtain the surface defect depth and surface defect area of the target defect position;
[0035] The surface defect depth and surface defect area of the target defect position are subjected to defect threshold analysis, and the necessary structures of the surface defect endoscope are subjected to defect classification and defect repair based on the defect threshold analysis results.
[0036] Furthermore, in a preferred embodiment of the present invention, the surface defect depth and surface defect area of the target defect position are subjected to defect threshold analysis, and the necessary structure of the surface defect endoscope is subjected to defect classification and defect repair based on the defect threshold analysis result, specifically:
[0037] The surface dangerous defect depth and surface dangerous defect area of the target defect position are preset. If the surface defect depth of the target defect position is greater than the surface dangerous defect depth, the target endoscope corresponding to the necessary structure of the surface defect endoscope is scrapped;
[0038] If the surface defect depth of the target defect position is less than the surface dangerous defect depth, the surface defect endoscope necessary structure is calibrated as a type of repairable endoscope necessary structure;
[0039] If the surface defect area of the target defect position is larger than the surface dangerous defect area, the target endoscope corresponding to the necessary structure of the surface defect endoscope is scrapped;
[0040] If the surface defect area of the target defect position is smaller than the surface dangerous defect area, the surface defect endoscope necessary structure is calibrated as a Class II repairable endoscope necessary structure;
[0041] Based on the big data network, the repair methods and protection methods for the target defect positions corresponding to the first type of repairable endoscope necessary structure and the second type of repairable endoscope necessary structure are retrieved and output respectively, so that the surface defect endoscope necessary structure corresponding to the target defect position is calibrated as a qualified endoscope necessary structure, and the target endoscope corresponding to the qualified endoscope necessary structure is evaluated as a qualified endoscope.
[0042] The second aspect of the present invention further provides an endoscopic diagnostic system based on image analysis, the endoscopic diagnostic system comprising a memory and a processor, the memory storing an endoscopic diagnostic method, and when the endoscopic diagnostic method is executed by the processor, the following steps are implemented:
[0043] determining a usage arrangement of a target endoscope, performing a structural engagement assessment on the target endoscope based on the usage arrangement of the target endoscope, and structurally classifying the target endoscope after the structural engagement assessment;
[0044] Acquiring a surface image of a necessary structure of a target endoscope in a target endoscope, and performing image preprocessing and image feature extraction processing on the surface image of the necessary structure of the target endoscope after the surface image is acquired, so as to obtain surface image feature data of the necessary structure of the target endoscope;
[0045] Based on the surface image feature data of the necessary structure of the target endoscope, the necessary structure of the target endoscope is defect located, defect analyzed and defect classified, and the necessary structure of the target endoscope is defect repaired after the defect analysis and defect classification results.
[0046] The present invention solves the technical defects existing in the background technology, and has the following beneficial effects: the structural participation evaluation of the endoscope is performed, and the structure of the endoscope that needs to be diagnosed for defects is determined based on the structural participation evaluation result, and the surface image analysis and preprocessing of the structure are performed, and finally the defect location, defect analysis, defect classification and defect repair of the endoscope are performed based on the results of the analysis and preprocessing to obtain a qualified endoscope. The present invention can find the defect position of the endoscope by performing image analysis on the endoscope, and repair the defects of the endoscope according to the type of defect position, thereby preventing the error of the endoscope from increasing during use, providing doctors with better tool services when using it, and helping to improve the medical efficiency and medical effect of doctors. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, drawings of other embodiments can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A flow chart showing an endoscopic diagnostic method based on image analysis;
[0049] Figure 2 A flow chart of a method for image preprocessing and image feature extraction processing of a surface image of a necessary structure of a target endoscope is shown;
[0050] Figure 3 A procedural view of an endoscopic diagnostic system based on image analysis is shown. DETAILED DESCRIPTION
[0051] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0053] Figure 1 A flow chart of an endoscopic diagnosis method based on image analysis is shown, comprising the following steps:
[0054] S102: determining a usage arrangement of a target endoscope, performing a structural engagement evaluation on the target endoscope based on the usage arrangement of the target endoscope, and structurally classifying the target endoscope after the structural engagement evaluation;
[0055] S104: acquiring a surface image of the necessary structure of the target endoscope in the target endoscope, and performing image preprocessing and image feature extraction processing on the surface image of the necessary structure of the target endoscope after the surface image is acquired, to obtain surface image feature data of the necessary structure of the target endoscope;
[0056] S106: Based on the surface image feature data of the necessary structure of the target endoscope, defect location, defect analysis and defect classification are performed on the necessary structure of the target endoscope, and defect repair is performed on the necessary structure of the target endoscope after the defect analysis and defect classification results are obtained.
[0057] Further, in a preferred embodiment of the present invention, the use arrangement of the target endoscope is determined, the target endoscope is evaluated for structural participation based on the use arrangement of the target endoscope, and the target endoscope is structurally classified after the structural participation evaluation, specifically:
[0058] The endoscope that needs to be subjected to image analysis and diagnosis is calibrated as the target endoscope, and the usage scenario of the target endoscope is obtained;
[0059] Obtaining instructions for use of a target endoscope, and obtaining a structure of the target endoscope based on the instructions for use of the target endoscope;
[0060] In a usage scenario of a target endoscope, obtaining a usage arrangement of the target endoscope, wherein the usage arrangement of the target endoscope includes an endoscopy position, an endoscopy scheme, and an endoscopy time of the target endoscope;
[0061] Obtaining a big data network, and obtaining functions of different structures of the target endoscope in the instructions for use of the target endoscope, importing the functions of the different structures of the endoscope and the use arrangement of the endoscope into the big data network for combination, and after the combination, retrieving the participation of the different structures of the target endoscope in the use arrangement through the big data network, and marking it as the first participation;
[0062] A first participation standard threshold is preset, and the relationship between the first participation of different structures of the target endoscope and the first participation standard threshold is determined; the target endoscope structure whose first participation is greater than the first participation standard threshold is calibrated as a necessary structure of the target endoscope; and the target endoscope structure whose first participation is less than the first participation standard threshold is calibrated as a non-essential structure of the target endoscope.
[0063] It should be noted that after obtaining the target endoscope, the target endoscope is composed of multiple different structures, mainly including a long and flexible tube, a small camera at the front end of the tube, a light source, and a display at the rear end of the tube, and some minor structures such as labels and brackets. Different institutions have different levels of importance, and the judgment of importance depends on the involvement of the endoscope during use. When problems occur in endoscope structures with a high degree of involvement, such as physical damage or chemical corrosion, it is necessary to repair the defects of these structures, that is, the necessary structures of the target endoscope. For example, a long and flexible tube, a small camera at the front end of the tube, a light source, and a display at the rear end of the tube are usually necessary structures of the target endoscope. The classification of the importance of the structure of the target endoscope needs to be determined according to the use arrangement of the target endoscope. The use arrangement of the endoscope needs to be determined by the use scenario of the endoscope. Some use arrangements may not require the use of some structures. For example, when examining the digestive tract, a colonoscope, a gastroscope, etc. are needed. Different mirrors are used to examine different parts, that is, the use arrangements are different. In the big data network, the participation of endoscopes in different usage arrangements can be retrieved, and the structures can be classified according to the participation to obtain the necessary structures and non-essential structures of the target endoscope.
[0064] Further, in a preferred embodiment of the present invention, based on the surface image feature data of the necessary structure of the target endoscope, the necessary structure of the target endoscope is defect-located, defect-analyzed and defect-classified, and the necessary structure of the target endoscope is defect-repaired after the defect analysis and defect classification results are obtained, specifically:
[0065] Based on the instructions for use of the target endoscope, obtain structural specification parameters of the necessary structure of the target endoscope, and based on the structural specification parameters of the necessary structure of the target endoscope, obtain surface image feature standard data of the necessary structure of the target endoscope;
[0066] Calculating the Mahalanobis distance between the target endoscope necessary structure surface image feature data and the target endoscope necessary structure surface image feature standard data, and presetting the Mahalanobis distance interval;
[0067] If the Mahalanobis distance between the target endoscope necessary structure surface image feature data and the target endoscope necessary structure surface image feature standard data is maintained within the Mahalanobis distance interval, the target endoscope necessary structure is calibrated as a qualified endoscope necessary structure, and the target endoscope corresponding to the qualified endoscope necessary structure is evaluated as a qualified endoscope;
[0068] If the Mahalanobis distance between the target endoscope necessary structure surface image feature data and the target endoscope necessary structure surface image feature standard data is not maintained within the Mahalanobis distance interval, the target endoscope necessary structure is calibrated as a surface defect endoscope necessary structure, and the target endoscope necessary structure surface image feature data is calibrated as feature data to be analyzed;
[0069] Based on the target endoscope necessary structure surface image, a foreground image of the surface image of the surface defect endoscope necessary structure is obtained, and the foreground image is analyzed in combination with the feature data to be analyzed to locate the defect position of the surface defect endoscope necessary structure and mark it as the target defect position;
[0070] Based on the feature data to be analyzed, the shape features of the foreground image of the surface image of the necessary structure of the surface defect endoscope are analyzed to obtain the surface defect depth and surface defect area of the target defect position.
[0071] It should be noted that after the endoscope obtains the surface image feature data, it is necessary to judge whether there are defects on the surface of the endoscope according to the surface image feature data, including but not limited to physical damage, chemical corrosion, etc. The Mahalanobis distance between the surface image feature data and the standard data can be calculated to judge whether there are defects on the surface of the endoscope. The Mahalanobis distance between the data reflects the similarity between the data. The smaller the Mahalanobis distance, the higher the similarity. If the Mahalanobis distance between the surface image feature data and the standard data is greater than the preset value, that is, it is not within the Mahalanobis distance interval, it is judged that the similarity between the data is low. Since the necessary structure of the endoscope under the standard data is intact and the similarity between the data is low, it is judged that the necessary structure of the target endoscope has defects. The foreground image of the surface image of the necessary structure of the target endoscope is obtained, and the foreground image is the image of the necessary structure in the surface image, and the position of the defect in the necessary structure can be determined in combination with the feature data to be analyzed, and marked as the target defect position. There may be many types of defects at the target defect position, and different defect types correspond to different defect repair schemes. First, the type of defect needs to be determined at the target defect position. Since physical damage is easier to judge, it is necessary to first perform defect detection on the physical damage level of the necessary structures of the endoscope. The surface defect depth and area of the target defect position are determined based on the characteristic data to be analyzed, and the corresponding defect classification and repair are performed based on the surface defect depth and area.
[0072] Furthermore, in a preferred embodiment of the present invention, the surface defect depth and surface defect area of the target defect position are subjected to defect threshold analysis, and the necessary structure of the surface defect endoscope is subjected to defect classification and defect repair based on the defect threshold analysis result, specifically:
[0073] The surface dangerous defect depth and surface dangerous defect area of the target defect position are preset. If the surface defect depth of the target defect position is greater than the surface dangerous defect depth, the target endoscope corresponding to the necessary structure of the surface defect endoscope is scrapped;
[0074] If the surface defect depth of the target defect position is less than the surface dangerous defect depth, the surface defect endoscope necessary structure is calibrated as a type of repairable endoscope necessary structure;
[0075] If the surface defect area of the target defect position is larger than the surface dangerous defect area, the target endoscope corresponding to the necessary structure of the surface defect endoscope is scrapped;
[0076] If the surface defect area of the target defect position is smaller than the surface dangerous defect area, the surface defect endoscope necessary structure is calibrated as a Class II repairable endoscope necessary structure;
[0077] Based on the big data network, the repair methods and protection methods for the target defect positions corresponding to the first type of repairable endoscope necessary structure and the second type of repairable endoscope necessary structure are retrieved and output respectively, so that the surface defect endoscope necessary structure corresponding to the target defect position is calibrated as a qualified endoscope necessary structure, and the target endoscope corresponding to the qualified endoscope necessary structure is evaluated as a qualified endoscope.
[0078] It should be noted that the surface defect depth and surface defect area of the target defect position are analyzed to determine whether the surface defect depth and surface defect area are greater than the preset value. Since the necessary structure of the endoscope has been determined to have defects, it is determined whether the surface defect endoscope necessary structure can be repaired based on whether the surface defect depth and surface defect area are greater than the preset value. If there is a surface defect depth or surface defect area greater than the preset value, the target defect position cannot be repaired. If the degree of defect is large, such as the defect depth is too large, the repair difficulty is huge, or the defect cannot be repaired at all. At this time, the target endoscope can only be scrapped and cannot be used. If the necessary structure of the endoscope is forcibly repaired and continued to be used, it may cause the accuracy of endoscopy to decrease, or it may cause damage to the patient. When the surface defect depth or surface defect area is not greater than the preset value, it proves that the surface defect endoscope necessary structure may be repaired accordingly. For example, if there are cracks, scratches, degumming, etc. at the defect position, the repair method and protection method of the corresponding defect position can be retrieved through the big data network according to the defect type of the target defect position, such as abnormal defect depth or defect area. Repair methods include but are not limited to re-applying treatment if there is debonding, repainting treatment if there are cracks and scratches, etc. Protection methods include but are not limited to maintenance and protection of the endoscope, adding a protective shell during idle time, etc. Finally, the repair method and protection method for the target defect position corresponding to the necessary structure of the first type of repairable endoscope and the necessary structure of the second type of repairable endoscope are output to obtain a qualified endoscope.
[0079] Figure 2 A flow chart of a method for performing image preprocessing and image feature extraction processing on a surface image of a target endoscope essential structure is shown, comprising the following steps:
[0080] S202: performing median filtering on the acquired surface image of the necessary structure of the target endoscope to obtain a median filtered surface image;
[0081] S204: Adaptively adjust the image contrast of the median filtered surface image to obtain a median filtered surface image with qualified contrast;
[0082] S206: Perform image correction and image feature extraction processing on the median filter contrast qualified surface image to obtain the surface image feature data of the necessary structure of the target endoscope.
[0083] Furthermore, in a preferred embodiment of the present invention, the surface image of the necessary structure of the target endoscope is subjected to median filtering to obtain a median filtered surface image, specifically:
[0084] Acquire an image acquisition device, and based on the image acquisition device, acquire a surface image of a necessary structure of a target endoscope, calibrate it as a target surface image, and simultaneously calculate pixel values of all pixel points in the target surface image;
[0085] Introducing a median filter, wherein the median filter includes a median filter sliding window, and importing the target surface image into the median filter;
[0086] The target surface image is traversed through a median filter sliding window in a median filter, and based on the pixel values of all pixel points in the target surface image, the median value of the pixel values of the pixel points of the target surface image in the median filter sliding window is used as a filter output value during the process of the median filter sliding window traversing the target surface image, and the filter output value is applied to the target surface image to obtain a median filter surface image.
[0087] It should be noted that the determination of whether there are defects on the surface of the necessary structure of the target endoscope can be made by image analysis. First, an image of the surface of the necessary structure of the target endoscope, that is, a surface defect image, is obtained. After the image is obtained, since the image acquisition may be obstructed by external factors, there may be some unclear positions in the image, that is, there is noise, etc., so the image needs to be filtered to reduce the noise in the image and achieve the purpose of enhancing the image clarity. The median filter method is a commonly used image processing technology, which is mainly used to remove noise in the image. It replaces the value of the pixel by extracting the median of the neighborhood of each pixel in the image, thereby retaining the edge details of the image and reducing noise. The median filter sliding window in the median filter device can sort the pixel values in the window, replace the pixel values in the window with the median after finding the termination, and slide the window traversally in the image to achieve the purpose of median filtering.
[0088] Furthermore, in a preferred embodiment of the present invention, the median filter surface image is subjected to image contrast adaptive adjustment to obtain a median filter contrast qualified surface image, specifically:
[0089] Acquire a CLAHE algorithm, apply the CLAHE algorithm to the median filter surface image, obtain an adaptive histogram of the median filter surface image, simultaneously obtain an image contrast of the median filter surface image, and preset an image contrast threshold;
[0090] The image contrast of the median filter surface image is analyzed. If there is an area in the median filter surface image whose image contrast is not within the image contrast threshold, the adaptive histogram of the median filter surface image is adaptively stretched so that there is no area in the median filter surface image whose image contrast is not within the image contrast threshold, thereby obtaining a median filter contrast qualified surface image.
[0091] It should be noted that after the image is processed by median filtering, it is necessary to enhance the image to highlight the useful information in the image for subsequent processing. Because if there are dark areas in the image, there may be incomplete extraction of features when observing and extracting image features. Therefore, it is necessary to enhance the median filter surface image. The image enhancement method can be performed by improving the contrast of the image, so that all positions of the median filter surface image are clearly visible. Improving the contrast of the median filter surface image can be achieved by adaptively stretching the histogram of the image, thereby achieving image enhancement. The adaptive histogram is a histogram of the image that can adaptively adjust the contrast. The adaptive histogram can be obtained by the CLAHE algorithm. The contrast threshold analysis is performed on different areas in the image. If there is an area with a contrast less than the contrast threshold, the contrast is continued to be adjusted through the adaptive histogram so that there is no area with a contrast less than the contrast threshold in the image, and a median filter contrast qualified surface image is obtained.
[0092] Further, in a preferred embodiment of the present invention, the median filter contrast qualified surface image is subjected to image correction and image feature extraction processing to obtain the surface image feature data of the necessary structure of the target endoscope, specifically:
[0093] Acquire an image color temperature correction device, obtain the color temperature parameters of the median filter contrast qualified surface image in the image color temperature correction device, and retrieve the color clarity of the image under different color temperature parameters when performing image analysis on the endoscope based on the big data network;
[0094] Based on the color clarity of the image at different color temperatures when the endoscope is analyzed, the color temperature parameters of the image of the endoscope when the color clarity is the highest are obtained, calibrated as the optimal color temperature parameters, and the image correction device is controlled to adjust the color temperature parameters of the median filter contrast qualified surface image to the optimal color temperature parameters, so as to obtain the surface image of the necessary structure of the target endoscope;
[0095] An edge detection algorithm is introduced, an image gradient of a target endoscope necessary structure surface image is calculated based on the edge detection algorithm, and a standard image gradient threshold of the target endoscope necessary structure surface image is preset;
[0096] In the target endoscope necessary structure surface image, the target endoscope necessary structure surface image whose image gradient is not maintained within the image standard gradient threshold is calibrated as a background image, and the target endoscope necessary structure surface image whose image gradient is maintained within the image standard gradient threshold is calibrated as a foreground image;
[0097] The shape features of the foreground image within the target endoscope necessary structure surface image are calculated, wherein the shape features include the number of pixels, boundary length and geometric moment of the foreground image, and the target endoscope necessary structure surface image feature data is obtained according to the shape features of the foreground image.
[0098] It should be noted that after the image contrast is adjusted and the median filter contrast qualified surface image is obtained, the median filter contrast qualified surface image needs to be corrected and image features extracted. The purpose of image correction is that after contrast adjustment, the color clarity of the image may be small in some areas. If the color clarity is small, there may be misjudgment when observing whether there are defects in the image, so it is necessary to enhance the color clarity of the image. Adjusting the image color temperature can adjust the color clarity of the image, detect the color temperature parameters in the median filter contrast qualified surface image, and retrieve the color clarity of the image under different color temperature parameters when the endoscope is analyzed. Based on the color clarity of the image under different color temperature parameters when the endoscope is analyzed, the current color temperature parameter is adjusted to the most appropriate color temperature parameter, and the color clarity is the highest, and the surface image of the necessary structure of the target endoscope is obtained. The purpose of image feature extraction is to compare and analyze the extracted feature data with the standard data to determine whether there are defects in the necessary structure of the endoscope. The edge detection algorithm is introduced, and the target endoscope necessary structure surface image whose image gradient is not maintained within the image standard gradient threshold is calibrated as the background image, on the contrary, the target endoscope necessary structure surface image whose image gradient is maintained within the image standard gradient threshold is calibrated as the foreground image. The foreground image is mainly the necessary structure of the endoscope, while the background image is the non-essential structure of the endoscope and other background information.
[0099] In addition, the endoscopic diagnosis method based on image analysis further includes the following steps:
[0100] Obtaining the necessary structure of a qualified endoscope, and obtaining a surface image of the necessary structure of a qualified endoscope, and calibrating it as the surface image of the necessary structure of a qualified endoscope;
[0101] Performing color temperature parameter analysis on the foreground image of the qualified endoscope necessary structure surface image, calculating the color temperature parameters of different pixel points in the qualified endoscope necessary structure surface image, and presetting the standard threshold value of the color temperature parameter change between adjacent pixel points in the qualified endoscope necessary structure surface image;
[0102] According to the color temperature parameters of different pixel points in the qualified endoscope necessary structure surface image, calculate the color temperature parameter change values of adjacent pixel points in the qualified endoscope necessary structure surface image, and judge whether the color temperature parameter change values of adjacent pixel points in the qualified endoscope necessary structure surface image are maintained within the color temperature parameter change standard threshold value of adjacent pixel points in the qualified endoscope necessary structure surface image;
[0103] If so, it is judged that there is no color clarity abnormality in the necessary structure of the qualified endoscope;
[0104] If not, it is determined that there is a color clarity abnormality in the necessary structure of the qualified endoscope, and the position where the color temperature parameter change value of the adjacent pixel points in the surface image of the necessary structure of the qualified endoscope is not maintained at the standard threshold value of the color temperature parameter change of the adjacent pixel points is marked as the target color clarity abnormality area;
[0105] Retrieve the color temperature parameter-chemical corrosion type comparison map in the big data network, and import the color temperature parameters of all pixels in the target color clarity abnormal area into the color temperature parameter-chemical corrosion type comparison map to preliminarily determine all chemical corrosion types in the target color clarity abnormal area;
[0106] After preliminarily determining all chemical corrosion types in the target color clarity abnormal area, based on all chemical corrosion types in the target color clarity abnormal area, sampling detection schemes and chemical corrosion removal schemes of different chemical corrosion types are retrieved in the big data network;
[0107] Based on the sampling and detection schemes for different chemical corrosion types, sampling and detection are performed on the target color clarity abnormal area to determine the actual chemical corrosion type of the target color clarity abnormal area. Based on the actual chemical corrosion type of the target color clarity abnormal area, combined with chemical corrosion removal schemes for different chemical corrosion types, a chemical corrosion removal scheme corresponding to the actual chemical corrosion type of the target color clarity abnormal area is output, so that there is no color clarity abnormality in the necessary structure of a qualified endoscope.
[0108] It should be noted that chemical corrosion may exist in the necessary structure of a qualified endoscope, so it is necessary to conduct chemical corrosion analysis on the qualified endoscope. Qualified endoscopes after chemical corrosion may have discoloration. For example, the outer shell of the endoscope after oxidation may be rusted. The color of the rust may be yellow, green, etc., which is different from the main color of the outer shell of the endoscope. Therefore, according to the color temperature parameters of the necessary structure of the endoscope, it is judged whether there is chemical corrosion in the necessary structure of the endoscope. In the foreground image, the color temperature parameters of the pixel points are calculated, and the change value of the color temperature parameters between adjacent pixels is calculated to see whether it is maintained within the standard value. Because there may be two areas in the necessary structure with different original colors, it is not possible to directly judge that the color temperature parameters have changed, that is, to judge that chemical corrosion has occurred in the corresponding area. When the change value of the color temperature parameters between adjacent pixels is not maintained within the standard value, it proves that chemical corrosion has occurred in the corresponding area. At this time, the corrosion of the chemically corroded area needs to be removed. Before removal, it is necessary to determine the type of chemical corrosion and prescribe the right medicine. For example, rust removal is performed for rust, and mold removal is performed for mold. Obtain a color temperature parameter-chemical corrosion type comparison map, which reflects the color temperature parameter type corresponding to different chemical corrosion types. Since there are many types of chemical corrosion that may correspond to the color temperature parameter, it is necessary to preliminarily determine all the chemical corrosion types corresponding to the color temperature parameter, and then sample and process the target color clarity abnormal area. Different types of chemical corrosion have different sampling detection methods and chemical corrosion removal methods, so after preliminarily determining the type of chemical corrosion, on this basis, sampling and detection are performed in the target color clarity abnormal area respectively, so as to achieve the purpose of determining the accurate type of chemical corrosion, and according to the correct type of chemical corrosion, select the corresponding chemical corrosion removal plan, so that there is no color clarity abnormality in the necessary structure of the qualified endoscope.
[0109] like Figure 3 As shown, the second aspect of the present invention further provides an endoscopic diagnosis system based on image analysis, the endoscopic diagnosis system comprises a memory 31 and a processor 32, the memory 31 stores an endoscopic diagnosis method, and when the endoscopic diagnosis method is executed by the processor 32, the following steps are implemented:
[0110] determining a usage arrangement of a target endoscope, performing a structural engagement assessment on the target endoscope based on the usage arrangement of the target endoscope, and structurally classifying the target endoscope after the structural engagement assessment;
[0111] Acquiring a surface image of a necessary structure of a target endoscope in a target endoscope, and performing image preprocessing and image feature extraction processing on the surface image of the necessary structure of the target endoscope after the surface image is acquired, so as to obtain surface image feature data of the necessary structure of the target endoscope;
[0112] Based on the surface image feature data of the necessary structure of the target endoscope, the necessary structure of the target endoscope is defect located, defect analyzed and defect classified, and the necessary structure of the target endoscope is defect repaired after the defect analysis and defect classification results.
[0113] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An endoscopic diagnostic method based on image analysis, characterized in that: The following steps are involved: determining a usage arrangement of a target endoscope, performing a structural engagement assessment on the target endoscope based on the usage arrangement of the target endoscope, and structurally classifying the target endoscope after the structural engagement assessment; Acquiring a surface image of a necessary structure of a target endoscope in a target endoscope, and performing image preprocessing and image feature extraction processing on the surface image of the necessary structure of the target endoscope after the surface image is acquired, so as to obtain surface image feature data of the necessary structure of the target endoscope; Based on the surface image feature data of the necessary structure of the target endoscope, the necessary structure of the target endoscope is defect located, defect analyzed and defect classified, and the necessary structure of the target endoscope is defect repaired after the defect analysis and defect classification results.
2. The endoscopic diagnosis method based on image analysis according to claim 1, characterized in that: The determining of the use arrangement of the target endoscope, performing a structural engagement evaluation on the target endoscope based on the use arrangement of the target endoscope, and performing a structural classification on the target endoscope after the structural engagement evaluation, specifically includes: The endoscope that needs to be subjected to image analysis and diagnosis is calibrated as the target endoscope, and the usage scenario of the target endoscope is obtained; Obtaining instructions for use of a target endoscope, and obtaining a structure of the target endoscope based on the instructions for use of the target endoscope; In a usage scenario of a target endoscope, obtaining a usage arrangement of the target endoscope, wherein the usage arrangement of the target endoscope includes an endoscopy position, an endoscopy scheme, and an endoscopy time of the target endoscope; Obtaining a big data network, and obtaining functions of different structures of the target endoscope in the instructions for use of the target endoscope, importing the functions of the different structures of the endoscope and the use arrangement of the endoscope into the big data network for combination, and after the combination, retrieving the participation of the different structures of the target endoscope in the use arrangement through the big data network, and marking it as the first participation; A first participation standard threshold is preset, and the relationship between the first participation of different structures of the target endoscope and the first participation standard threshold is determined; the target endoscope structure whose first participation is greater than the first participation standard threshold is calibrated as a necessary structure of the target endoscope; and the target endoscope structure whose first participation is less than the first participation standard threshold is calibrated as a non-essential structure of the target endoscope.
3. The endoscopic diagnosis method based on image analysis according to claim 1, characterized in that: The target endoscope acquires a surface image of the necessary structure of the target endoscope in the target endoscope, and performs image preprocessing and image feature extraction on the surface image of the necessary structure of the target endoscope after the surface image is acquired, so as to obtain the surface image feature data of the necessary structure of the target endoscope, specifically: Acquire an image acquisition device, and based on the image acquisition device, acquire a surface image of a necessary structure of a target endoscope, calibrate it as a target surface image, and simultaneously calculate pixel values of all pixel points in the target surface image; Introducing a median filter, wherein the median filter includes a median filter sliding window, and importing the target surface image into the median filter; The target surface image is traversed through a median filter sliding window in a median filter, and based on the pixel values of all the pixel points in the target surface image, a median value of the pixel values of the pixel points of the target surface image in the median filter sliding window is used as a filter output value during the process of the median filter sliding window traversing the target surface image, and the filter output value is applied to the target surface image to obtain a median filter surface image; Acquire a CLAHE algorithm, apply the CLAHE algorithm to the median filter surface image, obtain an adaptive histogram of the median filter surface image, simultaneously obtain an image contrast of the median filter surface image, and preset an image contrast threshold; The image contrast of the median filter surface image is analyzed. If there is an area in the median filter surface image where the image contrast is not within the image contrast threshold, the adaptive histogram of the median filter surface image is adaptively stretched so that there is no area in the median filter surface image where the image contrast is not within the image contrast threshold, thereby obtaining a median filter surface image with qualified contrast. The median filter contrast qualified surface image is subjected to image correction and image feature extraction processing to obtain the surface image feature data of the necessary structure of the target endoscope.
4. The endoscopic diagnosis method based on image analysis according to claim 3, characterized in that: The image correction and image feature extraction processing are performed on the median filter contrast qualified surface image to obtain the surface image feature data of the necessary structure of the target endoscope, specifically: Acquire an image color temperature correction device, obtain the color temperature parameters of the median filter contrast qualified surface image in the image color temperature correction device, and retrieve the color clarity of the image under different color temperature parameters when performing image analysis on the endoscope based on the big data network; Based on the color clarity of the image at different color temperatures when the endoscope is analyzed, the color temperature parameters of the image of the endoscope when the color clarity is the highest are obtained, calibrated as the optimal color temperature parameters, and the image correction device is controlled to adjust the color temperature parameters of the median filter contrast qualified surface image to the optimal color temperature parameters, so as to obtain the surface image of the necessary structure of the target endoscope; An edge detection algorithm is introduced, an image gradient of a target endoscope necessary structure surface image is calculated based on the edge detection algorithm, and a standard image gradient threshold of the target endoscope necessary structure surface image is preset; In the target endoscope necessary structure surface image, the target endoscope necessary structure surface image whose image gradient is not maintained within the image standard gradient threshold is calibrated as a background image, and the target endoscope necessary structure surface image whose image gradient is maintained within the image standard gradient threshold is calibrated as a foreground image; The shape features of the foreground image within the target endoscope necessary structure surface image are calculated, wherein the shape features include the number of pixels, boundary length and geometric moment of the foreground image, and the target endoscope necessary structure surface image feature data is obtained according to the shape features of the foreground image.
5. The endoscopic diagnosis method based on image analysis according to claim 1, characterized in that: Based on the surface image feature data of the necessary structure of the target endoscope, the necessary structure of the target endoscope is defect-located, defect-analyzed and defect-classified, and the necessary structure of the target endoscope is defect-repaired after the defect analysis and defect classification results are obtained. Specifically, Based on the instructions for use of the target endoscope, obtain structural specification parameters of the necessary structure of the target endoscope, and based on the structural specification parameters of the necessary structure of the target endoscope, obtain surface image feature standard data of the necessary structure of the target endoscope; Calculating the Mahalanobis distance between the target endoscope necessary structure surface image feature data and the target endoscope necessary structure surface image feature standard data, and presetting the Mahalanobis distance interval; If the Mahalanobis distance between the target endoscope necessary structure surface image feature data and the target endoscope necessary structure surface image feature standard data is maintained within the Mahalanobis distance interval, the target endoscope necessary structure is calibrated as a qualified endoscope necessary structure, and the target endoscope corresponding to the qualified endoscope necessary structure is evaluated as a qualified endoscope; If the Mahalanobis distance between the target endoscope necessary structure surface image feature data and the target endoscope necessary structure surface image feature standard data is not maintained within the Mahalanobis distance interval, the target endoscope necessary structure is calibrated as a surface defect endoscope necessary structure, and the target endoscope necessary structure surface image feature data is calibrated as feature data to be analyzed; Based on the target endoscope necessary structure surface image, a foreground image of the surface image of the surface defect endoscope necessary structure is obtained, and the foreground image is analyzed in combination with the feature data to be analyzed to locate the defect position of the surface defect endoscope necessary structure and mark it as the target defect position; Based on the feature data to be analyzed, the shape features of the foreground image of the surface image of the necessary structure of the surface defect endoscope are analyzed to obtain the surface defect depth and surface defect area of the target defect position; The surface defect depth and surface defect area of the target defect position are subjected to defect threshold analysis, and the necessary structures of the surface defect endoscope are subjected to defect classification and defect repair based on the defect threshold analysis results.
6. The endoscopic diagnosis method based on image analysis according to claim 5, characterized in that: The defect threshold analysis is performed on the surface defect depth and surface defect area of the target defect position, and defect classification and defect repair are performed on the necessary structure of the surface defect endoscope based on the defect threshold analysis result, specifically: The surface dangerous defect depth and surface dangerous defect area of the target defect position are preset. If the surface defect depth of the target defect position is greater than the surface dangerous defect depth, the target endoscope corresponding to the necessary structure of the surface defect endoscope is scrapped; If the surface defect depth of the target defect position is less than the surface dangerous defect depth, the surface defect endoscope necessary structure is calibrated as a type of repairable endoscope necessary structure; If the surface defect area of the target defect position is larger than the surface dangerous defect area, the target endoscope corresponding to the necessary structure of the surface defect endoscope is scrapped; If the surface defect area of the target defect position is smaller than the surface dangerous defect area, the surface defect endoscope necessary structure is calibrated as a Class II repairable endoscope necessary structure; Based on the big data network, the repair methods and protection methods for the target defect positions corresponding to the first type of repairable endoscope necessary structure and the second type of repairable endoscope necessary structure are retrieved and output respectively, so that the surface defect endoscope necessary structure corresponding to the target defect position is calibrated as a qualified endoscope necessary structure, and the target endoscope corresponding to the qualified endoscope necessary structure is evaluated as a qualified endoscope.
7. An endoscopic diagnostic system based on image analysis, characterized in that: The endoscopic diagnostic system includes a memory and a processor, wherein the memory stores an endoscopic diagnostic method program, and when the endoscopic diagnostic method program is executed by the processor, the endoscopic diagnostic method steps according to any one of claims 1 to 6 are implemented: determining a usage arrangement of a target endoscope, performing a structural engagement assessment on the target endoscope based on the usage arrangement of the target endoscope, and structurally classifying the target endoscope after the structural engagement assessment; Acquiring a surface image of a necessary structure of a target endoscope in a target endoscope, and performing image preprocessing and image feature extraction processing on the surface image of the necessary structure of the target endoscope after the surface image is acquired, so as to obtain surface image feature data of the necessary structure of the target endoscope; Based on the surface image feature data of the necessary structure of the target endoscope, the necessary structure of the target endoscope is defect located, defect analyzed and defect classified, and the necessary structure of the target endoscope is defect repaired after the defect analysis and defect classification results.
Citation Information
Patent Citations
Hole inner surface defect detection and measurement method based on endoscopic image
CN114648518A
Full grouting sleeve defect depth detection method and system based on endoscope measurement
CN118154598A
Intelligent endoscope image feature processing method and device
CN118470481A
Image detection method, computing device, and storage medium
US20230230217A1