Posture adjustment method and device, electronic equipment and computer readable storage medium
By acquiring image depth information and calculating three-dimensional spatial coordinates using a depth camera, the posture of the X-ray emission device is automatically adjusted, solving the problem of the X-ray emission device obstructing the operation of moving objects and improving surgical efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI UNITED IMAGING HEALTHCARE
- Filing Date
- 2022-06-30
- Publication Date
- 2026-05-15
AI Technical Summary
In DSA interventional treatment, the fixed posture of the X-ray emitting device may obstruct the operation of the moving object, causing discomfort or affecting the surgical outcome. Existing technology requires manual adjustment of the device position or posture, resulting in deviations in imaging position and angle.
The depth information of the target image is obtained by a depth camera, the distance between the moving object and the ray emitting device is calculated, and the device posture is adjusted in a three-dimensional coordinate system, including the posture adjustment of the support and the ray emitting tube. Control commands are generated to automatically adjust the device posture.
It enables the automatic adjustment of the X-ray emitting device's posture based on the real-time movement of the moving object while maintaining the imaging position and angle, thus providing sufficient surgical space and improving surgical efficiency.
Smart Images

Figure CN115115547B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a posture adjustment method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] When using DSA (Digital Subtraction Angiography) for interventional treatment, a radiation emission device is usually required. For the same positioning, the posture of the radiation emission device is often fixed. However, during the operation, the patient, such as medical staff, usually needs to perform the operation or operate the instruments in different positions and postures. If the position of the radiation emission device happens to be the position where the patient wants to stand or operate, it may cause the patient to be uncomfortable or even make it impossible to perform the operation.
[0003] In existing technologies, when a radiation emitting device obstructs the operation of a moving object, the position of the radiation emitting device needs to be moved before the required operation can be performed, and then the radiation emitting device needs to be moved back to its original position; or the posture of the radiation emitting device needs to be manually adjusted, but the imaging position and angle of the image may deviate from the state before adjustment, thus affecting the surgical outcome.
[0004] Therefore, how to automatically adjust the attitude of the X-ray emitting device according to the real-time movement of the moving object while keeping the imaging position and angle of the X-ray emitting device relatively unchanged is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, it is necessary to provide a posture adjustment method, device, electronic device and computer-readable storage medium that can automatically adjust the posture of the ray emitting device according to the real-time motion of the moving object.
[0006] To achieve the above objectives, in a first aspect, the present invention provides a posture adjustment method, comprising:
[0007] Obtain depth information of the target image, wherein the target object in the target image includes ray emitting devices and moving objects;
[0008] Calculate the current distance between the moving object and the ray emitting device based on the depth information;
[0009] If the current distance between the moving object and the ray emitting device is less than a preset distance, adjust the attitude of the ray emitting device.
[0010] Furthermore, obtaining the depth information of the target image includes:
[0011] The original image of the target object is acquired using a depth camera;
[0012] Obtain the calibration parameters of the depth camera, and correct the original image based on the calibration parameters;
[0013] The corrected original image is matched, and the depth of each pixel is calculated based on the matching results to obtain the depth information of the target image.
[0014] Furthermore, calculating the current distance between the moving object and the ray-emitting device based on the depth information includes:
[0015] A three-dimensional spatial coordinate system is constructed based on the depth information of the target image;
[0016] Determine the current distance between the moving object and the ray emitting device in the three-dimensional spatial coordinate system.
[0017] Furthermore, the construction of a three-dimensional spatial coordinate system based on the depth information of the target image includes:
[0018] The point cloud data of each pixel in the target image is calculated based on the depth information of the target image and the calibration parameters of the depth camera.
[0019] The three-dimensional spatial coordinate system is constructed based on the point cloud data.
[0020] Furthermore, determining the current distance between the moving object and the ray-emitting device in the three-dimensional spatial coordinate system includes:
[0021] Determine the first point cloud data and the second point cloud data of the moving object and the ray emitting device in the three-dimensional spatial coordinate system, respectively.
[0022] Calculate the spatial distance between the first point cloud data and the second point cloud data, and determine the spatial distance as the current distance between the moving object and the ray emitting device.
[0023] Furthermore, adjusting the attitude of the ray emitting device if the current distance between the moving object and the ray emitting device is less than a preset distance includes:
[0024] If the spatial distance is less than the preset distance, the first point cloud data of the ray emitting device in the three-dimensional spatial coordinate system is adjusted based on the motion direction of the moving object.
[0025] The attitude of the ray emitting device is calculated based on the adjusted first point cloud data, and control commands to drive the operation of the ray emitting device are generated.
[0026] The attitude of the radiation emitting device is adjusted based on the control commands.
[0027] Furthermore, the ray emitting device includes a ray emitting tube and a support. The step of adjusting the attitude of the ray emitting device if the current distance between the moving object and the ray emitting device is less than a preset distance specifically includes:
[0028] If the spatial distance is less than the preset distance, obtain the third point cloud data of the support in the three-dimensional spatial coordinate system;
[0029] Adjust the third point cloud data of the support in the three-dimensional spatial coordinate system based on the motion direction of the moving object;
[0030] The attitude of the support is calculated based on the adjusted third point cloud data, and control commands to drive the support are generated.
[0031] The posture of the bracket is adjusted based on the control commands, and the posture of the X-ray emission tube is fixed.
[0032] Secondly, the present invention also provides an attitude adjustment device, comprising:
[0033] A depth information acquisition module is used to acquire depth information of a target image, wherein the target objects in the target image include ray emitting devices and moving objects;
[0034] The distance calculation module is used to calculate the current distance between the moving object and the ray emitting device based on the depth information;
[0035] The attitude adjustment module is used to adjust the attitude of the ray emitting device if the current distance between the moving object and the ray emitting device is less than a preset distance.
[0036] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the above-described attitude adjustment method.
[0037] Fourthly, the present invention also provides a computer storage medium, which stores a computer program that, when executed by a processor, implements the steps in the attitude adjustment method described above.
[0038] The beneficial effects of the above embodiments are: by acquiring the depth information of the target image, the present invention facilitates the calculation of the relative spatial position relationship between the moving object and the X-ray emitting device based on the depth information using computer machine vision, and automatically adjusts the posture of the X-ray emitting device according to the real-time distance between the moving object and the X-ray emitting device, that is, automatically adjusts the posture of the X-ray emitting device according to the real-time movement of the moving object, providing sufficient surgical space for the moving object, i.e., medical staff, and facilitating improved surgical efficiency. Attached Figure Description
[0039] Figure 1 A flowchart illustrating an embodiment of the attitude adjustment method provided by the present invention;
[0040] Figure 2 A relative positional relationship diagram between target objects is provided in an embodiment of the present invention;
[0041] Figure 3 An attitude adjustment diagram of a radiation emitting device provided in an embodiment of the present invention;
[0042] Figure 4 A schematic diagram of a process for adjusting the attitude of a radiation emitting device provided in an embodiment of the present invention;
[0043] Figure 5 A schematic diagram of an embodiment of the attitude adjustment device provided by the present invention;
[0044] Figure 6 This is a schematic diagram of the structure of an electronic device provided by the present invention. Detailed Implementation
[0045] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which constitute a part of the present invention and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0046] In the description of this invention, "a plurality of" means two or more, unless otherwise expressly specified. The reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0047] This invention provides a posture adjustment method, apparatus, electronic device, and computer-readable storage medium, which are described below.
[0048] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the attitude adjustment method provided by the present invention. A specific embodiment of the present invention discloses an attitude adjustment method, comprising:
[0049] Step S101: Obtain depth information of the target image, wherein the target objects in the target image include ray emitting devices and moving objects;
[0050] In this invention, depth information represents the distance between the image acquisition device and the target object. In one embodiment of the invention, a depth camera, such as a stereo camera, is used as the image acquisition device. Therefore, the depth information in this invention includes the distance information between the center of the stereo camera and the target object.
[0051] It should be noted that the target objects in the target image include radiation emitting equipment and moving objects. The radiation emitting equipment can be equipment such as a C-arm, X-ray machine, or CT (Computed Tomography) machine, while the moving objects can be doctors, nurses, and personnel moving around in the operating room. In addition, the target image generally also includes stationary objects, such as a hospital bed or patient.
[0052] For example, see Figure 2 , Figure 2 This invention provides a relative positional relationship diagram among target objects, specifically, a positional relationship diagram of depth camera 201, X-ray emitting device 202, moving object 203, and fixed object 204. It should be noted that the position of depth camera 201 in the diagram is only an example, and its position can be adjusted as needed. It is understood that by installing two or more depth cameras, images can be taken from different angles of the fixed object (such as a hospital bed or patient) and the X-ray emitting device (such as a C-arm), thereby obtaining depth information of the moving object (such as medical staff), the fixed object, and the X-ray emitting device in different directions.
[0053] Step S102: Calculate the current distance between the moving object and the ray-emitting device based on the depth information;
[0054] The current distance between the moving object and the ray emitting device can be calculated using the depth information of the target image and based on computer machine vision. Specifically, artificial intelligence (AI) technology can be used to identify the moving object and then calculate the current distance between the moving object and the ray emitting device.
[0055] In some embodiments, AI technology can be image recognition technology, such as first acquiring an image of a moving object, and then using a recognition model (such as the YOLOv5 algorithm or BP neural network) to recognize the image to determine the position of the moving object. Similarly, the position of the ray emitting device can be identified, and then the positional relationship between the two can be derived (which can be reflected by coordinate relationship).
[0056] In a specific embodiment, the current distance between the moving object and the X-ray emitting device can be the distance from the center of gravity of the medical staff to the center of the C-arm X-ray tube. It can be understood that the actual physical distance from the medical staff to the C-arm should be greater than the distance from the center of gravity of the medical staff to the center of the C-arm X-ray tube. For actual measurement, the distance is generally increased based on the thickness, length and volume of the moving object and the X-ray emitting device.
[0057] Step S103: If the current distance between the moving object and the ray emitting device is less than the preset distance, adjust the attitude of the ray emitting device.
[0058] Understandably, if the current distance between the moving object and the X-ray emitting device is less than a preset distance, such as 20cm, the posture of the X-ray emitting device can be adjusted to provide sufficient surgical space for the moving object while maintaining the stability of the image display, thus not affecting the surgical outcome.
[0059] More specifically, when the distance from the medical staff's center of gravity to the center of the C-arm X-ray tube is less than 20cm, the posture of the C-arm should be adjusted. It should be noted that different X-ray tube powers have different radiation ranges; therefore, the preset distance setting should correspond to the X-ray tube's power. Different X-ray tube powers correspond to different preset distances. For example, if the X-ray tube power is high, the radiation range is wide. To ensure the safety of medical staff and provide sufficient distance for surgical procedures, the preset distance can be set to 25cm or 30cm.
[0060] It should be noted that in practical applications, adjusting the attitude of the X-ray emitting device includes not only the current distance between the moving object and the device, but also the direction of the object's movement. Essentially, if the distance between the moving object and the device is less than a preset distance, and the object is moving towards the device, the attitude of the device can be adjusted. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a diagram illustrating the attitude adjustment of a radiation emission device according to an embodiment of the present invention. Specifically, when the moving object 302 moves in direction A, the radiation emission device 303 is located in direction A of the moving object 302. Therefore, the attitude of the radiation emission device 303 can be adjusted. Specifically, taking the diagram as an example, the attitude adjustment direction of the radiation emission device 303 can be direction B, thereby providing sufficient surgical space for the moving object.
[0061] If the current distance between the moving object and the ray emitting device is less than the preset distance, but the moving object is moving away from the ray emitting device, the attitude of the ray emitting device does not need to be adjusted to avoid wasting resources.
[0062] This invention acquires depth information from the target image, enabling computer machine vision to calculate the relative spatial position between the moving object and the X-ray emitting device. Furthermore, it automatically adjusts the posture of the X-ray emitting device based on the real-time distance between the moving object and the X-ray emitting device, thus providing sufficient surgical space for the moving object, i.e., medical personnel, and improving surgical efficiency.
[0063] In one embodiment of the present invention, obtaining the depth information of the target image includes:
[0064] Acquire the original image of the target object using a depth camera;
[0065] Obtain the calibration parameters of the depth camera and correct the original image based on the calibration parameters;
[0066] The corrected original image is matched, and the depth of each pixel is calculated based on the matching results to obtain the depth information of the target image.
[0067] The depth camera can be a stereo camera. The calibration parameters of the depth camera include the intrinsic and extrinsic parameters of both cameras, as well as the homography matrix between the two cameras. Camera calibration can be understood as mapping world coordinates to pixel coordinates. By obtaining the mapping relationship between world coordinates and pixel coordinates through calibration, the world coordinates can be deduced from the pixel coordinates of a pixel. The camera's intrinsic parameters are parameters related to the camera's own characteristics, such as focal length and pixel size. The camera's extrinsic parameters include the camera's parameters in the world coordinate system, such as its position and rotation direction. The homography matrix between the two cameras describes the mapping relationship between two planes, that is, the transformation relationship of some points on the common plane between the two images.
[0068] Understandably, sometimes stereo cameras are not parallel, resulting in non-parallel original images. This complicates subsequent depth information calculations, necessitating image correction. The homography matrix describes the mapping relationship between two planes. Therefore, the original images acquired by the stereo cameras can be corrected based on the homography matrix between them, ensuring that the corrected images lie on the same plane and are parallel to each other. This parallelism contributes to coordinate homogeneity and facilitates computation.
[0069] When calculating pixel depth, in addition to knowing the camera focal length and baseline from the camera parameters, it is also necessary to know the disparity between the two cameras, that is, to know the correspondence between each pixel in the left camera and the corresponding point in the right camera. This means matching pixels in the two corrected images. Specifically, matching can be performed using the homography matrix of the two cameras or using epipolar constraints. When the matching is completed, the disparity between the two cameras is obtained, and the depth of each pixel can be calculated, thus obtaining a depth map of the target image.
[0070] In one embodiment of the present invention, calculating the current distance between the moving object and the ray-emitting device based on depth information includes:
[0071] A three-dimensional spatial coordinate system is constructed based on the depth information of the target image;
[0072] In this context, the three-dimensional spatial coordinate system can be understood as the world coordinate system, which can be a user-defined coordinate system in the three-dimensional world. It is introduced to describe the position of the target object in real three-dimensional space. For example, point cloud models of fixed objects, ray-emitting devices, and moving objects can be obtained first based on depth information. Finally, point cloud data of each pixel can be determined based on the point cloud model to achieve three-dimensional reconstruction.
[0073] Specifically, a three-dimensional spatial coordinate system is constructed based on the depth information of the target image, including:
[0074] Calculate the point cloud data of each pixel in the target image based on the depth information of the target image and the calibration parameters of the binocular camera;
[0075] A three-dimensional spatial coordinate system is constructed based on point cloud data.
[0076] Point cloud data is a collection of points in a coordinate system, containing rich information such as 3D coordinates, color, classification value, intensity value, and time. High-precision point cloud data can be used to reconstruct the real world. In practical applications, point cloud data can be acquired through 3D laser scanners or through 3D reconstruction of 2D images, with point cloud data acquired during the reconstruction process. This invention primarily employs the second method to acquire point cloud data.
[0077] Understandably, without considering image distortion, the 3D coordinates of any pixel in the world coordinate system can be calculated based on the depth information of the target image and the camera's intrinsic and extrinsic parameters. The depth information of the target image includes the depth coordinates and pixel coordinates of a point in the target image in the camera coordinate system. Therefore, the coordinates of any pixel in the world coordinate system can be calculated based on the RGB-D image and the camera's intrinsic and extrinsic parameters. Specifically, the 3D coordinates of the point in the camera coordinate system can be calculated using a known intrinsic parameter formula. Then, based on the homogeneous transformation matrix or rotation matrix and translation vector of the stereo camera, the 3D coordinates of the point in the world coordinate system, i.e., the point cloud data of the point, can be obtained. Finally, a 3D spatial coordinate system can be constructed based on the calculated point cloud data to achieve 3D reconstruction.
[0078] Determine the current distance between the moving object and the ray-emitting device in a three-dimensional spatial coordinate system.
[0079] Understandably, after constructing a three-dimensional spatial coordinate system, a reference point can be determined for both the moving object and the ray-emitting device in the three-dimensional spatial coordinate system. Then, the distance between the two reference points can be calculated as the current distance between the moving object and the ray-emitting device.
[0080] In one embodiment of the present invention, determining the current distance between the moving object and the ray emitting device in a three-dimensional spatial coordinate system includes:
[0081] The first point cloud data and the second point cloud data of the moving object and the ray emitting device in the three-dimensional spatial coordinate system are determined respectively;
[0082] Calculate the spatial distance between the first point cloud data and the second point cloud data, and determine the spatial distance as the current distance between the moving object and the ray emitting device.
[0083] It is understandable that the first point cloud data of the ray emitting device in the three-dimensional spatial coordinate system includes the first coordinate information of the ray emitting device in the three-dimensional spatial coordinate system, and specifically includes the first set of coordinate information; the second point cloud data of the moving object in the three-dimensional spatial coordinate system includes the second coordinate information of the moving object in the three-dimensional spatial coordinate system, and specifically includes the second set of coordinate information.
[0084] Therefore, in order to more easily determine the current distance between the moving object and the ray emitting device, a reference point can be determined on both the moving object and the ray emitting device, and then the spatial distance between the two reference points can be calculated.
[0085] For example, the first reference point of the moving object is the center of gravity of the medical staff, and the reference point of the X-ray emitting device is the center of the C-arm X-ray tube. By determining the first coordinate of the medical staff's center of gravity and the second coordinate of the C-arm X-ray tube center in a three-dimensional coordinate system, and then calculating the spatial distance between the first and second coordinates, the current distance between the moving object and the X-ray emitting device can be determined.
[0086] In one embodiment of the present invention, please refer to Figure 4 , Figure 4 This is a flowchart illustrating the process of adjusting the attitude of a ray emitting device according to an embodiment of the present invention. If the current distance between the moving object and the ray emitting device is less than a preset distance, the attitude of the ray emitting device is adjusted, including:
[0087] Step S401: If the spatial distance is less than the preset distance, adjust the first point cloud data of the ray emitting device in the three-dimensional spatial coordinate system based on the motion direction of the moving object;
[0088] Understandably, computer machine vision can be used to capture the position and direction of movement of a moving object. First, an image of the moving object is acquired and identified. Then, a recognition model (such as the YOLOv5 algorithm or a BP neural network) identifies the image to determine the position and direction of movement of the moving object. Similarly, the position of the X-ray emitting device can be identified. When the moving object moves toward the location of the X-ray emitting device, and the spatial distance between the moving object and the X-ray emitting device is less than a preset distance value (e.g., 20cm), the coordinates of the X-ray emitting device in the three-dimensional spatial coordinate system are adjusted according to the direction of movement of the moving object. This adjusts the first point cloud data of the X-ray emitting device in the three-dimensional spatial coordinate system so that it moves away from the moving object, making it easier to perform surgical operations on the moving object.
[0089] Specifically, the three-dimensional coordinates of the ray emitting device can be adjusted in the terminal's display interface. Once the position of the ray emitting device is identified, its coordinates can be adjusted based on whether it is in the same direction as the moving object or in a direction that does not collide with the moving object.
[0090] Step S402: Calculate the attitude of the ray emitting device based on the adjusted first point cloud data, and generate control commands to drive the ray emitting device to operate;
[0091] Step S403: Adjust the attitude of the ray emitting device based on control commands.
[0092] It is understood that this invention discloses a specific method for adjusting the attitude of a ray emitting device, which involves calculating the attitude of the ray emitting device based on the adjusted first point cloud data, specifically calculating the joint attitude of the ray emitting device to generate control commands to drive the operation of the ray emitting device. The control commands include the direction and distance of movement of the ray emitting device.
[0093] After receiving a control command, the radiation emitting device can automatically adjust its posture according to the direction and distance of movement included in the control command.
[0094] In one embodiment of the present invention, the radiation emitting device includes a radiation emitting tube and a support. If the current distance between the moving object and the radiation emitting device is less than a preset distance, the attitude of the radiation emitting device is adjusted, specifically including:
[0095] If the spatial distance is less than the preset distance, obtain the cloud data of the third point of the support in the three-dimensional spatial coordinate system;
[0096] Adjust the third point cloud data of the support in the three-dimensional spatial coordinate system based on the motion direction of the moving object;
[0097] The attitude of the support is calculated based on the adjusted third point cloud data, and control commands to drive the support are generated.
[0098] The posture of the support is adjusted based on control commands, and the posture of the X-ray emission tube is fixed.
[0099] Understandably, X-ray emitting equipment includes a X-ray emitting tube and a support. During the automatic posture adjustment process of the X-ray emitting equipment, the posture of the support can be automatically adjusted, while the posture of the X-ray emitting tube is fixed, so as to keep the X-ray image stable and improve the surgical efficiency of medical staff.
[0100] The automatic adjustment of the support posture is similar to the posture adjustment method of the X-ray emission equipment, and will not be described in detail here.
[0101] To better implement the attitude adjustment method in the embodiments of the present invention, based on the attitude adjustment method, please refer to the corresponding... Figure 5 , Figure 5 This is a schematic diagram of an embodiment of the attitude adjustment device provided by the present invention. The embodiment of the present invention provides an attitude adjustment device 500, comprising:
[0102] The depth information acquisition module 501 is used to acquire the depth information of the target image, wherein the target objects in the target image include ray emitting devices and moving objects;
[0103] Distance calculation module 502 is used to calculate the current distance between the moving object and the ray emitting device based on depth information;
[0104] The attitude adjustment module 503 is used to adjust the attitude of the ray emitting device if the current distance between the moving object and the ray emitting device is less than a preset distance.
[0105] It should be noted that the device 500 provided in the above embodiments can implement the technical solutions described in the above method embodiments. The specific implementation principles of the above modules or units can be found in the corresponding content in the above method embodiments, and will not be repeated here.
[0106] Based on the above attitude adjustment method, this embodiment of the invention also provides an electronic device, including: a processor and a memory, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, it implements the steps in the attitude adjustment method of the above embodiments.
[0107] Figure 6 The diagram shows a structural schematic of an electronic device 600 suitable for implementing embodiments of the present invention. The electronic device in the embodiments of the present invention may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0108] The electronic device includes a memory and a processor, wherein the processor may be referred to as processing device 601 below, and the memory may include at least one of read-only memory (ROM) 602, random access memory (RAM) 603 and storage device 608 below, as detailed below:
[0109] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0110] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0111] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of the embodiments of the present invention.
[0112] Based on the above attitude adjustment method, the present invention also provides a computer-readable storage medium that stores one or more programs that can be executed by one or more processors to implement the steps in the attitude adjustment method of the above embodiments.
[0113] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0114] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A posture adjustment method, characterized in that, include: Obtain depth information of the target image, wherein the target object in the target image includes ray emitting devices and moving objects; Calculate the current distance between the moving object and the ray emitting device based on the depth information; If the current distance between the moving object and the ray emitting device is less than a preset distance, and the moving object moves toward the ray emitting device, adjust the attitude of the ray emitting device; The radiation emitting device is a C-arm, and the preset distance setting corresponds to the power of the C-arm X-ray tube; the radiation emitting device includes a radiation emitting tube and a support; adjusting the posture of the radiation emitting device includes adjusting the posture of the support and fixing the posture of the radiation emitting tube.
2. The method according to claim 1, characterized in that, The acquisition of depth information of the target image includes: The original image of the target object is acquired using a depth camera; Obtain the calibration parameters of the depth camera, and correct the original image based on the calibration parameters; The corrected original image is matched, and the depth of each pixel is calculated based on the matching results to obtain the depth information of the target image.
3. The method according to claim 2, characterized in that, The calculation of the current distance between the moving object and the ray-emitting device based on the depth information includes: A three-dimensional spatial coordinate system is constructed based on the depth information of the target image; Determine the current distance between the moving object and the ray emitting device in the three-dimensional spatial coordinate system.
4. The method according to claim 3, characterized in that, The construction of a three-dimensional spatial coordinate system based on the depth information of the target image includes: The point cloud data of each pixel in the target image is calculated based on the depth information of the target image and the calibration parameters of the depth camera. The three-dimensional spatial coordinate system is constructed based on the point cloud data.
5. The method according to claim 3, characterized in that, Determining the current distance between the moving object and the ray emitting device in the three-dimensional spatial coordinate system includes: Determine the first point cloud data and the second point cloud data of the moving object and the ray emitting device in the three-dimensional spatial coordinate system, respectively. Calculate the spatial distance between the first point cloud data and the second point cloud data, and determine the spatial distance as the current distance between the moving object and the ray emitting device.
6. The method according to claim 5, characterized in that, If the current distance between the moving object and the ray emitting device is less than a preset distance, and the moving object moves toward the ray emitting device, adjusting the attitude of the ray emitting device includes: When a moving object moves toward the location of a ray emitting device, and the current distance between the moving object and the ray emitting device is lower than a preset distance value, the first point cloud data of the ray emitting device in the three-dimensional spatial coordinate system is adjusted according to the direction of movement of the moving object. The attitude of the ray emitting device is calculated based on the adjusted first point cloud data, and control commands to drive the operation of the ray emitting device are generated. The attitude of the radiation emitting device is adjusted based on the control commands.
7. The method according to claim 1, characterized in that, If the current distance between the moving object and the ray emitting device is less than a preset distance, and the moving object moves toward the ray emitting device, adjusting the attitude of the ray emitting device specifically includes: When the moving object moves toward the location of the ray emitting device, and the current distance between the moving object and the ray emitting device is lower than the preset distance value, the third point cloud data of the support in the three-dimensional spatial coordinate system is obtained. Adjust the third point cloud data of the support in the three-dimensional spatial coordinate system according to the direction of motion of the moving object; The attitude of the support is calculated based on the adjusted third point cloud data, and control commands to drive the support are generated. The posture of the bracket is adjusted based on the control commands, and the posture of the X-ray emission tube is fixed.
8. A posture adjustment device, characterized in that, include: A depth information acquisition module is used to acquire depth information of a target image, wherein the target objects in the target image include ray emitting devices and moving objects; The distance calculation module is used to calculate the current distance between the moving object and the ray emitting device based on the depth information; An attitude adjustment module is used to adjust the attitude of the ray emitting device if the current distance between the moving object and the ray emitting device is less than a preset distance, and the moving object moves toward the ray emitting device. The radiation emitting device is a C-arm, and the preset distance is set in accordance with the power of the C-arm X-ray tube. The radiation emitting device includes a radiation emitting tube and a support; adjusting the posture of the radiation emitting device includes adjusting the posture of the support and fixing the posture of the radiation emitting tube.
9. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory is used to store a program; and the processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the attitude adjustment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, are capable of implementing the steps in the attitude adjustment method according to any one of claims 1 to 7.