Collision detection method, apparatus and radiotherapy system
By acquiring and processing the contour images of the objects to be detected in the radiotherapy system using point cloud cameras, the problem of unpredictable collision probability between patients and equipment in the radiotherapy system is solved, thereby improving safety.
Patent Information
- Application Number
- CN202110984267.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-25
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2041-08-25
AI Technical Summary
Current radiotherapy systems cannot accurately predict the probability of a patient colliding with the radiotherapy equipment, resulting in a high level of safety risks.
The first contour image of the object to be detected is acquired by a point cloud camera, and the second contour image is obtained by processing based on the position offset. The collision probability between the object to be detected and the radiotherapy equipment is determined based on the image, including techniques such as segmentation processing, color setting, image fusion and overlap analysis.
It enables accurate prediction of the probability of collision between the subject and the radiotherapy equipment, reduces safety hazards, and ensures the safety of patients during treatment.
Smart Images

Figure CN115721872B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of radiotherapy, and particularly relates to a collision detection method and device and a radiotherapy system. BACKGROUND
[0002] The radiotherapy system generally comprises a processing device and a radiotherapy device, wherein the radiotherapy device comprises a treatment bed, a gantry and a treatment head.
[0003] In the prior art, before a patient is subjected to radiotherapy by using the radiotherapy device, the patient needs to be positioned on the treatment bed, and the processing device can move the treatment bed based on a treatment plan for the patient to align a target region of the patient with a focal point of the treatment head.
[0004] However, in the process of moving the treatment bed, the patient positioned on the treatment bed can collide with the radiotherapy device, and the safety risk is high. Moreover, the prior art solution cannot predict the probability of collision between the patient and the radiotherapy device. SUMMARY
[0005] The present application provides a collision detection method, device and radiotherapy system, which can solve the problem that the probability of collision between the patient and the gantry cannot be predicted in the prior art. The technical solution is as follows:
[0006] In one aspect, a collision detection method is provided, and the method comprises the following steps:
[0007] In a case where a to-be-detected object is located at a first position, a first contour image is acquired based on a point cloud camera, and the first contour image comprises the to-be-detected object and a radiotherapy device;
[0008] The to-be-detected object in the first contour image is processed based on a position offset between the first position and a second position, to obtain a second contour image, and the second contour image is a simulated image of the to-be-detected object and the radiotherapy device when the to-be-detected object is located at the second position;
[0009] Based on a position of the to-be-detected object and a position of the radiotherapy device in the second contour image, a probability of collision between the to-be-detected object and the radiotherapy device is determined.
[0010] Optionally, the processing of the to-be-detected object in the first contour image based on the position offset between the first position and the second position to obtain the second contour image comprises:
[0011] The first contour image is subjected to segmentation processing to obtain a to-be-detected image containing only the to-be-detected object and a background image containing a target collision object other than the to-be-detected object and the radiotherapy device;
[0012] based on a position offset between the first position and the second position, processing the to-be-detected image and the background image to obtain the second contour image.
[0013] Optionally, the processing the to-be-detected image and the background image based on the position offset between the first position and the second position to obtain the second contour image comprises:
[0014] based on the position offset between the first position and the second position, moving the to-be-detected image by the position offset to obtain a moved to-be-detected image;
[0015] fusing the moved to-be-detected image and the background image to obtain the second contour image.
[0016] Optionally, after the segmenting the first contour image to obtain the to-be-detected image containing only the to-be-detected object and the background image containing the target collision object of the radiotherapy device except the to-be-detected object, the method further comprises:
[0017] setting the to-be-detected object in the to-be-detected image to a color different from the target collision object in the background image.
[0018] Optionally, the target collision object of the radiotherapy device comprises a gantry and / or a radiation head arranged on the gantry.
[0019] Optionally, in the case that the target collision object of the radiotherapy device is a radiation head, based on the position of the to-be-detected object in the second contour image and the position of the radiotherapy device, determining a probability of collision between the to-be-detected object and the radiotherapy device comprises:
[0020] obtaining a treatment plan of the to-be-detected object;
[0021] based on the treatment plan and the second contour image, obtaining a third contour image of the radiation head at a preset angle;
[0022] based on the position of the to-be-detected object in the third contour image and the position of the radiation head, determining a probability of collision between the to-be-detected object and the radiation head.
[0023] Optionally, the determining the probability of collision between the to-be-detected object and the radiotherapy device based on the position of the to-be-detected object in the second contour image and the position of the radiotherapy device comprises:
[0024] based on the degree of overlap between the to-be-detected object and the radiotherapy device in the second contour image, determining the probability of collision between the to-be-detected object and the radiotherapy device.
[0025] Optionally, the determining the probability of the object colliding with the radiotherapy device based on the overlap between the object and the radiotherapy device in the second contour image comprises:
[0026] acquiring at least one collision region of interest, the collision region of interest being a region in the second contour image in which the object is likely to collide with the radiotherapy device;
[0027] determining the probability of the object colliding with the radiotherapy device based on the overlap between the object and the radiotherapy device in the at least one collision region of interest;
[0028] Alternatively, the determining the probability of the object colliding with the radiotherapy device based on the overlap between the object and the radiotherapy device in the second contour image comprises:
[0029] traversing the second contour image using a collision region of interest, the collision region of interest having a size smaller than that of the second contour image;
[0030] determining the overlap between the object and the radiotherapy device in the second contour image within the collision region of interest;
[0031] determining the probability of the object colliding with the radiotherapy device based on the overlap.
[0032] Optionally, the determining the probability of the object colliding with the radiotherapy device based on the overlap between the object and the radiotherapy device in the at least one collision region of interest comprises:
[0033] if the object and the radiotherapy device have an overlapping region in at least one of the collision regions of interest, determining the probability of the object colliding with the radiotherapy device to be a first probability;
[0034] if the object and the radiotherapy device do not have an overlapping region in any of the collision regions of interest, determining the probability of the object colliding with the radiotherapy device to be a second probability, the second probability being smaller than the first probability.
[0035] Optionally, after the determining the probability of the object colliding with the radiotherapy device to be the first probability, the method further comprises:
[0036] determining a first density of data points in the collision region of interest in the second contour image;
[0037] acquire a second density of data points of a region in the to-be-detected image corresponding to the collision region of interest;
[0038] determine, based on a ratio of the first density and the second density, a collision level of the to-be-detected object colliding with the radiotherapy device, the collision level being positively correlated with the ratio.
[0039] Optionally, the determining, based on the ratio of the first density and the second density, the collision level of the to-be-detected object colliding with the radiotherapy device comprises:
[0040] determining, based on a corresponding relationship between a ratio range and a collision level, a target ratio range in which the ratio of the first density and the second density is located, and determining a target collision level corresponding to the target ratio range as the collision level of the to-be-detected object colliding with the radiotherapy device.
[0041] In another aspect, a processing device is provided, which comprises a processor and a memory; the memory is configured to store instructions executed by the processor, and the processor is configured to implement the collision detection method according to the above aspect by executing the instructions stored in the memory.
[0042] In yet another aspect, a non-volatile computer-readable storage medium is provided, which stores instructions, and when the instructions are executed on a computer, the computer is caused to execute the collision detection method according to the above aspect.
[0043] The technical scheme provided in the present application has at least the following beneficial effects:
[0044] The present application provides a collision detection method, device and radiotherapy system. The method can acquire a first contour image and process the to-be-detected object in the first contour image to obtain a second contour image. Then, based on the position of the to-be-detected object in the second contour image and the position of the radiotherapy device, the probability of the to-be-detected object colliding with the radiotherapy device can be determined. Thus, the probability of the to-be-detected object colliding with the radiotherapy device is accurately predicted, and then whether the treatment plan needs to be adjusted can be determined based on the predicted probability, so as to effectively reduce the security risks. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0046] Figure 1is a structural schematic diagram of a radiotherapy system provided by an embodiment of the present application.
[0047] Figure 2 is a flowchart of a collision detection method provided by an embodiment of the present application.
[0048] Figure 3 is a flowchart of another collision detection method provided by an embodiment of the present application.
[0049] Figure 4 is a schematic diagram of a first contour image provided by an embodiment of the present application.
[0050] Figure 5 is a schematic diagram of a to-be-detected image provided by an embodiment of the present application.
[0051] Figure 6 is a schematic diagram of a background image provided by an embodiment of the present application.
[0052] Figure 7 is a schematic diagram of a second contour image provided by an embodiment of the present application.
[0053] Figure 8 is a flowchart of still another collision detection method provided by an embodiment of the present application.
[0054] Figure 9 is a flowchart of yet another collision detection method provided by an embodiment of the present application.
[0055] Figure 10 is a structural block diagram of a processing device provided by an embodiment of the present application.
[0056] Figure 11 is a structural block diagram of a first determination module provided by an embodiment of the present application.
[0057] Figure 12 is a structural block diagram of another processing device provided by an embodiment of the present application.
[0058] Figure 13 is a structural block diagram of still another processing device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0059] To make the purposes, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0060] Figure 1 is a structural schematic diagram of a radiotherapy system provided by an embodiment of the present application. Referring to Figure 1 , the radiotherapy system 10 can include a radiotherapy device 101, a point cloud camera 102 and a processing device 103.
[0061] Optionally, the radiotherapy device 101 and the point cloud camera 102 can be connected to the processing device 103 through a wired or wireless network. The point cloud camera 102 can be used to capture a contour image, and send the captured contour image to the processing device 103, where the contour image is a three-dimensional point cloud image formed by a plurality of contour points. Figure 1 The radiotherapy device 101 can include a gantry 1011 and a support device 1012. Of course, the radiotherapy device 101 can also include a radiation head (not shown in the figure), which can be arranged on the gantry 1011.
[0062] Optionally, the support device 1012 can be a treatment bed or a treatment chair.
[0063] Optionally, the processing device 103 can be a computer device, or a server, or a server cluster composed of a plurality of servers, or a cloud computing service center.
[0064] Figure 2 is a flowchart of a collision detection method provided by an embodiment of the present application. The method can be applied to Figure 1 the processing device 103 of the radiotherapy system shown in the figure. Referring to Figure 2 It can be seen that the method can include:
[0065] Step 201, obtaining a first contour image based on a point cloud camera when a to-be-detected object is located at a first position.
[0066] In the embodiment of the present application, when the to-be-detected object is located at the first position, the point cloud camera 102 can obtain a captured contour image. Then, the point cloud camera 102 can send the captured contour image to the processing device 103. Thus, the processing device 103 can obtain the captured contour image from the point cloud camera 102, and convert the captured contour image to obtain the first contour image.
[0067] Optionally, the to-be-detected object can be a patient or a human body model, and the first position can be a position of the to-be-detected object when the positioning is completed. The first contour image includes the to-be-detected object and the radiotherapy device 101.
[0068] Optionally, the captured contour image obtained by the point cloud camera 102 can be an image in a camera coordinate system of the point cloud camera 102. The first contour image can be an image in a device coordinate system of the radiotherapy device 101. That is, the processing device 103 can perform coordinate conversion processing on the captured contour image obtained from the point cloud camera 102 to obtain the first contour image.
[0069] In step 202, the processing device processes the to-be-detected object in the first contour image based on the position offset between the first position and the second position, to obtain a second contour image.
[0070] In the embodiments of the present application, before the to-be-detected object is subjected to radiotherapy, the to-be-detected object can be moved to the second position after the positioning is completed (i.e., the to-be-detected object is located at the first position), so that the radiotherapy device 101 performs radiotherapy on the to-be-detected object. The second position can refer to the position of the to-be-detected object when the radiotherapy device 101 performs radiotherapy on the to-be-detected object.
[0071] The second contour image is a simulation image of the to-be-detected object and the radiotherapy device when the to-be-detected object is located at the second position. The simulation image is used to indicate that the second contour image is a simulated image, and is not an image obtained by processing the image acquired by the point cloud camera 102 by the processing device 103.
[0072] In step 203, the processing device determines the probability of collision between the to-be-detected object and the radiotherapy device based on the position of the to-be-detected object and the position of the radiotherapy device in the second contour image.
[0073] In the embodiments of the present application, after the processing device 103 obtains the second contour image, the processing device 103 can determine the probability of collision between the to-be-detected object and the radiotherapy device 101 based on the position of the to-be-detected object and the position of the radiotherapy device 101 in the second contour image.
[0074] Optionally, if the distance between the position of the to-be-detected object and the position of the radiotherapy device in the second contour image is less than or equal to a distance threshold, the probability of collision between the to-be-detected object and the radiotherapy device 101 is relatively high. If the distance between the position of the to-be-detected object and the position of the radiotherapy device in the second contour image is greater than the distance threshold, the probability of collision between the to-be-detected object and the radiotherapy device 101 is relatively low. The distance threshold can be a threshold pre-stored in the processing device 103, or can be a threshold input by a user and saved in the processing device 103.
[0075] Since the method provided in the embodiments of the present application does not need to move the to-be-detected object, the probability of collision between the to-be-detected object and the radiotherapy device can be determined, so that when the to-be-detected object is a patient, the patient and the radiotherapy device will not actually collide, and the patient will not be harmed. Moreover, when the to-be-detected object is a patient, the contour of the patient can be accurately reflected, and the accuracy of determining the probability of collision between the patient and the radiotherapy device is high.
[0076] To sum up, the embodiment of the present application provides a collision detection method, which can obtain a first contour image and process a to-be-detected object in the first contour image to obtain a second contour image. Then, the probability of collision between the to-be-detected object and the radiotherapy device can be determined based on the position of the to-be-detected object in the second contour image and the position of the radiotherapy device. Thus, the probability of collision between the to-be-detected object and the radiotherapy device is accurately predicted, and then whether the treatment plan needs to be adjusted can be determined based on the predicted probability, so as to effectively reduce the security risks.
[0077] Figure 3 is a flowchart of another collision detection method provided by the embodiment of the present application. The method can be applied to the processing device 103 of the radiotherapy system shown in Figure 1 . Referring to Figure 3 , the method can include the following steps.
[0078] Step 301: obtaining a first contour image based on a point cloud camera when a to-be-detected object is located at a first position.
[0079] In the embodiment of the present application, when the to-be-detected object is located at the first position, the point cloud camera 102 can obtain a collection contour image. Then, the point cloud camera 102 can send the collected collection contour image to the processing device 103. Thus, the processing device 103 can obtain the collection contour image from the point cloud camera 102 and convert the collection contour image to obtain the first contour image.
[0080] Optionally, the to-be-detected object can be a patient or a human body model, or a support plate of a support device carrying the patient, or the patient and the support plate of the support device of the patient, and the first position can be a position of the to-be-detected object when the positioning is completed. Referring to Figure 4 , the first contour image includes the to-be-detected object and the radiotherapy device 101, and the to-be-detected object includes the patient and the support plate in the support device of the patient.
[0081] In the embodiment of the present application, the process of positioning the to-be-detected object can include: the processing device 103 calibrates the camera coordinate system of the point cloud camera 102 and the device coordinate system of the radiotherapy device 101 to obtain a conversion relationship between the camera coordinate system and the device coordinate system; a positioning computed tomography (CT) scans the to-be-detected object, and sends the scanning result to the treatment planning device; the treatment planning device formulates a treatment plan based on the scanning result, and sends the treatment plan to the processing device 103; the processing device 103 can generate an RTSTRUCT outer contour data template for the to-be-detected object based on the treatment plan; the point cloud camera 102 collects images of the to-be-detected object in real time; the processing device 103 converts the images collected by the point cloud camera 102 in real time into images in the device coordinate system based on the conversion relationship between the camera coordinate system and the device coordinate system (the images in the device coordinate system include the outer contour data of the to-be-detected object in the device coordinate system); and a doctor positions the patient based on the outer contour data template of the to-be-detected object and the images in the device coordinate system converted from the images collected by the point cloud camera 102 in real time.
[0082] Optionally, the acquisition contour image obtained by the point cloud camera 102 can be an image in the camera coordinate system of the point cloud camera 102. The first contour image can be an image in the device coordinate system of the radiotherapy device 101. In the process of positioning the to-be-detected object, the processing device 103 can determine the conversion relationship between the camera coordinate system and the device coordinate system. Therefore, after the processing device 103 obtains the acquisition contour image from the point cloud camera 102, the processing device 103 can convert the acquisition contour image based on the conversion relationship to obtain the first contour image.
[0083] Step 302, performing segmentation processing on the first contour image to obtain a to-be-detected image containing only the to-be-detected object and a background image containing a target collision object other than the to-be-detected object and containing the radiotherapy device.
[0084] In the embodiment of the present application, the processing device 103 can store a segmentation algorithm. The processing device 103 performs segmentation processing on the first contour image by using the segmentation algorithm stored in advance to obtain a to-be-detected image containing only the to-be-detected object and a background image containing a target collision object other than the to-be-detected object and containing the radiotherapy device. The target collision object can be a component in the radiotherapy device that can collide with the to-be-detected object, such as a gantry and / or a radiation head.
[0085] The to-be-detected object is located on the support device 1012, and the position of the to-be-detected object is fixed relative to the position of the support device 1012. The support device 1012 can drive the to-be-detected object to move towards the target collision object or away from the target collision object. Thus, the processing device 103 can segment the image part of the to-be-detected object in the first contour image, which is fixed relative to the support device 1012, into a first to-be-detected image, and segment the image part containing the target collision object relative to the support device 1012 into a background image.
[0086] In step 303, the to-be-detected object in the to-be-detected image is set to a color different from the target collision object in the background image.
[0087] In the embodiment of the present application, after the processing device 103 segments the first contour image to obtain the to-be-detected image and the background image, the to-be-detected object in the to-be-detected image can be set to a color different from the target collision object in the background image.
[0088] Optionally, the to-be-detected object in the to-be-detected image can be set to a first color, and the target collision object in the background image can be set to a second color. The second color can be different from the first color, so as to facilitate the processing device 103 to distinguish the background image and the to-be-detected image.
[0089] Since the first contour image is processed by the processing device 103 based on the acquisition contour image collected by the point cloud camera 102, when the acquisition contour image collected by the point cloud camera includes a plurality of data points, the first contour image processed by the processing device 103 based on the acquisition contour image can also include a plurality of data points. Optionally, setting the to-be-detected object in the to-be-detected image to a first color can mean setting the colors of a plurality of data points of the to-be-detected object in the to-be-detected image to the first color. Setting the target collision object in the background image to a second color can mean setting the colors of a plurality of data points of the target collision object in the background image to the second color.
[0090] Reference Figure 5 The to-be-detected image includes the to-be-detected object, and the to-be-detected object is located on the support plate. In order to facilitate understanding, Figure 5 The to-be-detected image is not shown by a plurality of data points in the first color, but is shown by lines. Figure 6 The background image is a background image of the target collision object except the to-be-detected object and containing the radiotherapy device. Here, the target collision object can be the gantry 1011. It should be noted that the support seat of the support device and the radiotherapy device gantry that are shielded are subjected to interpolation processing in the background image, and the missing part of the image is supplemented.
[0091] In step 304, the to-be-detected image is moved by the position offset between the first position and the second position to obtain a moved to-be-detected image.
[0092] In the embodiments of the present application, the treatment plan can be stored in the processing device 103, and the treatment plan can include the position offset between the first position and the second position of the to-be-detected object. For example, the treatment plan can include the position offset in three directions of the first position and the second position, respectively denoted as X T , Y T and Z T .
[0093] Optionally, the processing device 103 can move the to-be-detected image by the position offset in the treatment plan to obtain a moved to-be-detected image. The moved to-be-detected image is the simulation image of the to-be-detected object when the to-be-detected object is located at the second position.
[0094] Since the to-be-detected image includes a plurality of data points of the first color, the coordinates of each data point can be represented by coordinate values in three directions. For example, it is assumed that the coordinates of a data point are represented as [X S , Y S , Z S , 1] T . In which, X S , Y S and Z S are the coordinate values in three directions of the data point. The upper index T is used to represent the transposed matrix.
[0095] Optionally, the moving matrix when the to-be-detected image is moved by the position offset can be:
[0096] Therefore, the coordinates of the data points of the moved to-be-detected image can satisfy:
[0097]
[0098] That is, the coordinate values in three directions X O , Y O and Z O of the data points of the moved to-be-detected image satisfy: X O =X T +X S , Y O =Y T +Y S , and Z O =Z T +Z S .
[0099] In the embodiment of the present application, for the coordinates of each data point in the moved to-be-detected image, the above-mentioned moving matrix and the coordinates of the data points in the to-be-detected image can be used to calculate. Thus, the processing device 103 can obtain the moved to-be-detected image.
[0100] Step 305, fusing the moved to-be-detected image and the background image to obtain a second contour image.
[0101] In the embodiment of the present application, after the processing device 103 obtains the moved to-be-detected image based on the above-mentioned step 304, the processing device 103 can fuse the moved to-be-detected image and the background image to obtain a second contour image. Referring to Figure 7 , the second contour image includes the to-be-detected object and the target collision object, and in combination with Figure 4 and Figure 7 , the to-be-detected object in the second contour image is closer to the target collision object than the to-be-detected object in the first contour image.
[0102] Optionally, fusing the moved to-be-detected image and the background image can mean superimposing the moved to-be-detected image and the background image. And since the moved to-be-detected image and the background image both include a plurality of data points, the second contour image can include a plurality of first color data points of the moved to-be-detected image and a plurality of second color data points of the background image. In order to facilitate understanding, Figure 7 the fused image is not shown by using the plurality of first color data points and the plurality of second color data points, but is shown by using lines.
[0103] The coordinates of each data point in the second contour image are all device coordinates. If the coordinates of a first data point of the to-be-detected image in the second contour image in the device coordinate system are the same as the coordinates of a second data point of the background image in the device coordinate system, the first data point and the second data point in the second contour image overlap. If the coordinates of a first data point of the to-be-detected image in the second contour image in the device coordinate system are different from the coordinates of a second data point of the background image in the device coordinate system, the first data point and the second data point in the second contour image do not overlap.
[0104] Step 306, obtaining a treatment plan of the to-be-detected object.
[0105] In the embodiment of the present application, the processing device 103 can store a treatment plan of the to-be-detected object. The processing device 103 can obtain the stored treatment plan. The treatment plan can include the rotation direction, the rotation angle and the rotation speed of the radiation head in the treatment process.
[0106] Optionally, because the radiation head can rotate during treatment, the object being tested may collide with the radiation head. The target collision object may include the gantry and / or the radiation head mounted on the gantry.
[0107] Step 307: Based on the treatment plan and the second contour image, obtain a third contour image of the radiating head at a preset angle.
[0108] In this embodiment of the application, if the target collision object is a radiator, the processing device 103 needs to determine the probability of the object to be detected colliding with the radiator.
[0109] Optionally, after obtaining the treatment plan based on step 306 and the second contour image based on step 305, the processing device 103 can obtain a third contour image of the radiation head at a preset angle based on the treatment plan and the second contour image. The preset angle can be the maximum rotation angle of the radiation head in the treatment plan.
[0110] For example, the processing device 103 can rotate the image portion of the radiator head in the second contour image based on a preset angle in the treatment plan to obtain an image after the radiator head has been rotated (i.e., a third contour image). The third contour image is a simulated image of the object to be detected and the radiator head when the radiator head is at the preset angle.
[0111] Step 308: Based on the position of the object to be detected and the position of the radiator in the third contour image, determine the probability of the object to be detected colliding with the radiator.
[0112] In this embodiment of the application, after obtaining the third contour image, the processing device 103 can determine the probability of the object to be detected colliding with the radiator based on the position of the object to be detected and the position of the radiator in the third contour image.
[0113] Optionally, if the distance between the position of the object to be detected and the position of the radiator in the third contour image is less than or equal to a distance threshold, the probability of a collision between the object to be detected and the radiator is relatively high. If the distance between the position of the object to be detected and the position of the radiator in the third contour image is greater than the distance threshold, the probability of a collision between the object to be detected and the radiator is relatively low. This distance threshold can be a threshold pre-stored in the processing device 103, or it can be a threshold input by the user and stored in the processing device 103.
[0114] For example, the processing device 103 can determine the probability of a collision between the object to be detected and the radiator based on the degree of overlap between the object to be detected and the radiator in the third contour image.
[0115] The probability of the to-be-detected object colliding with the radiation head is positively correlated with the degree of overlap between the to-be-detected object and the radiation head in the third contour image. That is, the higher the degree of overlap between the to-be-detected object and the radiation head in the third contour image, the greater the probability of the to-be-detected object colliding with the radiation head; the lower the degree of overlap between the to-be-detected object and the radiation head in the third contour image, the smaller the probability of the to-be-detected object colliding with the radiation head.
[0116] Since the method provided in the embodiments of the present application can determine the probability of the to-be-detected object colliding with the radiation head without moving the to-be-detected object and rotating the radiation head, when the to-be-detected object is a patient, the patient will not actually collide with the radiation head, and the patient will not be harmed. Moreover, in the case where the to-be-detected object is a patient, the contour of the patient can be more accurately reflected, and the accuracy of determining the probability of the patient colliding with the radiation head is higher.
[0117] To sum up, the embodiments of the present application provide a collision detection method, which can obtain a first contour image, and process the to-be-detected object in the first contour image to obtain a second contour image. Then, the second contour image can be processed to obtain a third contour image. Then, based on the position of the to-be-detected object and the position of the radiation head in the third contour image, the probability of the to-be-detected object colliding with the radiation head is determined. Thus, the accurate prediction of the probability of the to-be-detected object colliding with the radiation head is realized, and then whether the treatment plan needs to be adjusted can be determined based on the predicted probability, so as to effectively reduce the safety hazard.
[0118] Figure 8 is a flowchart of another collision detection method provided by the embodiments of the present application. The method can be applied in the processing device 103 of the radiotherapy system shown in Figure 1 . Referring to Figure 8 , the method can include the following steps.
[0119] Step 401: In the case where the to-be-detected object is located at a first position, a first contour image is obtained based on a point cloud camera.
[0120] In the embodiments of the present application, the specific process of this step 401 can refer to the specific description of the above step 301, which will not be repeated here.
[0121] Step 402: The first contour image is segmented to obtain a to-be-detected image containing only the to-be-detected object and a background image containing a target collision object other than the to-be-detected object and the radiotherapy device.
[0122] In the embodiments of the present application, the specific process of this step 402 can refer to the specific description of the above step 302, which will not be repeated here.
[0123] In step 403, the object to be detected in the image to be detected is set to a color different from the target collision object in the background image.
[0124] In the embodiments of the present application, the specific process of step 403 can refer to the specific description of step 303 described above, and the embodiments of the present application will not be described here.
[0125] In step 404, the image to be detected is moved by the position offset between the first position and the second position, to obtain a moved image to be detected.
[0126] In the embodiments of the present application, the specific process of step 404 can refer to the specific description of step 304 described above, and the embodiments of the present application will not be described here.
[0127] In step 405, the moved image to be detected and the background image are fused to obtain a second contour image.
[0128] In the embodiments of the present application, the specific process of step 405 can refer to the specific description of step 305 described above, and the embodiments of the present application will not be described here.
[0129] In step 406, at least one collision region of interest is obtained.
[0130] In the embodiments of the present application, after the second contour image is obtained in step 405 described above, the user can determine at least one collision region of interest based on the second contour image. The collision region of interest is a region in the second contour image where the object to be detected is prone to collide with the target collision object of the radiotherapy device.
[0131] Optionally, the collision region of interest can be a region on the side of the object to be detected in the second contour image close to the target collision object.
[0132] In step 407, it is determined whether the object to be detected and the target collision object in the collision region of interest in the second contour image have an overlapping region.
[0133] In the embodiments of the present application, the probability of collision between the object to be detected and the target collision object is positively correlated with the degree of overlap between the object to be detected and the target collision object in the second contour image. That is, the higher the degree of overlap between the object to be detected and the target collision object in the second contour image, the greater the probability of collision between the object to be detected and the target collision object; the lower the degree of overlap between the object to be detected and the target collision object in the second contour image, the smaller the probability of collision between the object to be detected and the target collision object.
[0134] After the at least one collision region of interest is selected, the processing device 103 can determine whether the object to be detected and the target collision object in the collision region of interest have an overlapping region.
[0135] Optionally, since the color of the data points included in the to-be-detected image is the first color and the color of the data points included in the background image is the second color, after the interested collision regions are acquired, the processing device 103 can determine whether the to-be-detected object in the to-be-detected image and the target collision object in the background image have an overlapping region by determining whether the data points of the first color and the data points of the second color coexist in the interested collision region.
[0136] For example, if the processing device 103 determines that the data points of the first color and the data points of the second color coexist in a certain interested collision region, the processing device can determine that the to-be-detected object in the to-be-detected image and the target collision object in the background image have an overlapping region; if the processing device 103 determines that only the data points of the first color or only the data points of the second color exist in a certain interested collision region, the processing device can determine that the to-be-detected object in the to-be-detected image and the target collision object in the background image do not have an overlapping region.
[0137] In the embodiment of the present application, if the processing device 103 detects that the to-be-detected object in the to-be-detected image and the target collision object in the background image have an overlapping region in at least one interested collision region, the processing device 103 can perform the following step 408, and can continue to perform steps 410 to 412 after performing the following step 408.
[0138] If the processing device 103 detects that the to-be-detected object in the to-be-detected image and the target collision object in the background image do not have an overlapping region in any interested collision region, the processing device 103 can perform the following step 409, and does not need to perform steps 410 to 412, that is, the operation ends after step 409 is performed.
[0139] Step 408: determining that the probability of collision between the to-be-detected object and the target collision object is a first probability.
[0140] In the embodiment of the present application, if the processing device 103 detects that the to-be-detected object in the to-be-detected image and the target collision object in the background image have an overlapping region in at least one interested collision region, the processing device 103 can determine that the probability of collision between the to-be-detected object and the target collision object is a first probability.
[0141] Optionally, the first probability ranges from 0.8 to 1. That is, if the to-be-detected object and the target collision object have an overlapping region in a certain interested collision region, the probability of collision between the to-be-detected object and the target collision object is relatively high.
[0142] It should be noted that after determining that the probability of the to-be-detected object colliding with the target collision object is the first probability, the processing device 103 can control the first probability to be displayed on the user side to prompt the user (e.g., a doctor).
[0143] Step 409: Determine that the probability of the to-be-detected object colliding with the target collision object is a second probability.
[0144] In the embodiment of the present application, if the processing device 103 detects that the to-be-detected object and the target collision object do not have an overlapping region in any of the collision regions of interest, the processing device 103 can determine that the probability of the to-be-detected object colliding with the target collision object is a second probability.
[0145] Optionally, the second probability is less than the first probability. The second probability ranges from 0 to 0.2. That is, if the to-be-detected object and the target collision object do not have an overlapping region in any of the collision regions of interest, the processing device 103 can determine that the probability of the to-be-detected object colliding with the target collision object is relatively low.
[0146] It should be noted that after determining that the probability of the to-be-detected object colliding with the target collision object is the second probability, the processing device 103 can control the second probability to be displayed on the user side to prompt the user (e.g., a doctor).
[0147] In this case, since the probability of the to-be-detected object colliding with the target collision object is relatively low, the user can not need to adjust the treatment plan. That is, the to-be-detected object can be treated according to the original treatment plan.
[0148] Step 410: Determine a first density of data points in the collision region of interest in the second contour image.
[0149] In the embodiment of the present application, after determining that the probability of the to-be-detected object colliding with the target collision object is the first probability, the processing device 103 can determine a first density of data points in the collision region of interest in the second contour image. The to-be-detected object and the target collision object in the collision region of interest have an overlapping region.
[0150] Optionally, the first density can be a ratio of the number of data points in the collision region of interest to the size of the collision region of interest.
[0151] Step 411: Obtain a second density of data points in a region corresponding to the collision region of interest in the to-be-detected image.
[0152] In the embodiments of the present application, the processing device 103 can acquire a second density of data points of a region corresponding to the collision region of interest in the to-be-detected image. The size of the region corresponding to the collision region of interest in the to-be-detected image can be the same as the size of the collision region of interest.
[0153] Optionally, the second density can be a ratio of the number of data points of the to-be-detected image in the region corresponding to the collision region of interest to the size of the collision region of interest.
[0154] In step 412, a collision level of the to-be-detected object colliding with the target collision object is determined based on the ratio of the first density and the second density.
[0155] In the embodiments of the present application, after the processing device 103 acquires the first density and the second density, the processing device 103 can determine a ratio of the first density and the second density, and determine a collision level of the to-be-detected object colliding with the target collision object based on the ratio of the first density and the second density.
[0156] The ratio of the first density and the second density can be equal to the first density divided by the second density. In addition, the ratio of the first density and the second density can be greater than or equal to 1.
[0157] Optionally, the collision level is positively correlated with the size of the ratio. That is, the greater the ratio of the first density and the second density, the higher the collision level; the smaller the ratio of the first density and the second density, the smaller the collision level.
[0158] In the embodiments of the present application, the processing device 103 can determine a target ratio range in which the ratio of the first density and the second density is located based on a corresponding relationship between a ratio range and a collision level, and determine a target collision level corresponding to the target ratio range as the collision level of the to-be-detected object colliding with the target collision object.
[0159] Optionally, the corresponding relationship between the ratio range and the collision level can be pre-stored in the processing device 103. Alternatively, the corresponding relationship between the ratio range and the collision level can be set by a user, and the embodiments of the present application do not limit this.
[0160] The correspondence between the ratio range and the collision level is shown in Table 1. Referring to Table 1, if the processing device 103 determines that the ratio of the first density and the second density is greater than the first threshold value and less than or equal to the second threshold value, the processing device 103 determines that the target ratio range of the ratio is: the first threshold value < M ≤ the second threshold value. Further, the processing device 103 can determine the first collision level corresponding to the target ratio range as the collision level of the collision between the to-be-detected object and the target collision object. If the processing device 103 determines that the ratio of the first density and the second density is greater than the second threshold value and less than or equal to the third threshold value, the processing device 103 determines that the target ratio range of the ratio is: the second threshold value < M ≤ the third threshold value. Further, the processing device 103 can determine the second collision level corresponding to the target ratio range as the collision level of the collision between the to-be-detected object and the target collision object. If the processing device 103 determines that the ratio of the first density and the second density is greater than the third threshold value, the processing device 103 determines that the target ratio range of the ratio is: M > the third threshold value. Further, the processing device 103 can determine the third collision level corresponding to the target ratio range as the collision level of the collision between the to-be-detected object and the target collision object.
[0161] Table 1
[0162] Ratio range Impact level the first threshold < M < the second threshold First impact level the second threshold < M < the third threshold Second impact level M > third threshold value Third impact level
[0163] Optionally, in Table 1, the first threshold value is less than the second threshold value, and the second threshold value is less than the third threshold value. For example, the first threshold value is 1, the second threshold value is 1.5, and the third threshold value is 2. That is, when the first density of the data points in the second contour image is greater than the second density of the data points in the to-be-detected image and less than or equal to 1.5 times the second density (i.e., the first density is greater than the second density and less than or equal to 1.5 times the second density), the collision level is the first collision level. When the first density of the data points in the second contour image is greater than 1.5 times the second density of the data points in the to-be-detected image and less than or equal to 2 times the second density (i.e., the first density is greater than 1.5 times the second density and less than or equal to 2 times the second density), the collision level is the second collision level. When the first density of the data points in the second contour image is greater than 2 times the second density of the data points in the to-be-detected image (i.e., the first density is greater than 2 times the second density), the collision level is the third collision level.
[0164] Optionally, the first collision level in Table 1 can be a slight collision, the second collision level can be a moderate collision, and the third collision level can be a serious collision.
[0165] In the embodiment of the present application, in step 411, the processing device 103 can obtain the third density of data points in the region in the background image corresponding to the collision region of interest. Accordingly, step 412 can be: determining the collision level of the to-be-detected object colliding with the target collision object based on the ratio of the first density and the third density.
[0166] In this case, the size of the region in the background image corresponding to the collision region of interest can be the same as the size of the collision region of interest. The third density can be the ratio of the number of data points of the background image in the region corresponding to the collision region of interest and the size of the collision region of interest.
[0167] In addition, the specific process of determining the collision level of the to-be-detected object colliding with the target collision object based on the ratio of the first density and the third density can refer to the description of determining the collision level of the to-be-detected object colliding with the target collision object based on the ratio of the first density and the second density, and the embodiment of the present application will not be repeated here.
[0168] It should be noted that after the processing device 103 determines the collision level of the to-be-detected object colliding with the target collision object, the processing device 103 can display the collision level on the user terminal to prompt the user (e.g., a doctor). Further, the user can determine whether the treatment plan needs to be adjusted based on the collision level displayed on the user terminal.
[0169] For example, if the processing device 103 determines that the collision level of the to-be-detected object colliding with the target collision object is the first collision level, the user can determine that the treatment plan does not need to be adjusted; if the processing device 103 determines that the collision level of the to-be-detected object colliding with the target collision object is the second collision level or the third collision level, the user can determine that the treatment plan needs to be adjusted.
[0170] It should be further noted that the order of the steps of the collision detection method provided in the embodiment of the present application can be appropriately adjusted, and the steps can be increased or decreased accordingly according to the situation. For example, steps 410 to 412 can be deleted according to the situation. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes, which should be covered within the protection scope of the present application, and therefore will not be repeated here.
[0171] To sum up, the embodiment of the present application provides a collision detection method, which can obtain a first contour image, and processes a to-be-detected object in the first contour image to obtain a second contour image. Then, the probability of collision between the to-be-detected object and the radiotherapy device can be determined based on the position of the to-be-detected object in the second contour image and the position of the radiotherapy device. Thus, the accurate prediction of the probability of collision between the to-be-detected object and the radiotherapy device is realized, and then whether the treatment plan needs to be adjusted can be determined based on the predicted probability, so as to effectively reduce the security risks.
[0172] Figure 9 is a flowchart of another collision detection method provided by the embodiment of the present application. The method can be applied to the processing device 103 of the radiotherapy system shown in Figure 1 . Referring to Figure 9 , the method can include the following steps.
[0173] Step 501: obtaining a first contour image based on a point cloud camera when the to-be-detected object is located at a first position.
[0174] In the embodiment of the present application, the specific process of the step 501 can refer to the specific description of the step 301 described above, and the embodiment of the present application will not be repeated here.
[0175] Step 502: performing segmentation processing on the first contour image to obtain a to-be-detected image containing only the to-be-detected object and a background image containing a target collision object except the to-be-detected object and containing the radiotherapy device.
[0176] In the embodiment of the present application, the specific process of the step 502 can refer to the specific description of the step 302 described above, and the embodiment of the present application will not be repeated here.
[0177] Step 503: setting the to-be-detected object in the to-be-detected image to a color different from the target collision object in the background image.
[0178] In the embodiment of the present application, the specific process of the step 503 can refer to the specific description of the step 303 described above, and the embodiment of the present application will not be repeated here.
[0179] Step 504: moving the to-be-detected image by a position offset between the first position and a second position to obtain a moved to-be-detected image.
[0180] In the embodiment of the present application, the specific process of the step 504 can refer to the specific description of the step 304 described above, and the embodiment of the present application will not be repeated here.
[0181] Step 505: fusing the moved to-be-detected image and the background image to obtain a second contour image.
[0182] In the embodiments of the present application, the specific process of the step 505 can refer to the specific description of the step 305, which will not be repeated here.
[0183] The step 506 traverses the second contour image by using the collision region of interest.
[0184] In the embodiments of the present application, after obtaining the second contour image, the processing device 103 can traverse the second contour image by using the collision region of interest. The size of the collision region of interest can be smaller than the size of the second contour image. Optionally, traversing the second contour image can mean detecting the data points in the second contour image of the collision region of interest in sequence along a certain set direction.
[0185] Since the second contour image includes a plurality of data points, and the plurality of data points are arranged in a three-dimensional manner (i.e., the fusion image is a three-dimensional image), the collision region of interest can be a cube. For example, the collision region of interest can be a 5cm*5cm*5cm cube.
[0186] The step 507 determines whether the to-be-detected object and the target collision object in the second contour image in the collision region of interest have an overlapping region when the collision region of interest is located at each detection position.
[0187] In the embodiments of the present application, the probability of collision between the to-be-detected object and the target collision object is positively correlated with the overlapping degree of the to-be-detected object and the target collision object in the second contour image. That is, the higher the overlapping degree of the to-be-detected object and the target collision object in the second contour image, the greater the probability of collision between the to-be-detected object and the target collision object; the lower the overlapping degree of the to-be-detected object and the target collision object in the second contour image, the smaller the probability of collision between the to-be-detected object and the target collision object.
[0188] In the process of traversing the second contour image by using the collision region of interest, the collision region of interest can be located at different detection positions. The processing device 103 can determine whether the to-be-detected object and the target collision object in the collision region of interest at each detection position have an overlapping region when the collision region of interest is located at each detection position.
[0189] Optionally, since the color of the data points included in the to-be-detected image is the first color, and the color of the data points included in the background image is the second color, when the collision region of interest is located at a certain detection position, the processing device 103 can determine whether the to-be-detected object in the to-be-detected image and the target collision object in the background image have an overlapping region by determining whether the data points of the first color and the data points of the second color exist in the collision region of interest at the detection position.
[0190] For example, if the processing device 103 determines that data points of the first color and data points of the second color exist in the collision region of interest at a detection position, the processing device can determine that the to-be-detected object in the to-be-detected image and the target collision object in the background image have an overlapping region; if the processing device 103 determines that only data points of the first color or only data points of the second color exist in the collision region of interest at a detection position, the processing device can determine that the to-be-detected object in the to-be-detected image and the target collision object in the background image do not have an overlapping region.
[0191] In an embodiment of the present application, if the processing device 103 detects that the collision region of interest at at least one detection position has an overlapping region between the to-be-detected object and the target collision object, the processing device 103 can perform the following step 508, and after performing the following step 508, the processing device 103 can continue to perform steps 510 to 512.
[0192] If the processing device 103 detects that the collision region of interest at any detection position does not have an overlapping region between the to-be-detected object and the target collision object, the processing device 103 can perform the following step 509, and does not need to perform steps 510 to 512, that is, the operation ends after step 509 is performed.
[0193] Step 508: determining that the probability of collision between the to-be-detected object and the target collision object is a first probability.
[0194] In an embodiment of the present application, the specific process of the step 508 can refer to the specific description of the step 408 described above, and the embodiment of the present application will not be repeated here.
[0195] Step 509: determining that the probability of collision between the to-be-detected object and the target collision object is a second probability.
[0196] In an embodiment of the present application, the specific process of the step 509 can refer to the specific description of the step 409 described above, and the embodiment of the present application will not be repeated here.
[0197] Step 510: determining a first density of data points in the collision region of interest in the second contour image.
[0198] In an embodiment of the present application, the specific process of the step 510 can refer to the specific description of the step 410 described above, and the embodiment of the present application will not be repeated here.
[0199] Step 511: obtaining a second density of data points of a region corresponding to the collision region of interest in the to-be-detected image.
[0200] In the embodiments of the present application, the specific process of the step 511 can refer to the specific description of the step 411 described above, and the embodiments of the present application will not be repeated here.
[0201] The step 512 determines a collision level of the collision between the object to be detected and the target collision object based on the ratio of the first density and the second density.
[0202] In the embodiments of the present application, the specific process of the step 512 can refer to the specific description of the step 412 described above, and the embodiments of the present application will not be repeated here.
[0203] It should be noted that the order of the steps of the collision detection method provided by the embodiments of the present application can be adjusted appropriately, and the steps can also be increased or decreased accordingly according to the situation. For example, the steps 510 to 512 can be deleted according to the situation. Any person skilled in the art within the technical range disclosed in the present application can easily think of changes, which should be covered within the protection scope of the present application, and therefore will not be repeated here.
[0204] In summary, the embodiments of the present application provide a collision detection method, which can obtain a first contour image and process the object to be detected in the first contour image to obtain a second contour image. Then, the probability of the collision between the object to be detected and the radiotherapy device can be determined based on the position of the object to be detected in the second contour image and the position of the radiotherapy device. Thus, the accurate prediction of the probability of the collision between the object to be detected and the radiotherapy device is realized, and then whether the treatment plan needs to be adjusted can be determined based on the predicted probability, so as to effectively reduce the security risks.
[0205] Figure 10 is a structural block diagram of a processing device provided by the embodiments of the present application. Referring to Figure 10 It can be seen that the processing device 103 can include:
[0206] The acquisition module 1031a is configured to acquire a first contour image based on the point cloud camera when the object to be detected is located at a first position.
[0207] The first contour image includes the object to be detected and the radiotherapy device.
[0208] The first determination module 1032a is configured to process the object to be detected in the first contour image to obtain a second contour image based on the position offset between the first position and a second position.
[0209] The second contour image is a simulation image of the object to be detected and the radiotherapy device when the object to be detected is located at the second position.
[0210] The second determining module 1033a is used to determine the probability of a collision between the object to be detected and the radiotherapy equipment based on the position of the object to be detected and the position of the radiotherapy equipment in the second contour image.
[0211] Optional, see reference Figure 11 The first determining module 1032a may include:
[0212] The segmentation submodule 1032a1 is used to segment the first contour image to obtain a detection image containing only the object to be detected and a background image containing the target collision object other than the object to be detected and the radiotherapy equipment.
[0213] The determination submodule 1032a2 is used to process the image to be detected and the background image based on the position offset between the first position and the second position to obtain the second contour image.
[0214] Optionally, the determining submodule 1032a2 is used to move the image to be detected by a position offset based on the position offset between the first position and the second position to obtain the moved image to be detected; and to fuse the moved image to be detected and the background image to obtain the second contour image.
[0215] Optionally, the first determining module 1032a may further include:
[0216] The submodule 1032a3 is configured to set the color of the object to be detected in the image to be different from the color of the target collision object in the background image.
[0217] Optionally, the target collision object of the radiotherapy equipment includes: the gantry and / or the radiation head mounted on the gantry.
[0218] Optionally, when the target collision object of the radiotherapy device is the radiation head, the second determining module 1033a is used to: obtain the treatment plan of the object to be detected; obtain a third contour image of the radiation head at a preset angle based on the treatment plan and the second contour image; and determine the probability of the object to be detected colliding with the radiation head based on the position of the object to be detected and the position of the radiation head in the third contour image.
[0219] Optionally, the second determining module 1033a is used to: determine the probability of a collision between the object to be detected and the radiotherapy equipment based on the degree of overlap between the object to be detected and the radiotherapy equipment in the second contour image.
[0220] Optionally, the second determining module 1033a is used to: acquire at least one collision region of interest, wherein the collision region of interest is a region in the second contour image where the object to be detected is likely to collide with the radiotherapy device; and determine the probability of the object to be detected colliding with the radiotherapy device based on the overlap between the object to be detected and the radiotherapy device in the at least one collision region of interest.
[0221] Alternatively, the second determining module 1033a is configured to traverse the second contour image by using a collision region of interest, the size of the collision region of interest being smaller than the size of the second contour image; determine the overlap degree between the to-be-detected object and the radiotherapy device in the second contour image in the collision region of interest; and determine the collision probability of the to-be-detected object and the radiotherapy device based on the overlap degree.
[0222] Optionally, the second determining module 1033a is configured to: if the to-be-detected object and the radiotherapy device have an overlapping region in at least one collision region of interest, determine the collision probability of the to-be-detected object and the radiotherapy device as a first probability; and if the to-be-detected object and the radiotherapy device do not have an overlapping region in any collision region of interest, determine the collision probability of the to-be-detected object and the radiotherapy device as a second probability, the second probability being smaller than the first probability.
[0223] Optionally, the first probability ranges from 0.8 to 1, and the second probability ranges from 0 to 0.2.
[0224] Optionally, with reference to Figure 12 The processing device can further include a third determining module 1034a and a fourth determining module 1035a.
[0225] The third determining module 1034a is configured to determine the first density of the data points in the collision region of interest in the second contour image.
[0226] The acquisition module 1031a is further configured to acquire the second density of the data points in the region corresponding to the collision region of interest in the to-be-detected image.
[0227] The fourth determining module 1035a is configured to determine the collision level of the to-be-detected object and the radiotherapy device based on the ratio of the first density to the second density, the collision level being positively correlated with the ratio.
[0228] Optionally, the fourth determining module 1035a is configured to: determine a target ratio range of the ratio of the first density to the second density based on a corresponding relationship between ratio ranges and collision levels, and determine a target collision level corresponding to the target ratio range as the collision level of the to-be-detected object and the radiotherapy device.
[0229] In summary, the embodiment of the present application provides a processing device, which can acquire a first contour image and process a to-be-detected object in the first contour image to obtain a second contour image. Then, the probability of collision between the to-be-detected object and the radiotherapy device can be determined based on the position of the to-be-detected object in the second contour image and the position of the radiotherapy device. Thus, the accurate prediction of the probability of collision between the to-be-detected object and the radiotherapy device is realized, and then whether the treatment plan needs to be adjusted can be determined based on the predicted probability, so as to effectively reduce the security risks.
[0230] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the processing device and each module described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0231] Figure 13 is a structural block diagram of another processing device provided by the embodiment of the present application. Referring to Figure 10 It can be seen that the image processing device 103 can include a processor 1031b and a memory 1032b.
[0232] The memory 1032b is used to store instructions executed by the processor. The processor 1031b can implement the collision detection method provided by the above embodiments by executing the instructions stored in the memory 1032b. For example, the method shown in any one of Figure 2 , Figure 3 , Figure 8 and Figure 9 may be implemented.
[0233] The embodiment of the present application provides a non-volatile computer readable storage medium, which stores instructions, when the instructions run on a computer, the computer executes the collision detection method provided by the above embodiments. For example, the method shown in any one of Figure 2 or Figure 3 may be executed.
[0234] The embodiment of the present application provides a computer program product containing instructions, when the computer program product runs on a computer, the computer executes the collision detection method provided by the above embodiments. For example, the method shown in any one of Figure 2 or Figure 3 may be executed.
[0235] The above is only an optional embodiment of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A collision detection method characterized by, The method comprises: In the case that the object to be detected is located at a first position, a first contour image is acquired based on a point cloud camera, the first contour image comprising the object to be detected and a radiotherapy device; Based on a position offset between the first position and a second position, the object to be detected in the first contour image is processed to obtain a second contour image, the second contour image being a simulated image of the object to be detected and the radiotherapy device when the object to be detected is located at the second position; Based on the position of the object to be detected and the position of the radiotherapy device in the second contour image, a probability of collision between the object to be detected and the radiotherapy device is determined; The determination of the probability of collision between the object to be detected and the radiotherapy device based on the position of the object to be detected and the position of the radiotherapy device in the second contour image comprises: Based on the degree of overlap between the object to be detected and the radiotherapy device in the second contour image, the probability of collision between the object to be detected and the radiotherapy device is determined; The determination of the probability of collision between the object to be detected and the radiotherapy device based on the degree of overlap between the object to be detected and the radiotherapy device in the second contour image comprises: At least one collision region of interest is acquired, the collision region of interest being a region in the second contour image in which the object to be detected is prone to collide with the radiotherapy device; Based on the degree of overlap between the object to be detected and the radiotherapy device in the at least one collision region of interest, the probability of collision between the object to be detected and the radiotherapy device is determined; Alternatively, the determination of the probability of collision between the object to be detected and the radiotherapy device based on the degree of overlap between the object to be detected and the radiotherapy device in the second contour image comprises: At least one collision region of interest is acquired, the collision region of interest being a region in the second contour image in which the object to be detected is prone to collide with the radiotherapy device; The second contour image is traversed using the collision region of interest, the size of the collision region of interest being smaller than the size of the second contour image; The degree of overlap between the object to be detected and the radiotherapy device in the second contour image within the collision region of interest is determined; Based on the degree of overlap, the probability of collision between the object to be detected and the radiotherapy device is determined.
2. The method of claim 1, wherein, The processing of the object to be detected in the first contour image based on the position offset between the first position and a second position to obtain a second contour image comprises: The first contour image is subjected to segmentation processing to obtain a detection image containing only the object to be detected and a background image containing a target collision object other than the object to be detected and containing the radiotherapy device; The detection image and the background image are processed based on the position offset between the first position and the second position to obtain the second contour image.
3. The method of claim 2, wherein, The processing of the detection image and the background image based on the position offset between the first position and a second position to obtain the second contour image comprises: moving the to-be-detected image by the position offset based on the position offset between the first position and the second position, to obtain a moved to-be-detected image; fusing the moved to-be-detected image and the background image to obtain the second contour image.
4. The method of claim 2, wherein, After the first contour image is segmented to obtain the to-be-detected image containing only the to-be-detected object and the background image containing the target collision object of the radiotherapy device except the to-be-detected object, the method further comprises: setting the to-be-detected object in the to-be-detected image to a color different from the target collision object in the background image.
5. The method of claim 1, wherein, The target collision object of the radiotherapy device includes a gantry and / or a radiation head arranged on the gantry.
6. The method of claim 5, wherein, In the case where the target collision object of the radiotherapy device is the radiation head, the probability of collision between the to-be-detected object and the radiotherapy device is determined based on the position of the to-be-detected object in the second contour image and the position of the radiotherapy device, comprising: obtaining a treatment plan of the to-be-detected object; obtaining a third contour image of the radiation head at a preset angle based on the treatment plan and the second contour image; determining the probability of collision between the to-be-detected object and the radiation head based on the position of the to-be-detected object in the third contour image and the position of the radiation head.
7. The method of claim 1, wherein, The probability of collision between the to-be-detected object and the radiotherapy device is determined based on the overlap degree of the to-be-detected object and the radiotherapy device in the at least one collision region of interest, comprising: if the to-be-detected object and the radiotherapy device have an overlapping region in at least one of the collision regions of interest, determining the probability of collision between the to-be-detected object and the radiotherapy device as a first probability; if the to-be-detected object and the radiotherapy device do not have an overlapping region in any of the collision regions of interest, determining the probability of collision between the to-be-detected object and the radiotherapy device as a second probability, the second probability being less than the first probability.
8. The method of claim 7, wherein, After the probability of collision between the to-be-detected object and the radiotherapy device is determined as the first probability, the method further comprises: determining a first density of data points in the collision region of interest in the second contour image; obtaining a second density of data points in a region corresponding to the collision region of interest in the to-be-detected image, the to-be-detected image being an image containing only the to-be-detected object obtained by segmenting the first contour image; determining a collision level of collision between the to-be-detected object and the radiotherapy device based on the ratio of the first density and the second density, the collision level being positively correlated with the ratio.
9. The method of claim 8, wherein, The determination of the collision level of collision between the to-be-detected object and the radiotherapy device based on the ratio of the first density and the second density comprises: determining a target ratio range of the ratio of the first density and the second density based on the correspondence between the ratio range and the collision level, and determining a target collision level corresponding to the target ratio range as the collision level of collision between the to-be-detected object and the radiotherapy device.
10. A processing device, characterized by The processing device comprises a processor and a memory; the memory is used to store instructions executed by the processor; the processor implements the collision detection method as claimed in any one of claims 1 to 9 by executing the instructions stored in the memory.
11. A non-transitory computer readable storage medium, comprising: The non-volatile computer readable storage medium stores instructions; when the instructions run on the computer, the computer executes the collision detection method as claimed in any one of claims 1 to 9.
Citation Information
Patent Citations
Method and device for collision detection of radiotherapy equipment
CN111529969A
System and method for collision avoidance in medical systems
US20170220709A1
Method and system for generating object 3D point cloud in medical imaging system
US20200390406A1