Endoscope field angle detection method and device based on current prediction model
Through the endoscopic field angle detection method based on the current prediction model, the spatial magnetic field and imaging components are used to move the endoscopic without contact, combined with the predicted current output from the current prediction model, the problem of low detection accuracy in the prior art is solved. It realizes efficient and accurate field-angle detection of endoscopes of various specifications.
Patent Information
- Application Number
- CN202411168117.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, there are artificial errors and mechanical fixation assembly errors in the endoscopic field angle detection, resulting in low detection accuracy and the inability to efficiently measure the field angle of endoscopy of various specifications.
Using the detection method based on the current prediction model, the spatial magnetic field component moves the endoscope to the target position without contact, collects the target target image through the imaging component, and controls the magnetic field with the predicted current output from the current prediction model to accurately determine the internal The field angle of the viewing mirror.
It avoids assembly errors caused by mechanical fixation, improves the accuracy of endoscopic field angle detection, realizes target replacement detection for various specifications of endoscopics, and expands the application range of detection devices.
Smart Images

Figure CN119063971A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of endoscopes, and in particular to a method and device for detecting an endoscope field of view angle based on a current prediction model. Background Art
[0002] As a medical device, the optical properties of the endoscope affect its imaging quality, which indirectly affects the safety of diagnosis and treatment. Therefore, the field of view angle is one of the optical parameters. The higher the measurement accuracy, the better it can characterize the characteristics of the endoscope and the higher the safety of diagnosis and treatment.
[0003] In the related technology, some use manual measurement, and some use mechanical structures to fix the endoscope for measurement. However, manual measurement has human errors, and mechanical fixation has assembly errors, which will correspondingly reduce the detection accuracy of the endoscope's field of view angle. Summary of the invention
[0004] The endoscope field of view angle detection device based on the current prediction model and the endoscope field of view angle detection method based on the current prediction model provided in the present application can improve the detection accuracy of the endoscope field of view angle.
[0005] A technical solution adopted in the present application is to provide an endoscope field of view angle detection device based on a current prediction model, and the detection device includes: a target component, the target component is used to provide multiple targets of different sizes in the same plane; a spatial magnetic field component, the spatial magnetic field component is used to generate a magnetic field to control the movement of the endoscope to be tested in the magnetic field; an imaging component, the imaging component is used to connect the exit pupil end of the endoscope to be tested and collect the image of the exit pupil end; a processing component, the processing component is respectively connected to the imaging component and the spatial magnetic field component; before the imaging component is connected to the exit pupil end of the endoscope to be tested, the processing component uses the imaging component to collect target images of multiple targets of different sizes in the target component, and identifies the inner and outer ring information of each target in the target image; the processing component controls the spatial magnetic field component to generate a corresponding magnetic field based on the inner and outer ring information, so that the endoscope to be tested in the magnetic field moves to the target position, and uses the imaging component to collect the target target image corresponding to the endoscope to be tested when it is at the target position; and determines the field of view angle of the endoscope to be tested based on the target target image; wherein the target target image includes at least an inner ring image and an outer ring image of a target.
[0006] The detection device further includes: a clamping component, which is used to clamp the endoscope to be tested and drive the endoscope to be tested to move under the control of the magnetic field.
[0007] Among them, the processing component is also used to control the space magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, so that the endoscope to be tested in the magnetic field moves to the first position at a first speed, and then moves the endoscope to be tested in the magnetic field to the target position at a second speed, wherein the first speed is greater than the second speed.
[0008] Among them, the processing component is also used to input the inner and outer ring information and the weight information of the endoscope to be tested into the current prediction model, obtain the predicted current output by the current prediction model, and use the predicted current to control the space magnetic field component to generate a corresponding magnetic field.
[0009] The targets of different sizes are distributed in the same plane from small to large, and the centers of the targets of different sizes are on the same straight line.
[0010] Another technical solution adopted by the present application is to provide an endoscope field of view angle detection method based on a current prediction model, which is applied to a detection device, wherein the detection device includes: a target component, a spatial magnetic field component, an imaging component and a processing component; the target component is used to provide a plurality of targets of different sizes in the same plane; the spatial magnetic field component is used to generate a magnetic field to control the movement of the endoscope to be tested in the magnetic field; the imaging component is used to connect the exit pupil end of the endoscope to be tested and collect the image of the exit pupil end; the processing component is respectively connected to the imaging component and the spatial magnetic field component; the method includes: the processing component is connected to the imaging component Before reaching the exit pupil end of the endoscope to be tested, the imaging component is used to collect target images of multiple targets of different sizes in the target component, and the inner and outer ring information of each target in the target image is identified; the processing component controls the space magnetic field component to generate a corresponding magnetic field according to the inner and outer ring information, so that the endoscope to be tested in the magnetic field moves to the target position; the processing component uses the imaging component to collect the target target image corresponding to the endoscope to be tested when it is at the target position; the processing component determines the field of view angle of the endoscope to be tested according to the target image; wherein the target image includes at least an inner ring image and an outer ring image of a target.
[0011] Among them, the processing component controls the space magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, so that the endoscope to be tested in the magnetic field moves to the target position, including: the processing component controls the space magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, so that the endoscope to be tested in the magnetic field moves to the first position at a first speed; the processing component receives the first target image corresponding to the endoscope to be tested at the first position captured by the imaging component; the processing component controls the space magnetic field component to generate a corresponding magnetic field again according to the first target image, so that the endoscope to be tested in the magnetic field moves to the target position at a second speed, wherein the first speed is greater than the second speed.
[0012] Among them, the processing component controls the space magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, including: the processing component inputs the inner and outer loop information and the weight information of the endoscope to be tested into the current prediction model to obtain the predicted current output by the current prediction model; the processing component uses the predicted current to control the space magnetic field component to generate a corresponding magnetic field.
[0013] Among them, the current prediction model includes: a mobile trajectory prediction network and a current prediction network; the processing component inputs the inner and outer loop information and the weight information of the endoscope to be tested into the current prediction model to obtain the predicted current output by the current prediction model, including: the processing component inputs the inner and outer loop information into the mobile trajectory prediction network to obtain the predicted mobile trajectory output by the mobile trajectory prediction network; the processing component inputs the predicted mobile trajectory and the weight information of the endoscope to be tested into the current prediction network to obtain the predicted current output by the current prediction network.
[0014] Among them, the current prediction model is trained in the following manner: determining a first loss value between the predicted moving trajectory and the actual moving trajectory; determining a second loss value between the predicted current and the actual current; combining the first loss value and the second loss value to obtain a third loss value; and adjusting the network parameters of the moving trajectory prediction network and the current prediction network according to the third loss value.
[0015] The beneficial effects of the present application are as follows: different from the prior art, the endoscope field of view angle detection device based on the current prediction model and the endoscope field of view angle detection method based on the current prediction model of the present application place the endoscope to be tested in a spatial magnetic field without contact, and use the magnetic field generated by the spatial magnetic field component to control the endoscope to be tested to move to the target position corresponding to the target, and then use the imaging component to collect the target target image corresponding to the endoscope to be tested when it is at the target position, and then determine the field of view angle of the endoscope to be tested according to the target target image. Since the endoscope to be tested is placed in the spatial magnetic field without contact, it can avoid assembly errors caused by mechanical fixation, thereby improving the detection accuracy of the endoscope field of view angle. Furthermore, the target component can provide multiple targets of different sizes in the same plane, without the need for target replacement, thereby facilitating the field of view angle detection of endoscopes of various specifications, thereby improving the application scope of the endoscope field of view angle detection device based on the current prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] in:
[0018] Figure 1 It is a structural schematic diagram of an embodiment of an endoscope provided by the present application;
[0019] Figure 2 It is a structural schematic diagram of an embodiment of an optoelectronic link of an endoscope provided by the present application;
[0020] Figure 3It is a structural schematic diagram of an embodiment of an endoscope field of view angle detection device based on a current prediction model provided by the present application;
[0021] Figure 4 It is a structural schematic diagram of an embodiment of a target assembly provided by the present application;
[0022] Figure 5 It is a flow chart of an embodiment of an endoscope field of view angle detection method based on a current prediction model provided by the present application;
[0023] Figure 6 It is a flow chart of an embodiment of an endoscope field of view angle detection method based on a current prediction model provided by the present application;
[0024] Figure 7 It is a flowchart of an embodiment of step 52 or step 62 provided by the present application;
[0025] Figure 8 is a flowchart of an embodiment of step 71 provided by the present application;
[0026] Fig. 9 It is a flowchart of an embodiment of a training current prediction model provided by the present application. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0028] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0029] As a medical device, the optical properties of the endoscope affect its imaging quality, which indirectly affects the safety of diagnosis and treatment. Therefore, the field of view angle is one of the optical parameters. The higher the measurement accuracy, the better it can characterize the characteristics of the endoscope and the higher the safety of diagnosis and treatment.
[0030] In the related technology, some use manual measurement, and some use mechanical structures to fix the endoscope for measurement. However, manual measurement has human errors, and mechanical fixation has assembly errors, which will correspondingly reduce the detection accuracy of the endoscope's field of view angle.
[0031] Based on this, the present application proposes to place the endoscope to be tested in a spatial magnetic field without contact, and use the magnetic field generated by the spatial magnetic field component to control the endoscope to be tested to move to the target position corresponding to the target, and then use the imaging component to collect the target target image corresponding to the endoscope to be tested when it is in the target position, and then determine the field of view angle of the endoscope to be tested based on the target target image. Since the endoscope to be tested is placed in the spatial magnetic field without contact, the assembly error caused by mechanical fixation can be avoided, thereby improving the detection accuracy of the field of view angle of the endoscope. Furthermore, the target component can provide multiple targets of different sizes in the same plane without the need for target replacement, thereby facilitating the field of view angle detection of endoscopes of various specifications, thereby improving the application scope of the endoscope field of view angle detection device based on the current prediction model.
[0032] See also Figure 1 , Figure 1 1 is a schematic diagram of the structure of an embodiment of an endoscope provided by the present application. The endoscope comprises: a host end, a photoelectric conversion module and an insertion structure. The host end, the photoelectric conversion module and the insertion structure cooperate to realize the technical solution formed by any one of the following embodiments or any combination of the embodiments.
[0033] The host side can be provided with an operation screen, a USB interface, a scanning terminal, a medical caster, a switch button, a camera handle bracket, a camera handle interface, and an LED indicator. Among them, the operation screen is used to display functions and provide an operation interface. The USB interface is used for external USB. The scanning terminal is used for scanning code recognition. The medical caster is used to move the host side. The switch button is used to turn the host side on and off. The camera handle bracket is used to hang the camera handle. The camera handle interface is used to connect the camera handle. The LED indicator is used to indicate the working status of the host side. If the indicator is on, the trolley is working; if the indicator is off, the trolley is not working.
[0034] Specifically, the entire system of the endoscope is as follows:
[0035] The camera module uses the FPGA board as the central control center to connect the barcode scanner, camera handle (CMOS-ISP board), camera serial port screen, video recording board and light source driver board to complete the barcode analysis, imaging parameter control, camera serial port screen control, video recording control and interaction with the light source driver board. Users can use the camera serial port screen to take photos, record, set the system time, set the language and restore factory settings. The light source module uses the light source driver board as the central control center to connect the light source serial port screen, temperature sensor, light source, FPGA board and start switch to adjust the light source brightness, monitor the light source temperature and start the light source driver board to power each module. The light generated by the light source module provides a light guide connected to the camera handle for clear imaging.
[0036] The corresponding software functions are as follows:
[0037] The functions included in the light source software are: power on, bulb switch function, brightness adjustment function, temperature display function, and running time function.
[0038] Light bulb switch function: The software can turn the light bulb on or off.
[0039] Brightness adjustment function: The software can adjust the brightness of the bulb from 10 to 100, with each level changing by 10.
[0040] Temperature display function: The software interface displays the current temperature of the bulb.
[0041] Running time function: The software interface displays the actual cumulative running time of the light source. When the lamp runs for more than 20,000 hours, a prompt box will appear.
[0042] The functions included in the camera system software are: power on, user access control, lock screen function, system setting function (including system time setting, language setting, and restoring factory settings), video recording function, photo taking function, and one-key enhancement function.
[0043] User access control: When the device is turned on, the boot UI is displayed and a progress bar is loaded. After the progress bar is loaded, the display screen jumps to the code scanning UI. Scan the QR code on the sheath to display the image.
[0044] Lock screen function: The camera system host can lock the operation interface to prevent accidental touches.
[0045] Product system setting function:
[0046] 1. System time setting: You can set the system time in 24-hour format.
[0047] 2 Language setting: You can set the language, supporting Chinese and English.
[0048] 3Restore factory settings: Restore factory settings.
[0049] Video recording function: insert the USB storage medium, the product has the video recording function, and can be stored in real time through USB, the storage format is .ts.
[0050] Photo function: insert the USB storage medium, the product has the photo function, which can be stored via USB, and the storage format is JPG.
[0051] One-key enhancement function: After pressing the button, the image is adjusted to the preset value. For the brightness of the picture, select one-key enhancement to adjust the overall brightness of the picture.
[0052] Camera system software, including power-on, user access control, screen lock, photo taking, video recording and one-key enhancement functions.
[0053] The entire image processing link includes: sensor board, cable, sensor adapter board, FPGA (Field Programmable Gate Array) mainboard and display.
[0054] Sensor board: uses a chip to convert the light signal irradiated on the sensor into an electrical signal, and outputs the electrical signal through the rear-end cable.
[0055] Cable: Transmits electrical signals and provides a power path for the Sensor board.
[0056] Sensor adapter board: The core of the sensor adapter board is an FPGA chip. Its main function is to sample and convert the electrical signals transmitted by the sensor board into serial signals, and convert the serialized data into optical signals through the optoelectronic conversion module, and transmit the signals to the host through optical fiber.
[0057] FPGA main board: Receives the optical signal transmitted from the sensor adapter board and converts it into an electrical signal through the photoelectric conversion module. It then processes the original image into a target image through a series of image ISP algorithms and reconstructs the image to output in a specified format.
[0058] Display: Display the processed image.
[0059] like Figure 2As shown, the camera handle includes a photoelectric conversion module. The light source exciter in the host end provides an incident light source, which is connected to the inside of the handle from the handle tail end 60 through the light source optical fiber on the host end, and then extends along the optical fiber 40 inside the handle to the light source incident end 50, and vertically incident on the photoelectric conversion module 20 (handle fluorescence module) upward, and is totally reflected at 90° by the dichroic mirror set at a 45° angle inside the handle fluorescence module, and is incident on the surface of the living tissue to the right, and is formed after being excited by the fluorescence on the surface of the living tissue. The reflected light returns to the dichroic mirror along the original path. At this time, due to the excitation change in the wavelength band, the reflected light is completely transmitted through the dichroic mirror and then transmitted to the rear-end photoelectric conversion module. After being received by the photoelectric conversion module, the optical signal is converted into an electrical signal. In order to prevent electromagnetic interference, the handle will perform electro-optical conversion again, and the electrical signal will be converted into an optical signal again. The optical signal is transmitted to the image signal processor in the machine through the return optical fiber signal line, and then the photoelectric conversion is performed for the second time to convert the returned optical signal into an electrical signal. Then, through the processing of the electrical signal, a microscopic image magnified more than 1000 times is output on the display.
[0060] See also Figure 3 , Figure 3 1 is a schematic diagram of an embodiment of an endoscope field angle detection device based on a current prediction model provided by the present application. The detection device 200 comprises: a target component 201 , a spatial magnetic field component 202 , an imaging component 203 and a processing component 204 .
[0061] The target assembly 201 is used to provide a plurality of targets of different sizes in the same plane.
[0062] In some embodiments, multiple targets of different sizes are distributed in the same plane from small to large, and the centers of the multiple targets of different sizes are on the same straight line. Figure 4 As shown, the target assembly 201 can provide four targets of different sizes, namely, target A, target B, target C, and target D. In some embodiments, the target assembly 201 can be a display screen, and multiple targets of different sizes can be displayed on the same display interface of the display screen. In other embodiments, the target assembly 201 can be a paper plane, on which multiple targets of different sizes are drawn.
[0063] The spatial magnetic field component 202 is used to generate a magnetic field to control the movement of the endoscope to be tested in the magnetic field. In some embodiments, the spatial magnetic field component 202 includes a first magnetic field unit, a second magnetic field unit, a third magnetic field unit, and a processing component 204 connected to the first magnetic field unit, the second magnetic field unit, and the third magnetic field unit, respectively. The first magnetic field unit includes two coaxially arranged coils. The two coils of the first magnetic field unit are symmetrically arranged along the YOZ plane. The second magnetic field unit includes two coaxially arranged coils. The two coils of the second magnetic field unit are symmetrically arranged along the XOZ plane. The third magnetic field unit includes two coaxially arranged coils. The two second coils of the third magnetic field unit are symmetrically arranged along the YOX plane. The axial centers of the first magnetic field unit, the second magnetic field unit, and the third magnetic field unit intersect at one point, and the third magnetic field unit is sleeved outside the first magnetic field unit and the second magnetic field unit to form a spatial magnetic field region, so that when the power supply provides current to the first magnetic field unit, the second magnetic field unit, and the third magnetic field unit, respectively, a corresponding mixed magnetic field is generated to control the movement of the endoscope to be tested in the magnetic field. Among them, the first magnetic field unit, the second magnetic field unit and the third magnetic field unit are arranged orthogonally, and the magnetic field axes generated by the first magnetic field unit, the second magnetic field unit and the third magnetic field unit correspond to the X axis, Y axis and Z axis of the orthogonal space respectively, and the X axis, Y axis and Z axis intersect at point O. The first coil unit includes two first coils symmetrically arranged along the YOZ plane, and the two first coils have the same structure. The first coil includes a first conductive segment, a second conductive segment, a third conductive segment and a fourth conductive segment connected in sequence. The first conductive segment and the third conductive segment are parallel to the Z axis, and the second conductive segment and the fourth conductive segment are arc-shaped conductive segments. The second coil unit has two second coils symmetrically arranged along the XOZ plane, and the two second coils have the same structure. The second coil includes a fifth conductive segment, a sixth conductive segment, a seventh conductive segment and an eighth conductive segment connected in sequence. The fifth conductive segment and the seventh conductive segment are parallel to the Z axis, and the sixth conductive segment and the eighth conductive segment are arc-shaped conductive segments. The third magnetic field unit includes two third coils spaced apart along the Z direction, and the third coil is sleeved outside the first magnetic field component and the second magnetic field component. The third coil includes a ninth conductive segment, a tenth conductive segment, an eleventh conductive segment and a twelfth conductive segment connected in sequence, the ninth conductive segment and the eleventh conductive segment are parallel to the X axis, and the tenth conductive segment and the twelfth conductive segment are parallel to the Y axis. It can be understood that the above is only for illustration, and the spatial magnetic field component 202 can adopt any device capable of generating a magnetic field.
[0064] In this embodiment, the endoscope to be tested is equivalent to Figure 1 Insert structure in .
[0065] The imaging component 203 is used to connect to the exit pupil end of the endoscope to be tested and collect images of the exit pupil end. In some embodiments, a shielding layer is provided at the connection between the imaging component 203 and the exit pupil end of the endoscope to be tested and outside the connecting line close to the imaging component 203 to shield the magnetic field of the spatial magnetic field component 202 and prevent the magnetic field of the spatial magnetic field component 202 from affecting the imaging electrical signal. In some embodiments, the imaging component 203 can be arranged outside the range affected by the magnetic field of the spatial magnetic field component 202, and the imaging component 203 is connected to the exit pupil end of the endoscope to be tested through a connecting line.
[0066] The processing component 204 is connected to the imaging component 203 and the spatial magnetic field component 202 respectively.
[0067] Before the imaging component 203 is connected to the exit pupil end of the endoscope to be tested, the processing component 204 uses the imaging component 203 to collect target images of multiple targets of different sizes in the target component 201, and identifies the inner and outer ring information of each target in the target image.
[0068] In some embodiments, the target provided by the target assembly 201 is marked with size information of inner and outer rings. The processing assembly 204 uses the imaging assembly 203 to collect target images of multiple targets of different sizes in the target assembly 201, and identifies the inner and outer ring information of each target in the target image through image recognition.
[0069] Further, the processing component 204 controls the space magnetic field component 202 to generate a corresponding magnetic field based on the inner and outer ring information, so that the endoscope to be tested in the magnetic field moves to the target position, and uses the imaging component 203 to collect the target target image corresponding to the endoscope to be tested when it is at the target position; and determines the field of view angle of the endoscope to be tested based on the target target image; wherein the target target image includes at least an inner ring image and an outer ring image of a target.
[0070] For example, the first position of the endoscope to be tested is obtained when the inner ring image is captured, and the second position of the endoscope to be tested is obtained when the outer ring image is captured. Then, the field of view angle of the endoscope to be tested is determined by combining the first position, the second position, and the inner and outer ring information.
[0071] In some embodiments, the processing component 204 can control the spatial magnetic field component 202 to generate a corresponding magnetic field based on the inner and outer ring information of each target, so that the endoscope to be tested in the magnetic field moves to the target position, and uses the imaging component 203 to collect the target target image corresponding to the endoscope to be tested when it is at the target position; and determine the field of view of the endoscope to be tested based on the target target image. That is, if the endoscope needs to use at least two targets for field of view angle detection, the processing component 204 can control the spatial magnetic field component 202 to generate a corresponding magnetic field based on the inner and outer ring information of the first target target, so that the endoscope to be tested in the magnetic field moves to the first target position, and uses the imaging component 203 to collect the first target target image corresponding to the endoscope to be tested when it is at the first target position. It can be understood that there are actually two first target positions, one corresponding to the outer ring of the target and the other corresponding to the inner ring of the target. Then, the processing component 204 can control the spatial magnetic field component 202 to generate a corresponding magnetic field according to the inner and outer ring information of the second target, so that the endoscope to be tested in the magnetic field moves from the current position to the second target position, and uses the imaging component 203 to collect the second target image corresponding to the endoscope to be tested when it is at the second target position. It can be understood that there are actually two second target positions, one corresponding to the outer ring of the target and the other corresponding to the inner ring of the target.
[0072] In this embodiment, the endoscope to be tested is placed in the spatial magnetic field without contact, and the magnetic field generated by the spatial magnetic field component 202 is used to control the endoscope to be tested to move to the target position corresponding to the target, and then the imaging component 203 is used to capture the target target image corresponding to the endoscope to be tested when it is in the target position, and then the field of view angle of the endoscope to be tested is determined according to the target target image. Since the endoscope to be tested is placed in the spatial magnetic field without contact, assembly errors caused by mechanical fixation can be avoided, thereby improving the detection accuracy of the field of view angle of the endoscope. Furthermore, the target component 201 can provide multiple targets of different sizes in the same plane without the need for target replacement, thereby facilitating the field of view angle detection of endoscopes of various specifications, thereby improving the application scope of the endoscope field of view angle detection device based on the current prediction model.
[0073] In one application scenario, the detection device also includes: a clamping component, which is used to clamp the endoscope to be tested and drive the endoscope to be tested to move under the control of a magnetic field. The clamping component can be made of magnetic material to facilitate control by a magnetic field. Due to the presence of the clamping component, the endoscope to be tested can be a hard endoscope or a soft endoscope. If the endoscope to be tested is a soft endoscope, the clamping component can be used to fix its shape to facilitate the detection of the field of view angle. The use of the clamping component can improve the application range of the detection device.
[0074] In some embodiments, the processing component 204 is also used to control the spatial magnetic field component 202 to generate a corresponding magnetic field based on the inner and outer loop information, so that the endoscope to be tested in the magnetic field moves to a first position at a first speed, and then moves to a target position at a second speed in the magnetic field, wherein the first speed is greater than the second speed, and the first position is within a preset range of the target position.
[0075] In some embodiments, the distance between the imaging component 203 and the target component 201 can be determined based on the internal parameters of the imaging component 203 and the inner and outer ring information. Then, the initial distance between the endoscope to be tested in the magnetic field and the target component 201 can be known based on this distance. Based on this, the processing component 204 can determine the position where the endoscope information to be tested needs to be moved based on the inner and / or outer ring images of the target to be collected. Considering the inertial effect of the endoscope to be tested under the action of the magnetic field and the control accuracy of the magnetic field, the processing component 204 controls the spatial magnetic field component 202 to generate a corresponding magnetic field based on the inner and outer ring information, so that the endoscope to be tested in the magnetic field moves to the first position at a first speed, and then moves the endoscope to be tested in the magnetic field to the target position at a second speed, wherein the first speed is greater than the second speed, and the first position is within the preset range of the target position. After the endoscope to be tested moves to the first position at the first speed, the imaging component 203 can be used to collect the target image of the endoscope to be tested at the first position. Then, the difference between the first position and the target position is determined according to the target image, and then the spatial magnetic field component 202 is controlled to generate a corresponding magnetic field according to the difference, so that the endoscope to be tested in the magnetic field moves to the target position at the second speed. In this way, the accuracy of subsequent detection of the field angle of the endoscope to be tested can be improved.
[0076] In some embodiments, the processing component 204 is also used to input the inner and outer ring information and the weight information of the endoscope to be tested into the current prediction model, obtain the predicted current output by the current prediction model, and use the predicted current to control the spatial magnetic field component 202 to generate a corresponding magnetic field.
[0077] In some embodiments, the current prediction model can generate the best predicted current according to the information of the inner and outer rings and the weight information of the endoscope to be tested, and use the predicted current to control the spatial magnetic field component 202 to generate the corresponding magnetic field. Therefore, the predicted current is optimal, which can improve the accuracy of the subsequent detection of the field of view of the endoscope to be tested, reduce the power consumption during the detection process, and reduce the detection cost.
[0078] See also Figure 5 , Figure 5 1 is a flow chart of an embodiment of an endoscope field of view angle detection method based on a current prediction model provided by the present application. An endoscope field of view angle detection device based on a current prediction model applied to any embodiment of the present application. The method comprises:
[0079] Step 51: Before the imaging component is connected to the exit pupil end of the endoscope to be tested, the processing component uses the imaging component to collect target images of multiple targets of different sizes in the target component, and identifies the inner and outer ring information of each target in the target image.
[0080] Step 52: The processing component controls the spatial magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, so as to move the endoscope to be tested in the magnetic field to the target position.
[0081] Step 53: The processing component uses the imaging component to collect the target image corresponding to the endoscope to be tested when it is at the target position.
[0082] Step 54: The processing component determines the field of view angle of the endoscope to be tested according to the target image.
[0083] The target image at least includes an inner ring image and an outer ring image of a target.
[0084] In this embodiment, the endoscope to be tested is placed in the spatial magnetic field without contact, and the magnetic field generated by the spatial magnetic field component is used to control the endoscope to be tested to move to the target position corresponding to the target, and then the imaging component is used to capture the target target image corresponding to the endoscope to be tested when it is in the target position, and then the field of view angle of the endoscope to be tested is determined according to the target target image. Since the endoscope to be tested is placed in the spatial magnetic field without contact, assembly errors caused by mechanical fixation can be avoided, thereby improving the detection accuracy of the field of view angle of the endoscope. Furthermore, the target component can provide multiple targets of different sizes in the same plane without the need for target replacement, thereby facilitating the field of view angle detection of endoscopes of various specifications, thereby improving the application scope of the endoscope field of view angle detection device based on the current prediction model.
[0085] See also Figure 6 , Figure 6 1 is a flow chart of an embodiment of an endoscope field of view angle detection method based on a current prediction model provided by the present application. An endoscope field of view angle detection device based on a current prediction model applied to any embodiment of the present application. The method comprises:
[0086] Step 61: Before the imaging component is connected to the exit pupil end of the endoscope to be tested, the processing component uses the imaging component to collect target images of multiple targets of different sizes in the target component, and identifies the inner and outer ring information of each target in the target image.
[0087] Step 62: The processing component controls the spatial magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, so that the endoscope to be tested in the magnetic field moves to the first position at a first speed.
[0088] Step 63: The processing component receives the first target image corresponding to the endoscope to be tested at the first position acquired by the imaging component.
[0089] In some embodiments, the processing component controls the spatial magnetic field component to generate a corresponding magnetic field based on the outer ring information of the target, so that the endoscope to be tested in the magnetic field moves to a first position at a first speed, and the processing component receives a first target image corresponding to the endoscope to be tested at the first position captured by the imaging component.
[0090] In some embodiments, the processing component controls the spatial magnetic field component to generate a corresponding magnetic field based on the inner ring information of the target, so that the endoscope to be tested in the magnetic field moves to a first position at a first speed, and the processing component receives a first target image corresponding to the endoscope to be tested at the first position captured by the imaging component.
[0091] Step 64: The processing component controls the spatial magnetic field component to generate a corresponding magnetic field again according to the first target image, so that the endoscope to be tested in the magnetic field moves to the target position at the second speed.
[0092] The first speed is greater than the second speed.
[0093] Step 65: The processing component uses the imaging component to collect the target image corresponding to the endoscope to be tested when it is at the target position.
[0094] Step 66: The processing component determines the field of view of the endoscope to be tested according to the target image.
[0095] The target image at least includes an inner ring image and an outer ring image of a target.
[0096] In this embodiment, the endoscope to be tested is placed in the spatial magnetic field without contact, and the magnetic field generated by the spatial magnetic field component is used to control the endoscope to be tested to move to the target position corresponding to the target, and then the imaging component is used to capture the target target image corresponding to the endoscope to be tested when it is in the target position, and then the field of view angle of the endoscope to be tested is determined according to the target target image. Since the endoscope to be tested is placed in the spatial magnetic field without contact, assembly errors caused by mechanical fixation can be avoided, thereby improving the detection accuracy of the field of view angle of the endoscope. Furthermore, the target component can provide multiple targets of different sizes in the same plane without the need for target replacement, thereby facilitating the field of view angle detection of endoscopes of various specifications, thereby improving the application scope of the endoscope field of view angle detection device based on the current prediction model.
[0097] In some embodiments, see Figure 7 , the above step 52 or step 62 may be the following process:
[0098] Step 71: The processing component inputs the inner and outer ring information and the weight information of the endoscope to be tested into the current prediction model to obtain the predicted current output by the current prediction model.
[0099] In some embodiments, the current prediction model can be constructed using a neural network model, a generative adversarial model, etc.
[0100] In some embodiments, the current prediction model includes: a movement trajectory prediction network and a current prediction network. Figure 8 , step 71 may be the following process:
[0101] Step 711: The processing component inputs the inner and outer loop information into the movement trajectory prediction network to obtain the predicted movement trajectory output by the movement trajectory prediction network.
[0102] In some embodiments, the processing component inputs the inner and outer ring information into the movement trajectory prediction network, and the movement trajectory prediction network predicts the movement trajectory in combination with the initial position of the endoscope to be tested to obtain a predicted movement trajectory. It can be understood that because the endoscope to be tested and the target are in a three-dimensional coordinate system, the endoscope to be tested needs to move forward, backward, left, back, up and down to collect the corresponding inner ring image and outer ring image.
[0103] In some embodiments, the processing component can use the spatial magnetic field component to control the endoscope to be tested to first collect the inner ring image and then collect the outer ring image according to the predicted movement trajectory.
[0104] In some embodiments, the processing component can use the spatial magnetic field component to control the endoscope to be tested to first collect the outer ring image and then collect the inner ring image according to the predicted movement trajectory.
[0105] In some embodiments, if image acquisition of at least two targets is required, the inner and outer ring information of the at least two targets is input into the mobile trajectory prediction network to obtain the predicted mobile trajectory of the at least two targets output by the mobile trajectory prediction network. The mobile trajectory prediction network can predict the best predicted mobile trajectory based on the inner and outer ring information of at least two targets. Furthermore, in the target assembly of the present application, the targets are arranged from small to large, so that the mobile trajectory prediction network can more reasonably predict the mobile trajectory, simplify the network complexity of the mobile trajectory prediction network, and speed up the prediction speed of the mobile trajectory prediction network.
[0106] In some embodiments, the movement trajectory prediction network may include an encoding layer, a decoding layer, and an output layer. The encoding layer is used to encode the inner and outer loop information to obtain encoding features. The encoding features are then input into the decoding layer to obtain decoding features. The decoding features are then input into the output layer to obtain the predicted movement trajectory.
[0107] Step 712: The processing component inputs the predicted movement trajectory and the weight information of the endoscope to be tested into the current prediction network to obtain the predicted current output by the current prediction network.
[0108] In some embodiments, the magnetic field in the spatial magnetic field assembly actually requires current to be controlled. Therefore, the current prediction network can combine the predicted movement trajectory and the weight information of the endoscope to be tested to predict the best predicted current.
[0109] In some embodiments, the current prediction network may include a fusion layer, an encoding layer, a decoding layer, and an output layer. The fusion layer is used to fuse the predicted movement trajectory and the weight information of the endoscope to be tested to obtain a fusion feature. The encoding layer is used to encode the fusion feature to obtain an encoding feature. The encoding feature is then input into the decoding layer to obtain a decoding feature. The decoding feature is then input into the output layer to obtain a predicted current.
[0110] Furthermore, since the spatial magnetic field component is composed of a plurality of coil units, the predicted current output by the current prediction network substantially includes a plurality of sub-currents, each of which corresponds to a coil unit.
[0111] Step 72: The processing component uses the predicted current to control the spatial magnetic field component to generate a corresponding magnetic field.
[0112] In some embodiments, the predicted current can be a current curve that fluctuates over time. The processing component outputs a corresponding current to the spatial magnetic field component according to the current curve to move the endoscope to be tested in the magnetic field. The movement trajectory of the endoscope to be tested is the same as the predicted movement trajectory.
[0113] That is, one coil unit corresponds to one sub-current curve. The processing component outputs the corresponding current to the corresponding coil unit in the spatial magnetic field component according to the sub-current curve, so as to move the endoscope to be tested in the magnetic field. The movement trajectory of the endoscope to be tested is the same as the predicted movement trajectory.
[0114] In some embodiments, see Fig. 9 , the above current prediction model is trained in the following way:
[0115] Step 91: Determine a first loss value between the predicted moving trajectory and the actual moving trajectory.
[0116] Before step 91 , the current prediction model may be trained in the manner of step 71 or steps 711 to 712 to output the corresponding predicted movement trajectory and predicted current.
[0117] In some embodiments, the real moving trajectory can be obtained by manual calculation. The real moving trajectory can be the optimal moving trajectory of the endoscope to be tested.
[0118] Step 92: Determine a second loss value between the predicted current and the actual current.
[0119] In some embodiments, the real current can be calculated manually in combination with the real movement trajectory. The real current can be the optimal current applied by the processing component to the spatial magnetic field component when the endoscope to be tested moves.
[0120] Step 93: Combine the first loss value and the second loss value to obtain a third loss value.
[0121] In some embodiments, a weighted sum of the first loss value and the second loss value may be performed to obtain a third loss value.
[0122] Step 94: adjusting network parameters of the movement trajectory prediction network and the current prediction network according to the third loss value.
[0123] Because the movement trajectory prediction network and the current prediction network influence each other, if the accuracy of the movement trajectory prediction network is insufficient, the current predicted by the current prediction network will also be insufficient in accuracy. Therefore, it is necessary to comprehensively consider the loss values of both to adjust the network parameters of the movement trajectory prediction network and the current prediction network, so as to obtain a high-precision movement trajectory prediction network and current prediction network that cooperate with each other.
[0124] The trained movement trajectory prediction network and current prediction network are used to complete the above reasoning from step 711 to step 712, and the predicted current is output. The processing component uses the predicted current to control the spatial magnetic field component to generate a corresponding magnetic field, control the endoscope to be tested to move according to the predicted movement trajectory, collect the corresponding inner ring image and outer ring image, and complete the subsequent field of view angle detection of the endoscope to be tested.
[0125] In this embodiment, the current prediction model is used to more intelligently and accurately predict the optimal current and optimal movement trajectory required to control the movement of the endoscope to be tested to collect inner ring images and outer ring images, which can reduce power consumption and improve the movement efficiency of the endoscope to be tested, thereby improving the overall detection efficiency of the endoscope field of view angle.
[0126] In summary, the endoscope field of view angle detection device based on the current prediction model and the endoscope field of view angle detection method based on the current prediction model of the present application place the endoscope to be tested in a spatial magnetic field without contact, and use the magnetic field generated by the spatial magnetic field component to control the endoscope to be tested to move to the target position corresponding to the target, and then use the imaging component to collect the target target image corresponding to the endoscope to be tested when it is at the target position, and then determine the field of view angle of the endoscope to be tested based on the target target image. Since the endoscope to be tested is placed in the spatial magnetic field without contact, it can avoid assembly errors caused by mechanical fixation, thereby improving the detection accuracy of the endoscope field of view angle. Furthermore, the target component can provide multiple targets of different sizes in the same plane, without the need for target replacement, thereby facilitating the field of view angle detection of endoscopes of various specifications, thereby improving the application scope of the endoscope field of view angle detection device based on the current prediction model.
[0127] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0129] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0130] If the integrated units in the above other embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0131] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An endoscope field of view angle detection device based on a current prediction model, characterized in that: The detection device comprises: A target assembly, the target assembly being used to provide a plurality of targets of different sizes in the same plane; A spatial magnetic field component, which is used to generate a magnetic field to control the movement of the endoscope to be tested within the magnetic field; An imaging component, the imaging component is used to connect to the exit pupil end of the endoscope to be tested and collect an image of the exit pupil end; A processing component, wherein the processing component is connected to the imaging component and the spatial magnetic field component respectively; Before the imaging component is connected to the exit pupil end of the endoscope to be tested, the processing component uses the imaging component to collect target images of multiple targets of different sizes in the target component, and identifies the inner and outer ring information of each target in the target image; The processing component controls the spatial magnetic field component to generate a corresponding magnetic field based on the inner and outer ring information, so that the endoscope to be tested in the magnetic field moves to the target position, and uses the imaging component to collect the target image corresponding to the endoscope to be tested when it is at the target position; and determines the field of view angle of the endoscope to be tested based on the target image; wherein the target image includes at least an inner ring image and an outer ring image of a target.
2. The endoscope viewing angle detection device based on the current prediction model according to claim 1 is characterized in that: The detection device further comprises: a clamping assembly, which is used to clamp the endoscope to be tested and drive the endoscope to be tested to move under the control of the magnetic field.
3. The endoscope viewing angle detection device based on the current prediction model according to claim 1, characterized in that: The processing component is also used to control the spatial magnetic field component to generate a corresponding magnetic field based on the inner and outer loop information, so that the endoscope to be tested in the magnetic field moves to a first position at a first speed, and then moves the endoscope to be tested in the magnetic field to the target position at a second speed, wherein the first speed is greater than the second speed.
4. The endoscope viewing angle detection device based on the current prediction model according to claim 1 or 3, characterized in that: The processing component is also used to input the inner and outer ring information and the weight information of the endoscope to be tested into the current prediction model, obtain the predicted current output by the current prediction model, and use the predicted current to control the spatial magnetic field component to generate a corresponding magnetic field.
5. The endoscope viewing angle detection device based on the current prediction model according to claim 1, characterized in that: The multiple targets of different sizes are distributed in the same plane from small to large, and the centers of the multiple targets of different sizes are on the same straight line.
6. A method for detecting the viewing angle of an endoscope based on a current prediction model, characterized in that: Applied to the detection device, the detection device includes: a target component, a spatial magnetic field component, an imaging component and a processing component; the target component is used to provide a plurality of targets of different sizes in the same plane; the spatial magnetic field component is used to generate a magnetic field to control the movement of the endoscope to be tested in the magnetic field; the imaging component is used to connect the exit pupil end of the endoscope to be tested and collect the image of the exit pupil end; the processing component is respectively connected to the imaging component and the spatial magnetic field component; the method includes: The processing component uses the imaging component to collect target images of multiple targets of different sizes in the target component before the imaging component is connected to the exit pupil end of the endoscope to be tested, and identifies the inner and outer ring information of each target in the target image; The processing component controls the spatial magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, so as to move the endoscope to be tested in the magnetic field to a target position; The processing component uses the imaging component to collect a target image corresponding to the endoscope to be tested when the endoscope is at the target position; The processing component determines the field of view angle of the endoscope to be tested according to the target image; wherein the target image at least includes an inner ring image and an outer ring image of a target.
7. The method according to claim 6, characterized in that The processing component controls the spatial magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, so that the endoscope to be tested in the magnetic field moves to a target position, including: The processing component controls the spatial magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, so that the endoscope to be tested in the magnetic field moves to a first position at a first speed; The processing component receives a first target image corresponding to the endoscope to be tested at the first position acquired by the imaging component; The processing component controls the spatial magnetic field component to generate a corresponding magnetic field again according to the first target image, so that the endoscope to be tested in the magnetic field moves to the target position at a second speed, wherein the first speed is greater than the second speed.
8. The method according to claim 6, characterized in that The processing component controls the spatial magnetic field component to generate a corresponding magnetic field according to the inner and outer loop information, including: The processing component inputs the inner and outer ring information and the weight information of the endoscope to be tested into a current prediction model to obtain a predicted current output by the current prediction model; The processing component uses the predicted current to control the spatial magnetic field component to generate a corresponding magnetic field.
9. The method according to claim 8, characterized in that The current prediction model includes: a movement trajectory prediction network and a current prediction network; the processing component inputs the inner and outer loop information and the weight information of the endoscope to be tested into the current prediction model to obtain the predicted current output by the current prediction model, including: The processing component inputs the inner and outer loop information into the movement trajectory prediction network to obtain a predicted movement trajectory output by the movement trajectory prediction network; The processing component inputs the predicted movement trajectory and the weight information of the endoscope to be tested into the current prediction network to obtain the predicted current output by the current prediction network.
10. The method according to claim 9, characterized in that The current prediction model is trained in the following way: Determining a first loss value between the predicted moving trajectory and the actual moving trajectory; determining a second loss value between the predicted current and the actual current; combining the first loss value and the second loss value to obtain a third loss value; The network parameters of the movement trajectory prediction network and the current prediction network are adjusted according to the third loss value.
