Security image distortion correction method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202510523803.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]本发明实施例提供了一种安检图像畸变校正方法、装置、电子设备及存储介质,以解决对物品安检过程中由于在安检通道不同位置产生的畸变问题
存储器存储有可被至少一个处理器执行的计算机程序,计算机程序被至少一个处理器执行,以使至少一个处理器能够执行本发明任一实施例的安检图像畸变校正方法。
Smart Images

Figure CN122989490A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of security inspection technology, and in particular to a method, apparatus, electronic device, and storage medium for correcting image distortion in security inspection. Background Technology
[0002] Existing security inspection image distortion correction methods only correct for the difference between the actual and ideal projection distance of the detector plate. However, because the distance from the X-ray source through the security checkpoint to the detector plate is not uniform, the scaling of the security images formed at different positions in the checkpoint varies. This leads to distortion in the projected image of the item during security inspection, making it inconsistent with its actual shape. For example, items closer to the X-ray source may appear larger than those farther away; inconsistencies can also occur when the same item is inspected multiple times due to differences in its position within the checkpoint. These image distortions can mislead security personnel, reduce the accuracy of image interpretation, and affect the security inspection results. Summary of the Invention
[0003] This invention provides a method, apparatus, electronic device, and storage medium for correcting image distortion during security inspections, in order to solve the distortion problem caused by different positions in the security inspection channel during the security inspection of items.
[0004] According to one aspect of the present invention, a method for correcting distortion in security inspection images is provided, comprising: Obtain the actual projection distance and the ideal projection distance of the detector, and determine the mapped pixel value; The X-ray security inspection image is corrected using the mapped pixel values to obtain the first corrected image; Obtain the first and second positions of the inspected item within the security checkpoint, and determine the calibration parameters; The first corrected image is corrected using the correction parameters to obtain the corrected X-ray security inspection image.
[0005] Optionally, obtaining the actual projection distance and the ideal projection distance of the detector, and determining the mapped pixel value, includes: obtaining the actual projection distance and the ideal projection distance of the detector; determining the detector projection ratio based on the ratio of the actual projection distance and the ideal projection distance of the detector; and calculating the mapped pixel value that corresponds to each pixel in the corrected image and each pixel in the original image based on the detector projection ratio.
[0006] Optionally, the step of calculating the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image based on the detector projection ratio includes: The cumulative projection ratio of the detector is obtained by accumulating the projection ratios of the detectors. Using linear interpolation, the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image are calculated.
[0007] Optionally, after calculating the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image based on the detector projection ratio, the method further includes: The mapped pixel values are temporarily stored in a cache table, and the mapped pixel values are retrieved from the cache table during the next linear array imaging correction.
[0008] Optionally, obtaining the first and second positions of the inspected item within the security checkpoint and determining the calibration parameters includes: Obtain the first detector plate number corresponding to the center line of the inspected item at the first position, and obtain the second detector plate number corresponding to the center line of the inspected item at the second position. The calibration parameters are determined based on the ratio of the serial numbers of the first and second detector plates.
[0009] According to another aspect of the present invention, a security inspection image distortion correction device is provided, comprising: The data acquisition module is used to acquire the actual projection distance and the ideal projection distance of the detector, and to determine the mapped pixel value; The first image correction module corrects the X-ray security inspection image using mapped pixel values to obtain the first corrected image; The calibration parameter determination module is used to obtain the first and second positions of the inspected item in the security check channel and determine the calibration parameters. The second image correction module uses correction parameters to correct the first correction image, resulting in a corrected X-ray security inspection image.
[0010] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory that is communicatively connected to at least one processor; wherein, The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the security inspection image distortion correction method according to any embodiment of the present invention.
[0011] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the security inspection image distortion correction method of any embodiment of the present invention.
[0012] The technical solution of this invention determines the mapped pixel value by obtaining the actual projection distance and the ideal projection distance of the detector; the mapped pixel value is used to correct the X-ray security inspection image to obtain a first corrected image; the first position and the second position of the inspected item in the security inspection channel are obtained to determine the correction parameters; the first corrected image is corrected using the correction parameters to obtain the corrected X-ray security inspection image. This can effectively eliminate the image distortion effect of the inspected item at different positions in the security inspection channel. The algorithm is simple and fast, with a fast processing speed and obvious image improvement effect.
[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram of the detector plate distribution of a security inspection device provided in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of a package at different positions in a security checkpoint, provided in Embodiment 1 of the present invention. Figure 3 This is a schematic diagram of the structure of a security inspection image distortion correction device provided in Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the security inspection image distortion correction method according to an embodiment of the present invention. Detailed Implementation
[0016] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. Example
[0018] This embodiment is applicable to situations involving distortion correction of security inspection images. The method can be executed by a security inspection image distortion correction device, which can be implemented in hardware and / or software and can be configured in electronic devices such as computers and servers. The method includes: S110. Obtain the actual projection distance and ideal projection distance of the detector, and determine the mapped pixel value.
[0019] Figure 1 This is a schematic diagram of the detector plate distribution of a security inspection device provided in Embodiment 1 of the present invention. Figure 1 For example, the detection board has 12 detection boards distributed starting from the lower left corner. Ideally, the height of the projected object corresponding to each detection board is consistent, that is, the height of the X1~X12 portion is consistent, i.e., X1~X12 = channel length / number of detection boards = 12 / 12 = 1. Therefore, it can be concluded that, ideally, the projection distance of each detection board = 1, that is, the ideal projection distance = 1. However, in reality, according to the distribution diagram of the detection boards, it can be seen that the height of the original projected object corresponding to each detection board is not consistent, that is, the height from X1 to X12 changes. Figure 1 The actual X1~X12 data gradually increase, ultimately causing an object at the same height to change after being projected onto the detector plate. This is because as an object at the same height moves vertically, the number of sectors it traverses on the detector plate gradually increases from X1 to X12, thus changing the final size of the object projected onto the detector plate.
[0020] Optionally, obtaining the actual projection distance and the ideal projection distance of the detector, and determining the mapped pixel value, includes: obtaining the actual projection distance and the ideal projection distance of the detector, determining the detector projection ratio based on the ratio of the actual projection distance and the ideal projection distance of the detector, and calculating the mapped pixel value that corresponds to each pixel in the corrected image and each pixel in the original image based on the detector projection ratio.
[0021] Specifically, the actual projection distance needs to be divided by the ideal projection distance. In the above example, the ideal projection distance = 1. Therefore, the detector projection ratio (actual projection distance / ideal projection distance) = the detector's actual projection distance. This means that the image corresponding to part X1 needs to be reduced to 33% of its original size, part X2 needs to be reduced to 45%, and so on for other parts (where parts X9 to X12 are magnified). Thus, the initial magnification / reduction ratio is obtained.
[0022] S120. The X-ray security inspection image is corrected using the mapped pixel values to obtain the first corrected image.
[0023] Optionally, based on the detector projection ratio, the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image are calculated, including: The cumulative projection ratio of the detector is obtained by accumulating the projection ratios of the detectors. Using linear interpolation, the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image are calculated.
[0024] Table 1. Detector projection table for Example 1 Detector number 1 2 3 4 5 6 7 8 9 10 11 12 Actual projected distance of the detector 0.33 0.45 0.63 0.66 0.70 0.78 0.85 0.90 1.10 1.30 1.80 2.50 ideal projection distance of the detector 1 1 1 1 1 1 1 1 1 1 1 1 Detector projection ratio 0.33 0.45 0.63 0.66 0.70 0.78 0.85 0.90 1.10 1.30 1.80 2.50 cumulative projection ratio of the detector 0.33 0.78 1.41 2.07 2.77 3.55 4.40 5.30 6.40 7.70 9.50 12.00 Specifically, for the convenience of calculation, the projection ratios of the detectors are accumulated to obtain the fifth row of Table 1. The accumulation method is that the cumulative sum of the projection ratios of detector i = detector i + detector i-1 + ... + detector 1, where 2 < i <= 12 (the cumulative sum of the projection ratio of detector 1 is equal to the projection ratio of detector 1). Finally, the accumulated value of each detector is obtained. For the convenience of description, taking detectors 2, 3, and 4 as examples, the accumulated projection ratio corresponding to detector 2 is 0.78, that corresponding to detector 3 is 1.41, and that corresponding to detector 4 is 2.07, which means that the 0.78th pixel of the corrected image corresponds to the 2nd pixel in the original image, the 3rd pixel in the original image corresponds to the 1.41th pixel of the corrected image, and the 4th pixel in the original image corresponds to the 2.07th pixel of the corrected image. A simple derivation on this basis can yield the position correspondence of the pixels in the corrected image: that is, when looking for the 1st pixel and the 2nd pixel of the corrected image, they can be obtained by interpolating the 2nd and 3rd pixels, and the 3rd and 4th pixels of the original image (because 0.78 corresponds to 2, 1.41 corresponds to 3, and 2.07 corresponds to 4), and the corresponding pixel values can be obtained by interpolating the 2nd and 3rd pixels, and the 3rd and 4th pixels of the original image. The interpolation method is as follows: the pixel value of the 1st pixel in the corrected image = (1-0.78) / (1.41-0.78) * (the pixel value of the 3rd pixel in the original image - the pixel value of the 2nd pixel in the original image) + the pixel value of the 2nd pixel in the original image; the pixel value of the 2nd pixel in the corrected image = (2-1.41) / (2.07-1.41) * (the pixel value of the 4th pixel in the original image - the pixel value of the 3rd pixel in the original image) + the pixel value of the 3rd pixel in the original image. Similarly, the pixel values at other positions of the corrected image can also be obtained by the above method.
[0025] S130. Acquire the first position and the second position of the inspected item in the security inspection channel, and determine the correction parameter.
[0026] Optionally, acquiring the first position and the second position of the inspected item in the security inspection channel and determining the correction parameter includes: Acquire the first detector board sequence number corresponding to the center line of the inspected item at the first position, and acquire the second detector board sequence number corresponding to the center line of the inspected item at the second position; The correction parameter is determined based on the ratio of the first detector board sequence number to the second detector board sequence number.
[0027] Figure 2 is a schematic diagram of the package in this embodiment at different positions in the security inspection channel. If the same package moves from the first position to the second position (the first position is the horizontal middle position of the channel), the projection area of the package at the second position will be much larger than that at the first position. Therefore, appropriate correction should also be performed for the distortion of the same package caused by different positions to avoid the problem of "near objects appear large while far objects appear small".
[0028] For convenience, we take the first position as the reference point, with its angle β and the red angle α. From the diagram, we can see that the maximum detector plate numbers corresponding to the first and second positions are 5 and 7, respectively. If we want to use the first position as the reference size, the projected area of the red region needs to be reduced to 5 / 7 of its original size to maintain the same size as the first position. Therefore, the cumulative value of the detector projection needs to be multiplied by 5 / 7 to obtain the corrected data, as shown in Table 2. Table 2 Cumulative projection ratio of the detector after the modification in Example 1 Detector number 1 2 3 4 5 6 7 8 9 10 11 12 Corrected detector cumulative projection ratio 0.33*5 / 7=0.24 0.78*5 / 7=0.56 1.41*5 / 7=1.01 2.07*5 / 7=1.48 2.77*5 / 7=1.98 3.55*5 / 7=2.54 4.40*5 / 7=3.14 5.30*5 / 7=3.79 6.40*5 / 7=4.57 7.70*5 / 7=5.50 9.50*5 / 7=6.79 12.00*5 / 7=8.57 S140. The first corrected image is corrected using the correction parameters to obtain the corrected X-ray security inspection image.
[0029] Repeat the above steps, correcting the pixel positions of the original image by matching them with the corrected pixel positions, and then using interpolation to obtain the corrected image. To obtain a universal algorithm, it is necessary to obtain... Figure 2 The center point O2 of the package in the second position. The image of the package obtained by the security inspection machine (at this time the package has not been corrected by any algorithm) is used to obtain the detection plate number with the largest projection (for example, the detection plate number with the largest projection corresponding to the package in the second position is 7). By connecting the image with the origin O of the coordinate axis (the location of the light source), the OO2 ray can be obtained. If the horizontal position of the package on the belt / channel can be obtained (i.e., the vertical dashed line position of O2), then the O2 point can be obtained (which is the intersection of the horizontal position (vertical dashed line) of the package in the second position and OO2).
[0030] After obtaining the position O2, a horizontal dashed line can be drawn from the center point of O2, extending to intersect the channel center line (the vertical dashed line at the first position) at point O1. This gives the horizontal height of point O1. Then, connect OO1 and intersect the detector plate along OO1 to obtain the maximum detector plate number at this point. (Since the first position is located at the center point of the belt, the horizontal position of O1 (the position of the vertical dashed line) is known—that is, half the width of the belt. In actual use, the maximum detector plate number corresponding to the horizontal height of O1 can be pre-entered, and the maximum detector plate number required for correction can be obtained offline.) This gives all the parameters for the overall correction of the package image. Using these parameters, the image of a package entering the security inspection machine can be corrected.
[0031] Optionally, after calculating the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image based on the detector projection ratio, the method further includes: The mapped pixel values are temporarily stored in a cache table, and the mapped pixel values are retrieved from the cache table during the next linear array imaging correction.
[0032] Typically, because security inspection equipment is relatively large in size and has a large number of detectors, the X-ray images of packages are relatively large. Therefore, the image distortion correction using the above interpolation methods takes a long time. In order to speed up the calculation, certain methods need to be adopted to save calculation time and accelerate image correction so that the package images do not delay the time for AI or manual image interpretation.
[0033] The security inspection equipment's imaging unit is a linear array imaging unit. The package needs to move perpendicularly along the collimation seam direction to obtain the final image formed by the accumulation of linear array pixels. Therefore, the pixels of the corrected image obtained by interpolation of pixels in the same row do not need to have their ratios recalculated. For example, for the 6th and 7th detectors in Table 2, the accumulated projection ratios of the corrected detectors are 2.54 and 3.14, respectively. According to the interpolation formula for obtaining the corrected image pixels mentioned in 1, the pixel value of the 3rd pixel of the corrected image that needs to be calculated is = (3-2.54) / (3.14-2.54)*(pixel value of the 7th pixel of the original image - pixel value of the 6th pixel of the original image) + pixel value of the 6th pixel of the original image. Because of the accumulation of linear array pixels, the (3-2.54) / (3.14-2.54) part corresponding to the 6th and 7th pixels can be calculated in advance and stored in the cache table. In this way, it is not necessary to repeatedly calculate the (3-2.54) / (3.14-2.54) value in the same row, and the same applies to other rows.
[0034] The technical solution of this embodiment determines the mapped pixel value by obtaining the actual projection distance and the ideal projection distance of the detector; the X-ray security inspection image is corrected using the mapped pixel value to obtain a first corrected image; the first position and the second position of the inspected item in the security inspection channel are obtained to determine the correction parameters; the first corrected image is corrected using the correction parameters to obtain a corrected X-ray security inspection image. This can effectively eliminate the image distortion effect of the inspected item at different positions in the security inspection channel. The algorithm is simple and fast, with a fast processing speed and obvious image improvement effect. Example
[0035] Figure 3 This is a schematic diagram of the structure of a security inspection image distortion correction device provided in Embodiment 2 of the present invention. Figure 3 As shown, the device includes: The data acquisition module 310 is used to acquire the actual projection distance and the ideal projection distance of the detector, and to determine the mapped pixel value; The first image correction module 320 corrects the X-ray security inspection image using mapped pixel values to obtain the first corrected image; The calibration parameter determination module 330 is used to obtain the first and second positions of the inspected item in the security check channel and determine the calibration parameters. The second image correction module 340 uses correction parameters to correct the first correction image to obtain the corrected X-ray security inspection image.
[0036] The technical solution of this embodiment involves a data acquisition module that obtains the actual projection distance and ideal projection distance of the detector to determine the mapped pixel value; a first image correction module that uses the mapped pixel value to correct the X-ray security inspection image to obtain a first corrected image; a correction parameter determination module that obtains the first and second positions of the inspected item within the security inspection channel to determine the correction parameters; and a second image correction module that uses the correction parameters to correct the first corrected image to obtain the corrected X-ray security inspection image. This solution improves the distortion correction method for security inspection images, effectively addressing distortions caused by the inspected item at different positions within the security inspection channel, with fast processing speed and significant image improvement.
[0037] Based on the above embodiments, optionally, the data acquisition module 310 is specifically used to acquire the actual projection distance of the detector and the ideal projection distance of the detector, determine the detector projection ratio based on the ratio of the actual projection distance of the detector and the ideal projection distance of the detector, and calculate the mapped pixel value that corresponds to each pixel in the corrected image and each pixel in the original image based on the detector projection ratio.
[0038] Optionally, the data acquisition module 310 is also specifically used to accumulate the detector projection ratio to obtain the cumulative projection ratio of the detector; and to calculate the mapped pixel value that corresponds to each pixel in the corrected image and each pixel in the original image using linear interpolation.
[0039] Optionally, the data acquisition module 310 is also specifically used to temporarily store the mapped pixel values in a cache table, and to obtain the mapped pixel values from the cache table during the next line array imaging correction.
[0040] Optionally, the calibration parameter determination module 330 is specifically used to obtain the first probe plate number corresponding to the center line of the inspected item at the first position, and to obtain the second probe plate number corresponding to the center line of the inspected item at the second position; and to determine the calibration parameters based on the ratio of the first probe plate number and the second probe plate number.
[0041] The security inspection image distortion correction device provided in this embodiment of the invention can execute the security inspection image distortion correction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method. Example
[0042] Figure 4This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0043] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0044] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0045] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as security inspection image distortion correction methods.
[0046] In some embodiments, the security image distortion correction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the security image distortion correction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the security image distortion correction method by any other suitable means (e.g., by means of firmware).
[0047] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0048] Computer programs used to implement the security inspection image distortion correction method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server. Example
[0049] Embodiment 4 of the present invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute a security inspection image distortion correction method, the method comprising: Obtain the actual projection distance and the ideal projection distance of the detector, and determine the mapped pixel value; The X-ray security inspection image is corrected using the mapped pixel values to obtain the first corrected image; Obtain the first and second positions of the inspected item within the security checkpoint, and determine the calibration parameters; The first corrected image is corrected using the correction parameters to obtain the corrected X-ray security inspection image.
[0050] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0051] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0052] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0053] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0054] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0055] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for correcting image distortion in security inspection, characterized in that, include: Obtain the actual projection distance and the ideal projection distance of the detector, and determine the mapped pixel value; The X-ray security inspection image is corrected using the mapped pixel values to obtain the first corrected image; Obtain the first and second positions of the inspected item within the security checkpoint, and determine the calibration parameters; The first corrected image is corrected using the correction parameters to obtain a corrected X-ray security inspection image.
2. The method according to claim 1, characterized in that, The process of obtaining the actual projection distance and the ideal projection distance of the detector, and determining the mapped pixel value, includes: Obtain the actual projected distance and the ideal projected distance of the detector, and determine the detector projection ratio based on the ratio of the actual projected distance and the ideal projected distance of the detector; Based on the detector projection ratio, the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image are calculated.
3. The method according to claim 2, characterized in that, The method of calculating the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image based on the detector projection ratio includes: The cumulative projection ratio of the detector is obtained by accumulating the projection ratios of the detectors. Using linear interpolation, the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image are calculated.
4. The method according to claim 3, characterized in that, After calculating the mapped pixel values that correspond to each pixel in the corrected image and each pixel in the original image based on the detector projection ratio, the method further includes: The mapped pixel values are temporarily stored in a cache table, and the mapped pixel values are retrieved from the cache table during the next linear array imaging correction.
5. The method according to claim 1, characterized in that, The process of obtaining the first and second positions of the inspected item within the security checkpoint and determining the calibration parameters includes: Obtain the first detector plate number corresponding to the center line of the inspected item at the first position, and obtain the second detector plate number corresponding to the center line of the inspected item at the second position; The correction parameters are determined based on the ratio of the first detector plate number to the second detector plate number.
6. A security inspection image distortion correction device, characterized in that, include: The data acquisition module is used to acquire the actual projection distance and the ideal projection distance of the detector, and to determine the mapped pixel value; The first image correction module uses the mapped pixel values to correct the X-ray security inspection image to obtain the first corrected image; The calibration parameter determination module is used to obtain the first and second positions of the inspected item in the security check channel and determine the calibration parameters. The second image correction module uses the correction parameters to correct the first corrected image to obtain a corrected X-ray security inspection image.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the security inspection image distortion correction method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the security inspection image distortion correction method according to any one of claims 1-5.