An image processing method and system based on X-ray backscattering
By controlling the relative position and motion state of the shifting device and the target object, the stability of backscattered data acquisition is ensured, and the data deviation problem caused by mechanical reverse gap is solved, and efficient and accurate image generation is achieved.
Patent Information
- Application Number
- CN202510653252.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-05-21
AI Technical Summary
The prior art affects the accuracy and stability of the detection results due to mechanical reverse gaps in batch object detection.
By controlling the shifting device to drive the backscatter detection device to move, ensuring that the speed difference between it and the target object is within a predetermined range, and real-time monitoring and deletion of collected data affected by the reverse gap, the preset pixel unit identification relationship is used to generate an image of the target object.
It improves the accuracy and stability of the detection results, reduces the amount of complex image correction calculations, and improves the efficiency and clarity of image processing.
Smart Images

Figure CN120182261B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image processing, and in particular to an image processing method and system based on X-ray backscattering. Background Art
[0002] X-ray backscatter imaging, an advanced nondestructive testing technology, captures and analyzes photons scattered from an object to create an image of its internal structure. This technology has shown tremendous potential in fields such as materials science and safety inspection.
[0003] During security inspections, in order to facilitate the detection and imaging of batches of objects, the objects are generally sorted and moved through an inspection area by a conveying device (such as a conveyor belt), where they are inspected by an X-ray backscatter imager.
[0004] Therefore, it is necessary to provide an image processing method and system based on X-ray backscattering to meet the image processing requirements of X-ray backscattering detection of batch objects. Summary of the Invention
[0005] This application provides an image processing method and system based on X-ray backscattering, which is used to solve the problems in the related art. To achieve the above purpose, this application is implemented through the following technical solutions:
[0006] In a first aspect, an image processing method based on X-ray backscattering is provided, comprising:
[0007] controlling the shifting device to drive the backscatter detection device to move so that the speed difference between the backscatter detection device and the target object moving along the preset path is maintained within a predetermined range;
[0008] Acquiring backscattered collected information of the target object using the backscattered detection device, the backscattered collected information including multiple sets of backscattered collected data and their corresponding time stamps; and determining whether the wheel speed data of the shifting device is affected by backlash;
[0009] When affected by the backlash, the backscattered acquisition data in the process of removing the backlash is deleted from the backscattered acquisition information; the backscattered acquisition data not affected by the backlash and its corresponding time mark are used as the target backscattered acquisition information;
[0010] Based on the target backscattering acquisition information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device.
[0011] The beneficial effect of this embodiment is that by controlling the relative position and motion of the shifting device and the target object, the stability and accuracy of backscatter data acquisition are ensured, thereby improving the reliability of the detection results. The effects of mechanical backlash are monitored and addressed in real time, and dynamic adjustments and data corrections are performed to ensure the integrity and accuracy of the collected data, avoiding data deviations caused by mechanical backlash, and facilitating backscatter measurement and image generation of the target object.
[0012] In one embodiment, the controlling shifting device drives the backscatter detection device to move, including:
[0013] When the target object moves to a predetermined detection area, the shifting device is controlled to drive the backscatter detection device to move in a direction perpendicular to or parallel to the moving direction of the target object according to the positional relationship between the shifting device and the target object.
[0014] The beneficial effect of this embodiment is that when the target object moves to the predetermined detection area, the position of the target object is determined by a sensor or a positioning device set on the target object. The current positional relationship between the displacement device and the target object is analyzed, and the direction and distance that the displacement device needs to move are calculated to ensure that the backscatter detection device can maintain a predetermined distance from the target object's surface to be measured, which is generally the side of the target object. According to the direction of movement of the target object, the displacement device is controlled to drive the backscatter detection device to move in a direction orthogonal or parallel to the direction of movement of the target object. Parallel movement is used to synchronize the detection device with the target object, reducing detection interruptions caused by the movement of the target object; orthogonal movement is used for target objects of different sizes, so that the backscatter detection device is as close as possible to the target object for detection.
[0015] In one embodiment, when the shifting device obtains a driving signal opposite to the current movement direction, it is considered that the wheel speed of the shifting device is affected by the backlash; and deleting the backscattered collected data in the process of removing the backlash from the backscattered collected information includes:
[0016] A preset backlash value is obtained, and a residual gap value is obtained according to the sampling frequency of the wheel speed data and the reverse gap value. When the residual gap value indicates that the reverse gap has been removed, the backscattered acquisition data in the reverse gap removal process is deleted from the backscattered acquisition information, and the remaining backscattered acquisition data and its corresponding time stamp are used as the target backscattered acquisition information.
[0017] The beneficial effect of this embodiment is that by removing backscattered data affected by backlash, image distortion or errors caused by wheel speed distortion are avoided, thereby improving image processing accuracy. Compared with related art methods that use offsets to correct image distortion, this application directly removes the affected data, reducing the complex image correction calculations and improving efficiency. Data unaffected by backlash is used to generate the image, improving image clarity.
[0018] In one embodiment, the method further includes: in the process of acquiring backscattered acquisition information of the target object using the backscatter detection device, when affected by the backlash, adding one to the count;
[0019] When the count is greater than a preset number, the count is reset to zero and the shift device is controlled to drive the backscatter detection device to move to the position of the target object affected by the backlash to obtain the backscatter supplementary information of the target object;
[0020] Based on the target backscatter acquisition information and the backscatter supplementary information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device.
[0021] The beneficial effect of this embodiment is that the counting zeroing and position adjustment mechanism enables the technical solution to automatically cope with the frequent backlash effects, avoids image instability caused by continuous data deviation, and enhances the reliability of the entire image processing process.
[0022] In one embodiment, the control shift device drives the backscatter detection device to move in a direction orthogonal to or parallel to the moving direction of the target object, including:
[0023] Obtain the size data of the target object and the preset correspondence between the object size and the acquisition distance;
[0024] According to the preset corresponding relationship, obtaining a collection distance corresponding to the size data as a target collection distance;
[0025] According to the acquisition distance, controlling the shift device to move in a direction orthogonal to the movement direction of the target object so that the target acquisition distance is met when the backscatter detection device acquires the backscatter acquisition information;
[0026] According to the moving speed of the target object in the predetermined detection area, the shift device is controlled to move in a direction parallel to the moving direction of the target object, so that the speed difference between the backscatter detection device and the target object moving along the preset path when acquiring backscatter acquisition information is maintained within a predetermined range.
[0027] The beneficial effect of this embodiment is that by controlling the movement of the shifting device, the relative position and velocity relationship between the backscatter detection device and the target object is maintained, thereby improving the accuracy of the detection data and reducing detection errors caused by speed differences. The preset corresponding relationship does not require a large amount of computing power for data processing, and the hardware requirements are low.
[0028] In one embodiment, the acquiring of the size data of the target object includes: using a visual recognition device provided on the shifting device to capture a two-dimensional code image provided on a side of the target object close to the shifting device, and acquiring the two-dimensional code information, wherein the two-dimensional code information is used to indicate the size of the target object; the visual recognition device is further used to acquire the coordinate data of the backscattering acquisition data when the backscattering detection device acquires the backscattering acquisition information of the target object;
[0029] The method of resetting the count to zero and controlling the shift device to drive the backscatter detection device to move to the position of the target object affected by the backlash includes: resetting the count to zero and deleting the coordinate data corresponding to the backscatter acquisition data as needed, and controlling the shift device to drive the backscatter detection device to move to the position of the target object affected by the backlash.
[0030] The beneficial effect of this embodiment is that by directly reading the size information in the QR code, the complex size calculation process is avoided. The QR code information is read quickly, and the visual recognition device can complete the acquisition and decoding of the QR code image in a short time, thereby quickly obtaining the size information of the target object and improving the efficiency of subsequent image processing. The size data of the target object can be obtained in the early stage of placement on the conveyor belt, and does not need to be obtained on-site in the predetermined detection area, further reducing the on-site computing power requirements of the predetermined detection area. The coordinate data provides the spatial position information of the target object, and combined with the backscattered signal intensity, an accurate image can be generated.
[0031] In a second aspect, the present application further provides an X-ray backscatter-based image processing system, comprising a shifting device and a backscattering detection device disposed on the shifting device; and further comprising a controller, the controller being communicatively connected to the shifting device and the backscattering device, the controller being configured to:
[0032] controlling the shifting device to drive the backscatter detection device to move so that the speed difference between the backscatter detection device and the target object moving along the preset path is maintained within a predetermined range;
[0033] Acquiring backscattered collected information of the target object using the backscattered detection device, the backscattered collected information including multiple sets of backscattered collected data and their corresponding time stamps; and determining whether the wheel speed data of the shifting device is affected by backlash;
[0034] When affected by the backlash, the backscattered acquisition data in the process of removing the backlash is deleted from the backscattered acquisition information; the backscattered acquisition data not affected by the backlash and its corresponding time mark are used as the target backscattered acquisition information;
[0035] Based on the target backscattering acquisition information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device.
[0036] In one embodiment, the controlling shifting device drives the backscatter detection device to move, including:
[0037] When the target object moves to a predetermined detection area, the shifting device is controlled to drive the backscatter detection device to move in a direction perpendicular to or parallel to the moving direction of the target object according to the positional relationship between the shifting device and the target object.
[0038] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above-described methods when the computer program is executed by at least one processor.
[0039] In a fourth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by at least one processor, it implements the steps of any of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The present application is further described below with reference to the accompanying drawings and examples.
[0041] Figure 1 A flow chart of an image processing method based on X-ray backscattering provided in an embodiment of the present application is shown.
[0042] Figure 2 A schematic diagram of a process of controlling a shift device to drive a backscatter detection device to move is shown in an embodiment of the present application.
[0043] Figure 3 A flow chart of another image processing method based on X-ray backscattering provided in an embodiment of the present application is shown.
[0044] Figure 4 A structural block diagram of an image processing system provided in an embodiment of the present application is shown.
[0045] Figure 5 A schematic structural diagram of a computer program product provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0046] To facilitate understanding of the present invention, the present invention will be described more fully below with reference to the accompanying drawings. The accompanying drawings illustrate preferred embodiments of the present invention. However, the present invention may be implemented in many other forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the present disclosure.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0048] First, the application scenarios of the technical solution of this application are explained.
[0049] The backscatter detection device in related art consists of a scanning device body and a display terminal. The scanning device body includes a flying spot X-ray machine, a detector module, a control module, and an image processing module. The display terminal, for example a tablet computer, is integrated with the scanning device body and displays detector status information in real time. It calculates correction coefficients based on the raw data and returns them to the control module. It then corrects the uploaded scan data and displays the final scanned image.
[0050] Flying spot X-ray machines emit a pencil-shaped X-ray beam, scanning the object point by point and acquiring corresponding position information. The energy and intensity of the emitted X-rays determine the instrument's detection depth and the strength of the backscattered signal. The shape and size of the emitted spot directly affect the spatial resolution of the image.
[0051] The detector module includes a scintillator that converts scattered X-rays into fluorescent photons, a photoelectric conversion device that converts fluorescent photons into electrical signals, supporting circuits and the internal structure of the detector.
[0052] The control module distributes power to the entire device and receives user commands from the display terminal via Wi-Fi or Ethernet. It saves or uploads calibration data, controls the optical engine and motor, receives and processes external control signals, collects and processes detector signals, uploads scan data to the tablet, and monitors and periodically uploads the status of core components. The image processing module, using a tablet computer (Pad), displays detector status information in real time, calculates calibration coefficients based on the raw data, and returns them to the control module. It then calibrates the uploaded scan data and displays the final scanned image.
[0053] In this case, the operator must operate the scanner, hold down the scan button, and move the scanner at a constant speed across the surface of the object being inspected at the recommended speed. During the scan, the display terminal displays the current image of the object's interior in real time. However, this requires the operator to carry the backscatter detection device with them during movement. If batches of objects are being sorted and moved through the inspection area for inspection, jitter is likely to occur, affecting the stability of the final image quality.
[0054] At the same time, in order to achieve the detection of objects moving through the detection area by an X-ray backscatter imager, related technologies, such as the X-ray backscatter image deformation correction method disclosed in application number CN202211613877.9, use a trajectory recording module located on the object to be inspected and triggered synchronously with the backscatter scanning module to obtain the backscatter instrument scanning path trajectory, and then obtain the offset of each column of pixels to correct the image. Although a trackball is set close to the scanning surface of the object to be inspected to alleviate image distortion caused by shaking when a person carries the backscatter detection device, it still cannot get rid of the current situation of manually carrying the scanning body for scanning. In addition, the image deformation correction calculation based on the offset is relatively complex.
[0055] The technical solution provided by this application differs from related technologies in that the scanning device itself serves as the backscatter detection device and is mounted on a shifting mechanism. Therefore, it does not need to be carried by personnel, fundamentally avoiding image distortion caused by human movement. Furthermore, the display terminal (hereinafter referred to as the user equipment) is located separately from the backscatter detection device, making it easier for personnel to view the acquired images.
[0056] In addition, multiple objects are sorted and moved through the detection area by a conveyor device, and the object currently passing through the detection area is regarded as the target object. Under ideal conditions, the target object will move at a constant speed on the transmission device, but in reality, the target object's moving speed fluctuates due to objective factors such as the shaking of the conveyor belt, the irregular shape of the object, and the uneven distribution of the object's weight.
[0057] The shifting device includes a drive mechanism for driving its movement. To improve the control accuracy of the shifting device, the drive mechanism includes a drive motor and a reducer, and a code disk for obtaining wheel speed data is set on the reducer. To compensate for speed fluctuations when the target object moves, the shifting device will adjust the operating speed (re-plan the path). Due to the machining accuracy of the reducer gears, a backlash is generated when switching between forward and reverse directions. The backlash makes the wheel speed data inaccurate (for example, due to the existence of the backlash, the wheel speed has been reduced, but the ferry data obtained by the code disk still meets the predetermined range requirements mentioned below), thereby affecting the accuracy of image processing.
[0058] The technical solution provided by this application detects objects as they are arranged and moved through a detection area using a shifting device and an X-ray backscatter imager. This removes backscatter data affected by backlash, avoiding data deviations caused by mechanical backlash and facilitating backscatter measurement and image generation of target objects. The following describes the method first, followed by a description of the system.
[0059] Method embodiment.
[0060] See also Figure 1 , Figure 1 The following is a flow chart of an image processing method based on X-ray backscattering provided in an embodiment of the present application. The method includes:
[0061] S101, controlling the shifting device to move the backscatter detection device (and continuously acquiring wheel speed data using the encoder) so that the speed difference between the backscatter detection device and a target object moving along a preset path remains within a predetermined range (e.g., 0.08 m / s to 0.15 m / s);
[0062] The backscatter detection device is driven by the control of the displacement device, while simultaneously acquiring wheel speed data. The speed difference between the displacement device's movement speed and the target object's movement speed is controlled within a predetermined range. This speed matching ensures a stable relative position between the backscatter detection device and the target object, thereby improving the accuracy of the collected data. The displacement device, for example, an automated guided vehicle (AGV), includes a drive mechanism for its movement, which has been described above and will not be repeated here. It also includes a sensor device, a communication device, and a controller. The sensor device includes a visual recognition device, which includes a 2D vision sensor capable of analyzing surfaces and contours and reading codes (QR codes). The visual recognition device can communicate with the controller via an IO-Link port, allowing the sensor to transmit various parameters to the controller to determine the distance (positional relationship) between the displacement device and the target object. It can be assumed that when the target object is transported to the target location, the displacement device is controlled to drive the backscatter detection device to move and collect information. During the collection process, the target object can slow down and pass the target location at a constant speed.
[0063] S102, using the backscatter detection device to obtain backscatter collected information of the target object, the backscatter collected information including multiple sets of backscatter collected data and their corresponding time stamps; and simultaneously determining whether the wheel speed data of the shifting device is affected by backlash;
[0064] This step uses a backscatter detection device to obtain backscatter information of the target object, which includes multiple sets of backscatter data and their corresponding time stamps, and determines whether it is affected by backlash.
[0065] S103, when affected by the backlash, deleting the backscattered acquisition data in the process of removing the backlash from the backscattered acquisition information; and using the backscattered acquisition data not affected by the backlash and its corresponding time stamp as the target backscattered acquisition information;
[0066] In this step, when backlash is detected, the affected backscatter data is automatically deleted, ensuring that the remaining data is unaffected by backlash and serves as the target backscatter data. This dynamic data screening eliminates the impact of mechanical backlash on the accuracy of the data used for image processing.
[0067] S104: Based on the target backscattering acquisition information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device.
[0068] In this step, based on the target backscattering information, the collected data is converted into an image of the target object according to a preset pixel unit identification relationship, and the image is sent to the user device, such as a laptop computer or tablet computer.
[0069] Among them, the preset pixel unit identification relationship refers to the process of mapping backscattered acquisition data to image pixels, including the following aspects: spatial resolution relationship, which is used to define the actual physical space size represented by each pixel; grayscale value mapping relationship, which is used to convert the backscattered signal intensity into the grayscale value of the image; time and position synchronization relationship, which is used to ensure the correspondence between data and image pixels based on the time mark and coordinates of the backscattered data.
[0070] The process of acquiring an image of a target object according to a preset pixel unit recognition relationship can be:
[0071] First, the target backscatter data is de-noised and smoothed, and the backscatter signal intensity is normalized to a specific range (e.g., 0 to 255, corresponding to an 8-bit grayscale image). Time alignment is then performed based on the time stamp to ensure data order and integrity. The actual physical space represented by each pixel is calculated based on the detection device's movement speed and sampling frequency. A linear or nonlinear mapping function is used to map the backscatter signal intensity to a grayscale value range (0 to 255). The processed data is arranged according to pixel-by-pixel recognition. Using a visual recognition device, each target backscatter data point is also associated with the corresponding coordinate position of the target object. A complete two-dimensional image is formed based on the coordinate positions corresponding to each target backscatter data point.
[0072] The technical solution provided by this embodiment ensures the stability of the relative position between the backscatter detection device and the target object by controlling the speed difference between the shifting device and the target object, thereby improving the accuracy of the collected data. The backscatter collected data affected by the backlash is removed, and image distortion or error caused by wheel speed data distortion is avoided, which significantly improves the accuracy of image processing. Compared with the method of correcting image deformation by offset in the related art, the present application directly eliminates the affected data, reduces the complex image correction calculation amount, and improves the image processing efficiency. The real-time monitoring and judgment mechanism ensures a rapid response and accurate identification of the influence of the backlash, and the independent drive design of the shifting device avoids the jitter problem when the staff carries the equipment, further improving the stability of information acquisition. The real-time monitoring and processing of the influence of mechanical backlash ensures the accuracy of the collected data through dynamic adjustment, avoids the data deviation caused by mechanical backlash, and is conducive to backscatter measurement and image generation of the target object.
[0073] In one embodiment, the controlling shifting device drives the backscatter detection device to move, including:
[0074] When the target object moves to a predetermined detection area, the shifting device is controlled to drive the backscatter detection device to move in a direction perpendicular to or parallel to the moving direction of the target object according to the positional relationship between the shifting device and the target object.
[0075] That is, when the target object moves to the predetermined detection area, the target object's position is determined by a sensor or a positioning device installed on the target object. The current positional relationship between the displacement device and the target object is analyzed, and the direction and distance the displacement device needs to move are calculated to ensure that the backscatter detection device can maintain a predetermined distance from the target object's surface to be measured, which is generally the side of the target object. Based on the target object's direction of movement, the displacement device is controlled to drive the backscatter detection device to move in a direction orthogonal or parallel to the target object's direction of movement. Parallel movement allows the detection device to move synchronously with the target object, reducing detection interruptions caused by target object movement. Orthogonal movement is used for targets of different sizes, allowing the backscatter detection device to be as close to the target object as possible for detection.
[0076] In one embodiment, when the shifting device obtains a driving signal opposite to the current movement direction, it is considered that the wheel speed of the shifting device is affected by the backlash; and deleting the backscattered collected data in the process of removing the backlash from the backscattered collected information includes:
[0077] A preset backlash value is obtained, and a residual gap value is obtained according to the sampling frequency of the wheel speed data and the reverse gap value. When the residual gap value indicates that the reverse gap has been removed, the backscattered acquisition data in the reverse gap removal process is deleted from the backscattered acquisition information, and the remaining backscattered acquisition data and its corresponding time stamp are used as the target backscattered acquisition information.
[0078] The shifting device's drive mechanism includes a drive motor and a reducer. When the reducer gears switch between forward and reverse directions, reverse clearance may occur due to machining accuracy issues. This reverse clearance can cause temporary distortion of the wheel speed data, thereby affecting the accuracy of backscatter acquisition data for image processing. To accurately determine whether the wheel speed is affected by reverse clearance, the reverse clearance value is first obtained. The reverse clearance value reflects the maximum deviation that may occur when the gears switch between forward and reverse directions. When it is detected that the wheel speed of the shifting device is affected by reverse clearance, the current remaining reverse clearance value is recorded and continuously monitored until the reverse clearance is completely eliminated. In other words, during the reverse clearance removal process, the backscatter acquisition data affected by the reverse clearance is automatically identified and deleted, ensuring that the information ultimately retained is not interfered with by the reverse clearance. The backscatter acquisition data not affected by the reverse clearance and its corresponding time stamp are used as the target backscatter acquisition information for subsequent image generation and analysis.
[0079] By removing backscattered data affected by backlash, image distortion or errors caused by wheel speed distortion are avoided, improving image processing accuracy. Compared to related art methods that use offsets to correct image distortion, this application directly removes affected data, reducing the complexity of image correction calculations and improving efficiency. Data unaffected by backlash is used to generate the image, improving image clarity.
[0080] A drive signal opposite to the current direction of motion can control the shifting device to move in the opposite direction. This is generally caused by adjustments to the control path planning of the shifting device. It is worth noting that in this application, the wheel speed data for reverse clearance calculation is obtained using a code disk (located at the output shaft position) installed on the reducer. This is because it is more accurate at low speeds than an IMU, which is susceptible to noise, drift, and environmental factors. The data processing is complex and prone to errors.
[0081] In one embodiment, the method further comprises: in the process of acquiring backscattering acquisition information of the target object using the backscattering detection device, when affected by the backlash, adding one to the count;
[0082] When the count is greater than a preset number, the count is reset to zero and the shift device is controlled to drive the backscatter detection device to move to the position of the target object affected by the backlash to obtain the backscatter supplementary information of the target object;
[0083] Based on the target backscatter acquisition information and the backscatter supplementary information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device.
[0084] While acquiring backscattered information from a target object using a backscatter detection device, real-time monitoring is performed to determine if it is affected by backlash. Each time backlash is detected, a counter is incremented to record the frequency of backlash. When the count exceeds a preset number (e.g., 3 or 4), indicating that the frequency of backlash is too high, the counter is reset to zero and the shifting device is controlled to move the backscatter detection device to the location of the target object affected by backlash. Backscattered information from that location is then reacquired to supplement data that may have been skipped due to backlash. It is believed that deleting backscattered data due to a small amount of backlash does not affect pipelined target object image processing and human review. Instead, deleting low-quality data improves image processing efficiency. This embodiment addresses the situation where excessive data is deleted. After the shifting device moves to the affected location, the backscatter detection device reacquires supplemental backscattered information from the target object. Based on the original target backscattered information and the newly acquired supplemental backscattered information, an image of the target object is generated according to a preset pixel-by-pixel recognition relationship. The generated image is then sent to the user device for human review and analysis.
[0085] Therefore, the counting zeroing and position adjustment mechanism enables the technical solution to automatically cope with the frequent backlash effects, avoid image instability caused by continuous data deviation, and enhance the reliability of the entire image processing process.
[0086] See also Figure 2 , Figure 2 A schematic diagram of a process of controlling a shift device to drive a backscatter detection device to move is shown in an embodiment of the present application.
[0087] In one embodiment, the control shift device drives the backscatter detection device to move in a direction orthogonal to or parallel to the moving direction of the target object, including:
[0088] S201, obtaining the size data of the target object and the preset correspondence between the object size and the acquisition distance;
[0089] S202, according to the preset corresponding relationship, obtaining a collection distance corresponding to the size data as a target collection distance;
[0090] S203, controlling the shift device to move in a direction orthogonal to the moving direction of the target object according to the acquisition distance, so that the target acquisition distance is met when the backscatter detection device acquires the backscatter acquisition information;
[0091] S204, based on the moving speed of the target object in the predetermined detection area, controlling the shift device to move in a direction parallel to the moving direction of the target object, so that the speed difference between the backscatter detection device and the target object moving along the preset path when acquiring backscatter acquisition information remains within a predetermined range.
[0092] Dimensional data includes length, width, and height values. Based on the preset correspondence between the target object's size and the acquisition distance, the target acquisition distance corresponding to the target object's size data is determined. The preset correspondence is derived through experimentation to ensure the optimal detection effect at that distance. Based on the target acquisition distance, the shift device is controlled to move in a direction orthogonal to the target object's direction of motion (or trajectory), ensuring that the backscatter detection device maintains the target acquisition distance from the target object during detection, thereby improving the accuracy of the detection data. Then, based on the target object's movement speed within the predetermined detection area, the shift device is controlled to move in a direction parallel to the target object's direction of motion (direction of the trajectory), ensuring that the speed difference between the backscatter detection device and the target object remains within a predetermined range during detection, thereby reducing detection errors caused by speed differences.
[0093] By controlling the movement of the shifting device, the relative position and velocity relationship between the backscatter detection device and the target object is maintained, thereby improving the accuracy of the detection data and reducing detection errors caused by speed differences. This preset correspondence eliminates the need for high computing power and reduces hardware requirements.
[0094] In one embodiment, the obtaining of the size data of the target object includes: using a visual recognition device provided on the shifting device to capture a two-dimensional code image provided on a side of the target object close to the shifting device, and obtaining two-dimensional code information, wherein the two-dimensional code information is used to indicate the size of the target object;
[0095] The visual recognition device is further configured to obtain coordinate data of the backscattered data when the backscattered detection device acquires backscattered information from the target object. Specifically, this coordinate data includes coordinate data corresponding to the backscattered data that needs to be deleted during the backlash removal process. When the count exceeds a preset number, the count is reset to zero, and the coordinate data corresponding to the backscattered data that needs to be deleted is used to control the shift device to move the backscattered detection device to a position on the target object affected by the backlash, thereby acquiring supplemental backscattered information from the target object.
[0096] The QR code image can be encoded in the form of a QR code, which can be quickly read by a visual recognition device. This reduces the risk of reading failure due to QR code damage and improves the reliability of the method. The visual recognition device uses feature point detection technology to determine the position of the target object (the surface to be tested) within the detection area and calculates the coordinate data of the backscattered data based on the target object's position information. The coordinate data can be the two-dimensional coordinates of the target object's surface.
[0097] Thus, by directly reading the size information in the QR code, the complex size calculation process is avoided. The reading speed of the QR code information is fast, and the visual recognition device can complete the acquisition and decoding of the QR code image in a short time, thereby quickly obtaining the size information of the target object and improving the efficiency of subsequent image processing. The size data of the target object can be obtained in the early stage of placement on the conveyor belt, and does not need to be acquired on-site in the predetermined detection area, further reducing the on-site computing power requirements of the predetermined detection area. The coordinate data provides the spatial position information of the target object, and can generate an accurate image in combination with the backscatter signal intensity. The coordinate data is associated with the backscatter acquisition data to generate a complete data set, which is convenient for subsequent image reconstruction and analysis. The backlash effect is handled to ensure the continuity and reliability of the data.
[0098] As an example, an image processing method based on X-ray backscattering is provided, comprising:
[0099] When the target object moves to a predetermined detection area, according to the positional relationship between the shifting device and the target object,
[0100] Using a visual recognition device disposed on the shifting device, the visual recognition device captures a two-dimensional code image disposed on a side of the target object close to the shifting device to obtain two-dimensional code information, wherein the two-dimensional code information is used to indicate the size of the target object; and a preset correspondence between the object size and the acquisition distance is obtained;
[0101] According to the preset corresponding relationship, obtaining a collection distance corresponding to the size data as a target collection distance;
[0102] According to the acquisition distance, controlling the shift device to move in a direction orthogonal to the movement direction of the target object so that the target acquisition distance is met when the backscatter detection device acquires the backscatter acquisition information;
[0103] Based on the moving speed of the target object in the predetermined detection area, controlling the shift device to move in a direction parallel to the moving direction of the target object so that the speed difference between the backscatter detection device and the target object moving along the preset path when acquiring backscatter acquisition information remains within a predetermined range; and acquiring wheel speed data so that the speed difference between the backscatter detection device and the target object moving along the preset path remains within a predetermined range;
[0104] The backscatter detection device is used to acquire backscatter information from the target object, the backscatter information comprising multiple sets of backscatter data and their corresponding time stamps. A visual recognition device is used to acquire the coordinate data of the backscatter data as the backscatter detection device acquires the backscatter information from the target object. Simultaneously, a preset backlash value of the shifting device is acquired. The backlash value is determined by the design parameters of the reducer (i.e., the clearance between the gear meshing). The backlash value of the reducer can be measured in advance using a measuring tool such as a micrometer. In specific applications, the backlash value is regularly verified and checked. If the backlash exceeds the preset value, the gear can be replaced to avoid affecting its efficiency.
[0105] It can be considered that when the displacement device obtains a driving signal opposite to the current movement direction, the wheel speed of the displacement device is considered to be affected by the backlash.
[0106] When affected by the backlash, the count is incremented by one; a preset backlash value is obtained, and a residual gap value is obtained based on the sampling frequency of the wheel speed data and the backlash value. When the residual gap value indicates that the backlash has been removed, the backscattered acquisition data and its corresponding time stamp are used as target backscattered acquisition information, and the backscattered acquisition data during the backlash removal process is deleted from the backscattered acquisition information. The residual gap value can be updated using the following formula: Where R (t) is the remaining gap at the current moment, is the residual backlash at the previous moment, Δx(t) is the wheel speed change during the current sampling period, and Δt is the sampling interval. When R(t) ≤ 0, the backlash removal is considered complete.
[0107] When the count is greater than a preset number of times, the count is reset to zero and the coordinate data corresponding to the backscatter acquisition data is deleted as needed. The shift device is controlled to drive the backscatter detection device to move to the position of the target object affected by the backlash to obtain the backscatter supplementary information of the target object. After completing the information acquisition of the target object, based on the target backscatter acquisition information and the backscatter supplementary information, an image of the target object is obtained according to a preset pixel unit identification relationship and sent to the user device.
[0108] When the count is not greater than the preset number of times, after completing the target object information collection, based on the target backscattering collection information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to the user device.
[0109] This application ensures the stability of the relative position between the backscatter detection device and the target object by precisely controlling the speed difference and position relationship between the shift device and the target object, thereby improving the accuracy of the collected data. Compared with related technologies, this application directly eliminates the affected data, reduces the amount of complex image correction calculations, and improves efficiency. The independent drive design of the shift device avoids the jitter problem when the staff carries the equipment, and improves stability and reliability. When the technical solution is used in scenarios where batch objects are sorted and moved through the detection area, it can reduce the complexity of manual operation and improve detection efficiency. The separate setting of the display terminal and the backscatter detection device makes it easier for staff to view the acquired images in real time, optimizing the staff's user experience.
[0110] See also Figure 3 , Figure 3 A flow chart of another image processing method based on X-ray backscattering provided in an embodiment of the present application is shown. As another example, an image processing method based on X-ray backscattering is provided, comprising:
[0111] P1, target object confirmation in the detection area. In this example, after the target object is confirmed, the vehicle maintains a low-speed operation state, at a speed of v1. The target objects are suitcases or packing boxes of different sizes.
[0112] P2: Confirming the target object's dimensions and obtaining a pre-set correspondence. A visual recognition device installed on the shifting device captures a QR code image of the target object on the side closest to the shifting device. The QR code is decoded to obtain the target object's dimensions. In specific applications, two sets of shifting devices and visual recognition devices can be installed, one on each side of the target object, to simultaneously capture and process images.
[0113] P3, target acquisition distance confirmation. Determine the target acquisition distance based on the target object's size data and the preset correspondence.
[0114] P4, determine whether it meets the target collection distance. If it does, execute P6; if it does not, execute P5.
[0115] P5: Control the displacement device to move in an orthogonal direction. Based on the target acquisition distance, control the displacement device to move in a direction orthogonal to the target object's motion, ensuring that the backscatter detection device maintains the target acquisition distance. Then, proceed to P6.
[0116] P6, control the displacement device to move in parallel direction. According to the moving speed of the target object in the predetermined detection area, control the displacement device to move in the direction parallel to the moving direction of the target object, and the running speed is v2 ,Ensure that the speed difference (v2-v1) between the backscatter detection device and the target object is maintained within a predetermined range. At the same time, when the backscatter detection device obtains the backscatter acquisition information of the target object, the multiplexing visual recognition device obtains the coordinate data of the backscatter acquisition data.
[0117] P7: Acquire backscattered data and determine whether it is affected by backlash. Use the backscatter detection device to acquire backscattered data from the target object, including multiple sets of backscattered data and their corresponding time stamps. If the shifting device acquires a drive signal opposite to the current direction of motion, it is considered to be affected by backlash and executes P8. Otherwise, execute P14.
[0118] P8, handles the effects of backlash. The counter is incremented by one and the preset backlash value is obtained. Based on the sampling frequency of the wheel speed data and the backlash value, the residual backlash value R(t) is calculated. When R(t) ≤ 0, backlash removal is considered complete.
[0119] P9, obtaining backscattered acquisition data after removing the backlash, and using the backscattered acquisition data not affected by the backlash and its corresponding time stamp as target backscattered acquisition information.
[0120] P10, counting, determines whether the count exceeds the preset number of times, the preset number of times is 3.
[0121] If the backlash exceeds the threshold, obtain supplementary backscatter information. Reset the count to zero, and control the shift device to move to the position of the target object affected by the backlash based on the coordinate data corresponding to the backscatter data to be deleted, and obtain supplementary backscatter information of the target object.
[0122] P12 generates an image of the target object based on the target backscatter collected information and the backscatter supplementary information, and simultaneously sends the image to the user device.
[0123] If not, P13 generates an image of the target object based on the target backscatter information and sends the image to the user device.
[0124] P14, acquiring backscattered acquisition data, and using the backscattered acquisition data not affected by the backlash and its corresponding time stamp as target backscattered acquisition information.
[0125] P15, generates an image of the target object based on the target backscattering information.
[0126] The technical solution provided in this example first identifies the target object in the detection area and maintains it at a low speed (speed v1). Next, a visual recognition device is used to capture the QR code image on the target object to obtain dimensional data, and the target acquisition distance is determined based on a preset correspondence. If the actual distance does not meet the target acquisition distance, the shift device is controlled to move in an orthogonal direction to adjust the distance. Subsequently, the shift device moves in a parallel direction to ensure that the speed difference (v2-v1) with the target object is within a predetermined range. Simultaneously, the visual recognition device acquires the coordinate data of the backscattered acquisition data. When acquiring the backscattered acquisition information, a determination is made as to whether it is affected by backlash. If so, processing is performed, including counting and calculating the residual gap value, until the backlash effect is eliminated. Finally, an image of the target object is generated based on the acquired backscattered acquisition data and transmitted to the user device.
[0127] System embodiment.
[0128] See also Figure 4 , Figure 4 A structural block diagram of an image processing system provided in an embodiment of the present application is shown.
[0129] This application also provides an X-ray backscatter-based image processing system. The specific embodiments of the system are consistent with the embodiments and technical effects described in the above-mentioned method embodiments, and some details are omitted here. The system includes a shifting device and a backscatter detection device disposed on the shifting device; it also includes a controller, which may include at least one memory, at least one processor, and a bus connecting different platform systems. The memory may include a (computer) readable medium in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).
[0130] The memory further stores a computer program, which can be executed by the processor so that the processor implements the steps of any of the above methods.
[0131] The memory may also include a utility having at least one program module, such program modules including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
[0132] Accordingly, the processor can execute the above-mentioned computer program, and can execute the utility tool.
[0133] The processor may be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0134] The bus may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a local bus on the processor, or any of a variety of bus architectures.
[0135] The controller is in communication with the shifting device and the backscattering device, and is configured to:
[0136] Controlling the shifting device to drive the backscatter detection device to move and obtain wheel speed data so that the speed difference between the backscatter detection device and the target object moving along the preset path remains within a predetermined range;
[0137] Acquiring backscattered collected information of the target object using the backscattered detection device, the backscattered collected information including multiple sets of backscattered collected data and their corresponding time stamps; and determining whether the wheel speed data of the shifting device is affected by backlash;
[0138] When affected by the backlash, the backscattered acquisition data in the process of removing the backlash is deleted from the backscattered acquisition information; the backscattered acquisition data not affected by the backlash and its corresponding time mark are used as the target backscattered acquisition information;
[0139] Based on the target backscattering acquisition information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device.
[0140] In one embodiment, the controlling shifting device drives the backscatter detection device to move, including:
[0141] When the target object moves to a predetermined detection area, the shifting device is controlled to drive the backscatter detection device to move in a direction perpendicular to or parallel to the moving direction of the target object according to the positional relationship between the shifting device and the target object.
[0142] In one embodiment, when the shifting device obtains a driving signal opposite to the current movement direction, it is considered that the wheel speed of the shifting device is affected by the backlash; and deleting the backscattered collected data in the process of removing the backlash from the backscattered collected information includes:
[0143] A preset backlash value is obtained, and a residual gap value is obtained according to the sampling frequency of the wheel speed data and the reverse gap value. When the residual gap value indicates that the reverse gap has been removed, the backscattered acquisition data in the reverse gap removal process is deleted from the backscattered acquisition information, and the remaining backscattered acquisition data and its corresponding time stamp are used as the target backscattered acquisition information.
[0144] In one embodiment, the controller is further configured to: in the process of acquiring backscattered information of the target object using the backscattered detection device, count up by one when affected by backlash;
[0145] When the count is greater than a preset number, the count is reset to zero and the shift device is controlled to drive the backscatter detection device to move to the position of the target object affected by the backlash to obtain the backscatter supplementary information of the target object;
[0146] Based on the target backscatter acquisition information and the backscatter supplementary information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device.
[0147] In one embodiment, the control shift device drives the backscatter detection device to move in a direction orthogonal to or parallel to the moving direction of the target object, including:
[0148] Obtain the size data of the target object and the preset correspondence between the object size and the acquisition distance;
[0149] According to the preset corresponding relationship, obtaining a collection distance corresponding to the size data as a target collection distance;
[0150] According to the acquisition distance, controlling the shift device to move in a direction orthogonal to the movement direction of the target object so that the target acquisition distance is met when the backscatter detection device acquires the backscatter acquisition information;
[0151] According to the moving speed of the target object in the predetermined detection area, the shift device is controlled to move in a direction parallel to the moving direction of the target object, so that the speed difference between the backscatter detection device and the target object moving along the preset path when acquiring backscatter acquisition information is maintained within a predetermined range.
[0152] In one embodiment, the acquiring of the size data of the target object includes: using a visual recognition device provided on the shifting device to capture a two-dimensional code image provided on a side of the target object close to the shifting device, and acquiring two-dimensional code information, wherein the two-dimensional code information is used to indicate the size of the target object; the visual recognition device is further used to acquire coordinate data of the backscattering acquisition data when the backscattering detection device acquires the backscattering acquisition information of the target object;
[0153] The step of resetting the count to zero and controlling the shifting device to drive the backscatter detection device to move to a position of the target object affected by the backlash includes:
[0154] The coordinate data corresponding to the backscattering acquisition data is reset to zero and deleted as needed, and the shifting device is controlled to drive the backscattering detection device to move to the position of the target object affected by the backlash.
[0155] Storage medium embodiments.
[0156] The present application provides a computer-readable storage medium storing a computer program that, when executed by at least one processor, implements the steps of any of the aforementioned methods. The specific embodiments thereof are consistent with the embodiments and technical effects achieved in the aforementioned method embodiments, and some details are not further described.
[0157] The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for program code for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code can be compressed, for example, in an appropriate form.
[0158] Program Product Embodiments.
[0159] See also Figure 5 , Figure 5 A schematic diagram of the structure of a computer program product provided in an embodiment of the present application is shown. This embodiment of the present application provides a computer-readable storage medium, wherein the computer program product includes a computer program. When executed by at least one processor, the computer program implements the steps of any of the method embodiments described in the method embodiments. The specific embodiments thereof are consistent with the embodiments described in the above method embodiments and the technical effects achieved, and some details are not repeated here.
[0160] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0161] The above-described embodiments merely represent several implementation methods of the present invention. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person skilled in the art would be able to make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.
Claims
1. An image processing method based on X-ray backscattering, characterized in that: include: controlling the shifting device to drive the backscatter detection device to move so that the speed difference between the backscatter detection device and the target object moving along the preset path is maintained within a predetermined range; Acquiring backscattered collected information of the target object using the backscattered detection device, the backscattered collected information including multiple sets of backscattered collected data and their corresponding time stamps; and determining whether the wheel speed data of the shifting device is affected by backlash; When the shifting device obtains a driving signal opposite to the current movement direction, it is considered that the wheel speed of the shifting device is affected by the backlash; when affected by the backlash, the backscattered acquisition data in the process of removing the backlash is deleted from the backscattered acquisition information; the backscattered acquisition data not affected by the backlash and its corresponding time stamp are used as the target backscattered acquisition information; Based on the target backscattering acquisition information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device; The step of deleting the backscattered acquisition data in the process of removing the back gap from the backscattered acquisition information includes: Obtaining a preset backlash value, obtaining a residual gap value based on the sampling frequency of the wheel speed data and the reverse gap value, deleting the backscattered acquisition data during the reverse gap removal process from the backscattered acquisition information when the residual gap value indicates reverse gap removal, and using the remaining backscattered acquisition data and its corresponding time stamp as target backscattered acquisition information; The control shift device drives the backscatter detection device to move, including: When the target object moves to a predetermined detection area, the shifting device is controlled to drive the backscatter detection device to move in a direction perpendicular to or parallel to the moving direction of the target object according to the positional relationship between the shifting device and the target object.
2. The image processing method according to claim 1, wherein: The method further includes: in the process of acquiring backscattered acquisition information of the target object using the backscatter detection device, counting up by one when affected by a backlash; When the count is greater than a preset number, the count is reset to zero and the shift device is controlled to drive the backscatter detection device to move to the position of the target object affected by the backlash to obtain the backscatter supplementary information of the target object; Based on the target backscatter acquisition information and the backscatter supplementary information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device.
3. The image processing method according to claim 2, wherein: The control shift device drives the backscatter detection device to move in a direction orthogonal to or parallel to the moving direction of the target object, including: Obtain the size data of the target object and the preset correspondence between the object size and the acquisition distance; According to the preset corresponding relationship, obtaining a collection distance corresponding to the size data as a target collection distance; According to the acquisition distance, controlling the shift device to move in a direction orthogonal to the movement direction of the target object so that the target acquisition distance is met when the backscatter detection device acquires the backscatter acquisition information; According to the moving speed of the target object in the predetermined detection area, the shift device is controlled to move in a direction parallel to the moving direction of the target object, so that the speed difference between the backscatter detection device and the target object moving along the preset path when acquiring backscatter acquisition information is maintained within a predetermined range.
4. The image processing method according to claim 3, wherein: The obtaining of the size data of the target object comprises: using a visual recognition device provided on the shifting device to collect a two-dimensional code image provided on a side of the target object close to the shifting device, and obtaining two-dimensional code information, wherein the two-dimensional code information is used to indicate the size of the target object; the visual recognition device is further used to obtain coordinate data of the backscattering acquisition data when the backscattering detection device obtains the backscattering acquisition information of the target object; The step of resetting the count to zero and controlling the shifting device to drive the backscatter detection device to move to a position of the target object affected by the backlash includes: The coordinate data corresponding to the backscattering acquisition data is reset to zero and deleted as needed, and the shifting device is controlled to drive the backscattering detection device to move to the position of the target object affected by the backlash.
5. An image processing system based on X-ray backscattering, characterized in that: The system includes a shifting device disposed on one side of a target object for motion video recording, and a backscatter detection device disposed on the shifting device; and further includes a controller, the controller being communicatively connected with the shifting device, the backscatter device, and a user device, the controller being configured to: controlling the shifting device to drive the backscatter detection device to move so that the speed difference between the backscatter detection device and the target object moving along the preset path is maintained within a predetermined range; Acquiring backscattered collected information of the target object using the backscattered detection device, the backscattered collected information including multiple sets of backscattered collected data and their corresponding time stamps; and determining whether the wheel speed data of the shifting device is affected by backlash; When the shifting device obtains a driving signal opposite to the current movement direction, it is considered that the wheel speed of the shifting device is affected by the backlash; when affected by the backlash, the backscattered acquisition data in the process of removing the backlash is deleted from the backscattered acquisition information; the backscattered acquisition data not affected by the backlash and its corresponding time stamp are used as the target backscattered acquisition information; Based on the target backscattering acquisition information, an image of the target object is acquired according to a preset pixel unit identification relationship and sent to a user device; The step of deleting the backscatter collected data during the reverse gap removal process from the backscatter collected information comprises: obtaining a preset reverse gap value, obtaining a residual gap value based on the sampling frequency of the wheel speed data and the reverse gap value, deleting the backscatter collected data during the reverse gap removal process from the backscatter collected information when the residual gap value indicates reverse gap removal, and using the remaining backscatter collected data and its corresponding time identifier as target backscatter collected information; The controlling the displacement device to drive the backscatter detection device to move includes: when the target object moves to a predetermined detection area, according to the positional relationship between the displacement device and the target object, controlling the displacement device to drive the backscatter detection device to move in a direction orthogonal to or parallel to the movement direction of the target object.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by at least one processor, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by at least one processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
X-ray back scattering image deformation correction method and device, terminal and correction system
CN116542863A
Methods for Measurement and Data Processing of Large-Format Fine Flexible Materials
CN102275401A
TBM slag sheet ray back scattering real-time scanning imaging device and method
CN112033986A