Intelligent endoscope processing method and system
The magnetic control device guides the capsule endoscope to move in the predetermined path, and collects and analyzes the image quality in real time, solving the problems of unclear images and unpredictable paths in capsule endoscopy, achieving higher diagnostic accuracy and comprehensive examination.
Patent Information
- Application Number
- CN202510637649.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-06-27
AI Technical Summary
During capsule endoscopy, dirty objects in the digestive tract are easily attached to the lens surface, resulting in unclear images and affecting the accuracy of diagnosis. At the same time, due to the uncontrollable peristalsis of the digestive tract, the movement path of the capsule endoscopy is unpredictable, which may lead to repeated examinations in some areas and other important areas being missed.
The magnetic control device guides the capsule endoscope to move in a predetermined path, and collects images in real time, determines the visual recognition based on the image quality analysis results, adjusts the movement parameters and traceability maintenance points, and ensures the clarity and comprehensiveness of image acquisition.
It improves the accuracy and comprehensiveness of capsule endoscopy, ensures image clarity and diagnostic reliability, and achieves a more controllable examination path through magnetic control.
Smart Images

Figure CN120203488A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to image processing technology, and in particular, to an intelligent endoscope processing method and system. Background Art
[0002] Capsule endoscopy examination is a new non-invasive wireless monitoring system for the digestive tract, belonging to non-invasive examination, and can be used as the preferred method for diagnosing digestive tract diseases, especially small intestine diseases.
[0003] In the prior art, when examining a patient through a capsule endoscope, dirt such as mucus and food residues in the digestive tract is likely to adhere to the surface of the lens, which may cause the images captured by the capsule endoscope to be unclear, affecting the accuracy of diagnosis. Moreover, the movement of the capsule endoscope in the digestive tract mainly depends on the peristalsis of the digestive tract. Since the peristalsis of the digestive tract is uncontrollable, the movement path of the capsule endoscope is also unpredictable, which may lead to some areas being repeatedly examined while other important areas are missed, thus possibly affecting the comprehensiveness and accuracy of the examination.
[0004] Therefore, how to improve the accuracy and comprehensiveness during capsule endoscopy examination has become an urgent problem to be solved. Summary of the Invention
[0005] The present invention provides an intelligent endoscope processing method and system, which can improve the accuracy and comprehensiveness during capsule endoscopy examination.
[0006] In a first aspect of the present invention, an intelligent endoscope processing method is provided, including: Controlling the endoscope device to move along a detection path according to the interaction between a magnetic control module built in the endoscope device and a magnetic control structure of an external device; Obtaining real-time captured images collected by the endoscope device during movement, and determining the visual recognition degree of the endoscope device at corresponding path points according to the quality analysis result of the real-time captured images; Based on the comparison result between the standard recognition degree and the visual recognition degree, adjusting the movement parameters of the endoscope device, and determining the corresponding backtracking maintenance points of the endoscope device on the detection path; Controlling the endoscope device to go to the backtracking maintenance points to adjust the posture according to the configuration parameters, and then controlling the endoscope device to return to the corresponding path points to re-collect images.
[0007] Optionally, in a possible implementation manner of the first aspect, obtaining real-time captured images collected by the endoscope device during movement, and determining the visual recognition degree of the endoscope device at corresponding path points according to the quality analysis result of the real-time captured images includes: Control the imaging module built in the endoscopic device to collect images during movement, and transmit the real-time captured images according to the image transmission module built in the endoscopic device; Segment the observation area and the background area in the real-time captured image according to the segmentation model, calculate the first sharpness of the observation area and the second sharpness of the background area, and the quality analysis result includes the first sharpness and the second sharpness; Perform weighted processing on the first sharpness based on the first weight of the observation area to obtain a first identification coefficient, and perform weighted processing on the second sharpness based on the second weight of the background area to obtain a second identification coefficient, where the first weight is greater than the second weight; Sum the first identification coefficient and the second identification coefficient to obtain the visual recognition rate of the endoscopic device at the corresponding path point.
[0008] Optionally, in a possible implementation manner of the first aspect, segmenting the observation area and the background area in the real-time captured image according to the segmentation model, and calculating the first sharpness of the observation area and the second sharpness of the background area includes: Determine the area type of the observation area, where the area type includes the gastric mucosa area type and the area type of the lesion of interest; When the observation area is of the gastric mucosa area type, calculate the first gradient information of the pixel values in the observation area, and obtain the first sharpness of the observation area according to the first gradient information; or, When the observation area is of the area type of the lesion of interest, calculate the second gradient information of the pixel values in the observation area, obtain the pixel contrast information of the edge part of the observation area, and perform fusion calculation on the second gradient information and the pixel contrast information to obtain the first sharpness of the observation area; Calculate the third gradient information of the background area, and obtain the second sharpness of the background area according to the third gradient information.
[0009] Optionally, in a possible implementation manner of the first aspect, when the observation area is of the area type of the lesion of interest, calculating the second gradient information of the pixel values in the observation area, obtaining the pixel contrast information of the edge part of the observation area, and performing fusion calculation on the second gradient information and the pixel contrast information to obtain the first sharpness of the observation area includes: Count the number of pixel points in the observation area, and obtain a range offset coefficient according to the ratio of the number of pixel points to the standard number of pixel points; Adjust the standard offset amount according to the range offset coefficient to obtain the current offset amount, and use the edge pixel points of the observation area as the center to expand the target pixel points of the current offset amount to both sides; Determine the target side of the target pixel point relative to the edge pixel point, where the target side includes the inner side and the outer side, and divide the target pixel points on the same target side into the same target pixel set; Obtain the pixel contrast information of the observation area according to the maximum pixel difference corresponding to each target pixel set; Weight the second gradient information based on the gradient weight, weight the pixel contrast information based on the contrast weight, and sum the weighted second gradient information and pixel contrast information to obtain the first clarity of the observation area.
[0010] Optionally, in a possible implementation manner of the first aspect, based on the comparison result of the standard recognition rate and the visual recognition rate, adjust the movement parameters of the endoscopic device, and determine the corresponding backtracking maintenance point of the endoscopic device on the detection path, including: Obtain the recognition rate difference between the standard recognition rate and the visual recognition rate, and adjust the movement speed of the endoscopic device according to the recognition rate difference, where the movement parameters include the movement speed; When the recognition rate difference is greater than or equal to the recognition difference threshold, control the endoscopic device to hover at the corresponding path point based on the hovering time period, and obtain the secondary captured image captured by the endoscopic device; Obtain the secondary recognition rate of the secondary captured image. If the secondary recognition rate is still greater than or equal to the recognition difference threshold, determine the corresponding path point as a blurred point; Generate a clarity display map according to the visual recognition rates of the respective path points passed through during movement on the detection path, and determine the clarity index of each detection part passed through during movement according to the clarity display map; Obtain the average index of each clarity index, and determine the detection parts with clarity indexes greater than or equal to the average index as the screening parts; Determine the screening part that is closest to the blurred point and has a spatial specification greater than the device specification of the endoscopic device as the target part, and determine the center point of the multiple path points corresponding to the target part as the backtracking maintenance point.
[0011] Optionally, in a possible implementation manner of the first aspect, when the recognition rate difference is greater than or equal to the recognition difference threshold, control the endoscopic device to hover at the corresponding path point based on the hovering time period, and obtain the secondary captured image captured by the endoscopic device, including: When the recognition rate difference is greater than or equal to the recognition difference threshold, control the endoscopic device to hover at the corresponding path point based on a preset time period, and obtain the primary captured image captured by the endoscopic device; Obtain the primary recognition rate of the primary captured image. When the primary recognition rate is greater than or equal to the recognition difference threshold, determine the extended hovering duration corresponding to the primary recognition rate; Continue to control the endoscopic device to hover at the corresponding path point based on the extended hovering duration, and obtain a secondary captured image captured by the endoscopic device. The hovering time period includes a preset time period and an extended time period corresponding to the extended hovering duration.
[0012] Optionally, in a possible implementation manner of the first aspect, obtaining the difference in recognition rate between the standard recognition rate and the visual recognition rate, and adjusting the moving speed of the endoscopic device according to the difference in recognition rate, includes: Traverse multiple recognition difference intervals based on the difference in recognition rate, and determine that the speed adjustment level corresponding to the recognition difference interval where the difference in recognition rate is located is the selected adjustment level; Determine the adjustment amplitude value corresponding to the selected adjustment level, obtain the speed reduction value based on the difference between the moving speed and the adjustment amplitude value, and adjust the moving speed based on the speed reduction value.
[0013] Optionally, in a possible implementation manner of the first aspect, generating a clarity display map according to the visual recognition rate of each path point passed through during movement on the detection path, and determining the clarity index of each detection part passed through according to the clarity display map, includes: Retrieve the part display map, and obtain the time period when the endoscopic device passes through each detection part in the part display map; Bind the visual recognition rates corresponding to multiple path points within the corresponding time period to the corresponding detection parts, and update the part display map according to the binding data to obtain a clarity display map; Determine the clarity index of each detection part according to the average value of the multiple visual recognition rates corresponding to each detection part.
[0014] Optionally, in a possible implementation manner of the first aspect, after controlling the endoscopic device to go to the retrospective maintenance point for attitude adjustment according to the configuration parameters, then controlling the endoscopic device to return to the corresponding path point to re-perform image acquisition, includes: Retrieve the ratio of the difference between the standard constant and the recognition rate difference of the fuzzy point to the recognition difference threshold, and weight the obtained difference based on the duration weight to obtain the duration adjustment amplitude corresponding to the retrospective maintenance point; Obtain the duration adjustment coefficient according to the sum of the standard constant and the duration adjustment amplitude, multiply the reference duration by the duration adjustment coefficient to obtain the configuration parameters of the endoscopic device at the retrospective maintenance point; Control the endoscopic device to go to the retrospective maintenance point, perform attitude adjustment based on the configuration parameters and the attitude rotation parameters, and then control the endoscopic device to return to the corresponding path point to re-perform image acquisition.
[0015] A second aspect of the present invention provides an intelligent endoscopic processing system, including: A control module, configured to control the endoscopic device to move along a detection path according to the interaction between a magnetic force control module built in the endoscopic device and a magnetic force control structure of an external device; An acquisition module, configured to acquire real-time captured images collected by the endoscopic device during movement, and determine the visual recognition degree of the endoscopic device at corresponding path points according to the quality analysis result of the real-time captured images; An adjustment module, configured to adjust the movement parameters of the endoscopic device based on the comparison result between a standard recognition degree and the visual recognition degree, and determine a corresponding backtracking maintenance point of the endoscopic device on the detection path; A collection module, configured to control the endoscopic device to go to the backtracking maintenance point, adjust the posture according to configuration parameters, and then control the endoscopic device to return to the corresponding path point to re-collect images.
[0016] The beneficial effects of the present invention are as follows: 1. The present invention can use a magnetic force control device to guide and control a capsule endoscope, so that it can move in a patient's body along a predetermined path, obtain more comprehensive image information, and thus can improve the comprehensiveness and accuracy during examination.
[0017] 2. When the capsule endoscope is covered with mucus, the present invention can use the magnetic force control device to guide the capsule endoscope to an area where the liquid in the patient's body is clearer, dilute the mucus accordingly, and then re-collect images, so that clearer image data can be obtained.
[0018] 3. In the present invention, when controlling the endoscopic device to move in a patient's body along a detection path, the endoscopic device can perform real-time image collection during movement, so that real-time captured images collected by the endoscopic device can be obtained. By analyzing the clarity of the real-time captured images, corresponding quality analysis results can be obtained. According to the quality analysis results of the real-time captured images, the visual recognition degree of the endoscopic device at corresponding path points can be determined. The visual recognition degree can more intuitively reflect the clarity of the captured images at corresponding path points.
[0019] 4. The present invention can adjust the movement speed of the endoscopic device during movement according to the clarity of the real-time captured images, and can avoid image blurring caused by too fast movement speed, thereby improving the clarity during image collection. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present invention; Figure 2 is a schematic flowchart of an intelligent endoscopic processing method provided by an embodiment of the present invention; Figure 3 It is a schematic diagram provided by an embodiment of the present invention for controlling an endoscopic device to examine a patient; Figure 4 It is a schematic structural diagram of an intelligent endoscope processing system provided by an embodiment of the present invention. Detailed implementation manners
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are only a part rather than all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0022] The technical solutions of the present invention will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0023]
Application scenario description
[0024] Refer to Figure 2 , which is a schematic diagram of an intelligent endoscope processing method provided by an embodiment of the present invention. Figure 2 The execution subject of the method shown can be a software and / or hardware device. The execution subject of the present application can include, but is not limited to, at least one of the following: user equipment, network equipment, etc. Among them, the user equipment can include, but is not limited to, a computer, a smart phone, a personal digital assistant (Personal Digital Assistant, abbreviated as: PDA), and the above-mentioned electronic devices, etc. The network equipment can include, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of computers or network servers based on cloud computing. Among them, cloud computing is a type of distributed computing, which consists of a group of loosely coupled computers forming a super virtual computer. This embodiment does not make any restrictions. It includes steps S1 to S4, which are specifically as follows: S1, control the endoscopic device to move along a detection path according to the interaction between the magnetic control module built in the endoscopic device and the magnetic control structure of the external device.
[0025] Among them, the endoscopic device refers to an intelligent magnetically controlled capsule endoscope configured with magnetic materials, which is usually swallowed by the patient and used to take images in the digestive tract. The magnetic force control module refers to the magnetic materials configured inside the endoscopic device, which can interact with the external magnetic field to control the movement of the endoscopic device. The external device refers to a device independent of the capsule endoscope, located outside the human body, mainly used to control and monitor the movement of the capsule endoscope inside the human body. The magnetic force control structure refers to a specific structure configured on the external device for interacting with the magnetic materials on the endoscopic device. The detection path refers to the path pre-configured by the doctor, along which the endoscopic device is expected to move inside the patient's body.
[0026] In practical applications, the patient can orally take an intelligent capsule with an internal camera and signal transmission device. With the peristaltic function of the digestive tract, the capsule moves in the digestive tract, takes images, and transmits the images as digital signals to an image recorder carried outside the patient's body for storage and recording. The doctor can analyze the recorded images through an imaging workstation to understand the entire digestive tract condition of the patient, and thus make a diagnosis of the condition. However, when examining the patient with an intelligent capsule endoscope, mucus, food residues, etc. inside the patient's digestive tract may adhere to the lens of the endoscope, resulting in unclear captured images, which may affect the accuracy of the doctor's diagnosis. Moreover, since the peristalsis of the digestive tract is uncontrollable, the movement path of the capsule endoscope is also unpredictable. The capsule endoscope may not be able to capture certain lesion sites at the best angle, which may affect the doctor's accurate judgment of the lesions.
[0027] This solution can use a magnetic force control device to guide and control the capsule endoscope, enabling it to move inside the patient's body along a predetermined path and speed, obtaining more comprehensive image information, thereby improving the comprehensiveness and accuracy during the examination. And when the capsule endoscope is covered by mucus or food residues, this solution can guide the capsule endoscope to an area with clearer liquid inside the patient's body through the magnetic force control device for corresponding dilution, so as to obtain clearer image data.
[0028] Specifically, when a patient undergoes a capsule endoscopy examination, a physician can start an external machine, i.e., an external device, located outside the human body. An external magnetic control structure is configured on the external device to achieve interaction with the capsule endoscope through the magnetic control structure. And the physician can pre-configure corresponding examination procedures and the movement path of the capsule endoscope, i.e., the detection path. The patient can swallow an intelligent magnetically controlled capsule endoscope, i.e., an endoscopic device, configured with magnetic materials. The magnetic materials inside the endoscopic device can form a magnetic force control module. Then the patient lies on an examination machine equipped with a magnetic field generating device. The magnetic field generating device on the examination machine can generate magnetic fields with different directions and intensities. When the external magnetic field acts on the magnetic materials inside the capsule endoscope, a magnetic force can be generated, which can drive the capsule endoscope to change its position and direction inside the patient. When the external magnetic field acts on the magnetic materials inside the capsule endoscope to generate a magnetic force, the magnetic control structure on the external device interacts with the magnetic force control module inside the capsule, and the capsule endoscope can be started to move inside the patient along the detection path pre-configured by the physician, so as to comprehensively and meticulously examine the patient's stomach and intestines.
[0029] See Figure 3 , which is a schematic diagram of a control method for an endoscopic device to examine a patient provided by an embodiment of the present invention. As Figure 3 shown, after the patient swallows the endoscopic device, the magnetic control structure can be used to control the endoscopic device to move inside the patient along a preset detection path, and a comprehensive and detailed examination of the patient's stomach can be performed. And during the movement of the endoscopic device, real-time image acquisition can be carried out.
[0030] S2. Obtain the real-time captured images collected during the movement of the endoscopic device, and determine the visual recognition degree of the endoscopic device at the corresponding path points according to the quality analysis result of the real-time captured images.
[0031] Among them, the real-time captured image refers to the image that is captured and transmitted in real time by the camera configured in the endoscopic device during its movement inside the patient. These images are dynamic and continuously updated as the endoscopic device moves, and can reflect the internal environment from the current perspective of the endoscopic device. The quality analysis result refers to the result obtained after evaluating the quality of the real-time captured image. This evaluation may include multiple aspects such as the clarity and contrast of the image. The quality analysis result can be used to measure the quality level of the image. A path point refers to each position that the endoscopic device passes through during its movement, and each such position can be regarded as a path point. Multiple consecutive path points form the detection path of the endoscopic device inside the patient. Each path point has a corresponding real-time captured image collected by the endoscopic device at that position. Visual recognition ability refers to the clarity and recognizability of the internal environment reflected by the real-time captured image when the endoscopic device is at a certain path point. A high visual recognition ability means that the image is clear and rich in details, and the doctor can accurately identify the internal tissue structure or lesion conditions. On the contrary, a low visual recognition ability may result in a blurred image and missing information, which may affect the doctor's diagnostic accuracy.
[0032] When controlling the endoscopic device to move inside the patient along the detection path, the endoscopic device can perform real-time image acquisition during the movement, obtain the real-time captured images collected by the endoscopic device, analyze the clarity of the real-time captured images, and obtain the corresponding quality analysis results. Based on the quality analysis results of the real-time captured images, the visual recognition ability of the endoscopic device at the corresponding path points can be determined. If the visual recognition ability of a certain path point is low, it may mean that the image quality at that position is poor, and the doctor may have difficulty obtaining useful diagnostic information from it. At this time, the shooting position or shooting angle of the endoscopic device can be adjusted to improve the image quality and enhance the visual recognition ability.
[0033] Based on the above embodiments, the specific implementation manner of step S2 can be: S21, control the shooting module built in the endoscopic device to perform image acquisition during the movement, and transmit the real-time captured images according to the image transmission module built in the endoscopic device.
[0034] Specifically, when controlling the endoscopic device to move along the detection path inside the patient, the shooting module configured inside the endoscopic device for image shooting can be controlled to perform real-time image acquisition during the movement, and the real-time captured images, that is, the images collected in real time, can be transmitted to an external device through the image transmission module configured inside the endoscopic device. The external device can receive the image data transmitted by the image transmission module of the capsule endoscope, and can store, display, and perform corresponding analysis and processing on the received image data. At the same time, the image data can also be stored to facilitate the doctor's diagnosis and comparison.
[0035] S22. Segment the observation area and the background area in the real-time captured image according to the segmentation model, calculate the first sharpness of the observation area and the second sharpness of the background area, and the quality analysis result includes the first sharpness and the second sharpness.
[0036] In practical applications, in the real-time captured image taken during the movement of the endoscopic device, there may be some important areas in the stomach, such as the gastric mucosa area and the areas where lesions may occur. When examining a patient, since the gastric mucosa is the area that doctors focus on observing, its surface texture, color and other characteristics are crucial for disease diagnosis. Therefore, a relatively high sharpness is required for the gastric mucosa area to assist doctors in diagnosis. And for the areas where lesions may occur, such as polyps, ulcer areas, etc., an extremely high sharpness is also required to assist doctors in diagnosis. Therefore, the analysis of the pixel values of the corresponding areas is also more important. For example, the boundary sharpness of polyps, the details of the ulcer surface, etc. all depend on the sharpness information reflected by the pixel values of the corresponding areas. Therefore, the areas that need to be observed closely can be determined as the observation area. At the same time, in the real-time captured image, except for the gastric mucosa and the possible lesion areas, other parts can be regarded as the background area, such as the gas, liquid, etc. in the stomach. The background area usually has less direct help in diagnosing diseases, but it also needs to be considered when analyzing the image sharpness. The background area can be segmented out to exclude its interference with the overall sharpness evaluation during analysis.
[0037] Specifically, after obtaining the real-time captured image, the real-time captured image can be segmented into a background area and an observation area through a segmentation model that has been pre-trained with a large amount of image data. And the sharpness of the observation area can be analyzed according to the pixel values in the observation area to obtain the first sharpness corresponding to the observation degree. The sharpness of the background area can be analyzed according to the pixel values of the background area to obtain the second sharpness corresponding to the background area.
[0038] Among them, the segmentation model refers to a pre-trained model that can perform regional segmentation. The observation area refers to the relatively important areas in the real-time captured image, such as the gastric mucosa area and the areas where lesions may occur, etc. The background area refers to the remaining areas in the real-time captured image except for the gastric mucosa area and the areas where lesions may occur, such as the liquid area in the stomach, etc. The first sharpness refers to the degree of sharpness corresponding to the observation area, and the second sharpness refers to the degree of sharpness corresponding to the background area.
[0039] In some embodiments, "Segment the observation area and the background area in the real-time captured image according to the segmentation model, calculate the first sharpness of the observation area and the second sharpness of the background area" in step S22 includes the following steps: S221. Determine the region type of the observation area, where the region type includes the gastric mucosa region type and the region type of the lesion of interest.
[0040] Specifically, since the observation area may be a gastric mucosa area or a lesion area of interest where lesions may occur, the region type corresponding to the observation area can be determined first. If the observation area is a gastric mucosa area, the corresponding region type can be determined as the gastric mucosa region type. If the observation area is an area where lesions may occur, the corresponding region type can be determined as the region type of the lesion of interest. Herein, the region type refers to different region categories divided according to specific features of the image. The gastric mucosa region type refers to the type corresponding to the gastric mucosa area, and the region type of the lesion of interest refers to the type corresponding to the area where lesions may occur.
[0041] S222. When the observation area is of the gastric mucosa region type, calculate the first gradient information of the pixel values in the observation area, and obtain the first sharpness of the observation area according to the first gradient information.
[0042] Specifically, when the observation area is of the gastric mucosa region type, for the segmented gastric mucosa area, the gradient information of the pixel values corresponding to the gastric mucosa area, i.e., the first gradient information, can be calculated. For example, the Sobel operator can be used to calculate the gradients in the horizontal and vertical directions, and then the first gradient information corresponding to the gastric mucosa area can be obtained. For a clear gastric mucosa area, there will be obvious peaks in the gradient amplitude at the texture and edges, indicating large pixel value changes, rich details, and a relatively clear image. If the overall gradient amplitude is low, it indicates that the gastric mucosa area may be unclear and details are lost. Therefore, according to the first gradient information of the pixel values in the observation area, the first sharpness corresponding to the observation area can be obtained.
[0043] Among them, the first gradient information refers to the information describing the detailed features of the image obtained by calculating the gradient of the pixel values in the gastric mucosa area, which is of great significance for evaluating the sharpness of the gastric mucosa area.
[0044] S223. Or, when the observation area is of the region type of the lesion of interest, calculate the second gradient information of the pixel values in the observation area, obtain the pixel contrast information of the edge part of the observation area, and fuse and calculate the second gradient information and the pixel contrast information to obtain the first sharpness of the observation area.
[0045] Specifically, when the observation area is of the type of lesion area of interest, for the lesion area of interest, in addition to calculating the corresponding gradient information, it is also necessary to pay attention to the pixel values corresponding to the edge part of the lesion area. For example, for polyps, it is necessary to analyze the change of the edge pixel values. A clear polyp edge should have a high contrast, that is, the pixel value difference between the two sides of the edge is large. If the pixel value analysis of the lesion area shows blurred details and unclear features, it may affect the doctor's judgment of key information such as the nature and size of the lesion, thus having an adverse impact on the diagnosis. Therefore, the gradient information of the pixel values corresponding to the lesion area of interest, that is, the second gradient information, can be calculated. After obtaining the second gradient information, the pixel values on both sides of the edge of the observation area can be compared to obtain the corresponding pixel comparison information. By fusing and calculating the second gradient information and the pixel comparison information, the first clarity corresponding to the observation area can be obtained. Among them, the second gradient information refers to the information describing the detailed features of the image obtained by calculating the gradient of the pixel values of the lesion area of interest, and the pixel contrast information refers to the pixel value difference information between the two sides of the edge of the observation area.
[0046] In some embodiments, the specific implementation manner of step S223 may be: S2231, count the number of pixel points in the observation area, and obtain a range offset coefficient according to the ratio of the number of pixel points to the standard number of pixel points.
[0047] Specifically, the number of pixel points in the observation area can be counted, and the ratio of the counted number of pixel points to the pre-configured standard number of pixel points can be calculated to obtain the corresponding range offset coefficient. Among them, the number of pixel points refers to the number of pixel points in the observation area, the standard number of pixel points refers to the pre-configured standard number of pixel points, and the range offset coefficient refers to the coefficient that can offset the range size of the observation area.
[0048] S2232, adjust the standard offset amount according to the range offset coefficient to obtain the current offset amount, and expand the target pixel points of the current offset amount to both sides with the edge pixel points of the observation area as the center.
[0049] Specifically, after obtaining the range offset coefficient, the range offset coefficient can be multiplied by a pre-configured standard offset amount to obtain the offset amount corresponding to the current viewing area, that is, the current offset amount. For example, the standard offset amount can be set to 5 pixels, and the range offset coefficient is 0.4. Then, the current offset amount is 5 multiplied by 0.4, which is equal to 2 pixels, meaning that the edges of the viewing area are expanded inward and outward by 2 pixels each, so that new target pixel points can be determined. For example, in the implementation of taking an image, after obtaining the corresponding viewing area, by expanding the edge pixel points corresponding to the viewing area inward by the current offset amount, the target pixel points located inside can be obtained, and by expanding the edge pixel points corresponding to the viewing area outward by the current offset amount, the target pixel points located outside can be obtained.
[0050] Among them, the standard offset amount refers to the pre-configured standard offset amount, the current offset amount refers to the value obtained by adjusting the standard offset amount according to the range offset coefficient, the edge pixel points refer to the pixel points located on the boundary of the viewing area, and the target pixel points refer to the new pixel points obtained by adjusting the edge of the viewing area. The target pixel points are located at the positions where the original edge pixel points are expanded by the current offset amount on both sides.
[0051] S2233. Determine the target side of the target pixel points relative to the edge pixel points. The target side includes the inside and the outside. Divide the target pixel points on the same target side into the same target pixel set.
[0052] Specifically, after obtaining the target pixel points, the target side of the target pixel points relative to the edge pixel points can be determined. For target pixel point 1, if it is located inside the edge pixel points, it can be considered that the target side of target pixel point 1 relative to the edge pixel points is the inside. For target pixel point 2, if it is located outside the edge pixel points, it can be considered that the target side of target pixel point 2 relative to the edge pixel points is the outside. For multiple target pixel points with the same target side, they can be divided into the same target pixel set. For example, all the target pixel points inside can be divided into target pixel set A, and all the target pixel points outside can be divided into target pixel set B.
[0053] S2234. Obtain the pixel contrast information of the viewing area according to the maximum pixel difference corresponding to each target pixel set.
[0054] Specifically, the difference between the maximum pixel value in a target pixel set and the minimum pixel value in another target pixel set can be obtained, that is, the maximum pixel difference. The pixel contrast information corresponding to the viewing area can be obtained. According to the pixel contrast information, the contrast between the two target pixel sets can be measured. Among them, the maximum pixel difference refers to the maximum pixel value difference between two different target pixel sets in a viewing area.
[0055] S2235, weight the second gradient information based on the gradient weight, weight the pixel contrast information based on the contrast weight, and sum the weighted second gradient information and pixel contrast information to obtain the first sharpness of the observation area.
[0056] Specifically, after obtaining the second gradient information, the second gradient information can be weighted according to the pre-configured gradient weight to obtain the weighted second gradient information. According to the pre-configured contrast weight, the pixel contrast information is weighted to obtain the weighted pixel contrast information. Summing the weighted second gradient information and the weighted pixel contrast information can obtain the first sharpness corresponding to the observation area. Among them, the gradient weight is a coefficient that can be used to adjust the contribution degree of the second gradient information in the final sharpness calculation, and the contrast weight is a coefficient that can be used to adjust the contribution degree of the pixel contrast information in the final sharpness calculation.
[0057] S224, calculate the third gradient information of the background area, and obtain the second sharpness of the background area according to the third gradient information.
[0058] Specifically, by using the Sobel operator to calculate the gradients in the horizontal and vertical directions corresponding to the background area, the third gradient information corresponding to the background area can be obtained, and the second sharpness corresponding to the background area can be obtained according to the third gradient information. Among them, the third gradient information is information that can be used to describe how fast the pixel values in the background area change in the horizontal and vertical directions.
[0059] S23, weight the first sharpness based on the first weight of the observation area to obtain a first identification coefficient, weight the second sharpness based on the second weight of the background area to obtain a second identification coefficient, and the first weight is greater than the second weight.
[0060] In practical applications, since the importance of the observation area and the background area is different for physicians during diagnosis, corresponding weight values can be pre-configured for the observation area and the background area for weighted processing. Since the observation area usually contains areas that doctors need to focus on, such as gastric mucosa, lesion areas, etc., the image clarity of these areas is crucial for the accurate diagnosis of diseases. The information in the background area, such as gas and liquid in the stomach, although it may affect the overall image quality, usually does not contain key information directly used for diagnosis. Therefore, the weight corresponding to the observation area should be higher than the weight corresponding to the background area. Specifically, the first clarity of the observation area is weighted according to the first weight pre-configured for the observation area to obtain the first identification coefficient corresponding to the observation area. The second clarity of the background area is weighted according to the second weight pre-configured for the background area to obtain the second identification coefficient corresponding to the background area.
[0061] Among them, the first weight refers to the weight value pre-configured for the observation area, which is used to adjust the contribution degree of the first clarity of the observation area in the calculation of the final identification coefficient. The first identification coefficient refers to the first clarity of the observation area after being weighted by the first weight, which can reflect the influence degree of the image clarity of the observation area on the overall identification effect. The second weight refers to the weight value pre-configured for the background area, which is used to adjust the contribution degree of the second clarity of the background area in the calculation of the final identification coefficient. The second identification coefficient refers to the second clarity of the background area after being weighted by the second weight, which can reflect the influence degree of the image clarity of the background area on the overall identification effect.
[0062] S24, sum the first identification coefficient and the second identification coefficient to obtain the visual recognition degree of the endoscope device at the corresponding path point.
[0063] Specifically, by summing the first identification coefficient and the second identification coefficient, the visual recognition degree corresponding to the endoscope device at the corresponding path point can be obtained.
[0064] Through the above implementation manner, the clarity of the captured image corresponding to the corresponding path point can be more intuitively reflected.
[0065] S3, based on the comparison result of the standard recognition degree and the visual recognition degree, adjust the movement parameters of the endoscope device and determine the corresponding backtracking maintenance point of the endoscope device on the detection path.
[0066] In practical applications, by analyzing the clarity of the images captured by the endoscope device in real time, it can be judged whether it is affected by mucus, food residues, etc. When the clarity of the images captured in real time is low, it may be that the movement speed of the endoscope device is too fast, resulting in the loss of shooting details. At this time, the speed can be reduced. If the clarity of the images captured in real time is good and there is no obvious abnormality in the field of view, the speed can be appropriately increased to speed up the inspection process.
[0067] Specifically, after obtaining the visual recognition degrees corresponding to each path point, the visual recognition degrees corresponding to each path point can be compared with the standard recognition degree. If the difference is large, it can be considered that the image data obtained at the corresponding path point is unclear. When the endoscopic device moves too fast, it may cause the captured image to be blurred. Therefore, when it is found that the image is unclear, the movement parameters of the endoscopic device can be adjusted. For example, the movement speed of the endoscopic device can be reduced to obtain a more stable shooting effect. After adjusting the movement parameters, it is necessary to re-evaluate the clarity of the re-captured image. If the image captured at a certain path point is still unclear, it may be due to impurities such as mucus adhering to the endoscopic device. At this time, this path point can be recorded, and it can be re-imaged during subsequent detection tasks. Moreover, the points where relatively clear images are captured on the detection path can be determined. These points can be used as reference points for backtracking maintenance, that is, backtracking maintenance points. The liquid at the backtracking maintenance points may be relatively clear, and the endoscopic device can go to the backtracking maintenance points to dilute the mucus and improve the image clarity.
[0068] Based on the above embodiments, the specific implementation manner of step S3 can be: S31. Obtain the recognition degree difference between the standard recognition degree and the visual recognition degree, and adjust the movement speed of the endoscopic device according to the recognition degree difference. The movement parameters include the movement speed.
[0069] Specifically, the pre-configured standard recognition degree can be subtracted from the visual recognition degree at the corresponding path point to obtain the corresponding recognition degree difference. The movement speed of the endoscopic device can be adjusted according to the recognition degree difference. For example, if the recognition degree difference is too large, it can be considered that the visual recognition degree of the real-time captured image captured by the endoscopic device at the corresponding path point is small, and the real-time captured image captured at the corresponding path point may be relatively blurred, which may be due to the too fast movement speed of the endoscopic device, resulting in blurred images. At this time, the movement speed of the endoscopic device can be reduced. Among them, the standard recognition degree refers to the recognition degree pre-configured under normal conditions, the recognition degree difference refers to the difference between the standard recognition degree and the visual recognition degree, and the movement speed refers to the speed of the endoscopic device when moving.
[0070] In some embodiments, the specific implementation manner of step S31 can be: S311. Traverse multiple recognition degree difference intervals based on the recognition degree difference, and determine that the speed adjustment level corresponding to the recognition degree difference interval where the recognition degree difference is located is the selected adjustment level.
[0071] Specifically, when adjusting the moving speed of the endoscope device according to the recognition difference value, a pre-configured adjustment comparison table can be retrieved. In the adjustment comparison table, there are multiple recognition difference intervals, and each recognition difference interval has a corresponding speed adjustment level. After obtaining the recognition difference value, the multiple recognition difference intervals can be traversed according to the recognition difference value to determine the recognition difference interval where the recognition difference value is located, and the speed adjustment level corresponding to the recognition difference interval where it is located can be determined as the selected adjustment level. Among them, the recognition difference interval refers to an interval containing multiple recognition difference values, the speed adjustment level refers to the level corresponding to the magnitude of the adjustment of the moving speed of the endoscope device, and the larger the level, the corresponding larger the adjustment magnitude. The selected adjustment level refers to the speed adjustment level corresponding to the recognition difference interval where the recognition difference value is located.
[0072] S312. Determine the adjustment magnitude value corresponding to the selected adjustment level, obtain the speed reduction value based on the difference between the moving speed and the adjustment magnitude value, and adjust the moving speed based on the speed reduction value.
[0073] Specifically, in the retrieved adjustment comparison table, each speed adjustment level has a corresponding adjustment magnitude value. The adjustment magnitude value corresponding to the selected adjustment level can be determined. By calculating the difference between the moving speed of the endoscope device and the adjustment magnitude value, the speed reduction value can be obtained. According to the speed reduction value, the moving speed of the endoscope device can be adjusted to the speed reduction value. Among them, the adjustment magnitude value refers to the numerical value corresponding to the amplitude of the adjustment of the moving speed, and the speed reduction value refers to the speed value after reducing the adjustment of the moving speed.
[0074] S32. When the recognition difference value is greater than or equal to the recognition difference threshold, control the endoscope device to hover at the corresponding path point based on the hovering time period, and obtain the secondary captured image captured by the endoscope device.
[0075] Specifically, when the recognition difference value is greater than or equal to the recognition difference threshold, it can be considered that the real-time captured image captured by the endoscope device at the corresponding path point is relatively blurred. Since there may be two reasons for the blurred real-time captured image, one is that there may be mucus attached to the endoscope device, and the other is that the speed of the endoscope device may be relatively fast. At this time, the endoscope device can be controlled to hover at the corresponding path point for a period of time, for example, it can hover for two seconds. During the two seconds of hovering, control the endoscope device to perform image acquisition at the corresponding path point to obtain the corresponding secondary captured image. If the secondary captured image captured during the hovering time period is still relatively blurred, then at this time, it can be considered that the reason for the blurred image is due to the presence of mucus on the endoscope device. Among them, the hovering time period refers to the time period during which the endoscope device hovers at the corresponding path point, and the secondary captured image refers to the image captured during the hovering time period.
[0076] In practical applications, the setting of the hovering time period needs to comprehensively consider various factors. On the one hand, if the time is too short, factors causing image blurring, such as mucus flow, may not be eliminated, resulting in the still-blurred image during the re - shooting. On the other hand, if the time is too long, the entire inspection time will be extended, affecting the inspection efficiency. Generally, an initial hovering time can be preset first. For example, it can be 2 seconds. If the image captured during the first hovering is still blurred and the cause of the blurring is mucus adhesion, the hovering time can be appropriately extended at this time. For example, it can be increased to 5 seconds.
[0077] In some embodiments, the specific implementation manner of step S32 may be: S321, when the recognition difference value is greater than or equal to the recognition difference threshold, control the endoscopic device to hover at the corresponding path point based on a preset time period, and obtain a single - shot image captured by the endoscopic device.
[0078] Specifically, when the recognition difference value is greater than or equal to the recognition difference threshold, the endoscopic device can be controlled to hover at the corresponding path point within a pre - configured time period, that is, the preset time period, and the endoscopic device can be controlled to perform image acquisition during hovering to obtain a single - shot image captured by the endoscopic device. Analyze the single - shot image to determine whether it is blurred. If it is still blurred, the preset time period can be considered for appropriate extension in the follow - up. Among them, the preset time period refers to the initial hovering time period configured in advance.
[0079] S322, obtain the single - shot recognition of the single - shot image. When the single - shot recognition is greater than or equal to the recognition difference threshold, determine the extended hovering duration corresponding to the single - shot recognition.
[0080] Specifically, the single - shot recognition corresponding to the single - shot image can be calculated. For example, the single - shot image can be segmented into an observation area and a background area through a segmentation model, and the clarity corresponding to the observation area and the clarity corresponding to the background area are calculated respectively. The clarity of the observation area is weighted by the first weight corresponding to the observation area to obtain the recognition coefficient corresponding to the observation area in the single - shot image. The clarity of the background area is weighted by the second weight corresponding to the background area to obtain the recognition coefficient corresponding to the background area in the single - shot image. The recognition coefficient corresponding to the observation area is summed with the recognition coefficient corresponding to the background area to obtain the single - shot recognition corresponding to the single - shot image. If the single - shot recognition is greater than or equal to the recognition difference threshold, the corresponding extended hovering duration can be determined according to the single - shot recognition.
[0081] S323, continue to control the endoscopic device to hover at the corresponding path point based on the extended hovering duration, and obtain a second - shot image captured by the endoscopic device. The hovering time period includes the preset time period and the extended time period corresponding to the extended hovering duration.
[0082] Specifically, after obtaining the extended hovering duration corresponding to the primary recognition rate, continue to control the endoscopic device to hover at the corresponding path point according to the extended hovering duration, and the secondary captured image captured by the endoscopic device within the extended hovering duration can be obtained. Through multiple image acquisitions and multiple determinations, the accuracy can be improved.
[0083] Through the above real-time method, multiple clarity verifications can be performed at the corresponding path points, thereby improving the accuracy.
[0084] S33. Obtain the secondary recognition rate of the secondary captured image. If the secondary recognition rate is still less than or greater than or equal to the clarity threshold recognition difference threshold, determine the corresponding path point as a blurred point.
[0085] Specifically, the secondary captured image can also be segmented into an observation area and a background area through a segmentation model, calculate the clarity corresponding to the observation area and the clarity corresponding to the background area respectively, perform weighted processing on the clarity of the observation area by combining the first weight corresponding to the observation area to obtain the recognition coefficient corresponding to the observation area in the secondary captured image, perform weighted processing on the clarity of the background area by combining the second weight corresponding to the background area to obtain the recognition coefficient corresponding to the background area in the secondary captured image, sum the recognition coefficient corresponding to the observation area and the recognition coefficient corresponding to the background area to obtain the secondary recognition rate corresponding to the secondary captured image, compare the secondary recognition rate with the recognition difference threshold. If the secondary recognition rate is greater than the recognition difference threshold, it can be considered that the corresponding secondary captured image is still relatively blurred, and it can be considered that there may be mucus attached to the endoscopic device at this time. The corresponding path point can be determined as a blurred point. Subsequently, after diluting the mucus on the endoscopic device, control the endoscopic device to return to the blurred point to re-perform image acquisition. Among them, the secondary recognition rate refers to the recognition rate corresponding to the secondary captured image, and the blurred point refers to the path point where the secondary captured image with a secondary recognition rate greater than or equal to the recognition difference threshold is located.
[0086] S34. Generate a clarity display map according to the visual recognition rates of the respective path points passed through during movement along the detection path, and determine the clarity index of each detected part passed through during movement according to the clarity display map.
[0087] Specifically, when the endoscopic device moves along the detection path, the corresponding visual recognition rate can be obtained for each path point on the detection path. According to the visual recognition rates corresponding to the respective path points, a clarity display map can be generated. In the clarity display map, there are multiple detected parts, and each detected part has a corresponding clarity index. From the clarity display map, the clarity indices corresponding to the respective detected parts can be quickly determined.
[0088] Among them, the detection site refers to the site inspected by the endoscopic device, the clarity display map refers to a map that can display the image clarity of each detection site, and the clarity index refers to an index that can represent the clarity degree corresponding to the detection site.
[0089] In some embodiments, the specific implementation manner of step S34 may be: S341, retrieve the site display map, and obtain the time period when the endoscopic device passes through each detection site in the site display map.
[0090] Specifically, the pre-configured site display map can be retrieved. The site display map contains multiple detection sites, and through the recording system of the endoscopic device, the exact time period when the device passes through each detection site during the inspection can be obtained. The time period information is crucial for subsequent clarity analysis because it can help determine which path point data is related to the corresponding detection site. Among them, the site display map is a pre-configured map that contains multiple key detection sites in the patient's body.
[0091] S342, bind the visual recognition degrees corresponding to multiple path points within the corresponding time period to the corresponding detection site, and update the site display map according to the bound data to obtain the clarity display map.
[0092] Specifically, when the endoscopic device passes through a certain detection site, since each detection site may correspond to multiple path points, the visual recognition degrees corresponding to multiple path points within the corresponding time period can be bound to the corresponding detection site, which means that for each detection site, there will be visual recognition degree data of one or more path points associated with it, and the site display map can be updated according to the bound data to obtain the corresponding clarity display map. The clarity display map intuitively presents the visual recognition degree situation of each detection site during the inspection process of the endoscopic device.
[0093] S343, determine the clarity index of each detection site according to the average value of the multiple visual recognition degrees corresponding to each detection site.
[0094] Specifically, since each detection site may correspond to multiple path points and each path point has a corresponding visual recognition degree, by calculating the average value of the multiple visual recognition degrees corresponding to each detection site, the clarity index corresponding to each detection site can be determined.
[0095] S35, obtain the average index of each clarity index, and determine the detection sites with clarity indexes greater than or equal to the average index as the selected sites.
[0096] Specifically, after obtaining the clarity metrics corresponding to each detection site, the average value of multiple clarity metrics can be calculated to obtain the corresponding average metric. If the clarity metric of a detection site is greater than the average metric, it can be considered that the corresponding image at the detection site is relatively clear, and it can be considered that the liquid at the corresponding detection site may be relatively clear. The corresponding detection site can be determined as the screening site, and subsequently, the endoscopic device can be controlled to dilute mucus at the corresponding screening site.
[0097] S36. Determine the screening site that is closest to the fuzzy point and has a spatial specification greater than the device specification of the endoscopic device as the target site, and determine the center point of the multiple path points corresponding to the target site as the backtracking maintenance point.
[0098] Specifically, a screening site that is closest to the fuzzy point and has a spatial specification greater than the device specification of the endoscopic device can be obtained and determined as the target site. The target site can ensure that the endoscopic device can perform attitude adjustment, such as rotation, at the corresponding site, thereby realizing the dilution of mucus on the endoscopic device, and the center point of the multiple path points corresponding to the target site can be determined as the backtracking maintenance point.
[0099] Through the above embodiments, it can be ensured that when the endoscopic device is affected by mucus or the like, it can return to a point with relatively clear images for mucus dilution, thereby improving the image clarity.
[0100] S4. After controlling the endoscopic device to go to the backtracking maintenance point and perform attitude adjustment according to the configuration parameters, then control the endoscopic device to return to the corresponding path point to re-perform image acquisition.
[0101] Specifically, after obtaining the backtracking maintenance point, since the liquid at the backtracking maintenance point is relatively clear, the endoscopic device can be controlled to return to the corresponding backtracking point and perform attitude adjustment according to the pre-configured parameters. When performing attitude adjustment, the endoscopic device can be controlled to rotate at the corresponding backtracking maintenance point, thereby diluting the attached mucus, and then the endoscopic device can be controlled to return to the fuzzy point to perform image acquisition again, thereby improving the image clarity.
[0102] Among them, the configuration parameter refers to the duration required for the endoscopic device to perform attitude adjustment.
[0103] Based on the above embodiments, the specific implementation manner of step S4 can be: S41. Retrieve the ratio of the difference between the standard constant and the recognition difference of the fuzzy point to the recognition difference threshold, and weight the obtained difference based on the duration weight to obtain the duration adjustment amplitude corresponding to the backtracking maintenance point.
[0104] Specifically, when obtaining the configuration parameters of the endoscopic device at the retrospective maintenance point, a standard constant can be retrieved, such as 1. Then, the ratio of the recognition difference to the recognition difference threshold can be obtained, and the standard length can be subtracted by this ratio to get the corresponding difference. According to the pre-configured duration weight, the obtained difference is weighted to obtain the duration adjustment amplitude corresponding to the retrospective maintenance point. Here, the standard constant is 1, the duration weight refers to a pre-set value that can adjust the duration adjustment amplitude, and the duration adjustment amplitude refers to the amplitude of adjusting the duration during attitude adjustment.
[0105] S42. Obtain a duration adjustment coefficient based on the sum of the standard constant and the duration adjustment amplitude, and multiply the reference duration by the duration adjustment coefficient to obtain the configuration parameters of the endoscopic device at the retrospective maintenance point.
[0106] Specifically, by adding the standard constant and the duration adjustment amplitude, the corresponding duration adjustment coefficient can be obtained. By multiplying the pre-configured reference duration by the duration adjustment coefficient, the configuration parameters of the endoscopic device at the retrospective maintenance point can be obtained. Here, the duration adjustment coefficient refers to the coefficient that can adjust the standard duration.
[0107] In some embodiments, the configuration parameters can be calculated by the following formula:
[0108] where, represents the configuration parameters, represents the reference duration, represents the duration weight, represents the duration adjustment amplitude, represents the duration adjustment coefficient.
[0109] S43. Control the endoscopic device to go to the retrospective maintenance point, perform attitude adjustment based on the configuration parameters and the attitude rotation parameters, and then control the endoscopic device to return to the corresponding path point to re-perform image acquisition.
[0110] Specifically, after obtaining the configuration parameters, the endoscopic device can be controlled to go to the corresponding retrospective maintenance point to perform attitude adjustment according to the configuration parameters, dilute the mucus attached to the endoscopic device accordingly, and then the endoscopic device can be controlled to return to the corresponding path point where the image is not clear to re-perform image acquisition, thereby improving the clarity of the image.
[0111] Through the above implementation methods, the clarity of image acquisition can be significantly improved.
[0112] See Figure 4, which is a schematic structural diagram of an intelligent endoscope processing system provided by an embodiment of the present invention. The data processing system based on the intelligent endoscope processing system includes: A control module, configured to control the endoscope device to move along a detection path according to the interaction between the magnetic control module built in the endoscope device and the magnetic control structure of an external device; An acquisition module, configured to acquire real-time captured images collected by the endoscope device during movement, and determine the visual recognition degree of the endoscope device at corresponding path points according to the quality analysis result of the real-time captured images; An adjustment module, configured to adjust the movement parameters of the endoscope device based on the comparison result between the standard recognition degree and the visual recognition degree, and determine the corresponding backtracking maintenance points of the endoscope device on the detection path; A collection module, configured to control the endoscope device to go to the backtracking maintenance point to adjust its posture according to configuration parameters, and then control the endoscope device to return to the corresponding path point to re-collect images.
[0113] Figure 4 The device in the illustrated embodiment can correspondingly be used to execute Figure 2 the steps in the method embodiment shown. The implementation principle and technical effect are similar, and will not be elaborated here.
[0114] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An intelligent endoscope processing method, characterized in that: include: Controlling the endoscope device to move along the detection path according to the interaction between the magnetic control module built into the endoscope device and the magnetic control structure of the external device; Acquire real-time images captured by the endoscopy device during movement, and determine the visual recognition of the endoscopy device at a corresponding path point according to a quality analysis result of the real-time images; Based on the comparison result of the standard recognition and the visual recognition, the movement parameters of the endoscopic device are adjusted, and the corresponding backtracking maintenance point of the endoscopic device on the detection path is determined; After controlling the endoscopy device to go to the backtracking maintenance point to adjust the posture according to the configuration parameters, the endoscopy device is controlled to return to the corresponding path point to re-acquire images.
2. The method according to claim 1, characterized in that Acquiring real-time images captured by the endoscopy device during movement, and determining the visual recognition of the endoscopy device at a corresponding path point according to a quality analysis result of the real-time images, including: Controlling the built-in shooting module of the endoscope device to collect images during the movement, and transmitting the real-time shot images according to the built-in image transmission module of the endoscope device; Segmenting the observation area and the background area in the real-time captured image according to the segmentation model, calculating a first clarity of the observation area and a second clarity of the background area, wherein the quality analysis result includes the first clarity and the second clarity; The first clarity is weighted based on a first weight of the observation area to obtain a first recognition coefficient, and the second clarity is weighted based on a second weight of the background area to obtain a second recognition coefficient, wherein the first weight is greater than the second weight; The first recognition coefficient and the second recognition coefficient are summed to obtain the visual recognition of the endoscopy device at the corresponding path point.
3. The method according to claim 2, characterized in that Segmenting the observation area and the background area in the real-time captured image according to the segmentation model, and calculating the first clarity of the observation area and the second clarity of the background area, including: Determining the region type of the observation area, wherein the region type includes a gastric mucosa region type and an interested lesion region type; When the observation area is a gastric mucosa area type, first gradient information of pixel values in the observation area is calculated, and a first clarity of the observation area is obtained according to the first gradient information; or, When the observation area is a lesion area of interest, second gradient information of pixel values in the observation area is calculated, pixel contrast information of an edge portion of the observation area is obtained, and the first clarity of the observation area is obtained by fusing the second gradient information and the pixel contrast information; The third gradient information of the background area is calculated, and the second clarity of the background area is obtained according to the third gradient information.
4. The method according to claim 3, characterized in that When the observation area is a lesion area of interest, second gradient information of pixel values in the observation area is calculated, pixel contrast information of an edge portion of the observation area is obtained, and the first clarity of the observation area is obtained by fusing the second gradient information and the pixel contrast information, including: Counting the number of pixels in the observation area, and obtaining a range shift coefficient according to a ratio of the number of pixels to a standard number of pixels; The standard offset is adjusted according to the range offset coefficient to obtain a current offset, and the target pixel points of the current offset are expanded to both sides with the edge pixel points of the observation area as the center; Determine a target side of the target pixel point relative to the edge pixel point, the target side including an inner side and an outer side, and divide the target pixels on the same target side into the same target pixel set; Obtaining pixel contrast information of the observation area according to the maximum pixel difference corresponding to each target pixel set; The second gradient information is weighted based on the gradient weight, the pixel contrast information is weighted according to the contrast weight, and the weighted second gradient information and pixel contrast information are summed to obtain the first clarity of the observation area.
5. The method according to claim 1, characterized in that Based on the comparison result of the standard recognition and the visual recognition, the movement parameters of the endoscopic device are adjusted, and the corresponding backtracking maintenance point of the endoscopic device on the detection path is determined, including: Obtaining a recognition difference between the standard recognition and the visual recognition, and adjusting a moving speed of the endoscope device according to the recognition difference, wherein the moving parameter includes the moving speed; When the recognition difference is greater than or equal to a recognition difference threshold, controlling the endoscope device to hover at a corresponding path point based on a hovering time period, and acquiring a secondary captured image captured by the endoscope device; Acquire the secondary recognition of the secondary shot image, and if the secondary recognition is still greater than or equal to the recognition difference threshold, determine that the corresponding path point is a blurred point; Generate a clarity display map according to the visual recognition of each path point passed by the detection path, and determine the clarity index of each detection part passed by the detection path according to the clarity display map; Obtaining an average index of each clarity index, and determining a detection part whose clarity index is greater than or equal to the average index as a screening part; A screening part which is closest to the fuzzy point and whose spatial specification is larger than the equipment specification of the endoscopic equipment is determined as a target part, and a center point of multiple path points corresponding to the target part is determined as a backtracking maintenance point.
6. The method according to claim 5, characterized in that When the recognition difference is greater than or equal to the recognition difference threshold, controlling the endoscope device to hover at the corresponding path point based on the hovering time period, and acquiring a secondary captured image captured by the endoscope device, including: When the recognition difference is greater than or equal to the recognition difference threshold, controlling the endoscope device to hover at the corresponding path point based on a preset time period, and acquiring a single shot image taken by the endoscope device; Acquire a first recognition degree of the first captured image, and when the first recognition degree is greater than or equal to a recognition difference threshold, determine an extended hovering duration corresponding to the first recognition degree; The endoscope device is continued to be controlled to hover at a corresponding path point based on the extended hovering duration, and a secondary captured image captured by the endoscope device is acquired, wherein the hovering time period includes a preset time period and an extended time period corresponding to the extended hovering duration.
7. The method according to claim 5, characterized in that Obtaining a recognition difference between the standard recognition and the visual recognition, and adjusting the moving speed of the endoscope device according to the recognition difference, including: Traversing a plurality of recognition difference intervals based on the recognition difference value, determining that the speed adjustment level corresponding to the recognition difference interval where the recognition difference value is located is a selected adjustment level; An adjustment amplitude value corresponding to the selected adjustment level is determined, a speed reduction value is obtained according to a difference between the moving speed and the adjustment amplitude value, and the moving speed is adjusted based on the speed reduction value.
8. The method according to claim 5, characterized in that Generating a clarity display map according to the visual recognition of each path point passed by the detection path, and determining the clarity index of each detection part passed by the detection path according to the clarity display map, including: Retrieving a part display map to obtain a time period when the endoscope device passes through each detection part in the part display map; Binding the visual recognitions corresponding to the multiple path points within the corresponding time period to the corresponding detection parts, and updating the part display map according to the binding data to obtain a clarity display map; The clarity index of each detection part is determined according to the average value of multiple visual recognizabilities corresponding to each detection part.
9. The method according to claim 5, characterized in that Controlling the endoscope device to go to the backtracking maintenance point to adjust the posture according to the configuration parameters, and then controlling the endoscope device to return to the corresponding path point to re-acquire the image, including: The ratio of the recognition difference of the fuzzy point minus the standard constant and the recognition difference threshold is retrieved, and the obtained difference is weighted based on the duration weight to obtain the duration adjustment amplitude corresponding to the retrospective maintenance point; A duration adjustment coefficient is obtained according to the sum of a standard constant and the duration adjustment amplitude, and a configuration parameter of the endoscope device at the retrospective maintenance point is obtained by multiplying the reference duration and the duration adjustment coefficient; The endoscope device is controlled to go to the backtracking maintenance point, and after performing posture adjustment based on the configuration parameters and the posture rotation parameters, the endoscope device is controlled to return to the corresponding path point to re-acquire images.
10. An intelligent endoscope processing system, characterized in that: include: A control module, used for controlling the endoscope device to move along the detection path according to the interaction between the magnetic control module built into the endoscope device and the magnetic control structure of the external device; An acquisition module, used to acquire real-time images captured by the endoscope device during movement, and determine the visual recognition of the endoscope device at a corresponding path point according to a quality analysis result of the real-time images; An adjustment module, configured to adjust the movement parameters of the endoscopic device based on the comparison result of the standard recognition and the visual recognition, and determine the corresponding backtracking maintenance point of the endoscopic device on the detection path; The acquisition module is used to control the endoscopy device to go to the backtracking maintenance point to adjust the posture according to the configuration parameters, and then control the endoscopy device to return to the corresponding path point to re-acquire images.