Endoscope control method and endoscope system based on AR technology
Through AR technology and image processing, combined with SIFT algorithm and neural network model, the movement magnification of the endoscope is dynamically adjusted, which solves the problems of operational instability and cavity wall damage during endoscopic surgery, and achieves higher operational accuracy. sex and safety.
Patent Information
- Application Number
- CN202410557787.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-05-08
AI Technical Summary
During endoscopic surgery, doctors can easily cause the endoscope to collide with the inner wall of the cavity due to fatigue and other factors, causing damage. Current technology makes it difficult to achieve real-time and accurate endoscope control, especially in complex cavity environments.
Adopt an endoscope control method based on AR technology to collect image sequences through binocular lenses, calculate image similarity and displacement data, generate distance information, dynamically adjust the movement multiple, and combine SIFT algorithms and neural network models to optimize image contrast and feature points Matching, reducing the amount of calculation and response time, and achieving real-time control.
It effectively avoids the collision between the endoscope and the inner wall of the cavity, improves the accuracy and safety of the operation, reduces errors caused by doctor fatigue, and improves the smoothness and safety of the operation.
Smart Images

Figure CN118141307B
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical technology, and in particular to an endoscope control method and an endoscope system based on AR technology. Background Art
[0002] The AR-based intelligent visual endoscope is an intelligent AR device used in medical treatment. Usually, the image signal acquisition end is inserted into the patient's body. The information acquisition end transmits the detected image information to the signal receiving mechanism in the form of AR video, and then the data is processed by the data processing module. At this time, the corresponding AR picture will be displayed inside the AR glasses body.
[0003] In the existing operation mode, doctors control the movement of the endoscope slowly based on their own experience to complete endoscopic surgery. However, in actual operation, not all cavity channels are very complex environments, so the movement speed of the endoscope is very fast in some cavities, and the movement speed becomes slow in some cavities. When doctors perform complex endoscopic surgery, it is easy to cause damage to the inner wall of the cavity due to factors such as fatigue. For example, when the endoscope moves quickly and suddenly enters a complex cavity, the endoscope will collide with the cavity because of the lack of control, causing the surface of the cavity to be scratched. Summary of the invention
[0004] The content of this application is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this application is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0005] As a first aspect of the present application, in order to solve the technical problems mentioned in the above background technology section, some embodiments of the present application provide an endoscope control method based on AR technology, comprising the following steps:
[0006] Step 1: Collect the left image sequence of the left camera and the right image sequence of the right camera in the binocular lens in time sequence;
[0007] Step 2: Align each image in the left image sequence with each image in the right image sequence in time sequence to obtain an image group arranged in time sequence;
[0008] Step 3: Calculate the proportion of similar regions in the image groups in turn to obtain the time series information of image similarity;
[0009] Step 4: Input the time series information of image similarity into the distance neural network model to obtain distance information;
[0010] Step 5: Generate control parameters based on the distance information to generate the movement multiple of the binocular lens to control the movement of the binocular lens.
[0011] In the solution provided by the present application, an image processing device is used to generate distance information between the binocular lens and the object in front, and the distance information is used to control the movement magnification of the binocular lens. Therefore, during the operation, the movement magnification of the binocular lens will constantly change to adapt to the surrounding situation. Therefore, when the doctor is operating, when the scene in front is relatively simple, because the movement magnification is large, he can pass through quickly or complete the corresponding operation; when the scene in front is complex, because the movement magnification is small, even if the doctor's hands shake due to meaningless behavior, it will not cause the end of the binocular lens to move significantly, causing damage to the patient.
[0012] The image information acquired by the camera needs to form video information. Generally speaking, the image information taken by the current camera has at least 60 frames, so there are at least 60 pictures in 1 second. If similarity matching is performed on each frame of the picture, the amount of calculation will be too large and the distance information cannot be generated in real time. To solve this problem, this application provides the following technical solutions:
[0013] Furthermore, step 2 includes the following steps:
[0014] Step 21: Collect the displacement data of the binocular lens, and generate a corresponding acquisition node when the binocular lens moves to a preset unit distance;
[0015] Step 22: extracting a picture closest to each acquisition node from the left image sequence to obtain a left camera acquisition sequence; extracting a picture closest to each acquisition node from the right image sequence to obtain a right camera acquisition sequence;
[0016] Step 23: Align each image in the left camera acquisition sequence and the right camera acquisition sequence in time sequence to obtain an image group arranged in time sequence.
[0017] In the technical solution provided by the present application, the corresponding acquisition points will be generated according to the displacement data of the binocular lens, that is, according to the displacement distance of the binocular lens, and then the image sequence collected by the binocular camera will be deleted based on the acquisition points, thereby reducing the corresponding amount of calculation. By obtaining the corresponding acquisition points based on the displacement data, rather than collecting according to time, the movement of the binocular lens can be controlled as much as possible to avoid the design of too long acquisition intervals, which will cause greater risk factors. For example, when the binocular lens moves very fast, there will be more acquisition points in the same time, so that the position change of the binocular lens can be discovered in time. On the contrary, when the binocular lens moves little or even does not move, the number of acquisition points will be reduced to reduce the amount of calculation and increase the response rate.
[0018] Because the distance information needs to be calculated as quickly as possible to control the movement multiple of the binocular lens, in order to avoid the situation where the calculation time is too long and the control multiple cannot be generated in real time according to the movement of the binocular lens. In the aforementioned scheme, although the number of pictures that need to be compared has been reduced. However, each picture has many pixels, and comparing the overall content of the two pictures will affect the system response rate due to the large amount of calculation, and thus the control multiple cannot be generated in real time. To this end, the present application provides the following technical solutions:
[0019] Furthermore, step 3 includes the following steps:
[0020] Step 31: Pre-set the comparison range;
[0021] Step 32: For any two images P1 and P2 in an image group, a comparison range in image P1 close to an edge of image P2 is used as a comparison area;
[0022] Step 33: input the comparison area and the image P2 into the image comparison model to obtain the overlapping area between the comparison area and the image P2;
[0023] Step 34: The area from the overlapping area in the image P2 to the edge of one side of the image P1 is taken as a similar area, and the similarity ratio is calculated.
[0024] In the technical solution provided by the present application, two pictures are not directly input into the picture comparison model for similarity comparison, but the comparison area of picture P1 and picture P2 are input into the comparison model for similarity comparison, so that the rest of picture P1 except the comparison area does not need to be compared for similarity, so the difficulty of image comparison can be effectively reduced. And compared with the method of reducing the image clarity for similarity comparison, this solution will not lose the detailed features of the image, so the accuracy of comparison will be higher.
[0025] Furthermore, the image comparison model calculates the similarity region between the image P2 and the comparison region in the following manner:
[0026] S1: Extract features from the contrasting area and the image P2 to obtain key points of the contrasting area and the image P2 respectively;
[0027] For an image I(x, y), the scale space L(x, y, σ) is defined as: L(x, y, σ) = G(x, y, σ) × I(x, y);
[0028] Where G(x, y, σ) is a Gaussian function;
[0029] ;
[0030] S2: For each key point, determine one or more main directions based on the gradient direction histogram in the neighborhood of the key point;
[0031] The gradient amplitude m and direction θ of the key points are:
[0032] ;
[0033] ;
[0034] Where x and y are the horizontal and vertical coordinates of the pixel, σ is the standard deviation of the Gaussian function, m(x, y) represents the gradient amplitude at the position (x, y), and L refers to the image after Gaussian blurring of image I at different scales;
[0035] S3: construct feature point sets A and B of the comparison area and the image P2 respectively, where A is the feature point set of the comparison area, and B is the feature point set of the comparison area;
[0036] S4: Match the feature points in the feature point set A and the feature point set B to obtain a similar area between the image P2 and the comparison area.
[0037] Furthermore, the matching method of feature points in S4 is as follows:
[0038] For feature point F1 in feature point set A and feature point F2 in feature point set B, the matching degree is calculated as follows:
[0039] ;
[0040] Among them, cosθ represents the similarity between feature point F1 and feature point F2, and They represent the i-th component in the descriptor vector of feature point F1 and feature point F2 respectively, and n represents the dimension of the feature point descriptor vector.
[0041] The solution provided by the present application uses the SIFT algorithm to extract corresponding feature points, and forms a feature point set based on this, and uses the matching degree of the feature points to realize the similarity calculation between pictures, which can have the characteristic of scale invariance, and can effectively increase the accuracy of similarity calculation, that is, when the left and right cameras of the binocular lens are shooting the same area, and there is a deviation due to the angle or slight distance, the scale invariance characteristic of the SIFT algorithm can also be used to match feature points. In the aforementioned solution, a feature point matching algorithm is provided, but for a picture or a comparison area, there will still be many feature points. Extracting all these feature points and matching the feature points will affect the generation efficiency of the matching multiples due to the large number of feature points, and reducing the number of feature points may result in low accuracy of the obtained similar area.
[0042] Furthermore, after at least a feature points in the feature point set A are successfully matched with feature points in the feature point set B, the matching of the feature points is terminated, and the feature point farthest from the edge of the image P2 is used as the boundary of the similar area.
[0043] In the technical solution provided by the present application, the middle feature point is first matched, and then after a feature points are matched, the farthest feature point is used as the dividing line of the similar area. Therefore, the number of feature point matches can be reduced to the maximum extent, and the system response time can be reduced. The reason for this design in the present application is essentially to find the edge contours of similar areas, because the middle areas in the similar areas are actually the same, and the feature points must be matched. Therefore, it is only necessary to find the area where the feature points can match each other. In this way, the number of feature point comparisons can be reduced by comparing from the middle position of the picture.
[0044] Furthermore, the size of a is related to the clarity of the image, a=[g / G], g is the number of pixels in the image, G is a preset proportional coefficient, and [] is a rounding symbol.
[0045] In the technical solution provided in the present application, the relationship between precision and accuracy can be controlled by adjusting the proportional coefficient. When the precision needs to be increased, the size of G is reduced, and vice versa.
[0046] As a second aspect of the present application, the present application provides an endoscope system, in which the aforementioned endoscope control method based on AR technology is applied to the endoscope system; the endoscope system comprises: a binocular lens, an image processing device, an information processing device, and a control device; the binocular lens is signal-connected to the image processing device, and the information processing device is signal-connected to the image processing device and the control device respectively;
[0047] Wherein, the binocular lens is used to receive image information and send the image information to the image processing device;
[0048] An image processing device, used to receive image information, determine the distance information between the binocular lens and the front object according to the image information, and then send the distance information to the information processing device;
[0049] An information processing device, used to generate a control parameter according to the distance information and send the control parameter to the control device;
[0050] A control device, used for generating a movement multiple of the binocular lens to control the movement of the binocular lens;
[0051] The control parameter is used to change the movement multiple of the binocular lens controlled by the control device.
[0052] Furthermore, the distance information is positively correlated with the movement multiple.
[0053] The distance information is positively correlated with the movement multiple, so when the binocular lens is close to the obstacle in front, the operator will move the lens more slowly, and when the binocular lens is far from the obstacle in front, the operator will move the lens faster, so it can be effectively avoided.
[0054] The beneficial effect of the present application is that, compared with the problem that the lens is easily in contact with the inner wall of the cavity caused by directly using a control device to use a fixed movement multiple to control the movement of the binocular lens, in the solution provided by the present application, an image processing device is used to generate distance information between the binocular lens and the object in front, and the movement multiple of the binocular lens is controlled by the distance information, so during the operation, the movement multiple of the binocular lens will constantly change to adapt to the surrounding conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The illustrative embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application.
[0056] In addition, throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the components and elements are not necessarily drawn to scale.
[0057] In the attached picture:
[0058] Figure 1 The figure is a flow chart of an endoscope control method based on AR technology.
[0059] Figure 2 This is a schematic diagram of what happens when the images from the binocular lenses overlap. DETAILED DESCRIPTION
[0060] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms, and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0061] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0062] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0063] An endoscope control system based on AR technology, comprising: a binocular lens, an image processing device, an information processing device, and a control device; the binocular lens is signal-connected to the image processing device, and the information processing device is signal-connected to the image processing device and the control device, respectively; wherein the binocular lens is used to receive image information and send the image information to the image processing device; the binocular lens is a common camera in existing endoscopes, and the technical solution provided in this application is equipped with two cameras compared to the conventional endoscope that is only equipped with one camera. The specific camera arrangement is not described here. However, the two cameras are in the same position at the end of the endoscope, so the images taken by the two cameras will have a large overlap area.
[0064] The image processing device is used to receive image information, determine the distance information between the binocular lens and the front object according to the image information, and then send the distance information to the information processing device.
[0065] The image processing device essentially performs binocular vision calculation based on the image information of the two channels generated by the binocular lens, thereby obtaining the distance information between the front area and the binocular lens. This distance information is the distance between the obstacle in front of the binocular lens and it.
[0066] The information processing device is used to generate control parameters according to the distance information and send the control parameters to the control device. The information processing device is actually an information forwarding and generating device, which is mainly used for controlling the control device.
[0067] The control device is used to generate the movement multiple of the binocular lens to control the movement of the binocular lens; wherein the control parameter is used to change the movement multiple of the binocular lens controlled by the control device. The control device is actually a control platform for the operation of the endoscope. In the operation of some electronic endoscopes, the forward and backward movement of the endoscope is controlled by the operating platform. This control method is mainly used to achieve the magnification and reduction of the control multiple. The specific principle is like the DPI speed of the mouse. When the DPI is high, the movement rate of the mouse on the computer is fast, and vice versa. Correspondingly, in the operation of the endoscope, there is also an operating platform for controlling the movement of the endoscope. This operating platform also has a corresponding DPI, or the movement rate described in this application.
[0068] Specifically, the distance information is positively correlated with the moving magnification. That is, the farther the obstacle in front is from the binocular lens, the greater the moving magnification, and the faster the endoscope moves during operation. On the contrary, the smaller the obstacle in front is from the binocular lens, the smaller the moving magnification in front is, and the lower the moving speed of the endoscope during operation.
[0069] refer to Figure 1 , an endoscope control method based on AR technology, applied to the aforementioned endoscope control system based on AR technology, the endoscope control method based on AR technology comprises the following steps:
[0070] Step 1: Collect the left image sequence of the left camera and the right image sequence of the right camera in the binocular lens in time sequence.
[0071] The binocular lens includes two cameras, namely the left camera and the right camera. The two cameras start working and end working synchronously. Therefore, the image information of the two cameras is collected in time sequence, and the images of the two cameras can be aligned according to the time sequence information. At this time, the content captured by the left camera and the right camera are the same.
[0072] Step 2: Align each picture in the left image sequence with each picture in the right image sequence in time sequence to obtain an image group arranged in time sequence.
[0073] Step 2 includes the following steps:
[0074] Step 21: Collect the displacement data of the binocular lens, and generate a corresponding acquisition node when the binocular lens moves to a preset unit distance.
[0075] The displacement data of the binocular lens needs to be obtained through a displacement sensor or a gyroscope. How to set a displacement sensor on the binocular lens is not described here. The displacement sensor here can be a laser sensor, which can calculate the displacement according to the position change of the laser reflected on the surface. This technology is mature.
[0076] Therefore, after the displacement sensor is set on the binocular lens, a collection point can be generated when the binocular lens moves a certain distance. For example, the movement of 2mm is used as the position to generate the collection point, so a collection point will be generated every time the binocular lens moves 2mm. Furthermore, when the moving rate is fast, the number of collection points per unit time is large, and when the moving rate is slow, the number of collection points per unit time is small. In this way, the number of collection points can be adaptively adjusted to avoid too many collection points, which will cause frequent calculations and affect the corresponding rate of the system, or too few collection points, which will make the binocular lens prone to collision.
[0077] Step 22: Extract a picture closest to each acquisition node from the left image sequence to obtain a left camera acquisition sequence; extract a picture closest to each acquisition node from the right image sequence to obtain a right camera acquisition sequence.
[0078] The left camera acquisition sequence is actually a sequence of pictures obtained after acquiring pictures from the left image sequence at intervals of acquisition points. Specifically, the left image sequence is the original image sequence acquired by the left camera. For example, if the frame rate of the video acquired by the left camera is 60 frames per second, then the left image sequence is a video stream of 60 pictures per second. The left image acquisition sequence is a sequence of pictures related to the acquisition points. For example, if there is only one acquisition point in 1 second, the picture closest to the acquisition point will be retained as the left camera acquisition sequence, and the remaining 59 pictures will be deleted. Similarly, the relationship between the right camera acquisition sequence and the right image sequence is the same.
[0079] Step 23: Align each image in the left camera acquisition sequence and the right camera acquisition sequence in time sequence to obtain an image group arranged in time sequence.
[0080] Step 3: Calculate the proportion of similar regions in the image groups in turn to obtain the time series information of the image similarity.
[0081] Step 3 includes the following steps:
[0082] Step 31: Pre-set the comparison range.
[0083] The comparison range here is actually the maximum overlapping range of the left camera and the right camera in the binocular lens. Because the left camera and the right camera are not in the same position, the images collected by the two cameras cannot overlap 100%. Therefore, directly comparing two pictures will increase the difficulty of comparison. For this reason, a comparison range needs to be set. For example, setting the comparison range to 80% means that 80% of the picture will be used for the comparison area, and the remaining 20% will be discarded.
[0084] Step 32: For any two pictures P1 and P2 in an image group, a comparison range in picture P1 close to an edge of picture P2 is used as a comparison area.
[0085] The comparison range has been pre-set in step 31, so the comparison area is actually set according to the size of the comparison range. In this solution, the comparison range is set in the image P1, that is, 80% of the area on the right side of the image P1 is used as the comparison area, and the remaining area is directly discarded.
[0086] Step 33: Input the comparison area and the image P2 into the image comparison model to obtain the overlapping area between the comparison area and the image P2.
[0087] Step 34: The area from the overlapping area in the image P2 to the edge of one side of the image P1 is taken as a similar area, and the similarity ratio is calculated.
[0088] The similarity ratio is actually the ratio of the overlapping area to the image P2. For example, if the size of the image P2 is 100 and the overlapping area is 80, the similarity ratio is 80%.
[0089] Furthermore, the image comparison model calculates the similarity region between the image P2 and the comparison region in the following manner:
[0090] S1: Extract features from the contrasting area and the image P2 to obtain key points of the contrasting area and the image P2 respectively;
[0091] For an image I(x, y), the scale space L(x, y, σ) is defined as: L(x, y, σ) = G(x, y, σ) × I(x, y);
[0092] Where G(x, y, σ) is a Gaussian function;
[0093] ;
[0094] S2: For each key point, determine one or more main directions based on the gradient direction histogram in the neighborhood of the key point;
[0095] The gradient amplitude m and direction θ of the key points are:
[0096] ;
[0097] ;
[0098] Where x and y are the horizontal and vertical coordinates of the pixel, σ is the standard deviation of the Gaussian function, m(x, y) represents the gradient amplitude at the position (x, y), and L refers to the image after Gaussian blurring of image I at different scales;
[0099] S3: construct feature point sets A and B of the comparison area and the image P2 respectively, where A is the feature point set of the comparison area, and B is the feature point set of the comparison area;
[0100] S4: Match the feature points in the feature point set A and the feature point set B to obtain a similar area between the image P2 and the comparison area.
[0101] The matching method of feature points in S4 is as follows:
[0102] For feature point F1 in feature point set A and feature point F2 in feature point set B, the matching degree is calculated as follows: ;
[0103] Among them, cosθ represents the similarity between feature point F1 and feature point F2, and They represent the i-th component in the descriptor vector of feature point F1 and feature point F2 respectively, and n represents the dimension of the feature point descriptor vector.
[0104] The feature extraction and feature point matching of the above scheme is based on the matching method established by the SIFT algorithm, which has the characteristic of scale invariance. In practice, it can avoid the problem that the overlapping area caused by the position difference of the binocular cameras may not be recognized due to certain scaling and rotation.
[0105] Furthermore, in S4, after at least a feature points in the feature point set A are successfully matched with feature points in the feature point set B, the matching of the feature points is terminated, and the feature point farthest from the edge of the image P2 is used as the boundary of the similar area.
[0106] refer to Figure 2 The boundary line of the actual overlapping area of images P1 and P2 will be located in the middle area, so extracting and matching feature points from the middle to both sides can reduce the number of feature points extracted and reduce system latency.
[0107] Furthermore, the size of a is related to the clarity of the image, a=[g / G], g is the number of pixels in the image, G is a preset proportional coefficient, and [] is a rounding symbol.
[0108] Step 4: Input the time series information of image similarity into the distance neural network model to obtain distance information.
[0109] The construction method of the neural network model is an existing technology. When the similarity of the pictures of the left and right cameras is obtained, the corresponding distance information can be converted. The neural network model is used for conversion here, which adopts the empirical calculation ability of the neural network model after learning to reduce the calculation difficulty, and then the corresponding distance information can be obtained. The reason for this setting is that the movement multiple of the binocular lens is not a continuous variable, but a discrete variable. When modifying, it is also adjusted between different gears. Therefore, for the acquisition of distance information, only fuzzy acquisition is needed.
[0110] Step 5: Generate control parameters based on the distance information to generate the movement multiple of the binocular lens to control the movement of the binocular lens.
[0111] In the above scheme, the distance information between the binocular lens and the object in front can be obtained, and the conversion method between the control magnification and the distance information can be preset. In practice, any magnification can be selected. For example, when the distance between the binocular lens and the front is less than 5 cm, the control magnification is set to 1 times, and when it is greater than 5 cm, it is set to 2 times.
[0112] The above description is only some preferred embodiments of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present application is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present application to form a technical solution.
Claims
1. An endoscope system, characterized in that: include: Binocular lens, image processing device, information processing device, and control device; The endoscope system uses an endoscope control method based on AR technology to generate control parameters for controlling the movement of the binocular lens; The endoscope control method based on AR technology includes the following steps: Step 1: Collect the left image sequence of the left camera and the right image sequence of the right camera in the binocular lens in time sequence; Step 2: Align each image in the left image sequence with each image in the right image sequence in time sequence to obtain an image group arranged in time sequence; Step 3: Calculate the proportion of similar regions in the image groups in turn to obtain the time series information of image similarity; Step 4: Input the time series information of image similarity into the distance neural network model to obtain distance information; Step 5: Generate control parameters according to the distance information, which are used to generate the movement multiple of the binocular lens to control the movement of the binocular lens; Step 2 includes the following steps: Step 21: Collect the displacement data of the binocular lens, and generate a corresponding acquisition node when the binocular lens moves to a preset unit distance; Step 22: extracting a picture closest to each acquisition node from the left image sequence to obtain a left camera acquisition sequence; Extract the image closest to each acquisition node from the right image sequence to obtain the right camera acquisition sequence; Step 23: align each image in the left camera acquisition sequence and the right camera acquisition sequence in time sequence to obtain an image group arranged in time sequence; Step 3 includes the following steps: Step 31: Pre-set the comparison range; Step 32: For any two images P1 and P2 in an image group, a comparison range in image P1 close to an edge of image P2 is used as a comparison area; Step 33: input the comparison area and the image P2 into the image comparison model to obtain the overlapping area between the comparison area and the image P2; Step 34: The area from the overlapping area in the image P2 to the edge of one side of the image P1 is taken as a similar area, and the similarity ratio is calculated; The image comparison model calculates the similarity between the image P2 and the comparison area in the following way: S1: Extract features from the contrasting area and the image P2 to obtain key points of the contrasting area and the image P2 respectively; For an image I(x, y), the scale space L(x, y, σ) is defined as: L(x, y, σ) = G(x, y, σ) × I(x, y); Where G(x, y, σ) is a Gaussian function; ; S2: For each key point, determine one or more main directions based on the gradient direction histogram in the neighborhood of the key point; The gradient amplitude m and direction θ of the key points are: ; Where x and y are the horizontal and vertical coordinates of the pixel, σ is the standard deviation of the Gaussian function, m(x, y) represents the gradient amplitude at the position (x, y), and L refers to the image after Gaussian blurring of image I at different scales; S3: construct feature point sets A and B of the comparison area and the image P2 respectively, where A is the feature point set of the comparison area and B is the feature point set of the image P2; S4: Matching feature points in feature point set A and feature point set B to obtain a similar area between the image P2 and the comparison area; In S4, when matching the feature points in the feature point set A and the feature point set B, the feature point located in the middle of the image P2 is first compared with the feature points in the comparison area; In S4, after at least a feature points in the feature point set A are successfully matched with feature points in the feature point set B, the matching of feature points is terminated, and the feature point farthest from the edge of the image P2 is used as the boundary of the similar area; The size of a is related to the clarity of the image, a=[g / G], g is the number of pixels in the image, G is a preset scale factor, and [] is a rounding symbol.
2. The endoscope system according to claim 1, characterized in that: The matching method of feature points in S4 is as follows: For feature point F1 in feature point set A and feature point F2 in feature point set B, the matching degree is calculated as follows: ; Among them, cosθ represents the similarity between feature point F1 and feature point F2, and ∈ R ∈ F1, ∈ R 2, ∈ F2, ∈ R 3, ∈ R 4, ∈ R 5, ∈ R 6, ∈ R 7, ∈ R 8, ∈ R 9, ∈ R 10, ∈ R 11, ∈ R 12, ∈ R 13, ∈ R 14, ∈ R 15, ∈ R 16, ∈ R 17, ∈ R 18, ∈ R
Citation Information
Patent Citations
Visual mapping and positioning method based on binocular camera
CN115049731A
Three-dimensional reconstruction method of binocular endoscope
CN115311405A
Three-dimensional imaging method and device based on binocular stereo measurement endoscope
CN116188554A
Surgical robot system and adaptive control method thereof
KR1020120068597A
3D visualization enhancement for depth perception and collision avoidance
US20220071716A1
