Image correction method, device, electronic device and storage medium

The image correction method and device address conveyor belt defects in security inspection equipment by using markers to determine matching full sub-images, enhancing image correction accuracy and removing artifacts, thereby improving image quality and identification accuracy.

CN115063308BActive Publication Date: 2024-12-06HANGZHOU RAYIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210635306.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-06
Publication Date
2024-12-06
Estimated Expiration
2042-06-06

AI Technical Summary

Technical Problem

Security inspection equipment suffers from conveyor belt defects such as uneven thickness or damage, leading to inaccuracies in image correction and artifacts in the corrected image due to changes in full-load images, affecting the matching accuracy between detection strip images and full-load images.

Method used

An image correction method and device that uses markers on the conveyor belt to distinguish areas, determining a matching full sub-image based on marker similarity, and employing this to correct strip image data, thereby improving the accuracy of image correction by removing artifacts caused by conveyor belt defects.

Benefits of technology

The method accurately determines matching full sub-images, enhancing the quality of corrected images by effectively removing artifacts caused by conveyor belt defects, thus improving the accuracy of image correction and dangerous goods identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115063308B_ABST
    Figure CN115063308B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an image correction method, device, electronic device and storage medium, the method comprising: obtaining target strip image data collected by the security inspection device when the object to be inspected passes through the security inspection device; determining the first target full sub-image corresponding to the target strip image data based on the similarity between the first marker in the target strip image data and the second marker in the first full sub-image acquired in advance; or determining the first target full sub-image corresponding to the target strip image data based on the second target full sub-image corresponding to the previous strip image data collected earlier than the target strip image data and the target collection time interval; correcting the target strip image data using the first target full sub-image to obtain the corrected strip image data, and then obtaining the detection image of the object to be inspected. The method can accurately remove the correction image artifacts caused by conveyor belt defects and improve the correction image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of security inspection technology, and in particular to an image correction method, device, electronic equipment and storage medium. Background Art

[0002] Security inspection equipment is an electronic device that uses a conveyor belt to send the inspected object into the inspection channel for inspection. It is widely used in entrance and exit security inspection scenarios of facilities such as airports and railways. Commonly used security inspection equipment consists of a radiation source, a collimator, a detector, a transmission structure and an image processing unit. Its security inspection process is mainly as follows: the radiation source emits a detection ray, which is collimated by the collimator to form a scanning plane. When the inspected object passes through the scanning plane driven by the transmission structure, the detector collects the detection ray signal passing through the inspected object to obtain a detection strip image. The image processing unit analyzes the detection strip image to obtain an image of the inspected object and complete the security inspection.

[0003] The detectors in the security inspection equipment are composed of multiple independent detection units. Due to defects such as processing differences, each detection unit will have different response values ​​to detection rays of the same intensity. Therefore, in actual security inspection applications, it is necessary to collect the full-load image of the security inspection equipment when there is no object to be detected and the background image when the radiation source is turned off, and perform full-load background correction on the detection strip image collected by the detector to eliminate the problem of inconsistent response of the image of the object to be detected.

[0004] However, due to long-term operation, the security inspection equipment may have defects such as uneven thickness or damage of the conveyor belt. These defects will cause the full-load image of the security inspection equipment to change, and the change of the full-load image will affect the matching accuracy between the detection strip image and the full-load image of the object to be tested, thereby affecting the result of image correction, resulting in artifacts in the corrected image of the object to be tested, affecting the quality of the corrected image. Therefore, how to eliminate the conveyor belt artifact problem caused by conveyor belt defects is very important to the quality of the corrected image. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide an image correction method, device, electronic device and storage medium to improve the matching accuracy between the detection strip image and the full load image and enhance the quality of the corrected image. The specific technical solution is as follows:

[0006] In a first aspect, an embodiment of the present invention provides an image correction method, which is applied to an image processing device, wherein the image processing device is used to process strip image data collected by a security inspection device, wherein the security inspection device includes a conveyor belt for transmitting objects to be inspected, and a plurality of markers are arranged at intervals on the conveyor belt, and the markers are used to distinguish different conveyor belt areas; the method includes:

[0007] Acquire target strip image data collected by the security inspection device when the object to be inspected passes through the security inspection device, wherein the target strip image data includes a first marker;

[0008] Determine a first target full sub-image corresponding to the target strip image data based on a similarity between a first marker in the target strip image data and a second marker in a pre-acquired first full sub-image; or determine a first target full sub-image corresponding to the target strip image data based on a second target full sub-image corresponding to a previous strip image data acquired earlier than the target strip image data and a target acquisition time interval between the target strip image data and the previous strip image data;

[0009] Using the first target full-load sub-image to perform correction processing on the target strip image data to obtain corrected strip image data, so as to obtain a detection image of the object to be detected based on the corrected strip image data;

[0010] Among them, the first full-load sub-image is any sub-image in the first full-load image data of the security inspection equipment acquired in advance, the second markers included in different full-load sub-images are different, and the first full-load image data refers to the detection data collected by the detector when no object to be inspected passes through the security inspection equipment and the radiation source and detector of the security inspection equipment are in the turned-on state.

[0011] In a second aspect, an embodiment of the present invention provides an image correction device, which is configured in an image processing device, and the image processing device is used to process strip image data collected by a security inspection device, wherein the security inspection device includes a conveyor belt for transmitting objects to be inspected, and a plurality of markers are arranged at intervals on the conveyor belt, and the markers are used to distinguish different conveyor belt areas; the image correction device includes:

[0012] An image data acquisition module, used to acquire target strip image data collected by the security inspection device when the object to be inspected passes through the security inspection device, wherein the target strip image data includes a first marker;

[0013] a full sub-image determination module, configured to determine a first target full sub-image corresponding to the target strip image data based on a similarity between a first marker in the target strip image data and a second marker in a pre-acquired first full sub-image; or, based on a second target full sub-image corresponding to a previous strip image data acquired earlier than the target strip image data, and a target acquisition time interval between the target strip image data and the previous strip image data, determine the first target full sub-image corresponding to the target strip image data;

[0014] An image correction module, used for performing correction processing on the target strip image data by using the first target full-load sub-image to obtain corrected strip image data, so as to obtain a detection image of the object to be detected based on the corrected strip image data;

[0015] Among them, the first full-load sub-image is any sub-image in the first full-load image data of the security inspection equipment acquired in advance, the second markers included in different full-load sub-images are different, and the first full-load image data refers to the detection data collected by the detector when no object to be inspected passes through the security inspection equipment and the radiation source and detector of the security inspection equipment are in the turned-on state.

[0016] In one embodiment, the full sub-image determining module is specifically configured to determine, according to the acquisition order of the first full sub-image in the first full image data, a full sub-image whose acquisition time interval with the second target full sub-image in the first full image data satisfies the target acquisition time interval as the first target full sub-image corresponding to the target strip image data;

[0017] In one embodiment, the security inspection device further includes a sensor device, and the sensor device is used to detect whether there is an object to be inspected entering the security inspection device; the image correction device further includes:

[0018] a fully loaded image acquisition module, configured to acquire second fully loaded image data when the security inspection device is in working state and the sensor device detects that no object to be inspected enters the security inspection device, wherein any second fully loaded sub-image in the second fully loaded image data includes a third marker;

[0019] a fully loaded image updating module, configured to determine, for any first fully loaded sub-image in the first fully loaded image data, a first updated fully loaded sub-image corresponding to the first fully loaded sub-image based on a similarity between a second marker in the first fully loaded sub-image and a third marker in the second fully loaded sub-image; or, based on a second updated fully loaded sub-image corresponding to a first preceding fully loaded sub-image acquired earlier than the first fully loaded sub-image in the first fully loaded image data and a first acquisition time interval between the first fully loaded sub-image and the first preceding fully loaded sub-image, determine a first updated fully loaded sub-image corresponding to the first fully loaded sub-image from the second fully loaded image data; and replace the first fully loaded sub-image in the first fully loaded image data with the corresponding first updated fully loaded sub-image;

[0020] In one embodiment, the fully loaded image acquisition module is further configured to, during the process of acquiring the second fully loaded image data, stop acquiring the second fully loaded image data if the sensor device detects that the object to be inspected has entered the security inspection device; if there is a first fully loaded sub-image for which the corresponding first updated fully loaded sub-image has not been determined, acquire third fully loaded image data when the object to be inspected has completely passed through the security inspection device and the sensor device has not detected other objects to be inspected entering the security inspection device, wherein any third fully loaded sub-image in the third fully loaded image data includes a fourth marker;

[0021] In one embodiment, the fully loaded image updating module is further used to determine, for a first fully loaded sub-image for which a corresponding first updated fully loaded sub-image has not been determined, a third updated fully loaded sub-image corresponding to the first fully loaded sub-image from the third fully loaded image data based on a similarity between a second marker in the first fully loaded sub-image and a fourth marker in the third fully loaded sub-image; or, based on a fourth updated fully loaded sub-image corresponding to a second preceding fully loaded sub-image acquired earlier than the first fully loaded sub-image in the first fully loaded image data, and a second acquisition time interval between the first fully loaded sub-image and the second preceding fully loaded sub-image, determine a third updated fully loaded sub-image corresponding to the first fully loaded sub-image from the third fully loaded image data; replace the first fully loaded sub-image in the first fully loaded image data with the corresponding first updated fully loaded sub-image or third updated fully loaded sub-image, until the first fully loaded image data is completely replaced by the acquired second fully loaded image data or third fully loaded image data, and determine that the updating of the fully loaded image data is completed;

[0022] Each marker is arranged in an edge region on the same side perpendicular to the transmission direction of the conveyor belt, and a preset region including the marker in the edge region participates in similarity calculation;

[0023] In one implementation, the fully loaded sub-image determination module includes:

[0024] A region image determination submodule, configured to determine a first preset region image including a first marker in the target strip image data, and to determine a second preset region image including a second marker in a pre-acquired first full sub-image;

[0025] a fully loaded sub-image determining submodule, configured to determine a first target fully loaded sub-image corresponding to the target strip image data based on a similarity between the first preset area image and the second preset area image;

[0026] In one embodiment, the fully loaded sub-image determination submodule is specifically used to downsample the first preset area image and the second preset area image to obtain the downsampled first preset area image and the second preset area image respectively, wherein the downsampling is used to reduce the resolution of the image; calculate the first similarity between the downsampled first preset area image and the downsampled second preset area image; select a preset number of second preset area images that have not been downsampled and whose corresponding first similarities exceed a preset similarity threshold; for any second preset area image among the preset number of second preset area images that have not been downsampled, calculate the second similarity between the second preset area image and the first preset area image that has not been downsampled, and determine the first target fully loaded sub-image corresponding to the target strip image data based on the second similarity;

[0027] In one embodiment, the multiple markers arranged at intervals on the conveyor belt are multiple rectangular markers, and the multiple rectangular markers satisfy the setting rule that the lengths and / or widths of the rectangular markers included in each strip image data collected in the same conveying cycle are different, and the conveying cycle is the cycle of one operation of the conveyor belt;

[0028] In one embodiment, the image correction module is used to calculate the absolute value of the first grayscale difference between each pixel point of the target strip image data and the pixel point at the corresponding position in the pre-collected security inspection equipment background image, and calculate the absolute value of the second grayscale difference between each pixel point of the first target full-load sub-image and the pixel point at the corresponding position in the security inspection equipment background image; for each pixel point of the target strip image data, determine the ratio between the absolute value of the first grayscale difference corresponding to the pixel point and the absolute value of the second grayscale difference corresponding to the pixel point corresponding to the pixel point in the first target full-load sub-image, and determine the ratio as the grayscale value of the corresponding pixel point in the corrected strip image data; wherein the security inspection equipment background image refers to the detection data collected by the detector when the radiation source is in an off state and the detector is in an on state.

[0029] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0030] Memory, used to store computer programs;

[0031] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.

[0032] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of the first aspects are implemented.

[0033] Beneficial effects of the embodiments of the present invention:

[0034] According to the method provided by the embodiment of the present invention, since both the first fully loaded sub-image and the target strip image data include markers, the first target fully loaded sub-image that matches the target strip image data can be accurately determined by using the similarity between the second marker included in the first fully loaded sub-image and the first marker included in the target strip image data. Furthermore, during the fully loaded background correction, if there is a defect in the conveyor belt when the strip image data is collected, the conveyor belt defect will affect the correction of the strip image data, resulting in artifacts in the corrected image corresponding to the strip image data. Since the conveyor belt area image included between the strip image data and the corresponding fully loaded image is theoretically consistent, the fully loaded image corresponding to the strip image data can be used to remove the artifacts of the corrected image caused by the conveyor belt defect, wherein the higher the matching degree of the conveyor belt area image included between the strip image data and the corresponding fully loaded image, the better the correction effect of the image correction using the fully loaded image. In the present application, the marker similarity can be used to accurately determine the first target full sub-image that matches the target strip image data, that is, the determined first target full sub-image has a high matching accuracy with the target strip image data, and the conveyor belt area image included in the first target full sub-image has a high matching accuracy with the conveyor belt area image included in the target strip image data. Therefore, the first target full sub-image can be used to more accurately remove the correction image artifacts caused by conveyor belt defects, thereby improving the correction image quality.

[0035] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0037] Figure 1 A flow chart of an image correction method provided by an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of the imaging principle of X-ray security inspection equipment;

[0039] FIG3( a) is a schematic diagram of strip image data provided by an embodiment of the present invention;

[0040] FIG3( b ) is a schematic diagram of a fully loaded sub-image provided by an embodiment of the present invention;

[0041] Figure 4 A flow chart of fully loaded sub-image matching provided by an embodiment of the present invention;

[0042] Figure 5 A flow chart for updating fully loaded image data of a security inspection device provided by an embodiment of the present invention;

[0043] Figure 6 Another flow chart for updating full-load image data of a security inspection device provided by an embodiment of the present invention;

[0044] Figure 7 A schematic diagram of the security inspection equipment system structure provided by an embodiment of the present invention;

[0045] Figure 8 A schematic diagram of the structure of an image correction device provided by an embodiment of the present invention;

[0046] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.

[0048] The following is an explanation of the professional terms involved in the embodiments of the present invention:

[0049] Security inspection equipment: a device that uses an X-ray source and detector to inspect objects;

[0050] Integration time: the time it takes for the detector of the security inspection equipment to collect a set of signals;

[0051] Full-load image data: refers to the detection data collected by the detector when there is no object to be inspected passing through the security inspection equipment and the radiation source and detector of the security inspection equipment are both in the turned-on state; the radiation source can be an X-ray source;

[0052] Background image of security inspection equipment: It is the detection data collected by the detector when the radiation source of the security inspection equipment is turned off and the detector of the inspection equipment is turned on. The detection data is usually dark current offset and noise.

[0053] Strip image data: When the object to be detected passes through the security inspection equipment, the detector of the security inspection equipment continuously measures the radiation signal that passes through the object to be detected and reaches the detector. The time of each continuous measurement is called an integration time. After each continuous measurement, a column of image signals can be output, which is called a strip image data.

[0054] Full-load background correction: Normalize the image data collected by the detector of the security inspection equipment at different pixels to eliminate the influence of factors such as geometric structure and detector inconsistency on the image.

[0055] Since the security inspection equipment may have defects such as uneven thickness or damage of the conveyor belt due to long-term operation, these defects will cause the full-load image data of the security inspection equipment to change, and the change of the full-load image data will affect the matching accuracy of the detection strip image data and the full-load image data of the object to be detected, thereby affecting the result of the full-load background correction, causing artifacts to appear in the corrected image of the object to be detected, affecting the quality of the corrected image. Therefore, in order to eliminate the conveyor belt artifact problem caused by conveyor belt defects, improve the matching accuracy of the detection strip image data and the full-load image data, and improve the quality of the corrected image, the embodiments of the present invention provide an image correction method, device, electronic device, computer-readable storage medium, and computer program product.

[0056] The following first introduces the image correction method provided by the embodiment of the present invention. The image correction method provided by the embodiment of the present invention can be applied to an image processing device, which can be used to process strip image data collected by a security inspection device, wherein the security inspection device includes a conveyor belt for transmitting objects to be inspected, and a plurality of markers are arranged at intervals on the conveyor belt, and the markers are used to distinguish different conveyor belt areas.

[0057] Figure 1 A flow chart of an image correction method provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0058] S101, obtaining target strip image data collected by the security inspection device when the object to be inspected passes through the security inspection device.

[0059] Wherein, the target strip image data includes a first marker.

[0060] When the photoelectric switch of the security inspection device detects that an object to be inspected has entered the security inspection device, the radiation source and detector of the security inspection device can be turned on to collect image data to obtain multiple strip image data. Usually, multiple strip image data within a transmission cycle can be used as a group of strip image data, and the target strip image data can be any strip image data within the same transmission cycle. For example, the first strip image data collected within the same transmission cycle can be selected as the target strip image data, or the third strip image data collected within the same transmission cycle can be selected as the target strip image data. The transmission cycle is the length of time for the conveyor belt to run one cycle.

[0061] S102, determining a first target full sub-image corresponding to the target strip image data based on a similarity between a first marker in the target strip image data and a second marker in a pre-acquired first full sub-image; or determining a first target full sub-image corresponding to the target strip image data based on a second target full sub-image corresponding to a previous strip image data acquired earlier than the target strip image data, and a target acquisition time interval between the target strip image data and the previous strip image data.

[0062] The preceding strip image data of the target strip image data may be any strip image data collected earlier than the target strip image data in the same transmission cycle.

[0063] S103, performing correction processing on the target strip image data by using the first target full-load sub-image to obtain corrected strip image data, so as to obtain a detection image of the object to be detected based on the corrected strip image data.

[0064] Among them, the first full-load sub-image is any sub-image in the first full-load image data of the security inspection equipment acquired in advance, the second markers included in different full-load sub-images are different, and the first full-load image data refers to the detection data collected by the detector when no object to be inspected passes through the security inspection equipment and the radiation source and detector of the security inspection equipment are in the turned-on state.

[0065] According to the method provided by the embodiment of the present invention, since both the first fully loaded sub-image and the target strip image data include markers, the first target fully loaded sub-image that matches the target strip image data can be accurately determined by using the similarity between the second marker included in the first fully loaded sub-image and the first marker included in the target strip image data. Furthermore, during the fully loaded background correction, if there is a defect in the conveyor belt when the strip image data is collected, the conveyor belt defect will affect the correction of the strip image data, resulting in artifacts in the corrected image corresponding to the strip image data. Since the conveyor belt area image included between the strip image data and the corresponding fully loaded image is theoretically consistent, the fully loaded image corresponding to the strip image data can be used to remove the artifacts of the corrected image caused by the conveyor belt defect, wherein the higher the matching degree of the conveyor belt area image included between the strip image data and the corresponding fully loaded image, the better the correction effect of the image correction using the fully loaded image. In the present application, the marker similarity can be used to accurately determine the first target full sub-image that matches the target strip image data, that is, the first target full sub-image determined has a high matching accuracy with the target strip image data, and the conveyor belt area image included in the first target full sub-image has a high matching accuracy with the conveyor belt area image included in the target strip image data. Therefore, the first target full sub-image can be used to more accurately remove the correction image artifacts caused by conveyor belt defects and improve the correction image quality. The corrected strip image data are spliced ​​to obtain an accurate detection image of the object to be inspected, which helps to improve the accuracy of dangerous goods identification.

[0066] In the embodiment of the present invention, when the radiation source and the detector of the security inspection device are turned on, the conveying cycles of the conveyor belt when it runs at multiple running speeds can be recorded respectively to obtain the corresponding relationship between the running speed and the conveying cycle.

[0067] When the radiation source and detector of the security inspection equipment are turned on, it can be determined whether the conveyor belt has completed a cycle based on whether the collected conveyor belt markers begin to repeat. When the conveyor belt is running, image data including conveyor belt markers can be collected. When the conveyor belt markers in the collected image data begin to repeat, it is determined that the conveyor belt has completed a cycle, and the conveyor belt running speed and the length of time for the conveyor belt to complete a cycle are recorded as the operating cycle corresponding to the operating speed. For example, when the conveyor belt runs for a cycle at the operating speed of v1 for a time of t1, the recorded operating speed v1 corresponds to the transmission cycle t1, and when the conveyor belt runs for a cycle at the operating speed of v2 for a time of t2, the recorded operating speed v2 corresponds to the transmission cycle t2.

[0068] In the embodiment of the present invention, the method for collecting the first full-load image data of the security inspection device may include the following steps A1-A2:

[0069] Step A1, when the radiation source and the detector of the security inspection device are turned on, a target transmission period is determined according to the current operating speed and the corresponding relationship between the operating speed and the transmission period.

[0070] For example, if the current running speed is v2, then the transmission period corresponding to v2 can be determined to be t2 according to the correspondence between the running speed and the transmission period collected in advance, that is, the target transmission period is t2.

[0071] Step A2, collecting image data in the security inspection device within the target transmission period to obtain first full-load image data.

[0072] For example, after determining that the target transmission period is t2, when no object passes through the security inspection device and the radiation source and detector of the security inspection device are turned on, image data of the security inspection device within a period of t2 can be collected as the first fully loaded image of the security inspection device.

[0073] The method provided in the embodiment of the present invention can be applied to security inspection scenarios at the entrances and exits of facilities such as airports, railways and museums, as well as industrial non-destructive testing scenarios. Since X-rays have high energy and penetration, they can quickly image the internal structure of an object without contacting or damaging the surface of the object. Therefore, the security inspection equipment can specifically select an X-ray security inspection equipment that uses X-rays as a ray source.

[0074] The X-ray security inspection equipment may include: a ray source, a collimator, a detector, a transmission structure and an image processing unit, wherein the transmission structure may generally be a roller, and the detector of the security inspection equipment may be a linear array detector.

[0075] Figure 2 A schematic diagram of the imaging principle of X-ray security inspection equipment is shown in Figure 2. Figure 2 As shown, the mode of X-ray scanning of objects is a line scanning mode, and its imaging process is specifically as follows: a ray source 201 emits X-rays, which are collimated into a fan-shaped beam by a collimator and reach a detector 202 to form a scanning plane; the object to be detected 203 passes through the scanning plane along the object movement direction under the drive of a conveying structure 204 (roller); in the process of the object to be detected 203 passing through the scanning plane, the detector 202 continuously measures the X-ray signal that passes through the object to be detected 203 and reaches the detector 202, and the time of each continuous measurement is called an integration time. After each continuous measurement, a column of image signals can be output, which is called a strip image data; the image processing unit can splice a series of strip image data 205 in the order of acquisition time to obtain an imaging result image of the object to be detected.

[0076] In one embodiment of the present invention, a plurality of markers may be pre-set at intervals on the conveyor belt of the security inspection device, and the markers are used to distinguish different conveyor belt areas. The markers contained in the strip image data collected in the same conveying cycle are all different. The conveyor belt is a belt device on the conveying structure (such as a roller) of the security inspection device.

[0077] Specifically, a plurality of markers of different shapes can be pre-arranged at a high density on one side of the conveyor belt, wherein the shapes of the markers can be rectangular, triangular, trapezoidal, irregular, etc. The distance between each marker and the length of the largest marker are both smaller than the width of a single strip image data collected, so as to ensure that the markers contained in the strip image data collected within the same conveying cycle are all different.

[0078] FIG. 3(a) is a schematic diagram of strip image data provided by an embodiment of the present invention, and FIG. 3(b) is a schematic diagram of a fully loaded sub-image provided by an embodiment of the present invention, and the strip image data in FIG. 3(a) matches the fully loaded sub-image in FIG. 3(b). As shown in FIG. 3(a) and FIG. 3(b), a plurality of rectangular conveyor belt markers 302 of gradually varying lengths may be pre-set on one side of the conveyor belt 301 at intervals as conveyor belt markers. The plurality of rectangular markers satisfy the setting rule that the lengths and / or widths of the rectangular markers included in each strip image data collected in the same conveying cycle are different. Specifically, the distance between each rectangular marker and the length of the longest rectangular marker may be set to be smaller than the width of a single strip image data collected (such as strip image data 1 and strip image data 2) to ensure that the conveyor belt markers included in the strip images collected in the same conveying cycle are all different.

[0079] In a possible implementation manner, determining the first target fully loaded sub-image corresponding to the target strip image data based on the second target fully loaded sub-image corresponding to the previous strip image data acquired earlier in time than the target strip image data, and the target acquisition time interval between the target strip image data and the previous strip image data, may include step B1:

[0080] Step B1, according to the acquisition order of the first fully loaded sub-image in the first fully loaded image data, the fully loaded sub-image in the first fully loaded image data whose acquisition time interval with the second target fully loaded sub-image meets the target acquisition time interval is determined as the first target fully loaded sub-image corresponding to the target strip image data.

[0081] In the embodiment of the present invention, since the speed of the conveyor belt is consistent within the same conveying cycle, when there is a previous strip image data whose corresponding second target full sub-image has been determined before the target strip image data within the same conveying cycle, the difference between the time when the target strip image data is started to be collected and the time when the previous strip image data is started to be collected can be calculated as the target collection time interval between the collection times corresponding to the previous strip image data and the target strip image data; or, the difference between the time when the target strip image data is stopped to be collected and the time when the previous strip image data is stopped to be collected can be calculated as the target collection time interval between the collection times corresponding to the previous strip image data and the target strip image data.

[0082] Then, from the first full-load image data of the security inspection device, in accordance with the acquisition time sequence of the first full-load sub-image in the first full-load image data, the full-load sub-image whose acquisition time corresponding to the second target full-load sub-image corresponding to the previous strip image data meets the target acquisition time interval can be extracted as the first target full-load sub-image corresponding to the target strip image data.

[0083] Specifically, on the premise that the target acquisition time interval is calculated based on the time when the acquisition of the previous strip image data starts and the time when the acquisition of the target strip image data starts, the image position with the target acquisition time interval as the start acquisition time of the second target full-loaded sub-image corresponding to the previous strip image data can be used as the image capture target position in accordance with the acquisition time sequence of the first full-loaded image data of the security inspection equipment, and then a full-loaded sub-image with the same width as the second target full-loaded sub-image can be extracted backward from the first full-loaded image data with the image capture target position as the starting position as the first target full-loaded sub-image.

[0084] On the premise that the target acquisition time interval is calculated based on the time when the acquisition of the previous strip image data is terminated and the time when the acquisition of the target strip image data is terminated, the image position with the target acquisition time interval as the interval of the termination acquisition time of the second target full-loaded sub-image corresponding to the previous strip image data can be used as the image capture target position in accordance with the acquisition time sequence of the first full-loaded image data of the security inspection equipment, and then a full-loaded sub-image with the same width as the second target full-loaded sub-image can be extracted from the first full-loaded image data with the image capture target position as the termination position as the forward direction as the first target full-loaded sub-image.

[0085] In one embodiment of the present invention, each marker of the conveyor belt can be set in the edge area of ​​the same side perpendicular to the transmission direction of the conveyor belt. As shown in Figure 3(a), the conveyor belt markers 302 are all set in the edge area of ​​the same side perpendicular to the transmission direction of the conveyor belt, and the preset area including the marker in the edge area participates in the similarity calculation. Figure 4A flowchart of fully loaded sub-image matching provided by an embodiment of the present invention is as follows: Figure 4 As shown, the step of determining the first target full sub-image corresponding to the target strip image data based on the similarity between the first marker in the target strip image data and the second marker in the pre-acquired first full sub-image may include:

[0086] S401, determining a first preset area image including a first marker in the target strip image data, and determining a second preset area image including a second marker in a pre-acquired first full sub-image.

[0087] Since the marker area only occupies a partial area of ​​the actual image, in order to make the match between the target strip image data and the first fully loaded sub-image more accurate, the first preset area image including the first marker in the target strip image data and the second preset area image including the second marker in the first fully loaded sub-image can be determined through image recognition processing, and the first target fully loaded sub-image corresponding to the target strip image data can be determined by only using the similarity between the first preset area image and the second preset area image.

[0088] Specifically, since the position of the marker in the conveyor belt is fixed, for example, the conveyor belt markers 302 in Figure 3(a) are all set in the edge area on the same side perpendicular to the transmission direction of the conveyor belt, and the positions of the structures such as the radiation source and the detector in the security inspection equipment are also fixed. Therefore, the image data collected by the detector includes the marker area image of the marker, and the area where it is located in the image data is also within a preset range. For example, as shown in Figure 3(a), the conveyor belt marking area 306 of the conveyor belt marker 302 included in the strip image data 1 can be set as the preset area image 1, and the conveyor belt marking area 307 of the conveyor belt marker 302 included in the strip image data 2 can be set as the preset area image 2. The preset area image 1 and the preset area image 2 are both within the same size edge range on the lower side of the strip image data.

[0089] Therefore, a preset area where the marker image included in the image data collected by the detector is located can be preset, and the preset area including the first marker in the target strip image data can be determined as the first preset area image, and the preset area including the second marker in the first fully loaded sub-image can be determined as the second preset area image. The area size of the first preset area image is the same as that of the second preset area image, and the size of these preset area images can be flexibly set according to needs, which is not limited in the embodiments of the present application. Exemplarily, during the image processing process, the first preset area image and the second preset area image can be determined based on the size of the preset area image, the edges parallel to the image width direction in the identified target strip image, and the edges parallel to the image width direction in the identified fully loaded sub-image. Of course, the specific implementation method is not limited to this.

[0090] S402: Determine a first target fully loaded sub-image corresponding to the target strip image data based on the similarity between the first preset area image and the second preset area image.

[0091] Specifically, the image grayscale difference or image gradient difference between the first preset area image and the second preset area image may be calculated as the similarity between the target strip image data and the first full sub-image, wherein the lower the image grayscale difference or image gradient difference, the higher the similarity.

[0092] The specific method for calculating the grayscale difference of an image can refer to the following formula:

[0093]

[0094] in, Gray_P is the image grayscale difference between the second preset area image in the first full sub-image T and the first preset area image in the target strip image data P, Gray_P i Gray_T is the grayscale image of the first preset area image in the target strip image data, Gray_T i is the grayscale image of the second preset area image in the first fully loaded sub-image, i is the image index corresponding to the first preset area image and the second preset area image, abs is the absolute value sign, and p is the index of the first preset area image and the second preset area image.

[0095] The process of calculating the image gradient difference between the second preset area image in each first fully loaded sub-image in the first fully loaded image data and the first preset area image in the target strip image data may include:

[0096] First, perform a sobel operator or other gradient operator convolution on the target strip image data and each first full sub-image to obtain a gradient image, and then set the pixel gradient in the gradient image whose gradient value is less than the preset gradient threshold to 0, wherein the preset gradient threshold can be set according to the actual application scenario and is not specifically limited here. Then, the image gradient difference can be calculated using the following gradient difference calculation formula:

[0097]

[0098] in, is the image gradient difference between the second preset region image in the first loaded sub-image T and the first preset region image in the target strip image data P, Gradient_P i is the gradient image of the first preset area image in the target strip image data after being processed by a preset gradient threshold, Gradient_T i is the gradient image of the second preset area image in the first fully loaded sub-image after being processed by the preset gradient threshold, i is the image index corresponding to the first preset area image and the second preset area image, abs is the absolute value sign, and p is the index of the first preset area image and the second preset area image.

[0099] In a possible implementation, in an application scenario with higher requirements for image processing efficiency, an image acceleration matching mode can be used to downsample the image, and a multi-layer pyramid matching strategy can be used for acceleration. First, a coarse matching is performed on a low-resolution image to filter out partially full sub-images, and then an accurate matching is performed on a high-resolution image of the filtered partially full sub-images. Specifically, the determination of the first target full sub-image corresponding to the target strip image data based on the similarity between the first preset area image and the second preset area image can include the following steps C1-C4:

[0100] Step C1, down-sampling the first preset area image and the second preset area image to obtain down-sampled first preset area image and second preset area image respectively.

[0101] The downsampling is used to reduce the resolution of the image. The downsampling method of the image is not limited to any other method as long as an image that can be used for rough matching is obtained.

[0102] Step C2, calculating a first similarity between the downsampled first preset region image and the downsampled second preset region image.

[0103] Specifically, the image grayscale difference or image gradient difference between the downsampled first preset region image and the downsampled second preset region image can be calculated as the first similarity. The specific calculation method of the image grayscale difference or image gradient difference has been described in S401 and will not be repeated here.

[0104] Step C3: selecting a preset number of second preset area images that have not been downsampled and whose corresponding first similarities exceed a preset similarity threshold.

[0105] The preset similarity threshold can be specifically set according to actual application requirements, for example, it can be set to 75% or 80%, etc. The preset number can also be specifically set according to actual application requirements, for example, it can be set to 5 or 10, etc.

[0106] In this step, a preset number of downsampled second preset area images whose corresponding first similarities exceed a preset similarity threshold can be selected from a plurality of downsampled second preset area images, and then, the non-downsampled second preset area images corresponding to the preset number of downsampled second preset area images are used to determine the first target fully loaded sub-image.

[0107] For example, the preset number is set to 2, and the first similarities corresponding to the downsampled second preset area image 1 and the downsampled second preset area image 2 both exceed the preset similarity threshold, then the non-downsampled second preset area image A corresponding to the downsampled second preset area image 1 and the non-downsampled second preset area image B corresponding to the downsampled second preset area image 2 can be used to determine the first target fully loaded sub-image.

[0108] Step C4, for any second preset area image among the preset number of second preset area images that have not been downsampled, calculate the second similarity between the second preset area image and the first preset area image that has not been downsampled, and determine the first target fully loaded sub-image corresponding to the target strip image data based on the second similarity.

[0109] Specifically, for any second preset area image among the preset number of screened second preset area images that have not been downsampled, the image grayscale difference or image gradient difference between the second preset area image and the first preset area image in the target strip image can be calculated as the second similarity between the second preset area image and the first preset area image that has not been downsampled. Then, for example, the first fully loaded sub-image where the second preset area image with the highest corresponding second similarity is located can be determined as the first target fully loaded sub-image corresponding to the target strip image data. The specific calculation method of the image grayscale difference or image gradient difference has been described in S401 and will not be repeated here.

[0110] In a possible implementation, in an embodiment of the present invention, when the determined target strip image data is the initial strip image data among multiple strip image data corresponding to the object to be detected, full-loaded sub-images with the same width as the first target full-loaded sub-image can be extracted in sequence from the first full-loaded image data of the security inspection device after the first target full-loaded sub-image corresponding to the target strip image data, and they are respectively used as the full-loaded sub-images corresponding to each strip image data after the target strip image data.

[0111] In one embodiment of the present invention, a preset operation time can be pre-set as the update period of the full-load image data of the security inspection device. After the security inspection device runs for the preset operation time, if no object is detected, the full-load image data of the security inspection device can be updated. The preset time can be set to 30 seconds or 1 minute, etc. Figure 5 A flowchart for updating the full-load image data of a security inspection device provided in an embodiment of the present invention, wherein the security inspection device further comprises a sensor device, and the sensor device is used to detect whether there is an object to be inspected entering the security inspection device. On the basis of ensuring that the detection of whether there is an object to be inspected entering the security inspection device is achieved, the specific form of the sensor device is not limited in the embodiment of the present application. Figure 5 As shown, the corresponding update method includes:

[0112] S501 , when the security inspection device is in working state and the sensor device detects that no object to be inspected enters the security inspection device, collecting second full-load image data.

[0113] Wherein, any second full-load sub-image in the second full-load image data includes a third marker. The security inspection device being in working state means that both the radiation source and the detector of the security inspection device are in the turned-on state.

[0114] S502. For any first full-loaded sub-image in the first full-loaded image data, based on the similarity between the second marker in the first full-loaded sub-image and the third marker in the second full-loaded sub-image, determine from the second full-loaded image data a first updated full-loaded sub-image corresponding to the first full-loaded sub-image; or, based on the second updated full-loaded sub-image corresponding to the first previous full-loaded sub-image in the first full-loaded image data, which is acquired earlier than the first full-loaded sub-image, and the first acquisition time interval between the first full-loaded sub-image and the first previous full-loaded sub-image, determine from the second full-loaded image data a first updated full-loaded sub-image corresponding to the first full-loaded sub-image.

[0115] Specifically, for any first full sub-image in the first full-loaded image data, a third preset area image including a second marker in the first full-loaded sub-image can be determined, and a fourth preset area image including a third marker in the second full-loaded sub-image can be determined; then, the similarity between the third preset area image and the fourth preset area image is calculated, and based on the similarity, a first updated full sub-image corresponding to the first full sub-image is determined from the second full-loaded image data. In this step, the method of determining the third preset area image and the fourth preset area image is consistent with the method of determining the preset area image in S401, and the method of determining the first updated full sub-image based on the similarity between the third preset area image and the fourth preset area image is consistent with the method of determining the first target full sub-image based on the similarity between the first preset area image and the second preset area image in S402, which will not be repeated here.

[0116] In this step, the first previous fully loaded sub-image is any first fully loaded sub-image in the first fully loaded image data that is collected earlier than the first fully loaded sub-image. The second updated fully loaded sub-image corresponding to the first previous fully loaded sub-image is determined by: based on the similarity between the second marker in the first previous fully loaded sub-image and the third marker in the second fully loaded sub-image, the second updated fully loaded sub-image corresponding to the first previous fully loaded sub-image is determined from the second fully loaded image data.

[0117] In a possible implementation manner, for any first full-loaded sub-image in the first full-loaded image data, based on a second updated full-loaded sub-image corresponding to a first previous full-loaded sub-image acquired earlier than the first full-loaded sub-image in the first full-loaded image data, and a first acquisition time interval between the first full-loaded sub-image and the first previous full-loaded sub-image, determining a first updated full-loaded sub-image corresponding to the first full-loaded sub-image from the second full-loaded image data may include step D1:

[0118] Step D1, for any first full-loaded sub-image in the first full-loaded image data, according to the acquisition order of the second full-loaded sub-image in the second full-loaded image data, the second full-loaded sub-image in the second full-loaded image data, whose acquisition time interval with the second updated full-loaded sub-image is the first acquisition time interval, is determined as the first updated full-loaded sub-image corresponding to the first full-loaded sub-image.

[0119] Specifically, the difference between the moment when the acquisition of the first full-loaded sub-image starts and the moment when the acquisition of the first previous full-loaded sub-image starts can be calculated as the first acquisition time interval; or, the difference between the moment when the acquisition of the first full-loaded sub-image ends and the moment when the acquisition of the first previous full-loaded sub-image ends can be calculated as the first acquisition time interval.

[0120] Then, from the second fully loaded image data, in accordance with the acquisition time order of the second fully loaded sub-image in the second fully loaded image data, the second fully loaded sub-image whose acquisition time corresponding to the second updated full loaded sub-image corresponding to the first previous fully loaded sub-image satisfies the first acquisition time interval can be extracted as the first updated full loaded sub-image corresponding to the first fully loaded sub-image.

[0121] Specifically, on the premise that the first acquisition time interval is calculated based on the time when the first previous full-loaded sub-image of the first full-loaded sub-image starts to be acquired and the time when the first full-loaded sub-image starts to be acquired, the image position with the first acquisition time interval as the start acquisition time of the second updated full-loaded sub-image corresponding to the first previous strip image data can be used as the image capture target position in accordance with the acquisition time sequence of the second full-loaded image data of the security inspection equipment, and then the second full-loaded sub-image with the same width as the second updated full-loaded sub-image can be extracted backward from the second full-loaded image data with the image capture target position as the starting position as the first updated full-loaded sub-image.

[0122] On the premise that the first acquisition time interval is calculated based on the moment when the acquisition of the first previous full-loaded sub-image of the first full-loaded sub-image is terminated and the moment when the acquisition of the first full-loaded sub-image is terminated, the image position with the first acquisition time interval as the interval of the termination acquisition time of the second updated full-loaded sub-image corresponding to the first previous strip image data can be used as the image capture target position in accordance with the acquisition time sequence of the second full-loaded image data of the security inspection equipment, and then the second full-loaded sub-image with the same width as the second updated full-loaded sub-image can be extracted from the second full-loaded image data with the image capture target position as the termination position as the first updated full-loaded sub-image.

[0123] S503: Replace the first fully loaded sub-image in the first fully loaded image data with the corresponding first updated fully loaded sub-image.

[0124] In another embodiment of the present invention, Figure 6 Another flow chart of updating the full-load image data of the security inspection device provided by the embodiment of the present invention, wherein the security inspection device further comprises a sensor device, and the sensor device is used to detect whether there is an object to be inspected entering the security inspection device, such as Figure 6 As shown, if an object is detected to enter the security inspection device during the process of collecting the second full-load image data, the corresponding method for updating the full-load image data of the security inspection device includes:

[0125] S601: During the process of collecting the second fully loaded image data, if the sensor device detects that the object to be inspected enters the security inspection device, stop collecting the second fully loaded image data.

[0126] For example, assuming that the transmission cycle is 30 seconds, when the radiation source and detector of the security inspection equipment are turned on and no object enters the security inspection equipment, the second full-load image data starts to be collected. When the collection reaches the 10th second, the sensor device of the security inspection equipment detects that the object to be tested enters the security inspection equipment, then the collection of the second full-load image data is suspended, and the second full-load image data within the current 10 seconds of collection is stored for updating the first full-load image data of the security inspection equipment.

[0127] S602: If there is a first full sub-image for which a corresponding first updated full sub-image has not been determined, when the object to be inspected completely passes through the security inspection device and the sensor device does not detect other objects to be inspected entering the security inspection device, collect third full image data.

[0128] Wherein, any third full-load sub-image in the third full-load image data includes a fourth marker.

[0129] S603, for a first full-loaded sub-image for which a corresponding first updated full-loaded sub-image has not been determined, based on the similarity between the second marker in the first full-loaded sub-image and the fourth marker in the third full-loaded sub-image, determine from the third full-loaded image data a third updated full-loaded sub-image corresponding to the first full-loaded sub-image; or, based on the fourth updated full-loaded sub-image corresponding to the second previous full-loaded sub-image in the first full-loaded image data, which is acquired earlier than the first full-loaded sub-image, and a second acquisition time interval between the first full-loaded sub-image and the second previous full-loaded sub-image, determine from the third full-loaded image data a third updated full-loaded sub-image corresponding to the first full-loaded sub-image.

[0130] In this step, the method for determining the third updated fully loaded sub-image corresponding to the first fully loaded sub-image may refer to the method for determining the first updated fully loaded sub-image corresponding to the first fully loaded sub-image in S502, which will not be repeated here.

[0131] S604, replacing the first fully loaded sub-image in the first fully loaded image data with the corresponding first updated fully loaded sub-image or the third updated fully loaded sub-image, until the first fully loaded image data is completely replaced by the collected second fully loaded image data or the third fully loaded image data, and determining that the update of the fully loaded image data is completed.

[0132] For example, assuming that the transmission cycle is 30 seconds, when the radiation source and detector of the security inspection equipment are turned on and no object enters the security inspection equipment, the second full-load image data begins to be collected. When the 10th second is collected, the sensor device of the security inspection equipment detects that the object to be tested has entered the security inspection equipment, and the collection of the second full-load image data is suspended, and the second full-load image data within the current 10 seconds is stored for updating the first full-load image data of the security inspection equipment. When the object to be tested passes through the security inspection equipment after 10 seconds, and the sensor does not detect that other objects to be tested have entered the security inspection equipment, the third full-load image data can be collected again until the collected second full-load image data and the third full-load image data can update the first full-load image data of the security inspection equipment, and then the collection of the third full-load image data can be stopped, and the full-load image data of the security inspection equipment can be updated after the next preset running time.

[0133] In another embodiment of the present invention, the step of correcting the target strip image data by using the first target full-load sub-image to obtain the corrected strip image data may include the following steps E1-E2:

[0134] Step E1, calculating the absolute value of the first grayscale difference between each pixel point of the target strip image data and the pixel point at the corresponding position in the pre-collected background image of the security inspection device, and calculating the absolute value of the second grayscale difference between each pixel point of the first target full-load sub-image and the pixel point at the corresponding position in the background image of the security inspection device.

[0135] Step E2, for each pixel point of the target strip image data, determine the ratio between the absolute value of the first grayscale difference corresponding to the pixel point and the absolute value of the second grayscale difference corresponding to the pixel point corresponding to the pixel point in the first target fully loaded sub-image, and determine the ratio as the grayscale value of the corresponding pixel point in the corrected strip image data.

[0136] The background image of the security inspection equipment refers to the detection data collected by the detector when the radiation source is in a closed state and the detector is in an open state.

[0137] Taking Figures 3(a) and 3(b) as examples, the full-loaded sub-image corresponding to the strip image data 1 in Figure 3(a) is the full-loaded sub-image 1 in Figure 3(b), and the full-loaded sub-image corresponding to the strip image data 2 in Figure 3(a) is the full-loaded sub-image 2 in Figure 3(b). The full-loaded sub-image 1 corresponding to the strip image data 1 in Figure 3(a) is the full-loaded sub-image when the conveyor belt area is normal, and the full-loaded sub-image 2 corresponding to the strip image data 2 in Figure 3(a) is the full-loaded sub-image when there is a belt defect in the conveyor belt area. As shown in Figures 3(a) and 3(b), the belt defects of the conveyor belt in the strip image data 1 include: "broken belt edge" and "uneven belt thickness", "broken belt edge" is located in the defect area 303, and "uneven belt thickness" is located in the defect area 304. For the strip image data 2, the correction image artifacts caused by the belt defects in the conveyor belt can be corrected according to the full-loaded sub-image 2 corresponding to the strip image data 2. The specific correction formula is:

[0138] The pixel grayscale of the corrected strip image data 2 = (pixel grayscale of the strip image data 2 - pixel grayscale of the original image) / (pixel grayscale of the full sub-image 2 - pixel grayscale of the original image);

[0139] The pixel grayscale in the corrected strip image data 1 = (pixel grayscale of the strip image data 1 - pixel grayscale of the main image) / (pixel grayscale of the full sub-image 1 - pixel grayscale of the main image).

[0140] In the embodiment of the present invention, when the ray source is in an off state and the detector is in an on state, the detection data collected by the detector can be used as the background image.

[0141] In a possible implementation, after obtaining all the corrected strip image data of the object to be inspected after passing through the security inspection device, all the corrected strip image data can be spliced ​​in the order of the acquisition time corresponding to the corrected strip image data to obtain the detection image of the object to be inspected. As shown in Figures 3(a) and 3(b), after splicing all the corrected strip image data of the object to be inspected 305 after passing through the security inspection device, a detection image containing the image of the object to be inspected 305 can be obtained.

[0142] Figure 7 A schematic diagram of the security inspection equipment system structure provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the security inspection equipment system consists of three parts: control system, hardware system and data processing system.

[0143] The control system includes a sensor unit and a control unit. The sensor unit is used to detect whether an object to be inspected enters the security inspection equipment, and the control unit is used to adjust the system parameters of the security inspection equipment.

[0144] The hardware system includes a radiation source, a detector and a motion transmission mechanism (i.e., a transmission structure). The radiation source includes but is not limited to an X-ray machine, an accelerator and a radioactive isotope. The detector includes but is not limited to a single-energy detector, a pseudo-dual-energy detector and an energy spectrum detector. The motion transmission mechanism can use a roller or other transmission structure. The hardware system is used to emit and receive X-rays, and to drive the object to be detected to move in the security inspection equipment at different operating speeds.

[0145] The data processing system includes a data acquisition unit, a full-load matching unit, an image processing unit and an image display unit. The data acquisition unit is used to collect the full-load image of the security inspection equipment, the background image and the strip image of the object to be detected passing through the security inspection equipment; the full-load matching unit is used to match the strip image data with the full-load image of the security inspection equipment; the image processing unit is used to perform image correction and other processing on the strip image data, and the image display unit is used to display the image.

[0146] In the embodiment of the present invention, the specific viewing angles of the radiation source and the detector are not limited. As long as the position of the belt defect in the fully loaded image captured at this viewing angle is relatively fixed, the method provided by the present invention can be used to match the fully loaded sub-image with the strip image data.

[0147] In the embodiment of the present invention, the security inspection equipment is provided with a plurality of groups of detectors, wherein the plurality of groups of detectors may be a plurality of groups of single-row detectors or a group of multi-row detectors.

[0148] By adopting the method provided in the embodiment of the present invention, the uniqueness of the conveyor belt marker can be utilized to accurately match the conveyor belt marker area in the full-load sub-image in the full-load image data of the security inspection equipment with the conveyor belt marker area in the target strip image data, so as to obtain an accurate full-load sub-image corresponding to the target strip image data. During the full-load background correction process, the full-load sub-image can be used to accurately correct the correction artifact problem in the target strip image data caused by conveyor belt defects, thereby improving the image correction accuracy and further improving the corrected image quality.

[0149] Corresponding to the above-mentioned image correction method, an embodiment of the present invention further provides an image correction device. The image correction device provided by the embodiment of the present invention is introduced below. Figure 8 As shown, an image correction device can be configured in an image processing device, the image processing device is used to process strip image data collected by a security inspection device, the security inspection device includes a conveyor belt for transmitting objects to be inspected, and a plurality of markers are arranged at intervals on the conveyor belt, and the markers are used to distinguish different conveyor belt areas. The image correction device can be a functional module integrated in the image processing device, and the image correction device can also be the same functional module as the image processing device, which is not specifically limited in the embodiments of the present application.

[0150] In the embodiments of the present application, Figure 8 As shown, the image correction device comprises:

[0151] The image data acquisition module 801 is used to acquire the target strip image data collected by the security inspection device when the object to be inspected passes through the security inspection device, wherein the target strip image data includes a first marker;

[0152] The full sub-image determination module 802 is configured to determine a first target full sub-image corresponding to the target strip image data based on a similarity between a first marker in the target strip image data and a second marker in a pre-acquired first full sub-image; or determine a first target full sub-image corresponding to the target strip image data based on a second target full sub-image corresponding to a previous strip image data acquired earlier than the target strip image data, and a target acquisition time interval between the target strip image data and the previous strip image data;

[0153] An image correction module 803 is used to perform correction processing on the target strip image data using the first target full-load sub-image to obtain corrected strip image data, so as to obtain a detection image of the object to be detected based on the corrected strip image data;

[0154] Among them, the first full-load sub-image is any sub-image in the first full-load image data of the security inspection equipment acquired in advance, the second markers included in different full-load sub-images are different, and the first full-load image data refers to the detection data collected by the detector when no object to be inspected passes through the security inspection equipment and the radiation source and detector of the security inspection equipment are in the turned-on state.

[0155] By using the device provided by the embodiment of the present invention, since both the first fully loaded sub-image and the target strip image data include markers, the first target fully loaded sub-image that matches the target strip image data can be accurately determined by using the similarity between the second marker included in the first fully loaded sub-image and the first marker included in the target strip image data. Furthermore, during full-load background correction, if there is a defect in the conveyor belt when collecting the strip image data, the conveyor belt defect will affect the correction of the strip image data, resulting in artifacts in the corrected image corresponding to the strip image data. Since the conveyor belt area image included between the strip image data and the corresponding fully loaded image is theoretically consistent, the fully loaded image corresponding to the strip image data can be used to remove the artifacts of the corrected image caused by the conveyor belt defect, wherein the higher the matching degree of the conveyor belt area image included between the strip image data and the corresponding fully loaded image, the better the correction effect of image correction using the fully loaded image. In the present application, the marker similarity can be used to accurately determine the first target full sub-image that matches the target strip image data, that is, the determined first target full sub-image has a high matching accuracy with the target strip image data, and the conveyor belt area image included in the first target full sub-image has a high matching accuracy with the conveyor belt area image included in the target strip image data. Therefore, the first target full sub-image can be used to more accurately remove the correction image artifacts caused by conveyor belt defects, thereby improving the correction image quality.

[0156] Optionally, the full sub-image determining module 802 is specifically configured to determine, according to the acquisition order of the first full sub-image in the first full image data, a full sub-image whose acquisition time interval with the second target full sub-image in the first full image data satisfies the target acquisition time interval as a first target full sub-image corresponding to the target strip image data;

[0157] The security inspection device further includes a sensor device, which is used to detect whether an object to be inspected enters the security inspection device; the image correction device further includes:

[0158] Fully loaded image acquisition module ( Figure 8 (not shown) for collecting second fully loaded image data when the security inspection device is in working state and the sensor device detects that no object to be inspected has entered the security inspection device, wherein any second fully loaded sub-image in the second fully loaded image data includes a third marker;

[0159] Fully loaded image update module ( Figure 8(not shown) for determining, for any first full-loaded sub-image in the first full-loaded image data, a first updated full-loaded sub-image corresponding to the first full-loaded sub-image based on the similarity between the second marker in the first full-loaded sub-image and the third marker in the second full-loaded sub-image; or, based on the second updated full-loaded sub-image corresponding to the first previous full-loaded sub-image in the first full-loaded image data, which is acquired earlier than the first full-loaded sub-image, and the first acquisition time interval between the first full-loaded sub-image and the first previous full-loaded sub-image, determining from the second full-loaded image data a first updated full-loaded sub-image corresponding to the first full-loaded sub-image; and replacing the first full-loaded sub-image in the first full-loaded image data with the corresponding first updated full-loaded sub-image;

[0160] The fully loaded image acquisition module ( Figure 8 (not shown), and further configured to, during the process of collecting the second full-load image data, stop collecting the second full-load image data if the sensor device detects that the object to be inspected has entered the security inspection device; if there is a first full-load sub-image for which the corresponding first updated full-load sub-image has not been determined, and the object to be inspected has completely passed through the security inspection device and the sensor device has not detected that other objects to be inspected have entered the security inspection device, collect third full-load image data, wherein any third full-load sub-image in the third full-load image data includes a fourth marker;

[0161] The fully loaded image update module ( Figure 8 (not shown) and further used for determining, for a first full-loaded sub-image for which a corresponding first updated full-loaded sub-image has not been determined, a third updated full-loaded sub-image corresponding to the first full-loaded sub-image from the third full-loaded image data based on a similarity between a second marker in the first full-loaded sub-image and a fourth marker in the third full-loaded sub-image; or, based on a fourth updated full-loaded sub-image corresponding to a second previous full-loaded sub-image acquired earlier than the first full-loaded sub-image in the first full-loaded image data, and a second acquisition time interval between the first full-loaded sub-image and the second previous full-loaded sub-image, determining a third updated full-loaded sub-image corresponding to the first full-loaded sub-image from the third full-loaded image data; replacing the first full-loaded sub-image in the first full-loaded image data with the corresponding first updated full-loaded sub-image or third updated full-loaded sub-image, until the first full-loaded image data is completely replaced by the acquired second full-loaded image data or third full-loaded image data, determining that the update of the full-loaded image data is completed;

[0162] Each marker is arranged in an edge region on the same side perpendicular to the transmission direction of the conveyor belt, and a preset region including the marker in the edge region participates in similarity calculation;

[0163] The fully loaded sub-image determination module 802 includes:

[0164] Region image determination submodule ( Figure 8 (not shown), for determining a first preset area image including a first marker in the target strip image data, and determining a second preset area image including a second marker in a pre-acquired first full sub-image;

[0165] Fully loaded sub-image determination sub-module ( Figure 8 (not shown) for determining a first target fully loaded sub-image corresponding to the target strip image data based on a similarity between the first preset area image and the second preset area image;

[0166] The fully loaded sub-image determination sub-module ( Figure 8 ), specifically used for downsampling the first preset area image and the second preset area image to obtain the downsampled first preset area image and the second preset area image respectively, wherein the downsampling is used to reduce the resolution of the image; calculating the first similarity between the downsampled first preset area image and the downsampled second preset area image; selecting a preset number of second preset area images that have not been downsampled and whose corresponding first similarities exceed a preset similarity threshold; for any second preset area image among the preset number of second preset area images that have not been downsampled, calculating the second similarity between the second preset area image and the first preset area image that has not been downsampled, and determining the first target full sub-image corresponding to the target strip image data based on the second similarity;

[0167] The multiple markers arranged at intervals on the conveyor belt are multiple rectangular markers, and the multiple rectangular markers satisfy the setting rule that the lengths and / or widths of the rectangular markers included in each strip image data collected in the same conveying cycle are different, and the conveying cycle is the cycle of one operation of the conveyor belt;

[0168] The image correction module 803 is used to calculate the absolute value of the first grayscale difference between each pixel point of the target strip image data and the pixel point at the corresponding position in the pre-collected security inspection equipment background image, and calculate the absolute value of the second grayscale difference between each pixel point of the first target full-load sub-image and the pixel point at the corresponding position in the security inspection equipment background image; for each pixel point of the target strip image data, determine the ratio between the absolute value of the first grayscale difference corresponding to the pixel point and the absolute value of the second grayscale difference corresponding to the pixel point corresponding to the pixel point in the first target full-load sub-image, and determine the ratio as the grayscale value of the corresponding pixel point in the corrected strip image data; wherein the security inspection equipment background image refers to the detection data collected by the detector when the radiation source is in the off state and the detector is in the on state.

[0169] By using the device provided in the embodiment of the present invention, the uniqueness of the conveyor belt marker can be used to accurately match the conveyor belt marker area in the full-load sub-image in the full-load image data of the security inspection equipment with the conveyor belt marker area in the target strip image data, so as to obtain an accurate full-load sub-image corresponding to the target strip image data. During the full-load background correction process, the full-load sub-image can be used to accurately correct the correction artifact problem in the target strip image data caused by conveyor belt defects, thereby improving the image correction accuracy and further improving the corrected image quality.

[0170] In the embodiment of the present invention, the first fully loaded image data, the second fully loaded image data and the third fully loaded image data, as well as the first marker, the second marker, the third marker and the fourth marker, "first", "second", "third" and "fourth" are used to distinguish data objects or markers in different situations.

[0171] The embodiment of the present invention further provides an electronic device, such as Fig. 9 As shown, it includes a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.

[0172] Memory 903, used for storing computer programs;

[0173] The processor 901 is used to implement the steps of the image correction method described in any of the above embodiments when executing the program stored in the memory 903.

[0174] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0175] The communication interface is used for communication between the above electronic device and other devices.

[0176] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0177] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0178] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the image correction method described in any of the above embodiments are implemented.

[0179] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the image correction method described in any of the above embodiments.

[0180] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0181] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0182] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, system, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0183] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An image correction method, It is characterized in that The method is applied to an image processing device, the image processing device is used to process strip image data collected by a security inspection device, the security inspection device includes a conveyor belt for transmitting objects to be inspected, a plurality of markers are arranged at intervals on the conveyor belt, and the markers are used to distinguish different conveyor belt areas; the method includes: Acquire target strip image data collected by the security inspection device when the object to be inspected passes through the security inspection device, wherein the target strip image data includes a first marker; Determine a first target full sub-image corresponding to the target strip image data based on a similarity between a first marker in the target strip image data and a second marker in a pre-acquired first full sub-image; or determine a first target full sub-image corresponding to the target strip image data based on a second target full sub-image corresponding to a previous strip image data acquired earlier than the target strip image data and a target acquisition time interval between the target strip image data and the previous strip image data; Using the first target full-load sub-image to perform correction processing on the target strip image data to obtain corrected strip image data, so as to obtain a detection image of the object to be detected based on the corrected strip image data; Among them, the first full-load sub-image is any sub-image in the first full-load image data of the security inspection equipment acquired in advance, the second markers included in different full-load sub-images are different, and the first full-load image data refers to the detection data collected by the detector when no object to be inspected passes through the security inspection equipment and the radiation source and detector of the security inspection equipment are in the turned-on state.

2. The method according to claim 1, It is characterized in that The determining, based on a second target fully loaded sub-image corresponding to a preceding strip image data acquired earlier than the target strip image data, and a target acquisition time interval between the target strip image data and the preceding strip image data, a first target fully loaded sub-image corresponding to the target strip image data, comprises: According to the acquisition order of the first full-loaded sub-image in the first full-loaded image data, the full-loaded sub-image in the first full-loaded image data whose acquisition time interval with the second target full-loaded sub-image meets the target acquisition time interval is determined as the first target full-loaded sub-image corresponding to the target strip image data.

3. The method according to claim 1, It is characterized in that The security inspection device further includes a sensor device, and the sensor device is used to detect whether there is an object to be inspected entering the security inspection device; the method further includes: When the security inspection device is in working state and the sensor device detects that no object to be inspected enters the security inspection device, collecting second full-load image data, wherein any second full-load sub-image in the second full-load image data includes a third marker; For any first full-loaded sub-image in the first full-loaded image data, based on the similarity between the second marker in the first full-loaded sub-image and the third marker in the second full-loaded sub-image, a first updated full-loaded sub-image corresponding to the first full-loaded sub-image is determined from the second full-loaded image data; or, based on the second updated full-loaded sub-image corresponding to a first previous full-loaded sub-image acquired earlier than the first full-loaded sub-image in the first full-loaded image data, and a first acquisition time interval between the first full-loaded sub-image and the first previous full-loaded sub-image, a first updated full-loaded sub-image corresponding to the first full-loaded sub-image is determined from the second full-loaded image data; The first fully loaded sub-image in the first fully loaded image data is replaced with the corresponding first updated fully loaded sub-image.

4. The method according to claim 3, It is characterized in that The method further comprises: During the process of collecting the second full-load image data, if the sensor device detects that the object to be inspected enters the security inspection device, the collection of the second full-load image data is stopped; If there is a first full sub-image for which a corresponding first updated full sub-image is not determined, when the object to be inspected completely passes through the security inspection device and the sensor device does not detect other objects to be inspected entering the security inspection device, collecting third full image data, wherein any third full sub-image in the third full image data includes a fourth marker; For a first full-loaded sub-image for which a corresponding first updated full-loaded sub-image has not been determined, a third updated full-loaded sub-image corresponding to the first full-loaded sub-image is determined from the third full-loaded image data based on a similarity between a second marker in the first full-loaded sub-image and a fourth marker in the third full-loaded sub-image; or, based on a fourth updated full-loaded sub-image corresponding to a second previous full-loaded sub-image acquired earlier than the first full-loaded sub-image in the first full-loaded image data, and a second acquisition time interval between the first full-loaded sub-image and the second previous full-loaded sub-image, a third updated full-loaded sub-image corresponding to the first full-loaded sub-image is determined from the third full-loaded image data; The first fully loaded sub-image in the first fully loaded image data is replaced with the corresponding first updated fully loaded sub-image or the third updated fully loaded sub-image, until the first fully loaded image data is completely replaced by the collected second fully loaded image data or the third fully loaded image data, and it is determined that the update of the fully loaded image data is completed.

5. The method according to claim 1, It is characterized in that Each marker is arranged in an edge region on the same side perpendicular to the transmission direction of the conveyor belt, and a preset region including the marker in the edge region participates in similarity calculation; The determining, based on the similarity between the first marker in the target strip image data and the second marker in the pre-acquired first fully loaded sub-image, a first target fully loaded sub-image corresponding to the target strip image data comprises: Determine a first preset area image including a first marker in the target strip image data, and determine a second preset area image including a second marker in a pre-acquired first full sub-image; Based on the similarity between the first preset area image and the second preset area image, a first target fully loaded sub-image corresponding to the target strip image data is determined.

6. The method according to claim 5, It is characterized in that The determining, based on the similarity between the first preset area image and the second preset area image, a first target full sub-image corresponding to the target strip image data comprises: Downsampling the first preset area image and the second preset area image to obtain downsampled first preset area image and second preset area image respectively, wherein the downsampling is used to reduce the resolution of the image; Calculating a first similarity between the downsampled first preset area image and the downsampled second preset area image; Selecting a preset number of second preset area images that have not been downsampled and whose corresponding first similarities exceed a preset similarity threshold; For any second preset area image among the preset number of second preset area images that have not been downsampled, a second similarity between the second preset area image and the first preset area image that has not been downsampled is calculated, and based on the second similarity, a first target fully loaded sub-image corresponding to the target strip image data is determined.

7. The method according to claim 1, It is characterized in that The multiple markers arranged at intervals on the conveyor belt are multiple rectangular markers, and the multiple rectangular markers satisfy the setting rule that the lengths and / or widths of the rectangular markers included in each strip image data collected within the same conveying cycle are different. The conveying cycle is the cycle of one operation of the conveyor belt.

8. The method according to any one of claims 1 to 7, It is characterized in that The correcting the target strip image data by using the first target full sub-image to obtain the corrected strip image data includes: Calculating the absolute value of a first grayscale difference between each pixel of the target strip image data and a pixel at a corresponding position in a pre-collected background image of the security inspection device, and calculating the absolute value of a second grayscale difference between each pixel of the first target full-load sub-image and a pixel at a corresponding position in the background image of the security inspection device; For each pixel of the target strip image data, determine a ratio between an absolute value of the first grayscale difference corresponding to the pixel and an absolute value of a second grayscale difference corresponding to a pixel corresponding to the pixel in the first target fully loaded sub-image, and determine the ratio as a grayscale value of the corresponding pixel in the corrected strip image data; The background image of the security inspection equipment refers to the detection data collected by the detector when the radiation source is in a closed state and the detector is in an open state.

9. An image correction device, It is characterized in that The image correction device is configured in an image processing device, and the image processing device is used to process the strip image data collected by the security inspection device, wherein the security inspection device includes a conveyor belt for transmitting the object to be inspected, and a plurality of markers are arranged at intervals on the conveyor belt, and the markers are used to distinguish different conveyor belt areas; the image correction device includes: An image data acquisition module, used to acquire target strip image data collected by the security inspection device when the object to be inspected passes through the security inspection device, wherein the target strip image data includes a first marker; a full sub-image determination module, configured to determine a first target full sub-image corresponding to the target strip image data based on a similarity between a first marker in the target strip image data and a second marker in a pre-acquired first full sub-image; or, based on a second target full sub-image corresponding to a previous strip image data acquired earlier than the target strip image data, and a target acquisition time interval between the target strip image data and the previous strip image data, determine the first target full sub-image corresponding to the target strip image data; An image correction module, used for performing correction processing on the target strip image data by using the first target full-load sub-image to obtain corrected strip image data, so as to obtain a detection image of the object to be detected based on the corrected strip image data; Among them, the first full-load sub-image is any sub-image in the first full-load image data of the security inspection equipment acquired in advance, the second markers included in different full-load sub-images are different, and the first full-load image data refers to the detection data collected by the detector when no object to be inspected passes through the security inspection equipment and the radiation source and detector of the security inspection equipment are in the turned-on state.

10. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 8 when executing a program stored in a memory.

11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 8 are implemented.