Security inspection machine scanning strip data processing method, device and equipment and storage medium

By identifying the type of data with the scanning strip of the security machine and the corresponding processing, the problem of dirty map interference security checks is solved, and the accuracy and image quality are improved.

CN119339130AActive Publication Date: 2025-01-21HANGZHOU RAYIN TECH CO LTD

Patent Information

Application Number
CN202411342069.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-21
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

Dirty images often appear in the scanned images of security inspection machines, which makes it difficult for security inspectors to identify and reduces the recognition accuracy.

Method used

The type is determined by the image data characteristics based on bar data. If it is a micro -fire type, it is placed as blank data; if it is an air type, the air template is updated; if it is a package type, it will not be processed.

Benefits of technology

Quickly eliminate dirty images caused by micro-ignition, ensure the accuracy of subsequent corrections through the update of the air template, effectively remove dirty images from cold and heat sources, maintain the original quality and information of the image, and improve image readability and security inspection identification accuracy of personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339130A_ABST
    Figure CN119339130A_ABST
Patent Text Reader

Abstract

The invention provides a processing method and device for scanning stripe data by a security inspection machine, equipment and a storage medium. The method is applied to the technical field of image processing and security check. The method comprises the following steps: determining the type of strip data based on image data characteristics of the strip data scanned by a security inspection machine, if the type of the strip data is a micro-sparking type, setting the strip data as blank data, if the type of the strip data is an air type, updating an air template according to the strip data, and if the strip data is a package type, updating the air template according to the strip data; and if not, not processing. According to the method, the strip data of the micro-sparking type are directly set as blank data, dirty images caused by micro-sparking are quickly and directly eliminated, and the air template is updated, so that the accuracy of subsequent correction is ensured, cold and heat source dirty images are effectively removed, and the original quality and information of the images are ensured. The image readability is improved, and the object recognition accuracy of a security inspector is improved at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of image processing and security inspection technology, and in particular to a method, device, equipment and storage medium for processing scan strip data of a security inspection machine. Background Art

[0002] Security inspection machines, also known as X-ray security machines or security screening equipment, are commonly used in public places such as airports, train stations, bus terminals, subway stations, and hospitals. By inspecting luggage, parcels, and personal belongings, security inspection machines can effectively identify and intercept potentially dangerous items, thereby protecting public life and property. Therefore, the processing of scanned images by security inspection machines is crucial in the security inspection process.

[0003] Images scanned by security inspection machines often contain dirty images due to inconsistent radiation doses between the cold source and the hot source, or micro-sparks in the radiation source. Therefore, image processing, such as noise suppression, is usually performed on the scanned images to eliminate the dirty images.

[0004] However, while the above method eliminates dirty images, it also affects other contents in the image, making it difficult for security inspectors to identify packages and reducing the recognition accuracy. Summary of the Invention

[0005] The present application provides a method, apparatus, device and storage medium for processing strip data scanned by a security inspection machine, so as to solve the problem of how to eliminate dirty images in images scanned by the security inspection machine.

[0006] In a first aspect, the present application provides a method for processing scanned strip data of a security inspection machine, comprising:

[0007] Based on image data features of the strip data scanned by the security inspection machine, determining the type of the strip data, wherein the type includes air type, package type, or micro-spark type; wherein the strip data being air type means that the strip data is data collected by the security inspection machine detector when the security inspection machine's radiation source is turned on and no package is present; the strip data being micro-spark type means that the strip data contains dirty images or artifacts caused by radiation dose fluctuations of the security inspection machine's radiation source; and the strip data being package type means that the strip data is data collected after the security inspection machine scans the package;

[0008] Determining an operation for the stripe data according to the type of the stripe data includes at least one of the following:

[0009] If the type of the strip data is air type, updating the air template according to the strip data;

[0010] If the type of the stripe data is a micro-spark type, the stripe data is set to blank data;

[0011] If the type of the stripe data is a package type, the stripe data is not processed.

[0012] In a second aspect, the present application provides a device for processing strip data scanned by a security inspection machine, comprising:

[0013] A first determination module is configured to determine the type of the strip data scanned by the security inspection machine based on image data features of the strip data, wherein the type includes air type, package type, or micro-spark type; wherein the strip data being air type means that the strip data is collected by the security inspection machine detector when the security inspection machine's radiation source is turned on and no package is present; the strip data being micro-spark type means that the strip data contains dirty images or artifacts caused by radiation dose fluctuations of the security inspection machine's radiation source; and the strip data being package type means that the strip data is collected after the security inspection machine scans the package;

[0014] The second determining module is configured to determine an operation for the stripe data according to the type of the stripe data, including at least one of the following:

[0015] If the type of the strip data is air type, updating the air template according to the strip data;

[0016] If the type of the stripe data is a micro-spark type, the stripe data is set to blank data;

[0017] If the type of the stripe data is a package type, the stripe data is not processed.

[0018] In a third aspect, the present application provides an electronic device, comprising: a processor, a memory communicatively connected to the processor, and a display;

[0019] The memory stores computer-executable instructions;

[0020] The processor executes the computer-executable instructions stored in the memory to implement the method for processing the scanned strip data of the security inspection machine according to any one of the first aspects.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method for processing the scanned strip data of the security inspection machine described in any of the aforementioned aspects.

[0022] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method for processing the scanned strip data of the security inspection machine as described in any of the aforementioned aspects.

[0023] The present application provides a method, device, equipment and storage medium for processing strip data scanned by a security inspection machine. Based on the image data features of the strip data scanned by the security inspection machine, the type of the strip data is determined. If the type of the strip data is a micro-spark type, the strip data is set to blank data. If the type of the strip data is an air type, the air template is updated according to the strip data. By directly setting the strip data of the micro-spark type to blank data and not processing the strip data of the package type, the dirty image caused by micro-sparks is quickly and directly eliminated. By updating the air template, the accuracy of subsequent corrections is guaranteed, the dirty images of cold and hot sources are effectively removed, and the original quality and information of the image are guaranteed. The solution provided by the embodiment of the present application improves the readability of the image and at the same time improves the accuracy of object recognition by security inspectors. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0025] Figure 1 This is an application scenario diagram of the method for processing data from a security inspection machine scan strip provided in an embodiment of the present application;

[0026] Figure 2 This is the system architecture diagram of the security inspection machine;

[0027] Figure 3 This is a schematic diagram of an exemplary security inspection machine radiation source structure;

[0028] Figure 4 A flowchart of a method for processing scanned strip data of a security inspection machine according to an embodiment of the present application;

[0029] Figure 5 A flowchart of a second embodiment of a method for processing scanned strip data of a security inspection machine provided in an embodiment of the present application;

[0030] Figure 6 This is a schematic diagram of an exemplary security inspection machine scanning image;

[0031] Figure 7 A flowchart of a third embodiment of the method for processing scanned strip data of a security inspection machine provided in an embodiment of the present application;

[0032] Figure 8 A flowchart of a specific example of a method for processing scanned strip data of a security inspection machine provided in an embodiment of the present application;

[0033] Figure 9 This is a schematic diagram of the dirty graph caused by the start of the cold source;

[0034] Figure 10 This is a schematic diagram of a dirty image caused by micro-sparking of the radiation source;

[0035] Figure 11 Schematic diagram of a scanned image to eliminate dirty images caused by cold and hot sources;

[0036] Figure 12 Schematic diagram of a scanned image to eliminate dirty images caused by micro-sparking of the radiation source;

[0037] Figure 13 This is a structural diagram of a first embodiment of a device for processing scanned strip data of a security inspection machine provided in an embodiment of the present application;

[0038] Figure 14 This is a schematic diagram of the structure of a second embodiment of the device for processing scanned strip data of an edge security inspection machine provided in an embodiment of the present application;

[0039] Figure 15 This is a schematic diagram of the structure of a third embodiment of the device for processing scanned strip data of a security inspection machine provided in an embodiment of the present application;

[0040] Figure 16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0041] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0042] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0043] With the continuous advancement of technology, X-ray security inspection machines have gradually developed into an efficient and accurate security inspection tool. The introduction of computer technology has enabled X-ray security inspection machines to realize automatic processing and analysis of images. Modern X-ray security inspection machines have a high level of intelligence and automation, and can realize all-round and multi-angle scanning and detection of luggage, cargo and other items. Today, X-ray security inspection machines have been widely used in security inspections of various modes of transportation such as aviation, railways, roads, and waterways. However, abnormal images of non-target objects or areas, i.e. dirty images, usually appear in the images scanned by security inspection machines. These images may interfere with the judgment of security personnel. The dirty images in the images scanned by security inspection machines are eliminated through image filtering, but this method will affect the security personnel's accurate judgment of the scanned items. If image enhancement is used for processing, excessive enhancement will cause image distortion, affecting the authenticity of the image.

[0044] In response to the above problems, the present application provides a method, device, equipment and storage medium for processing strip data scanned by a security inspection machine, which realizes the accurate elimination of dirty images in the images scanned by the security inspection machine. Specifically, dirty images are usually eliminated through image filtering, but this method will affect the security personnel's accurate judgment of the scanned items. If it is processed through image enhancement, excessive enhancement will cause image distortion and affect the authenticity of the image. Taking these problems into consideration, the inventor studied whether it is possible to determine the data type of each strip data scanned by the security inspection machine, and then directly whiteout the strip data of the micro-spark data type, that is, the fluctuating strip data, and update the air template according to the air type strip data, thereby effectively eliminating dirty images caused by cold source startup or radiation source micro-spark. Based on this, the technical solution of the present application is proposed.

[0045] Figure 1 This is an application scenario diagram of the method for processing the strip data scanned by the security inspection machine provided in the embodiment of the present application, such as Figure 1 As shown, the scene includes at least an object to be detected and a security inspection machine device, wherein the security inspection machine device includes at least a detector, a ray source, a roller, a collimator and a server. Figure 2 This is the system architecture diagram of the security inspection machine, such as Figure 2As shown, the system includes a control system, a hardware system and a data processing system, wherein the control system includes a sensing unit and a control unit, which are 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 ray source (including but not limited to an X-ray machine, an accelerator and a radioactive isotope), a detector (including but not limited to a single-energy detector, a pseudo-dual-energy detector and an energy spectrum detector) and a motion transmission mechanism, where a commonly used roller is used instead. The hardware system is used to transmit and receive X-rays, and to drive the object to be detected to move at different speeds in 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 detector data acquisition, full-load image matching, strip data processing and splicing, and image display functions. Figure 3 This is a schematic diagram of an exemplary security inspection machine radiation source structure, combined with Figure 1 、 Figure 2 and Figure 3 The scanning mode of the security inspection machine is a line scanning mode, and the imaging process is as follows: the ray source emits X-rays, which are collimated by the collimator into a fan-shaped beam to reach the detector, forming a 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. The time of each measurement is called an integration time. After each measurement, a column of signals is output, which is called a strip data; the server splices a series of strip data in the order of collection to complete the imaging process of the object to be inspected.

[0046] Figure 3 The core component of the medium-range radiation 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 move, thereby causing the number of photons emitted by the radiation source to fluctuate. The same detector may capture different signal values ​​at different times. Therefore, when the cold source is started and the fully loaded template is not updated in time, the image of the security inspection equipment will appear dirty. In addition, micro-sparks caused by the instability of the radiation source will also cause dirty images, making it difficult for security inspectors to identify, greatly reducing the recognition accuracy and user satisfaction.

[0047] Optionally, after the detector scans and obtains the strip data, the server can judge the data type based on the data characteristics of the strip data, directly blank out the strip data of the determined micro-spark data type, and update the air template based on the strip data of the determined air type, thereby effectively eliminating dirty images without affecting the quality of the scanned output image.

[0048] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0049] Figure 4 This is a flow chart of a method for processing scanned strip data of a security inspection machine according to an embodiment of the present application. Figure 4 As shown, the method specifically includes:

[0050] S401: Determine the type of the strip data based on the image data features 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 may cause micro-sparks, resulting in a dirty image in the subsequent imaging of the security inspection machine, which affects the security inspector's recognition. To ensure the quality of the scanned image and effectively eliminate the dirty image, the strip data type can be determined based on the image data characteristics of the strip data, and the abnormal strip data collected when the X-ray source is unstable and the air type strip data can be judged. The strip data type includes air type, package type, or micro-spark type.

[0052] Specifically, by calculating the image data features of the strip data, the obtained image data may include standard deviation, normalized grayscale drop, normalized horizontal mean difference, normalized row data mean, normalized grayscale distribution and normalized pixel value. If the normalized grayscale drop, the normalized grayscale distribution, the normalized horizontal mean difference, and the normalized row data mean meet the first preset condition, the strip data is determined to be a micro-spark 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 meet the second preset condition, the strip data is determined to be a package type. If the normalized grayscale drop, the normalized grayscale distribution, the standard deviation, the normalized pixel value, and the normalized row data mean meet the third preset condition, the strip data is determined to be an air type. It should be noted that the horizontal mean difference indicates that the mean difference of adjacent row data collected at the joint of the detection plate in the strip data is greater than the preset mean difference threshold.

[0053] The image data features of the stripe data mentioned in the embodiments of the present application are described below, wherein the standard deviation of the stripe data refers to the maximum value of the standard deviation of the stripe data row data, and is calculated in the same way as the approximate standard deviation.

[0054] A sudden drop in grayscale after normalization occurs when the grayscale mean values ​​at the top and bottom of the first and last columns of the normalized strip data change significantly. The top refers to the first p rows from the first row, and the bottom refers to the last p rows 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] Normalized horizontal mean difference: the difference in the horizontal mean of the normalized data at the joint of each detection plate (i.e., the last row of strip data corresponding to the previous detection plate and the first row of strip data corresponding to the next detection plate), and the number of times it is above the empirical value of the characteristic threshold.

[0056] Normalized row data mean: the ratio of the minimum to maximum row data mean after strip data is normalized.

[0057] Normalized grayscale distribution: This is the number of pixels with grayscale values ​​below a specific threshold in the first and last columns of the normalized strip data, as well as the column with the smallest vertical mean. Horizontal data and vertical data are relative terms. For example, the horizontal mean of a strip data refers to the mean of the rows within the strip data, while the vertical mean can refer to the mean of the columns within the strip data.

[0058] Normalized pixel value: the number of pixel values ​​of the pixels in the first two columns of the normalized strip data that are simultaneously present in n consecutive rows of data and are lower than the feature threshold empirical value, where n is an integer greater than 1.

[0059] Usually, a security inspection machine uses a dual-energy detector, so the scanned strip data includes high-energy data and low-energy data. The above judgment of the strip data type is based on the low-energy data in the strip data.

[0060] It should be noted that the first preset condition, the second preset condition and the third preset condition are pre-set conditions for determining the type of stripe data according to different data types.

[0061] Optionally, the normalized image data features in the above image data features can be expressed in a specific normalization formula as follows:

[0062]

[0063] P cali =T*C Anti *C graylevel +C baseline

[0064] Among them, T is the transparency of the collected image, P is the collected image value, P air is the air value, P bk is the background value. caliis the image value after correction. C graylevel The grayscale of the corrected image is 2. 16 -1, that is, the normalized data range is 0-65535, C Anti is the anti-overflow coefficient, C baseline The air value in the normalization process for calculating the image data features of the strip data is the air value in the initial air template.

[0065] S402: If the type of the strip data is air type, update the air template according to the strip data.

[0066] In this step, the stripe data type is determined through the above steps. If the stripe data type is determined to be air, a dirty cold source image will appear when the security inspection machine activates the cold source and the full-load template is not updated in time. To accurately eliminate the dirty image in the scanned image, the stripe data of the determined air type is averaged and replaced with a new air template, so that subsequent stripe data correction is more accurate. This also ensures scanned image quality and prevents image overexposure.

[0067] Specifically, if the strip data includes low-energy data and high-energy data, the low-energy air template is updated according to the low-energy data in the strip data, and the high-energy air template is updated according to the high-energy data in the strip data.

[0068] Optionally, the method may further include:

[0069] S403: If the type of the stripe data is the micro-spark type, the stripe data is set to blank data.

[0070] If the type of stripe data is determined to be a micro-spark type, it means that the stripe data was collected when the radiation source was unstable. In subsequent imaging, a dirty image will appear in the image. In order to effectively eliminate the dirty image, the stripe 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 type is a package type, no processing is performed.

[0072] The method for processing strip data scanned by a security inspection machine provided in this embodiment determines the type of strip data based on the image data features of the strip data scanned by the security inspection machine. If the strip data type is a micro-spark type, the strip data is set to blank data. If the strip data type is an air type, the air template is updated based on the strip data. By directly setting the strip data of the micro-spark type to blank data, the dirty image caused by micro-sparks is quickly and directly eliminated. By updating the air template, the accuracy of subsequent corrections is guaranteed, and the dirty images of cold and hot sources are effectively removed, ensuring the original quality and information of the image. This improves the readability of the image and at the same time improves the accuracy of object recognition by security inspectors.

[0073] Figure 5 This is a flow chart of a second embodiment of the method for processing the scanned strip data of the security inspection machine provided in the embodiment of the present application, as shown in FIG. Figure 5 As shown, based on the above embodiment, the image data features of the strip data include the standard deviation, the normalized grayscale drop, the normalized horizontal mean difference, the normalized row data mean, the normalized grayscale distribution, and the normalized pixel value. Then, step S401 specifically includes:

[0074] S501: If the normalized grayscale drop, the normalized grayscale distribution, the normalized horizontal mean difference, and the normalized row data mean meet a first preset condition, it is determined that the stripe data is of the micro-spark type.

[0075] In this step, in order to accurately determine the type of stripe data, it is necessary to make an accurate judgment based on the image data characteristics of the stripe data. Micro-sparks usually cause local highlights or low brightness areas in the image, which are reflected in a significant change in the grayscale mean value, that is, a sudden drop in grayscale.

[0076] Examining the grayscale distribution of the stripe data, i.e., its grayscale distribution characteristics, especially by comparing it with the grayscale values ​​of the surrounding normal area, can determine whether micro-sparks are present. If the grayscale value of the stripe data is significantly higher or lower than that of the surrounding area, and this change is continuous within the stripe, then this may be a sign of micro-sparks. Specifically, each pixel in the stripe data is analyzed in detail to examine its grayscale value, gradient, texture, and other characteristics. Micro-sparks may leave specific traces at the pixel level, such as high gradient values ​​and specific texture patterns. The presence of micro-sparks can be further verified by statistically analyzing the characteristic distribution of pixels within the stripe area.

[0077] Calculate the difference in grayscale mean between the stripe data and its adjacent rows (or columns, depending on the stripe orientation), i.e., the horizontal mean difference. Microsparks can cause the grayscale mean of the stripe region to differ significantly from that of adjacent regions. If this difference remains consistent within the stripe region and is significantly above or below the background noise level, this further supports the conclusion of microsparks.

[0078] Analyze the grayscale mean of each row in the stripe data, i.e., the row data mean characteristic. Micro-sparks can cause abnormal fluctuations in the grayscale mean of the row data, especially when the stripe is wide or the grayscale changes significantly. The ratio of the minimum to maximum mean values ​​of the stripe data rows can be used to identify significant mean differences and determine whether the stripe is a micro-spark type. The minimum and maximum values ​​of the row data mean represent the lower and upper limits of the grayscale distribution in the stripe data, respectively. The ratio of the minimum to maximum value quantifies the uniformity of the distribution.

[0079] The first preset condition may be set based on the characteristics of the micro-spark phenomenon in the above image data, thereby accurately determining whether the stripe data is of the micro-spark 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 normalization of the strip data, as well as 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 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 longitudinal mean of the grayscale value after normalization of the strip data, the upper mean is the mean of p rows of data before the first row of the data, and the lower mean is the mean of p rows of data after the last row of the data, for example, wherein p can be an integer greater than or equal to 10.

[0082] For example, Figure 6 is a schematic diagram of an exemplary security inspection machine scanning image, such as Figure 6 As shown in the figure, the upper part is the original scan data, and the lower part is the normalized grayscale image. The micro-sparking of the X-ray source causes the appearance of a dirty image. First, determine the grayscale drop characteristics after normalization of the strip data: determine whether there is a grayscale drop at the top and bottom of the first and last columns after normalization of the strip data, and then calculate Figure 6 The average of the four black vertical lines in the image below, A top1 、A top2 、A bottom1 、A bottom2For example, after strip data is normalized, the average of the top 10 rows in the first column (A top1 ) and the mean of the bottom 10 rows (A bottom1 ) and the mean of the top 10 rows in the last column (A top2 ) and the mean of the bottom 10 rows (A bottom2 ).

[0083] Then, the grayscale distribution characteristics of the normalized strip data are determined: the number nNum of pixels with grayscale values ​​below 58000 in the first column, the last column, and the column with the smallest longitudinal mean value after the normalization of the strip data is calculated. top1 -A top2 >0.015, A bottom1 -A bottom2 >0.015, indicating a sudden drop in grayscale, and nNum <6, the stripe data is determined to be a micro-spark type.

[0084] 2. Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, is less than or equal to the mean difference threshold, and the ratio of the mean values ​​of the row data of the strip data is greater than a preset first empirical threshold, and the horizontal mean difference of the normalized strip data is greater than a preset horizontal mean difference threshold, where the ratio of the row data means represents the ratio of the minimum value to the maximum value among the row data means after the normalization of the strip data.

[0085] For example, if the grayscale drop feature is calculated by: 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 ≤0.015, that is, there is no sudden drop in grayscale, then continue to determine the mean feature of the normalized row data. The specific calculation method is: calculate the ratio of the minimum and maximum values ​​of the mean, which is recorded as:

[0086]

[0087] Among them A min and A max are the minimum and maximum values ​​of the normalized data row means, respectively.

[0088] The linear array detector is composed of multiple independent detection units. Since the response of each detection unit is inconsistent, the grayscale inconsistency is reflected in the collected strip data. Figure 7 This is an example of an image scanned by a security inspection machine. Figure 7As shown in the figure, the left side is the original data, which is the result of splicing multiple strips of original data. The right side is the normalized data, as shown in the figure. Figure 7 The results in the left half of the right side are the data after normalization using the background template and the air template. However, if the dose of the collected background template, air template and the actual strip data are inconsistent, this inconsistency cannot be eliminated, and after normalization, it will be displayed Figure 7 The horizontal dirty image of the right half of the right side. Then the normalized horizontal mean difference is determined by calculating the horizontal mean A at the joint of each detection board (i.e. the last row of the previous detection board and the first row of the next detection board). i and A i+1 , calculate the difference A between the transverse means at the joint i+1 -A i The number of features greater than the empirical threshold value of 1500 is recorded as V change . V chahge It is expressed as the horizontal mean difference.

[0089] If A top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015, and F Ratio >0.86 and V change >2, the strip data is judged to be micro-spark type.

[0090] It should be noted that if any one of the above two preset conditions is met, it can be determined that the strip data is of the micro-spark type.

[0091] It should be noted that after the strip data is normalized, the average of the top 10 rows in the first column and the average of the bottom 10 rows, as well as the average of the top 10 rows in the last column and the average of the bottom 10 rows, are calculated. The 10 rows are only an example and usually do not exceed 30 rows of data. The embodiment of this application does not make specific limitations and the number of rows can be selected according to actual conditions.

[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, the strip data is determined to be a package type.

[0093] In this step, to accurately determine the type of stripe data, it is necessary to make an accurate judgment based on the image data characteristics of the stripe data. Grayscale values ​​reflect the brightness information of each pixel in the image. Package data typically has a relatively consistent grayscale distribution. The standard deviation is a measure of the dispersion of the grayscale value distribution. If the package data portion of the image differs significantly from the background or other non-package areas, the standard deviation of these areas may vary. The row data mean refers to the average grayscale value of each row of pixels in the stripe data. For package data with consistent width and shape, the change in the grayscale mean along the row direction of the image may exhibit a specific pattern (such as steady, gradual, or abrupt). By analyzing the trend of the row data mean, the boundaries or specific shapes of the packages can also be identified. The horizontal mean difference refers to the difference in the grayscale mean between adjacent rows or columns. For package data with clear boundaries in the image, the horizontal mean difference at these boundaries may be significant. By analyzing these differences, the presence and location of the package can be further confirmed. For package-type stripe data, the pixels are relatively uniform. The second preset condition can be set according to the features of the image data in the strip data of the package type, thereby accurately determining 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, as well as the difference between the lower mean of the first column and the lower mean of the last column after normalization of the strip data, are both greater than the mean difference threshold, and the first number is greater than or equal to the first pixel number threshold.

[0096] For example, first determine whether the grayscale drops suddenly after normalization: determine 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, that is, A top1 -A top2 >0.015 and A bottom1 -A bottom2 >0.015, the normalized grayscale distribution is determined: the number nNum of pixels with grayscale values ​​below 58000 in the first column, the last column, and the column with the smallest longitudinal mean after the normalization of the strip data is judged. If nNum ≥ 6, it means that the strip data is of package type.

[0097] 2. Any one of 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, is 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 number of pixels in the strip data is less than a preset second pixel number threshold, and there are at least m pixels in the pixel points at the second position of the strip data whose pixel values ​​are less than a preset feature threshold, wherein the second number represents the number of pixels at the first position whose pixel values ​​are less than the second preset pixel value, and 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, and n and m are integers greater than 1.

[0098] For example, first determine whether the grayscale drops suddenly after normalization: determine 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, that is, A top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015. The consistency of the row data of the strip data is judged, that is, the standard deviation of each row of the strip data is calculated. For each row of the strip data, if the strip data is of air type, its data fluctuation is small and the standard deviation is small (the standard deviation is an approximate standard deviation, and the absolute value is directly used instead of the common standard deviation calculation method of squaring first and then taking the square root). If there are packages in the strip data or dose fluctuations such as micro-sparks, the standard deviation will be larger. However, for very uniform packages (such as a uniform steel plate), the standard deviation on the original strip data will also be small. The standard deviation of each row of data can be calculated using the following formula:

[0099]

[0100]

[0101]

[0102] Among them, μ r is the mean of the rth row of strip data, x ir is the pixel value of the rth row and ith column of the strip data, N is the number of strip data columns, R is the number of strip rows, σ r is the standard deviation of the rth row of strip data, σ max is the maximum standard deviation.

[0103] If σ max<Threshold1, the number nNum of pixels with grayscale values ​​below 60000 in the first column, the last column, and the column with the smallest longitudinal mean after normalization of the strip data is judged, and the special package type is judged. For some packages, such as thin packages such as backpack straps, their grayscale values ​​after normalization are high, close to the grayscale value of air, resulting in the calculated F Ratio To avoid misclassifying thin packages like parcel tape as air, the normalized pixel values ​​are checked: After determining that at least three pixels in the first five consecutive rows of the normalized strip data have pixel values ​​less than the empirical characteristic threshold of 62000 (a location less than this threshold indicates a possible parcel). Then, the second column of the strip data, corresponding to the same location, is checked to see if at least three pixels in the five consecutive rows have pixel values ​​less than the empirical characteristic threshold of 62000. If at least three pixels in the first two columns of the strip data have pixel values ​​less than the empirical characteristic threshold of 62000, the parcel is determined to be a thin parcel.

[0104] According to the above calculation, if σ max <Threshold1, nNum<24 and the above-mentioned thin package conditions are met, then the strip data is determined to be a package type.

[0105] It should be noted that due to the performance differences of different ray sources or different detectors, the performance of row data consistency varies greatly, and it is difficult to determine a universal empirical threshold. For example, a universal initial empirical threshold Threshold1=350 can be given.

[0106] 3. After the normalization of the strip data, either the difference between the upper mean of the first column and the upper mean of the last column, or the difference between the lower mean of the first column and the lower mean of the last column, is 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, and the first number is greater than or equal to the second pixel number threshold.

[0107] For example, first determine the grayscale drop after normalization: there is no grayscale drop at the top and bottom of the first and last columns of the normalized strip data, that is, A top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015. Then for the number of rows of stripe data, and the standard deviation σ max ≥Threshold1, the normalized grayscale distribution is determined: the number nNum of pixels with grayscale values ​​below 58000 in the first column, the last column, and the column with the smallest longitudinal mean after the normalization of the strip data is judged. If nNum ≥ 24, the strip data is determined to be a package type.

[0108] 4. Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, is 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 there are at least m pixels at the second position whose pixel values ​​are less than the feature threshold, and the ratio of the mean values ​​of the strip data rows is less than a preset second empirical threshold.

[0109] For example, it is determined whether there is a sudden drop in grayscale at the top and bottom of the first and last columns of the normalized stripe data, that is, the sudden drop in grayscale after normalization is determined. If there is no sudden drop in grayscale, the consistency (standard deviation) of the row data of the stripe data is judged. If σ max ≥Threshold1, the special package type is judged, that is, the normalized pixel value is judged. Similar to the above, for some packages, such as thin packages such as backpack straps, their normalized grayscale values ​​are high, close to the grayscale value of air, resulting in the calculated F Ratio It is also too large. In order to avoid misjudging thin packages such as straps as air types, it is determined that after the strip data is normalized, there are at least 3 pixel points in the first column of 5 consecutive rows with pixel values ​​less than the characteristic threshold experience value of 62000 (if it is less than the threshold, it is considered that there may be a package at this location). Then check whether there are at least 3 pixel points in the 5 rows of data at the same position in the second column of strip data with pixel values ​​less than the characteristic threshold experience value of 62000. If it is determined that there are at least 3 pixel points in the first two columns of strip data with pixel values ​​less than the characteristic threshold experience value of 62000 in the 5 consecutive rows. Determine the mean of the normalized row data: for the mean of each row after the strip data is normalized, calculate the ratio of the minimum value to the maximum value of the mean, and compare the value F Ratio Make a judgment, if F Ratio <0.89, the stripe data is determined to be of package type.

[0110] It should be noted that if any one of the above five preset conditions is met, it can be determined that the stripe data is of 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 value meet a third preset condition, then the stripe data is determined to be of air type.

[0112] In this step, to accurately determine the type of stripe data, it is necessary to make an accurate judgment based on the image data characteristics of the stripe data. Air-type stripe data appears as low grayscale values ​​(i.e., darker) or high grayscale values ​​(i.e., brighter) in the image. For each row of stripe data, if the stripe data is of the air type, its data fluctuation is small and its standard deviation is small. Based on the characteristics of the image data in the air-type stripe data, a third preset condition can be set to accurately determine whether the stripe data is of the air type.

[0113] Specifically, the third preset condition may include:

[0114] 1. After the normalization of the strip data, either the difference between the upper mean of the first column and the upper mean of the last column, or the difference between the lower mean of the first column and the lower mean of the last column, is less than or equal to the mean difference threshold, the standard deviation of the strip data is less than the standard deviation threshold, and the second number is less than or equal to the second pixel number threshold.

[0115] For example, first determine the grayscale drop after normalization. If it is determined that there is no grayscale drop at the c-port and the 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 < Threshold1, the normalized grayscale distribution is determined by determining the number nNum of pixels with grayscale values ​​below 60,000 in the first and last columns of the normalized strip data, as well as the column with the smallest vertical mean. If nNum ≤ 24, the strip data is determined to be of the air type. If the strip data meets the above conditions and is determined to be of the air type, Threshold1 needs to be updated. The updated Threshold1 will be used in subsequent strip data type determinations.

[0116] For example, given an initial empirical threshold Threshold1 = 350, in the subsequent judgment process, if the strip data type is judged to be air type, the empirical threshold is updated: if the maximum standard deviation of the strip data is σ max , and σ max <Threshold1-40, then update Threshold1 to σ max +40 ensures that Threshold 1 is 40 more than the maximum standard deviation of the air type strip data.

[0117] 2. After the normalization of the strip data, any one of the difference between the upper mean of the first column and the upper mean of the last column, and the difference between the lower mean of the first column and the lower mean of the last column is 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] Exemplarily, if it is determined that there is no sudden drop in grayscale at the top and bottom of the first column and the last column after the normalization of the strip data, it is determined whether the strip data is a thin package, that is, it is determined whether there are at least 3 pixel points in 5 consecutive rows of data in the first two columns of data after the normalization of the strip data, and the pixel values ​​are less than the characteristic threshold experience value of 62000. If it is determined that it is not a thin package, the strip data is determined to be air type.

[0119] It should be noted that, when the strip data is determined to be of air type under this condition, Threshold1 also needs to be updated. The specific updating method is the same as the above method and will not be repeated here.

[0120] 3. After the normalization of the strip data, either the difference between the upper mean of the first column and the upper mean of the last column, or the difference between the lower mean of the first column and the lower mean of the last column, is 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 number is less than the second pixel number threshold, and the ratio of the mean values ​​of the strip data rows is greater than or equal to the second empirical threshold.

[0121] For example, the grayscale drop after normalization is determined. If it is determined that there is no grayscale drop at the top and bottom of the first and last columns after normalization of the strip data, that is, A top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015. And the standard deviation σ max ≥Threshold1, then determine the grayscale distribution after normalization: judge the number nNum of pixels with grayscale values ​​below 58000 in the first column, the last column, and the column with the smallest vertical mean after normalization of the strip data. If nNum<24, then determine the mean of the normalized row data: calculate the ratio of the minimum and maximum mean values ​​of each row after normalization of the strip data, and compare the value F Ratio Make a judgment, if F Ratio ≥0.89, the strip data is determined to be air type.

[0122] It should be noted that under this condition, Threshold1 does not need to be updated.

[0123] 4. After the normalization of the strip data, either the difference between the upper mean of the first column and the upper mean of the last column, as well as the difference between the lower mean of the first column and the lower mean of the last column, is 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 is less than the second pixel number threshold, and the pixel values ​​of the pixels at the second position are all greater than or equal to the feature threshold.

[0124] For example, the grayscale drop after normalization is determined. If it is determined that there is no grayscale drop at the top and bottom of the first and last columns after normalization of the strip data, that is, A top1 -A top2 ≤0.015 or A bottom1 -A bottom2 ≤0.015. And the standard deviation σ max ≥Threshold1, the grayscale distribution after normalization is determined: the number nNum of pixels with grayscale values ​​below 58000 in the first column, the last column, and the column with the smallest longitudinal mean after the normalization of the strip data is judged. If nNum<24, whether the strip data is a special thin wrapping tape is determined, and the normalized pixel value is determined: whether the pixel points of the normalized strip data meet the requirement that there are at least 3 pixel points in 5 consecutive rows of data in the first and second columns that are less than the characteristic threshold experience value of 62000. If not, the strip data is determined to be air type.

[0125] It should be noted that if any one of the above four preset conditions is met, it can be determined that the strip data is of the air type.

[0126] Optionally, in an embodiment of the present application, during the process of calculating the image data features of the strip data, the strip data is normalized to make the calculated image data more accurate, and the normalization in this process is only for calculating the image data and has no other meaning.

[0127] Each specific numerical value in the above examples is an example and can be pre-set according to the actual processing scenario, and the embodiments of this application do not make specific limitations.

[0128] The method for processing strip data scanned by a security inspection machine provided in this embodiment determines that the strip data is of the micro-spark type if the normalized grayscale drop, normalized grayscale distribution, normalized lateral mean difference, and normalized row data mean meet 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 meet a second preset condition, 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 meet a third preset condition, 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 the strip data is accurately determined, thereby playing a key role in the subsequent elimination of dirty images. While eliminating dirty images, the quality of the scanned image is also guaranteed.

[0129] Figure 7 This is a flow chart of a third embodiment of the method for processing the scanned strip data of the security inspection machine provided in the embodiment of the present application, as shown in FIG. Figure 7 As shown, based on the above embodiment, the method further includes:

[0130] S701: Correcting the low-energy data of the strip data according to the updated low-energy air template and the pre-acquired background template to obtain corrected low-energy data.

[0131] S702: Correcting the high-energy data of the strip data according to the updated high-energy air template and background template to obtain corrected high-energy data.

[0132] S703: Process the corrected low-energy band data and the corrected high-energy data to generate a stripe pseudo-color image corresponding to the stripe data.

[0133] S704: Splicing the strip pseudo-color image into the scanned image.

[0134] The linear array detector is composed of multiple independent detection units. Due to differences in scintillator processing and defects in readout electronic devices, the response value of each detection unit to X-rays of the same intensity is different. In practical applications, it is necessary to collect full-load data and background data to perform full-load background correction on the high-energy and low-energy raw data collected by the detector. After the type of strip data is determined, the strip data is corrected based on the updated air template and background template. The specific correction can be achieved through the following formula:

[0135]

[0136] P cali =T*C Anti *Cgraylevel +C baseline

[0137] Among them, T is the transparency of the collected image, P is the collected image value, P air is the air value, P bk is the background value. cali is the image value after correction. C graylevel The grayscale of the corrected image is 2. 16 -1, that is, the normalized data range is 0-65535, C Anti is the anti-overflow coefficient, C baseline 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 corrections for both low-energy data and high-energy data are performed using the above formula.

[0140] It should be noted that since the security inspection machine collects strip data in chronological order, it will perform type judgment after collecting a strip data. The strip data that determines the air type will update the air template, and the air template update includes the update of the low-energy air template and the high-energy air template.

[0141] After the strip data is corrected using the above formula, optionally, for some smaller security inspection machine models, since the distance the radiation source passes through the object to reach the detector is inconsistent, resulting in serious deformation of the objects in the security inspection image, the collected data can also be geometrically corrected after the correction.

[0142] After the correction process is completed, the stripe data is output as a stripe pseudo-color image and spliced ​​into the scanned image.

[0143] Optionally, before generating the strip pseudo-color image and splicing 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 the corrected high-energy data to ensure the image quality.

[0144] For example, the fusion of the corrected low-energy data and the 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, the two can be merged through band synthesis (such as PCA fusion, IHS fusion, etc.). It can also be achieved through spatial fusion. If the corrected low-energy and high-energy data have different spatial resolutions, the two can be spatially aligned and fused through super-resolution reconstruction or image interpolation techniques.

[0145] For image enhancement, which aims to increase image contrast, sharpen edges, or highlight specific features for easier visual analysis, histogram equalization can be used to improve image contrast. Sharpening filtering can enhance image edges and details. For color enhancement, if the data is already in color, parameters such as color saturation and brightness can be adjusted to optimize the display.

[0146] Noise reduction is to remove random noise or unnecessary interference in the image to improve the clarity and quality of the image. It can be achieved through median filtering, Gaussian filtering, wavelet denoising, etc.

[0147] For colorization, if the data is originally colorless (such as a grayscale image), a pseudo-color image can be generated through the 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 to the three channels of the RGB color space.

[0148] Classification-based pseudocolor: Assign different colors to different categories based on classification results (such as land use type).

[0149] The embodiments of the present application do not specifically limit the specific implementation methods of data fusion, enhancement, noise reduction, and colorization.

[0150] In one possible implementation, before correcting the stripe data, background data and full-load data must be collected. A background template is generated based on the background data, and an air template is generated based on the full-load data. The detector alone is enabled to collect background data and generate the background template; the source and detector are enabled simultaneously to collect full-load data and generate the air template.

[0151] This embodiment provides a method for processing strip data scanned by a security inspection machine. The strip data is corrected based on an updated air template and a pre-acquired background template. The corrected strip data is then used to generate a corresponding strip image, which is then spliced ​​into the scanned image. Updating the air template using air-type strip data ensures the accuracy of the strip data correction and the quality of the scanned image.

[0152] Figure 8 This is a flow chart of a specific example of a method for processing scanned strip data of a security inspection machine provided in an embodiment of the present application, as shown in FIG. Figure 8 As shown, the method includes:

[0153] S801: Collect background data and full load data.

[0154] S802: The sensor unit determines whether a package enters.

[0155] S803: Collecting individual strip data in sequence.

[0156] S804: Extracting image data features of the strip data.

[0157] S805: The strip is slightly ignited, so it is directly whitened. The strip is wrapped, so no treatment is done. The strip is air, so the air template is replaced.

[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 807, each strip of data is processed until the package is scanned and a complete scanned image is output. It should be noted that the security inspection machine outputs the scanned image step by step, which is the output of each strip of image spliced ​​together from the previous strip of image until the complete image is output.

[0163] Figure 9 This is a schematic diagram of the dirty graph caused by the cold source startup. Figure 10 Schematic diagram of the dirty image caused by micro-sparks of the radiation source. Figure 11 Schematic diagram of scanning images to eliminate the dirty images caused by cold and hot sources. Figure 12 Schematic diagram of a scanned image to eliminate the dirty image caused by micro-sparking of the radiation source. Figure 9 and Figure 10 Real-time processing of stripe data, we get Figure 11 and Figure 12 The scanned image can judge the data type of a single strip in less than 1 millisecond, which can meet the real-time image output requirements of the security inspection machine and will not cause image output jams. It can also effectively eliminate cold and hot sources (such as Figure 9 ) or X-ray source micro sparks (such as Figure 10 ) can effectively improve the image quality of X-ray security inspection equipment and the accuracy of material recognition.

[0164] Figure 13 This is a structural diagram of a first embodiment of a device for processing scanned strip data of a security inspection machine provided in an embodiment of the present application, as shown in FIG. Figure 13 As shown, the processing device 1300 of the strip data scanned by the security inspection machine includes:

[0165] The first determination module 1301 is configured to determine the type of the strip data based on the image data features of the strip data scanned by the security inspection machine, where the type includes air type, package type or micro-ignition type.

[0166] The second determining module 1302 is configured to determine an operation for the stripe data according to the type of the stripe data, including at least one of the following:

[0167] If the type of the strip data is air type, the air template is updated according to the strip data;

[0168] If the type of the stripe data is the micro-spark type, the stripe data is set to blank data;

[0169] If the stripe data type is a package type, the stripe data is not processed.

[0170] Figure 14 This is a structural diagram of a second embodiment of a device for processing scanned strip data of a security inspection machine provided in an embodiment of the present application, as shown in FIG. Figure 14 As shown, based on the above embodiment, the image data features of the strip data include the standard deviation, the normalized grayscale drop, the normalized horizontal mean difference, the normalized row data mean, the normalized grayscale distribution, and the normalized pixel value; then the first determining module 1301 includes:

[0171] The first determining unit 1401 is configured to determine that the stripe data is of a micro-spark type if the normalized grayscale drop, the normalized grayscale distribution, the normalized horizontal mean difference, and the normalized row data mean meet a first preset condition.

[0172] The second determination unit 1402 is used to determine that the strip data is a package 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 meet the second preset condition.

[0173] The third determining unit 1403 is configured to determine that the strip data is of air type if the normalized grayscale drop, the normalized grayscale distribution, the standard deviation, the normalized pixel value, and the normalized row data mean satisfy a third preset condition;

[0174] Optionally, the first preset condition includes:

[0175] The difference between the upper mean of the first column and the upper mean of the last column after normalization of the strip data, as well as 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 a 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 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 longitudinal mean of the 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 the data, and the lower mean is the mean of p rows of data starting from the last row of the data, for example, wherein p can be an integer greater than or equal to 10;

[0176] or,

[0177] Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column is less than or equal to the mean difference threshold, and the ratio of the mean of the row data of the strip data is greater than the preset first empirical threshold, and the horizontal mean difference after the normalization of the strip data is greater than the preset horizontal mean difference threshold, and the ratio of the row data means represents the ratio of the minimum value to the maximum value in the row data means after the normalization of the strip data.

[0178] The second precondition mentioned above includes:

[0179] The difference between the upper mean of the first column and the upper mean of the last column, as well as the difference between the lower mean of the first column and the lower mean of the last column after the normalization of the strip data, are both greater than the mean difference threshold, and the first number is greater than or equal to the first pixel number threshold;

[0180] or,

[0181] Any one of the difference between the upper mean of the first column and the upper mean of the last column, and the difference between the lower mean of the first column and the lower mean of the last column after normalization of the strip data is 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 number of pixels in the strip data is less than a preset second pixel number threshold, and at least m pixels at the second position of the strip data have pixel values ​​less than a preset feature threshold, wherein the second number represents the number of pixels at the first position whose pixel value is less than the second preset pixel value, and the pixels at the second position represent pixels corresponding to n consecutive rows in the first column and n consecutive rows in the second column after normalization of the strip data, and n and m are integers greater than 1;

[0182] or,

[0183] Any one of the difference between the upper mean of the first column and the upper mean of the last column, and the difference between the lower mean of the first column and the lower mean of the last column after normalization of the strip data is 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, and the first number is greater than or equal to the second pixel number threshold;

[0184] or,

[0185] Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, is 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 there are at least m pixels at the second position whose pixel values ​​are less than the feature threshold, and the ratio of the mean values ​​of the strip data rows is less than a preset second empirical threshold.

[0186] The third precondition mentioned above includes:

[0187] Any one of the difference between the upper mean of the first column and the upper mean of the last column, and the difference between the lower mean of the first column and the lower mean of the last column after normalization of the strip data is less than or equal to the mean difference threshold, the standard deviation of the strip data is less than the standard deviation threshold, and the second number is less than or equal to the second pixel number threshold;

[0188] or,

[0189] After the normalization of the strip data, the difference between the upper mean of the first column and the upper mean of the last column, as well as the difference between the lower mean of the first column and the lower mean of the last column, is 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] Any one of the difference between the upper mean of the first column and the upper mean of the last column, and the difference between the lower mean of the first column and the lower mean of the last column after the normalization of the strip data is 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 image number is less than the second pixel number threshold, and the ratio of the strip data row data means is greater than or equal to the second empirical threshold.

[0192] or,

[0193] Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data, and the difference between the lower mean of the first column and the lower mean of the last column, is 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 is less than the second pixel number threshold, and the pixel values ​​of the pixels at the second position are all greater than or equal to the feature threshold.

[0194] Figure 15 This is a structural diagram of a third embodiment of a device for processing scanned strip data of a security inspection machine provided in an embodiment of the present application, as shown in FIG. Figure 15 As shown, based on the above embodiment, the processing device 1300 for processing the strip data scanned by the security inspection machine further includes:

[0195] The first correction module 1501 is configured to correct the low-energy data of the strip data according to the updated low-energy air template and the pre-acquired background template to obtain corrected low-energy data.

[0196] The second correction module 1502 is used to correct the high energy data of the strip data according to the updated high energy air template and background template to obtain the corrected high energy data.

[0197] The generating module 1503 is used to process the corrected low-energy data and the corrected high-energy data to generate a strip pseudo-color image corresponding to the strip data.

[0198] The splicing module 1504 is used to splice the strip pseudo-color image into the scanned image.

[0199] The device for processing the strip data scanned by the security inspection machine provided in the above embodiment is used to execute the method for processing the strip data scanned by the security inspection machine in any of the above method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0200] Figure 16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 16 As shown, the sweeping machine 1600 includes: a processor 1602, a memory 1601 communicatively connected to the processor 1602, and a display 1603;

[0201] Memory 1601 stores computer-executable instructions;

[0202] The processor 1602 executes the computer-executable instructions stored in the memory 1601 to implement the method for processing the strip data scanned by the security inspection machine in any method embodiment.

[0203] The display 1603 is used to output the scanned image.

[0204] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to execute the method for processing the strip data scanned by the security inspection machine provided by the various embodiments described above.

[0205] The computer-readable storage medium mentioned above may be implemented by any type of volatile or non-volatile memory 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 computer-readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0206] Optionally, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0207] An embodiment of the present 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 at least one processor executes the computer program, it can implement the technical solution provided by any of the above method embodiments.

[0208] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0209] It is understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not intended to limit the scope of the embodiments of the present application. In the embodiments of the present application, the order of the sequence numbers of the above-mentioned processes does not mean 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 the present application.

[0210] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0211] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for processing data of a strip scanned by a security inspection machine, characterized in that: include: Based on the image data features of the strip data scanned by the security inspection machine, the type of the strip data is determined, and the type includes air type, package type or micro-spark type; wherein the strip data is air type means that the strip data is data collected by the detector of the security inspection machine when the radiation source of the security inspection machine is turned on and there is no package, the strip data is micro-spark type means that there are dirty images or artifacts in the strip data caused by the dose fluctuation of the radiation source of the security inspection machine, and the strip data is package type means that the strip data is data collected after the security inspection machine scans the package; Determining an operation for the stripe data according to the type of the stripe data includes at least one of the following: If the type of the strip data is air type, updating the air template according to the strip data; If the type of the strip data is a micro-spark type, the strip data is set to blank data; If the type of the stripe data is a package type, the stripe data is not processed.

2. The method according to claim 1, characterized in that: The image data features of the strip data include standard deviation, normalized grayscale drop, normalized lateral mean difference, normalized row data mean, normalized grayscale distribution and normalized pixel value; The determining the type of the strip data based on the image data features of the strip data scanned by the security inspection machine includes: If the normalized grayscale drop, the normalized grayscale distribution, the normalized lateral mean difference, and the normalized row data mean meet a first preset condition, then the stripe data is determined to be a micro-spark type; If the normalized grayscale drop, the normalized grayscale distribution, the standard deviation, the normalized row data mean, the normalized lateral mean difference, and the normalized pixel value meet a second preset condition, then the strip data is determined to be a package type; If the normalized grayscale drop, the normalized grayscale distribution, the standard deviation, the normalized pixel value, and the normalized row data mean value meet a third preset condition, it is determined that the strip data is of 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 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 a 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 whose pixel values ​​at a first position are 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 a column with the smallest vertical mean of grayscale value after the 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, wherein p is an integer; or, Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data and the difference between the lower mean of the first column and the lower mean of the last column is less than or equal to the mean difference threshold, and the ratio of the mean values ​​of the row data of the strip data is greater than a preset first empirical threshold, and the horizontal mean difference after the normalization of the strip data is greater than a preset horizontal mean difference threshold, and the ratio of the row data means represents the ratio of the minimum value to the maximum value in the row data means after the normalization of the strip data.

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, and the difference between the lower mean of the first column and the lower mean of the last column after the normalization of the strip data are both greater than the mean difference threshold, and the first number is greater than or equal to the first pixel number threshold; or, Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data and the difference between the lower mean of the first column and the lower mean of the last column is 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 number of pixels in the strip data is less than a preset second pixel number threshold, and there are at least m pixels in the pixel points at the second position of the strip data whose pixel values ​​are less than a preset feature threshold, wherein the second number represents the number of pixels at the first position whose pixel values ​​are less than the second preset pixel value, and 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 normalization of the strip data, and n and m are integers greater than 1; or, Any one of the difference between the upper mean of the first column and the upper mean of the last column, and the difference between the lower mean of the first column and the lower mean of the last column after the normalization of the strip data is 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 is greater than or equal to the second pixel number threshold; or, Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data and the difference between the lower mean of the first column and the lower mean of the last column is 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 there are at least m pixels among the pixels at the second position whose pixel values ​​are less than the feature threshold, and the ratio of the mean values ​​of the strip data rows is less than a preset second empirical threshold.

5. The method according to claim 2, characterized in that: The third preset condition includes: Any one of the difference between the upper mean of the first column and the upper mean of the last column, and the difference between the lower mean of the first column and the lower mean of the last column after the normalization of the strip data is 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 number is less than or equal to the second pixel number threshold; or, Any one of the difference between the upper mean of the first column and the upper mean of the last column, and the difference between the lower mean of the first column and the lower mean of the last column after the normalization of the strip data is less than or equal to the mean difference threshold, and the pixel values ​​of the pixels at the second position are greater than or equal to the feature threshold; or, Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data and the difference between the lower mean of the first column and the lower mean of the last column is 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 is less than the second pixel number threshold, and the ratio of the mean values ​​of the strip data rows is greater than or equal to the second empirical threshold; or, Any one of the difference between the upper mean of the first column and the upper mean of the last column after the normalization of the strip data and the difference between the lower mean of the first column and the lower mean of the last column is 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 is less than the second pixel number threshold, and the pixel values ​​of the pixels at the second position are all 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 the air type, updating the air template according to the strip data includes: Update the low energy air template according to the low energy data in the strip data; The high energy air template is updated according to the high energy data in the strip data.

7. The method according to claim 6, characterized in that The method further comprises: Correcting the low-energy data of the strip data according to the updated low-energy air template and the pre-acquired background template to obtain corrected low-energy data; Correcting the high-energy data of the strip data according to the updated high-energy air template and the background template to obtain corrected high-energy data; Processing the corrected low-energy data and the corrected high-energy data to generate a strip pseudo-color image corresponding to the strip data; The strip pseudo-color image is spliced ​​into the scanned image.

8. A device for processing data of a scanning strip of a security inspection machine, characterized in that: include: The first determination module is used to determine the type of the strip data scanned by the security inspection machine based on the image data features of the strip data, and the type includes air type, package type or micro-spark type; wherein the strip data is of air type means that the strip data is data collected by the detector of the security inspection machine when the radiation source of the security inspection machine is turned on and there is no package, the strip data is of micro-spark type means that there are dirty images or artifacts in the strip data caused by the dose fluctuation of the radiation source of the security inspection machine, and the strip data is of package type means that the strip data is data collected after the security inspection machine scans the package; The first determining module is configured to determine an operation for the stripe data according to the type of the stripe data, including at least one of the following: If the type of the strip data is air type, updating the air template according to the strip data; If the type of the strip data is a micro-spark type, the strip data is set to blank data; If the type of the stripe data is a package type, the stripe data is not processed.

9. An electronic device, characterized in that: include: A processor, a memory and a display connected in communication with the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method for processing the scanning strip data of the security inspection machine according to 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 method for processing the scanned strip data of a security inspection machine according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Security check image artifact removing method and device, security check machine, electronic device and medium

    CN113781327A

  • 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

  • Method, system and apparatus for processing radiographic images of scanned objects

    US20040247167A1

  • Artificial intelligence-based forbidden object identification method, apparatus and device, and storage medium

    WO2020173021A1

Cited By

  • Dual-energy XRT pseudo-color graph generation method and system for photoelectric intelligent mineral separation

    CN121236215A