Security inspection image processing method, device and electronic equipment

By processing the current strip of the detection plate in the security inspection equipment, determining its confidence and updating the air template strip, the problem of dirty stripes caused by signal fluctuations in the security inspection equipment is solved, and the image quality is improved.

CN119379840BActive Publication Date: 2025-04-01HANGZHOU RAYIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411952748.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-01
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In security inspection equipment, signal fluctuations caused by external interference such as the position offset of the anode tungsten target, temperature, power supply, electromagnetic, etc., form a striped dirty picture, affecting the image quality.

Method used

By obtaining the current strip detected by the detection plate, determining its confidence as a wrap indicator strip, processing and searching for the set of contour boundary points, combining the boundary geometry of the detection plate and the number of pixel points, determining the target confidence, and deciding whether to update the air template strip to correct the image.

Benefits of technology

Effectively remove dirty images caused by signal fluctuations, improve the image quality of security inspection equipment, and avoid signal fluctuations caused by hardware. It is suitable for security inspection and other signal image generation fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379840B_ABST
    Figure CN119379840B_ABST
Patent Text Reader

Abstract

The present application provides a security inspection image processing method, device and electronic device. This embodiment determines whether to update the existing air template strip based on each single strip, so as to timely update the existing air template strip, timely and effectively remove the dirty image caused by signal fluctuations and other phenomena, effectively improve the image quality of the security inspection equipment, improve the subsequent material identification and image effects, and avoid some signal fluctuation problems caused by hardware reasons.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to image processing technology, and in particular to a security inspection image processing method, device and electronic equipment. Background Art

[0002] Security inspection equipment mainly includes generators, detectors, conveying mechanisms (rollers) and image processors. Taking X-ray security inspection equipment as an example, the core component of the generator in X-ray security inspection equipment is the internal vacuum X-ray tube. The X-ray tube contains an anode and a cathode. Due to the thermal expansion and contraction effect, the temperature change in the X-ray tube will cause the anode tungsten target to move. Figure 1 The example shows the displacement of the anode tungsten target position (also called the target center position). The displacement of the anode tungsten target position will cause the same detection unit in the detection board to measure different signal values ​​at different integration times. Figure 2 If the same detection unit measures different signal values ​​at different integration times, the X-ray security inspection equipment will output a dirty fringe image.

[0003] Similarly, in other fields where images are generated by signals, such as remote sensing detection and industrial inspection, the signals may be interfered by external factors such as temperature, power supply, electromagnetism, environment, etc., resulting in stripes and dirty images in the final image. Summary of the invention

[0004] The present application provides a security inspection image processing method, device and electronic device to eliminate striped dirty images by timely updating air template stripes.

[0005] The present application provides a security inspection image processing method, the method comprising:

[0006] Obtaining a current strip detected by the detection board when a package enters the security inspection channel, and determining a first confidence level that the current strip is a strip used to indicate the package;

[0007] If it is determined based on the first confidence that the current strip tends to indicate wrapping, the current strip is processed to search for a contour boundary point set from the processed current strip; the contour boundary point set is used to determine a contour boundary in the current strip;

[0008] Based on the geometric structure between the contour boundary and the detection plate boundary, and the number of pixels within the contour boundary that meet the wrapping requirements, further determining the target confidence of the current strip; the target confidence of the current strip is used to indicate whether to update the existing air template strip based on the current strip;

[0009] If it is determined according to the target confidence that the existing air template strip is updated based on the current strip, the existing air template strip is updated based on the current strip and in proportion, and the updated air template strip is used to correct the strip detected by the detection plate to achieve security inspection image correction.

[0010] The present application provides a security inspection image processing device, which includes:

[0011] The strip unit is used to obtain the current strip detected by the detection board when a package enters the security inspection channel;

[0012] a processing unit, configured to determine a first confidence level that the current strip is a strip for indicating a package; and

[0013] If it is determined based on the first confidence that the current strip tends to indicate wrapping, the current strip is processed to search for a contour boundary point set from the processed current strip; the contour boundary point set is used to determine a contour boundary in the current strip;

[0014] Based on the geometric structure between the contour boundary and the detection plate boundary, and the number of pixels within the contour boundary that meet the wrapping requirements, further determining the target confidence of the current strip; the target confidence of the current strip is used to indicate whether to update the existing air template strip based on the current strip;

[0015] The updating unit is used to update the existing air template strip based on the current strip in proportion if it is determined based on the target confidence that the existing air template strip is updated based on the current strip. The updated air template strip is used to correct the strip detected by the detection plate to achieve security inspection image correction.

[0016] An embodiment of the present application provides an electronic device, which includes: a processor and a machine-readable storage medium; the machine-readable storage medium stores computer instructions, and when the computer instructions are executed by the processor, the steps in the above method are implemented.

[0017] It can be seen from the above technical solution that this embodiment determines whether to update the existing air template strip based on each single strip, so as to timely update the existing air template strip, timely and effectively remove the dirty image caused by signal fluctuations and other phenomena, effectively improve the image quality of security inspection equipment, improve subsequent material identification and image effects, and avoid the dirty image problem caused by signal fluctuations caused by hardware and other reasons.

[0018] Furthermore, when judging a single strip, this embodiment starts from the perspective of the contour boundary and the established geometric law of the detection plate (the geometric structure between the contour boundary and the detection plate boundary), avoiding other problems such as thin packages that are easily treated as air data updates.

[0019] Furthermore, by updating the existing air template strips in proportion, the dirty image phenomenon caused by signal fluctuation can be effectively removed.

[0020] Furthermore, the method of using each strip to determine whether to update the existing air template strip in this embodiment can handle dirty images caused by target offset in security inspection equipment in the security inspection field, dirty images caused by signal fluctuations due to other interferences such as temperature, voltage, and electromagnetic interference, and dirty images caused by signal fluctuations in other fields such as remote sensing detection and industrial inspection, and has certain generalizability. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 An example is shown of the schematic diagram of the offset of the anode tungsten target position;

[0023] Figure 2 An example is shown of a schematic diagram of a dirty stripe image caused by the position deviation of the anode tungsten target;

[0024] Figure 3 A flow chart of the method provided in the embodiment of the present application;

[0025] Figure 4 A flowchart for implementing step 301 provided in an embodiment of the present application;

[0026] Figure 5 A flowchart for implementing step 403 provided in an embodiment of the present application;

[0027] Figure 6 A flowchart for implementing step 302 provided in an embodiment of the present application;

[0028] Figure 7 A flowchart for implementing step 303 provided in an embodiment of the present application;

[0029] Figure 8 A structural diagram of a device provided in an embodiment of the present application;

[0030] Fig. 9 A hardware structure diagram provided for an embodiment of the present application. DETAILED DESCRIPTION

[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0032] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0033] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.

[0034] See also Figure 3 , Figure 3 A flowchart of a method provided in an embodiment of the present application. The method is applied to electronic equipment, such as the aforementioned X-ray security inspection equipment.

[0035] like Figure 3 As shown, the process may include the following steps:

[0036] Step 301, obtaining a current strip detected by the detection board when a package enters the security inspection channel, and determining a first confidence level that the current strip is a strip used to indicate the package.

[0037] Taking X-ray security inspection equipment as an example, after determining that a package has entered, the X-ray tube in the generator of the X-ray security inspection equipment will emit an X-ray source, and each detection unit on the detection board will collect data on the package (here, the high and low energy detection units on the detection board will collect high and low energy original data respectively) to obtain strips.

[0038] Optionally, in this embodiment, any stripe may be composed of t1 columns of digital signal values. Here, t1 represents the number of continuous integration times. For example, if t1 is 32, it means that a single stripe may be composed of 32 columns of digital signal values.

[0039] In this embodiment, any column of digital signal values ​​is composed of n1 digital signal values. n1 represents the total number of detection units. That is, any column of digital signal values ​​is composed of digital signal values ​​measured by different detection units at the same integration time. Taking n1 as 640 as an example, any column of digital signal values ​​is composed of 640 rows, and each row has only one digital signal value. The digital signal values ​​on the 640 rows are respectively the digital signal values ​​measured by the 640 detection units at the same integration time.

[0040] Optionally, in this embodiment, the first confidence level that the current strip is a strip for indicating a package can be determined based on the characteristic value, such as grayscale value, of each pixel point on the current strip and the characteristic value, such as grayscale value, of each pixel point in the maintained air template strip. This will be described below with examples and will not be repeated here.

[0041] Step 302: If it is determined based on the first confidence level that the current strip tends to indicate a wrap, the current strip is processed.

[0042] Optionally, in this embodiment, the higher the first confidence, the more it tends to indicate a package, and vice versa. When the first confidence is greater than or equal to the set confidence, it is determined that the current strip tends to indicate a package.

[0043] Optionally, in this embodiment, the current strip may be processed in an image morphology processing manner, the purpose of which is to facilitate searching for a contour boundary point set from the processed current strip, which will be described below. The following example will describe the processing of the current strip in an image morphology processing manner, which will not be described here.

[0044] Step 303: searching for a contour boundary point set from the current strip; the contour boundary point set is used to determine the contour boundary in the current strip.

[0045] This embodiment uses a deep search method to search for contours, which will be described below with examples and will not be described here in detail.

[0046] Step 304, based on the geometric structure between the contour boundary and the detection plate boundary, and the number of pixels within the contour boundary that meet the wrapping requirements, further determine the target confidence of the current strip; the target confidence of the current strip is used to indicate whether to update the existing air template strip based on the current strip.

[0047] This embodiment adjusts the first confidence level by means of the geometric structure between the contour and the detection plate, and the number of pixels within the contour boundary that meet the wrapping requirement, so as to obtain the target confidence level of the current strip.

[0048] As an embodiment, the geometric structure between the contour and the detection plate may include whether the contour boundary is flush with the detection plate boundary, for example: whether the upper and lower boundaries of the contour are flush with the upper and lower boundaries of the detection plate, and / or whether the left and right boundaries of the contour are flush with the left and right boundaries of the detection plate.

[0049] Optionally, whether the upper and lower boundaries of the contour are flush with the upper and lower boundaries of the detection plate is based on the slopes of the upper and lower boundaries of the contour. Here, the slopes of the upper and lower boundaries of the contour are determined based on the positions of the boundary pixel points of the upper and lower boundaries in the contour boundary point set, for example, the slope is: the quotient of the difference between the ordinate and the abscissa in the positions of any two boundary pixel points on the upper and lower boundaries.

[0050] Optionally, whether the left and right boundaries of the contour are flush with the left and right boundaries of the detection plate is based on the slopes of the left and right boundaries of the contour. Here, the slopes of the left and right boundaries of the contour are determined based on the positions of the boundary pixel points of the left and right boundaries in the contour boundary point set. For example, the slope is the quotient of the difference between the ordinate and the abscissa in the positions of any two boundary pixel points on the left and right boundaries.

[0051] Considering the geometric law that the edge of the detection plate is flat, if the above slope is 0 or infinite (+∞), it is considered to be flush.

[0052] In addition, in this embodiment, the number of pixels within the contour boundary that meet the packaging requirements can be counted based on the histogram. For example, for each pixel within the contour boundary, a pixel with the same position, i.e., a mapping pixel, can be found on the existing air template strip based on the position of the pixel (the mapping pixel has a mapping relationship with the above pixel). Afterwards, the difference between the feature value of the pixel and the feature value of the mapping pixel on the existing air template strip that has a mapping relationship with the pixel is calculated, and statistics are performed within the corresponding histogram range according to the size of the difference.

[0053] Here, the existing air template strip, initially, can be used to ensure that there is no package in the security inspection channel.

[0054] In this case, after turning on the radiation source and the detector at the same time, the air template is generated based on the full load data collected by the detector.

[0055] In this embodiment, if the geometric structure between the contour boundary and the detection plate boundary is that the contour boundary is flush with the detection plate boundary, and the number of pixel points that meet the packaging requirements within the contour boundary meets the set number requirements (for example, less than or equal to the set number threshold), the target confidence is higher, and vice versa. Based on this principle, this embodiment can determine the above target confidence.

[0056] Step 305: If it is determined according to the target confidence that the existing air template strip is updated based on the current strip, the existing air template strip is updated based on the current strip and in proportion, and the updated air template strip is used to correct the strip detected by the detection plate to achieve security inspection image correction.

[0057] As an embodiment, determining to update the existing air template strip based on the current strip according to the target confidence may include: if the target confidence is greater than or equal to the set confidence threshold, then determining to update the existing air template strip based on the current strip. Here, the set confidence threshold may be set according to actual needs and experience. On the contrary, when the target confidence is less than the set confidence threshold, it is determined not to use the current strip to update the existing air template strip, and the current strip is a parcel strip. The current strip detected by the detection board when a parcel enters the security inspection channel can be directly corrected for full load based on the existing air template strip to achieve security inspection image correction.

[0058] As an embodiment, when the present embodiment determines to update the existing air template strip based on the current strip according to the target confidence, the existing air template strip may be updated proportionally based on the target confidence to eliminate the horizontal stripe dirty image caused by signal fluctuation. Optionally, the proportionality here may be determined according to the confidence level, which is not specifically limited in the present embodiment. In the present embodiment, the proportional updating of the existing air template strip may be, for example, determining the weight of the current strip and the weight of the existing air template strip, and for each position, multiplying the characteristic value of the pixel point at that position on the current strip, such as the grayscale value, with the weight of the current strip to obtain a first product, multiplying the characteristic value of the pixel point at that position on the existing air template strip, such as the grayscale value, with the weight of the existing air template strip to obtain a second product, and taking the sum of the first product and the second product as the characteristic value of the pixel point at that position on the existing air template strip. And so on.

[0059] It can be seen that in this embodiment, when updating the existing air template strip based on the current strip, it is not directly for each position, directly replacing the feature value of the pixel point at the position in the existing air template strip with the feature value of the pixel point at the position in the current strip, but using the feature value of the pixel point at the position in the current strip in the above manner, the feature value of the pixel point at the position in the existing air template strip is proportionally updated. Compared with directly replacing the feature value of the pixel point at the position in the existing air template strip with the feature value of the pixel point at the position in the current strip, this is more effective in removing the dirty image phenomenon caused by signal fluctuations.

[0060] After the air template strip is updated, full load correction can be performed on the current strip detected by the detection plate when a package enters the security inspection channel based on the updated air template strip, so as to realize security inspection image correction.

[0061] So far, completed Figure 3 The process shown.

[0062] pass Figure 3 It can be seen from the shown process that this embodiment determines whether to update the existing air template strip based on each single strip, so as to timely update the existing air template strip, timely and effectively remove the dirty image caused by signal fluctuations and other phenomena, effectively improve the image quality of security inspection equipment, improve subsequent material recognition and image effects, and avoid the dirty image problem caused by signal fluctuations caused by hardware and other reasons.

[0063] Furthermore, when judging a single strip, this embodiment further judges whether the current strip is a parcel strip or an air strip from the perspective of the contour boundary and the established geometric law of the detection plate (the geometric structure between the contour boundary and the detection plate boundary). This can further avoid other problems such as thin parcels that are easily treated as air data updates.

[0064] Furthermore, by updating the existing air template strips in proportion, the dirty image phenomenon caused by signal fluctuation can be effectively removed.

[0065] Furthermore, the method of using each strip to determine whether to update the existing air template strip in this embodiment can handle dirty images caused by target offset in security inspection equipment in the security inspection field, dirty images caused by signal fluctuations due to other interferences such as temperature, voltage, and electromagnetic interference, and dirty images caused by signal fluctuations in other fields such as remote sensing detection and industrial inspection, and has certain generalizability.

[0066] The following describes how to determine the first confidence level that the current strip is the strip used to indicate the package:

[0067] See also Figure 4 , Figure 4 The step 301 provided in the embodiment of the present application is implemented as a flowchart. Figure 4 As shown, the process may include the following steps:

[0068] Step 401 : for each pixel point on the current strip, the difference between the characteristic value of the pixel point and the characteristic value of the mapped pixel point on the existing air template strip that has a mapping relationship with the pixel point is calculated.

[0069] As described above, the mapped pixel points on the existing air template strip that have a mapping relationship with the pixel points on the current strip refer to: the pixel points at the same position as the pixel points on the current strip.

[0070] Optionally, in this embodiment, for each pixel on the current strip, the characteristic value such as the grayscale value is subtracted between the pixel and the pixel at the corresponding position in the maintained air template strip (ie, the mapped pixel), and the difference is recorded in the corresponding histogram according to the size of the difference.

[0071] Step 402: If the number of pixels meeting the requirements in the current strip exceeds a first threshold, a second confidence level is determined to determine that the current strip is a suspected wrapping strip based on the target confidence level of the previous strip; wherein the difference between the characteristic value of the pixel meeting the requirements in the current strip and the characteristic value of the mapped pixel on the air template strip that has a mapping relationship with the pixel is greater than a set difference.

[0072] Optionally, each difference in the above histogram is counted to count the number of pixels in the current strip that meet the requirements (the difference between the characteristic value of the pixel, such as the grayscale value, and the characteristic value of the mapped pixel of the pixel in the air template strip, such as the grayscale value, is greater than the set difference). If the number exceeds the first threshold, then based on the target confidence of the previous strip, the second confidence that the current strip is a suspected wrapped strip is determined. Here, the target confidence of the previous strip and the number can be weighted to obtain the second confidence.

[0073] It should be noted that the difference value and the first threshold value may be set according to actual needs and are not specifically limited in this embodiment.

[0074] Step 403: If it is determined based on the second confidence level that the current strip tends to be a suspected wrapping strip, the first confidence level is determined based on the fluctuation of the characteristic values ​​of each pixel in the current strip in the time direction.

[0075] Optionally, if the second confidence is larger, the current strip is considered to be a suspected wrapped strip, and step 403 is executed. If the second confidence is relatively small, such as less than the set confidence value, the current strip is considered to be suspected air, and the existing air template strip can be directly updated based on the second confidence and in proportion. The update here is described in step 305 and will not be repeated here.

[0076] As for how to determine the first confidence level based on the fluctuation of the characteristic value of each pixel point in the current strip in the time direction, there are multiple implementation methods in the specific implementation of this embodiment, and one of the implementation methods is described below by way of example:

[0077] See also Figure 5 , Figure 5 The step 403 implementation flow chart provided in the embodiment of the present application. Figure 5 As shown, the process may include the following steps:

[0078] Step 501, for each row in the current strip, the standard deviation of the row is calculated according to the characteristic values ​​of each pixel in the row; the standard deviation of any row is the standard deviation of the characteristic values ​​of each pixel in the row.

[0079] It should be noted that the standard deviation here is only an example and is not intended to be limiting.

[0080] For example, first calculate the mean of each row (denoted as ): . Then calculate the standard deviation of each row : . Where N is the number of pixels in each row, Represents the feature value of a pixel.

[0081] Step 502: If the standard deviation of each row is less than the set standard deviation threshold and the difference between the current strip and the existing air template strip meets the set difference requirement, the first confidence level is determined based on the second confidence level; the first confidence level is used to tend to indicate a package with uniform texture. If the standard deviation of each row is less than the set standard deviation threshold and the difference between the current strip and the existing air template strip does not meet the set difference requirement, the first confidence level is directly determined as the confidence level for tending to indicate air; or, if the standard deviation of at least one row in the current strip is greater than the set standard deviation threshold and the difference between the current strip and the existing air template strip meets the set difference requirement, the current strip is skipped.

[0082] If the current strip is an air strip or a thin package with a relatively uniform texture, the characteristic value fluctuation of the pixel points in the direction of the time axis in the current strip is small, that is, the standard deviation of each row is small. Based on this, if the standard deviation of each row is small (for example, all are less than the set standard deviation threshold), and the difference between the current strip and the existing air template strip does not meet the set difference requirement (for example, the difference in the standard deviation of the rows corresponding to the same row identifier (such as the row number) in the current strip and the air template strip is less than or equal to the set difference), then the first confidence level is directly determined as the confidence level for indicating air. When it is determined that the first confidence level is the confidence level for indicating air, the existing air template strip can be directly updated based on the first confidence level and in proportion. The update here is described in step 305 and will not be repeated here.

[0083] If the standard deviation of each row is small (for example, all are smaller than the set standard deviation threshold), and the difference between the current strip and the existing air template strip meets the set difference requirement (for example, the difference in the standard deviation of the rows corresponding to the same row identifier (such as row number) in the current strip and the air template strip is less than or equal to the set difference), then the current strip may indicate a package with uniform texture, and the first confidence level can be determined as the confidence level that tends to indicate a package with uniform texture.

[0084] Of course, if the standard deviation of at least one row in the current strip is greater than the set standard deviation threshold, the current strip is directly considered to be a parcel strip, and the current strip detected by the detection board when a parcel enters the security inspection channel is fully corrected based on the existing air template strip to achieve security inspection image correction.

[0085] So far, completed Figure 5 The process shown.

[0086] It can be seen from the above description that this embodiment participates in the decision whether to update the existing air template strip based on the current strip by counting the differences on the histogram (the difference between the characteristic value of the pixel point in the current strip, such as the grayscale value, and the characteristic value of the mapped pixel point of the pixel point in the air template strip, such as the grayscale value), calculating the standard deviation of the characteristic value of each pixel point in the current strip in the time direction, and morphological (air, thin package with uniform texture, or package) and other dimensions, so as to avoid other problems that are easily regarded as air data updates, such as thin packages.

[0087] Step 302 is described below:

[0088] See also Figure 6 , Figure 6 The step 302 provided in the embodiment of the present application is implemented as a flowchart. Figure 6 As shown, the process may include the following steps:

[0089] Step 601, binarize the feature values ​​of the pixels in the current strip, so that if the feature value of any pixel in the second strip is less than a set threshold, the feature value is set to a first value, and if it is greater than or equal to the set threshold, the feature value is set to a second value.

[0090] For example, taking the characteristic value as a grayscale value, the first value may be 0 and the second value may be 255.

[0091] Step 602, performing an erosion operation on the current strip to eliminate interference from isolated noise points, and performing an expansion operation on the current strip after the erosion operation to fill gaps and contour discontinuities.

[0092] In this embodiment, the erosion operation is intended to eliminate isolated and discontinuous pixels in the current strip, and the contour in the current strip remains intact. The specific implementation of the erosion operation is similar to the existing erosion operation processing method, which will not be repeated here.

[0093] In this embodiment, the expansion operation is used to fill the gaps (also called blank areas) in the current strip and smooth the contour to avoid contour discontinuity. The specific implementation of the expansion operation is similar to the existing expansion operation processing method, which will not be repeated. The gaps here can be the original gaps in the current strip, or the gaps introduced by the corrosion operation, which is not specifically limited in this embodiment.

[0094] So far, completed Figure 6 The process shown.

[0095] pass Figure 6 The process shown realizes processing the current strip according to the image morphology processing method.

[0096] The following example describes step 303:

[0097] See also Figure 7 , Figure 7 The step 303 implementation flow chart provided in the embodiment of the present application. Figure 7 As shown, the process may include the following steps:

[0098] Step 701, starting from the specified position of the current strip, traverse the pixels in order, and use the traversed pixel as the current pixel; if the current pixel does not meet the boundary pixel requirement, execute step 702. If the current pixel meets the boundary pixel requirement, execute step 704.

[0099] The designated position here can be determined based on the structure of the neighborhood below. For example, if the neighborhood is an 8-neighborhood, the designated position is generally the position starting from the third column and the third row. This ensures that the pixel at this position has 8 adjacent pixels. The 8-neighborhood of any pixel refers to a 3*3 matrix structure formed with the pixel as the center. The 8-neighborhood of a pixel includes its eight adjacent pixels above, below, left, right, and upper left, upper right, lower left, and lower right.

[0100] Here, the current pixel does not meet the boundary pixel requirements means that the characteristic value of the current pixel, such as the grayscale value, is not the characteristic value required for the boundary pixel. Similarly, the current pixel meets the boundary pixel requirements means that the characteristic value of the current pixel, such as the grayscale value, is the characteristic value required for the boundary pixel. Taking the grayscale value as an example, the characteristic value required for the boundary pixel is, for example, 255 (0xFF). In view of the above-mentioned binarization processing, if the grayscale value of the current pixel is 0, it is considered that the current pixel does not meet the boundary pixel requirements.

[0101] Step 702, searching the neighborhood centered at the current pixel in the current strip, and then executing step 703.

[0102] For example, search the 8-neighborhood centered on the current pixel in the current strip.

[0103] Step 703, traverse each pixel point in the neighborhood in the set direction order, if the pixel point meets the boundary pixel point requirement, record the pixel point as the boundary pixel point, if the pixel point does not meet the boundary pixel point requirement, take the pixel point as the current pixel point, return to the step of searching the neighborhood with the current pixel point as the center in the current strip, and then execute step 705.

[0104] For example, if the direction order is set to left -> upper left, the pixel on the left is traversed first. If the pixel meets the boundary pixel requirement, the pixel is recorded as a boundary pixel. If the pixel does not meet the non-boundary pixel requirement, the pixel is used as the current pixel and the step of searching the neighborhood centered on the current pixel in the current strip is returned until the boundary pixel is traversed or all pixels are traversed. Other directions are similar and will not be described one by one.

[0105] Step 704: record the current pixel as a boundary pixel, and then execute step 705.

[0106] Step 705: Generate a contour boundary point set based on the recorded boundary pixel points.

[0107] So far, completed Figure 7 The process shown.

[0108] pass Figure 7 The process shown finally realizes searching for a set of contour boundary points from the current strip.

[0109] The method provided in the embodiments of the present application is described above.

[0110] It should be noted that the detection unit is an important component of the detection board. There are differences between the individual detection units on the detection board. Different positions and irradiation angles will also lead to inconsistent response values ​​of each detection unit to X-rays. In order to eliminate this error, it is often necessary to perform background data and full-load data correction on the high and low energy data in each strip. The full-load data correction is based on the above-mentioned air template strip, and the background data correction is based on the background template strip. The background template strip refers to the strip collected without turning on the radiation source.

[0111] In addition, in this embodiment, normalization correction can be performed after the air template strip is updated. In addition, for some smaller models, due to the inconsistent distances of the radiation source passing through the object to the detector, the object in the security inspection image is seriously deformed, so after the normalization correction, geometric correction may be further performed on the correction result.

[0112] After correcting each single strip as described above, other special operations such as enhancement, noise reduction, super enhancement, and pseudo coloring can be further performed. After that, the processed strips are stitched together into a package image in sequence and sent to the display for display at a predetermined frame rate and refresh frequency. The above process is repeated until the package scanning is completed and the stitched package image is output.

[0113] The following is a description of the device provided in the embodiment of the present application:

[0114] See also Figure 8, Figure 8 This is a diagram of the structure of a device provided in an embodiment of the present application. The device may include:

[0115] The strip unit is used to obtain the current strip detected by the detection board when a package enters the security inspection channel;

[0116] a processing unit, configured to determine a first confidence level that the current strip is a strip for indicating a package; and

[0117] If it is determined based on the first confidence that the current strip tends to indicate wrapping, the current strip is processed to search for a contour boundary point set from the current strip; the contour boundary point set is used to determine a contour boundary in the current strip;

[0118] Based on the geometric structure between the contour boundary and the detection plate boundary, and the number of pixels within the contour boundary that meet the wrapping requirements, further determining the target confidence of the current strip; the target confidence of the current strip is used to indicate whether to update the existing air template strip based on the current strip;

[0119] The updating unit is used to update the existing air template strip based on the current strip in proportion if it is determined based on the target confidence that the existing air template strip is updated based on the current strip. The updated air template strip is used to correct the strip detected by the detection plate to achieve security inspection image correction.

[0120] As an embodiment, the first confidence level of determining that the current strip is a strip for indicating a package includes:

[0121] For each pixel point on the current strip, the difference between the characteristic value of the pixel point and the characteristic value of the mapped pixel point on the existing air template strip that has a mapping relationship with the pixel point is calculated;

[0122] If the number of pixels meeting the requirements in the current strip exceeds a first threshold, a second confidence level that the current strip is a suspected wrapped strip is determined based on the target confidence level of the previous strip; wherein the difference between the characteristic value of the pixel meeting the requirements in the current strip and the characteristic value of the mapped pixel having a mapping relationship with the pixel on the air template strip is greater than a set difference;

[0123] If it is determined based on the second confidence level that the current strip tends to be a suspected wrapped strip, the first confidence level is determined based on fluctuations in the time direction of the characteristic values ​​of each pixel in the current strip.

[0124] As an embodiment, determining the first confidence level based on fluctuation of the characteristic value of each pixel point in the current strip in the time direction includes:

[0125] For each row in the current strip, calculate the standard deviation of the row based on the characteristic values ​​of each pixel in the row ; The standard deviation of any row is the standard deviation of the eigenvalues ​​of each pixel in that row;

[0126] If the standard deviation of each row is less than the set standard deviation threshold and the difference between the current strip and the existing air template strip meets the set difference requirement, the first confidence level is determined based on the second confidence level; the first confidence level is used to tend to indicate a package with uniform texture;

[0127] If the standard deviation of each row is less than the set standard deviation threshold and the difference between the current strip and the existing air template strip does not meet the set difference requirement, the first confidence level is directly determined as the confidence level for indicating air tendency.

[0128] As an embodiment, the processing the current strip includes:

[0129] Binarizing the feature values ​​of the pixels in the current strip so that if the feature value of any pixel in the second strip is less than a set threshold, the feature value is set to a first value, and if it is greater than or equal to the set threshold, the feature value is set to a second value;

[0130] An erosion operation is performed on the current strip to eliminate the interference of isolated noise points, and an expansion operation is performed on the current strip after the erosion operation to fill the gaps and smooth the contours.

[0131] As an embodiment, searching for a contour boundary point set from the current strip includes:

[0132] Starting from the specified position of the current strip, traverse the pixels in order and use the traversed pixel as the current pixel;

[0133] If the current pixel meets the boundary pixel requirements, the current pixel is recorded as a boundary pixel;

[0134] If the current pixel does not meet the boundary pixel requirement, search the neighborhood with the current pixel as the center in the current strip; traverse each pixel in the neighborhood in the set direction order, if the pixel meets the boundary pixel requirement, record the pixel as the boundary pixel; if the pixel does not meet the boundary pixel requirement, take the pixel as the current pixel, and return to the step of searching the neighborhood with the current pixel as the center in the current strip;

[0135] The recorded boundary pixel points constitute the contour boundary point set.

[0136] As an embodiment, the current pixel point not meeting the boundary pixel point requirement means that the feature value of the current pixel point is not the feature value required for the boundary pixel point;

[0137] The fact that the current pixel meets the boundary pixel requirement means that the characteristic value of the current pixel is the required characteristic value of the boundary pixel.

[0138] As an embodiment, the geometric structure between the contour boundary and the detection plate boundary includes whether the contour boundary is flush with the detection plate boundary;

[0139] Wherein, whether the contour boundary is flush with the detection plate boundary includes: whether the upper and lower boundaries of the contour are flush with the upper and lower boundaries of the detection plate, and / or whether the left and right boundaries of the contour are flush with the left and right boundaries of the detection plate;

[0140] Whether the upper and lower boundaries of the contour are flush with the upper and lower boundaries of the detection plate is based on the slopes of the upper and lower boundaries of the contour; the slopes of the upper and lower boundaries of the contour are determined based on the positions of the boundary pixel points of the upper and lower boundaries in the contour boundary point set;

[0141] Whether the left and right boundaries of the contour are flush with the left and right boundaries of the detection plate is based on the slopes of the left and right boundaries of the contour; the slopes of the left and right boundaries of the contour are determined based on the positions of the boundary pixel points of the left and right boundaries in the contour boundary point set.

[0142] As an embodiment, the pixel points within the contour boundary that meet the wrapping requirements mean that: if the difference between the characteristic value of a pixel point within the contour boundary and the characteristic value of a mapped pixel point on the existing air template strip that has a mapping relationship with the pixel point is greater than the set difference, then it is determined that the pixel point meets the wrapping requirements.

[0143] As an embodiment, further determining the target confidence of the current strip based on the geometric structure between the contour boundary and the detection plate boundary and the number of pixel points within the contour boundary that meet the wrapping requirement includes:

[0144] According to the geometric structure between the contour boundary and the detection plate boundary, and the number of pixel points within the contour boundary that meet the packaging requirement, the first confidence is adjusted to obtain the target confidence;

[0145] Among them, if the geometric structure between the contour boundary and the detection plate boundary is that the contour boundary is flush with the detection plate boundary, and the number of pixel points within the contour boundary that meet the packaging requirements meets the set number requirements, the target confidence is higher.

[0146] As an embodiment, if it is determined based on the second confidence that the current strip tends to be an air strip, the processing unit further includes: updating the existing air template strip using the current strip based on the second confidence and in proportion;

[0147] If the first confidence level is a confidence level for indicating air, the processing unit further includes: updating the existing air template strip using the current strip in proportion based on the first confidence level.

[0148] So far, completed Figure 8 Structural description of the device shown.

[0149] Based on the same application concept as the above method, the present application embodiment also provides Figure 8 The hardware structure of the device shown in FIG. Fig. 9 As shown, the hardware structure includes: a processor and a machine-readable storage medium. The machine-readable storage medium stores computer instructions, and when the computer instructions are executed by the processor, the method disclosed in the above example of this application can be implemented.

[0150] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented.

[0151] Exemplarily, the above-mentioned machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device, which can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.

[0152] The systems, devices, templates or units described in the above embodiments may be implemented by computers or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0153] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0154] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0155] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0156] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0158] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A security inspection image processing method, characterized in that: The method includes: Obtaining a current strip detected by the detection board when a package enters the security inspection channel, and determining a first confidence level that the current strip is a strip used to indicate the package; If it is determined based on the first confidence that the current strip tends to indicate wrapping, the current strip is processed to search for a contour boundary point set from the processed current strip; the contour boundary point set is used to determine a contour boundary in the current strip; Based on the geometric structure between the contour boundary and the detection plate boundary, and the number of pixels within the contour boundary that meet the wrapping requirements, further determining the target confidence of the current strip; the target confidence of the current strip is used to indicate whether to update the existing air template strip based on the current strip; If it is determined according to the target confidence that the existing air template strip is updated based on the current strip, the existing air template strip is updated based on the current strip and in proportion, and the updated air template strip is used to correct the strip detected by the detection plate to achieve security inspection image correction.

2. The method according to claim 1, characterized in that: The first confidence level of determining that the current strip is a strip for indicating a package includes: For each pixel point on the current strip, the difference between the characteristic value of the pixel point and the characteristic value of the mapped pixel point on the existing air template strip that has a mapping relationship with the pixel point is calculated; If the number of pixels meeting the requirements in the current strip exceeds a first threshold, a second confidence level that the current strip is a suspected wrapped strip is determined based on the target confidence level of the previous strip; wherein the difference between the characteristic value of the pixel meeting the requirements in the current strip and the characteristic value of the mapped pixel having a mapping relationship with the pixel on the air template strip is greater than a set difference; If it is determined based on the second confidence level that the current strip tends to be a suspected wrapped strip, the first confidence level is determined based on fluctuations in the time direction of the characteristic values ​​of each pixel in the current strip.

3. The method according to claim 2, characterized in that The determining the first confidence level based on the fluctuation of the characteristic value of each pixel point in the current strip in the time direction includes: For each row in the current strip, calculate the standard deviation of the row based on the characteristic values ​​of each pixel in the row ; The standard deviation of any row is the standard deviation of the eigenvalues ​​of each pixel in that row; If the standard deviation of each row is less than the set standard deviation threshold and the difference between the current strip and the existing air template strip meets the set difference requirement, the first confidence level is determined based on the second confidence level; the first confidence level is used to tend to indicate a package with uniform texture; If the standard deviation of each row is less than the set standard deviation threshold and the difference between the current strip and the existing air template strip does not meet the set difference requirement, the first confidence level is directly determined as the confidence level for indicating air tendency.

4. The method according to claim 1, characterized in that: The processing of the current strip includes: Binarizing the feature values ​​of the pixels in the current strip so that if the feature value of any pixel in the current strip is less than a set threshold, the feature value is set to a first value, and if it is greater than or equal to the set threshold, the feature value is set to a second value; An erosion operation is performed on the current strip to eliminate the interference of isolated noise points, and an expansion operation is performed on the current strip after the erosion operation to fill the gaps and smooth the contours.

5. The method according to claim 1 or 4, characterized in that: The step of searching for a contour boundary point set from the processed current strip; wherein the contour boundary point set is used to determine the contour boundary in the current strip comprises: Starting from the specified position of the current strip, traverse the pixels in order and use the traversed pixel as the current pixel; If the current pixel meets the boundary pixel requirements, the current pixel is recorded as a boundary pixel; If the current pixel does not meet the boundary pixel requirement, search the neighborhood with the current pixel as the center in the current strip; traverse each pixel in the neighborhood in the set direction order, if the pixel meets the boundary pixel requirement, record the pixel as the boundary pixel; if the pixel does not meet the boundary pixel requirement, take the pixel as the current pixel, and return to the step of searching the neighborhood with the current pixel as the center in the current strip; The recorded boundary pixel points constitute the contour boundary point set.

6. The method according to claim 5, characterized in that The current pixel does not meet the boundary pixel requirement, which means that the feature value of the current pixel is not the required feature value of the boundary pixel; The fact that the current pixel meets the boundary pixel requirement means that the characteristic value of the current pixel is the required characteristic value of the boundary pixel.

7. The method according to claim 1, characterized in that The geometric structure between the contour boundary and the detection plate boundary includes whether the contour boundary is flush with the detection plate boundary; Wherein, whether the contour boundary is flush with the detection plate boundary includes: whether the upper and lower boundaries of the contour are flush with the upper and lower boundaries of the detection plate, and / or whether the left and right boundaries of the contour are flush with the left and right boundaries of the detection plate; Whether the upper and lower boundaries of the contour are flush with the upper and lower boundaries of the detection plate is based on the slopes of the upper and lower boundaries of the contour; the slopes of the upper and lower boundaries of the contour are determined based on the positions of the boundary pixel points of the upper and lower boundaries in the contour boundary point set; Whether the left and right boundaries of the contour are flush with the left and right boundaries of the detection plate is based on the slopes of the left and right boundaries of the contour; the slopes of the left and right boundaries of the contour are determined based on the positions of the boundary pixel points of the left and right boundaries in the contour boundary point set.

8. The method according to claim 1, characterized in that: The pixel point within the contour boundary that meets the packaging requirement means that if the difference between the characteristic value of a pixel point within the contour boundary and the characteristic value of a mapped pixel point on the existing air template strip that has a mapping relationship with the pixel point is greater than the set difference, then it is determined that the pixel point meets the packaging requirement.

9. The method according to claim 7 or 8, characterized in that: The further determining the target confidence of the current strip based on the geometric structure between the contour boundary and the detection plate boundary and the number of pixel points within the contour boundary that meet the wrapping requirement includes: According to the geometric structure between the contour boundary and the detection plate boundary, and the number of pixel points within the contour boundary that meet the packaging requirement, the first confidence is adjusted to obtain the target confidence; Among them, if the geometric structure between the contour boundary and the detection plate boundary is that the contour boundary is flush with the detection plate boundary, and the number of pixel points within the contour boundary that meet the packaging requirements meets the set number requirements, the target confidence is higher.

10. The method according to claim 2 or 3, characterized in that: If it is determined based on the second confidence that the current strip tends to be an air strip, the method further includes: updating the existing air template strip using the current strip based on the second confidence and in proportion; If the first confidence level is a confidence level for indicating air, the method further includes: updating an existing air template strip using the current strip in proportion based on the first confidence level.

11. A security inspection image processing device, characterized in that: The device includes: The strip unit is used to obtain the current strip detected by the detection board when a package enters the security inspection channel; a processing unit, configured to determine a first confidence level that the current strip is a strip for indicating a package; and If it is determined based on the first confidence that the current strip tends to indicate wrapping, the current strip is processed to search for a contour boundary point set from the processed current strip; the contour boundary point set is used to determine a contour boundary in the current strip; Based on the geometric structure between the contour boundary and the detection plate boundary, and the number of pixels within the contour boundary that meet the wrapping requirements, further determining the target confidence of the current strip; the target confidence of the current strip is used to indicate whether to update the existing air template strip based on the current strip; The updating unit is used to update the existing air template strip based on the current strip in proportion if it is determined based on the target confidence that the existing air template strip is updated based on the current strip. The updated air template strip is used to correct the strip detected by the detection plate to achieve security inspection image correction.

12. An electronic device, characterized in that: The electronic device includes: a processor and a machine-readable storage medium; The machine-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the steps in any one of the methods of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Image generation method and system for security check system

    CN116612037A

  • Security check image processing method and device and electronic equipment

    CN117788346A