System and method for visualizing alignment state of beam outlet tube and beam barrel, and electronic equipment

By designing a visualization system for the alignment status of the beam tube and nozzle, and using optical markers and cameras to calculate a three-dimensional relative position map, the problem of inaccurate treatment beam alignment in intraoperative radiotherapy is solved and efficient visual guidance and accuracy are achieved. alignment.

CN118698047APending Publication Date: 2024-09-27ZHONGJIU FLASH MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410743006.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

During the intraoperative radiotherapy process, the existing technology lacks an effective visual guidance solution, resulting in inaccurate alignment of the linear accelerator treatment beam and the beam tube, and the inability to accurately control the alignment status in real time, affecting the treatment effect.

Method used

Design a system for visualizing the alignment status of the beam tube and the beam tube, including the beam tube, a driving device, the beam tube, an optical marker, a camera and a control module. By calculating the image of the optical marker, the beam tube and the beam tube are established. The three-dimensional relative position diagram and two-dimensional view of the barrel display the alignment status in real time to guide the operator in manual alignment.

Benefits of technology

It achieves precise alignment of the beam tube and the beam tube, improves the accuracy and efficiency of visual guidance, simplifies the hardware system, improves the usability of the equipment, and expands application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118698047A
    Figure CN118698047A
Patent Text Reader

Abstract

The invention relates to the technical field of visual guidance visualization scheme design of radiotherapy equipment, in particular to a visualization system and method for the alignment state of a beam outlet tube and a beam barrel, and electronic equipment. Comprising the following steps: calculating a current pose of a beam tube under a beam tube coordinate system according to an image of an optical marker, and taking a beam tube pose under the beam tube coordinate system as an expected pose, establishing a three-dimensional relative position map and a two-dimensional three-view map of the beam-emitting tube and the beam-emitting tube according to the current pose of the beam-emitting tube under the beam-emitting tube coordinate system and the expected pose of the beam-emitting tube under the beam-emitting tube coordinate system; and the alignment state of the beam tube and the beam barrel is displayed by the display device. An operator can be guided to carry out manual alignment operation; an operator is assisted to judge to stop smooth traction and start visual guidance; an operator is assisted in judging whether the final visual guidance alignment effect meets the requirement or not. The precision and the efficiency of visual guidance work are improved to a great extent, and the intelligent degree and the usability of the system are improved to a great extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of visual guidance visualization scheme design for radiotherapy equipment, and in particular to a system and method for visualizing the alignment state of a beam-emitting tube and a snoot, and electronic equipment. Background Art

[0002] FLASH radiotherapy (FLASH rad iotherapy, FLASH-RT) refers to the use of ultra-high dose rate irradiation to produce a radiation therapy that has a protective mechanism for normal tissues. The average dose rate used is mostly above 40Gy / s, and the irradiation time is generally less than 1s. It is a radiation therapy technology with ultra-high dose rate irradiation as its main feature.

[0003] Intraoperative radiotherapy refers to a single high-dose, close-range irradiation of the primary tumor bed, residual lesions, etc. after surgical resection of the tumor. Compared with traditional radiotherapy methods, intraoperative radiotherapy has the advantages of high precision, less trauma and shorter time. It can effectively kill potential residual tumor cells during surgery and preserve organ function as much as possible, achieving the purpose of reducing recurrence and ultimately improving survival rate. It can be widely used in breast cancer, nervous system tumors, spinal tumors and gastrointestinal tumors.

[0004] In the intraoperative radiotherapy scenario, the radiation oncologist evaluates the primary tumor or the tumor bed area after surgery, selects a beam tube of appropriate size, shape, and bevel, and uses it to separate the tumor tissue from normal tissue. Then, after the physicist aligns the robotic arm with the beam limiting device, the beam treatment begins.

[0005] In the above application context, the rapid and high-precision alignment of the treatment beam emitted by the linear accelerator with the beam tube that limits the irradiation range is crucial for the safe and efficient killing of cancer cells. The high-precision positioning process of the linear accelerator is decomposed into two stages: coarse adjustment and fine adjustment. In the coarse adjustment stage, the doctor manually pulls the traction handle at the end of the radiotherapy head to pull the linear accelerator from the initial working position to the vicinity of the beam tube, so that multiple optical markers are within the line of sight of the visual guidance sensor; in the fine adjustment stage, the visual guidance system identifies the optical markers on the beam tube and guides the linear accelerator treatment beam to accurately align with the beam tube. The treatment beam is emitted through the beam tube or the beam outlet, so the alignment of the treatment beam and the beam tube is actually the alignment of the beam tube or the beam outlet with the beam tube.

[0006] In the above alignment process, due to the limitation of the operator's visual angle, for example, the human eye vision cannot be in the emission direction of the radiotherapy beam, and can only roughly estimate the current alignment stage. It is impossible to accurately control the current alignment state in real time, guide manual alignment operations, assist the operator in determining to stop soft traction and start visual guidance, and assist the operator in determining whether the final visual guidance alignment effect meets the requirements. There is a lack of effective solutions in the prior art.

[0007] Therefore, the prior art needs to be further developed. Summary of the invention

[0008] The purpose of the present invention is to overcome the above technical deficiencies and provide a system and method for visualizing the alignment status of a beam-emitting tube and a snoot tube, and an electronic device to solve the problems existing in the prior art.

[0009] To achieve the above technical objectives, according to a first aspect of the present invention, the present invention provides a system for visualizing the alignment status of a beam outlet tube and a snoot tube, the system comprising:

[0010] A beam outlet tube, comprising a beam outlet, wherein the beam outlet is an outlet for the treatment beam;

[0011] A driving device, used for driving the beam-emitting tube to move;

[0012] A snoot, which is arranged corresponding to the beam-emitting tube, and comprises a disc, on which a beam channel is opened, and the treatment beam irradiates the patient's lesion through the beam channel;

[0013] Optical markers, the optical markers include at least three, and the at least three optical markers are spaced apart from each other and are non-collinearly arranged on the disk;

[0014] A camera, used for photographing the optical marker;

[0015] A control module, wherein the control module is respectively connected to the beam tube, the driving device and the camera signal, and the control module is used to obtain an image of the optical marker, calculate the current posture of the snoot in the beam tube coordinate system according to the image of the optical marker, take the beam tube posture in the beam tube coordinate system as the desired posture, establish a three-dimensional relative position diagram of the beam tube and the snoot according to the current posture of the snoot in the beam tube coordinate system and the desired posture of the beam tube in the beam tube coordinate system, and use a display device to display the alignment state of the beam tube and the snoot;

[0016] The display device is used to display the alignment status of the beam tube and the snoot.

[0017] According to a second aspect of the present invention, a method for visualizing the alignment state of a beam-emitting tube and a snoot is provided, and the method adopts the above-mentioned system for visualizing the alignment state of a beam-emitting tube and a snoot, comprising:

[0018] S100, acquiring an image of the optical marker;

[0019] S200, calculating the current posture of the snoot in the beam tube coordinate system according to the image of the optical marker, taking the posture of the beam tube in the beam tube coordinate system as the desired posture, and establishing a three-dimensional relative position diagram of the beam tube and the snoot according to the current posture of the snoot in the beam tube coordinate system and the desired posture of the beam tube in the beam tube coordinate system and a two-dimensional three-view diagram;

[0020] S300, using a display device to display the alignment status of the beam tube and the snoot.

[0021] Specifically, calculating the current positions of the beam tube and the snoot according to the images of the optical marker and the beam tube includes:

[0022] According to the image of the optical marker, the first pixel coordinates of the optical marker are obtained, and then the first pixel coordinates are perspective transformed, and the first pixel coordinates are converted to the plane where the disk is located, and the pixel coordinates after the conversion are calculated and recorded as second pixel coordinates. According to the second pixel coordinates and the installation position of the optical marker on the disk, the disk and the disk edge are determined, and then the pixel coordinates of the beam channel edge and the disk edge are obtained. According to the pixel coordinates of the beam channel edge and the disk edge, a first two-dimensional plane diagram containing both the disk edge and the beam channel edge is established.

[0023] Specifically, the method further includes:

[0024] The camera is fixedly mounted on the beam-emitting tube, and the actual relative position relationship between the camera and the beam-emitting tube, and the homography matrix between the camera coordinate system and the beam-emitting tube coordinate system are obtained by three-coordinate measurement.

[0025] Specifically, taking the beam-outlet tube posture in the beam-outlet tube coordinate system as the desired posture includes:

[0026] According to the relative position relationship between the camera and the beam outlet, and the homography matrix of the camera coordinate system and the beam outlet coordinate system, the pixel coordinates of the geometric center of the beam outlet in the image of the optical marker are determined, and according to the pixel coordinates of the geometric center in the image of the optical marker, the pixel coordinates of the edge of the beam outlet and the edge of the beam outlet are obtained, and according to the pixel coordinates of the edge of the beam outlet and the edge of the beam outlet, a second two-dimensional plane diagram including the edge of the beam outlet and the edge of the beam outlet is established.

[0027] Specifically, the method further includes:

[0028] Get the camera's intrinsic parameter matrix and gimbal angle;

[0029] Compute the homography matrix for the perspective transformation;

[0030] The homography matrix for perspective transformation is calculated using the following formula:

[0031] H=KRK -1

[0032] The second pixel coordinate is calculated using the following formula:

[0033]

[0034] Among them, H is the homography matrix of perspective transformation, R is the gimbal angle, K is the camera intrinsic parameter matrix, K -1 is the transposed matrix of the camera intrinsic parameter matrix, (u′, v′) is the second pixel coordinate, (u, v) is the first pixel coordinate, (X, Y, 1) is the normalized coordinate of the spatial point in the camera (5) coordinate system, and the normalized coordinate and the first pixel coordinate are transformed through the camera intrinsic parameter matrix.

[0035] Specifically, the three-dimensional relative position diagram and the two-dimensional three-view diagram of the beam-emitting tube and the snoot are established according to the current positions of the beam-emitting tube and the snoot, including:

[0036] Get the dimensions of the beam tube and snoot;

[0037] A three-dimensional model is established in the display device according to the dimensions of the beam-exit tube and the snoot;

[0038] The posture of the three-dimensional model is adjusted according to the current posture of the beam-emitting tube and the snoot to form a three-dimensional relative position diagram.

[0039] Specifically, the method of establishing a three-dimensional relative position diagram and a two-dimensional three-view diagram of the beam-emitting tube and the snoot according to the current positions of the beam-emitting tube and the snoot also includes:

[0040] According to the projection of the three-dimensional relative position diagram on the two-dimensional plane, a two-dimensional relative position diagram of the beam-emitting tube and the snoot is established, wherein the two-dimensional relative position diagram includes a front view two-dimensional relative position diagram, a side view two-dimensional relative position diagram, and a top view two-dimensional relative plane diagram, wherein the top view two-dimensional relative plane is a plane perpendicular to the plane where the beam channel is located; the top view two-dimensional relative position is established on a plane perpendicular to the plane where the beam channel is located.

[0041] Specifically, the method further includes:

[0042] A first height line is drawn at a first preset position at which the front view two-dimensional relative position diagram and the side view two-dimensional relative position diagram have the same height, a second height line is drawn at a second preset position at which the front view two-dimensional relative position diagram and the side view two-dimensional relative position diagram have the same height, a first circle is drawn at a third preset position of the side view two-dimensional relative position diagram, and a third circle is drawn at a fourth preset position of the side view two-dimensional relative position diagram, wherein the first circle is larger than the third circle.

[0043] According to a third aspect of the present invention, there is provided an electronic device, comprising: a memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the above-mentioned method for visualizing the alignment state of the beam-emitting tube and the snoot tube is implemented.

[0044] Beneficial effects:

[0045] The present invention realizes real-time visualization of the relative posture state of the beam tube and the light tube when they are precisely aligned through the visual guidance system, and describes the posture relationship between the two in the form of graphics and images, which can guide the operator to manually align the operation; realizes the auxiliary operator to determine whether to stop the soft traction and start the visual guidance; realizes the auxiliary operator to determine whether the final visual guidance alignment effect meets the requirements. The accuracy, efficiency and intelligence of the visual guidance work are improved, the hardware system is simplified, and no complex algorithm modeling is required, which improves the availability of the overall equipment and expands the application scenarios of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a schematic diagram of the composition of a beam-emitting tube and a snoot alignment state visualization system provided in a specific embodiment of the present invention;

[0047] Figure 2 is a schematic structural diagram of a snoot provided in a specific embodiment of the present invention;

[0048] Figure 3 is a schematic diagram of a first two-dimensional plane view when the beam channel is not aligned with the beam outlet in a specific embodiment of the present invention;

[0049] Figure 4 is a schematic diagram of a first two-dimensional plane view when the beam channel is aligned with the beam outlet in a specific embodiment of the present invention;

[0050] Figure 5 is a schematic diagram of the principle of perspective transformation in a specific embodiment of the present invention;

[0051] Figure 6 is a schematic diagram comparing the edge of the disk and the edge of the beam channel before and after perspective transformation in a specific embodiment of the present invention;

[0052] Figure 7 is a schematic diagram of a visual guidance start height line, a visual guidance stop height line, a visual guidance start horizontal circle, and a visual guidance stop horizontal circle in a specific embodiment of the present invention;

[0053] Figure 8 It is a flow chart of a method for visualizing the alignment state of a beam-emitting tube and a snoot provided in a specific embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is clearly and completely described below in conjunction with the accompanying drawings of the present invention. Based on the embodiments in this application, other similar embodiments obtained by ordinary technicians in this field without making creative work should all fall within the scope of protection of this application. In addition, the directional words mentioned in the following embodiments, such as "up", "down", "left", "right", etc., are only reference to the directions of the accompanying drawings. Therefore, the directional words used are used to illustrate rather than limit the invention.

[0055] The present invention will be further described below in conjunction with the accompanying drawings and preferred embodiments.

[0056] See also Figure 1-Figure 8 The present invention provides a system for visualizing the alignment status of a beam-emitting tube and a snoot, comprising:

[0057] The beam outlet tube 1 comprises a beam outlet, which is an outlet for the treatment beam;

[0058] A driving device 2, used for driving the beam-emitting tube 1 to move;

[0059] A snoot 3, the snoot 3 is arranged corresponding to the beam outlet tube 1, the snoot comprises a disk 33, a beam channel 31 is opened on the disk 33, and the treatment beam irradiates the patient's lesion through the beam channel 31;

[0060] An optical marker 4, wherein the optical marker 4 comprises at least three optical markers 4, and the at least three optical markers 4 are spaced apart from each other and are non-collinearly arranged on the disk 33;

[0061] A camera 5, used for photographing the optical marker 4;

[0062] A control module, wherein the control module is respectively connected to the beam tube 1, the driving device 2 and the camera 5 by signals, and the control module is used to obtain an image of the optical marker 4, calculate the current posture of the snoot tube 3 in the beam tube coordinate system according to the image of the optical marker 4, take the beam tube posture in the beam tube coordinate system as the desired posture, establish a three-dimensional relative position diagram of the beam tube 1 and the snoot tube 3 and a two-dimensional three-view diagram according to the current posture of the snoot tube 3 in the beam tube coordinate system and the desired posture of the beam tube 1 in the beam tube coordinate system, and display the alignment state of the beam tube 1 and the snoot tube 3 by using a display device;

[0063] The display device is used to display the alignment status of the beam tube 1 and the snoot 3.

[0064] It can be understood that the present invention realizes the real-time visualization of the relative posture state of the beam tube and the light tube when they are precisely aligned through the visual guidance system, and describes the posture relationship between the two in the form of graphics and images, which can guide the operator to manually align the operation; realize the auxiliary operator to determine whether to stop the soft traction and start the visual guidance; realize the auxiliary operator to determine whether the final visual guidance alignment effect meets the requirements. The accuracy, efficiency and intelligence of the visual guidance work are improved, the hardware system is simplified, and no complex algorithm modeling is required, which improves the availability of the overall equipment and expands the application scenarios of the present invention.

[0065] It is understandable that the final visual guidance alignment effect is determined subjectively by the operator.

[0066] Please continue reading Figures 1 to 8 The present invention provides another embodiment, which provides a method for visualizing the alignment state of a beam-emitting tube and a snoot tube. The method adopts the above-mentioned system for visualizing the alignment state of a beam-emitting tube and a snoot tube. The method comprises:

[0067] S100 , acquiring an image of the optical marker 4 .

[0068] It should be noted that the steps before step S100 include:

[0069] The first preset position, the second preset position, the third preset position, the fourth preset position, the sizes of the beam-emitting tube 1 and the snoot tube 3 are preset in the control module. The sizes of the first preset position, the second preset position, the third preset position, the fourth preset position, the beam-emitting tube 1 and the snoot tube 3 can be specifically set according to actual conditions, as long as they are applicable to the method for visualizing the alignment state of the beam-emitting tube and the snoot tube proposed in the present invention.

[0070] Preferably, the first preset position of the present invention is used to indicate that when the beam-out tube touches the first height line, visual guidance can be started, the second preset position of the present invention is used to indicate that when the beam-out tube touches the second height line, visual guidance can be stopped, the third preset position of the present invention is used to indicate that when the edge of the beam-out tube 1 touches the first circle, visual guidance can be started, and the fourth preset position of the present invention is used to indicate that when the edge of the beam-out tube 1 touches the second circle, visual guidance can be stopped. That is, the first height line of the present invention is the visual guidance start height line, the second height line of the present invention is the visual guidance stop height line, the first circle of the present invention is the visual guidance start horizontal circle, and the second circle of the present invention is the visual guidance stop horizontal circle.

[0071] Preferably, the present invention sets the color of the visual guidance start height line and the visual guidance start horizontal circle to yellow, and sets the color of the visual guidance stop height line and the visual guidance stop horizontal circle to red, which is convenient for staff to observe and further improves the usability of the present invention.

[0072] S200, calculating the current position of the snoot tube 3 in the beam tube coordinate system according to the image of the optical marker 4, taking the beam tube position in the beam tube coordinate system as the desired position, and establishing a three-dimensional relative position diagram of the beam tube 1 and the snoot tube 3 and a two-dimensional three-view diagram according to the current position of the snoot tube 3 in the beam tube coordinate system and the desired position of the beam tube 1 in the beam tube coordinate system.

[0073] Specifically, the current positions of the beam tube 1 and the snoot 3 are calculated according to the images of the optical marker 4 and the beam tube 1, including:

[0074] According to the image of the optical marker 4, the first pixel coordinates of the optical marker 4 are obtained, and then the first pixel coordinates are perspective transformed and converted to the plane where the disk 33 is located, and the pixel coordinates after the conversion are calculated and recorded as second pixel coordinates. According to the second pixel coordinates and the installation position of the optical marker 4 on the disk 33, the disk 33 and the disk edge are determined, and then the pixel coordinates of the beam channel edge and the disk edge are obtained. According to the pixel coordinates of the beam channel edge and the disk edge, a first two-dimensional plane diagram containing both the disk edge and the beam channel edge is established.

[0075] Specifically, the method further includes:

[0076] The camera 5 is fixedly mounted on the beam-emitting tube 1 , and the actual relative position relationship between the camera 5 and the beam-emitting tube 1 and the homography matrix between the camera coordinate system and the beam-emitting tube coordinate system are obtained by three-coordinate measurement.

[0077] Specifically, taking the beam-outlet tube posture in the beam-outlet tube coordinate system as the desired posture includes:

[0078] According to the relative position relationship between the camera 5 and the beam outlet tube 1, and the homography matrix of the camera coordinate system and the beam outlet coordinate system, the pixel coordinates of the geometric center of the beam outlet in the image of the optical marker 4 are determined, and according to the pixel coordinates of the geometric center in the image of the optical marker 4, the pixel coordinates of the edge of the beam outlet tube 1 and the edge of the beam outlet are obtained, and according to the pixel coordinates of the edge of the beam outlet tube 1 and the edge of the beam outlet, a second two-dimensional plane diagram including the edge of the beam outlet tube 1 and the edge of the beam outlet is established.

[0079] Specifically, the method further includes:

[0080] Get the camera intrinsic parameter matrix and gimbal angle of camera 5;

[0081] Compute the homography matrix for the perspective transformation;

[0082] The homography matrix for perspective transformation is calculated using the following formula:

[0083] H=KRK -1

[0084] The second pixel coordinate is calculated using the following formula:

[0085]

[0086] Among them, H is the homography matrix of perspective transformation, R is the gimbal angle, K is the camera intrinsic parameter matrix, K -1 is the transposed matrix of the camera intrinsic parameter matrix, u′, v′ are the second pixel coordinates, u, v are the first pixel coordinates, X, Y, 1 are the normalized coordinates of the spatial point in the camera 5 coordinate system, and the normalized coordinates and the first pixel coordinates are converted through the camera intrinsic parameter matrix.

[0087] Specifically, the three-dimensional relative position diagram and the two-dimensional three-view diagram of the beam-emitting tube 1 and the snoot 3 are established according to the current positions of the beam-emitting tube 1 and the snoot 3, including:

[0088] Obtain the dimensions of the beam-emitting tube 1 and the snoot 3;

[0089] A three-dimensional model is established in the display device according to the dimensions of the beam-emitting tube 1 and the snoot 3;

[0090] The posture of the three-dimensional model is adjusted according to the current postures of the beam-emitting tube 1 and the snoot 3 to form a three-dimensional relative position diagram.

[0091] Specifically, the three-dimensional relative position diagram and the two-dimensional three-view diagram of the beam-emitting tube 1 and the snoot 3 are established according to the current positions of the beam-emitting tube 1 and the snoot 3, and further includes:

[0092] According to the projection of the three-dimensional relative position diagram on the two-dimensional plane, a two-dimensional relative position diagram of the beam-emitting tube and the snoot is established, wherein the two-dimensional relative position diagram includes a front view two-dimensional relative position diagram, a side view two-dimensional relative position diagram, and a top view two-dimensional relative plane diagram, wherein the top view two-dimensional relative plane is a plane perpendicular to the plane where the beam channel is located; the top view two-dimensional relative position is established on a plane perpendicular to the plane where the beam channel is located.

[0093] Specifically, the method further includes:

[0094] A first height line is drawn at a first preset position at which the front view two-dimensional relative position diagram and the side view two-dimensional relative position diagram have the same height, a second height line is drawn at a second preset position at which the front view two-dimensional relative position diagram and the side view two-dimensional relative position diagram have the same height, a first circle is drawn at a third preset position of the side view two-dimensional relative position diagram, and a third circle is drawn at a fourth preset position of the side view two-dimensional relative position diagram, wherein the first circle is larger than the third circle.

[0095] It should be noted here that the first height line is the height line in the direction of the snoot tube axis when the visual guidance starts, and the second height line is the height line in the direction of the snoot tube axis when the visual guidance ends. That is to say, when the figure representing the beam tube intersects with the first height line, the beam alignment process has been shifted from manual traction to visual guidance, and when the figure representing the beam tube coincides with the second height line, the distance between the beam tube and the snoot tube disk during the beam alignment process meets the alignment requirement; the first circle is the horizontal circle at the start of the visual guidance, and the second circle is the horizontal circle at the end of the visual guidance, that is to say, when the figure representing the beam tube is located within the first circle, the beam alignment process has been shifted from manual traction to visual guidance, and when the figure representing the beam tube coincides with the second circle, the beam tube and the snoot tube disk meet the alignment requirement in the plane direction perpendicular to the snoot tube disk during the beam alignment process.

[0096] S300 , using a display device to display the alignment status of the beam tube 1 and the snoot 3 .

[0097] It is understood that the working principle of the present invention is described below by way of specific examples:

[0098] The alignment status visualization of the system can be displayed on the display device according to the original RGB image of the snoot scanned by the visual sensor and the posture model diagram. The visualization image is composed of the original snoot RGB image and the expected pixel coordinates of the snoot. The original snoot RGB image is updated in real time according to the real-time posture of the snoot. The expected pixel coordinates of the expected snoot are fixed values, which are obtained through subjective judgment of the staff and are represented by a red outline.

[0099] Since the visual sensor is installed at an angle to the beam tube at the end of the machine head, when the beam tube at the end of the machine head is aligned with the snoot, the visual sensor's viewing angle is tilted, and the real snoot image obtained by scanning is also tilted, making it difficult to vividly describe the alignment state of the beam tube and the snoot. Therefore, it is necessary to perform a perspective transformation on the visualized snoot image. Perspective transformation is the reprojection of the image to a new imaging plane, also known as projection. By correcting the sensor's viewing angle through perspective transformation, the pixel coordinates of the snoot are converted to an imaging plane perpendicular to the beam tube, and a visualization display effect of the system alignment state RGB image is obtained.

[0100] The pose model diagram includes a three-dimensional model diagram and a two-dimensional three-view diagram, which shows the pose of the beam tube relative to the snoot, that is, the position (X, Y, Z) and posture (roll, pitch, heading) of the beam tube in the snoot coordinate system. The industrial computer only needs to transmit 24 bytes to display the alignment status in real time.

[0101]

[0102] Among them, T is the position of the beam tube relative to the snoot, R is the posture of the beam tube relative to the snoot, and t is the position of the beam tube relative to the snoot.

[0103] It should be noted here that the present invention realizes real-time visualization of the relative posture state of the beam tube and the light tube when they are precisely aligned through the visual guidance system, and describes the posture relationship between the two in the form of graphics and images, which can guide the operator to manually align the operation; realizes the auxiliary operator to determine whether to stop the soft traction and start the visual guidance; realizes the auxiliary operator to determine whether the final visual guidance alignment effect meets the requirements. The accuracy, efficiency and intelligence of the visual guidance work are improved, the hardware system is simplified, and no complex algorithm modeling is required, which improves the availability of the overall equipment and expands the application scenarios of the present invention.

[0104] It is understandable that the final visual guidance alignment effect is determined subjectively by the operator.

[0105] In a preferred embodiment, the present application further provides an electronic device, the electronic device comprising:

[0106] A memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for visualizing the alignment state of the beam tube and the beam tube is implemented. The computer device can be broadly a server, a terminal, or any other electronic device with necessary computing and / or processing capabilities. In one embodiment, the computer device may include a processor, a memory, a network interface, a communication interface, etc. connected through a system bus. The processor of the computer device can be used to provide necessary computing, processing and / or control capabilities. The memory of the computer device may include a non-volatile storage medium and an internal memory. An operating system, a computer program, etc. may be stored in or on the non-volatile storage medium. The internal memory can provide an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface and the communication interface of the computer device can be used to connect and communicate with external devices through a network. When the computer program is executed by the processor, the steps of the method of the present invention are performed.

[0107] The present invention may be implemented as a computer-readable storage medium having a computer program stored thereon, which causes the steps of the method of an embodiment of the present invention to be executed when executed by a processor. In one embodiment, the computer program is distributed on a plurality of computer devices or processors coupled to a network so that the computer program is stored, accessed and executed in a distributed manner by one or more computer devices or processors. A single method step / operation, or two or more method steps / operations, may be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps / operations may be performed by one or more computer devices or processors, and one or more other method steps / operations may be performed by one or more other computer devices or processors. One or more computer devices or processors may perform a single method step / operation, or perform two or more method steps / operations.

[0108] It will be appreciated by those skilled in the art that the method steps of the present invention may be performed by instructing related hardware such as a computer device or a processor through a computer program, and the computer program may be stored in a non-temporary computer-readable storage medium, which causes the steps of the present invention to be performed when the computer program is executed. Depending on the circumstances, any reference to memory, storage, database, or other media herein may include non-volatile and / or volatile memory. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, etc. Examples of volatile memory include random access memory (RAM), external cache memory, etc.

[0109] It can be understood that the present invention realizes the real-time visualization of the relative posture state of the beam tube and the light tube when they are precisely aligned through the visual guidance system, and describes the posture relationship between the two in the form of graphics and images, which can guide the operator to manually align the operation; realize the auxiliary operator to determine whether to stop the soft traction and start the visual guidance; realize the auxiliary operator to determine whether the final visual guidance alignment effect meets the requirements. The accuracy, efficiency and intelligence of the visual guidance work are improved, the hardware system is simplified, and no complex algorithm modeling is required, which improves the availability of the overall equipment and expands the application scenarios of the present invention.

[0110] It is understandable that the final visual guidance alignment effect is determined subjectively by the operator.

[0111] The various technical features described above can be combined arbitrarily. Although all possible combinations of these technical features are not described, any combination of these technical features should be considered to be covered by this specification as long as there is no contradiction in such combination.

[0112] The specific implementation of the present invention described above does not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A system for visualizing the alignment status of a beam-emitting tube and a snoot, characterized in that: The system comprises: A beam outlet tube (1), comprising a beam outlet, the beam outlet being an outlet for the treatment beam; A driving device (2) for driving the beam-emitting tube (1) to move; A beam tube (3), the beam tube (3) being arranged corresponding to the beam outlet tube (1), the beam tube comprising a disk (33), a beam channel (31) being provided on the disk (33), and the treatment beam irradiates the patient's lesion via the beam channel (31); An optical marker (4), wherein the optical marker (4) comprises at least three optical markers (4), and the at least three optical markers (4) are spaced apart from each other and are non-collinearly arranged on the disk (33); A camera (5) for photographing the optical marker (4); A control module, wherein the control module is respectively connected to the beam tube (1), the driving device (2) and the camera (5) by signals, and the control module is used to obtain an image of the optical marker (4), calculate the current position of the snoot tube (3) in the beam tube coordinate system according to the image of the optical marker (4), take the beam tube position in the beam tube coordinate system as the desired position, establish a three-dimensional relative position diagram of the beam tube (1) and the snoot tube (3) and a two-dimensional three-view diagram according to the current position of the snoot tube (3) in the beam tube coordinate system and the desired position of the beam tube (1) in the beam tube coordinate system, and display the alignment state of the beam tube (1) and the snoot tube (3) using a display device; The display device is used for displaying the alignment state of the beam tube (1) and the snoot tube (3).

2. A method for visualizing the alignment state of a beam-emitting tube and a snoot, characterized in that: Using the beam-out tube and snoot alignment state visualization system of claim 1, the method comprises: S100, acquiring an image of the optical marker (4); S200, calculating the current position of the snoot tube (3) in the beam tube coordinate system according to the image of the optical marker (4), taking the beam tube position in the beam tube coordinate system as the desired position, and establishing a three-dimensional relative position diagram of the beam tube (1) and the snoot tube (3) and a two-dimensional three-view diagram according to the current position of the snoot tube (3) in the beam tube coordinate system and the desired position of the beam tube (1) in the beam tube coordinate system; S300, using a display device to display the alignment status of the beam tube (1) and the snoot tube (3).

3. The method for visualizing the alignment state of the beam-emitting tube and the snoot according to claim 2, characterized in that: The current positions of the beam output tube (1) and the snoot (3) are calculated according to the images of the optical marker (4) and the beam output tube (1), including: According to the image of the optical marker (4), the first pixel coordinates of the optical marker (4) are obtained, then the first pixel coordinates are perspective transformed, the first pixel coordinates are converted to the plane where the disk (33) is located, the pixel coordinates after the conversion are calculated and recorded as second pixel coordinates, and the disk (33) and the disk edge are determined according to the second pixel coordinates and the installation position of the optical marker (4) on the disk (33), and then the pixel coordinates of the beam channel edge and the disk edge are obtained, and according to the pixel coordinates of the beam channel edge and the disk edge, a first two-dimensional plane diagram containing both the disk edge and the beam channel edge is established.

4. The method for visualizing the alignment state of the beam-emitting tube and the snoot according to claim 3, characterized in that: The method further comprises: The camera (5) is fixedly mounted on the beam-emitting tube (1), and the actual relative position relationship between the camera (5) and the beam-emitting tube (1) and the homography matrix of the camera coordinate system and the beam-emitting tube coordinate system are obtained by means of three-coordinate measurement.

5. The method for visualizing the alignment state of the beam-emitting tube and the snoot according to claim 4, characterized in that: The method of taking the beam-outlet tube posture in the beam-outlet tube coordinate system as the desired posture comprises: According to the relative positional relationship between the camera (5) and the beam outlet (1), and the homography matrix of the camera coordinate system and the beam outlet coordinate system, the pixel coordinates of the geometric center of the beam outlet in the image of the optical marker (4) are determined, and according to the pixel coordinates of the geometric center in the image of the optical marker (4), the pixel coordinates of the edge of the beam outlet (1) and the edge of the beam outlet are obtained, and according to the pixel coordinates of the edge of the beam outlet (1) and the edge of the beam outlet, a second two-dimensional plane diagram including the edge of the beam outlet (1) and the edge of the beam outlet is established.

6. The method for visualizing the alignment state of the beam-emitting tube and the snoot according to claim 3 or 5, characterized in that: Get the camera intrinsic parameter matrix and gimbal angle of camera (5); Compute the homography matrix for the perspective transformation; The homography matrix for perspective transformation is calculated using the following formula: H=KRK -1 The second pixel coordinate is calculated using the following formula: Among them, H is the homography matrix of perspective transformation, R is the gimbal angle, K is the camera intrinsic parameter matrix, K -1 is the transposed matrix of the camera intrinsic parameter matrix, (u′, v′) is the second pixel coordinate, (u, v) is the first pixel coordinate, (X, Y, 1) is the normalized coordinate of the spatial point in the camera (5) coordinate system, and the normalized coordinate and the first pixel coordinate are transformed through the camera intrinsic parameter matrix.

7. The method for visualizing the alignment state of the beam-emitting tube and the snoot according to claim 6, characterized in that: The method of establishing a three-dimensional relative position diagram and a two-dimensional three-view diagram of the beam-emitting tube (1) and the snoot tube (3) according to the current positions of the beam-emitting tube (1) and the snoot tube (3) comprises: Obtaining the dimensions of the beam-emitting tube (1) and the snoot (3); A three-dimensional model is established in a display device according to the dimensions of the beam-emitting tube (1) and the snoot (3); The position and posture of the three-dimensional model is adjusted according to the current position and posture of the beam-emitting tube (1) and the snoot (3) to form a three-dimensional relative position diagram.

8. The method for visualizing the alignment state of the beam-emitting tube and the snoot according to claim 7, characterized in that: The method of establishing a three-dimensional relative position diagram and a two-dimensional three-view diagram of the beam-emitting tube (1) and the snoot tube (3) according to the current positions of the beam-emitting tube (1) and the snoot tube (3) also includes: According to the projection of the three-dimensional relative position diagram on the two-dimensional plane, a two-dimensional relative position diagram of the beam-emitting tube and the snoot is established, wherein the two-dimensional relative position diagram includes a front view two-dimensional relative position diagram, a side view two-dimensional relative position diagram, and a top view two-dimensional relative plane diagram, wherein the top view two-dimensional relative plane is a plane perpendicular to the plane where the beam channel is located; the top view two-dimensional relative position is established on a plane perpendicular to the plane where the beam channel is located.

9. The method for visualizing the alignment state of the beam-emitting tube and the snoot according to claim 8, characterized in that: The method further comprises: A first height line is drawn at a first preset position at which the front view two-dimensional relative position diagram and the side view two-dimensional relative position diagram have the same height, a second height line is drawn at a second preset position at which the front view two-dimensional relative position diagram and the side view two-dimensional relative position diagram have the same height, a first circle is drawn at a third preset position of the side view two-dimensional relative position diagram, and a third circle is drawn at a fourth preset position of the side view two-dimensional relative position diagram, wherein the first circle is larger than the third circle.

10. An electronic device, characterized in that: include: Memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for visualizing the alignment state of the beam-emitting tube and the snoot tube according to any one of claims 2 to 9 is implemented.