Endoscope equipment and method for registering three-dimensional model and endoscope image
By automatically identifying the marker area and calculating the fusion error in the endoscopic equipment, the error problem caused by manual selection of marker points is solved, the precise registration of the three-dimensional model and the endoscopic image is achieved, and the accuracy of the surgical site is improved.
Patent Information
- Application Number
- CN202410706888.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, manual selection of marker points results in the inability to accurately calculate the actual fusion error between the three-dimensional model and the endoscopic image, affecting the precise registration of the surgical site.
By identifying pixel features in the endoscopic image, the marker point area is automatically identified, and the projection transformation matrix of the virtual camera is used to project the 3D model into a reference image, determine the marker point area, and calculate the fusion between the 3D model and the endoscopic image error to achieve automatic registration.
The registration accuracy of the three-dimensional model and the endoscopic image is improved, manual errors are avoided, and the accuracy of the surgical site is ensured.
Smart Images

Figure CN118628649A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image registration, and in particular to an endoscope device and a registration method for a three-dimensional model and an endoscope image. Background Art
[0002] Augmented reality technology can fuse and display the three-dimensional model reconstructed based on preoperative medical images with the endoscopic images collected by the intraoperative endoscopic equipment, allowing doctors to intuitively see the anatomical structure below the surface of the organ, effectively solving the problem of lack of depth perception information and tactile feedback information, and making surgical operations faster, more precise and safer.
[0003] However, during the operation, the surgical site may undergo significant deformation due to changes in the patient's body position and various surgical operations, resulting in a significant difference between the surgical site in its current form and the surgical site photographed before the operation. Therefore, it is necessary to align the three-dimensional model and the endoscopic image based on the error displayed by the fusion of the three-dimensional model and the endoscopic image.
[0004] In the related art, in order to determine the error of the fusion display of the three-dimensional model and the endoscopic image, it is necessary to manually select the positions of the marking points on the three-dimensional model and the endoscopic image respectively, resulting in the inability to accurately calculate the actual fusion error of the three-dimensional model and the endoscopic image. Summary of the invention
[0005] In order to solve the above-mentioned problems in the prior art, an embodiment of the present application provides an endoscopic device and a method for aligning a three-dimensional model and an endoscopic image, which is used to solve the problem that the prior art cannot accurately calculate the actual fusion error between the three-dimensional model reconstructed based on the medical image and the endoscopic image collected by the endoscopic device, thereby more accurately aligning the three-dimensional model and the endoscopic image.
[0006] In a first aspect, an embodiment of the present application provides an endoscope device, the endoscope device comprising a processor and a display;
[0007] The processor is configured to:
[0008] Acquire a three-dimensional model corresponding to the biological tissue obtained by photographing and three-dimensionally reconstructing the biological tissue, and acquire an endoscopic image of the biological tissue; the biological tissue includes at least one marking point;
[0009] According to the pixel features of each pixel point in the endoscopic image, a first marking point area corresponding to each marking point in the endoscopic image is identified; and according to the projection transformation matrix of the virtual camera corresponding to the endoscopic device, the three-dimensional model is projected to obtain a reference image, wherein the reference image is a two-dimensional image, and the virtual camera is constructed based on the camera parameters of the endoscopic device; according to the pixel features of each pixel point in the reference image, a second marking point area corresponding to each marking point in the reference image is determined;
[0010] Determine a fusion error between the three-dimensional model and the endoscopic image according to each of the first marker point regions in the endoscopic image and each of the second marker point regions in the reference image; and register the three-dimensional model and the endoscopic image according to the fusion error;
[0011] The display is configured to display the registered three-dimensional model and the endoscopic image.
[0012] In a possible implementation, when the processor identifies the first marking point region corresponding to each marking point in the endoscopic image according to the pixel feature of each pixel in the endoscopic image, the processor is specifically configured to: determine the first marking point region corresponding to each marking point in the endoscopic image according to the pixel feature of each pixel in the endoscopic image and the pixel feature of the marking point;
[0013] When the processor determines the second marker point area corresponding to each marker point in the reference image based on the pixel features of each pixel point in the reference image, the processor is specifically configured to: determine the second marker point area corresponding to each marker point in the reference image based on the pixel features of each pixel point in the reference image and the pixel features of the marker point.
[0014] In a possible implementation manner, the pixel feature is a color feature value, and the processor is specifically configured to:
[0015] For each pixel in the endoscopic image, compare the color feature value of the pixel with a first color threshold, and determine whether the pixel is a first target pixel according to the comparison result, where the first target pixel is a pixel in the endoscopic image corresponding to the marking point;
[0016] A first marking point area in the endoscopic image is determined according to the determined first target pixel point.
[0017] In a possible implementation manner, the pixel feature is a color feature value, and the processor is specifically configured to:
[0018] For each pixel in the reference image, compare the color feature value of the pixel with the second color threshold, and determine whether the pixel is a second target pixel according to the comparison result, where the second target pixel is a pixel in the reference image corresponding to the marked point;
[0019] According to the determined second target pixel point, a second marking point area in the reference image is determined.
[0020] In a possible implementation, the processor is specifically configured to:
[0021] Determining a correspondence between each first marking point region and each second marking point region;
[0022] According to the corresponding relationship, a reference fusion error between each of the first marker point areas and the corresponding second marker point areas is determined; according to the reference fusion error between each of the first marker point areas and the corresponding second marker point areas, a fusion error between the three-dimensional model and the endoscopic image is determined.
[0023] In a possible implementation, the biological tissue includes a plurality of marking points;
[0024] When determining the correspondence between each first marking point area and each second marking point area, the processor is specifically configured to:
[0025] For each of the first marking point areas, determine a second marking point area corresponding to the same marking point as the first marking point area from multiple second marking point areas; and use the second marking point area corresponding to the same marking point as the first marking point area as the second marking point area corresponding to the first marking point area.
[0026] In a possible implementation manner, when the processor determines, from the plurality of second marking point regions, a second marking point region corresponding to the same marking point as the first marking point region, the processor is specifically configured to:
[0027] Determine the distance between the center position of the first marking point area and the center position of each of the second marking point areas according to the coordinates of the center position of the first marking point area and the coordinates of the center position of each of the second marking point areas;
[0028] A second marking point area corresponding to the same marking point as the first marking point area is determined according to the distance between the center position of the first marking point area and the center position of each of the second marking point areas.
[0029] In a possible implementation manner, when the processor determines, according to the corresponding relationship, a reference fusion error between each of the first marker point regions and the corresponding second marker point region, the processor is specifically configured to:
[0030] Determine, according to the corresponding relationship, a pixel distance and / or a physical distance between each first marking point area and a corresponding second marking point area;
[0031] The pixel distance and / or physical distance is used as a reference fusion error between each first marker point region and the corresponding second marker point region.
[0032] In a second aspect, an embodiment of the present application provides a method for registering a three-dimensional model and an endoscopic image, which is applied to an endoscopic device, and the method includes:
[0033] Acquire a three-dimensional model corresponding to the biological tissue obtained by photographing and three-dimensionally reconstructing the biological tissue, and acquire an endoscopic image of the biological tissue; the biological tissue includes at least one marking point;
[0034] According to the pixel features of each pixel point in the endoscopic image, a first marking point area corresponding to each marking point in the endoscopic image is identified; and according to the projection transformation matrix of the virtual camera corresponding to the endoscopic device, the three-dimensional model is projected to obtain a reference image, wherein the reference image is a two-dimensional image, and the virtual camera is constructed based on the camera parameters of the endoscopic device; according to the pixel features of each pixel point in the reference image, a second marking point area corresponding to each marking point in the reference image is determined;
[0035] Determine a fusion error between the three-dimensional model and the endoscopic image according to each of the first marker point regions in the endoscopic image and each of the second marker point regions in the reference image; and register the three-dimensional model and the endoscopic image according to the fusion error;
[0036] The registered three-dimensional model and the endoscopic image are displayed.
[0037] In a possible implementation, identifying the first marker point region corresponding to each marker point in the endoscopic image according to the pixel feature of each pixel point in the endoscopic image includes: determining the first marker point region corresponding to each marker point in the endoscopic image according to the pixel feature of each pixel point in the endoscopic image and the pixel feature of the marker point;
[0038] Determining the second marker point area corresponding to each marker point in the reference image according to the pixel features of each pixel point in the reference image includes: determining the second marker point area corresponding to each marker point in the reference image according to the pixel features of each pixel point in the reference image and the pixel features of the marker point.
[0039] In a third aspect, an embodiment of the present application provides a three-dimensional model and an endoscopic image registration device, comprising:
[0040] An acquisition module, used to acquire a three-dimensional model corresponding to the biological tissue obtained by photographing and three-dimensionally reconstructing the biological tissue, and to acquire an endoscopic image of the biological tissue; the biological tissue includes at least one marking point;
[0041] A region recognition module, for identifying a first marking point region corresponding to each marking point in the endoscopic image according to a pixel feature of each pixel in the endoscopic image; and projecting the three-dimensional model to obtain a reference image according to a projection transformation matrix of a virtual camera corresponding to the endoscopic device, wherein the reference image is a two-dimensional image, and the virtual camera is constructed based on camera parameters of the endoscopic device; and determining a second marking point region corresponding to each marking point in the reference image according to the pixel feature of each pixel in the reference image;
[0042] a registration module, configured to determine a fusion error between the three-dimensional model and the endoscopic image according to each of the first marker point regions in the endoscopic image and each of the second marker point regions in the reference image; and to register the three-dimensional model and the endoscopic image according to the fusion error;
[0043] A display module is used to display the registered three-dimensional model and the endoscopic image.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the methods for aligning a three-dimensional model and an endoscopic image in the second aspect is implemented.
[0045] The embodiment of the present application provides an endoscopic device and a registration method for a three-dimensional model and an endoscopic image. After acquiring the three-dimensional model and the endoscopic image of the biological tissue, the first marker point area in the endoscopic image is identified according to the pixel features of each pixel in the endoscopic image. Then, the three-dimensional model is projected to obtain a reference image, and the second marker point area in the reference image is identified. Finally, the fusion error between the three-dimensional model and the endoscopic image is determined according to each first marker point area in the endoscopic image and each second marker point area in the reference image, and the three-dimensional model and the endoscopic image are registered according to the fusion error. Thus, the marker point area can be automatically obtained in the three-dimensional model and the two-dimensional image without manual selection of the marker point area. The fusion error between the three-dimensional model and the two-dimensional image can be quantified more accurately, avoiding the introduction of manual errors that lead to the inability to accurately calculate the actual fusion error of the three-dimensional model and the two-dimensional image, thereby more accurately registering the three-dimensional model and the endoscopic image. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] 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 paying creative labor.
[0047] Figure 1 A schematic diagram of the structure of an endoscope device provided in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of the structure of a cold light source host provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of the structure of a camera host provided in an embodiment of the present application;
[0050] Figure 4 A schematic diagram of the structure of another endoscope device provided in an embodiment of the present application;
[0051] Figure 5 A schematic diagram of an endoscopic examination provided in an embodiment of the present application;
[0052] Figure 6 An optional application scenario provided for an embodiment of the present application;
[0053] Figure 7 A schematic diagram of an endoscopic image provided in an embodiment of the present application;
[0054] Figure 8 A flowchart of a method for registering a three-dimensional model and an endoscopic image provided in an embodiment of the present application;
[0055] Fig. 9 A schematic diagram of an endoscopic image provided in an embodiment of the present application;
[0056] Fig.10 A schematic diagram of an endoscopic image provided in an embodiment of the present application;
[0057] Fig.11 A flowchart of a method for registering a three-dimensional model and an endoscopic image provided in an embodiment of the present application;
[0058] Fig.12 A flowchart of a method for registering a three-dimensional model and an endoscopic image provided in an embodiment of the present application;
[0059] Fig.13 A schematic diagram of an endoscopic image provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme 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. Among them, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0061] Furthermore, in the description of the embodiments of the present application, unless otherwise specified, “and” means or. For example, A / B can mean A or B. The “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0062] Specifically, in the description of the present application, it needs to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application, and, unless otherwise specified, the "connection" and "connection" mentioned in the present application include direct and indirect connections (connections).
[0063] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0064] Figure 1 A structural schematic diagram of an endoscope device in an embodiment of the present application is exemplarily shown, wherein the endoscope device includes a cold light source, a camera assembly and a display.
[0065] The camera assembly can be used to take pictures of endoscopic examinations and surgeries to collect image data of the examinations and surgeries; its key components may include one or more of a camera, a button, a camera host, a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor, a video cable, an optical adapter, an objective lens field of view, a mirror rod, a communication port, and a video output interface. The camera host can be connected to a display through a video output interface, and connected to a cold light source host through a communication port.
[0066] In the embodiment of the present application, the objective lens field of view, mirror rod, optical adapter, button, CMOS and camera among the key components of the camera assembly can also be collectively referred to as an endoscopic camera.
[0067] The display can be used to display the endoscopic image collected and generated by the camera assembly.
[0068] Cold light sources can be used to provide illumination for endoscopes during endoscopic examinations and surgeries; their key components usually include: a cold light source host, a light guide, a communication port, and a cold light source light output interface.
[0069] It should be noted that the endoscopic device in the embodiment of the present application specifically refers to the endoscopic device used in surgery, which may be one or more of a laparoscope, a thoracoscope, an arthroscope, a rhinoscope, a cystoscope, a colonoscope, a duodenoscope, a mediastinoscope and a cardioscope.
[0070] It should be understood that Figure 1 The schematic diagram of the structure of the endoscope device shown is only an example, and the endoscope device may have more Figure 1 The more or less components shown in the figure can be combined with two or more components, or can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0071] based on Figure 1The structural diagram of the endoscope device shown in the figure, the embodiment of the present application also provides a structural diagram of a cold light source host. Figure 2 As shown, the cold light source host 200 may include a processor 201, an LED driving board 202, a semiconductor laser / refrigeration plate driving board 203, an LED 204, a semiconductor laser 205, a refrigerator 206, a heat dissipation device 207, a fusion optical path 208, a coupling optical path 209, a light guide 210, a first temperature sensor 211 and a second temperature sensor 212.
[0072] During the process of using the endoscope device for inspection and surgery, the medical staff can set the laser light intensity. After receiving the set laser light intensity, the processor 201 can control the LED driver board 202 to output current to the LED 204, and control the semiconductor laser / refrigeration plate driver board 203 to output current to the semiconductor laser 205 and the refrigeration plate 206, and control the heat sink 207 to dissipate heat for the hot end of the refrigeration plate 206. After the LED 204 and the semiconductor laser 205 are powered on, a fused optical path 208 can be generated. The fused optical path 208 can be processed to generate a coupled optical path 209. Finally, the coupled optical path 209 can generate a light guide 210 through the light guide interface, that is, a near-infrared laser output. During inspection and surgery using endoscopic equipment, in order to ensure the stability of the performance of the semiconductor laser 205, it is necessary to use the first temperature sensor 211 to detect the cold end temperature of the cooling plate 206, and use the second temperature sensor 212 to detect the hot end temperature of the cooling plate 206, and send the detected cold end temperature and hot end temperature to the processor 201, which controls the temperature of the semiconductor laser 205.
[0073] The processor 201 is the control center of the cold light source host 200. It uses various interfaces and lines to connect various parts of the entire cold light source host 200, and executes various functions and processes data of the cold light source host 200 by running or executing software programs stored in the memory and calling data stored in the memory. In some embodiments, the processor 201 may include one or more processing units. In this application, the processor 201 can run an operating system, an application program, a user interface display, and a touch response.
[0074] based on Figure 1 The structural diagram of the endoscope device shown in the figure, the embodiment of the present application also provides a structural diagram of a camera host, such as Figure 3 As shown, the camera host 300 may include components such as a memory 310, a processor 320, a communication interface 330, and a power supply 340.
[0075] The memory 310 can be used to store software programs and data. The processor 320 executes various functions and data processing of the camera host 300 by running the software programs or data stored in the memory 310. The memory 310 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The memory 310 stores an operating system that enables the camera host 300 to run. In the present application, the memory 310 can store an operating system and various application programs, and can also store codes for executing the method described in the embodiments of the present application.
[0076] The processor 320 is the control center of the camera host 300. It uses various interfaces and lines to connect various parts of the entire camera host 300. It executes various functions of the camera host 300 and processes data by running or executing software programs stored in the memory 310 and calling data stored in the memory 310. In some embodiments, the processor 320 may include one or more processing units; the processor 320 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, the endoscope device interface and the application program, and the baseband processor mainly processes wireless communication. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 320. In this application, the processor 320 can run the operating system, the application program, the endoscope device interface display and touch response, and the registration method of the three-dimensional model and the endoscopic image described in the embodiment of the application. The specific process of the processor 320 executing the registration method of the three-dimensional model and the endoscopic image will be described in detail below.
[0077] It should be noted that, in the embodiment of the present application, when the endoscope device transmits data to other electronic devices, it can transmit data with other devices by wire or wirelessly, and the present application does not limit the transmission method, the number of devices, or the type of other devices. For example, other electronic devices can be endoscope devices, personal computers, mobile phones, tablet computers, notebooks, e-book readers, intelligent voice interaction devices, smart homes, vehicle-mounted terminals, and other computer devices with certain computing capabilities and running instant messaging software and websites or social software and websites.
[0078] The communication interface 330 is used to exchange information with other electronic devices. The communication interface 330 may specifically include one or more of the network port 331, the WiFi module 332, the Bluetooth module 333, the 4G module 334, and the USB 335. When different communication interfaces are used, corresponding communication methods are used to exchange information with other electronic devices.
[0079] The power supply 340 is used to supply power to various components in the camera host 300. The power supply 340 can be logically connected to the processor 320 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.
[0080] In another optional embodiment, the registration method of the three-dimensional model and the endoscopic image provided in the present application can also be applied to the following Figure 4 Endoscopic equipment as shown. Figure 4 The processor is located in another host other than the camera host, and this application does not limit the host.
[0081] In the actual operation stage of endoscopic examination or surgery, medical personnel are basically assisted by dynamic video. After the medical personnel operate the endoscope to enter the human body, the camera on the endoscope collects and displays the image of the human body. As the camera of the endoscope moves, the range illuminated by the camera is displayed on the display connected to the endoscope. The environment around the lesion can be clearly seen, and the surgical instruments can be moved and operated in three dimensions intuitively. For example, Figure 5 As shown, medical personnel can operate the endoscopic device to collect endoscopic images of the human body.
[0082] Many different implementations or examples are provided above to implement different structures of the present application. In order to simplify the content of the embodiments of the present application, only the components and settings of specific examples are described above. Of course, they are only examples, and the purpose is not to limit the present application.
[0083] Next, the application scenarios of the embodiments of the present application are explained in terms of adaptability. Figure 6 A schematic diagram of an application scenario provided for an embodiment of the present application.
[0084] like Figure 6 As shown in FIG. 6 , the application scenario may include, for example, a network 60 , a server 61 , and an endoscope device 62 . After the medical staff obtains an endoscopic image by performing an image acquisition operation through the endoscope device 62 , the endoscope device 62 sends the captured endoscopic image to the server 61 .
[0085] After receiving the endoscopic image sent by the endoscope device 62, the server 61 will register the three-dimensional model of the biological tissue in the endoscopic image to obtain the registered three-dimensional model. The endoscopic image and the registered three-dimensional model are sent to the endoscope device 62 so that the endoscope device 62 can display the endoscopic image and the registered three-dimensional model to the medical staff through the display screen.
[0086] It should be noted that, in actual applications, the server 61 can be used as an independent processor such as a cloud processor, a processor cluster, etc., which is independent of the endoscope device 62. In addition, the server 61 can also be used as an internal processor of the endoscope device 62, and the specific type of the server 61 is not limited in this application.
[0087] The description in this application only details a single server or terminal device, but those skilled in the art should understand that Figure 6 The server 61 shown is intended to represent the operation of the server involved in the technical solution of the present application. The individual servers are described in detail at least for the convenience of explanation, and do not imply any limitation on the number, type or location of the servers. It should be noted that if additional modules are added to the illustrated environment or individual modules are removed from it, the underlying concepts of the example embodiments of the present application will not be changed.
[0088] Augmented reality technology can fuse and display the three-dimensional model reconstructed based on preoperative medical images with the endoscopic images collected by the intraoperative endoscopic equipment, allowing doctors to intuitively see the anatomical structure below the surface of the organ, effectively solving the problem of lack of depth perception information and tactile feedback information, and making surgical operations faster, more precise and safer.
[0089] However, during the operation, the surgical site may be greatly deformed due to changes in the patient's body position and various surgical operations, making the surgical site in its current state different from the one photographed before the operation. Figure 7 As shown, a relatively large difference is formed. Therefore, it is necessary to align the three-dimensional model and the endoscopic image according to the error displayed by the fusion of the three-dimensional model and the endoscopic image.
[0090] In the related art, in order to determine the error of the fusion display of the three-dimensional model and the endoscopic image, it is necessary to manually select the positions of the marking points on the three-dimensional model and the endoscopic image respectively, resulting in the inability to accurately calculate the actual fusion error of the three-dimensional model and the endoscopic image.
[0091] Figure 8 The flowchart of a method for registering a three-dimensional model and an endoscopic image provided in an embodiment of the present application is shown. The method can be applied to Figure 1 In the processor of the camera host of the endoscope device shown, Figure 8 As shown, the method may include the following steps:
[0092] Step S801 , obtaining a three-dimensional model corresponding to the biological tissue obtained by photographing and three-dimensionally reconstructing the biological tissue, and obtaining an endoscopic image of the biological tissue.
[0093] The biological tissue includes at least one marking point.
[0094] In an optional implementation, the patient's biological tissue can be photographed before surgery to obtain corresponding medical digital image data, and the medical digital image data can be reconstructed in three dimensions to obtain a three-dimensional model corresponding to the biological tissue. The medical digital image data can be obtained by CT imaging of the biological tissue, or by MRI scanning of the biological tissue, which is not limited in this application.
[0095] In some embodiments, the marking point of the biological tissue can be a fluorescent dye that emits a specific color of fluorescence under a specific excitation light. In other embodiments, the marking point can also be a fluorescently labeled antibody, protein or other biological molecule. In other embodiments, if the biological tissue selected in the embodiments of the present application is a human organ model, such as a liver model, the marking point can also be a marker set in the liver model.
[0096] Step S802: identifying a first marking point region corresponding to each marking point in the endoscopic image according to a pixel feature of each pixel in the endoscopic image.
[0097] In an optional implementation, the first marking point region corresponding to each marking point in the endoscopic image may be determined based on the pixel features of each pixel point in the endoscopic image and the pixel features of the marking point.
[0098] In some embodiments, the pixel features of each pixel in the endoscopic image and the pixel features of the marker point can be color feature values. Specifically, a first color threshold can be set for the color feature value of the marker point, and the first color feature value is used to distinguish the marker point area from other areas in the endoscopic image. Assuming that the marker point is white, it can be determined that the color value of the marker point in the RGB color system is (255,255,255). Therefore, the first color threshold can be set to the color feature value of the marker point, or the first color threshold can be set to a value close to the color feature value of the marker point. For example, the first color threshold can be set to (245,245,245).
[0099] Next, for each pixel in the endoscopic image, the color feature value of the pixel may be compared with the first color threshold, and whether the pixel is the first target pixel corresponding to the marked point in the endoscopic image may be determined based on the comparison result.
[0100] Exemplarily, each pixel in the endoscopic image can be compared with a preset first color threshold (245, 245, 245). If the color value of a pixel in the red channel is greater than 245, the color value in the green channel is greater than 245, and the color value in the blue channel is greater than 245, then the pixel can be considered to be the first target pixel corresponding to the marked point in the endoscopic image. After traversing each pixel in the endoscopic image, the first target pixel corresponding to the marked point in the endoscopic image can be determined, and the area formed by the first target pixel is the first marked point area in the endoscopic image. Fig. 9 As shown, the first marking point area in the endoscopic image is the white circular area in the figure.
[0101] In another optional implementation, the characteristic parameters of the endoscopic image may also be input into an image segmentation algorithm, and the image segmentation algorithm may be used to automatically segment out the first marking point region in the endoscopic image.
[0102] Step S803, projecting the three-dimensional model to obtain a reference image based on the projection transformation matrix of the virtual camera corresponding to the endoscope device, and determining the second marking point area corresponding to each marking point in the reference image based on the pixel features of each pixel in the reference image.
[0103] The reference image is a two-dimensional image, and the virtual camera is constructed based on the camera parameters of the endoscope device.
[0104] Since the dimensions of the three-dimensional model and the endoscopic image are different, the three-dimensional model needs to be projected into a two-dimensional image through dimensionality reduction.
[0105] Specifically, a virtual camera with the same parameters as the endoscope device can be constructed first, and then the projection transformation matrix of the virtual camera can be used to project the three-dimensional coordinates of the three-dimensional model onto the two-dimensional plane of the playback window of the current endoscope device to obtain a reference image.
[0106] After obtaining the reference image corresponding to the three-dimensional model, the second marking point region corresponding to each marking point in the reference image can be determined according to the pixel feature of each pixel point in the reference image.
[0107] In an optional implementation, the second marker point region corresponding to each marker point in the reference image may be determined based on the pixel features of each pixel point in the reference image and the pixel features of the marker point.
[0108] In some embodiments, the pixel feature of each pixel in the reference image and the pixel feature of the marker point may be a color feature value. Specifically, a second color threshold may be set for the color feature value of the marker point, and the second color feature value is used to distinguish the marker point area from other areas in the reference image. The second color threshold may be the same as the first color threshold mentioned above, or may be different from the first color threshold mentioned above.
[0109] Next, for each pixel in the reference image, the color feature value of the pixel can be compared with the second color threshold, and whether the pixel is the second target pixel corresponding to the marked point in the reference image can be determined based on the comparison result. The method for determining whether the pixel is the target pixel corresponding to the marked point has been described in detail above and will not be repeated here.
[0110] In another optional implementation, an image segmentation algorithm may also be used to automatically segment the second marker point region in the reference image.
[0111] like Fig.10 As shown, the second marking point area in the reference image is a gray circular area near the white circular area in the figure.
[0112] Step S804, determining a fusion error between the three-dimensional model and the endoscopic image based on each first marker point region in the endoscopic image and each second marker point region in the reference image, and aligning the three-dimensional model and the endoscopic image based on the fusion error.
[0113] After acquiring each first marker point region in the endoscopic image and each second marker point region in the reference image, the corresponding relationship between each first marker point region and each second marker point region may be determined first.
[0114] Specifically, the following can be performed for each first marking point area: Fig.11 The method shown in the figure can determine the corresponding relationship between each first marking point area and each second marking point area, and the method can include the following steps:
[0115] Step S1101, determining the distance between the center position of the first marking point area and the center position of each second marking point area according to the coordinates of the center position of the first marking point area and the coordinates of the center position of each second marking point area.
[0116] For any first marking point area, the coordinates of the center position of the first marking point area can be determined first, and then the coordinates of the center position of each second marking point area can be determined. After obtaining the coordinates of the center position of the first marking point area and the coordinates of the center position of each second marking point area, the distance between the center position of the first marking point area and the center position of each second marking point area can be determined based on the coordinates of the center position of the first marking point area and the coordinates of the center position of each second marking point area.
[0117] Step S1102: determining a second marking point region corresponding to the same marking point as the first marking point region according to the distance between the center position of the first marking point region and the center position of each second marking point region.
[0118] After obtaining the distance between the center position of the first marking point area and the center position of each second marking point area, the center position of the second marking point area that is closest to the center position of the first marking point area can be determined, and the second marking point area to which the center position belongs can be determined to be the second marking point area corresponding to the same marking point as the first marking point area.
[0119] Step S1103: taking a second marking point region having the same marking points as the first marking point region as the second marking point region corresponding to the first marking point region.
[0120] After determining the second marking point region corresponding to the same marking point as the first marking point region, the second marking point region corresponding to the same marking point as the first marking point region may be used as the second marking point region corresponding to the first marking point region.
[0121] In an optional embodiment, after determining the correspondence between each first marker point area and each second marker point area, the pixel distance between each first marker point area and the corresponding second marker point area can be determined based on the correspondence, and the pixel distance can be used as a reference fusion error between each first marker point area and the corresponding second marker point area.
[0122] For example, assuming that the coordinates of the center position of a first marker area are (X1, Y1), and the coordinates of the center position of the second marker area corresponding to the first marker area are (X2, Y2), the pixel distance between the first marker area and the corresponding second marker area can be determined by formula (1), which can be expressed as:
[0123]
[0124] Among them, Diff pts Indicates the pixel distance between the first marker area and the corresponding second marker area.
[0125] In some embodiments, an average value of multiple pixel distances may be used as a fusion error between the three-dimensional model and the endoscopic image.
[0126] After determining the pixel distance between each first marker point area and the corresponding second marker point area, and using the pixel distance as the reference fusion error between each first marker point area and the corresponding second marker point area, the average value of multiple pixel distances can be determined, and the average value of multiple pixel distances, that is, the average pixel distance between each first marker point area and the corresponding second marker point area, is used as the fusion error between the three-dimensional model and the endoscopic image.
[0127] In another optional embodiment, after determining the correspondence between each first marker point area and each second marker point area, the physical distance between each first marker point area and the corresponding second marker point area can be determined based on the correspondence, and the physical distance can be used as a reference fusion error between each first marker point area and the corresponding second marker point area.
[0128] Specifically, a method for determining the physical distance between a first marking point area and a corresponding second marking point area is as follows: Fig.12 As shown, the following steps may be included:
[0129] Step S1201, converting the two-dimensional coordinates of the pixel points in the first marking point area into three-dimensional coordinates in the CT image coordinate system.
[0130] Specifically, the composite transformation matrix can be determined based on the transformation matrix from the camera coordinate system of the endoscope device to the sensor coordinate system, the transformation matrix from the sensor coordinate system to the positioning device coordinate system, and the transformation matrix from the positioning device coordinate system to the CT image coordinate system.
[0131] Among them, the product of the transformation matrix from the camera coordinate system of the endoscope device to the sensor coordinate system, the transformation matrix from the sensor coordinate system to the positioning device coordinate system, and the transformation matrix from the positioning device coordinate system to the CT image coordinate system is the composite transformation matrix.
[0132] According to the composite transformation matrix, the two-dimensional coordinates of the pixel points in the first marking point area can be converted into three-dimensional coordinates in the CT image coordinate system.
[0133] Exemplarily, the product of the two-dimensional coordinates of the pixel points in the first marking point area and the composite transformation matrix can be used as the three-dimensional coordinates of the pixel points in the first marking point area in the CT image coordinate system.
[0134] Step S1202: convert the two-dimensional coordinates of the pixel points in the second marking point area into three-dimensional coordinates in the CT image coordinate system according to the projection transformation matrix of the virtual camera.
[0135] Specifically, for the two-dimensional coordinates of each pixel point in the second marking point area, the two-dimensional coordinates of each pixel point in the second marking point area can be converted into three-dimensional coordinates in the CT image coordinate system according to the projection transformation matrix of the virtual camera.
[0136] Exemplarily, the product of the two-dimensional coordinates of the pixel points in the second marking point area and the projection transformation matrix can be used as the three-dimensional coordinates of the pixel points in the second marking point area in the CT image coordinate system.
[0137] Step S1203: determining the physical distance between the first marking point area and the corresponding second marking point area according to the three-dimensional coordinates of the first marking point area and the corresponding second marking point area.
[0138] After determining the three-dimensional coordinates of the first marking point area and the three-dimensional coordinates of the second marking point area, the physical distance between the first marking point area and the corresponding second marking point area can be determined based on the three-dimensional coordinates of the first marking point area and the corresponding second marking point area.
[0139] For example, assuming that the three-dimensional coordinates of the center position of a first marking point area are (X1, Y1, Z1), and the three-dimensional coordinates of the center position of the second marking point area corresponding to the first marking point area are (X2, Y2, Z2), then the physical distance between the first marking point area and the corresponding second marking point area can be determined by formula (2), which can be expressed as:
[0140]
[0141] Among them, Diff world Indicates the physical distance between the first marker area and the corresponding second marker area.
[0142] In some embodiments, an average value of multiple physical distances may be used as a fusion error between the three-dimensional model and the endoscopic image.
[0143] After determining the physical distance between each first marker point area and the corresponding second marker point area, and using the physical distance as a reference fusion error between each first marker point area and the corresponding second marker point area, an average value of multiple physical distances can be determined, and the average value of the multiple physical distances, i.e., the average physical distance between each first marker point area and the corresponding second marker point area, is used as the fusion error between the three-dimensional model and the endoscopic image.
[0144] At this point, the fusion error between the 3D model and the endoscopic image is determined.
[0145] After determining the fusion error between the three-dimensional model and the endoscope image, the displacement distance of the three-dimensional model can be determined according to the fusion error, and the three-dimensional model can be registered according to the displacement distance. After obtaining the registered three-dimensional model, Fig.13 As shown, the registered three-dimensional model and the endoscopic image can be displayed on a display of the endoscopic device.
[0146] The registration method of the three-dimensional model and the endoscopic image provided in the embodiment of the present application obtains the three-dimensional model and the endoscopic image of the biological tissue, and then identifies the first marker point area in the endoscopic image according to the pixel features of each pixel in the endoscopic image, and then projects the three-dimensional model to obtain a reference image, and identifies the second marker point area in the reference image. Finally, according to each first marker point area in the endoscopic image and each second marker point area in the reference image, the fusion error between the three-dimensional model and the endoscopic image is determined, and the three-dimensional model and the endoscopic image are registered according to the fusion error. In this way, the marker point area can be automatically obtained in the three-dimensional model and the two-dimensional image without manual selection of the marker point area, and the fusion error between the three-dimensional model and the two-dimensional image can be quantified more accurately, avoiding the introduction of manual errors that lead to the inability to accurately calculate the actual fusion error of the three-dimensional model and the two-dimensional image, thereby more accurately registering the three-dimensional model and the endoscopic image.
[0147] Moreover, compared with the fusion error determined only based on edge feature points such as the edge points of biological tissues and the edge points of the three-dimensional model, the fusion error determined based on the marker point area covers a more comprehensive range of the marker point area. Therefore, the determined fusion error and the result of the three-dimensional model alignment based on the fusion error are more accurate, and can more accurately guide medical staff to perform surgical operations.
[0148] An embodiment of the present application further provides a computer storage medium, in which computer executable instructions are stored. The computer executable instructions are used to implement the method for aligning a three-dimensional model and an endoscopic image as described in any embodiment of the present application.
[0149] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0150] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0151] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0152] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0153] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An endoscope device, characterized in that: The endoscopic device includes a processor and a display; The processor is configured to: Acquire a three-dimensional model corresponding to the biological tissue obtained by photographing and three-dimensionally reconstructing the biological tissue, and acquire an endoscopic image of the biological tissue; the biological tissue includes at least one marking point; Identifying a first marking point region corresponding to each marking point in the endoscopic image according to a pixel feature of each pixel in the endoscopic image; and projecting the three-dimensional model to obtain a reference image according to a projection transformation matrix of a virtual camera corresponding to the endoscope device, wherein the reference image is a two-dimensional image, and the virtual camera is constructed based on camera parameters of the endoscope device; Determine, according to a pixel feature of each pixel in the reference image, a second marking point region corresponding to each marking point in the reference image; Determine a fusion error between the three-dimensional model and the endoscopic image according to each of the first marker point regions in the endoscopic image and each of the second marker point regions in the reference image; and register the three-dimensional model and the endoscopic image according to the fusion error; The display is configured to display the registered three-dimensional model and the endoscopic image.
2. The endoscope device according to claim 1, characterized in that: When the processor identifies the first marking point region corresponding to each marking point in the endoscopic image according to the pixel feature of each pixel in the endoscopic image, the processor is specifically configured to: determine the first marking point region corresponding to each marking point in the endoscopic image according to the pixel feature of each pixel in the endoscopic image and the pixel feature of the marking point; When the processor determines the second marker point area corresponding to each marker point in the reference image based on the pixel features of each pixel point in the reference image, the processor is specifically configured to: determine the second marker point area corresponding to each marker point in the reference image based on the pixel features of each pixel point in the reference image and the pixel features of the marker point.
3. The endoscope device according to claim 2, characterized in that: The pixel feature is a color feature value, and the processor is specifically configured to: For each pixel in the endoscopic image, compare the color feature value of the pixel with a first color threshold, and determine whether the pixel is a first target pixel according to the comparison result, where the first target pixel is a pixel in the endoscopic image corresponding to the marking point; A first marking point area in the endoscopic image is determined according to the determined first target pixel point.
4. The endoscope device according to claim 2, characterized in that: The pixel feature is a color feature value, and the processor is specifically configured to: For each pixel in the reference image, compare the color feature value of the pixel with the second color threshold, and determine whether the pixel is a second target pixel according to the comparison result, where the second target pixel is a pixel in the reference image corresponding to the marked point; According to the determined second target pixel point, a second marking point area in the reference image is determined.
5. The endoscope device according to claim 1, characterized in that: The processor is specifically configured to: Determining a correspondence between each first marking point region and each second marking point region; According to the corresponding relationship, a reference fusion error between each of the first marker point areas and the corresponding second marker point areas is determined; according to the reference fusion error between each of the first marker point areas and the corresponding second marker point areas, a fusion error between the three-dimensional model and the endoscopic image is determined.
6. The endoscope device according to claim 5, characterized in that: The biological tissue includes a plurality of marking points; When determining the correspondence between each first marking point area and each second marking point area, the processor is specifically configured to: For each of the first marking point areas, determine a second marking point area corresponding to the same marking point as the first marking point area from multiple second marking point areas; and use the second marking point area corresponding to the same marking point as the first marking point area as the second marking point area corresponding to the first marking point area.
7. The endoscope device according to claim 6, characterized in that: When the processor determines, from the plurality of second marking point regions, a second marking point region corresponding to the same marking point as the first marking point region, the processor is specifically configured to: Determine the distance between the center position of the first marking point area and the center position of each of the second marking point areas according to the coordinates of the center position of the first marking point area and the coordinates of the center position of each of the second marking point areas; A second marking point area corresponding to the same marking point as the first marking point area is determined according to the distance between the center position of the first marking point area and the center position of each of the second marking point areas.
8. The endoscope device according to any one of claims 5 to 7, characterized in that: When the processor determines the reference fusion error between each of the first marking point regions and the corresponding second marking point region according to the corresponding relationship, the processor is specifically configured to: Determine, according to the corresponding relationship, a pixel distance and / or a physical distance between each first marking point area and a corresponding second marking point area; The pixel distance and / or physical distance is used as a reference fusion error between each first marker point region and the corresponding second marker point region.
9. A method for registering a three-dimensional model and an endoscopic image, characterized in that: The method comprises: Acquire a three-dimensional model corresponding to the biological tissue obtained by photographing and three-dimensionally reconstructing the biological tissue, and acquire an endoscopic image of the biological tissue; the biological tissue includes at least one marking point; According to the pixel features of each pixel point in the endoscopic image, a first marking point area corresponding to each marking point in the endoscopic image is identified; and according to the projection transformation matrix of the virtual camera corresponding to the endoscopic device, the three-dimensional model is projected to obtain a reference image, wherein the reference image is a two-dimensional image, and the virtual camera is constructed based on the camera parameters of the endoscopic device; according to the pixel features of each pixel point in the reference image, a second marking point area corresponding to each marking point in the reference image is determined; Determine a fusion error between the three-dimensional model and the endoscopic image according to each of the first marker point regions in the endoscopic image and each of the second marker point regions in the reference image; and register the three-dimensional model and the endoscopic image according to the fusion error; The registered three-dimensional model and the endoscopic image are displayed.
10. The method according to claim 9, characterized in that The step of identifying the first marking point region corresponding to each marking point in the endoscopic image according to the pixel feature of each pixel in the endoscopic image comprises: determining the first marking point region corresponding to each marking point in the endoscopic image according to the pixel feature of each pixel in the endoscopic image and the pixel feature of the marking point; Determining the second marker point area corresponding to each marker point in the reference image according to the pixel features of each pixel point in the reference image includes: determining the second marker point area corresponding to each marker point in the reference image according to the pixel features of each pixel point in the reference image and the pixel features of the marker point.
