A package cutting method, device, equipment and medium
By performing radioactive light scanning and attenuation signal value analysis on the package during security inspection, the package is differentiated in real time, and the problem of low parcel segmentation accuracy in the prior art is solved, and the accuracy and efficiency of contraband detection are improved.
Patent Information
- Application Number
- CN202011460715.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-11
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2040-12-11
AI Technical Summary
In the complex scenarios of interlaced packages, the package slicing method based on pseudo-color images has low accuracy, resulting in low accuracy in detection of contraband.
By scanning the package radioactively along the direction of the first coordinate axis of the spatial coordinate system during security inspection, it is determined whether there is a package sub-region in the translucent area, and set marks according to the intersection of the attenuation signal value and coordinate points, merging adjacent areas, and real-time Distinguish packages to improve cleavage accuracy and efficiency.
It improves the accuracy and efficiency of parcel cleavage, reduces data storage requirements, simplifies the process of determining parcel areas, and reduces the false detection and missed detection rate of subsequent contraband testing.
Smart Images

Figure CN112598690B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a package cutting method, device, equipment and medium. Background Art
[0002] With the continuous development of computer technology, computer technology has been widely used in various fields, such as in the field of security inspection. At present, the security inspection method is generally as follows: a radioactive security inspection machine, such as an X-ray security inspection machine, is set above the conveyor belt, and the package is placed on the conveyor belt. The X-ray security inspection machine captures the transillumination data of the package during the security inspection process, renders the transillumination data, and generates a pseudo-color image. The security inspector determines whether there are contraband in the package based on the pseudo-color image, etc. However, the real-time pseudo-color image may include multiple packages, which is easy to cause false detection or missed detection. Therefore, effectively segmenting each security inspection package helps to improve the accuracy of contraband detection.
[0003] In the prior art, each package is mainly identified based on the color of the pseudo-color image to segment the package. However, in complex scenes with interlaced packages, the accuracy of the package segmentation method based on the pseudo-color image is low. Summary of the invention
[0004] The embodiments of the present application provide a package cutting method, device, equipment and medium for improving the accuracy of package cutting.
[0005] In a first aspect, a package cutting method is provided, comprising:
[0006] During the security inspection, the moving packages are scanned with radioactive light in sequence along the first coordinate axis of the spatial coordinate system, where:
[0007] If it is determined that there is a package sub-region in the transillumination area of the current scan, then determine the package sub-region of the current scan; wherein the package sub-region of the current scan includes each coordinate point belonging to the package; the transillumination area corresponds to the area in the spatial coordinate system;
[0008] For each two adjacent unit areas of the currently scanned package sub-area and the last scanned package sub-area in the second coordinate axis direction in the spatial coordinate system, if it is determined that the coordinate points corresponding to the two adjacent unit areas have an intersection, the two adjacent unit areas are set as a first mark; wherein the first mark is used to indicate an area belonging to the current package;
[0009] If the wrapped sub-region of the current scan has no intersection with the wrapped sub-region of the next scan in the coordinate points in the first coordinate axis direction, the wrapped sub-regions marked with the first mark in each scan before the next scan are merged to obtain the wrapped region.
[0010] In the embodiment of the present application, during the security inspection process, when the package is scanned with radioactive light, it is determined whether there is a package sub-area in the scanned transillumination area. If there is a package sub-area in the current transillumination area, it is determined whether the package sub-area scanned currently and the package sub-area scanned last belong to the same package, thereby avoiding package segmentation errors, improving the accuracy of package segmentation, and further improving the accuracy of subsequent contraband detection. Moreover, in the embodiment of the present application, it is determined in real time whether the currently scanned package sub-area and the package sub-area scanned last belong to the same package, without the need to perform package segmentation after generating a pseudo-color image at a later stage. While the package is scanned with radioactive light, different packages can be distinguished, which relatively reduces the time consumption of package segmentation and improves the efficiency of package segmentation. Moreover, in the present embodiment, the first mark is used to record the areas belonging to the same package, which can reduce data storage on the one hand, and on the other hand, these areas belonging to one package can be directly merged at a later stage, which can relatively simplify the process of determining the package area.
[0011] In a possible embodiment, if it is determined that there is an encapsulated sub-region in the transillumination region of the current scan, determining the encapsulated sub-region of the current scan includes:
[0012] During the current radioactive light scanning process, the attenuation signal value of each coordinate point in the transillumination area after scanning is obtained;
[0013] Each coordinate point whose attenuation signal value is less than the threshold value is determined as the wrapped sub-area of the current scan.
[0014] In this embodiment, whether there is a package at each coordinate point in the trans-illumination area is determined based on the attenuation signal value of the coordinate point, and then whether it is the currently scanned package sub-area is determined based on the coordinate point belonging to the package. The calculation complexity is low, the time consumption is small, and it is beneficial to improve the efficiency of package segmentation.
[0015] In a possible embodiment, the attenuation signal value of each coordinate point includes a first attenuation signal value and a second attenuation signal value, the first attenuation signal value and the second attenuation signal value are obtained by two detectors respectively, and each coordinate point whose attenuation signal value is less than a threshold is determined as the wrapped sub-area of the current scan, including:
[0016] For each coordinate point, if the first attenuation signal value of the corresponding coordinate point is less than the first threshold, and / or the second attenuation signal value of the corresponding coordinate point is less than the second threshold, the corresponding coordinate point is determined as the wrapped sub-area of the current scan.
[0017] In this embodiment, whether the coordinate point is the sub-region of the package currently scanned is determined based on whether the first attenuation signal value or the second attenuation signal value of the coordinate point is less than the corresponding threshold value. Based on the two attenuation signal values, the coordinate points belonging to the package can be found as much as possible to improve the accuracy of the package sub-region determined based on the coordinate points belonging to the package, thereby improving the accuracy of package segmentation.
[0018] In a possible embodiment, if it is determined that the coordinate points corresponding to two adjacent unit areas have an intersection, setting the corresponding two adjacent unit areas as a first mark includes:
[0019] In each unit area, record the starting coordinate point and the ending coordinate point belonging to the package in each unit area;
[0020] According to the recorded starting coordinate point and ending coordinate point of each unit area, determine whether the coordinate points in two adjacent unit areas have an intersection;
[0021] If the coordinate points in the two corresponding adjacent unit areas have an intersection, the two corresponding adjacent unit areas are set as the first mark.
[0022] Usually, there is a connection between the coordinate points of two adjacent unit areas belonging to a package. In this embodiment, the coordinate points of the package area are divided more finely in the direction of the second coordinate axis, and whether the corresponding two adjacent unit areas are connected is determined based on whether there is an intersection between the coordinate points, and then it is determined whether the corresponding two adjacent unit areas are sub-areas of the same package, thereby improving the accuracy of package segmentation. In addition, in this embodiment, the first mark is used to record each coordinate point belonging to the same package, which minimizes the amount of data storage.
[0023] In a possible embodiment, in each unit area in the direction of the second coordinate axis, the starting point coordinates and the ending point coordinates of the package in each unit area are recorded, including:
[0024] For each unit area, if the starting coordinate point in the currently scanned wrapped sub-area is continuous with the ending coordinate point in the last scanned wrapped sub-area, the starting coordinate point in the last scanned wrapped sub-area and the ending coordinate point in the currently scanned wrapped sub-area are set as a second mark, and the second mark is used to indicate a boundary point of the currently scanned wrapped sub-area;
[0025] For each unit area, if the starting coordinate point in the currently scanned package sub-area is not continuous with the ending coordinate point of the previously scanned package sub-area, the starting coordinate point and the ending coordinate point of the previously scanned package sub-area and the starting coordinate point and the ending coordinate point of the currently scanned package sub-area are set as the second mark.
[0026] In this embodiment, in each unit area in the direction of the second coordinate axis, the boundary point of the parcel sub-area scanned currently is determined according to whether the starting coordinate point in the parcel sub-area scanned currently is continuous with the ending coordinate point of the parcel sub-area scanned last, and then the parcel sub-area can be determined more accurately according to the boundary point of the parcel sub-area, thereby improving the accuracy of parcel segmentation. In addition, in this embodiment, the second mark can be used to record each boundary point belonging to the parcel, which can relatively reduce the amount of stored data, and the parcel sub-area can be determined based on the second mark later, simplifying the process of determining the parcel sub-area later.
[0027] In a possible embodiment, if the parcel sub-region of the current scan does not have an intersection with the parcel sub-region of the next scan in the coordinate point in the first coordinate axis direction, merging the parcel sub-regions marked with the first mark in each scan before the next scan to obtain the parcel region, including:
[0028] For each unit area, if the value on the first coordinate axis of the end coordinate point of the package sub-area marked with the second mark is less than the value on the first coordinate axis of the end coordinate point of the package sub-area scanned currently, the corresponding unit area recording the starting coordinate point and the end coordinate point in the package sub-area marked with the second mark is set as a third mark; the third mark is used to indicate that the coordinate points belonging to the current package in the corresponding unit area have been scanned;
[0029] For the unit area marked with the third mark in the direction of the second coordinate axis, the corresponding area marked with the first mark is merged to obtain the wrapped area.
[0030] In this embodiment, it is directly determined whether the coordinate points belonging to the current package in the corresponding unit area have been scanned based on the value of the coordinate points on the first coordinate axis. Usually, the coordinate points of the same package in the direction of the first coordinate axis are related. If the end coordinate point of the historical package sub-area is smaller than the end coordinate point of the currently scanned package sub-area, it means that the two package sub-areas are unrelated. Therefore, it can be determined that the coordinate points belonging to the current package in the unit area have been scanned. In this embodiment, whether the coordinate points belonging to the current package in the corresponding unit area are scanned based on the coordinate size is judged. The method is simple, time-saving, and conducive to improving the efficiency of package segmentation.
[0031] In a possible embodiment, after obtaining the package area, the following steps are included:
[0032] Generate a grayscale image according to the attenuation signal value of each coordinate point in each scanning process before the next scanning;
[0033] Rendering each pixel point into a corresponding color according to the attenuation signal value of each pixel point in the grayscale image to generate a pseudo-color image;
[0034] According to the coordinate points of the wrapped area, a wrapped image area is determined from the pseudo-color image.
[0035] In this embodiment, the process of determining the package area based on the attenuation signal value and the process of generating the pseudo-color image based on the attenuation signal value are completed in parallel, which can reduce the time of package segmentation and improve the efficiency of package segmentation. In addition, in this embodiment, the package image area is determined from the pseudo-color image according to the coordinate points of the package area, so that a more distinguishable pseudo-color image can be rendered, so that the staff can intuitively detect contraband based on the pseudo-color image.
[0036] In a second aspect, a package cutting device is provided, comprising:
[0037] A scanning module, used for sequentially performing radioactive light scanning on the moving packages along the first coordinate axis direction in the spatial coordinate system during the security inspection process;
[0038] a determination module, configured to determine the package sub-region in the scanning area of the current scan if it is determined that there is a package sub-region in the transillumination area of the current scan; wherein the package sub-region of the current scan includes each coordinate point belonging to the package; and the transillumination area corresponds to an area in the spatial coordinate system;
[0039] A setting module, for setting, for each two adjacent unit areas of the currently scanned package sub-area and the last scanned package sub-area in the second coordinate axis direction in the spatial coordinate system, if it is determined that the coordinate points corresponding to the two adjacent unit areas have an intersection, the corresponding two adjacent unit areas are set as a first mark; wherein the first mark is used to indicate an area belonging to the current package;
[0040] The obtaining module is used for merging the enclosed sub-regions marked with the first mark in each scan before the next scan to obtain the enclosed region if the enclosed sub-region of the current scan does not have an intersection with the coordinate points of the enclosed sub-region of the next scan in the direction of the first coordinate axis.
[0041] In a possible embodiment, the determining module is specifically configured to:
[0042] During the current radioactive light scanning process, the attenuation signal value of each coordinate point in the transillumination area after scanning is obtained;
[0043] Each coordinate point whose attenuation signal value is less than the threshold value is determined as the wrapped sub-area of the current scan.
[0044] In a possible embodiment, the attenuation signal value of each coordinate point includes a first attenuation signal value and a second attenuation signal value, the first attenuation signal value and the second attenuation signal value are obtained by two detectors respectively, and the determination module is specifically used to:
[0045] For each coordinate point, if the first attenuation signal value of the corresponding coordinate point is less than the first threshold, and / or the second attenuation signal value of the corresponding coordinate point is less than the second threshold, the corresponding coordinate point is determined as the wrapped sub-area of the current scan.
[0046] In a possible embodiment, the setting module is specifically used to:
[0047] In each unit area, record the starting coordinate point and the ending coordinate point belonging to the package in each unit area;
[0048] According to the recorded starting coordinate point and ending coordinate point of each unit area, determine whether the coordinate points in two adjacent unit areas have an intersection;
[0049] If the coordinate points in the two corresponding adjacent unit areas have an intersection, the two corresponding adjacent unit areas are set as the first mark.
[0050] In a possible embodiment, the setting module is specifically used to:
[0051] For each unit area, if the starting coordinate point in the currently scanned wrapped sub-area is continuous with the ending coordinate point in the last scanned wrapped sub-area, the starting coordinate point in the last scanned wrapped sub-area and the ending coordinate point in the currently scanned wrapped sub-area are set as a second mark, and the second mark is used to indicate a boundary point of the currently scanned wrapped sub-area;
[0052] For each unit area, if the starting coordinate point in the currently scanned package sub-area is not continuous with the ending coordinate point of the previously scanned package sub-area, the starting coordinate point and the ending coordinate point of the previously scanned package sub-area and the starting coordinate point and the ending coordinate point of the currently scanned package sub-area are set as the second mark.
[0053] In a possible embodiment, the obtaining module is specifically used for:
[0054] For each unit area, if the value on the first coordinate axis of the end coordinate point of the package sub-area marked with the second mark is less than the value on the first coordinate axis of the end coordinate point of the package sub-area scanned currently, the corresponding unit area recording the starting coordinate point and the end coordinate point in the package sub-area marked with the second mark is set as a third mark; the third mark is used to indicate that the coordinate points belonging to the current package in the corresponding unit area have been scanned;
[0055] For the unit area marked with the third mark in the direction of the second coordinate axis, the corresponding area marked with the first mark is merged to obtain the wrapped area.
[0056] In a possible embodiment, the obtaining module is further used for:
[0057] After obtaining the wrapped area, a grayscale image is generated according to the attenuation signal value of each coordinate point in each scanning process before the next scanning;
[0058] Rendering each pixel point into a corresponding color according to the attenuation signal value of each pixel point in the grayscale image to generate a pseudo-color image;
[0059] According to the coordinate points of the wrapped area, a wrapped image area is determined from the pseudo-color image.
[0060] In a third aspect, a package cutting device is provided, comprising:
[0061] at least one processor, and
[0062] a memory communicatively coupled to the at least one processor;
[0063] The memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the method as described in any one of the first aspects by executing the instructions stored in the memory.
[0064] According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer executes the method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A schematic diagram of an application scenario of a package cutting method provided in an embodiment of the present application;
[0066] Figure 2 A schematic diagram of a process for cutting a package provided in an embodiment of the present application;
[0067] Figure 3A schematic diagram of boundary points of the parcel sub-area currently scanned is provided for the embodiment of the present application;
[0068] Figure 4 A schematic diagram of a package showing whether two adjacent unit areas have an intersection provided in an embodiment of the present application;
[0069] Figure 5 A schematic diagram of a package before and after the merger of two adjacent unit areas provided in an embodiment of the present application;
[0070] Figure 6 A schematic diagram of a case where there is no intersection between the current and next scanned parcel sub-areas provided in an embodiment of the present application;
[0071] Figure 7 A schematic diagram of an intersection of the current and next scanned parcel sub-areas provided in an embodiment of the present application;
[0072] Figure 8 A schematic diagram of a pseudo-color image provided in an embodiment of the present application;
[0073] Fig. 9 A schematic diagram of a package before and after cutting provided in an embodiment of the present application;
[0074] Fig.10 A schematic diagram of the structure of a package cutting device provided in an embodiment of the present application;
[0075] Fig.11 A schematic diagram of the structure of a package cutting device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] In order to better understand the technical solution provided by the embodiments of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0077] In the prior art, the X-ray security inspection machine mainly scans the parcels on the conveyor belt, obtains the pseudo-color image of the parcel in real time, and identifies each parcel based on the color of the pseudo-color image to achieve parcel segmentation. However, in complex scenarios with interlaced parcels, the accuracy of the parcel segmentation method based on pseudo-color images is low, which further leads to low accuracy of subsequent contraband detection.
[0078] In view of this, the embodiment of the present application provides a parcel cutting method, which can be executed by a parcel cutting device, which can be implemented by a separate device with a graphics processing unit (GPU), or by a controller in a security inspection machine, such as a controller, a personal computer or a server, etc. The controller can be implemented by a chip or an application specific integrated circuit (ASIC). The following is a schematic diagram of the application scenario of the method.
[0079] Please refer to Figure 1 , is a schematic diagram of an application scenario of a package cutting method provided in an embodiment of the present application. The application scenario includes a security inspection machine 110 and a package cutting device 120 that is connected to the security inspection machine 110. A radioactive light scanner 140 is provided inside the security inspection machine 110, and the security inspection machine 110 also includes a conveyor belt 130. The radioactive light scanner 140 is, for example, a dual-energy X-ray scanner, and the radioactive scanner 140 includes a radiation source 150 and a detector, and the detector is specifically, for example Figure 1 The radiation scanner 140 further includes a first detector 160 and a second detector 170 shown in FIG. 1 . The radiation scanner 140 further includes a filter 180 disposed between the first detector 160 and the second detector 170 . The filter 180 is, for example, a copper filter.
[0080] Figure 1 In the figure, the parcel cutting device 120 and the security inspection machine 110 are taken as two independent devices for example, but in fact, the parcel cutting device 120 can also be coupled with the security inspection machine 110.
[0081] At security checkpoints in various scenarios, such as railway station security checkpoints, entry and exit security checkpoints, etc., after the bag carrier places the package on the conveyor belt of the security inspection machine 110, the package will move with the security inspection machine 110. When the package passes through the radioactive light scanner 140, the radiation source 150 of the radioactive light scanner 140 emits radiation, which passes through the package moving on the conveyor belt 130. The first detector 160 detects the first attenuation signal and sends it to the package cutting device 120. After the first attenuation signal passes through the filter 180, the second detector 170 receives the second attenuation signal and sends the second attenuation signal to the package cutting device 120. The package cutting device 120 processes the first attenuation signal and the second attenuation signal accordingly to obtain the package area. The way in which the package cutting device 120 processes the attenuation signal to obtain the package area is described in detail below.
[0082] based on Figure 1 The application scenario discussed below introduces a package splitting method involved in the embodiment of the present application. Figure 2, is a flow chart of a package cutting method provided in an embodiment of the present application, the method comprising:
[0083] S210, during the security inspection process, the moving packages are sequentially scanned with radioactive light along the direction of the first coordinate axis in the spatial coordinate system.
[0084] Specifically, the radiation source 150 is fixed above the conveyor belt 130, so the radiation emitted by the radiation source 150 is perpendicular to the conveyor belt 130. After the package is placed on the moving conveyor belt 130, the package moves in one direction along with the conveyor belt 130. When the package moves to just below the radiation source 150 at the fixed position, the radiation emitted by the radiation source 150 will pass through the package. As the conveyor belt 130 moves, the radiation emitted by the radiation source 150 will sequentially pass through various areas of the package, thereby realizing the process of radioactive light scanning of the package.
[0085] For ease of description, in the embodiment of the present application, the first coordinate axis and the second coordinate axis actually constitute a coordinate space, and the various regions and coordinate points involved in the embodiment of the present application are all based on this coordinate space. The first coordinate axis and the second coordinate axis are perpendicular to each other, the direction of the first coordinate axis is the direction along the first coordinate axis, and the direction of the second coordinate axis is the direction along the second coordinate axis. Among them, the direction of the first coordinate axis is the direction perpendicular to the moving direction of the conveyor belt 130. The direction of the second coordinate axis is the direction in which the conveyor belt 130 moves. Of course, in actual application, the direction of the first coordinate axis and the direction of the second coordinate axis can be set according to demand, and are not limited to this.
[0086] S220: If the package cutting device 120 determines that there is a package sub-region in the transillumination region of the current scan, the package cutting device 120 determines the package sub-region of the current scan.
[0087] The current scan can be understood as the current scan of the ray source 150. The current scan is a relative concept, that is, any time when the ray source 150 scans can be regarded as the current scan. If the area scanned by the ray source 150 is different from the area scanned last time, then this time can be regarded as a scan. For example, during the movement of the conveyor belt 130, the ray source 150 irradiates area A-area B-area C in sequence, then when scanning area B, it can be regarded as the current scan, scanning area A corresponds to the previous scan of the current scan, and scanning area C corresponds to the next scan of the current scan.
[0088] After the radiation source 150 scans the package on the conveyor belt 130, the detector will receive corresponding signal values. These signal values correspond to the spatial coordinate system to form a transillumination area. In other words, the transillumination area refers to the area corresponding to each attenuation signal value received by the detector after the radiation source 150 passes through the corresponding package on the conveyor belt 130 each time. The transillumination area can be further understood as the transillumination image of this scan.
[0089] Since the radiation source 150 may scan part of the package, or scan all the packages, or may not scan any packages during the current scanning process during the movement of the conveyor belt 130, the trans-irradiation area may include a package sub-area, or may be entirely a package sub-area, or may not contain a package sub-area. In other words, the package sub-area refers to the area in the trans-irradiation area that belongs to the package. Since the area in the trans-irradiation area that belongs to the package may be a part of the package, this part of the area that belongs to the package is called the package sub-area.
[0090] In order to accurately identify the portion of the trans-illumination area that belongs to the package, the package cutting device 120 may first determine whether there is a package sub-area in the trans-illumination area of the current scan.
[0091] Specifically, since different objects have different absorption abilities for radioactive light, in an embodiment of the present application, the package cutting device 120 can determine the coordinate points belonging to the package in the trans-illumination area based on the signal attenuation value detected by the detector, and the area formed by the coordinate points is the package sub-area.
[0092] For example, the package cutting device 120 may determine the coordinate points belonging to the package in the transillumination area based on the signal attenuation values detected by the first detector 160 and the second detector 170, and the area formed by the coordinate points is the package sub-area.
[0093] Specifically, the first detector 160 receives the first attenuation signal value, and the second detector 170 receives the second attenuation signal value, so the attenuation signal value of each coordinate point in the transillumination area specifically includes the first attenuation signal value and the second attenuation signal value. The package cutting device 120 processes the first attenuation signal value and the second attenuation signal value of each coordinate point respectively. If the first attenuation signal value of the corresponding coordinate point is less than the first threshold value, and / or the second attenuation signal value of the corresponding coordinate point is less than the second threshold value, the corresponding coordinate point is determined as the package sub-area of the current scan. The embodiment of the present application can find out the coordinate points belonging to the package as much as possible based on the two attenuation signal values, thereby improving the accuracy of package cutting.
[0094] The formula for the parcel cutting device 120 to determine whether each coordinate point belongs to a parcel sub-area can be referred to as follows:
[0095]
[0096]
[0097] f(i)=f H (i)∨f L (i) (3)
[0098] Wherein, i represents the i-th scan performed by the radioactive light scanner 140, signal L (i) represents the first attenuation signal value received by the first detector 160, that is, the signal attenuation value detected when the ray penetrates the package but does not pass through the filter 180; signal H (i) represents the second attenuation signal value received by the second detector 170, that is, the signal attenuation value detected when the radiation penetrates the package and passes through the filter 180; threshold L represents the first threshold, that is, the signal value received by the first detector 160 when the ray does not penetrate the package and does not pass through the filter 180; threshold H represents the second threshold value, that is, the signal value received by the second detector 170 when the radiation does not penetrate the package and passes through the filter 180. H represents the foreground state code corresponding to the first attenuation signal value; f L represents the foreground state code corresponding to the second attenuation signal value; ∨ represents a union; f(i) represents the foreground state code of each coordinate point. A foreground state code of "1" indicates that the coordinate point belongs to the package, and a foreground state code of "0" indicates that the coordinate point does not belong to the package.
[0099] According to the above formulas (1) to (3): for each coordinate point, if the f(i) value calculated based on the first attenuation signal value and the second attenuation signal value is 1, it means that the coordinate point is a coordinate point belonging to the package in the transillumination area of the current scan, and all the coordinate points belonging to the package in the transillumination area of the current scan are found, and the area formed is the package sub-area of the current scan.
[0100] S230, for each two adjacent unit areas in the second coordinate axis direction of the package sub-area scanned currently and the package sub-area scanned last in the spatial coordinate system, if the package cutting device 120 determines that the coordinate points corresponding to the two adjacent unit areas intersect, the corresponding two adjacent unit areas are set as the first mark.
[0101] In the spatial coordinate system, any region can be divided along the first coordinate axis direction or along the second coordinate axis direction. In the embodiment of the present application, the region is divided into regions of fixed width along the second coordinate axis direction.
[0102] Theoretically, the coordinate points belonging to the same package should be connected in the direction of the second coordinate axis. Therefore, in the embodiment of the present application, the package cutting device 120 can determine whether the corresponding two adjacent unit areas belong to the same package based on whether there is an intersection between the coordinate points corresponding to each two adjacent unit areas in the direction of the second coordinate axis.
[0103] Specifically, after the package cutting device 120 determines the package sub-area of the current scan, for each two adjacent unit areas of the package sub-area of the current scan and the package sub-area of the previous scan in the direction of the second coordinate axis, the corresponding two adjacent unit areas may belong to the same package area, or may belong to different package areas. If the package cutting device 120 determines that the coordinate points corresponding to the corresponding two adjacent unit areas have an intersection, it means that the two adjacent unit areas belong to the same package, that is, the current package, so the package cutting device 120 can set the corresponding two adjacent unit areas to the first mark, and the first mark means that these areas all belong to one package. In the embodiment of the present application, the package sub-area is finely divided in the direction of the second coordinate axis, which improves the accuracy of package segmentation, and recording the first mark can relatively save the amount of stored data.
[0104] For example, the first mark is a number "1", "2", etc., and the sub-areas belonging to the first package are all represented by "1", the sub-areas belonging to the second package are all represented by "2", and so on.
[0105] The specific steps of the package cutting device 120 setting the corresponding two adjacent unit areas as the first mark are as follows:
[0106] S1, the package cutting device 120 records the starting coordinate point and the ending coordinate point of the package in each unit area in the second coordinate axis direction.
[0107] Specifically, the package cutting device 120 sets a second mark for each unit area in the direction of the second coordinate axis according to the coordinate points in the package sub-area currently scanned and the coordinate points in the package sub-area last scanned, and the second mark represents the boundary point of the package sub-area currently scanned, and then the package sub-area can be determined more accurately according to the boundary point of the package sub-area, thereby improving the accuracy of package cutting.
[0108] The package cutting device 120 sets the second mark in different ways according to whether the starting coordinate point in the currently scanned package sub-area is continuous with the ending coordinate point in the last scanned package sub-area. The specific examples are as follows:
[0109] 1. For each unit area, if the starting coordinate point in the currently scanned package sub-area is continuous with the ending coordinate point in the last scanned package sub-area, the package cutting device 120 sets the starting coordinate point of the last scanned package sub-area and the ending coordinate point of the currently scanned package sub-area as the second mark.
[0110] 2. For each unit area, if the starting coordinate point in the currently scanned package sub-area is not continuous with the ending coordinate point in the last scanned package sub-area, the package cutting device 120 sets the starting coordinate point and the ending coordinate point of the last package sub-area and the starting coordinate point and the ending coordinate point of the currently scanned package sub-area as the second mark.
[0111] For example,
[0112]
[0113] Wherein, j represents the jth unit area in the direction of the second coordinate axis, x1(j) and x2(j) represent the starting coordinate point and the ending coordinate point of the jth unit area in the last scanned sub-area, respectively, x3(j) and x4(j) represent the starting coordinate point and the ending coordinate point of the jth unit area in the current scanned sub-area, respectively, and Coord h (j) represents the boundary point of the currently scanned sub-area.
[0114] Please refer to Figure 3 , is a schematic diagram of the boundary points of the currently scanned sub-area of the package provided in the embodiment of the present application. Figure 3 The dotted circled point represents the starting coordinate point of the package sub-area currently scanned, the solid circled point represents the ending coordinate point of the package sub-area currently scanned, and the data flow direction is the direction in which the conveyor belt 130 moves.
[0115] S2, the package cutting device 120 determines whether there is an intersection between the coordinate points in two adjacent unit areas according to the recorded starting coordinate point and ending coordinate point of each unit area.
[0116] The material of the package itself will affect the package's absorption of radiation. If a package absorbs less radiation and contains fewer items, the signal of the radiation source 150 will not attenuate after passing through the area with fewer items in the package. In this case, the area with fewer items will be determined as not being a sub-area of the package. In this case, incorrect segmentation may occur. Therefore, in order to avoid incorrect segmentation of the package, the package segmentation device 120 can determine whether the coordinates of each two adjacent unit areas in the direction of the second coordinate axis have an intersection, and then determine whether the corresponding two adjacent unit areas are the same package.
[0117] As described in step S1 above, each unit area in the parcel sub-area marked with the second mark may have one or more pairs of starting coordinate points and ending coordinate points, such as (x1(i), x4(i)) or ((x1(i), x2(i)), (x3(i), x4(i))). Therefore, to determine whether there is an intersection between the coordinate points in the corresponding two adjacent unit areas, it is necessary to compare the intervals of each pair of starting coordinate points and ending coordinate points in the corresponding two adjacent unit areas.
[0118] Please refer to Figure 4 , is a schematic diagram of whether there is an intersection of coordinate points in two adjacent unit areas provided in the embodiment of the present application. It can be seen that Figure 4 The jth unit area is equivalent to the jth row, with a pair of starting coordinate points and ending coordinate points, the j+1th unit area is equivalent to the j+1th row, with two pairs of starting coordinate points and ending coordinate points, and the data flow direction is the direction of movement of the conveyor belt 130. The interval of the starting coordinate point and the ending coordinate point of the jth unit area has no intersection with the interval of the first pair of starting coordinate points and the ending coordinate point of the j+1th unit area, indicating that these two intervals belong to the areas of two different packages. The interval of the starting coordinate point and the ending coordinate point of the jth unit area has an intersection with the interval of the second pair of starting coordinate points and the ending coordinate point of the j+1th unit area, indicating that these two intervals belong to the area of the same package.
[0119] S3: If the coordinate points in the corresponding two adjacent unit areas have an intersection, the package cutting device 120 sets the corresponding two adjacent unit areas as the first mark.
[0120] After determining that there is an intersection between the coordinate points in the corresponding two adjacent unit areas, the package cutting device 120 determines that the corresponding two adjacent unit areas belong to sub-areas of the same package, and then merges the coordinate points in the corresponding two adjacent unit areas and sets the corresponding two adjacent unit areas as the first mark. Please refer to the previous text for the method of setting the first mark, which will not be repeated here.
[0121] Please refer to Figure 5 , which is a schematic diagram of packages before and after the merging of two adjacent unit areas provided in an embodiment of the present application. Figure 5 (1) is a schematic diagram of a package before merging two adjacent unit areas provided in an embodiment of the present application, wherein the jth unit area is equivalent to the jth row, the j+1th unit area is equivalent to the j+1th row, and the data flow direction is the direction of movement of the conveyor belt 130. The intervals of the two pairs of starting coordinate points and ending coordinate points in the j+1th unit area intersect with the intervals of the starting coordinate points and ending coordinate points in the jth unit area. The coordinates of the jth unit area and the j+1th unit area are merged to obtain Figure 5 Schematic diagram of the package after the two adjacent unit areas are merged as shown in (2).
[0122] S240, if the parcel sub-region scanned in the current scan has no intersection with the parcel sub-region scanned in the next scan in the coordinate point of the first coordinate axis direction, the parcel cutting device 120 merges the parcel sub-regions marked with the first mark in each scan before the next scan to obtain the parcel region.
[0123] Since the coordinate points of the same package in the direction of the first coordinate axis are related to each other, in an embodiment of the present application, it is possible to determine whether the parcel sub-areas scanned twice are the same package based on whether there is an intersection in the coordinate points of the parcel sub-areas scanned twice in the direction of the first coordinate axis, and then determine whether the parcel area has been scanned.
[0124] The package cutting device 120 determines whether the coordinate points belonging to the current package in the corresponding unit area have been scanned based on the values on the first coordinate axis of the package sub-area marked with the second mark and the end coordinate point of the package sub-area currently scanned, and further determines whether the package area has been scanned based on whether the coordinate points belonging to the current package in the corresponding unit area have been scanned.
[0125] Specifically, for each unit area, if the value on the first coordinate axis of the end coordinate point of the package sub-area marked with the second mark is less than the value on the first coordinate axis of the end coordinate point of the package sub-area scanned currently, the package cutting device 120 sets the corresponding unit area recording the starting coordinate point and the end coordinate point in the package sub-area marked with the second mark as the third mark, and the third mark indicates that the coordinate points belonging to the current package in the corresponding unit area have been scanned. For the unit area marked with the third mark in the direction of the second coordinate axis, the corresponding area marked with the first mark is merged to obtain the package area. In the embodiment of the present application, the method for judging whether the scanning of the coordinate points belonging to the current package in the corresponding unit area is completed based on the coordinate size is simple, time-saving, and conducive to improving the efficiency of package cutting.
[0126] For example, the third mark is set to "0" by default, indicating that the coordinate points belonging to the current package in the corresponding unit area have not been scanned. If the value on the first coordinate axis of the end coordinate point of the package sub-area marked with the second mark is less than the value on the first coordinate axis of the end coordinate point of the package sub-area scanned in the current scan, the third mark of the corresponding unit area is set to "1", indicating that the coordinate points belonging to the current package in the corresponding unit area have been scanned. If all the third marks in the package sub-area marked with the first mark in the current scan are "1", the package cutting device 120 determines that the package area scanning is completed, and merges the corresponding area marked with the first mark to obtain the package area.
[0127] Or for example, if some of the third marks in the package sub-region marked with the first mark in the current scan are "1" and some are "0", the package cutting device 120 determines that the package area has not been scanned completely, and continues to execute steps S210 to S240 until all the third marks in the package sub-region marked with the first mark in the current scan are "1".
[0128] Please refer to Figure 6 , which is a schematic diagram of the present invention providing an embodiment of the present invention in which the current and next scanned parcel sub-areas do not have an intersection. It can be seen that, Figure 6 The data flow direction is the direction of movement of the conveyor belt 130. From left to right, the first arrow refers to the package sub-area scanned currently, and the second arrow refers to the package sub-area scanned next time. The coordinate points of the package sub-areas scanned twice in the direction of the first coordinate axis do not intersect, indicating that the package area scanning is completed.
[0129] Please refer to Figure 7 , which is a schematic diagram of the intersection of the current and next scanned package sub-areas provided in the embodiment of the present application. It can be seen that, Figure 7 The data flow direction is the direction in which the conveyor belt 130 moves. From left to right, the first arrow refers to the package sub-area scanned currently, and the second arrow refers to the package sub-area scanned next time. The coordinate points of the two scanned package sub-areas intersect in the direction of the first coordinate axis, indicating that the package area has not been scanned completely.
[0130] In order to determine the package image area, after obtaining the package area, the package cutting device 120 generates a pseudo-color image according to the attenuation signal values of each coordinate point in each scanning process before the next scanning, and determines the package image area from the pseudo-color image according to the coordinate points of the package area.
[0131] Since different objects have different absorption and reflection capabilities for radioactive light, after obtaining the signal attenuation value of each coordinate point in the irradiated area, the package cutting device 120 can convert each coordinate point in each scanning process before the next scan into a corresponding grayscale value according to the mapping relationship between the signal attenuation value and the grayscale value, thereby obtaining a grayscale image, and then rendering them into different colors according to the attenuation signal value of each pixel point in the grayscale image, thereby obtaining a pseudo-color image.
[0132] Specifically, after obtaining the package area, the attenuation signal value of each coordinate point in each scanning process before the next scanning includes a first attenuation signal value and a second attenuation signal value, and the package cutting device 120 generates a first grayscale image according to the first attenuation signal value of each coordinate point, and generates a second grayscale image according to the second attenuation signal value of each coordinate point. Then, according to the first attenuation signal value and the second attenuation signal value of each pixel point in the first grayscale image and the second grayscale image, the equivalent atomic number of each pixel point is calculated, and each pixel point is rendered into a corresponding color according to the equivalent atomic number to obtain a pseudo-color image.
[0133] For example, the formula for calculating the equivalent atomic number is as follows:
[0134]
[0135] Among them, R represents the property value of the substance, signal L represents the first attenuation signal value received by the first detector 160; signal h represents the value of the second attenuated signal received by the second detector 170; threshold L Indicates the first threshold; threshold h represents the second threshold value. Please refer to the previous text for its specific meaning, which will not be repeated here. Z represents the equivalent atomic number, σ represents the mapping relationship between the equivalent atomic number and color, and E L It represents the energy of the ray after penetrating the package, E h It indicates the energy of the ray after it passes through the package and filter 180 degrees.
[0136] After the package cutting device 120 obtains the pseudo color image, the package image area is determined from the pseudo color image according to the coordinate points of the package area. The method of obtaining the package area is referred to S210 to S240 above, which will not be repeated here. In the embodiment of the present application, the process of determining the package area and the process of generating the pseudo color image are completed in parallel, which can reduce the time of package cutting and improve the efficiency of package cutting.
[0137] Please refer to Figure 8 , is a schematic diagram of a pseudo-color image provided in an embodiment of the present application, representing a plurality of staggered packages determined from each coordinate point in each scan before the next scan.
[0138] Please refer to Fig. 9 , is a schematic diagram of a package before and after cutting provided in an embodiment of the present application. It can be seen that, Fig. 9 (1) is a schematic diagram of a package before cutting, including two interlaced packages. Based on the package cutting method provided in the embodiment of the present application, it can be obtained Fig. 9 The schematic diagram of the package after cutting shown in (2) includes two cut packages.
[0139] After obtaining the package image area corresponding to each package, the package cutting device 120 can determine the material of the item according to the color of the package image area, and then identify whether the package contains contraband according to the outline of each item in the package image area. Alternatively, the staff can directly determine whether the package contains contraband according to the package image area.
[0140] Based on the same inventive concept, the present application embodiment provides a package cutting device, please refer to Fig.10 , which is equivalent to being arranged in the package cutting device 120 discussed above, and includes:
[0141] The scanning module 1001 is used to sequentially perform radioactive light scanning on the moving packages along the first coordinate axis direction in the spatial coordinate system during the security inspection process;
[0142] The determination module 1002 is used to determine the package sub-region in the scanning area of the current scan if it is determined that there is a package sub-region in the transillumination area of the current scan; wherein the package sub-region of the current scan includes each coordinate point belonging to the package; and the transillumination area corresponds to an area in the spatial coordinate system;
[0143] The setting module 1003 is used for setting the corresponding two adjacent unit areas in the second coordinate axis direction of the package sub-area scanned currently and the package sub-area scanned last in the spatial coordinate system as a first mark if it is determined that the coordinate points corresponding to the two adjacent unit areas have an intersection; wherein the first mark is used to indicate the area belonging to the current package;
[0144] The obtaining module 1004 is used to merge the enclosed sub-regions marked with the first mark in each scan before the next scan to obtain the enclosed region if the enclosed sub-region of the current scan has no intersection with the coordinate points of the enclosed sub-region of the next scan in the direction of the first coordinate axis.
[0145] In a possible embodiment, the determination module 1002 is specifically configured to:
[0146] During the current radioactive light scanning process, the attenuation signal value of each coordinate point in the transillumination area after scanning is obtained;
[0147] Each coordinate point whose attenuation signal value is less than the threshold value is determined as the wrapped sub-area of the current scan.
[0148] In a possible embodiment, the attenuation signal value of each coordinate point includes a first attenuation signal value and a second attenuation signal value, the first attenuation signal value and the second attenuation signal value are obtained by two detectors respectively, and the determination module 1002 is specifically used to:
[0149] For each coordinate point, if the first attenuation signal value of the corresponding coordinate point is less than the first threshold, and / or the second attenuation signal value of the corresponding coordinate point is less than the second threshold, the corresponding coordinate point is determined as the wrapped sub-area of the current scan.
[0150] In a possible embodiment, the setting module 1003 is specifically used to:
[0151] In each unit area, record the starting coordinate point and the ending coordinate point of the package in each unit area;
[0152] According to the recorded starting coordinate point and ending coordinate point of each unit area, determine whether the coordinate points in two adjacent unit areas have an intersection;
[0153] If there is an intersection between the coordinate points in the corresponding two adjacent unit areas, the corresponding two adjacent unit areas are set as the first mark.
[0154] In a possible embodiment, the setting module 1003 is specifically used to:
[0155] For each unit area, if the starting coordinate point in the currently scanned package sub-area is continuous with the ending coordinate point in the previously scanned package sub-area, the starting coordinate point in the previously scanned package sub-area and the ending coordinate point in the currently scanned package sub-area are set as the second mark, and the second mark is used to indicate the boundary point of the currently scanned package sub-area;
[0156] For each unit area, if the starting coordinate point in the currently scanned package sub-area is not continuous with the ending coordinate point of the previously scanned package sub-area, the starting coordinate point and ending coordinate point of the previously scanned package sub-area and the starting coordinate point and ending coordinate point of the currently scanned package sub-area are set as the second mark.
[0157] In a possible embodiment, the obtaining module 1004 is specifically used for:
[0158] For each unit area, if the value on the first coordinate axis of the end coordinate point of the package sub-area marked with the second mark is less than the value on the first coordinate axis of the end coordinate point of the package sub-area currently scanned, the corresponding unit area recording the starting coordinate point and the end coordinate point in the package sub-area marked with the second mark is set to the third mark; the third mark is used to indicate that the coordinate points belonging to the current package in the corresponding unit area have been scanned;
[0159] For the unit area marked with the third mark in the direction of the second coordinate axis, the corresponding area marked with the first mark is merged to obtain the wrapped area.
[0160] In a possible embodiment, the obtaining module 1004 is further used for:
[0161] After obtaining the wrapped area, a grayscale image is generated according to the attenuation signal value of each coordinate point in each scanning process before the next scanning;
[0162] According to the attenuation signal value of each pixel in the grayscale image, each pixel is rendered into a corresponding color to generate a pseudo-color image;
[0163] According to the coordinate points of the wrapped area, the wrapped image area is determined from the pseudo-color image.
[0164] Based on the same inventive concept, the present application embodiment provides a package cutting device, please refer to Fig.11 , which is equivalent to the package cutting device 120 discussed above, and includes:
[0165] at least one processor 1101, and
[0166] A memory 1102 communicatively connected to the at least one processor 1101;
[0167] The memory 1102 stores instructions that can be executed by the at least one processor 1101 , and the at least one processor 1101 implements the package splitting method discussed above by executing the instructions stored in the memory 1102 .
[0168] The processor 1101 may be a central processing unit (CPU), a digital processing unit, an image processor, or a combination thereof. The memory 1102 may be a volatile memory, such as a random-access memory (RAM); the memory 1102 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 1102 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1102 may be a combination of the above memories.
[0169] As an example, Fig.11 The processor 1101 in the embodiment can implement the package segmentation method discussed above. The processor 1101 can also implement the above Fig.10 The function of the device discussed.
[0170] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the package cutting method discussed above.
[0171] 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 in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0172] 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 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 produce 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.
[0173] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0174] 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 implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0175] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A package cutting method, characterized in that: include: During the security inspection, the moving packages are scanned with radioactive light in sequence along the first coordinate axis of the spatial coordinate system, where: During the current radioactive light scanning process, the attenuation signal value of each coordinate point in the transillumination area after scanning is obtained, and each coordinate point whose attenuation signal value is less than a threshold value is determined as the package sub-area of the current scan; wherein the package sub-area of the current scan includes each coordinate point belonging to the package; the transillumination area corresponds to the area in the spatial coordinate system; For each two adjacent unit areas in the second coordinate axis direction of the currently scanned package sub-area and the last scanned package sub-area in the spatial coordinate system, in each unit area, the starting coordinate point and the ending coordinate point belonging to the package in each unit area are recorded, and according to the recorded starting coordinate point and the ending coordinate point of each unit area, it is determined whether the coordinate points in the corresponding two adjacent unit areas have an intersection, and if it is determined that the coordinate points corresponding to the corresponding two adjacent unit areas have an intersection, the corresponding two adjacent unit areas are set as a first mark; wherein the first mark is used to indicate the area belonging to the current package; If there is no intersection between the coordinate points of the currently scanned package sub-area and the next scanned package sub-area in the direction of the first coordinate axis, then for the unit area marked with the third mark in the direction of the second coordinate axis, the corresponding area marked with the first mark is merged to obtain the package area, and the third mark is used to indicate that the coordinate points belonging to the current package in the corresponding unit area have been scanned.
2. The method according to claim 1, characterized in that The attenuation signal value of each coordinate point includes a first attenuation signal value and a second attenuation signal value, wherein the first attenuation signal value and the second attenuation signal value are obtained by two detectors respectively, and each coordinate point whose attenuation signal value is less than a threshold value is determined as the wrapped sub-area of the current scan, including: For each coordinate point, if the first attenuation signal value of the corresponding coordinate point is less than the first threshold, and / or the second attenuation signal value of the corresponding coordinate point is less than the second threshold, the corresponding coordinate point is determined as the wrapped sub-area of the current scan.
3. The method according to claim 1, characterized in that In each unit area in the direction of the second coordinate axis, the starting point coordinates and the ending point coordinates of the package in each unit area are recorded, including: For each unit area, if the starting coordinate point in the currently scanned wrapped sub-area is continuous with the ending coordinate point in the last scanned wrapped sub-area, the starting coordinate point in the last scanned wrapped sub-area and the ending coordinate point in the currently scanned wrapped sub-area are set as a second mark, and the second mark is used to indicate a boundary point of the currently scanned wrapped sub-area; For each unit area, if the starting coordinate point in the currently scanned package sub-area is not continuous with the ending coordinate point of the previously scanned package sub-area, the starting coordinate point and the ending coordinate point of the previously scanned package sub-area and the starting coordinate point and the ending coordinate point of the currently scanned package sub-area are set as the second mark.
4. The method according to claim 1, characterized in that If the coordinate points of the currently scanned parcel sub-region and the next scanned parcel sub-region in the direction of the first coordinate axis do not intersect, then for the unit area marked with the third mark in the direction of the second coordinate axis, the corresponding area marked with the first mark is merged to obtain the parcel area, including: For each unit area, if the value on the first coordinate axis of the end coordinate point of the wrapped sub-area marked with the second mark is smaller than the value on the first coordinate axis of the end coordinate point of the wrapped sub-area scanned currently, the corresponding unit area recording the start coordinate point and the end coordinate point in the wrapped sub-area marked with the second mark is set as the third mark; For the unit area marked with the third mark in the direction of the second coordinate axis, the corresponding area marked with the first mark is merged to obtain the wrapped area.
5. The method according to any one of claims 1 to 4, characterized in that: After getting the package area, include: Generate a grayscale image according to the attenuation signal value of each coordinate point in each scanning process before the next scanning; Rendering each pixel point into a corresponding color according to the attenuation signal value of each pixel point in the grayscale image to generate a pseudo-color image; According to the coordinate points of the wrapped area, a wrapped image area is determined from the pseudo-color image.
6. A package cutting device, characterized in that: include: A scanning module, used to sequentially perform radioactive light scanning on the moving packages along the first coordinate axis direction in the spatial coordinate system during the security inspection process; A determination module, used for obtaining the attenuation signal value of each coordinate point in the transillumination area after scanning during the current radioactive light scanning process, and determining each coordinate point whose attenuation signal value is less than a threshold value as the package sub-area of the current scanning; wherein the package sub-area of the current scanning includes each coordinate point belonging to the package; and the transillumination area corresponds to the area in the spatial coordinate system; A setting module is used for recording, for each adjacent unit area of the currently scanned package sub-area and the last scanned package sub-area in the second coordinate axis direction in the spatial coordinate system, a starting coordinate point and an ending coordinate point belonging to the package in each unit area, and determining whether there is an intersection between the coordinate points in the corresponding two adjacent unit areas according to the recorded starting coordinate point and ending coordinate point of each unit area; if it is determined that there is an intersection between the coordinate points corresponding to the corresponding two adjacent unit areas, setting the corresponding two adjacent unit areas to a first mark; wherein the first mark is used to indicate an area belonging to the current package; The obtaining module is used for merging the corresponding areas marked with the first mark for the unit areas marked with the third mark in the direction of the second coordinate axis to obtain the package area if there is no intersection between the coordinate points of the currently scanned package sub-area and the next scanned package sub-area in the direction of the first coordinate axis, wherein the third mark is used to indicate that the coordinate points belonging to the current package in the corresponding unit area have been scanned.
7. A package cutting device, characterized in that: include: at least one processor, and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the method according to any one of claims 1 to 5 by executing the instructions stored in the memory.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Security checking system and method thereof
CN108195855A
A package image segmentation method for security inspection and a corresponding security inspection device
CN109410226A