Method, device and equipment for processing security inspection machine scanning strip data and storage medium
By identifying the type of data from the scanning strips of the security inspection machine and processing it accordingly, the problem of dirty images caused by cold source startup and micro-arcsing of the X-ray source was solved, thus achieving image quality preservation and recognition accuracy.
Patent Information
- Application Number
- CN202411342069.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The dirty images in security inspection machine scans caused by cold source activation and micro-arc of X-ray source affect the recognition accuracy. Existing technologies may lead to image quality degradation or distortion during the process of removing dirty images.
The data type of the strip data is determined by the image data features based on the strip data, and corresponding processing is performed according to the type: the micro-ignition type is set to blank data, the air type is updated with the air template, and the package type is not processed.
It quickly eliminated dirty images, ensuring image quality and information integrity, and improving the accuracy of security personnel in identifying objects.
Smart Images

Figure CN119339130B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of image processing and security inspection technology, and in particular to a method, apparatus, equipment and storage medium for processing data of scanning strips in a security inspection machine. Background Technology
[0002] Security screening machines, also known as X-ray security scanners or security inspection equipment, are commonly used in public places such as airports, train stations, bus stations, subway stations, and hospitals. By inspecting luggage, packages, and items carried by individuals, security screening machines can effectively identify and intercept potentially dangerous items, thereby protecting the safety of public life and property. Therefore, the processing of scanned images by security screening machines is crucial in the security screening process.
[0003] Images scanned by security inspection machines often contain dirty images due to inconsistencies in the radiation dose between cold and hot sources or micro-arcing of the radiation source. Therefore, image processing, such as noise suppression, is usually performed on the scanned images to eliminate dirty images.
[0004] However, while the above methods eliminate dirty images, they also affect other content in the image, which can make it difficult for security personnel to identify packages and reduce the accuracy of identification. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for processing data from security inspection machine scanning strips, in order to solve the problem of how to eliminate dirty images in security inspection machine scans.
[0006] In a first aspect, this application provides a method for processing data from scanning strips on a security inspection machine, including:
[0007] Based on the image data characteristics of the strip data scanned by the security inspection machine, the type of the strip data is determined. The type includes air type, package type, or micro-arc type. Specifically, air type strip data refers to data collected by the security inspection machine detector when the X-ray source of the security inspection machine is turned on and there is no package. Micro-arc type strip data refers to strip data containing dirty images or artifacts caused by dose fluctuations of the X-ray source of the security inspection machine. Package type strip data refers to strip data collected after the security inspection machine scans a package.
[0008] Based on the type of the strip data, determine the operation for the strip data, including at least one of the following:
[0009] If the type of the strip data is air, then update the air template according to the strip data;
[0010] If the type of the strip data is micro-ignition, then the strip data is set to blank data;
[0011] If the type of the strip data is a package type, then the strip data will not be processed.
[0012] Secondly, this application provides a processing apparatus for strip data scanned by a security inspection machine, comprising:
[0013] The first determining module is used to determine the type of the strip data based on the image data characteristics of the strip data scanned by the security inspection machine. The type includes air type, package type, or micro-arc type. Specifically, air type strip data means that the strip data is collected by the detector of the security inspection machine when the X-ray source of the security inspection machine is turned on and there is no package. Micro-arc type strip data means that the strip data contains dirty images or artifacts caused by the dose fluctuation of the X-ray source of the security inspection machine. Package type strip data means that the strip data is collected after the security inspection machine scans a package.
[0014] The second determining module is configured to determine an operation for the strip data based on the type of the strip data, including at least one of the following:
[0015] If the type of the strip data is air, then update the air template according to the strip data;
[0016] If the type of the strip data is micro-ignition, then the strip data is set to blank data;
[0017] If the type of the strip data is a package type, then the strip data will not be processed.
[0018] Thirdly, this application provides an electronic device, including: a processor, and a memory and a display communicatively connected to the processor;
[0019] The memory stores computer-executed instructions;
[0020] The processor executes computer execution instructions stored in the memory to implement the security inspection machine scanning strip data processing method described in any one of the first aspects.
[0021] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the processing method for scanning strip data of a security inspection machine as described in any of the preceding aspects.
[0022] Fifthly, this application provides a computer program product, which includes a computer program that, when executed by a processor, implements the processing method for scanning strip data of a security inspection machine as described in any of the preceding aspects.
[0023] The processing method, apparatus, equipment, and storage medium for scanning strip data by a security inspection machine provided in this application determine the type of strip data based on the image data characteristics of the strip data scanned by the security inspection machine. If the type of strip data is micro-arc type, the strip data is set to blank data; if the type of strip data is air type, the air template is updated according to the strip data. By directly setting micro-arc type strip data to blank data, while leaving package type strip data unprocessed, the dirty image caused by micro-arc is quickly and directly eliminated. By updating the air template, the accuracy of subsequent correction is ensured, effectively removing cold and hot source dirty images and ensuring the original quality and information of the image. The solution provided by the embodiments of this application improves image readability and enhances the accuracy of object recognition by security inspectors. Attached Figure Description
[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0025] Figure 1 This application scenario diagram illustrates the method for processing strip data scanning by a security inspection machine as provided in the embodiments of this application.
[0026] Figure 2 This is a system architecture diagram for a security inspection machine.
[0027] Figure 3 This is a schematic diagram of an exemplary X-ray source structure for a security inspection machine;
[0028] Figure 4 A flowchart illustrating an embodiment of the method for processing scanned strip data by a security inspection machine provided in this application.
[0029] Figure 5 A flowchart illustrating Embodiment 2 of the method for processing scanned strip data by a security inspection machine, as provided in this application.
[0030] Figure 6 This is a schematic diagram of an example security screening machine scanning image;
[0031] Figure 7 A flowchart illustrating Embodiment 3 of the method for processing scanned strip data by a security inspection machine, as provided in this application.
[0032] Figure 8 A flowchart illustrating a specific example of the method for processing strip data scanning by a security inspection machine provided in this application embodiment;
[0033] Figure 9 This is a schematic diagram of a dirty image caused by the start-up of a cold source.
[0034] Figure 10 A schematic diagram of the dirt caused by micro-arcs from the X-ray source;
[0035] Figure 11 A schematic diagram of a scanned image used to eliminate dirt caused by hot or cold sources;
[0036] Figure 12 A schematic diagram of a scanned image used to eliminate dirt caused by micro-arcs from the X-ray source;
[0037] Figure 13 A schematic diagram of the structure of a processing device for scanning strip data of a security inspection machine provided in this application embodiment;
[0038] Figure 14 A schematic diagram of the second embodiment of the processing device for scanning strip data of the edge-mounted security inspection machine provided in this application;
[0039] Figure 15 A schematic diagram of the structure of the processing device for scanning strip data of the security inspection machine provided in this application embodiment 3;
[0040] Figure 16 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0041] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0042] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0043] With continuous technological advancements, X-ray security inspection machines have gradually evolved into a highly efficient and accurate security screening tool. The introduction of computer technology has enabled X-ray security inspection machines to automate image processing and analysis. Modern X-ray security inspection machines have achieved a high level of intelligence and automation, capable of scanning and inspecting luggage, goods, and other items from all angles and perspectives. Today, X-ray security inspection machines are widely used in security checks across various modes of transportation, including aviation, railways, highways, and waterways. However, security inspection machine scans often contain abnormal images of non-target objects or areas, known as "dirty images." These images can interfere with the judgment of security personnel. While image filtering can eliminate dirty images, this method can affect the accuracy of security personnel's assessment of the scanned items. Furthermore, image enhancement can lead to over-enhancement, causing image distortion and affecting the image's authenticity.
[0044] To address the aforementioned problems, this application provides a method, apparatus, device, and storage medium for processing scanned strip data from a security inspection machine, achieving accurate removal of dirty images from scanned images. Specifically, dirty images are typically removed through image filtering; however, this method can affect security personnel's accurate judgment of scanned items. If image enhancement is used, excessive enhancement can lead to image distortion, affecting the image's authenticity. Considering these issues, the inventors investigated whether it is possible to determine the data type of each strip scanned by the security inspection machine, thereby directly whitening the micro-arc data type (i.e., fluctuating strip data) and updating the air template based on the air type strip data, effectively eliminating dirty images caused by cold source activation or micro-arc of the X-ray source. Based on this, the technical solution of this application is proposed.
[0045] Figure 1 This is an application scenario diagram of the security inspection machine scanning strip data processing method provided in the embodiments of this application, such as... Figure 1 As shown, the scenario includes at least the object to be detected and the security inspection equipment, wherein the security inspection equipment includes at least a detector, an X-ray source, a roller, a collimator, and a server. Figure 2 For example, a system architecture diagram of a security inspection machine. Figure 2As shown, the system includes a control system, a hardware system, and a data processing system. The control system includes a sensing unit and a control unit, used to detect whether an object to be detected enters the security inspection equipment and adjust the system parameters of the security inspection equipment. The hardware system includes a radiation source (including but not limited to an X-ray machine, accelerator, and radioactive isotopes), detectors (including but not limited to monoenergetic detectors, pseudo-dual-energy detectors, and spectral detectors), and a motion transmission mechanism, which is represented here by a commonly used roller. The hardware system is used to emit and receive X-rays and to move the object to be detected at different speeds within the security inspection equipment. The data processing system includes a data acquisition unit, a full-load matching unit, an image processing unit, and an image display unit, which complete the functions of detector data acquisition, full-load image matching, strip data processing and stitching, and image display. Figure 3 This is a schematic diagram of an exemplary X-ray source structure for a security inspection machine, combined with... Figure 1 , Figure 2 and Figure 3 The security inspection machine uses a line scan mode. The imaging process is as follows: X-rays are emitted from the X-ray source and collimated into a fan-shaped beam by the collimator to reach the detector, forming the scanning plane; the object to be inspected passes through the scanning plane in a specific direction under the drive of the conveying mechanism (roller); during this process, the detector continuously measures the X-ray signal that passes through the object and reaches the detector. Each measurement time is called an integration time. After each measurement, a signal is output, called a strip data; the server stitches together a series of strip data in the order of acquisition to complete the imaging process of the object to be inspected.
[0046] Figure 3 The core component of the X-ray source is the internal vacuum X-ray tube. Due to the thermal expansion and contraction effect, temperature changes inside the X-ray tube may cause the position of the anode tungsten target to shift, resulting in fluctuations in the number of photons emitted by the X-ray source. The same detector may capture different signal values at different times. Therefore, when the cold source is activated and the full-load template is not updated in time, the security inspection equipment image will appear dirty. In addition, micro-arcing caused by the instability of the X-ray source can also lead to dirty images, making it difficult for security inspectors to identify and greatly reducing the accuracy of identification and user satisfaction.
[0047] Optionally, after the detector scans and obtains the strip data, the server can determine the data type of the strip data based on its data characteristics, directly whiten the strip data of the determined micro-ignition data type, and update the air template based on the strip data of the determined air type, effectively eliminating dirty images without affecting the quality of the scanned output image.
[0048] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0049] Figure 4 A flowchart illustrating an embodiment of the method for processing data from scanning strips by a security inspection machine provided in this application is shown below. Figure 4 As shown, the method specifically includes:
[0050] S401: Determine the type of strip data based on the image data characteristics of the strip data scanned by the security inspection machine.
[0051] In this step, during the operation of the security inspection machine, the instability of the X-ray source can lead to micro-arcing, resulting in dirty images in the subsequent imaging process. This affects the identification by security personnel. To ensure the quality of the scanned images and effectively eliminate dirty images, the image data characteristics of the strip data can be used to determine the type of strip data, identifying abnormal strip data collected when the X-ray source is unstable and air-type strip data. The types of strip data include air-type, package-type, or micro-arcing type.
[0052] Specifically, by calculating the image data features of the strip data, the obtained image data can include standard deviation, normalized gray level drop, normalized horizontal mean difference, normalized row mean, normalized gray level distribution, and normalized pixel value. If the normalized grayscale drop, normalized grayscale distribution, normalized horizontal mean difference, and normalized row data mean satisfy the first preset condition, then the strip data is determined to be of the micro-ignition type. If the normalized grayscale drop, normalized grayscale distribution, standard deviation, normalized row data mean, normalized horizontal mean difference, and normalized pixel value satisfy the second preset condition, then the strip data is determined to be of the package type. If the normalized grayscale drop, normalized grayscale distribution, standard deviation, normalized pixel value, and normalized row data mean satisfy the third preset condition, then the strip data is determined to be of the air type. It should be noted that the horizontal mean difference represents the number of adjacent row data in the strip data collected at the seam of the detection plate whose mean difference is greater than the preset mean difference threshold.
[0053] The image data features of the strip data mentioned in the embodiments of this application are described below. The standard deviation of the strip data refers to the maximum value of the standard deviation of the strip data rows, which is calculated in the same way as the approximate standard deviation.
[0054] A sudden drop in grayscale after normalization: This refers to a significant change in the mean grayscale values at the top and bottom of the first and last columns of the normalized strip data. The top refers to the first p rows starting from the first row, and the bottom refers to the last p rows starting from the last row. For example, p can be an integer greater than or equal to 10, and generally does not exceed 30 rows.
[0055] The difference in the normalized lateral mean is the number of normalized data points at the seams of each detector plate (i.e., the last row of the strip data corresponding to the previous detector plate and the first row of the strip data corresponding to the next detector plate) that are above the empirical value of the feature threshold.
[0056] Normalized row mean: The ratio of the minimum to the maximum value of the normalized row mean of the strip data.
[0057] Normalized grayscale distribution: This refers to the number of pixels with grayscale values below a specific threshold in the first column, last column, and column with the lowest vertical mean of the normalized strip data. Horizontal and vertical data are relative concepts; for example, the horizontal mean of strip data refers to the mean of the rows in the strip data, while the vertical mean of strip data can refer to the mean of the columns in the strip data.
[0058] Normalized pixel value: The number of pixel values in the first two columns of the normalized strip data that are simultaneously below the empirical value of the feature threshold, where n is an integer greater than 1.
[0059] Security inspection machines typically use dual-energy detectors, so the scanned strip data includes high-energy data and low-energy data. The above judgment on the data type of the strip is based on the low-energy data in the strip data.
[0060] It should be noted that the first, second, and third preset conditions mentioned above are conditions pre-set according to different data types to determine the data type of the stripe.
[0061] Optionally, the normalized image data features mentioned above can be expressed by the following normalization formula:
[0062]
[0063] P cali =T*C Anti *C graylevel +C baseline
[0064] Where T is the transparency of the acquired image, and P is the acquired image value. air For air quality, P bk This is the background value. caliThis represents the corrected image value. C graylevel To determine the grayscale levels of the corrected image, a 16-bit grayscale image is used here, with a value of 2. 16 -1, meaning the normalized data range is 0-65535, C Anti C is the anti-overflow coefficient. baseline The baseline value is defined as follows. The air value used in the normalization process for calculating image data features of the strip data is the air value in the initial air template.
[0065] S402: If the strip data is of type air, then update the air template based on the strip data.
[0066] In this step, the type of strip data is determined through the above steps. If the strip data is determined to be of the air type, a dirty image will appear when the cold source of the security inspection machine is activated and the full-load template is not updated in time. Therefore, in order to accurately eliminate the dirty image in the scanned image, the average value of the determined air type strip data is replaced with a new air template, so that the subsequent strip data correction is more accurate. This also ensures the quality of the scanned image and prevents overexposure.
[0067] Specifically, if the strip data includes low-energy data and high-energy data, then the low-energy air template is updated based on the low-energy data in the strip data, and the high-energy air template is updated based on the high-energy data in the strip data.
[0068] Optionally, the method may further include:
[0069] S403: If the strip data type is micro-ignition, then set the strip data to blank data.
[0070] If the strip data is determined to be of the micro-arc type, it means that the strip data was acquired when the X-ray source was unstable. In subsequent imaging, this will result in a dirty image in the image. In order to effectively eliminate the dirty image, the strip data is directly set to white, that is, set to blank data. In the final pseudo-color image, it is displayed as the background color and cannot be distinguished by the naked eye, thereby avoiding misjudgment by security personnel.
[0071] S404: If the stripe data is of type parcel, no processing is required.
[0072] The processing method for scanning strip data by a security inspection machine provided in this embodiment determines the type of strip data based on the image data characteristics of the strip data scanned by the security inspection machine. If the type of strip data is micro-arc type, the strip data is set to blank data; if the type of strip data is air type, the air template is updated according to the strip data. By directly setting micro-arc type strip data to blank data, the dirty image caused by micro-arc is quickly and directly eliminated. By updating the air template, the accuracy of subsequent correction is ensured, effectively removing cold and hot source dirty images, and ensuring the original quality and information of the image. This improves image readability and simultaneously enhances the accuracy of object recognition by security inspectors.
[0073] Figure 5 A flowchart illustrating Embodiment 2 of the method for processing data from scanning strips by a security inspection machine provided in this application is shown below. Figure 5 As shown, based on the above embodiments, the image data features of the strip data include standard deviation, normalized gray-level drop, normalized horizontal mean difference, normalized row data mean, normalized gray-level distribution, and normalized pixel value. Therefore, step S401 specifically includes:
[0074] S501: If the normalized grayscale drop, the normalized grayscale distribution, the difference in the normalized horizontal mean, and the normalized row data mean satisfy the first preset condition, then the strip data is determined to be of the micro-ignition type.
[0075] In this step, to accurately determine the type of strip data, it is necessary to make an accurate judgment based on the image data characteristics of the strip data. Micro-ignition usually causes local bright or dark areas in the image, which is reflected in a significant change in the mean gray value, that is, there will be a sudden drop in gray value.
[0076] Examining the grayscale distribution of the strip data, particularly its grayscale characteristics, and comparing it with the grayscale values of the surrounding normal areas, can help determine if micro-arcing exists. If the grayscale values of the strip data are significantly higher or lower than the surrounding areas, and this change is continuous within the strip, this could be an indication of micro-arcing. A detailed analysis of each pixel in the strip data is necessary, examining its grayscale value, gradient, texture, and other features. Micro-arcing may leave specific traces at the pixel level, such as high gradient values or specific texture patterns. Further verification of the existence of micro-arcing can be achieved by statistically analyzing the feature distribution of pixels within the strip region.
[0077] Calculate the difference in grayscale mean between the strip data and its adjacent rows (or columns, depending on the strip direction), i.e., the lateral mean difference. Micro-arcs will cause a significant difference in the grayscale mean of the strip region compared to adjacent regions. If this difference is consistent within the strip region and is significantly higher or lower than the background noise level, it can further support the determination of micro-arcs.
[0078] Analyzing the mean grayscale value of each row in the strip data, i.e., the row data mean characteristic, reveals that micro-ignition can cause abnormal fluctuations in the mean grayscale value of the row data, especially when the strip is wide or the grayscale changes are significant. The ratio of the minimum to the maximum mean of the row data can be used to identify significant mean differences, thus determining whether the strip is of the micro-ignition type. Here, the minimum and maximum mean values represent the lower and upper limits of the grayscale distribution in the strip data, respectively. The ratio of the minimum to the maximum value quantifies the degree of uniformity of the distribution.
[0079] Based on the characteristics of micro-arcing phenomena in the aforementioned image data, a first preset condition can be set to accurately determine whether the strip data is of the micro-arcing type.
[0080] Specifically, the first preset condition may include:
[0081] 1. The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both greater than the preset mean difference threshold. In addition, the first number of pixels in the strip data is less than the preset first pixel number threshold. Here, the first number represents the number of pixels at the first position whose pixel value is less than the first preset pixel value. The pixels at the first position represent the pixels corresponding to the first column, the last column, and the column with the smallest vertical mean of grayscale value after the strip data is normalized. The upper mean is the mean of the p rows of data before the first row of data, and the lower mean is the mean of the p rows of data after the last row of data. For example, p can be an integer greater than or equal to 10.
[0082] For example, Figure 6 This is an example schematic diagram of a security screening machine scanning image, such as... Figure 6 As shown, the top image is the original scan data, and the bottom image is the normalized grayscale image. Micro-arcs from the X-ray source caused the dirty image. Therefore, we first need to determine the grayscale drop characteristics after normalizing the strip data: determine if there are grayscale drops at the top and bottom of the first and last columns after normalizing the strip data, and then calculate... Figure 6 The mean value at the positions of the four black vertical lines in the image below, A top1 A top2 A bottom1 A bottom2For example, the mean of the top 10 rows in the first column of the striped data after normalization (A) top1 ) and the average of the bottom 10 rows (A) bottom1 ) and the average of the top 10 rows in the last column (A) top2 ) and the average of the bottom 10 rows (A) bottom2 ).
[0083] Then, the grayscale distribution characteristics of the strip data after normalization are determined: the number of pixels (nNum) with grayscale values below 58000 in the first column, last column, and column with the smallest vertical mean after strip data normalization are calculated. top1 -A top2 >0.015, A bottom1 -A bottom2 If the value is greater than 0.015, it indicates a sudden drop in grayscale, and if nNum < 6, then the data in this strip is determined to be of the micro-ignition type.
[0084] 2. The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The ratio of the row data means of the strip data is greater than the preset first empirical threshold, and the difference of the horizontal means after the strip data is normalized is greater than the preset horizontal mean difference threshold. The ratio of the row data means represents the ratio of the minimum and maximum values of the row data means after the strip data is normalized.
[0085] For example, if we calculate the grayscale drop feature: the average of the top 10 rows and the bottom 10 rows of the first column after normalization of the strip data, and the average of the top 10 rows and the bottom 10 rows of the last column, A top1 -A top2 ≤0.015 or A bottom1 -A bottom2 If the mean is ≤0.015, meaning there is no sudden drop in grayscale, then the mean characteristic of the normalized row data continues to be determined. The specific calculation method is: calculate the ratio of the minimum to the maximum mean, denoted as:
[0086]
[0087] Where A min and A max These are the minimum and maximum values of the normalized row mean, respectively.
[0088] A linear array detector is composed of multiple independent detection units. Because the response of each detection unit is inconsistent, the resulting grayscale in the acquired strip data is inconsistent. Figure 7 Here is an example image of a security screening machine scan, such as... Figure 7As shown, the left side represents the original data, which is composed of multiple stripe data. The right side represents the normalized data, as shown below. Figure 7 The left half of the results on the right side shows the data after normalization using the background and air templates. However, if the collected background and air templates do not match the actual dose of the band data, this inconsistency cannot be eliminated, and the results will be displayed after normalization. Figure 7 The right half of the right-hand side of the image shows a horizontal dirt map. The difference in the normalized horizontal mean is then determined by calculating the horizontal mean A at the seams of each detector plate (i.e., the last row of the previous detector plate and the first row of the next detector plate). i and A i+1 Calculate the difference A between the lateral mean values at the joint. i+1 -A i The number of elements greater than the empirical feature threshold of 1500 is denoted as V. change V chahge This is represented as the difference in the horizontal mean.
[0089] If A top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015, and F Ratio >0.86 and V change If the value is greater than 2, then the strip data is determined to be of the micro-ignition type.
[0090] It should be noted that if either of the two preset conditions mentioned above is met, the strip data can be determined to be of the micro-ignition type.
[0091] It should be noted that the calculation of the average of the top 10 rows and the bottom 10 rows of the first column and the average of the top 10 rows and the bottom 10 rows of the last column after normalization of the strip data is only an example of 10 rows. Usually, there will be no more than 30 rows of data. This application embodiment does not make a specific limitation, and the number of rows can be selected according to the actual situation.
[0092] S502: If the normalized grayscale drop, the normalized grayscale distribution, the standard deviation, the normalized row data mean, the normalized horizontal mean difference, and the normalized pixel value meet the second preset condition, then the strip data is determined to be of the package type.
[0093] In this step, to accurately determine the type of strip data, it is necessary to make an accurate judgment based on the image data characteristics of the strip data. Gray values reflect the brightness information of each pixel in the image. Wrapped data usually has a relatively uniform gray value distribution. Standard deviation is an indicator of the dispersion of gray value distribution. If the wrapped data portion of the image differs significantly from the background or other non-wrapped areas, then the standard deviation of these areas may differ. The row mean refers to the average gray value of each row of pixels in the strip data. For wrapped data, if they have a consistent width and shape, then the change in their gray value mean along the row direction of the image may exhibit a specific pattern (such as smooth, gradual change, or abrupt change). By analyzing the trend of the row mean change, the boundaries or specific shapes of the wraps can also be identified. Lateral mean difference refers to the difference in gray value mean between adjacent rows or columns. For wrapped data, if they present obvious boundaries in the image, then the lateral mean difference at these boundaries may be large. By analyzing these differences, the presence and location of the wraps can be further confirmed. For wrapped type strip data, the pixels are relatively uniform. Then, based on the characteristics of the image data in the strip data of the package type, a second preset condition can be set to accurately determine whether the strip data is of the package type.
[0094] Specifically, the second preset condition may include:
[0095] 1. The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both greater than the mean difference threshold, and the first quantity is greater than or equal to the first pixel number threshold.
[0096] For example, firstly, determine the sudden drop in grayscale after normalization: judge whether there is a sudden drop in grayscale at the top and bottom of the first and last columns of the normalized strip data. If there is a sudden drop, i.e., A top1 -A top2 >0.015 and A bottom1 -A bottom2 If the value is greater than 0.015, the normalized grayscale distribution is determined by judging the number of pixels nNum with a grayscale value below 58000 in the first column, the last column, and the column with the smallest vertical mean after the strip data is normalized. If nNum≥6, it means that the strip data is of the package type.
[0097] 2. The difference between the upper mean of the first column and the upper mean of the last column after normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is less than the standard deviation threshold. The second number of pixels in the strip data is less than the preset second pixel number threshold. At least m pixels in the strip data at the second position have pixel values less than the preset feature threshold. Here, the second number represents the number of pixels at the first position whose pixel value is less than the second preset pixel value. The pixels at the second position represent the pixels corresponding to n consecutive rows in the first column and n consecutive rows in the second column after normalization of the strip data. n and m are integers greater than 1.
[0098] For example, firstly, determine the sudden drop in grayscale after normalization: judge whether there is a sudden drop in grayscale at the top and bottom of the first and last columns of the normalized strip data. If there is no sudden drop, i.e., A top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015. Then, the consistency of the row data in the strip data is judged, i.e., the standard deviation of each row of the strip data is calculated. For each row of data in the strip data, if the strip data is of the air type, its data fluctuation is small, and the standard deviation is small (the standard deviation is an approximate standard deviation, directly using the absolute value instead of the common method of squaring and then taking the square root of the standard deviation). If there are inclusions or micro-ignitions in the strip data, the standard deviation will be larger. However, for very uniform inclusions (such as a uniform steel plate), the standard deviation in the original strip data will also be smaller. The standard deviation of each row of data can be calculated using the following formula:
[0099]
[0100]
[0101]
[0102] Where, μ r Let x be the mean of the r-th row of the strip data. ir Let be the pixel value in the r-th row and i-th column of the strip data, N be the number of columns in the strip data, R be the number of rows in the strip data, and σ be the pixel value in the r-th row and i-th column of the strip data. r Let σ be the standard deviation of the r-th row of the strip data. max This represents the maximum standard deviation.
[0103] If σ maxIf <Threshold1, then the number of pixels (nNum) with a grayscale value below 60000 in the first, last, and lowest vertical average columns of the strip data after normalization is determined. Furthermore, special package types are considered; for some packages, such as thin packages like backpack straps, the normalized grayscale value is higher, close to the grayscale value of air, leading to a higher calculated F... Ratio The values are also too large. To avoid misclassifying thin packages like strapping as air, the normalized pixel values are determined as follows: If at least three pixels in the first five consecutive rows of the normalized strip data have pixel values less than the empirical feature threshold of 62000 (a value less than this threshold indicates a possible package at that location), then the corresponding five rows of data in the second strip data are checked to see if at least three pixels in the same location have pixel values less than the empirical feature threshold of 62000. If it is determined that at least three pixels in the first two columns of the strip data have pixel values less than the empirical feature threshold of 62000, then it is identified as a thin package.
[0104] Based on the above calculations, if σ max If <Threshold1, nNum < 24 and the above conditions for thin packages are met, then the strip data is determined to be of package type.
[0105] It should be noted that due to the performance differences of different radiation sources or detectors, the consistency of inline data varies greatly, making it difficult to determine a universal empirical threshold. For example, a universal initial empirical threshold Threshold1 = 350 can be given.
[0106] 3. The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold, and the standard deviation of the strip data is greater than or equal to the standard deviation threshold, and the first quantity is greater than or equal to the second pixel quantity threshold.
[0107] For example, first, we determine the sudden drop in grayscale after normalization: there is no sudden drop in grayscale at the top and bottom of the first and last columns of the strip data after normalization, i.e., A. top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015. Then for the number of rows in the striped data, and the standard deviation σ... max If nNum is greater than or equal to Threshold1, then the normalized grayscale distribution is determined by judging the number of pixels nNum with a grayscale value below 58000 in the first column, the last column, and the column with the smallest vertical mean after the strip data is normalized. If nNum is greater than or equal to 24, then the strip data is determined to be of the package type.
[0108] 4. The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is greater than or equal to the standard deviation threshold. At least m pixels at the second position have pixel values less than the feature threshold. The ratio of the row data mean of the strip data is less than the preset second empirical threshold.
[0109] For example, the determination is made by checking whether there are sudden drops in grayscale at the top and bottom of the first and last columns of the normalized strip data; that is, by checking for sudden drops in grayscale after normalization. If no sudden drops in grayscale are found, the row data consistency (standard deviation) of the strip data is judged. max If the value is ≥Threshold1, then a special package type is considered, which means judging the normalized pixel value. Similarly, for some packages, such as thin packages like backpack straps, the normalized grayscale value is higher, close to the grayscale value of air, leading to a higher calculated F... Ratio The values are also too large. To avoid misclassifying thin packages like bag straps as air, we determine that in the first column of the normalized strip data, at least three pixels in five consecutive rows have pixel values less than the empirical feature threshold of 62000 (if the value is less than this threshold, a package may be present at that location). Then, we check if at least three pixels in the corresponding five rows of the second column of the strip data have pixel values less than the empirical feature threshold of 62000. If it is determined that in the first two columns of the strip data, at least three pixels in five consecutive rows have pixel values less than the empirical feature threshold of 62000, the mean of the normalized row data is determined: for the mean of each row of the normalized strip data, the ratio of the minimum to the maximum mean is calculated, and the comparison value F is used. Ratio Make a judgment if F Ratio If the value is less than 0.89, then the striped data is determined to be of the package type.
[0110] It should be noted that if any one of the above five preset conditions is met, the strip data can be determined to be of the package type.
[0111] S503: If the normalized grayscale drop, the normalized grayscale distribution, the standard deviation, the normalized pixel value, and the normalized row data mean satisfy the third preset condition, then the strip data is determined to be of the air type.
[0112] In this step, to accurately determine the type of the strip data, it is necessary to make an accurate judgment based on the image data characteristics of the strip data. Air-type strip data is represented in the image by low grayscale values (i.e., darker) or high grayscale values (i.e., brighter). For each row of data in a strip, if the strip data is of the air type, its data fluctuation is small, and its standard deviation is small. Therefore, based on the characteristics of the image data in air-type strip data, a third preset condition can be set to accurately determine whether the strip data is of the air type.
[0113] Specifically, the third preset condition may include:
[0114] 1. The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold, and the standard deviation of the strip data is less than the standard deviation threshold, and the second quantity is less than or equal to the second pixel number threshold.
[0115] For example, firstly, the sudden drop in grayscale after normalization is determined. If it is determined that there is no sudden drop in grayscale at the c-point and bottom of the first and last columns of the strip data after normalization, that is, A top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015. And the standard deviation σ max If the threshold is less than 1, the normalized grayscale distribution is determined by counting the number of pixels (nNum) with a grayscale value below 60000 in the first, last, and lowest vertical average columns of the normalized strip data. If nNum ≤ 24, the strip data is determined to be of the "air" type. When the strip data meets the above condition and is determined to be of the "air" type, Threshold1 needs to be updated. In subsequent strip data type determinations, the updated Threshold1 will be used.
[0116] For example, given an initial empirical threshold Threshold1 = 350, if the data type of the strip is determined to be air during subsequent judgments, then this empirical threshold is updated: if the maximum standard deviation of the strip data is σ... max , and σ max If Threshold1 < 40, then update Threshold1 to σ. max +40 ensures that Threshold1 is 40 more than the maximum standard deviation of the air-type strip data.
[0117] 2. The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold, and the pixel value of the pixel at the second position is greater than or equal to the feature threshold.
[0118] For example, if it is determined that there is no sudden drop in grayscale at the top and bottom of the first and last columns after the strip data is normalized, then it is determined whether the strip data is a thin wrapper. That is, it is determined whether there are at least 3 pixels with pixel values less than the feature threshold empirical value of 62000 in the first two columns of data after the strip data is normalized. If it is determined that it is not a thin wrapper, then the strip data is determined to be of the air type.
[0119] It should be noted that when the strip data is determined to be of the air type under this condition, Threshold1 also needs to be updated. The specific update method is the same as the method described above, and will not be repeated here.
[0120] 3. The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is greater than or equal to the standard deviation threshold. The first quantity is less than the second pixel quantity threshold. The ratio of the row data mean of the strip data is greater than or equal to the second empirical threshold.
[0121] For example, the determination of sudden gray-level drops after normalization is performed. If it is determined that there are no sudden gray-level drops at the top and bottom of the first and last columns of the normalized strip data, i.e., A... top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015. And the standard deviation σ max If the value is ≥Threshold1, then the normalized grayscale distribution is determined: The number of pixels (nNum) with a grayscale value below 58000 in the first, last, and lowest vertical average columns of the normalized strip data is determined. If nNum < 24, then the mean of the normalized row data is determined: For the mean of each row of the normalized strip data, the ratio of the minimum to the maximum mean is calculated, and the ratio is compared to the value F. Ratio Make a judgment if F Ratio If the value is ≥0.89, then the strip data is determined to be of the air type.
[0122] It should be noted that Threshold1 does not need to be updated under this condition.
[0123] 4. The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is greater than or equal to the standard deviation threshold. The first quantity is less than the second pixel quantity threshold. The pixel value of the pixel at the second position is greater than or equal to the feature threshold.
[0124] For example, the determination of sudden gray-level drops after normalization is performed. If it is determined that there are no sudden gray-level drops at the top and bottom of the first and last columns of the normalized strip data, i.e., A... top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015. And the standard deviation σ max If the value is greater than or equal to Threshold1, then the grayscale distribution after normalization is determined: the number of pixels nNum with a grayscale value below 58000 in the first column, last column, and column with the smallest vertical mean after normalization of the strip data is judged. If nNum < 24, then whether the strip data is a special thin-packed strip is determined. Then the normalized pixel values are determined: whether the normalized pixels of the strip data satisfy the condition that at least 3 pixels in 5 consecutive rows of the first and second columns have a pixel value less than the feature threshold empirical value of 62000. If not, then the strip data is determined to be of the air type.
[0125] It should be noted that if any one of the above four preset conditions is met, the strip data can be determined to be of the air type.
[0126] Optionally, in the embodiments of this application, the normalization process of the strip data in the image data feature calculation process is to make the calculated image data more accurate, and the normalization process is only for the purpose of calculating image data and has no other meaning.
[0127] Each specific value in the above examples is just one example and can be preset according to the actual processing scenario. This application does not impose any specific limitations on the embodiments.
[0128] The processing method for scanning strip data by a security inspection machine provided in this embodiment determines the strip data to be of the micro-arc type if the normalized grayscale drop, normalized grayscale distribution, normalized lateral mean difference, and normalized row data mean satisfy a first preset condition; if the normalized grayscale drop, normalized grayscale distribution, standard deviation, normalized row data mean, normalized lateral mean difference, and normalized pixel value satisfy a second preset condition; and if the normalized grayscale drop, normalized grayscale distribution, standard deviation, normalized pixel value, and normalized row data mean satisfy a third preset condition, then the strip data is determined to be of the air type. By calculating the image data features of the strip data and based on the conditions of different image data, the type of strip data is accurately determined, thus playing a crucial role in subsequent dirty image removal, and ensuring the quality of the scanned image while removing dirty images.
[0129] Figure 7 A flowchart illustrating Embodiment 3 of the method for processing scanned strip data by a security inspection machine provided in this application is shown below. Figure 7 As shown, based on the above embodiments, the method further includes:
[0130] S701: Based on the updated low-energy air template and the pre-acquired background template, the low-energy data of the strip data is corrected to obtain the corrected low-energy data.
[0131] S702: Based on the updated high-energy air template and background template, the high-energy data of the strip data is corrected to obtain the corrected high-energy data.
[0132] S703: Processes the corrected low-energy band data and the corrected high-energy data to generate a pseudo-color image of the strip data.
[0133] S704: Stitch the striped pseudo-color image into the scanned image.
[0134] Linear array detectors are composed of multiple independent detection units. Due to differences in scintillator manufacturing and defects in readout electronics, the response values of each detection unit to X-rays of the same intensity are not identical. In practical applications, full-load data and background data need to be collected to perform full-load background correction on the high-energy and low-energy raw data collected by the detector. After determining the type of strip data, the strip data is corrected based on the updated air template and background template. The specific correction can be achieved using the following formula:
[0135]
[0136] P cali =T*C Anti *Cgraylevel +C baseline
[0137] Where T is the transparency of the acquired image, and P is the acquired image value. air For air quality, P bk This is the background value. cali This represents the corrected image value. C graylevel To determine the grayscale levels of the corrected image, a 16-bit grayscale image is used here, with a value of 2. 16 -1, meaning the normalized data range is 0-65535, C Anti C is the anti-overflow coefficient. baseline This is the baseline value.
[0138] It should be noted that P in the above formula air The air value is the air value in the updated air template.
[0139] The above formula is used for correction of both low-energy and high-energy data.
[0140] It is important to note that since the security inspection machine collects strip data in chronological order, it will perform type determination after collecting a strip data. Once the air type of the strip data is determined, the air template will be updated. This update of the air template includes updating the low-energy air template and the high-energy air template.
[0141] After correcting the strip data using the above formula, optionally, for some smaller security inspection machine models, the distance from which the X-ray source passes through the object to the detector is inconsistent, resulting in severe deformation of the object in the security inspection image. Therefore, geometric correction can also be performed on the collected data after correction.
[0142] After the correction process is completed, the strip data is output as a strip pseudo-color image and stitched into the scanned image.
[0143] Optionally, before generating the striped pseudo-color image and stitching it to the scanned image, conventional security inspection image processing operations such as fusion, enhancement, and noise reduction can be performed on the corrected low-energy data and corrected high-energy data to ensure image quality.
[0144] For example, the fusion of corrected low-energy data and corrected high-energy data can be achieved through multispectral fusion. If the corrected low-energy and high-energy data have different spectral resolutions or bands, they can be merged through band synthesis (such as PCA fusion, IHS fusion, etc.). Spatial fusion can also be used. If the corrected low-energy and high-energy data have different spatial resolutions, they can be spatially aligned and fused through techniques such as super-resolution reconstruction or image interpolation.
[0145] For enhancement, aimed at improving image contrast, sharpening edges, or highlighting specific features to facilitate visual analysis, histogram equalization can be used to improve image contrast. Sharpening filters enhance image edges and details. Color enhancement, if the data is already in color, can optimize the display by adjusting parameters such as color saturation and brightness.
[0146] Noise reduction aims to remove random noise or unnecessary interference from an image to improve its clarity and quality. This can be achieved through median filtering, Gaussian filtering, wavelet denoising, and other techniques.
[0147] For colorization, if the data was originally colorless (such as a grayscale image), a pseudo-color image can be generated through a colorization step to better display the different features in the data. Colorization methods include: band-based pseudo-color synthesis: mapping grayscale images of different bands onto the three channels of the RGB color space.
[0148] Classification-based pseudocoloring: Assigning different colors to different categories based on classification results (such as land use type).
[0149] The embodiments of this application do not specifically limit the specific implementation methods of data fusion, enhancement, noise reduction, and coloring.
[0150] In one possible implementation, before correcting the strip data, background data and full-load data need to be collected. A background template is then generated based on the background data, and an air template is generated based on the full-load data. The detector is activated separately to collect background data and generate the background template; simultaneously, the radiation source and detector are activated to collect full-load data and generate the air template.
[0151] The method for processing scanned strip data in this embodiment of the security inspection machine corrects the strip data based on the updated air template and the pre-acquired background template to obtain corrected strip data. Based on the corrected strip data, a corresponding strip image is generated and stitched into the scanned image. By updating the air template using air-type strip data, the accuracy of strip data correction is ensured, thus guaranteeing the quality of the scanned image.
[0152] Figure 8 A flowchart illustrating a specific example of the method for processing strip data scanning by a security inspection machine provided in this application embodiment is shown below. Figure 8 As shown, the method includes:
[0153] S801: Collects baseline data and full-load data.
[0154] S802: The sensing unit determines whether a package has entered.
[0155] S803: Collect individual strip data sequentially.
[0156] S804: Extract the image data features of this strip data.
[0157] S805: This strip is micro-ignition, set to white directly; this strip is wrapped, no processing is required; this strip is air, replace the air template.
[0158] S806: Image correction.
[0159] S807: Image stitching.
[0160] The specific implementation process of the above steps is the same as that in the aforementioned embodiments, and will not be repeated here.
[0161] S808: The sensing unit determines whether the package has been scanned.
[0162] By repeating steps 803 to S807 above, each strip of data is processed until a complete scanned image of the package is output. It should be noted that the security inspection machine outputs the scanned image step by step, from the previous strip image before each strip image is stitched together, until the complete image is output.
[0163] Figure 9 This is a schematic diagram of a dirty image caused by the start-up of a cold source. Figure 10 This is a schematic diagram of the dirt caused by micro-arcs from the X-ray source. Figure 11 A schematic diagram of a scanned image to eliminate dirt caused by hot or cold sources. Figure 12 A schematic diagram of a scanned image used to eliminate dirt caused by micro-arcs from the X-ray source. The method described above, as exemplified in this application, is used to... Figure 9 and Figure 10 Real-time processing of strip data yields... Figure 11 and Figure 12 The scanned images can determine the data type of a single strip in less than 1 millisecond, meeting the real-time image output requirements of security inspection machines without causing image output lag. It can also effectively eliminate hot and cold sources (such as...). Figure 9 ) or micro-ignition from a radiation source (such as Figure 10 This effectively improves the image quality and material identification accuracy of X-ray security inspection equipment by eliminating dirty images caused by X-rays.
[0164] Figure 13 A schematic diagram of the structure of the processing device for scanning strip data of a security inspection machine provided in this application is shown in Embodiment 1. Figure 13 As shown, the data processing device 1300 for scanning strips by the security inspection machine includes:
[0165] The first determining module 1301 is used to determine the type of strip data based on the image data characteristics of the strip data scanned by the security inspection machine. The type includes air type, package type or micro-ignition type.
[0166] The second determining module 1302 is used to determine the operation for the strip data based on the type of the strip data, including at least one of the following:
[0167] If the strip data is of type air, then update the air template based on the strip data;
[0168] If the strip data type is micro-ignition, then set the strip data to blank data;
[0169] If the stripe data is of type package, then no processing is performed on the stripe data.
[0170] Figure 14 A schematic diagram of the structure of the processing device for scanning strip data of the security inspection machine provided in this application is shown in Embodiment 2. Figure 14 As shown, based on the above embodiments, the image data features of the strip data include standard deviation, normalized gray-level drop, normalized horizontal mean difference, normalized row data mean, normalized gray-level distribution, and normalized pixel value; then the first determining module 1301 includes:
[0171] The first determining unit 1401 is used to determine that the strip data is of the micro-ignition type if the normalized gray level drop, the normalized gray level distribution, the normalized horizontal mean difference, and the normalized row data mean satisfy the first preset condition.
[0172] The second determining unit 1402 is used to determine that the strip data is of the package type if the normalized gray level drop, the normalized gray level distribution, the standard deviation, the normalized row data mean, the normalized horizontal mean difference, and the normalized pixel value meet the second preset conditions.
[0173] The third determining unit 1403 is used to determine that the strip data is of the air type if the normalized gray level drop, the normalized gray level distribution, the standard deviation, the normalized pixel value, and the normalized row data mean satisfy the third preset condition.
[0174] Optionally, the first preset condition mentioned above includes:
[0175] The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both greater than a preset mean difference threshold, and the first number of pixels in the strip data is less than a preset first pixel number threshold; where the first number represents the number of pixels at the first position whose pixel value is less than the first preset pixel value, and the pixels at the first position represent the pixels corresponding to the first column, the last column, and the column with the smallest vertical mean of grayscale value after the strip data is normalized, the upper mean is the mean of the p rows of data before the first row of data, and the lower mean is the mean of the p rows of data after the last row of data, where p can be an integer greater than or equal to 10;
[0176] or,
[0177] The difference between the upper mean of the first column and the upper mean of the last column after strip data normalization, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. Furthermore, the ratio of the row data means of the strip data is greater than a preset first empirical threshold, and the difference in the horizontal mean after strip data normalization is greater than a preset horizontal mean difference threshold. The ratio of the row data means represents the ratio of the minimum and maximum values among the row data means after strip data normalization.
[0178] The aforementioned second preset condition includes:
[0179] The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both greater than the mean difference threshold, and the first quantity is greater than or equal to the first pixel number threshold.
[0180] or,
[0181] The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is less than the standard deviation threshold. The second number of pixels in the strip data is less than the preset second pixel number threshold. At least m pixels in the strip data at the second position have pixel values less than the preset feature threshold. Here, the second number represents the number of pixels at the first position whose pixel value is less than the second preset pixel value. The pixels at the second position represent the pixels corresponding to n consecutive rows in the first column and n consecutive rows in the second column after the strip data is normalized. n and m are integers greater than 1.
[0182] or,
[0183] The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold, and the standard deviation of the strip data is greater than or equal to the standard deviation threshold, and the first quantity is greater than or equal to the second pixel number threshold.
[0184] or,
[0185] The difference between the upper mean of the first column and the upper mean of the last column after normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is greater than or equal to the standard deviation threshold. At least m pixels at the second position have pixel values less than the feature threshold. The ratio of the row mean of the strip data is less than the preset second empirical threshold.
[0186] The aforementioned third pre-set condition includes:
[0187] The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold, and the standard deviation of the strip data is less than the standard deviation threshold, and the second quantity is less than or equal to the second pixel number threshold.
[0188] or,
[0189] The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold, and the pixel value of the pixel at the second position is greater than or equal to the feature threshold.
[0190] or,
[0191] The difference between the upper mean of the first column and the upper mean of the last column after normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is greater than or equal to the standard deviation threshold. The number of first images is less than the number of second pixels threshold. The ratio of the row data mean of the strip data is greater than or equal to the second empirical threshold.
[0192] or,
[0193] The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is greater than or equal to the standard deviation threshold. The first quantity is less than the second pixel quantity threshold. The pixel value of the pixel at the second position is greater than or equal to the feature threshold.
[0194] Figure 15 A schematic diagram of the structure of the processing device for scanning strip data of the security inspection machine provided in this application embodiment is shown below. Figure 15 As shown, based on the above embodiments, the security inspection machine scanning strip data processing device 1300 further includes:
[0195] The first correction module 1501 is used to correct the low-energy data of the strip data based on the updated low-energy air template and the pre-acquired background template to obtain the corrected low-energy data.
[0196] The second correction module 1502 is used to correct the high-energy data of the strip data based on the updated high-energy air template and background template, so as to obtain the corrected high-energy data.
[0197] The generation module 1503 is used to process the corrected low-energy data and the corrected high-energy data to generate a pseudo-color image of the strip data.
[0198] The stitching module 1504 is used to stitch the striped pseudo-color image into the scanned image.
[0199] The security inspection machine scanning strip data processing device provided in the above embodiments is used to execute the security inspection machine scanning strip data processing method in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0200] Figure 16 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 16 As shown, the sweeping robot 1600 includes: a processor 1602, a memory 1601 communicatively connected to the processor 1602, and a display 1603;
[0201] Memory 1601 stores computer-executed instructions;
[0202] The processor 1602 executes computer execution instructions stored in the memory 1601 to implement the security inspection machine scanning strip data processing method in any method embodiment.
[0203] The monitor 1603 is used to output scanned images.
[0204] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to perform the security inspection machine scanning strip data processing method provided in the various embodiments described above.
[0205] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0206] Optionally, a readable storage medium can be coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Alternatively, the readable storage medium can be an integral part of the processor. Both the processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components within the device.
[0207] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solutions provided in any of the above method embodiments.
[0208] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates an "or" relationship between the preceding and following related objects; in formulas, the character " / " indicates a "division" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0209] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. In the embodiments of this application, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0210] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0211] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for processing data from scanning strips on a security inspection machine, characterized in that, include: Based on the image data characteristics of the strip data scanned by the security inspection machine, the type of the strip data is determined. The type includes air type, package type, or micro-arc type. Specifically, air type strip data refers to data collected by the security inspection machine detector when the X-ray source of the security inspection machine is turned on and there is no package. Micro-arc type strip data refers to strip data containing dirty images or artifacts caused by dose fluctuations of the X-ray source of the security inspection machine. Package type strip data refers to strip data collected after the security inspection machine scans a package. Based on the type of the strip data, determine the operation for the strip data, including at least one of the following: If the type of the strip data is air, then update the air template according to the strip data; If the type of the strip data is micro-ignition, then the strip data is set to blank data; If the type of the strip data is a package type, then the strip data will not be processed.
2. The method according to claim 1, characterized in that, The image data features of the strip data include standard deviation, normalized gray level drop, normalized horizontal mean difference, normalized row data mean, normalized gray level distribution, and normalized pixel value. The image data features based on the strip data scanned by the security inspection machine are used to determine the type of the strip data, including: If the normalized grayscale drop, the normalized grayscale distribution, the normalized horizontal mean difference, and the normalized row data mean satisfy the first preset condition, then the strip data is determined to be of the micro-ignition type. If the normalized grayscale drop, the normalized grayscale distribution, the standard deviation, the normalized row data mean, the normalized horizontal mean difference, and the normalized pixel value satisfy the second preset condition, then the strip data is determined to be of the package type. If the normalized grayscale drop, the normalized grayscale distribution, the standard deviation, the normalized pixel value, and the normalized row data mean satisfy the third preset condition, then the strip data is determined to be of the air type.
3. The method according to claim 2, characterized in that, The first preset condition includes: The difference between the upper mean of the first column and the upper mean of the last column after normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, are both greater than a preset mean difference threshold, and the first number of pixels in the strip data is less than a preset first pixel number threshold; wherein, the first number represents the number of pixels with a pixel value less than a first preset pixel value at the first position, and the pixels at the first position represent the pixels corresponding to the first column, the last column, and the column with the smallest vertical mean of grayscale value after normalization of the strip data, the upper mean is the mean of the p rows of data before the first row of data, and the lower mean is the mean of the p rows of data after the last row of data, where p is an integer; or, The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. Furthermore, the ratio of the row data means of the strip data is greater than a preset first empirical threshold, and the difference in the horizontal mean of the strip data after normalization is greater than a preset horizontal mean difference threshold. The ratio of the row data means represents the ratio of the minimum and maximum values among the row data means after the strip data is normalized.
4. The method according to claim 2, characterized in that, The second preset condition includes: The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both greater than a preset mean difference threshold. Furthermore, the first number of pixels in the strip data is greater than or equal to a preset first pixel number threshold. Here, the first number represents the number of pixels at a first position whose pixel value is less than a first preset pixel value. The pixels at the first position represent the pixels corresponding to the first column, the last column, and the column with the smallest vertical mean grayscale value after the strip data is normalized. The upper mean is the mean of the p rows of data starting from the first row, and the lower mean is the mean of the p rows of data starting from the last row, where p is an integer. or, The difference between the upper mean of the first column and the upper mean of the last column of the normalized strip data, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is less than the standard deviation threshold. The second number of pixels in the strip data is less than a preset second pixel number threshold. At least m pixels at the second position of the strip data have pixel values less than a preset feature threshold. Here, the second number represents the number of pixels at the first position whose pixel values are less than the second preset pixel value. The pixels at the second position represent the pixels corresponding to n consecutive rows in the first column and n consecutive rows in the second column of the normalized strip data, where n and m are integers greater than 1. or, The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the preset mean difference threshold, and the standard deviation of the strip data is greater than or equal to the standard deviation threshold, and the first quantity is greater than or equal to the second pixel quantity threshold. or, The difference between the upper mean of the first column and the upper mean of the last column after normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is greater than or equal to the standard deviation threshold. At least m pixels at the second position have pixel values less than the feature threshold. The ratio of the row data mean of the strip data is less than a preset second empirical threshold.
5. The method according to claim 2, characterized in that, The third preset condition includes: The difference between the upper mean of the first column and the upper mean of the last column of the normalized strip data, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to a preset mean difference threshold, and the standard deviation of the strip data is less than the standard deviation threshold, and the second number of pixels in the strip data is less than or equal to a preset second pixel number threshold; wherein, the second number represents the number of pixels at the first position whose pixel value is less than a second preset pixel value; or, The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold, and the pixel value of the pixel at the second position is greater than or equal to the preset feature threshold; the pixel at the second position represents the pixel corresponding to n consecutive rows in the first column and n consecutive rows in the second column after the strip data is normalized, where n and m are integers greater than 1; or, The difference between the upper mean of the first column and the upper mean of the last column after normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold, and the standard deviation of the strip data is greater than or equal to the standard deviation threshold, and the first number of pixels in the strip data is less than the second number of pixels threshold, and the ratio of the row mean of the strip data is greater than or equal to a preset second empirical threshold; wherein, the first number represents the number of pixels with a pixel value less than a first preset pixel value at a first position, the pixels at the first position represent the pixels corresponding to the first column, the last column, and the column with the smallest vertical mean of grayscale value after normalization of the strip data, the upper mean is the mean of p rows of data starting from the first row of data, and the lower mean is the mean of p rows of data starting from the last row of data, where p is an integer; or, The difference between the upper mean of the first column and the upper mean of the last column after the strip data is normalized, and the difference between the lower mean of the first column and the lower mean of the last column, are both less than or equal to the mean difference threshold. The standard deviation of the strip data is greater than or equal to the standard deviation threshold. The first quantity is less than the second pixel quantity threshold. The pixel value of the pixel at the second position is greater than or equal to the feature threshold.
6. The method according to claim 1, characterized in that, If the type of the strip data is air, then updating the air template based on the strip data includes: Update the low-energy air template based on the low-energy data in the strip data; The high-energy air template is updated based on the high-energy data in the strip data.
7. The method according to claim 6, characterized in that, The method further includes: Based on the updated low-energy air template and the pre-acquired background template, the low-energy data of the strip data is corrected to obtain the corrected low-energy data; Based on the updated high-energy air template and the background template, the high-energy data of the strip data is corrected to obtain the corrected high-energy data; The corrected low-energy data and the corrected high-energy data are processed to generate a pseudo-color image of the strip data; The striped pseudo-color image is stitched into the scanned image.
8. A processing device for scanning strip data of a security inspection machine, characterized in that, include: The first determining module is used to determine the type of the strip data based on the image data characteristics of the strip data scanned by the security inspection machine. The type includes air type, package type, or micro-arc type. Specifically, air type strip data means that the strip data is collected by the detector of the security inspection machine when the X-ray source of the security inspection machine is turned on and there is no package. Micro-arc type strip data means that the strip data contains dirty images or artifacts caused by the dose fluctuation of the X-ray source of the security inspection machine. Package type strip data means that the strip data is collected after the security inspection machine scans a package. The first determining module is configured to determine an operation for the strip data based on the type of the strip data, including at least one of the following: If the type of the strip data is air, then update the air template according to the strip data; If the type of the strip data is micro-ignition, then the strip data is set to blank data; If the type of the strip data is a package type, then the strip data will not be processed.
9. An electronic device, characterized in that, include: A processor, and a memory and a display communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the processing method for scanning strip data of the security inspection machine as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the processing method for scanning strip data of a security inspection machine as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Belt artifact processing method and device, electronic equipment and storage medium
CN117314771A
Security check image processing method and device, electronic equipment and storage medium
CN117332277A