Backscattering image geometry and brightness adaptive processing method based on dual laser ranging
By employing dual-laser ranging and an improved multi-scale Retinex image enhancement model, combined with a multi-level deep learning framework, the geometric distortion and brightness unevenness problems of backscattered X-ray imaging systems without an IMU were solved, achieving efficient image quality and hazardous material identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-13
AI Technical Summary
Existing backscatter X-ray imaging systems suffer from severe geometric distortion, uneven brightness distribution, low signal-to-noise ratio, and insufficient accuracy in identifying hazardous materials in handheld or mobile scanning scenarios. In particular, effective correction and enhancement are difficult to achieve without an inertial measurement unit (IMU).
A dual-laser ranging method is adopted, which calculates the position and attitude parameters of the imaging system by simultaneously activating two fixedly installed lasers during the imaging process, performs geometric correction, and combines an improved multi-scale Retinex image enhancement model and a multi-level deep learning framework to achieve brightness equalization and detail enhancement.
Automatically corrects geometric distortion and balances brightness distribution without an IMU, significantly improving image quality and the accuracy of hazardous material identification, while reducing hardware costs and complexity, and is suitable for complex dynamic scanning conditions.
Smart Images

Figure CN121660952A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of X-ray imaging and computer vision technology, and particularly relates to a method for adaptive processing of backscattered image geometry and brightness based on dual laser ranging. Background Technology
[0002] Existing backscatter X-ray inspection equipment typically achieves single-sided detection imaging based on the Compton scattering principle. Unlike traditional transmission X-ray systems, backscatter imaging systems only require an X-ray source and detector to be placed on one side of the object being inspected. By analyzing the intensity distribution of scattered photons, they reflect the density differences and material characteristics of the object's surface. This imaging method offers advantages such as compact equipment structure, flexible detection angles, no need for double-sided penetration, low protection requirements, and suitability for mobile and covert inspections. It has been widely used in fields such as security inspection, counter-terrorism, drug enforcement, and special geophysical exploration.
[0003] However, existing backscattered X-ray imaging systems still have the following prominent technical problems in handheld or mobile scanning scenarios:
[0004] 1. Severe geometric distortion. The geometric consistency of backscattered images is highly dependent on the scanner's motion trajectory and posture stability. During manual handheld or robotic scanning, factors such as uneven scanning speed, curved trajectory, and tilted scanning surface lead to inconsistent sampling intervals between different scan lines, resulting in geometric distortions such as compression, stretching, distortion, and bending during image reconstruction. Particularly when the scanner tilts or rotates along the object's surface, the projection data at the same location shifts between different frames, causing structural overlap or breakage, severely damaging the target's morphological information.
[0005] 2. Uneven brightness distribution. The intensity of the backscattered signal decreases inversely with the square of the distance between the detector and the object surface, and is directly proportional to the cosine of the incident angle. In actual scanning, because it is difficult for handheld devices to maintain a constant distance and perpendicular incident angle, obvious brightness differences will appear in the image: when the scanner is close to the object surface, the scattered signal is enhanced, resulting in local overexposure; when the scanner is far from the target or the incident angle is large, the signal is significantly attenuated, forming a brightness distribution of "darker at a distance and brighter at a distance" or "uneven vertical distribution". In addition, the uneven structure or material differences of the object surface will further introduce uneven reflection, causing the image brightness to fluctuate drastically with geometric conditions.
[0006] 3. Low signal-to-noise ratio and blurred features make identification difficult. The principle of backscattered imaging dictates that its signal primarily originates from secondary scattered photons, resulting in a low effective signal ratio and high noise content, leading to a generally low signal-to-noise ratio (SNR) in the original image. Images often contain numerous random noise points, light spots, and artifacts. Furthermore, backscattered images mainly reflect surface density changes, with limited information on deep structures and textures, resulting in blurred target boundaries and low contrast, especially under low-dose scanning conditions. Traditional enhancement algorithms based on grayscale thresholding, edge detection, or histogram equalization struggle to effectively extract the differences between high-Z substances (such as metal knives and firearms) and organic matter (such as drug packages), leading to a low automatic identification rate and a high false alarm rate for hazardous materials.
[0007] 4. Path reconstruction is highly dependent on inertial measurement units (IMUs). To achieve geometric correction, some mobile backscattering devices introduce **inertial measurement units (IMUs)** or gyroscope modules to obtain the device's attitude parameters during the scanning process. However, IMU systems have the following limitations: they require high-precision sensors and complex fusion algorithms, resulting in high cost, high power consumption, and complex maintenance; IMUs are susceptible to interference in strong radiation or metallic environments, and long-term use can lead to zero drift and accumulated errors; handheld devices have limited space, making it difficult to deploy a complete IMU + laser ranging system.
[0008] Therefore, how can we automatically correct geometric distortion, equalize brightness distribution, and enhance image details without an IMU to meet the requirements of backscattered X-ray systems for image quality and recognition accuracy under complex dynamic scanning conditions? Summary of the Invention
[0009] To address the shortcomings of the existing technologies, this invention provides a backscattered image geometry and brightness adaptive processing method based on dual laser ranging. This method can automatically correct geometric distortion, balance brightness distribution, and enhance image details without an IMU, thereby meeting the requirements of backscattered X-ray systems for image quality and recognition accuracy under complex dynamic scanning conditions.
[0010] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0011] A backscatter image geometry and brightness adaptive processing method based on dual laser ranging includes the following steps:
[0012] S0. During backscatter imaging, two lasers fixedly installed relative to the imaging system are simultaneously activated to project laser points onto the object under inspection, and the original backscatter image containing the two laser points is captured by the imaging sensor.
[0013] S1. Based on the pixel positions of the two laser points in the original backscattered image and the known physical distance and installation geometry between the two lasers, calculate the position and orientation parameters of the imaging system relative to the object under test at each sampling time; use the obtained position and orientation parameters to perform geometric correction on the original backscattered image to obtain a corrected image with geometrically aligned structure.
[0014] S2. Using the position and orientation parameters obtained in S1, for each pixel of the corrected image obtained in S1, calculate the propagation distance of the corresponding X-ray from the source point to the object surface position represented by the pixel, and the incident angle of the X-ray at that position.
[0015] Based on the propagation distance and incident angle, a joint brightness attenuation compensation factor is calculated using a preset formula for calculating brightness attenuation compensation factors. The formula for calculating the compensation factor is based on the physical attenuation law of X-ray propagation and incorporates the response characteristics of the imaging system. It is used to characterize the physical law of X-ray intensity attenuation with the square of the propagation distance and the cosine of the incident angle.
[0016] Using the calculated joint brightness attenuation compensation factor, the corrected image of S1 is initially luminous corrected to obtain the initial corrected image;
[0017] S3. Using the preset improved multi-scale Retinex image enhancement model, reflectivity decomposition and detail enhancement are performed on the preliminary corrected image output by S2, and the enhanced backscattered image is output.
[0018] The improved multi-scale Retinex model uses the preliminary corrected image as the illumination term, replacing the illumination component estimated by Gaussian filtering of the input image in the traditional Retinex model. Based on this, it performs multi-scale reflectance decomposition, fusing the reflectance components at different scales to obtain the enhanced backscattered image.
[0019] S4. The enhanced backscattered image output from S3 is input into a multi-level deep learning framework consisting of a target detection module, a semantic segmentation module, and a context modeling module, for processing, and the result of classifying dangerous goods in the inspected object is output.
[0020] Compared with the prior art, the present invention has the following advantages:
[0021] 1. This method simultaneously activates two fixed lasers during the imaging process to project laser points onto the object under inspection. Based on the positional relationship of the laser points in the image, the position and orientation parameters of the imaging system relative to the object are calculated. These parameters are used for geometric correction of the original backscattered image, effectively solving the geometric distortion problem caused by irregular trajectories and speed variations during handheld or mobile scanning. Compared with traditional methods relying on IMUs, this approach reduces hardware costs and complexity while improving the accuracy and reliability of geometric correction.
[0022] 2. Based on the position and attitude parameters obtained from S1, this method can accurately calculate the X-ray propagation distance and incident angle for each pixel, and then calculate the joint brightness attenuation compensation factor. This factor considers the inverse squared decay of X-ray intensity with propagation distance and the influence of the cosine value of the incident angle, and performs brightness correction on the preliminary corrected image. This significantly improves the brightness unevenness caused by changes in the distance between the detector and the object surface and differences in the incident angle, improving the overall image quality and consistency. Compared with traditional methods based on grayscale thresholding or histogram equalization, this scheme can more effectively compensate for brightness attenuation and ensure the complete presentation of detailed information in the image.
[0023] 3. An improved multi-scale Retinex image enhancement model is used to process the pre-corrected image. This model directly inputs the pre-corrected image as the illuminance term, replacing the traditional Retinex model which estimates the illuminance component by applying Gaussian filtering to the input image. This improvement not only simplifies the processing flow but also enhances the accuracy of reflectance decomposition and improves the image's detailed features. Furthermore, a multi-level deep learning framework combining cascaded object detection, semantic segmentation, and context modeling modules further improves the accuracy and robustness of hazardous material category identification. Compared to traditional edge detection or histogram equalization techniques, this method can better extract the difference features between high-Z substances (such as metal knives and firearms) and organic matter (such as drug packages), reducing the false alarm rate.
[0024] In summary, this method can automatically correct geometric distortion, equalize brightness distribution, and enhance image details without an IMU, thereby meeting the image quality and recognition accuracy requirements of backscattered X-ray systems under complex dynamic scanning conditions. By introducing dual-laser ranging technology and advanced image processing algorithms, this invention overcomes the problems of severe geometric distortion, uneven brightness distribution, and low signal-to-noise ratio in existing technologies, providing a more economical, efficient, and easy-to-implement solution.
[0025] Preferably, in S1, the position and attitude parameters are calculated by solving a preset energy optimization problem. The energy optimization problem aims at the geometric registration consistency between the laser point image coordinates and their corresponding three-dimensional world coordinates, and integrates the constraints of motion trajectory smoothness and attitude continuity. By minimizing the total energy function of the energy optimization problem, the position and attitude parameters at all sampling times are jointly optimized to obtain the optimal position and attitude parameter sequence that satisfies geometric consistency and motion continuity, which is used for geometric correction of the original backscattered image.
[0026] This approach addresses two key issues: 1) Traditional methods often employ independent frame-by-frame estimation or simple interpolation to obtain pose parameters, which can easily introduce accumulated errors and local inconsistencies. Our proposed solution, however, globally and jointly optimizes the pose at all sampling moments, using geometric registration consistency as the core objective and integrating motion smoothness and pose continuity constraints. Compared to methods relying on IMUs or based solely on single-frame matching, this optimization strategy effectively suppresses noise interference and avoids correction failures caused by mismatches in single frames. It is particularly suitable for complex situations such as jitter and occlusion in handheld scanning.
[0027] 2. By introducing constraints on motion trajectory smoothness and pose continuity, the optimized pose sequence not only conforms to the image observation data but also ensures the continuous and smooth spatial path, avoiding abrupt changes or jumps. This makes the subsequent image stitching and reconstruction process more natural, reducing artifacts and structural breaks caused by pose jumps. Ordinary least squares methods or non-optimization methods often ignore motion continuity, which may lead to "tomographic" or "misalignment" in the corrected image. This method, however, optimizes the entire scanning process as a whole, ensuring geometric consistency under dynamic scanning.
[0028] Preferably, the total energy function is:
[0029]
[0030] Among them, P i,j This represents the true three-dimensional position of the j-th laser point at the i-th sampling time in the world coordinate system, calculated from dual-laser ranging data combined with the device installation geometry; U i,j The three-dimensional laser focal point in the equipment coordinate system is derived from laser ranging results and installation parameters; R i Let be a 3x3 rotation matrix, representing the attitude of the imaging system relative to the world coordinate system at sampling time i; t i R is a 3x1 translation vector, representing the position of the imaging system relative to the world coordinate system at sampling time i; i U i,j +t i Indicates that U i,j The theoretical three-dimensional position obtained after transforming from the device coordinate system to the world coordinate system; Pi,j -(R i U i,j +t i ) represents the reprojection error between the real-world point and the theoretical world point, reflecting the geometric consistency of pose estimation; Δ 2 t i The translation vector t i The second-order difference is used as a translational acceleration constraint; λ and μ are regularization parameters; Represents the relative rotation matrix from sampling time i to i+1;
[0031] The first term of the total energy function characterizes the geometric registration error between the laser point image coordinates and the coordinates obtained by backprojection from the current pose; the second and third terms impose smoothness constraints on the acceleration of the translation trajectory and the rate of change of the rotational attitude, respectively.
[0032] In this setup, the first term of the total energy function, centered on reprojection error, directly quantifies the deviation between the laser point image coordinates and their theoretical projected coordinates. By minimizing this term, the system can accurately match the observed laser point in the image with its true position in 3D space, thus achieving high-precision pose estimation. Traditional methods often employ frame-by-frame matching or simple least-squares methods, which are susceptible to noise and local mismatches. This method, through global optimization, significantly improves the robustness and accuracy of pose estimation, making it particularly suitable for handheld scanning with minor jitter or occlusion.
[0033] 2. The second aspect constrains the second-order difference of the translation vector, limiting the acceleration changes during motion. This makes the entire scanning path smoother and more continuous, avoiding jumps or abrupt changes. Ordinary methods often ignore the dynamic characteristics of motion, leading to "discontinuities" or "misalignments" in the corrected image. This scheme introduces acceleration constraints, making the reconstructed trajectory more consistent with actual physical motion laws, thus improving the quality of image stitching.
[0034] 3. The third method utilizes Lie algebra to model the relative rotation between adjacent frames, effectively constraining the rate of change of the attitude angle and preventing drastic attitude fluctuations caused by sensor noise or image blur. Many non-optimization methods rely solely on single-frame information or simple interpolation, making it difficult to handle rapidly rotating or complex motion scenes. This method enhances the system's stability in dynamic environments and improves overall imaging quality through rotational continuity constraints.
[0035] In summary, by constructing a total energy function that incorporates three types of constraints—geometric consistency, translational trajectory smoothness, and rotational attitude continuity—global joint optimization of pose parameters during scanning was achieved. This not only significantly improved the accuracy and robustness of pose estimation but also ensured the natural smoothness of the motion trajectory and the stable continuity of attitude changes. This provides high-quality basic data for subsequent geometric correction and comprehensively improves the geometric consistency and visual quality of backscattered images under complex dynamic scanning conditions.
[0036] Preferably, in S2, the compensation factor for the brightness attenuation is calculated as follows:
[0037]
[0038] Where r is the propagation distance of the X-ray from the source point to the object surface represented by pixel x; θ is the incident angle of the X-ray at that position; and η(x) is the influence factor of the combined detector gain, system response, and scattering efficiency.
[0039] The joint brightness attenuation compensation factor is used to perform geometric compensation on the original pixel intensity to obtain the distance-corrected pixel intensity:
[0040] I dist_corr (x)=I raw (x)·k(x);
[0041] In the formula, I raw (x) represents the original pixel intensity; I dist_corr (x) represents the pixel intensity after compensation for propagation distance and incident angle.
[0042] With this setup, this method constructs a joint brightness attenuation compensation factor k(x) that integrates the inverse square attenuation of propagation distance, the cosine attenuation of incident angle, and the system response characteristics. This enables precise and adaptive physical modeling and correction of brightness unevenness caused by geometric changes in backscattered images. It not only overcomes the limitations of traditional enhancement algorithms that rely on empirical parameters, but also significantly improves the brightness consistency and detail visibility of images in complex dynamic scanning scenarios.
[0043] Preferably, in S2, after geometric compensation is completed, an adaptive gamma transform is performed on the distance-corrected image in the following manner:
[0044]
[0045] In the formula, I average (x) represents the average pixel value within the local window; I max (x) represents the maximum pixel value;
[0046] The final preliminary corrected image is as follows:
[0047] IADAG (x)=clip[(I dist_corr (x)) γ(x) ,0,I max (x)].
[0048] With this setup, 1. the adaptive gamma transform introduces η(x) related to the system response and the average pixel value I within the local window. average (x) dynamically adjusts the gamma value of each pixel to eliminate the nonlinear attenuation of X-ray intensity with incident angle and distance, thereby achieving global illumination balance and local detail enhancement.
[0049] 2. Traditional global gamma transform uses a fixed exponent, making it difficult to simultaneously capture details in both bright and dark areas. This method, however, calculates γ(x) at each pixel location, dynamically adjusting the transform parameters based on the local grayscale distribution. This effectively stretches the dynamic range, especially in low-contrast regions (such as shadows or weak signal areas). Compared to histogram equalization or global gamma correction, this method avoids noise amplification and artifacts caused by over-enhancement, achieving a more natural contrast enhancement that better matches human visual perception.
[0050] 3. Traditional methods often suffer from overexposure in bright areas and underexposure in dark areas due to improper global parameter settings. This method, through a spatial adaptive mechanism, automatically adjusts the enhancement level, significantly improving the common phenomenon of one side being too bright and the other too dark in backscattered images.
[0051] Preferably, in S3, during the multi-scale reflectance decomposition process, the reflectance component of each scale is calculated using the following formula:
[0052]
[0053] In the formula, I ADAG (x) is the initial corrected image output by S2; The standard deviation is σ s Gaussian kernel function, σ s Represents the s-th scale parameter; * indicates convolution;
[0054] The initial corrected image I output by S2 ADAG (x) is used as the input for the illumination term, replacing the Gaussian filtering estimation of the input image in the traditional Retinex.
[0055] Preferably, in S3, the enhanced backscattered image is output as follows:
[0056]
[0057] In the formula, σ s This represents the s-th scale parameter; S is the number of scale parameters.
[0058] This approach addresses several issues: 1. Traditional Retinex methods rely on Gaussian filtering of the input image to estimate illuminance components, which is susceptible to noise, uneven illumination, and texture distortion, leading to inaccurate illuminance estimates. Our method, however, directly uses the image after geometric and brightness compensation (S2) as the illuminance term. This image has removed most of the brightness variations caused by distance, angle, and system response, thus more closely approximating the true illuminance distribution. Compared to the indirect approach of "denoising first, then estimating illuminance" in traditional Retinex, this method achieves direct illuminance modeling based on physical compensation, significantly improving the accuracy of illuminance estimation and avoiding reflectance distortion caused by erroneous illuminance estimation.
[0059] 2. Traditional single-scale Retinex can only process a single frequency range, which is prone to over-enhancement or under-enhancement. In contrast, this method uses a multi-scale mechanism to achieve hierarchical detail enhancement, which is particularly suitable for the problem of blurred target boundaries and sparse texture in backscattered images.
[0060] Preferably, in S4, the multi-level deep learning framework includes a target detection module, a semantic segmentation module, and a context modeling module connected in sequence; wherein, the target detection module is used to output the bounding boxes and class confidence of candidate regions; the semantic segmentation module outputs pixel-level structural masks for each candidate region; and the context modeling module achieves global feature fusion through a multi-head self-attention mechanism, models long-distance semantic dependencies, and suppresses background artifacts.
[0061] This setup, by constructing a cascaded deep learning framework consisting of three modules—target detection, semantic segmentation, and context modeling—achieves a progressively deeper processing from coarse localization to fine segmentation and then to global semantic reasoning. While ensuring high efficiency, it significantly improves the accuracy and robustness of hazardous materials identification, effectively solving problems such as blurred target boundaries, complex backgrounds, and category confusion in backscattered images, and providing powerful intelligent identification support for mobile or handheld X-ray security inspection systems.
[0062] Preferably, the overall loss function for model training in the multi-level deep learning framework is:
[0063] L=λ det L det +λ seg L seg +λ cls L cls +λ reg L reg ;
[0064] In the formula, L det To detect loss; L seg For segmentation loss; L cls For classification loss; Lreg For regularization loss; λ det , λ seg , λ cls , λ reg These are the corresponding weighting coefficients.
[0065] Preferably, the regularization loss L reg The algorithm also introduces structural similarity loss to improve the ability to preserve the original texture structure during semantic segmentation; the expression for the structural similarity loss is:
[0066] L ssim =1-SSIM(M pred M gt );
[0067] Among them, M pred M is the pixel-level structure mask predicted by the model. gt For the corresponding real pixel-level structure mask, SSIM(M) pred M gt The structural similarity index is used to measure the structural similarity between the predicted result and the true label. Attached Figure Description
[0068] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:
[0069] Figure 1 This is a flowchart of the method. Detailed Implementation
[0070] The following detailed explanation illustrates the specific implementation methods:
[0071] Example:
[0072] like Figure 1 As shown, this embodiment discloses a backscatter image geometry and brightness adaptive processing method based on dual laser ranging, including the following steps:
[0073] S0. During backscatter imaging, two lasers fixedly installed relative to the imaging system are simultaneously activated to project laser points onto the object under inspection, and the original backscatter image containing the two laser points is captured by the imaging sensor.
[0074] S1. Based on the pixel positions of the two laser points in the original backscattered image and the known physical distance and installation geometry between the two lasers, calculate the position and orientation parameters of the imaging system relative to the object under test at each sampling time; use the obtained position and orientation parameters to perform geometric correction on the original backscattered image to obtain a corrected image with geometrically aligned structure.
[0075] In practice, the position and attitude parameters are calculated by solving a preset energy optimization problem. The energy optimization problem aims at the geometric registration consistency between the laser point image coordinates and their corresponding three-dimensional world coordinates, and integrates the constraints of motion trajectory smoothness and attitude continuity. By minimizing the total energy function of the energy optimization problem, the position and attitude parameters at all sampling times are jointly optimized to obtain the optimal position and attitude parameter sequence that satisfies geometric consistency and motion continuity, which is used for geometric correction of the original backscattered image.
[0076] Traditional methods often use frame-by-frame independent estimation or simple interpolation to obtain pose parameters, which easily introduces accumulated errors and local inconsistencies. This proposed solution, however, globally and jointly optimizes the pose at all sampling moments, taking geometric registration consistency as the core objective and integrating motion smoothness and pose continuity constraints. Compared to methods relying on IMU or based solely on single-frame matching, this optimization strategy effectively suppresses noise interference and avoids correction failures caused by single-frame mismatches, making it particularly suitable for complex situations such as handheld scanning with jitter and occlusion. Furthermore, by introducing motion trajectory smoothness and pose continuity constraints, the optimized pose sequence not only conforms to the image observation data but also ensures the continuous and smooth spatial path, avoiding abrupt changes or jumps. This makes subsequent image stitching and reconstruction processes more natural, reducing artifacts and structural breaks caused by pose jumps. Ordinary least squares methods or non-optimized methods often ignore motion continuity, potentially leading to "towering" or "misalignment" in the corrected image. This method, however, optimizes the entire scanning process holistically, ensuring geometric consistency under dynamic scanning.
[0077] In specific implementation, the total energy function is:
[0078]
[0079] Among them, P i,j This represents the true three-dimensional position of the j-th laser point at the i-th sampling time in the world coordinate system, calculated from dual-laser ranging data combined with the device installation geometry; U i,j The three-dimensional laser focal point in the equipment coordinate system is derived from laser ranging results and installation parameters; R i Let be a 3x3 rotation matrix, representing the attitude of the imaging system relative to the world coordinate system at sampling time i; t i R is a 3x1 translation vector, representing the position of the imaging system relative to the world coordinate system at sampling time i; i U i,j +t i Indicates that U i,j The theoretical three-dimensional position obtained after transforming from the device coordinate system to the world coordinate system; P i,j -(R iU i,j +t i ) represents the reprojection error between the real-world point and the theoretical world point, reflecting the geometric consistency of pose estimation; Δ 2 t i The translation vector t i The second-order difference is used as a translational acceleration constraint; λ and μ are regularization parameters; Represents the relative rotation matrix from sampling time i to i+1;
[0080] The first term of the total energy function characterizes the geometric registration error between the laser point image coordinates and the coordinates obtained by backprojection from the current pose; the second and third terms impose smoothness constraints on the acceleration of the translation trajectory and the rate of change of the rotational attitude, respectively.
[0081] By constructing a total energy function that includes three types of constraints—geometric consistency, translational trajectory smoothness, and rotational attitude continuity—global joint optimization of pose parameters during scanning was achieved. This not only significantly improved the accuracy and robustness of pose estimation but also ensured the natural smoothness of the motion trajectory and the stable continuity of attitude changes. It provided high-quality basic data for subsequent geometric correction and comprehensively improved the geometric consistency and visual quality of backscattered images under complex dynamic scanning conditions.
[0082] To facilitate a better understanding by those skilled in the art, the following explanation is provided.
[0083] Let the information of the i-th sampling point in the system, and the time step or the i-th sampling time be: Δt i =t i+1 -t i ;
[0084] The original flypoint is denoted as S. i , i = 1, 2, ..., n, where n is the total number of pixels.
[0085] The original flying point corresponds to the coordinate system P in the three-dimensional world. i =(x i ,y i ,z i Let be the coordinates of the i-th sampling point in the three-dimensional world. i =(x i ,y i ,z i () represents the coordinates of the image point.
[0086] The i-th measured world coordinate point is:
[0087]
[0088] The set of laser points measured by the laser installed on the equipment is as follows:
[0089]
[0090] Therefore, it is necessary to estimate the trajectory error to be minimized, i.e. We can obtain:
[0091]
[0092] Let all unknown positions and orientations be {t} i ,R i}, and obtain the observation point P. i,j An energy function can be established:
[0093]
[0094] This invention establishes a scanning path energy optimization model based on dual laser ranging constraints to minimize geometric distortion caused by speed changes and attitude drift during device movement.
[0095] The first feature ensures the consistency of the registration between image coordinates and real-world points;
[0096] The second constraint is the acceleration of the translation trajectory to prevent path discrepancies caused by hand tremors;
[0097] The third term is based on the attitude continuity constraint of the Lie group SO(3), which suppresses attitude abrupt changes through rotational logarithmic mapping.
[0098] This model achieves attitude reconstruction without an inertial unit by reconstructing the pitch, roll, and yaw angles of the device through the difference between the two laser ranging points.
[0099] R i,j ∈SO(3) is a rotation matrix belonging to a special orthogonal group, used to describe the pitch, roll, and yaw of the inspection instrument relative to the target object. R is calculated from this matrix. i,j Then, the homogeneous transformation matrix T can be derived:
[0100]
[0101] The image is obtained by performing an inverse transform:
[0102]
[0103] T or T-1 is a geometric transformation mapping function (homogeneous transformation matrix), belonging to the special Euclidean group SE(3).
[0104] S2. Using the position and orientation parameters obtained in S1, for each pixel of the corrected image obtained in S1, calculate the propagation distance of the corresponding X-ray from the source point to the object surface position represented by the pixel, and the incident angle of the X-ray at that position.
[0105] Based on the propagation distance and incident angle, a joint brightness attenuation compensation factor is calculated using a preset formula for calculating brightness attenuation compensation factors. The formula for calculating the compensation factor is based on the physical attenuation law of X-ray propagation and incorporates the response characteristics of the imaging system. It is used to characterize the physical law of X-ray intensity attenuation with the square of the propagation distance and the cosine of the incident angle.
[0106] Using the calculated joint luminance attenuation compensation factor, preliminary luminance correction is performed on the corrected image of S1 to obtain a preliminary corrected image.
[0107] In specific implementation, the formula for calculating the brightness attenuation compensation factor is:
[0108]
[0109] Where r is the propagation distance of the X-ray from the source point to the object surface represented by pixel x; θ is the incident angle of the X-ray at that position; and η(x) is the influence factor of the combined detector gain, system response, and scattering efficiency.
[0110] The joint brightness attenuation compensation factor is used to perform geometric compensation on the original pixel intensity to obtain the distance-corrected pixel intensity:
[0111] I dist_corr (x)=I raw (x)·k(x);
[0112] In the formula, I raw (x) represents the original pixel intensity; I dist_corr (x) represents the pixel intensity after compensation for propagation distance and incident angle.
[0113] By constructing a joint brightness attenuation compensation factor k(x) that integrates the inverse square attenuation of propagation distance, the cosine attenuation of incident angle, and the system response characteristics, we have achieved accurate and adaptive physical modeling and correction of brightness unevenness caused by geometric changes in backscattered images. This not only overcomes the limitations of traditional enhancement algorithms that rely on empirical parameters, but also significantly improves the brightness consistency and detail visibility of images in complex dynamic scanning scenarios.
[0114] After geometric compensation, an adaptive gamma transform is performed on the distance-corrected image in the following manner:
[0115]
[0116] In the formula, I average (x) represents the average pixel value within the local window; I max (x) represents the maximum pixel value;
[0117] The final preliminary corrected image is as follows:
[0118] I ADAG (x)=clip[(I dist_corr (x)) γ(x) ,0,I max (x)].
[0119] The adaptive gamma transform introduces η(x) related to the system response and the average pixel value I within the local window. average By dynamically adjusting the gamma value of each pixel (x), the nonlinear attenuation of X-ray intensity with incident angle and distance is eliminated, achieving global illumination equalization and local detail enhancement. By calculating γ(x) at each pixel location, the transformation parameters are dynamically adjusted according to the local grayscale distribution, effectively stretching the dynamic range, especially in low-contrast areas (such as shadows or weak signal areas). Compared to histogram equalization or global gamma correction, this method avoids noise amplification and artifact generation caused by over-enhancement, achieving a more natural contrast enhancement that better matches human visual perception.
[0120] To facilitate understanding by those skilled in the art, the following explanation is provided.
[0121] Let the intensity of the X-ray exit aperture be I0(x), and the intensity of the obtained original pixel (original intensity) be I. raw (x), the corrected light intensity is I corr (x), the intensity of the backscattered light from the target is I. obs (x).
[0122] The physical properties of backscattering intensity can be written as:
[0123]
[0124] η(x) is a factor that combines the effects of detector gain, system response and scattering efficiency, r is the distance from the exit aperture to the target object, and N(x) is the local radiated noise.
[0125] Ignoring the weak background radiation noise and considering only the scattered light intensity, the distance compensation factor is:
[0126]
[0127] We can obtain:
[0128]
[0129] First, perform geometric compensation on each pixel:
[0130] I dist_corr (x)=I raw (x)·k(x);
[0131] Perform an adaptive gamma transform on the image. Let the average brightness of the local window be I. average (x), where the target is the scattered light intensity mapped to a specified gray level. Then the γ correction is:
[0132]
[0133] I max (x) represents the maximum pixel value.
[0134] The final output is:
[0135] I ADAG (x)=clip[(I dist_corr (x)) γ(x) ,0,I max (x)];
[0136] The above formula represents the numerical gradient training method with gamma adaptive adjustment.
[0137] This algorithm introduces an angle-distance compensation factor on the basis of traditional gamma correction to eliminate the nonlinear attenuation of X-ray intensity with incident angle and distance.
[0138] S3. Using the preset improved multi-scale Retinex image enhancement model, reflectivity decomposition and detail enhancement are performed on the preliminary corrected image output by S2, and the enhanced backscattered image is output.
[0139] The improved multi-scale Retinex model uses the preliminary corrected image as the illumination term, replacing the illumination component estimated by Gaussian filtering of the input image in the traditional Retinex model. Based on this, it performs multi-scale reflectance decomposition, fusing the reflectance components at different scales to obtain the enhanced backscattered image.
[0140] In practice, during the multi-scale reflectance decomposition process, the reflectance component at each scale is calculated using the following formula:
[0141]
[0142] In the formula, I ADAG (x) is the initial corrected image output by S2; The standard deviation is σ s Gaussian kernel function, σ s Represents the s-th scale parameter; * indicates convolution;
[0143] The initial corrected image I output by S2 ADAG (x) is used as the input for the illumination term, replacing the Gaussian filtering estimation of the input image in the traditional Retinex.
[0144] The enhanced backscattered image output is as follows:
[0145]
[0146] In the formula, σ s This represents the s-th scale parameter; S is the number of scale parameters.
[0147] This process unifies geometric illumination compensation and Retinex enhancement under a single convolutional framework, achieving a fusion of physical consistency and visual enhancement. In practical applications, a three-scale MSR (i.e., three scale parameters) can be used.
[0148] Traditional Retinex methods rely on Gaussian filtering of the input image to estimate illuminance components, which is susceptible to noise, uneven illumination, and texture distortion, leading to inaccurate illuminance estimates. Our proposed method, however, directly uses the image after geometric and brightness compensation (S2) as the illuminance term. This image has removed most of the brightness variations caused by distance, angle, and system response, thus more closely approximating the true illuminance distribution. Compared to the indirect approach of "denoising first, then estimating illuminance" in traditional Retinex, our method achieves direct illuminance modeling based on physical compensation, significantly improving the accuracy of illuminance estimation and avoiding reflectance distortion caused by erroneous illuminance estimation.
[0149] S4. The enhanced backscattered image output from S3 is input into a multi-level deep learning framework consisting of a target detection module, a semantic segmentation module, and a context modeling module, for processing, and the result of classifying dangerous goods in the inspected object is output.
[0150] In specific implementation, the multi-level deep learning framework includes a target detection module, a semantic segmentation module, and a context modeling module connected in sequence; wherein, the target detection module is used to output the bounding boxes and class confidence of candidate regions; the semantic segmentation module outputs pixel-level structural masks for each candidate region; the context modeling module achieves global feature fusion through a multi-head self-attention mechanism, models long-distance semantic dependencies, and suppresses background artifacts.
[0151] By constructing a cascaded deep learning framework consisting of three modules—target detection, semantic segmentation, and context modeling—it achieves layer-by-layer deepening processing from coarse localization to fine segmentation and then to global semantic reasoning. While ensuring high efficiency, it significantly improves the accuracy and robustness of hazardous materials identification, effectively solving problems such as blurred target boundaries, complex backgrounds, and category confusion in backscattered images, and providing powerful intelligent identification support for mobile or handheld X-ray security inspection systems.
[0152] In practical implementation, the overall loss function for model training of the multi-level deep learning framework is:
[0153] L=λdet L det +λ seg L seg +λ cls L cls +λ reg L reg ;
[0154] In the formula, L det To detect loss; L seg For segmentation loss; L cls For classification loss; L reg For regularization loss; λ det , λ seg , λ cls , λ reg These are the corresponding weighting coefficients.
[0155] Detection loss L det The sum of the commonly used box regression loss and confidence loss (BCE) in YOLO.
[0156] Segmentation loss L seg Commonly used Dice Loss + BCE:
[0157] L seg =BCE(M pred M gt )+(1-Dice(M pred M gt ));
[0158] Classification loss L cls Cross-entropy, or Focal Loss, is used for class probabilities p. j .
[0159] Regularization loss L reg This includes boundary smoothing terms, Transformer attention regularization, such as TV (Total Variation) or boundary confidence smoothing.
[0160]
[0161] Regularization loss L reg The algorithm also introduces structural similarity loss to improve the ability to preserve the original texture structure during semantic segmentation; the expression for the structural similarity loss is:
[0162] L ssim =1-SSIM(M pred M gt );
[0163] Among them, M pred M is the pixel-level structure mask predicted by the model. gtFor the corresponding real pixel-level structure mask, SSIM(M) pred M gt The structural similarity index is used to measure the structural similarity between the predicted result and the true label.
[0164] This method simultaneously activates two fixed lasers during the imaging process to project laser points onto the object under inspection. Based on the positional relationship of these laser points in the image, the position and orientation parameters of the imaging system relative to the object are calculated. These parameters are used for geometric correction of the original backscattered image, effectively solving the geometric distortion problem caused by irregular trajectories and speed variations during handheld or mobile scanning. Compared to traditional methods relying on IMUs, this approach reduces hardware costs and complexity while improving the accuracy and reliability of geometric correction. Furthermore, based on the position and orientation parameters obtained in S1, this method can accurately calculate the X-ray propagation distance and incident angle for each pixel, thereby calculating a joint brightness attenuation compensation factor. This factor considers the inverse squared decay of X-ray intensity with propagation distance and the influence of the cosine of the incident angle, performing brightness correction on the initially corrected image. This significantly improves the brightness unevenness caused by variations in the distance between the detector and the object surface and differences in the incident angle, enhancing the overall image quality and consistency. Compared to traditional methods based on grayscale thresholding or histogram equalization, this approach more effectively compensates for brightness attenuation, ensuring the complete presentation of detailed information in the image. Furthermore, an improved multi-scale Retinex image enhancement model is employed to process the pre-corrected image. This model directly inputs the pre-corrected image as the illuminance term, replacing the traditional Retinex model's method of estimating the illuminance component through Gaussian filtering of the input image. This improvement not only simplifies the processing flow but also enhances the accuracy of reflectance decomposition and strengthens the image's detailed features. In addition, a multi-level deep learning framework, cascading object detection, semantic segmentation, and context modeling modules, further improves the accuracy and robustness of hazardous material category identification. Compared to traditional edge detection or histogram equalization techniques, this method can better extract the differential features between high-Z substances (such as metal knives and firearms) and organic matter (such as drug packages), reducing the false alarm rate.
[0165] This method can automatically correct geometric distortion, equalize brightness distribution, and enhance image details without an IMU, thereby meeting the image quality and recognition accuracy requirements of backscattered X-ray systems under complex dynamic scanning conditions. By introducing dual-laser ranging technology and advanced image processing algorithms, this invention overcomes the problems of severe geometric distortion, uneven brightness distribution, and low signal-to-noise ratio in existing technologies, providing a more economical, efficient, and easy-to-implement solution.
[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A method for adaptive processing of backscattered images based on dual-laser ranging, characterized in that, Includes the following steps: S0. During backscatter imaging, two lasers fixedly installed relative to the imaging system are simultaneously activated to project laser points onto the object under inspection, and the original backscatter image containing the two laser points is captured by the imaging sensor. S1. Based on the pixel positions of the two laser points in the original backscattered image and the known physical distance and installation geometry between the two lasers, calculate the position and orientation parameters of the imaging system relative to the object under test at each sampling time; use the obtained position and orientation parameters to perform geometric correction on the original backscattered image to obtain a corrected image with geometrically aligned structure. S2. Using the position and orientation parameters obtained in S1, for each pixel of the corrected image obtained in S1, calculate the propagation distance of the corresponding X-ray from the source point to the object surface position represented by the pixel, and the incident angle of the X-ray at that position. Based on the propagation distance and incident angle, a joint brightness attenuation compensation factor is calculated using a preset formula for calculating brightness attenuation compensation factors. The formula for calculating the compensation factor is based on the physical attenuation law of X-ray propagation and incorporates the response characteristics of the imaging system. It is used to characterize the physical law of X-ray intensity attenuation with the square of the propagation distance and the cosine of the incident angle. Using the calculated joint brightness attenuation compensation factor, the corrected image of S1 is initially luminous corrected to obtain the initial corrected image; S3. Using the preset improved multi-scale Retinex image enhancement model, reflectivity decomposition and detail enhancement are performed on the preliminary corrected image output by S2, and the enhanced backscattered image is output. The improved multi-scale Retinex model uses the preliminary corrected image as the illumination term, replacing the illumination component estimated by Gaussian filtering of the input image in the traditional Retinex model. Based on this, it performs multi-scale reflectance decomposition, fusing the reflectance components at different scales to obtain the enhanced backscattered image. S4. The enhanced backscattered image output from S3 is input into a multi-level deep learning framework consisting of a target detection module, a semantic segmentation module, and a context modeling module, for processing, and the result of classifying dangerous goods in the inspected object is output.
2. The backscatter image geometry and brightness adaptive processing method based on dual laser ranging as described in claim 1, characterized in that: In S1, the position and attitude parameters are calculated by solving a preset energy optimization problem. The energy optimization problem aims at the geometric registration consistency between the laser point image coordinates and their corresponding three-dimensional world coordinates, and integrates the constraints of motion trajectory smoothness and attitude continuity. By minimizing the total energy function of the energy optimization problem, the position and attitude parameters at all sampling times are jointly optimized to obtain the optimal position and attitude parameter sequence that satisfies geometric consistency and motion continuity, which is used for geometric correction of the original backscattered image.
3. The backscatter image geometry and brightness adaptive processing method based on dual laser ranging as described in claim 2, characterized in that: The total energy function is: Among them, P i,j This represents the true three-dimensional position of the j-th laser point at the i-th sampling time in the world coordinate system, calculated from dual-laser ranging data combined with the device installation geometry; U i,j The three-dimensional laser focal point in the equipment coordinate system is derived from laser ranging results and installation parameters; R i Let be a 3x3 rotation matrix, representing the attitude of the imaging system relative to the world coordinate system at sampling time i; t i R is a 3x1 translation vector, representing the position of the imaging system relative to the world coordinate system at sampling time i; i U i,j +t i Indicates that U i,j The theoretical three-dimensional position obtained after transforming from the device coordinate system to the world coordinate system; P i,j -(R i U i,j +t i ) represents the reprojection error between the real-world point and the theoretical world point, reflecting the geometric consistency of pose estimation; Δ 2 t i The translation vector t i The second-order difference is used as a translational acceleration constraint; λ and μ are regularization parameters; Represents the relative rotation matrix from sampling time i to i+1; The first term of the total energy function characterizes the geometric registration error between the laser point image coordinates and the coordinates obtained by backprojection from the current pose; the second and third terms impose smoothness constraints on the acceleration of the translation trajectory and the rate of change of the rotational attitude, respectively.
4. The backscatter image geometry and brightness adaptive processing method based on dual laser ranging as described in claim 1, characterized in that: In S2, the formula for calculating the compensation factor for brightness attenuation is: Where r is the propagation distance of the X-ray from the source point to the object surface represented by pixel x; θ is the incident angle of the X-ray at that position; and η(x) is the influence factor of the combined detector gain, system response, and scattering efficiency. The joint brightness attenuation compensation factor is used to perform geometric compensation on the original pixel intensity to obtain the distance-corrected pixel intensity: I dist_corr (x)=I raw (x)·k(x); In the formula, I raw (x) represents the original pixel intensity; I dist_corr (x) represents the pixel intensity after compensation for propagation distance and incident angle.
5. The backscatter image geometry and brightness adaptive processing method based on dual laser ranging as described in claim 4, characterized in that: In S2, after geometric compensation is completed, an adaptive gamma transform is performed on the distance-corrected image in the following manner: In the formula, I average (x) represents the average pixel value within the local window; I max (x) represents the maximum pixel value; The final preliminary corrected image is as follows: I ADAG (x)=clip[(I dist_corr (x)) γ(x) ,0,I max (x)]。 6. The backscatter image geometry and brightness adaptive processing method based on dual laser ranging as described in claim 1, characterized in that: In S3, during the multi-scale reflectance decomposition process, the reflectance component of each scale is calculated using the following formula: In the formula, I ADAG (x) is the initial corrected image output by S2; The standard deviation is σ s Gaussian kernel function, σ s Represents the s-th scale parameter; * indicates convolution; The initial corrected image I output by S2 ADAG (x) is used as the input for the illumination term, replacing the Gaussian filtering estimation of the input image in the traditional Retinex.
7. The backscatter image geometry and brightness adaptive processing method based on dual laser ranging as described in claim 6, characterized in that: In S3, the enhanced backscattered image is output as follows: In the formula, σ s This represents the s-th scale parameter; S is the number of scale parameters.
8. The backscatter image geometry and brightness adaptive processing method based on dual laser ranging as described in claim 1, characterized in that: In S4, the multi-level deep learning framework includes a target detection module, a semantic segmentation module, and a context modeling module connected in sequence; wherein, the target detection module is used to output the bounding boxes and class confidence of candidate regions; the semantic segmentation module outputs pixel-level structural masks for each candidate region; the context modeling module achieves global feature fusion through a multi-head self-attention mechanism, models long-distance semantic dependencies, and suppresses background artifacts.
9. The backscatter image geometry and brightness adaptive processing method based on dual laser ranging as described in claim 8, characterized in that: The overall loss function for training the model in the multi-level deep learning framework is: L=λ det L det +λ seg L seg +λ cls L cls +λ reg L reg ; In the formula, L det To detect loss; L seg For segmentation loss; L cls For classification loss; L reg For regularization loss; λ det , λ seg , λ cls , λ reg These are the corresponding weighting coefficients.
10. The backscatter image geometry and brightness adaptive processing method based on dual laser ranging as described in claim 9, characterized in that: The regularization loss L reg The algorithm also introduces structural similarity loss to improve the ability to preserve the original texture structure during semantic segmentation; the expression for the structural similarity loss is: L ssim =1-SSIM(M pred ,M gt ); Among them, M pred M is the pixel-level structure mask predicted by the model. gt For the corresponding real pixel-level structure mask, SSIM(M) pred M gt The structural similarity index is used to measure the structural similarity between the predicted result and the true label.