Foreign matter detection and classification method and device and security inspection equipment
By performing atomic number image correction and region segmentation on the detected images in the security inspection equipment, and combining attribute information matching, the identification and classification of specific foreign objects is realized, solving the problem that existing equipment cannot recognize specific foreign objects, and improving application convenience.
Patent Information
- Application Number
- CN202411337108.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-09-24
AI Technical Summary
Existing security inspection equipment cannot effectively identify and classify specific foreign objects, resulting in inconvenient use in certain application scenarios.
By obtaining the detected image and atomic number image of the object to be inspected, the background object correction process is performed, the target area is divided, and the target foreign object type is determined for classification and annotation based on the attribute information of the target area and the preset foreign object attribute information.
Effective classification and labeling of target foreign objects in the detection image is realized, and the application convenience in specific scenarios is improved.
Smart Images

Figure CN119313950A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a foreign body detection and classification method, device and security inspection equipment. Background Art
[0002] Security inspection equipment, such as X-ray security inspection equipment, is an electronic device that uses a conveyor belt to send the inspected object into an X-ray inspection channel to complete the inspection. Among them, X-rays are a type of electromagnetic radiation with a shorter wavelength than visible light, with higher energy and penetration ability. They can quickly image the internal structure of an object without contacting or damaging the surface of the object. In addition to being used as security inspection equipment at the entrances and exits of important public facilities such as airports, railways, and subways, in recent years, they have also been widely used in security inspection occasions involving laundry clothing inspection, postal delivery and other businesses.
[0003] The main function of security inspection equipment is to detect foreign objects in the inspected objects. However, at present, the inspection images generated by security inspection equipment for the inspected objects only use different colors to distinguish and mark them. There is no detection and classification function for some specific foreign objects, and some specific foreign objects cannot be effectively identified, resulting in inconvenience in use in some scenarios. Summary of the invention
[0004] In response to at least one aspect of the above technical problems, the embodiments of the present application provide a foreign body detection and classification method, device and security inspection equipment. The foreign body detection and classification method first corrects the atomic number image of the detection image based on the atomic number of the background object in the inspected object to obtain a corrected atomic number image, and then determines multiple target areas according to the distribution of the atomic number in the corrected atomic number image. Thus, the type of target foreign object corresponding to each target area can be determined according to the matching between the attribute information of the target area and the attribute information of different types of pre-set target foreign objects, and the type of the target foreign object determined by the target area is respectively marked at the position corresponding to each target area in the detection image, so as to realize the classification function of the target foreign objects in the inspected object, which can effectively identify some specific foreign objects and is convenient to use when applied in some scenarios.
[0005] In a first aspect, an embodiment of the present application provides a foreign body detection and classification method, the foreign body detection and classification method comprising:
[0006] Acquire a detection image of the inspected object and an atomic number image corresponding to the detection image respectively; wherein the inspected object is mixed with background objects and one or more target foreign matter, and the data of each position area in the atomic number image reflects the atomic number of the material corresponding to the position area in the detection image;
[0007] Correcting the atomic number image based on the atomic number of the background object to obtain a corrected atomic number image after excluding the background object;
[0008] According to the distribution of data in the corrected atomic number image, the corrected atomic number image is subjected to a region segmentation process to determine one or more target regions in the corrected atomic number image; wherein the target region corresponds to at least one of the target foreign bodies;
[0009] Determine the type of target foreign matter corresponding to each target region according to the matching of the attribute information of the target region and the preset attribute information of different types of target foreign matter; wherein the attribute information is used to represent the image expression of the target region in the corrected atomic number image;
[0010] The position corresponding to each target area in the detection image is respectively marked with the type of the target foreign matter determined by the target area.
[0011] In one embodiment, preferably, the step of correcting the atomic number image based on the atomic number of the background object to obtain a corrected atomic number image after excluding the background object includes:
[0012] determining a cutoff atomic number based on the atomic number of the background object;
[0013] Each data in the atomic number image that is not greater than the cutoff atomic number is assigned a value of zero to obtain the corrected atomic number image.
[0014] In one embodiment, preferably, the step of determining the cutoff atomic number based on the atomic number of the background object comprises:
[0015] The maximum atomic number of a predetermined number of the background objects when arranged in a stacked manner is set as the cutoff atomic number.
[0016] In one embodiment, preferably, the step of performing region segmentation processing on the corrected atomic number image according to the distribution of data in the corrected atomic number image to determine one or more target regions in the corrected atomic number image comprises:
[0017] According to the distribution of data in the corrected atomic number image and the principle that the difference of each data in the region is not greater than a predetermined value, one or more target regions are divided in the corrected atomic number image; one target region is a connected region.
[0018] In one embodiment, preferably, the step of dividing one or more target areas in the corrected atomic number image according to the distribution of data in the corrected atomic number image and the principle that the difference between each data in the area is not greater than a predetermined value comprises:
[0019] Traversing the data in the corrected atomic number image;
[0020] According to the principle that all data in the region are not zero, one or more screening regions are divided in the corrected atomic number image;
[0021] The maximum difference between the data in the screening area is calculated, and when the maximum difference is not greater than the predetermined value, the screening area is determined as the target area.
[0022] In one embodiment, preferably, the attribute information includes at least one of area information, atomic number information and diagonal length information;
[0023] The step of determining the type of target foreign object corresponding to each target area according to the matching of the attribute information of the target area with the preset attribute information of different types of target foreign objects comprises:
[0024] Determine one or more first target regions matching the first target foreign object according to the preset area information and atomic number information of the first target foreign object, and determine the type of the target foreign object corresponding to the first target region as the first target foreign object; wherein the first target foreign object includes a ballpoint pen tip or a seal;
[0025] In the remaining target areas excluding the first target area, or in all the target areas, one or more second target areas matching the second target foreign object are determined at least based on the pre-set diagonal length information of the second target foreign object, and the type of the target foreign object corresponding to the second target area is determined as the second target foreign object; wherein the second target foreign object includes a needle.
[0026] In one embodiment, preferably, the step of determining one or more first target areas matching the first target foreign object according to the preset area information and atomic number information of the first target foreign object comprises:
[0027] Determine a target region whose area matches the area information of the first target foreign object and whose maximum atomic number matches the atomic number information of the first target foreign object as the first target region;
[0028] The step of determining one or more second target areas matching the second target foreign object in the remaining target areas excluding the first target area, or in all the target areas, at least according to the preset diagonal length information of the second target foreign object, comprises:
[0029] Obtaining the diagonal length of the rectangular area corresponding to each of the remaining target areas, or obtaining the diagonal length of the rectangular area corresponding to each of the target areas;
[0030] The remaining target area whose diagonal length matches the diagonal length information of the second target foreign object is determined as the second target area.
[0031] In one embodiment, preferably, the step of obtaining the diagonal length of the rectangular area corresponding to each of the remaining target areas includes:
[0032] Delimiting a rectangular area according to the uppermost position, the lowermost position, the leftmost position and the rightmost position of the remaining target area;
[0033] Calculate the diagonal length of the defined rectangular area.
[0034] In a second aspect, an embodiment of the present application provides a foreign body detection and classification device, the foreign body detection and classification device comprising:
[0035] An acquisition module, used to respectively acquire a detection image of the inspected object and an atomic number image corresponding to the detection image; wherein the inspected object is mixed with background objects and one or more target foreign matter, and the data of each position area in the atomic number image reflects the atomic number of the material corresponding to the position area in the detection image;
[0036] A correction module, used for performing correction processing on the atomic number image based on the atomic number of the background object to obtain a corrected atomic number image after excluding the background object;
[0037] A segmentation module, configured to perform a regional segmentation process on the corrected atomic number image according to the distribution of data in the corrected atomic number image, and determine one or more target regions in the corrected atomic number image; wherein the target region corresponds to at least one of the target foreign bodies;
[0038] A classification module, used to determine the type of target foreign matter corresponding to each target area according to the matching of the attribute information of the target area and the preset attribute information of different types of target foreign matter; wherein the attribute information is used to represent the image expression of the target area in the corrected atomic number image;
[0039] The marking module is used to mark the type of the target foreign matter determined by each target area at a position corresponding to each target area in the detection image.
[0040] In one embodiment, preferably, the correction module includes:
[0041] a truncated atomic number determining unit, configured to determine a truncated atomic number based on the atomic number of the background object;
[0042] The image correction unit is used to assign all data in the atomic number image that is not greater than the cutoff atomic number to zero, so as to obtain the corrected atomic number image.
[0043] In one embodiment, preferably, the truncated atomic number determination unit includes:
[0044] The maximum atomic number determination subunit is used to set the maximum atomic number of the background objects with a predetermined number when arranged in a stacked manner as the cutoff atomic number.
[0045] In one embodiment, preferably, the segmentation module includes:
[0046] A dividing unit, configured to divide one or more target regions in the corrected atomic number image according to the distribution of data in the corrected atomic number image and the principle that the difference between each data in the region is not greater than a predetermined value;
[0047] The calculation unit is used to calculate the area occupied by each of the target areas.
[0048] In one embodiment, preferably, the division unit includes:
[0049] A traversal subunit, used for traversing the data in the corrected atomic number image;
[0050] A region division subunit is used to divide one or more screening regions in the corrected atomic number image according to the principle that each data in the region is not zero; one screening region is a connected region;
[0051] The area determination subunit is used to calculate the maximum difference between the data in the screening area, and when the maximum difference is not greater than the predetermined value, determine the screening area as the target area.
[0052] In one embodiment, preferably, the attribute information includes at least one of area information, atomic number information and diagonal length information;
[0053] Wherein, the classification module includes:
[0054] A first classification unit is used to determine one or more first target areas matching the first target foreign object according to the preset area information and atomic number information of the first target foreign object, and determine the type of the target foreign object corresponding to the first target area as the first target foreign object; wherein the first target foreign object includes a ballpoint pen tip or a seal;
[0055] The second classification unit is used to determine one or more second target areas that match the second target foreign object in the remaining target areas excluding the first target area, or in all the target areas, at least based on the pre-set diagonal length information of the second target foreign object, and determine the type of the target foreign object corresponding to the second target area as the second target foreign object; wherein the second target foreign object includes a needle.
[0056] In one embodiment, preferably, the first classification unit includes:
[0057] A first determining subunit, configured to determine a target region whose area matches the area information of the first target foreign object and whose maximum atomic number matches the atomic number information of the first target foreign object as the first target region;
[0058] The second classification unit includes:
[0059] An acquisition subunit, used to acquire the diagonal length of the rectangular area corresponding to each of the remaining target areas, or to acquire the diagonal length of the rectangular area corresponding to each of the target areas;
[0060] The second determining subunit is configured to determine the remaining target area whose diagonal length matches the diagonal length information of the second target foreign object as the second target area.
[0061] In one embodiment, preferably, the acquisition subunit includes:
[0062] A delimiting subunit, used for delimiting a rectangular area according to the uppermost position, the lowermost position, the leftmost position and the rightmost position of the remaining target area;
[0063] The calculation subunit is used to calculate the diagonal length of the defined rectangular area.
[0064] In a third aspect, an embodiment of the present application provides a security inspection device, which includes a radiation source, a high-energy detector, a low-energy detector and an image processing unit; wherein the radiation source is used to emit radiation, the high-energy detector and the low-energy detector are used to respectively collect projection data of the radiation after passing through the inspected object, and the image processing unit is used to execute the steps of the foreign object detection and classification method as described above.
[0065] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions execute the steps of the foreign body detection and classification method as described above when run.
[0066] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the foreign body detection and classification method as described above.
[0067] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0068] The embodiments of the present application provide a foreign body detection and classification method, device and security inspection equipment. The foreign body detection and classification method first obtains a detection image of the inspected object and an atomic number image corresponding to the detection image respectively, and performs correction processing on the atomic number image to exclude background objects in the inspected object, that is, obtains a corrected atomic number image; then, the corrected atomic number image can be segmented according to the distribution of data to determine one or more target areas in the corrected atomic number image; then, the type of target foreign object corresponding to each target area is determined according to the matching of attribute information of the target area with attribute information of different types of pre-set target foreign objects, so that the type of target foreign object determined by the target area can be marked at the position corresponding to each target area in the detection image, or the position in the detection image corresponding to the target area matching different target foreign objects can be classified and marked, that is, the classification and marking of target foreign objects in the detection image is realized, which is convenient to use.
[0069] In other words, on the one hand, this embodiment can obtain the target area of all target foreign objects in the inspected object except the background objects through area segmentation processing with the help of the atomic number image and the corrected atomic number image after correction.
[0070] On the other hand, this embodiment can determine the type of target foreign object corresponding to each target area according to the matching situation of each target area with the attribute information of different types of pre-set target foreign objects, and then, the position corresponding to each target area in the detection image can be marked separately, that is, the target areas matching different target foreign objects can be distinguished according to the type of target foreign objects, because it can be understood that different attribute information can correspond to different types of target foreign objects, or different types of target foreign objects have different attribute information; and then, different positions corresponding to different target areas in the detection image can be classified and marked, that is, the classification and marking of target foreign objects in the inspected object can be realized; in this way, according to actual needs, this embodiment can effectively identify some specific foreign objects, and is convenient to use when applied in some scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0072] Figure 1 Schematic diagram of the process of foreign body detection and classification method described in the embodiment of the present application.
[0073] Figure 2 is a schematic diagram of the atomic number image described in the embodiment of the present application, wherein: Figure 2 The atomic number images in are numerical representations.
[0074] Figure 3 for Figure 2 The atomic number image in is the corrected atomic number image after correction processing, where: Figure 3 The corrected atomic number images in are numerical representations.
[0075] Figure 4 This is a schematic diagram of using a region growing algorithm to search for a target region in an embodiment of the present application.
[0076] Figure 5 Schematic diagram of the detection image described in the embodiment of the present application.
[0077] Figure 6 For the corresponding Figure 5 Schematic diagram of the atomic number image of the detection image, where: Figure 6 The atomic number images are represented as pixels.
[0078] Figure 7 for Figure 6 The atomic number image in is the corrected atomic number image after correction processing, where: Figure 7 The corrected atomic number images in are represented as pixels.
[0079] Figure 8 A schematic diagram of the structure of the position classification annotation in the detection image described in the embodiment of the present application.
[0080] Fig. 9 Schematic diagram of the structure of the foreign matter detection and classification device described in the embodiment of the present application.
[0081] Wherein, the reference numerals are:
[0082] 21-first warning box, 22-second warning box, 23-third warning box,
[0083] 31-acquisition module, 32-correction module, 33-segmentation module, 34-classification module, 35-labeling module. DETAILED DESCRIPTION
[0084] In order to better understand the above technical solution, the example embodiments of the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. It should be understood that the present application is not limited to the exemplary embodiments described here.
[0085] Security inspection equipment, such as X-ray security inspection equipment, is an electronic device that uses a conveyor belt to transport the inspected object into an X-ray inspection channel for inspection.
[0086] X-rays are a type of electromagnetic radiation with a shorter wavelength than visible light, and have higher energy and penetrating power. They can quickly image the internal structure of an object without contacting or damaging the surface of the object. In addition to being used as security equipment at the entrances and exits of important public facilities such as airports, railways, and subways, in recent years, they have also been widely used in security inspection scenarios involving laundry clothing inspection, postal delivery, and other businesses.
[0087] Commonly used X-ray security inspection equipment consists of a ray source, a collimator, a detector, a conveying mechanism (roller), and an image processing unit. Its scanning mode is a line scanning mode, and the imaging process is as follows: the ray source emits X-rays, which are collimated by the collimator into a fan-shaped beam to reach the detector, forming a scanning plane; the inspected object is driven by the conveying mechanism (roller) and passes through the scanning plane in a specific direction; during this process, the detector continuously measures the X-ray signal that passes through the object and reaches the detector. Each measurement time is called an integration time. After each measurement, a column of signals is output, which is called a strip data; the image processing unit splices a series of strip data in the order of collection to complete the imaging process of the inspected object.
[0088] In related schemes, the detection images of the inspected objects generated by the image processing unit are mostly distinguished and labeled using different colors. For example, different atomic number ranges are marked with different colors in the detection image. It does not have the detection and classification function for some specific foreign matter, and cannot effectively identify some specific foreign matter, resulting in inconvenience in use in some scenarios.
[0089] For example, in the application scenario of a hospital laundry room, the hospital laundry room is specially used to wash the clothes of medical staff. Medical staff may carry items such as ballpoint pens and seals, and may forget needles in their pockets. If the clothes carrying these foreign objects are placed in the washing machine for washing, on the one hand, the washing machine may be damaged and its service life may be reduced. On the other hand, the bacteria and viruses on the needles may be spread, causing unforeseen injuries. In addition, RFID materials are usually sandwiched in the clothes of medical staff, and RFID materials cannot be identified as foreign objects. Therefore, before washing the clothes of medical staff, it is particularly important to detect foreign objects in the clothes other than RFID.
[0090] As mentioned above, the existing security inspection equipment, when used in the application scenario of hospital laundry rooms, only uses different colors for differentiation and labeling. That is, clothes, RFID materials and ballpoint pens, seals, needles, etc. that need to be detected and identified cannot be effectively distinguished, resulting in inconvenience in use.
[0091] In response to the above situation, the embodiments of the present application provide a foreign object detection and classification method, device and security inspection equipment. By using the foreign object detection and classification method disclosed in the present application, the ballpoint pens, seals, needles, etc. that need to be detected and identified can be classified and marked on the detection image, which is easy to use.
[0092] Please combine Figures 1 to 8 , a foreign body detection and classification method, the foreign body detection and classification method comprising:
[0093] S1. Obtaining a detection image of the object to be inspected and an atomic number image corresponding to the detection image respectively; wherein the object to be inspected is mixed with background objects and one or more target foreign matter, and the data of each position area in the atomic number image reflects the atomic number of the material corresponding to the position area in the detection image;
[0094] S2, correcting the atomic number image based on the atomic number of the background object to obtain a corrected atomic number image after excluding the background object;
[0095] S3, performing region segmentation processing on the corrected atomic number image according to the distribution of data in the corrected atomic number image, and determining one or more target regions in the corrected atomic number image; wherein the target region corresponds to at least one target foreign body;
[0096] S4, determining the type of target foreign matter corresponding to each target region according to the matching of the attribute information of the target region and the preset attribute information of different types of target foreign matter; wherein the attribute information is used to represent the image expression of the target region in the corrected atomic number image;
[0097] S5. Mark the type of the target foreign matter determined by each target area at a position corresponding to the target area in the detection image.
[0098] In general, from the principle point of view, in order to solve the problem that foreign objects cannot be classified and labeled in the existing schemes, this embodiment can determine one or more target areas on the atomic number image through region segmentation processing after the atomic number image corresponding to the detection image of the inspected object is corrected to exclude background objects, and then the type of the target foreign object corresponding to the target area can be determined based on the matching between the attribute information of the target area and the attribute information of different types of target foreign objects, so that the type of the target foreign object determined by the target area can be labeled at the corresponding position on the detection image, thereby realizing the classification and labeling of the target foreign objects.
[0099] Specifically, in step S1, see Figure 2 and Figure 5 , firstly, it is necessary to obtain the detection image of the inspected object and the atomic number image corresponding to the detection image respectively.
[0100] It should be noted that the security inspection equipment used in the foreign body detection and classification method of the present application is, for example, a dual-energy model using a linear array detector, that is, it needs to include both a high-energy detector and a low-energy detector, so that the atomic number image corresponding to the detection image can be easily obtained.
[0101] It can be understood that the data of each position area in the atomic number image corresponding to the detection image should reflect the atomic number of the material corresponding to the position area in the detection image.
[0102] The inspected objects may include background objects and one or more target foreign objects.
[0103] In combination with the example of the hospital laundry room mentioned above, the background objects among the inspected objects are, for example, clothes, and the target foreign objects among the inspected objects are, for example, ballpoint pen tips (here, to facilitate the detection of ballpoint pens, the ballpoint pen tips can be specifically set as target foreign objects), seals, needles, etc. As for RFID materials, although they can be foreign objects relative to clothes, they are not target foreign objects that need to be detected and classified.
[0104] Specifically, in step S2, see Figure 2 and Figure 3, it is necessary to correct the above-mentioned atomic number image based on the atomic number of the background object, so as to obtain a corrected atomic number image after excluding the background object; that is, this step intends to exclude the data reflecting the background object in the atomic number image, leaving only the atomic number reflecting the remaining objects other than the background object; that is, compared with the original atomic number image, the corrected atomic number image can reflect the atomic number of the remaining objects other than the background object.
[0105] It can be understood that the above-mentioned background object can be a kind of object as described in the above example, that is, clothes; of course, according to actual needs, the above-mentioned background object can also be a mixture of multiple objects, and this embodiment does not limit this.
[0106] It can be further understood that the mixture of the above-mentioned multiple target foreign objects and the background objects should have a large difference in atomic number to facilitate the exclusion of the background objects.
[0107] Specifically, in step S3, see Figure 4 , that is, according to the distribution of data in the corrected atomic number image, one or more target regions in the corrected atomic number image can be determined through region segmentation processing.
[0108] It can be understood that after excluding the background objects as above, a target area determined according to the distribution of data in the corrected atomic number image can correspond to a target foreign matter. As for the type of the corresponding target foreign matter, it needs to be determined by the following step S4 based on the attribute information of the target area.
[0109] Specifically, in step S4, see Figure 8 According to the matching situation between the attribute information of the target area and the attribute information of different types of target foreign objects set in advance, the type of the target foreign object corresponding to each target area can be first determined; then, in step S5, the type of the target foreign object determined by the target area can be respectively marked at the position corresponding to each target area in the detection image, that is, the classification and marking of the target foreign objects in the detection image can be realized.
[0110] It can be understood that, regarding the above-mentioned attribute information, the attribute information should be information inherent to the target foreign matter and capable of being expressed in an image in the corrected atomic number image; that is, on the one hand, the attribute information should be capable of being expressed in an image in the corrected atomic number image, that is, the attribute information is used to represent the image expression of the target area in the corrected atomic number image; on the other hand, the attribute information should be inherent to the target foreign matter and different target foreign matters should be easily distinguished according to their types based on the attribute information.
[0111] For example, in some specific embodiments, the attribute information may be length and width size information, that is, different target foreign bodies can be distinguished according to their types based on the length and width size information, and the length and width size information can be expressed in the corrected atomic number image through the length and width dimensions occupied by the target area.
[0112] In some specific embodiments, the attribute information may be, for example, atomic number information, that is, different target foreign bodies can be distinguished according to their types based on the atomic number information, and the atomic number information can be expressed through the grayscale value of the target area in the corrected atomic number image.
[0113] In some specific embodiments, the attribute information may be, for example, area information, that is, different target foreign bodies can be distinguished according to their types based on the different area information, and the area information can be expressed in the corrected atomic number image through the area occupied by the target region.
[0114] In some specific embodiments, the attribute information may be, for example, diagonal information, that is, different target foreign bodies can be distinguished according to their types based on different diagonal information, and the diagonal information can be expressed in the corrected atomic number image through the diagonal of the area occupied by the target area.
[0115] Of course, in actual application, different attribute information may be combined to more easily achieve the above-mentioned purpose of easily distinguishing different target foreign objects according to their types (that is, to more easily determine the type of target foreign object corresponding to the target area); for example, the type of the corresponding target foreign object can be determined based on the length and width size information and atomic number information of the target area at the same time, and the type of the corresponding target foreign object can be determined based on the area information and atomic number information of the target area at the same time. Of course, the type of the corresponding target foreign object can also be determined based on the area information, atomic number information and diagonal information of the target area at the same time; that is to say, the above-mentioned various attribute information can be combined differently according to actual needs to achieve the purpose of more easily determining the type of target foreign object corresponding to the target area.
[0116] For example, in the corrected atomic number image, each target region has data on its area, atomic number and diagonal; at the same time, the area, atomic number and diagonal of each target foreign matter can be preset, that is, the type of target foreign matter can be distinguished according to the difference in area, atomic number and diagonal; then, this embodiment can determine the type of target foreign matter corresponding to each target region based on the matching of the area, atomic number and diagonal data of each target region with the attribute information of different types of target foreign matter.
[0117] In other words, it can be understood that different types of target foreign objects usually have different attribute information. For example, the ballpoint pen tip has the first attribute information, the seal has the second attribute information, and the needle has the third attribute information.
[0118] On this basis, after matching, on the corrected atomic number image, for example, there is a target area (target area A1) that matches the first attribute information, two other target areas (target area A2 and target area A3) match the second attribute information, and another target area (target area A4) matches the third attribute information; this indicates that the position in the detection image corresponding to the target area A1 should be the tip of the ballpoint pen, the positions in the detection image corresponding to the target areas A2 and A3 should be the seal, and the position in the detection image corresponding to the target area A4 should be the needle tip.
[0119] At this time, the three types of positions in the detection image, namely, a position corresponding to the target area A1, two positions corresponding to the target areas A2 and A3, and a position corresponding to the target area A4, can be classified and labeled. That is, the classification and labeling of ballpoint pen tips, seals, and needle tips in the detection image can be realized, thereby achieving the effect of classification detection.
[0120] The above classification labels can be marked with warning boxes of different colors, for example, see Figure 8 The first warning frame 21 can be used to mark the tip of the ballpoint pen, the second warning frame 22 can be used to mark the seal, and the third warning frame 23 can be used to mark the needle tip.
[0121] Among them, it can be understood that the above-mentioned attribute information is pre-set according to actual needs. For example, in the example of the hospital laundry room, since it is necessary or desired to realize the classification detection of ballpoint pen tips, seals, and needles, the attribute information of ballpoint pen tips, seals, and needles can be set; of course, since it is not desired or necessary to detect RFID materials, there is no need to set the attribute information of RFID materials. At this time, the position of RFID materials in the detection image will not be marked.
[0122] It can be understood that the above-mentioned attribute information should be set according to the factors that can be reflected in the target area in the corrected atomic number image and the factors that facilitate the distinction of target foreign matter. For example, the attribute information can include at least two of the area information, atomic number information and diagonal length information.
[0123] Specifically, in some application scenarios, for example, different target foreign objects can be clearly distinguished only by area and atomic number. In this case, the attribute information may only include area information and atomic number information; that is, different target areas can be clearly matched to different types of target foreign objects only by area and atomic number.
[0124] In other application scenarios, for example, different target foreign objects can be clearly distinguished only by area and diagonal length. In this case, the attribute information may only include area information and diagonal length information; that is, different target areas can be clearly matched to different types of target foreign objects only by area and diagonal length.
[0125] In other application scenarios, for example, different target foreign objects can be clearly distinguished only by atomic number and diagonal length. In this case, the attribute information may only include atomic number information and diagonal length information; that is, different target areas can be clearly matched to different types of target foreign objects only by atomic number and diagonal length.
[0126] Of course, in some other application scenarios, it is necessary to use area, atomic number and diagonal length at the same time to clearly distinguish different target foreign objects. In this case, the attribute information needs to include area information, atomic number information and diagonal length information at the same time; that is, it is necessary to rely on area, atomic number and diagonal length at the same time to clearly match different target areas to different types of target foreign objects.
[0127] In combination with the above description, it can be understood that in this embodiment, when the target foreign matter in the inspected object is distributed more dispersedly, one target area can be considered to correspond to one target foreign matter. At this time, when the type of the corresponding target foreign matter is determined based on the attribute information of the target area, the classification accuracy is high; and when the target foreign matter in the inspected object is not distributed very dispersedly, for example, there are two target foreign matters adjacent to each other, at this time, it can be understood that through the regional segmentation processing of the corrected atomic number image, the two adjacent target foreign matters will correspond to each other through one target area, that is, there is a situation where one target area corresponds to two target foreign matters. At this time, if the type of the corresponding target foreign matter is determined based on the attribute information of the target area, there may be a classification error, and the classification accuracy is reduced; that is, the foreign matter detection and classification method of this embodiment is particularly suitable for the situation where the target foreign matter in the inspected object is distributed more dispersedly and one target area corresponds to one target foreign matter.
[0128] The embodiments of the present application provide a foreign body detection and classification method, device and security inspection equipment. The foreign body detection and classification method first obtains a detection image of the inspected object and an atomic number image corresponding to the detection image respectively, and performs correction processing on the atomic number image to exclude background objects in the inspected object, that is, obtains a corrected atomic number image; then, the corrected atomic number image can be segmented according to the distribution of data to determine one or more target areas in the corrected atomic number image; then, the type of target foreign object corresponding to each target area is determined according to the matching of attribute information of the target area with attribute information of different types of pre-set target foreign objects, so that the type of target foreign object determined by the target area can be marked at the position corresponding to each target area in the detection image, or the position in the detection image corresponding to the target area matching different target foreign objects can be classified and marked, that is, the classification and marking of target foreign objects in the detection image is realized, which is convenient to use.
[0129] In other words, on the one hand, this embodiment can obtain the target area of all target foreign objects in the inspected object except the background objects through area segmentation processing with the help of the atomic number image and the corrected atomic number image after correction.
[0130] On the other hand, this embodiment can determine the type of target foreign object corresponding to each target area according to the matching situation of each target area with the attribute information of different types of pre-set target foreign objects, and then, the position corresponding to each target area in the detection image can be marked separately, that is, the target areas matching different target foreign objects can be distinguished according to the type of target foreign objects, because it can be understood that different attribute information can correspond to different types of target foreign objects, or different types of target foreign objects have different attribute information; and then, different positions corresponding to different target areas in the detection image can be classified and marked, that is, the classification and marking of target foreign objects in the inspected object can be realized; in this way, according to actual needs, this embodiment can effectively identify some specific foreign objects, and is convenient to use when applied in some scenarios.
[0131] Regarding the correction processing of the atomic number image, in one possible implementation, step S2 includes:
[0132] S21, determining a cutoff atomic number based on the atomic number of the background object;
[0133] S22. Assign all data in the atomic number image that are not greater than the cutoff atomic number to zero to obtain a corrected atomic number image.
[0134] That is, a cutoff atomic number can be first determined according to the background objects, and then the data in the atomic number image that is not greater than the cutoff atomic number can be assigned a value of zero, so that a corrected atomic number image can be obtained after excluding the background objects.
[0135] For example, combining Figure 2 and Figure 3 , Figure 2 The atomic number image is obtained after correction processing Figure 3 The corrected atomic number image of , in which the truncated atomic number can be taken as 9.
[0136] In a specific implementation, step S21 includes:
[0137] S211. Setting the maximum atomic number of a predetermined number of background objects when arranged in a stacked manner as a cutoff atomic number.
[0138] This embodiment takes into account that the atomic number detected when objects are stacked may increase, and the maximum atomic number when a predetermined number of background objects are stacked may be set as the cutoff atomic number, so that background objects can be fully excluded.
[0139] The above-mentioned predetermined number can be set according to actual needs, and this embodiment does not impose any limitation on this.
[0140] Regarding the region segmentation processing of the above-mentioned corrected atomic number image, in one possible implementation, step S3 includes:
[0141] S31, dividing one or more target areas in the corrected atomic number image according to the distribution of data in the corrected atomic number image and the principle that the difference between each data in the area is not greater than a predetermined value;
[0142] S32. Calculate the area occupied by each target region respectively.
[0143] That is, in the corrected atomic number image, this embodiment can divide one or more target areas in the corrected atomic number image according to the principle that the difference between the data in the area is not greater than a predetermined value; then, the area occupied by each target area can be calculated respectively.
[0144] It can be understood that the predetermined value can be set according to actual needs, such as 5, 9, etc. The size of the predetermined value can reflect the degree of refinement of the division of the target area.
[0145] After determining the predetermined value, this embodiment can divide one or more target areas in the corrected atomic number image according to the predetermined value, wherein the principle of dividing the target area is that within the target area, the difference between each data should not be greater than the preset predetermined value.
[0146] For example, the target area may include 5 data, and the difference between any two of the 5 data is not greater than a preset predetermined value; the target area may also include 10 data, and the difference between any two of the 10 data is not greater than a preset predetermined value.
[0147] The division of one or more target regions in the atomic number image may be implemented by using a specific algorithm, such as the region growing algorithm to be described below, etc., which is not limited in this embodiment.
[0148] In a possible implementation manner, step S31 specifically includes:
[0149] S311, traversing and correcting the data in the atomic number image;
[0150] S312, dividing one or more screening areas in the corrected atomic number image according to the principle that all data in the area are not zero;
[0151] S313: Calculate the maximum difference between the data in the screening area, and when the maximum difference is not greater than a predetermined value, determine the screening area as the target area.
[0152] That is, this embodiment can specifically adopt the method of traversing the corrected atomic number image, firstly divide the area corresponding to several data that are not zero and adjacent in the corrected atomic number image into a screening area, and then calculate the maximum difference between the data in the screening area. If the maximum difference is not greater than a predetermined value, the screening area can be determined as the target area. A target area is a connected area.
[0153] For example, in this embodiment, a region growing algorithm may be used to perform region segmentation processing on the corrected atomic number image, so as to determine one or more target regions of the corrected atomic number image.
[0154] Specifically, combined Figure 3 and Figure 4 , the region growing algorithm can be implemented through the following steps:
[0155] Set an array pStatus of the same size as the atomic number image, and initialize the data in the array pStatus to all 0s. The data in the array pStatus of 0 indicates that the data position has not been processed, the data in the array pStatus of 1 indicates that the data position has been processed and is not the target area, and the data in the array pStatus greater than 1 indicates that the data position is the target area and the data value indicates the number of the target area; set the linked list List to store the position coordinates of a single target area; set the integer nNum to indicate the number of the target areas, and the integer nNum is initialized to 1; set the array pSegNum to record the area of the target area, and the array pSegNum is initialized to all 0s;
[0156] Traverse the array pStatus;
[0157] For the positions where the data in the array pStatus is not 0, skip processing is performed; for the positions where the data in the array pStatus is 0, the atomic number of the corresponding position in the corrected atomic number image is checked;
[0158] If the atomic number corresponding to the position in the corrected atomic number image is 0, the value of the position in the array pStatus is set from 0 to 1, and then the position is skipped;
[0159] If the atomic number corresponding to the position in the corrected atomic number image is not 0, increase the integer nNum by 1, set the value of the array pStatus at the position to the integer nNum, increase the value of the array pSegNum at the nNum position by 1, clear the connected area position coordinate linked list List, and insert the coordinates of the position into the linked list List.
[0160] Then enter the loop: as long as the linked list List is not empty, take out the first coordinate in the linked list List, delete the node, and calculate whether the 8 neighboring positions around the point meet the conditions (the conditions are: the value of the array pStatus at the neighborhood position is 0, and the corrected atomic number map The neighborhood position is not 0). If the conditions are met, the value of the array pStatus at the position is set to nNum, and the value of the connected area area array pSegNum at the nNum position is also increased by 1, and the coordinates of the neighborhood position are added to the end of the linked list. Otherwise, the value of the array pStatus at the neighborhood position is set to 1, and the loop is processed until there are no nodes in the linked list List.
[0161] It can be understood that after traversing the entire corrected atomic number map using the above region growing algorithm, the target region searched by the region growing algorithm is as follows: Figure 4As shown, nNum stores a total of 4 target areas (nNum is initialized to 1, and nNum is finally equal to 5, indicating that a total of 4 target areas are searched), the connected area area array pSegNum records the areas of these 4 target areas, and the status array pStatus has the same size as the correction atom description image and the detection image. Each target area may be a target foreign body. When the value in the array pStatus is 1, it means that it has been processed and the position is not a target foreign body. If it is greater than 1, it means that the point is a target foreign body or other foreign body, and the value represents its area number.
[0162] Regarding the matching of the attribute information of the target area and the target foreign object, in one possible implementation, the attribute information includes at least one of area information, atomic number information and diagonal length information, wherein step S4 includes:
[0163] S41, determining one or more first target regions matching the first target foreign object according to the preset area information and atomic number information of the first target foreign object, and determining the type of the target foreign object corresponding to the first target region as the first target foreign object; wherein the first target foreign object includes a ballpoint pen tip or a seal;
[0164] S42. In the remaining target areas excluding the first target area, or in all the target areas, determine one or more second target areas that match the second target foreign object at least based on the preset diagonal length information of the second target foreign object, and determine the type of the target foreign object corresponding to the second target area as the second target foreign object; wherein the second target foreign object includes a needle.
[0165] In this embodiment, for example, when applied to the above-mentioned hospital laundry scene, the target foreign objects (ballpoint pen tips, seals, needles) can be divided into two categories according to their characteristics, where the first category is ballpoint pen tips and seals, and the second category is needles; at this time, this embodiment needs to first mark the first category in the detection image, and then mark the second category, which is convenient for implementation.
[0166] Specifically, for the first category, that is, the first target foreign matter mentioned above (ballpoint pen tip or seal), this embodiment can determine the first target area based on the area information and atomic number information of the first target foreign matter, and then determine the type of target foreign matter corresponding to the first target area as the first target foreign matter.
[0167] For example, when the first target foreign object is a ballpoint pen tip, this embodiment can determine the first target area based on the area information and atomic number information of the ballpoint pen tip, and then determine the type of target foreign object corresponding to the first target area as the first target foreign object, and then mark the corresponding position in the detection image as the ballpoint pen tip; similarly, when the first target foreign object is a seal, it is similar to the above and will not be repeated.
[0168] After marking the ballpoint pen tip and the seal, it can be understood that the remaining target foreign body is the needle tip, which is usually slender. At this time, the second target area that matches the needle tip can be determined from the remaining target areas based on the diagonal length.
[0169] Specifically, for the second category, that is, the second target foreign body (needle) mentioned above, in the remaining target areas excluding the first target area, this embodiment can determine the second target area at least based on the diagonal length of the second target foreign body, and then, the target foreign body corresponding to the second target area can be determined as the second target foreign body.
[0170] For example, when the second target foreign body is a needle, in the remaining target area excluding the first target area, this embodiment can determine the second target area based on the diagonal length information of the needle, and then mark the position in the detection image corresponding to the second target area as the needle.
[0171] Of course, it can be understood that in other embodiments, at least based on the diagonal length information, one or more second target areas that match the second target foreign object can also be directly determined as the second target foreign object without first excluding the first target foreign object; that is, among all the target areas, this embodiment can also determine one or more second target areas that match the second target foreign object at least based on the pre-set diagonal length information of the second target foreign object, and determine the type of target foreign object corresponding to the second target area as the second target foreign object.
[0172] In a specific implementation, step S41 includes:
[0173] S411 , determining a target region whose area matches the area information of the first target foreign object and whose maximum atomic number matches the atomic number information of the first target foreign object as the first target region.
[0174] Specifically, when determining the first target region that matches the first target foreign matter, the maximum atomic number in the target region may be used for matching according to the atomic number matching. Here, the reason for using the maximum atomic number in the target region for matching is:
[0175] The atomic number of each target area in the corrected atomic number image is obtained through detection. Taking into account the detection error, the maximum atomic number in the target area can more accurately reflect the atomic number of the material corresponding to the target area.
[0176] In addition, it can be understood that the above-mentioned area information can be, for example, a specific value or a numerical range; and, when the area information is a numerical range, the numerical range can be a numerical range with both an upper limit and a lower limit, or a numerical range with only an upper limit, or a numerical range with only a lower limit.
[0177] For example, the area information can be set to 10 to 20 (the numerical range has both an upper limit and a lower limit), then the area of the target area matches the area information, that is, the area of the target area is between 10 and 20; or, the area information can be set to be greater than 23 (the numerical range only has a lower limit), then the area of the target area matches the area information, that is, the area of the target area is greater than 23.
[0178] The atomic number information is similar to the area information mentioned above and will not be repeated here.
[0179] In a specific implementation, step S42 includes:
[0180] S421, obtaining the diagonal length of the rectangular area corresponding to each remaining target area, or obtaining the diagonal length of the rectangular area corresponding to each target area;
[0181] S422: Determine the remaining target area whose diagonal length matches the diagonal length information of the second target foreign object as the second target area.
[0182] That is, when determining the second target area matching the second target foreign object, the diagonal length of each remaining target area or each target area can be first obtained, and then the remaining target area whose diagonal length matches the diagonal length information of the second target foreign object is determined as the second target area.
[0183] Specifically, step S421 includes:
[0184] S4211, defining a rectangular area according to the uppermost position, lowermost position, leftmost position, and rightmost position of the remaining target area or the target area;
[0185] S4212. Calculate the diagonal length of the defined rectangular area.
[0186] That is, it can be understood that a rectangular area can be delineated specifically according to the topmost position, bottommost position, leftmost position and rightmost position of the remaining target area or the target area, and then the diagonal length of the rectangular area can be calculated. At this time, the diagonal length of the rectangular area can be used to represent the diagonal length of the remaining target area.
[0187] In addition, it can be understood that the diagonal length information of this embodiment can also be specifically a value or a value range, just like the area information and atomic number information mentioned above, and will not be repeated here.
[0188] Based on the above disclosed foreign body detection and classification method, the present application also discloses a foreign body detection and classification device, see Fig. 9 , the foreign matter detection and classification device comprises:
[0189] The acquisition module 31 is used to respectively acquire a detection image of the inspected object and an atomic number image corresponding to the detection image; wherein the inspected object is mixed with background objects and one or more target foreign matter, and the data of each position area in the atomic number image reflects the atomic number of the material corresponding to the position area in the detection image;
[0190] A correction module 32, configured to perform correction processing on the atomic number image based on the atomic number of the background object to obtain a corrected atomic number image after excluding the background object;
[0191] The segmentation module 33 is used to perform a region segmentation process on the corrected atomic number image according to the distribution of data in the corrected atomic number image, and determine one or more target regions in the corrected atomic number image; wherein the target region corresponds to at least one target foreign body;
[0192] The classification module 34 is used to determine the type of target foreign matter corresponding to each target region according to the matching of the attribute information of the target region and the attribute information of different types of target foreign matter set in advance; wherein the attribute information is used to represent the image expression of the target region in the corrected atomic number image;
[0193] The marking module 35 is used to mark the type of the target foreign matter determined by each target area at a position corresponding to the target area in the detection image.
[0194] In one possible implementation, the correction module includes:
[0195] a cutoff atomic number determination unit, for determining a cutoff atomic number based on the atomic number of the background object;
[0196] The image correction unit is used to assign all data in the atomic number image that are not greater than the cutoff atomic number to zero to obtain a corrected atomic number image.
[0197] In one possible implementation, the truncated atomic number determination unit includes:
[0198] The maximum atomic number determination subunit is used to set the maximum atomic number of a predetermined number of background objects when arranged in a stacked manner as a cutoff atomic number.
[0199] In a possible implementation manner, the segmentation module includes:
[0200] A division unit is used to divide one or more target regions in the corrected atomic number image according to the distribution of data in the corrected atomic number image and the principle that the difference of each data in the region is not greater than a predetermined value; one target region is a connected region;
[0201] Further optionally, the segmentation module may also include a calculation unit for respectively calculating the area occupied by each target region.
[0202] In a possible implementation manner, the division unit includes:
[0203] A traversal subunit, used for traversing the data in the corrected atomic number image;
[0204] A region division subunit is used to divide one or more screening regions in the corrected atomic number image according to the principle that each data in the region is not zero;
[0205] The area determination subunit is used to calculate the maximum difference between the data in the screening area, and determine the screening area as the target area when the maximum difference is not greater than a predetermined value.
[0206] In a possible implementation manner, the attribute information includes at least one of area information, atomic number information, and diagonal length information; wherein the classification module includes:
[0207] A first classification unit is used to determine one or more first target areas matching the first target foreign object according to the preset area information and atomic number information of the first target foreign object, and determine the type of the target foreign object corresponding to the first target area as the first target foreign object; wherein the first target foreign object includes a ballpoint pen tip or a seal;
[0208] The second classification unit is used to determine one or more second target areas that match the second target foreign object in the remaining target areas excluding the first target area, or in all the target areas, at least based on the diagonal length information of the second target foreign object, and determine the type of the target foreign object corresponding to the second target area as the second target foreign object; wherein the second target foreign object includes a needle.
[0209] In a possible implementation manner, the first classification unit includes:
[0210] The first determination subunit is used to determine a target region whose area matches the area information of the first target foreign object and whose maximum atomic number matches the atomic number information of the first target foreign object as the first target region.
[0211] In a possible implementation manner, the second classification unit includes:
[0212] An acquisition subunit, used to acquire the diagonal length of the rectangular area corresponding to each remaining target area, or to acquire the diagonal length of the rectangular area corresponding to each target area;
[0213] The second determining subunit is used to determine the remaining target area whose diagonal length matches the diagonal length information of the second target foreign object as the second target area.
[0214] In a possible implementation manner, the obtaining subunit includes:
[0215] A delimiting subunit is used to delimit a rectangular area according to the uppermost position, the lowermost position, the leftmost position and the rightmost position of the remaining target area;
[0216] The calculation subunit is used to calculate the diagonal length of the defined rectangular area.
[0217] Based on the above-disclosed foreign object detection and classification method, the present application also discloses a security inspection device, which includes a radiation source, a high-energy detector, a low-energy detector and an image processing unit; wherein the radiation source is used to emit radiation, the high-energy detector and the low-energy detector are used to respectively collect projection data of the radiation after passing through the inspected object, and the image processing unit is used to execute the steps of the above-disclosed foreign object detection and classification method.
[0218] Based on the foreign body detection and classification method disclosed above, the present application also discloses a computer-readable storage medium, which stores computer instructions, and the computer instructions execute the steps of the foreign body detection and classification method described above when running.
[0219] Based on the foreign body detection and classification method disclosed above, the present application also discloses a computer program product, including a computer program, which implements the steps of the foreign body detection and classification method as described above when executed by a processor.
[0220] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0221] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0222] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0223] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0224] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize that some variations, modifications, changes, additions and sub-combinations thereof should be included within the scope of protection of the present invention.
Claims
1. A foreign body detection and classification method, characterized in that: The foreign body detection and classification method comprises: Acquire a detection image of the inspected object and an atomic number image corresponding to the detection image respectively; wherein the inspected object is mixed with background objects and one or more target foreign matter, and the data of each position area in the atomic number image reflects the atomic number of the material corresponding to the position area in the detection image; Correcting the atomic number image based on the atomic number of the background object to obtain a corrected atomic number image after excluding the background object; According to the distribution of data in the corrected atomic number image, the corrected atomic number image is subjected to a region segmentation process to determine one or more target regions in the corrected atomic number image; wherein the target region corresponds to at least one of the target foreign bodies; Determine the type of target foreign matter corresponding to each target region according to the matching of the attribute information of the target region and the preset attribute information of different types of target foreign matter; wherein the attribute information is used to represent the image expression of the target region in the corrected atomic number image; The position corresponding to each target area in the detection image is respectively marked with the type of the target foreign matter determined by the target area.
2. The foreign body detection and classification method according to claim 1, characterized in that: The step of correcting the atomic number image based on the atomic number of the background object to obtain a corrected atomic number image after excluding the background object comprises: determining a cutoff atomic number based on the atomic number of the background object; Each data in the atomic number image that is not greater than the cutoff atomic number is assigned a value of zero to obtain the corrected atomic number image.
3. The foreign body detection and classification method according to claim 2, characterized in that: The step of determining the cutoff atomic number based on the atomic number of the background object comprises: The maximum atomic number of a predetermined number of the background objects when arranged in a stacked manner is set as the cutoff atomic number.
4. The foreign body detection and classification method according to claim 1, characterized in that: The step of performing region segmentation processing on the corrected atomic number image according to the distribution of data in the corrected atomic number image to determine one or more target regions in the corrected atomic number image comprises: According to the distribution of data in the corrected atomic number image and the principle that the difference of each data in the region is not greater than a predetermined value, one or more target regions are divided in the corrected atomic number image; one target region is a connected region.
5. The foreign body detection and classification method according to claim 4, characterized in that: The step of dividing one or more target areas in the corrected atomic number image according to the distribution of data in the corrected atomic number image and the principle that the difference between each data in the area is not greater than a predetermined value comprises: Traversing the data in the corrected atomic number image; According to the principle that all data in the region are not zero, one or more screening regions are divided in the corrected atomic number image; The maximum difference between the data in the screening area is calculated, and when the maximum difference is not greater than the predetermined value, the screening area is determined as the target area.
6. The foreign body detection and classification method according to claim 1, characterized in that: The attribute information includes at least one of area information, atomic number information, and diagonal length information; The step of determining the type of target foreign object corresponding to each target area according to the matching of the attribute information of the target area with the preset attribute information of different types of target foreign objects comprises: Determine one or more first target regions matching the first target foreign object according to the preset area information and atomic number information of the first target foreign object, and determine the type of the target foreign object corresponding to the first target region as the first target foreign object; wherein the first target foreign object includes a ballpoint pen tip or a seal; In the remaining target areas excluding the first target area, or in all the target areas, one or more second target areas matching the second target foreign object are determined at least based on the pre-set diagonal length information of the second target foreign object, and the type of the target foreign object corresponding to the second target area is determined as the second target foreign object; wherein the second target foreign object includes a needle.
7. The foreign body detection and classification method according to claim 6, characterized in that: The step of determining one or more first target areas matching the first target foreign object according to the preset area information and atomic number information of the first target foreign object comprises: Determine a target region whose area matches the area information of the first target foreign object and whose maximum atomic number matches the atomic number information of the first target foreign object as the first target region; The step of determining one or more second target areas matching the second target foreign object in the remaining target areas excluding the first target area, or in all the target areas, at least according to the preset diagonal length information of the second target foreign object, comprises: Obtaining the diagonal length of the rectangular area corresponding to each of the remaining target areas, or obtaining the diagonal length of the rectangular area corresponding to each of the target areas; The remaining target area whose diagonal length matches the diagonal length information of the second target foreign object is determined as the second target area.
8. A foreign body detection and classification device, characterized in that: The foreign body detection and classification device comprises: An acquisition module, used to respectively acquire a detection image of the inspected object and an atomic number image corresponding to the detection image; wherein the inspected object is mixed with background objects and one or more target foreign matter, and the data of each position area in the atomic number image reflects the atomic number of the material corresponding to the position area in the detection image; A correction module, used for performing correction processing on the atomic number image based on the atomic number of the background object to obtain a corrected atomic number image after excluding the background object; A segmentation module, configured to perform a regional segmentation process on the corrected atomic number image according to the distribution of data in the corrected atomic number image, and determine one or more target regions in the corrected atomic number image; wherein the target region corresponds to at least one of the target foreign bodies; A classification module, used to determine the type of target foreign matter corresponding to each target area according to the matching of the attribute information of the target area and the preset attribute information of different types of target foreign matter; wherein the attribute information is used to represent the image expression of the target area in the corrected atomic number image; The marking module is used to mark the type of the target foreign matter determined by each target area at a position corresponding to each target area in the detection image.
9. A security inspection device, characterized in that: The security inspection equipment includes a radiation source, a high-energy detector, a low-energy detector and an image processing unit; wherein the radiation source is used to emit radiation, the high-energy detector and the low-energy detector are used to respectively collect projection data of the radiation after passing through the inspected object, and the image processing unit is used to execute the steps of the foreign body detection and classification method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions, when executed, execute the steps of the foreign body detection and classification method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the foreign body detection and classification method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Target detection method based on angle, diagonal and target foreground information
CN117541891A
Foreign matter detection method, device and equipment and storage medium
CN117631069A
Material identification method and device, storage medium and electronic equipment
CN118247586A
Dual energy backscatter x-ray shoe scanning device
US20120069963A1