A radiographic imaging positioning method, system, electronic device, and medium
By acquiring image information and optimizing the position of the X-ray machine based on relative positional relationships, the problem of inaccurate positioning during remote control adjustment was solved, enabling high-quality imaging and efficient shooting of tension clamps.
Patent Information
- Application Number
- CN202510010212.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-01-03
AI Technical Summary
Remote control adjustment makes it difficult to accurately position the X-ray machine and imaging plate, resulting in poor imaging quality and low efficiency of the tension clamp.
By acquiring image information of the target location, the position is adjusted using the relative positional relationship between the camera's optical center and the X-ray machine's emission point. Combined with X-ray penetration limitations and focal length optimization, the precise positioning of the X-ray machine is achieved.
This improves the quality and efficiency of tension clamp imaging and reduces the time and labor required for manual adjustments.
Smart Images

Figure CN119757415B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a ray machine imaging positioning method and system, an electronic device and a medium. BACKGROUND
[0002] The compression quality of the strain clamp of the power transmission line is a key quality control point of the power transmission line. If the compression quality has a problem, a safety hazard will be left. At the present stage, whether the power fittings have defects is usually judged by X-ray imaging of the strain clamp. Since the way of carrying the ray machine and the imaging plate to the tower by the climbing personnel has the risks of ionizing radiation, high falling, etc., more and more work machines are used to climb the tower, and the shooting way of the robot mechanical arm hanging the ray machine and the imaging plate is adopted.
[0003] This shooting way usually remotely and artificially adjusts the distance between the ray machine and the imaging plate, the horizontal and vertical distances of the ray machine relative to the parallel plane of the center point position of the shooting target by the machine operation hand. However, it is difficult to accurately position and shoot the area that needs to be shot of the strain clamp by remotely adjusting the shooting position, resulting in poor imaging quality. Moreover, the process of "shooting- confirming imaging effect-adjusting position-re-shooting" needs to be carried out manually, which is time-consuming and laborious, and the shooting efficiency is low. SUMMARY
[0004] Therefore, the present application provides a ray machine imaging positioning method and system, an electronic device and a medium, which solve the technical problems that it is difficult to accurately position and shoot the area that needs to be shot of the strain clamp by remotely adjusting the shooting position, resulting in poor imaging quality and low shooting efficiency.
[0005] The first aspect of the present application provides a ray machine imaging positioning method, comprising:
[0006] acquiring image information of a center point of a target position;
[0007] determining a projection offset of the center point of the target position relative to a camera optical center in a camera coordinate system according to the camera optical center and the image information of the center point of the target position;
[0008] compensating the projection offset according to the relative position relationship between the camera optical center and a ray emitting point of the ray machine to obtain a first position adjustment vector, wherein the first position adjustment vector is a position adjustment vector of the ray emitting point in the x-axis direction and the y-axis direction of the camera coordinate system, and the target position is located in the z-axis direction of the camera coordinate system;
[0009] updating the current position of the ray emitting point according to the first position adjustment vector, and determining a relative distance constraint between the ray emitting point and the target position after updating the current position according to a ray penetration limit of the ray machine and an optimal focal length of the ray machine;
[0010] determining a second position adjustment vector of the ray emitting point according to the optimal focal length of the ray machine under the relative distance constraint, the second position adjustment vector being a position adjustment vector of the ray emitting point in a z-axis direction of the camera coordinate system;
[0011] updating the current position of the ray emitting point according to the second position adjustment vector, and capturing the target position by the ray machine at the updated current position of the ray emitting point and generating a target ray image corresponding to the target position.
[0012] Preferably, the image information of the center point of the target position includes image depth data and pixel coordinates;
[0013] The step of determining the projection offset of the center point of the target position relative to the camera focal point in the camera coordinate system according to the camera coordinate system in which the camera focal point is located and the image information of the center point of the target position comprises:
[0014] determining pixel distances of the center point of the target position and the camera focal point in x-axis and y-axis directions of the pixel coordinate system respectively according to the pixel coordinates of the center point of the target position and the pixel coordinates of the camera focal point in the pixel coordinate system;
[0015] determining an actual distance of the camera focal point and the center point of the target position in a z-axis direction of the camera coordinate system according to the image depth data of the center point of the target position;
[0016] determining the projection offset of the center point of the target position relative to the camera focal point in the camera coordinate system according to preset image capturing attributes of the camera, the pixel distances and the actual distance, the projection offset being:
[0017] =( )
[0018] =( )
[0019] In the formula, , are projection offsets of the center point of the target position relative to the camera focal point in x-axis and y-axis directions of the camera coordinate system respectively, a distance between the camera optical center and a center point of the target position in a z-axis direction of the camera coordinate system, a focal length of the camera, , pixel distances of a center point of the target position and a camera focal point in x-axis and y-axis directions of the pixel coordinate system, respectively, a width dimension ratio of the camera imaging,
[0020] /
[0021] wherein, a sensor width of the camera, a photo width of the camera imaging.
[0022] Preferably, the step of compensating the projection offset according to a relative position relationship between the camera optical center and a ray emitting point of the ray machine to obtain a first position adjustment vector, wherein the first position adjustment vector is an x-axis and y-axis direction position adjustment vector of the ray emitting point in the camera coordinate system, comprises:
[0023] determining an x-axis and y-axis direction offset of the camera optical center corresponding to the ray emitting point of the ray machine in the camera coordinate system according to a relative position relationship between the camera optical center and the ray emitting point of the ray machine in the camera coordinate system;
[0024] compensating the projection offset according to the x-axis and y-axis direction offset of the camera optical center corresponding to the ray emitting point of the ray machine to obtain the first position adjustment vector.
[0025] Preferably, the step of determining a relative distance constraint between the ray emitting point after updating the current position and the target position according to a ray exposure limitation of the ray machine comprises:
[0026] determining a minimum relative distance between the ray emitting point and the target position according to the offset of the camera optical center and the ray emitting point in the z-axis direction of the camera coordinate system, a focal point size and an exposure thickness of the ray machine, the minimum relative distance being:
[0027] 15 +
[0028] wherein, the minimum relative distance, a focal point size of the ray machine, a target exposure thickness, the offset of the camera optical center and the ray emitting point in the z-axis direction of the camera coordinate system.
[0029] Preferably, the optimal focal length of the radiographic machine between the ray emitting point after updating the current position and the target position is determined according to the radiographic exposure limit of the radiographic machine, and the optimal focal length is:
[0030]
[0031] wherein, the optimal focal length is, the intrinsic unsharpness.
[0032] Preferably, the step of updating the current position of the ray emitting point according to the second position adjustment vector comprises:
[0033] determining an actual focal length according to the optimal focal length and a preset safety margin coefficient;
[0034] determining the offset of the ray emitting point in the z-axis direction of the camera coordinate system according to the actual focal length, the actual distance between the camera optical center and the center point of the target position in the z-axis direction of the camera coordinate system, the offset of the camera optical center and the ray emitting point in the z-axis direction of the camera coordinate system, and the target exposure thickness, and the offset of the ray emitting point in the z-axis direction of the camera coordinate system is:
[0035]
[0036] wherein, the offset of the ray emitting point in the z-axis direction of the camera coordinate system is, the preset safety margin coefficient, wherein,
[0037] updating the current position of the ray emitting point according to the offset of the ray emitting point in the z-axis direction of the camera coordinate system.
[0038] In a second aspect, the present application further provides a radiographic imaging positioning system, comprising:
[0039] an image acquisition module, configured to acquire image information of a center point of a target position;
[0040] a projection offset calculation module, configured to determine a projection offset of the center point of the target position relative to a camera optical center in a camera coordinate system according to the camera coordinate system in which the camera optical center is located and the image information of the center point of the target position;
[0041] a first vector determination module configured to compensate the projection offset according to a relative position relationship between a camera optical center and a ray emitting point of the ray machine, to obtain a first position adjustment vector, wherein the first position adjustment vector is a position adjustment vector of the ray emitting point in an x-axis direction and a y-axis direction of the camera coordinate system, and the target position is located in a z-axis direction of the camera coordinate system;
[0042] a focal length determination module configured to, after updating the current position of the ray emitting point according to the first position adjustment vector, determine a relative distance constraint between the ray emitting point and the target position after updating the current position and an optimal focal length of the ray machine according to a ray penetration limitation of the ray machine;
[0043] a second vector determination module configured to, under the relative distance constraint, determine a second position adjustment vector of the ray emitting point according to the optimal focal length of the ray machine, wherein the second position adjustment vector is a position adjustment vector of the ray emitting point in the z-axis direction of the camera coordinate system;
[0044] a shooting imaging module configured to update the current position of the ray emitting point according to the second position adjustment vector, and to shoot the target position by the ray machine under the updated current position of the ray emitting point, and to generate a target ray image corresponding to the target position.
[0045] In a third aspect, the present application further provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the ray machine imaging positioning method according to the first aspect.
[0046] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed to implement the steps of the ray machine imaging positioning method according to the first aspect.
[0047] In a fifth aspect, the present application further provides a computer program product, which comprises a computer program stored in a non-transitory computer readable storage medium, and the computer program comprises program instructions, wherein when the program instructions are executed by a computer, the computer executes the steps of the ray machine imaging positioning method according to the first aspect.
[0048] From the above technical scheme can be seen, the present application with the help of camera position assistance, using the image information obtained by the camera to calculate the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system, the relative position relationship between the camera optical center and the ray emitting point of the ray machine is used to compensate the projection offset, so as to obtain the first position adjustment vector to adjust the position of the ray emitting point in the x axis direction and y axis direction in the camera coordinate system, and through the relative distance constraint of the target position and the best focal length of the ray machine to meet the ray penetration limit of the ray machine, so as to determine the second position adjustment vector, so as to adjust the position of the ray emitting point in the z axis direction in the camera coordinate system, so as to realize the accurate positioning of the shooting position of the ray machine, and better shoot the target position area, improve the imaging quality and shooting efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 The application environment diagram of the ray machine imaging positioning method provided by the embodiment of the present application is shown in the figure;
[0050] Figure 2 The flow chart of the ray machine imaging positioning method provided by the embodiment of the present application is shown in the figure;
[0051] Figure 3 The relative position diagram in the camera, pixel coordinate system and camera coordinate system provided by the embodiment of the present application is shown in the figure;
[0052] Figure 4 The X-ray machine shooting schematic diagram of the strain clamp provided by the embodiment of the present application is shown in the figure;
[0053] Figure 5 The structural schematic diagram of the ray machine imaging positioning system provided by the embodiment of the present application is shown in the figure;
[0054] Figure 6 The structural schematic diagram of the electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0055] In order to make the person skilled in the art better understand the present application scheme, the technical scheme in the embodiment of the present application will be described clearly and completely below, combined with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, not all the embodiments. Based on the embodiment in the present application, all other embodiments obtained by the person skilled in the art without creative labor belong to the protection scope of the present application.
[0056] The embodiment of the present application provides a ray machine imaging positioning method, which can be applied to Figure 1The application environment shown. Among them, the X-ray machine is installed by a three-axis motion mechanical arm, the three-axis mechanical arm is driven by a motor, and the X-ray machine can be driven along the x, y and z three-axis directions respectively, the X-ray machine is arranged relative to the target position, and the imaging plate is arranged on the other side of the target position away from the X-ray machine, and the X-ray machine transmits the rays to the target and images the target on the imaging plate. Among them, the target can be a tension clamp and the like. In addition, in order to better image the ray machine, the embodiment of the application adds a camera and a controller (such as a monocular RGBD camera) on the mechanical arm, the camera is used to collect image information of the center point of the target position, the camera should be installed in a position not affected by the action of the mechanical arm, in addition, an STM32F103C8T6 is needed as a controller, which is responsible for the logical control of the mechanical arm system, data processing and communication with external devices, because the amount of image data to be processed is large, a DSP module can be externally connected to be responsible for the video encoding, decoding and image processing operation part. The controller determines the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system according to the camera coordinate system where the camera optical center is located and the image information of the center point of the target position; the projection offset is compensated according to the relative position relationship between the camera optical center and the ray emitting point of the ray machine, and a first position adjustment vector is obtained, wherein the first position adjustment vector is the position adjustment vector of the ray emitting point in the x-axis direction and the y-axis direction of the camera coordinate system, and the target position is located in the z-axis direction of the camera coordinate system; after updating the current position of the ray emitting point according to the first position adjustment vector, the relative distance constraint between the updated current position of the ray emitting point and the target position and the best focal length of the ray machine are determined according to the ray transmission limitation of the ray machine; under the relative distance constraint, the second position adjustment vector of the ray emitting point is determined according to the best focal length of the ray machine, and the second position adjustment vector is the position adjustment vector of the ray emitting point in the z-axis direction of the camera coordinate system; the current position of the ray emitting point is updated according to the second position adjustment vector. The X-ray machine shoots the target position at the updated current position of the ray emitting point, and generates a target ray image corresponding to the target position.
[0057] As Figure 2 shown, the embodiment of the application provides a ray machine imaging positioning method, which comprises steps S1-S6. Among them:
[0058] Step S1, collecting image information of the center point of the target position.
[0059] Among them, the image information of the center point of the target position is collected by the camera, and the image information of the center point of the target position includes image depth data and pixel coordinates.
[0060] As Figure 3 shown, the camera coordinate system is established with the camera optical center point O as its origin. , , ), shaft and The axes are parallel to the long and short sides of the image plane, respectively. The optical axis is the camera's optical axis and is perpendicular to the imaging plane. The intersection of the optical axis and the image plane is the principal point O' of the image, and OO' is the camera imaging distance. (Camera coordinate system...) , , The overall coordinate system is a Cartesian left-handed coordinate system with the camera optical center as the origin and the camera optical axis as the Z-axis. The camera optical center and the ray emission point of the ray machine are located on the same x-axis of the same camera coordinate system. Simultaneously, a pixel coordinate system is established with the principal point O' as the origin. , , ).
[0061] Among them, the target location and its center point in the pixel coordinate system are obtained through the target detection algorithm. , , Pixel coordinates under () , , ).
[0062] Step S2: Determine the projection offset of the center point of the target location relative to the camera optical center in the camera coordinate system based on the image information of the camera coordinate system where the camera optical center is located and the center point of the target location.
[0063] exist , In terms of direction, to achieve the best shooting effect, the position of the robotic arm needs to be adjusted so that the target is exactly in the camera coordinate system. On the axis, therefore, the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system is required.
[0064] Specifically, step S2, which involves determining the projection offset of the target's center point relative to the camera's optical center in the camera coordinate system based on the image information of the camera coordinate system containing the camera's optical center and the center point of the target's position, includes steps S201 to S203. Wherein:
[0065] Step S201: Determine the pixel distances between the center point of the target location and the camera focus in the pixel coordinate system according to the pixel coordinates of the center point of the target location and the pixel coordinates of the camera focus in the pixel coordinate system.
[0066] The pixel coordinates of the center point of the target position include the pixel coordinates of the center point of the target position in the x-axis direction and the y-axis direction of the pixel coordinate system respectively. The pixel coordinates of the camera focus point in the pixel coordinate system include the pixel coordinates of the camera focus point in the x-axis direction and the y-axis direction of the pixel coordinate system respectively. The pixel distances of the center point of the target position and the camera focus point in the x-axis direction and the y-axis direction of the pixel coordinate system are determined by the modulus of the pixel coordinates of the center point of the target position and the pixel coordinates of the camera focus point in the same axis direction.
[0067] Step S202, determining the actual distance between the camera optical center and the center point of the target position in the z-axis direction of the camera coordinate system according to the image depth data of the center point of the target position.
[0068] Step S203, determining the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system according to the preset image shooting attribute of the camera, the pixel distance and the actual distance, and the projection offset is:
[0069] =( )
[0070] =( )
[0071] In the formula, , are the projection offsets of the center point of the target position relative to the camera optical center in the x-axis direction and the y-axis direction of the camera coordinate system respectively, is the actual distance between the camera optical center and the center point of the target position in the z-axis direction of the camera coordinate system, is the focal length of the camera, , are the pixel distances of the center point of the target position and the camera focus point in the x-axis direction and the y-axis direction of the pixel coordinate system respectively, is the imaging width size ratio of the camera, wherein
[0072] /
[0073] In the formula, is the sensor width of the camera, is the imaging photo width of the camera.
[0074] Step S3, compensating the projection offset according to the relative position relationship between the camera optical center and the ray emitting point of the ray machine, to obtain a first position adjustment vector, wherein the first position adjustment vector is the position adjustment vector of the ray emitting point in the x-axis direction and the y-axis direction of the camera coordinate system, and the target position is located in the z-axis direction of the camera coordinate system.
[0075] Specifically, step S3 includes:
[0076] Step S301, determining the offset of the camera optical center in the x-axis direction and the y-axis direction of the ray emitting point of the ray machine according to the relative position relationship between the camera optical center and the ray emitting point of the ray machine in the camera coordinate system.
[0077] Step S302, compensating the projection offset according to the offset of the camera optical center in the x-axis direction and the y-axis direction of the ray emitting point of the ray machine, to obtain a first position adjustment vector.
[0078] It should be noted that since the target position is fixed, the position of the mechanical arm can be swung, and the position of the ray emitting point of the camera and the ray machine mounted on the mechanical arm is not at one place, assuming that the offset of the camera optical center relative to the position of the ray emitting point of the ray machine in the plane is (x, y), wherein x is the offset in the x-axis direction of the camera coordinate system, and y is the offset in the y-axis direction of the camera coordinate system, and x and y are positive values, indicating that the offset is in the positive direction of the number axis, and x and y are negative values, indicating that the offset is in the negative direction of the number axis, then the final adjustment result of the mechanical arm is that the controller outputs a control signal to adjust the mechanical arm to move in the vector of (x, y) in the coordinate system. O The offset of the camera optical center relative to the position of the ray emitting point of the ray machine in the plane is (x, y), wherein x is the offset in the x-axis direction of the camera coordinate system, and y is the offset in the y-axis direction of the camera coordinate system, and x and y are positive values, indicating that the offset is in the positive direction of the number axis, and x and y are negative values, indicating that the offset is in the negative direction of the number axis, then the final adjustment result of the mechanical arm is that the controller outputs a control signal to adjust the mechanical arm to move in the vector of (x, y) in the coordinate system. 、 ), wherein x and y are positive values, indicating that the offset is in the positive direction of the number axis, and x and y are negative values, indicating that the offset is in the negative direction of the number axis. 、 , 、 , , 、 ,
[0079] Step S4, after updating the current position of the ray emitting point according to the first position adjustment vector, determining the relative distance constraint between the ray emitting point after updating the current position and the target position and the best focal length of the ray machine according to the ray penetration restriction of the ray machine.
[0080] It should be noted that the first position adjustment vector is the position adjustment vector of the ray emitting point in the x-axis direction and the y-axis direction of the camera coordinate system, and the target position is located in the z-axis direction of the camera coordinate system. After updating the current position of the ray emitting point according to the first position adjustment vector, it is also necessary to adjust to a suitable distance in the vertical direction to take a photo that meets the penetration process requirements.
[0081] When the ray penetrates the fitting, the quality of the ray imaging is related to the type and energy of the ray source, the focal length, the exposure (time), and the penetration method, etc. When the shooting object is a tension clamp of a power transmission line, assuming that the parameters of the ray machine are selected as follows: energy (tube voltage 270 kV), exposure time (about 3 s), pulse number (varies with the thickness of the clamp pipe wall, generally 8-15 pulses), penetration method (straight seam single wall penetration, as shown below Figure 4 ), ray detection technology level (B level).
[0082] According to the current JB / T 4730 standard, to meet the ray penetration process and achieve better imaging, the penetration distance needs to be well controlled. The penetration distance (the distance from the focal point to the pipe wall near the ray machine side of the clamp) , the focal point size , and the thickness of the penetration target (regarded as the outer diameter of the tension clamp) should meet the relationship shown in Table 1:
[0083] Table 1
[0084]
[0085] Considering that the X-ray detection of the tension clamp belongs to B-level detection, the positions of the ray emission points of the ray machine mounted on the camera and the mechanical arm are not the same in the axis, and there is a deviation , where is positive, indicating a positive deviation to the positive axis, and negative, indicating a negative deviation to the negative axis. Therefore, it is necessary to ensure that the penetration distance satisfies ≥ 15 , so the relative distance constraint between the ray emission point after updating the current position and the target position needs to be determined according to the ray penetration limit of the ray machine.
[0086] In one example, the minimum relative distance between the ray emission point and the target position is determined according to the offset of the camera optical center and the ray emission point in the z-axis direction of the camera coordinate system, the focal point size of the ray machine, and the penetration thickness, and the minimum relative distance is:
[0087] 15 +
[0088] In the formula, is the minimum relative distance, is the focal point size of the ray machine, is the target penetration thickness, is the offset of the camera optical center and the ray emission point in the z-axis direction of the camera coordinate system.
[0089] The target penetration thickness is the maximum outer diameter of the target.
[0090] Meanwhile, in order to obtain high-quality radiographic film, it is necessary to minimize the geometric unsharpness when taking a photograph. For a given focal spot size and a line holder with a known thickness before shooting, reducing the geometric unsharpness requires increasing the distance from the focal spot to the imaging plate. On the other hand, in order to avoid the increase of inherent unsharpness, it is necessary to keep the tube voltage of the radiographic machine low while increasing the exposure time. Therefore, the optimal focal length of the radiographic machine from the radiographic emission point to the target position after updating the current position is determined according to the radiographic exposure limit of the radiographic machine, and the optimal focal length is:
[0091]
[0092] wherein, is the optimal focal length, is the inherent unsharpness.
[0093] Step S5, determining a second position adjustment vector of the radiographic emission point according to the optimal focal length of the radiographic machine under the relative distance constraint, the second position adjustment vector being a position adjustment vector of the radiographic emission point in the z-axis direction of the camera coordinate system.
[0094] wherein, the process of updating the current position of the radiographic emission point according to the second position adjustment vector in step S5 includes steps S501-S503. Wherein:
[0095] Step S501, determining an actual focal length according to the optimal focal length and a preset safety margin coefficient.
[0096] wherein, in actual application, in order to avoid long exposure time, the optimal focal length is compensated by setting a safety margin coefficient in the actual shooting process. In a general example, the safety margin coefficient can be 0.7.
[0097] Step S502, determining the offset of the radiographic emission point in the z-axis direction of the camera coordinate system according to the actual focal length, the actual distance between the camera optical center and the center point of the target position in the z-axis direction of the camera coordinate system, the offset of the camera optical center and the radiographic emission point in the z-axis direction of the camera coordinate system, and the target exposure thickness. The offset of the radiographic emission point in the z-axis direction of the camera coordinate system is:
[0098]
[0099] wherein, is the offset of the radiographic emission point in the z-axis direction of the camera coordinate system, is a preset safety margin coefficient, wherein, .
[0100] It should be noted that the offset of the radiographic emission point in the z-axis direction of the camera coordinate system needs to satisfy the relative distance constraint When < , the offset of the ray emitting point in the z-axis direction of the camera coordinate system should be equal to the minimum relative distance .
[0101] Step S503, updating the current position of the ray emitting point according to the offset of the ray emitting point in the z-axis direction of the camera coordinate system.
[0102] wherein the position of the ray emitting point in the z-axis direction is adjusted according to the offset of the ray emitting point in the z-axis direction of the camera coordinate system, so that the controller outputs a control signal to adjust the vector of the movement of the mechanical arm in the coordinate system (0, 0, ).
[0103] Step S6, updating the current position of the ray emitting point according to the second position adjustment vector, and shooting the target position by the ray machine at the updated current position of the ray emitting point, and generating a target ray image corresponding to the target position.
[0104] It should be noted that the present application uses the position of the camera to assist in calculating the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system by using the image information obtained by the camera, and compensating the projection offset by the relative position relationship between the camera optical center and the ray emitting point of the ray machine, so as to obtain the first position adjustment vector to adjust the position of the ray emitting point of the ray machine in the x-axis direction and the y-axis direction of the camera coordinate system, and to meet the ray penetration limit of the ray machine by the relative distance constraint of the target position and the best focal length of the ray machine, so as to determine the second position adjustment vector to adjust the position of the ray emitting point in the z-axis direction of the camera coordinate system, so as to accurately position the shooting position of the ray machine, and better shoot the target position area, and improve the imaging quality and the shooting efficiency.
[0105] Based on the same inventive concept, the present application also provides a ray machine imaging positioning system for implementing the above-mentioned ray machine imaging positioning method.
[0106] The implementation scheme for solving the problem provided by the system is similar to the implementation scheme described in the above method, so the specific limitations in one or more ray machine imaging positioning system embodiments provided below can refer to the limitations of the ray machine imaging positioning method in the above text, which will not be repeated here.
[0107] As Figure 5 shown, the present application also provides a ray machine imaging positioning system, which comprises:
[0108] Image acquisition module 100 is used to acquire image information of the center point of the target location;
[0109] The projection offset calculation module 200 is used to determine the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system based on the image information of the camera coordinate system where the camera optical center is located and the center point of the target position.
[0110] The first vector determination module 300 is used to compensate for the projection offset based on the relative positional relationship between the camera optical center and the ray emission point of the ray machine, and obtain the first position adjustment vector. The first position adjustment vector is the position adjustment vector of the ray emission point in the x-axis direction and y-axis direction in the camera coordinate system, and the target position is located in the z-axis direction in the camera coordinate system.
[0111] The focal length determination module 400 is used to determine the relative distance constraint between the updated current position of the ray emission point and the target position, as well as the optimal focal length of the ray machine, based on the ray penetration limit of the ray machine after updating the current position of the ray emission point according to the first position adjustment vector.
[0112] The second vector determination module 500 is used to determine the second position adjustment vector of the ray emission point according to the optimal focal length of the ray machine under relative distance constraints. The second position adjustment vector is the position adjustment vector of the ray emission point in the z-axis direction of the camera coordinate system.
[0113] The imaging module 600 is used to update the current position of the ray emission point according to the second position adjustment vector, and under the updated current position of the ray emission point, to capture the target position through the ray machine and generate the target ray image corresponding to the target position.
[0114] like Figure 6 As shown, this embodiment of the invention also provides an electronic device. The electronic device 10 includes a memory 20 and a processor 30. The memory 20 stores a computer program. When the computer program is executed by the processor 30, the processor 30 performs the steps of the X-ray machine imaging positioning method as described in any of the above embodiments.
[0115] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed, implements the steps of the X-ray machine imaging positioning method as described in any of the above embodiments.
[0116] This invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer performs the steps of the X-ray machine imaging positioning method as described in any of the above embodiments.
[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, the electronic device, the computer storage medium and the computer program product described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0118] It should be noted that the terms "first", "second", and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0119] In several embodiments provided by the present application, it can be understood that each block in the flowchart or block diagram can represent a module, a program segment or a part of code, and the module, the program segment or the part of code include one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order from that noted in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can also be executed in reverse order, depending on the functions involved.
[0120] In several embodiments provided by the present application, it should be understood that the disclosed system, electronic device, computer storage medium, computer program product and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other form.
[0121] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0122] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0123] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the entire or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for executing all or part of the steps of the method described in each embodiment of the present application by a computer device (which can be a personal computer, a server, or a network device, etc.). The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (English full name: Read-Only Memory, English abbreviation: ROM), a random access memory (English full name: Random Access Memory, English abbreviation: RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0124] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. A method for positioning images in a X-ray machine, characterized in that, The method comprises the following steps: acquiring image information of a center point of a target position; determining a projection offset of the center point of the target position relative to a camera optical center in a camera coordinate system according to the camera optical center and the image information of the center point of the target position, wherein the image information of the center point of the target position comprises image depth data and pixel coordinates; the step of determining the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system according to the camera optical center and the image information of the center point of the target position comprises: determining pixel distances of the center point of the target position and the camera focal point in x-axis and y-axis directions of a pixel coordinate system respectively according to the pixel coordinates of the center point of the target position and pixel coordinates of the camera focal point in the pixel coordinate system; determining an actual distance of the camera optical center and the center point of the target position in a z-axis direction of the camera coordinate system according to the image depth data of the center point of the target position; determining the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system according to preset image shooting attributes of the camera, the pixel distances and the actual distance, wherein the projection offset is: =( ) ; =( ) ; In the formula, , are the projection offset of the center point of the target position relative to the optical center of the camera in the x-axis direction and the y-axis direction of the camera coordinate system, respectively, is the actual distance of the optical center of the camera and the center point of the target position in the z-axis direction of the camera coordinate system, is the focal length of the camera, , are the pixel distances of the center point of the target position and the camera focus point in the x-axis direction and the y-axis direction of the pixel coordinate system, respectively, is the imaging width size ratio of the camera, wherein, / ; wherein is the sensor width of the camera, is the imaging photo width of the camera; compensating the projection offset according to a relative position relationship between the camera optical center and a ray emitting point of a ray machine to obtain a first position adjustment vector, wherein the first position adjustment vector is a position adjustment vector of the ray emitting point in x-axis and y-axis directions of the camera coordinate system, and the target position is located in a z-axis direction of the camera coordinate system; updating a current position of the ray emitting point according to the first position adjustment vector, and then determining a relative distance constraint between the ray emitting point and the target position after the current position is updated and an optimal focal length of the ray machine according to the ray machine; determining a second position adjustment vector of the ray emitting point according to the optimal focal length of the ray machine under the relative distance constraint, wherein the second position adjustment vector is a position adjustment vector of the ray emitting point in the z-axis direction of the camera coordinate system; updating the current position of the ray emitting point according to the second position adjustment vector, and then shooting the target position by the ray machine at the updated current position of the ray emitting point, and generating a target ray image corresponding to the target position.
2. The radiographic positioning method of claim 1, wherein, the step of compensating the projection offset according to the relative position relationship between the camera optical center and the ray emitting point of the ray machine to obtain the first position adjustment vector, wherein the first position adjustment vector is a position adjustment vector of the ray emitting point in x-axis and y-axis directions of the camera coordinate system, comprises: determining offset amounts of the camera optical center relative to the ray emitting point of the ray machine in x-axis and y-axis directions respectively according to the relative position relationship between the camera optical center and the ray emitting point of the ray machine in the camera coordinate system; According to the offset of the camera optical center in the x-axis direction and the y-axis direction of the ray emitting point of the ray machine, the projection offset is compensated to obtain the first position adjustment vector.
3. The method of claim 1, wherein, According to the ray exposure limit of the ray machine, the step of determining the relative distance constraint between the ray emitting point after updating the current position and the target position comprises: According to the offset of the camera optical center and the ray emitting point in the z-axis direction of the camera coordinate system, the focal point size and the exposure thickness of the ray machine, the minimum relative distance between the ray emitting point and the target position is determined, and the minimum relative distance is: 15 + ; wherein is the minimum relative distance, is the focal spot size of the ray machine, is the target transillumination thickness, is the offset of the camera optical center and the z-axis direction of the ray emission point in the camera coordinate system.
4. The method of claim 3, wherein, According to the ray exposure limit of the ray machine, the optimal focal length of the ray machine between the ray emitting point after updating the current position and the target position is determined, and the optimal focal length is: ; wherein is the best focus, is the intrinsic unsharpness.
5. The method of claim 4, wherein, The step of updating the current position of the ray emitting point according to the second position adjustment vector comprises: According to the optimal focal length and the preset safety margin coefficient, the actual focal length is determined; According to the actual focal length, the actual distance between the camera optical center and the center point of the target position in the z-axis direction of the camera coordinate system, the offset of the camera optical center and the ray emitting point in the z-axis direction of the camera coordinate system, and the target exposure thickness, the offset of the ray emitting point in the z-axis direction of the camera coordinate system is determined, and the offset of the ray emitting point in the z-axis direction of the camera coordinate system is: ; In the formula, is an offset of the ray emitting point in the z-axis direction of the camera coordinate system, is a preset safety margin coefficient, wherein, ; According to the offset of the ray emitting point in the z-axis direction of the camera coordinate system, the current position of the ray emitting point is updated.
6. A radiographic imaging positioning system, characterized by, Comprise: The image acquisition module is used for acquiring image information of the center point of the target position; The projection offset calculation module is used for determining the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system according to the camera coordinate system where the camera optical center is located and the image information of the center point of the target position; The image information of the center point of the target position comprises image depth data and pixel coordinates; According to the camera coordinate system where the camera optical center is located and the image information of the center point of the target position, the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system is determined, which comprises: According to the pixel coordinates of the center point of the target position and the pixel coordinates of the camera focal point in the pixel coordinate system, the pixel distance of the center point of the target position and the camera focal point in the x-axis direction and the y-axis direction of the pixel coordinate system is determined; According to the image depth data of the center point of the target position, the actual distance between the camera optical center and the center point of the target position in the z-axis direction of the camera coordinate system is determined; According to the preset image shooting attribute of the camera, the pixel distance and the actual distance, the projection offset of the center point of the target position relative to the camera optical center in the camera coordinate system is determined, and the projection offset is: =( ) ; =( ) ; In the formula, , are the projection offset of the center point of the target position relative to the camera optical center in the x-axis direction and the y-axis direction of the camera coordinate system, respectively, is the actual distance of the camera optical center and the center point of the target position in the z-axis direction of the camera coordinate system, is the focal length of the camera, , are the pixel distances of the center point of the target position and the camera focal point in the x-axis direction and the y-axis direction of the pixel coordinate system, respectively, is the imaging width size ratio of the camera, wherein, / ; wherein is the sensor width of the camera, is the imaging photo width of the camera; The first vector determination module is configured to compensate the projection offset according to a relative position relationship between a camera optical center and a ray emitting point of the ray machine, to obtain a first position adjustment vector, wherein the first position adjustment vector is a position adjustment vector of the ray emitting point in an x-axis direction and a y-axis direction of the camera coordinate system, and the target position is located in a z-axis direction of the camera coordinate system; The focal length determination module is configured to update the current position of the ray emitting point according to the first position adjustment vector, and determine a relative distance constraint between the ray emitting point after the current position is updated and the target position and an optimal focal length of the ray machine according to a ray penetration limitation of the ray machine; The second vector determination module is configured to determine a second position adjustment vector of the ray emitting point according to the optimal focal length of the ray machine under the relative distance constraint, and the second position adjustment vector is a position adjustment vector of the ray emitting point in the z-axis direction of the camera coordinate system; The shooting imaging module is configured to update the current position of the ray emitting point according to the second position adjustment vector, and shoot the target position through the ray machine at the updated current position of the ray emitting point, and generate a target ray image corresponding to the target position.
7. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the ray machine imaging positioning method in any one of claims 1 to 5.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed to implement the steps of the ray machine imaging positioning method in any one of claims 1 to 5.
9. A computer program product, characterised in that, The computer program product includes a computer program stored on a non-transitory computer readable storage medium, and the computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer executes the steps of the ray machine imaging positioning method in any one of claims 1 to 5.
Citation Information
Patent Citations
Posture adjustment method and device, electronic equipment and computer readable storage medium
CN115115547A
Positioning method and device for scanning electron microscope, electronic equipment and storage medium
CN115616018A