A green-passing and rapid inspection method and system based on X-ray imaging technology
By employing an image processing method based on X-ray imaging technology, the problems of low efficiency and poor accuracy in the detection of green channel vehicles have been solved, enabling rapid and accurate identification and evidence preservation of green channel vehicles, thereby improving detection efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG HOUDE MEASUREMENT & CONTROL TECH CO LTD
- Filing Date
- 2025-01-22
- Publication Date
- 2026-05-01
AI Technical Summary
Existing methods for inspecting green channel vehicles suffer from low inspection efficiency and poor accuracy. They are difficult to identify vehicles that have slipped through the checkpoints and lack evidence retention. Manual inspection is labor-intensive, and the low image quality of X-ray radiation imaging methods leads to insufficient inspection accuracy.
A rapid detection method for green channels based on X-ray imaging technology is adopted. The X-ray imaging image is stitched, flipped, edge-cut, stretched and clustered through image processing algorithms to generate high-quality pseudo-color vehicle images, so as to achieve rapid and accurate detection of green channel vehicles.
It improves the speed and accuracy of green channel vehicle inspection, effectively identifies vehicles that have smuggled themselves through, preserves evidence, reduces manual intervention, and enhances inspection efficiency and accuracy.
Smart Images

Figure CN119991625B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, and in particular relates to a rapid inspection method and system for green channels based on X-ray imaging technology. Background Technology
[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.
[0003] Vehicles specifically designed to transport fresh agricultural products are called "green channel vehicles." To facilitate the transfer of fresh agricultural products, the government waives highway tolls for green channel vehicles. According to relevant policies, vehicles carrying a full load of fresh agricultural products (those exceeding 80% of their rated load capacity are considered full loads) can use the green channel to pass through highway toll stations, and are exempt from tolls. However, determining whether a vehicle qualifies as a green channel vehicle is difficult, often requiring unpacking and inspection, which is inefficient. There are also instances where some vehicles attempt to smuggle partially green vegetables through unauthorized channels.
[0004] Currently, the vast majority of green channel vehicles are inspected manually, requiring unpacking and inspection. This is labor-intensive for staff, slow, and prone to causing traffic congestion. It also fails to effectively identify vehicles that have smuggled themselves in, and it's difficult to preserve evidence. While methods using green channel vehicle inspection equipment to assist manual inspection exist, they still suffer from many of the shortcomings of manual inspection methods. Inspection methods utilizing X-ray radiation imaging principles also exist, but existing X-ray radiation imaging inspection methods mostly rely directly on vehicle images generated by X-rays for judgment, resulting in low image quality and low inspection accuracy. Summary of the Invention
[0005] To overcome the shortcomings of the prior art, the present invention provides a method and system for rapid inspection of green channels based on X-ray imaging technology, which improves the efficiency of high-speed traffic, enhances the efficiency and accuracy of green channel vehicle inspection, and enables evidence preservation.
[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0007] In a first aspect, the present invention provides a rapid inspection method for green channels based on X-ray imaging technology, comprising:
[0008] Obtain X-ray imaging slice images of the current vehicle over a period of time, and stitch all slice images together to obtain the original X-ray imaging image;
[0009] The original X-ray image is vertically flipped to obtain a forward-facing original X-ray image;
[0010] The original X-ray image is obtained by removing the left and right black borders of the original image from the frontal view using an image processing algorithm; the blank area at the top of the original vehicle image is removed, and the white border on the right side is removed using an image processing algorithm to obtain the target vehicle image.
[0011] The target vehicle image is stretched, and all pixels in the stretched target vehicle image are clustered using a clustering method. Pixels in different classes are mapped to different colors to obtain a pseudo-color image of the vehicle.
[0012] In a further technical solution, the image processing algorithm employs an adaptive thresholding method.
[0013] A further technical solution yields the following original vehicle image:
[0014] The maximum value of all pixel values in the original positive X-ray imaging image is calculated, and then the maximum value is multiplied by a factor to serve as a threshold.
[0015] The average of the largest set number of values in each column of the raw X-ray image is calculated.
[0016] Scan each column of the image from left to right, and delete the column if the average value is less than a threshold; then scan from right to left, and delete the column if the average value is less than a threshold.
[0017] A further technical solution is that the threshold is expressed as a formula:
[0018]
[0019] Where θ is the threshold, α is an empirical value, and I i,j Let be the pixel value in the i-th row and j-th column of the image;
[0020] The formula for the average value is expressed as:
[0021]
[0022] Among them, v j Let m be the average value, m be a set number, and M be the index set of the maximum m values.
[0023] A further technical solution involves stretching the target vehicle image by: calculating an image stretching factor based on the vehicle speed, the X-ray machine's scanning speed, and the geometric relationship between the vehicle and the X-ray machine; multiplying the target vehicle image width by the image stretching factor to obtain the stretched image width; and then stretching the target vehicle image based on the image width.
[0024] A further technical solution is that the formula for calculating the image stretching factor is:
[0025]
[0026] Where λ is the stretching factor, v s Indicates the sampling frequency, v c Let λ be the vehicle speed. p This is a scaling factor.
[0027] A further technical solution maps pixels from different classes to different colors to obtain a pseudo-color image of the vehicle. Specifically, a piecewise function method is used to map the grayscale values of the stretched target vehicle image to the pseudo-color range.
[0028] Secondly, the present invention provides a rapid inspection system for green channels based on X-ray imaging technology, comprising:
[0029] The image acquisition module is configured to acquire X-ray imaging slice images of the current vehicle over a period of time, and stitch all slice images together to obtain the original X-ray imaging image.
[0030] An image flipping module is configured to vertically flip the original X-ray image to obtain a forward-facing original X-ray image.
[0031] The region removal module is configured to: remove the left and right black borders of the original forward X-ray imaging image using an image processing algorithm to obtain the original vehicle image; remove the upper blank area of the original vehicle image and remove its right white border using an image processing algorithm to obtain the target vehicle image;
[0032] The image mapping module is configured to: stretch the target vehicle image, cluster all pixels in the stretched target vehicle image using a clustering method, and map pixels in different classes to different colors to obtain a pseudo-color image of the vehicle.
[0033] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the green channel rapid inspection method based on X-ray imaging technology as described in the first aspect.
[0034] Fourthly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the green channel rapid inspection method based on X-ray imaging technology as described in the first aspect.
[0035] The above one or more technical solutions have the following beneficial effects:
[0036] This invention processes vehicle images generated using X-ray imaging technology. First, all cross-sectional images are stitched together and vertically flipped. Then, an adaptive thresholding algorithm is used to remove the left and right black borders, followed by the removal of the top blank area. The right white border is then removed using the same adaptive thresholding algorithm. An image stretching factor is calculated based on speed, geometric relationships, and scanning speed, and the image is stretched accordingly. Finally, a pseudo-color processing method using K-means clustering and a piecewise mapping function is applied to the image to obtain a clear color image of the vehicle, i.e., a high-quality vehicle image. Based on this high-quality image, personnel can accurately inspect the items inside the vehicle, quickly determine whether it is a green channel vehicle (vehicle requiring green channel access), improve the accuracy of green channel vehicle inspection, effectively prevent vehicles from slipping through inspection channels, and ensure evidence preservation.
[0037] This invention automatically generates interior images of vehicles using X-ray imaging equipment, eliminating the need for manual vehicle inspection. Staff can then make judgments based on the processed, high-quality vehicle images, thus improving the speed and accuracy of inspections for green channel vehicles. Attached Figure Description
[0038] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0039] Figure 1 This is a flowchart of the rapid inspection method for green channels according to an embodiment of the present invention;
[0040] Figure 2 This is an example diagram of the inverted original X-ray imaging in an embodiment of the present invention;
[0041] Figure 3 This is an example diagram of the original X-ray imaging from a forward orientation in an embodiment of the present invention;
[0042] Figure 4 This is an example image of the original vehicle image in an embodiment of the present invention;
[0043] Figure 5 This is an example image of the original vehicle image after the upper blank area has been removed, according to an embodiment of the present invention.
[0044] Figure 6 This is an example image of the target vehicle in an embodiment of the present invention;
[0045] Figure 7 This is an example image of the stretched target vehicle in an embodiment of the present invention;
[0046] Figure 8 This is an example of a pseudo-color image of a vehicle in an embodiment of the present invention;
[0047] Figure 9This is an actual deployment diagram of the green channel rapid inspection system in an embodiment of the present invention. Detailed Implementation
[0048] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0049] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0050] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0051] Example 1
[0052] like Figure 1 As shown in the figure, this embodiment discloses a rapid inspection method for green channels based on X-ray imaging technology. The method includes the following steps:
[0053] S1: Obtain X-ray imaging slice images of the current vehicle over a period of time, and stitch all slice images together to obtain the original X-ray imaging image;
[0054] In this embodiment, as Figure 9 As shown, X-ray transmitters and X-ray receivers are installed on both sides of the road. Vehicles pass between the transmitters and receivers at a constant speed. The X-ray receivers obtain slice images of the vehicle's cross-section over a period of time. These slice images of all vehicle cross-sections are then stitched together to obtain the original X-ray image.
[0055] It should be noted that, in order to reduce image loss due to the delay in turning on and off, the X-ray receiver is turned on first, then the X-ray transmitter, then the transmitter is turned off, and finally the receiver is turned off when a vehicle passes. This way, the receiver can receive an image of the entire cross-section as the vehicle passes, but this will result in black borders on both sides.
[0056] It should be noted that this method uses a ranging sensor to detect the gap between the cab and the trailer, precisely preventing the cab from being exposed to X-rays. For vehicle models without a gap between the cab and the trailer, a preset fixed cab length value is used to avoid X-ray exposure. This fixed cab length value ensures that the cab of such vehicles is not exposed to X-rays. These methods prevent X-rays from adversely affecting the driver.
[0057] S2: Vertically flip the original X-ray image to obtain a forward-facing original X-ray image;
[0058] In this embodiment, as Figure 2 , Figure 3 As shown, the image captured by the currently used X-ray receiver is an inverted image, which needs to be vertically flipped to obtain a normal image.
[0059] S3: The left and right black borders of the original forward X-ray imaging image are removed using an image processing algorithm to obtain the original vehicle image; the upper blank area of the original vehicle image is removed, and the right white border is removed using an image processing algorithm to obtain the target vehicle image;
[0060] In this embodiment, as Figure 3 , Figure 4 As shown, the image processing algorithm, specifically the adaptive thresholding method, is used to remove the black areas (black borders) on the left and right sides of the original image. The specific steps are as follows:
[0061] First, the maximum value of all pixels in the original forward-facing X-ray image is calculated. Then, this maximum value is multiplied by a factor α, which is used as the first threshold θ. α is an empirical value. The formula is expressed as:
[0062]
[0063] Among them, I i,j Let be the pixel value in the i-th row and j-th column of the image.
[0064] The average of the m largest values in each column of a statistical image, v. j Using the largest possible value for m is to avoid the influence of noise points on the algorithm. The formula is expressed as:
[0065]
[0066] Where M is the index set of the maximum m values, k represents the row number, and j represents the column number.
[0067] Scan each column j of the image from left to right, if v j If the value is less than θ, delete the column. Then scan from right to left; if v j If the value is less than θ, then delete this column.
[0068] In this embodiment, as Figure 4 , Figure 5 As shown, the blank area at the top of the original vehicle image is removed by: calculating the average value p of all pixels in each row. i If p i If the value is greater than the second threshold τ, then delete this row. The formula is expressed as:
[0069]
[0070] Where β is an empirical value, and n represents the number of columns, i.e., the width of the image.
[0071] like Figure 5 , Figure 6 As shown, to avoid missing images of the vehicle's rear, the X-ray transmitter was delayed in shutting down, resulting in a white border on the right side. An image processing algorithm, specifically an adaptive thresholding method, was used to remove this white area (white border). The specific steps are as follows:
[0072] First, calculate the maximum value of all pixel values, using τ as a threshold. Scan from right to left. If the average value of the j-th column is ω... j If the value is less than τ, delete this column. Average value ω j The formula is expressed as:
[0073]
[0074] S4: Stretch the target vehicle image and cluster all pixels in the stretched target vehicle image using a clustering method, mapping pixels in different classes to different colors to obtain a pseudo-color image of the vehicle.
[0075] In this embodiment, as Figure 6 , Figure 7 As shown, because vehicles travel at different speeds through X-rays, the image width varies when the same vehicle passes through the X-ray beam. To correct this difference in image width caused by varying vehicle speeds, the image needs to be stretched. The vehicle's speed v can be determined using the system's speed sensor. c Given that the X-ray machine's scanning speed is f frames / second, λ can be obtained based on the geometric relationship between the vehicle and the transmitter and receiver. p Then the image stretching factor λ is:
[0076]
[0077] Among them, v s This indicates the sampling frequency of the X-ray receiver, v. c λ represents the vehicle speed. p This represents the scaling factor derived from the geometric relationship between the vehicle and the transmitter and receiver.
[0078] Multiplying the existing image width by λ gives the stretched image width, which is then used for stretching.
[0079] The K-means clustering method is used to cluster all the pixels in the stretched target vehicle image, and the pixels in different classes are mapped to different colors to obtain a pseudo-color image of the vehicle.
[0080] like Figure 8 As shown, specifically, a piecewise function method is used to map the grayscale values of the stretched target vehicle image to a pseudo-color range, transforming the original grayscale values. Let C = (c1, c2, ..., c n () is a list of pseudo-color boundary points, and the mapped colors are:
[0081]
[0082] Where t is the original grayscale value, and c(t) represents the color mapped from the grayscale value t, [t i ,t i+1 [c] represents the original grayscale value range. i ,c i+1 [] represents the corresponding pseudo-color range.
[0083] Depending on the settings for C, different effects can be achieved, such as... Figure 8 The pseudo-color image shown allows staff to directly determine whether a vehicle is a green channel vehicle based on the proportion of agricultural products in the processed pseudo-color image, improving the efficiency and accuracy of green channel vehicle identification.
[0084] like Figures 2-8 As shown, this invention uses a vehicle carrying cabbages in its cargo compartment as an example. The irregularly shaped shaded area in the figure represents the area occupied by the agricultural products. Figure 8 With the false-color image, staff can visually observe the area occupied by agricultural products inside the vehicle (the irregularly edged shadowed area) to determine whether the vehicle is a green channel vehicle.
[0085] Therefore, the green channel rapid detection method of this invention first stitches together all cross-sectional images and flips them vertically. Then, it uses an adaptive thresholding algorithm to remove the left and right black edges, followed by the removal of the blank area at the top, and then uses the adaptive thresholding algorithm to remove the right white edge. An image stretching factor is calculated based on speed, geometric relationships, and scanning speed, and the image is stretched accordingly. Finally, a pseudo-color processing method is applied to the image using a K-means clustering algorithm and a piecewise mapping function to obtain a clear, high-quality image of the vehicle's interior, facilitating the determination of whether a vehicle is a green channel vehicle.
[0086] Example 2
[0087] This embodiment discloses a rapid inspection system for green channels based on X-ray imaging technology, including:
[0088] The image acquisition module is configured to acquire X-ray imaging slice images of the current vehicle over a period of time, and stitch all slice images together to obtain the original X-ray imaging image.
[0089] An image flipping module is configured to vertically flip the original X-ray image to obtain a forward-facing original X-ray image.
[0090] The region removal module is configured to: remove the left and right black borders of the original forward X-ray imaging image using an image processing algorithm to obtain the original vehicle image; remove the upper blank area of the original vehicle image and remove its right white border using an image processing algorithm to obtain the target vehicle image;
[0091] The image mapping module is configured to: stretch the target vehicle image, cluster all pixels in the stretched target vehicle image using a clustering method, and map pixels in different classes to different colors to obtain a pseudo-color image of the vehicle.
[0092] Example 3
[0093] The purpose of this embodiment is to provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method of Embodiment 1.
[0094] Example 4
[0095] The purpose of this embodiment is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method of Embodiment 1.
[0096] The steps and methods involved in the apparatuses of Embodiments 3 and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0097] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0098] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0099] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A rapid inspection method for green channels based on X-ray imaging technology, characterized in that, include: Obtain X-ray imaging slice images of the current vehicle over a period of time, and stitch all slice images together to obtain the original X-ray imaging image; The original X-ray image is vertically flipped to obtain a forward-facing original X-ray image; The original X-ray image is obtained by removing the left and right black borders of the original image from the frontal view using an image processing algorithm; the blank area at the top of the original vehicle image is removed, and the white border on the right side is removed using an image processing algorithm to obtain the target vehicle image. The process of obtaining the original vehicle image specifically involves: calculating the maximum value of all pixels in the forward-facing X-ray imaging original image, and then multiplying the maximum value by a factor to obtain a threshold; the formula for the threshold is expressed as: in, For the threshold, Based on experience points. For the image in the first Line number The pixel values of the column; The average of a set number of the largest values in each column of the raw X-ray image is calculated; the formula for the average value is expressed as: in, This is the average value. For the set number, To the maximum A set of indices for values; Scan each column of the image from left to right; if the average value is less than a threshold, delete that column; then scan from right to left; if the average value is less than a threshold, delete that column. The target vehicle image is stretched, and all pixels in the stretched image are clustered using a clustering method. Pixels in different clusters are mapped to different colors to obtain a pseudo-color image of the vehicle. Here is a list of pseudo-color boundary points, and the mapped colors are: in, The original grayscale value. Represents grayscale value Mapped color This represents the original grayscale value range. This corresponds to the pseudo-color range; The image stretching of the target vehicle image specifically involves: calculating an image stretching factor based on the vehicle speed, X-ray machine scanning speed, and the geometric relationship between the vehicle and the X-ray machine; multiplying the target vehicle image width by the image stretching factor to obtain the stretched image width; and then stretching the target vehicle image according to the stretched image width. The formula for calculating the image stretching factor is as follows: in, The stretching factor, Indicates the sampling frequency. For vehicle speed, This is a scaling factor.
2. The rapid inspection method for green channels based on X-ray imaging technology as described in claim 1, characterized in that, To obtain a pseudo-color image of a vehicle by mapping pixels from different classes to different colors, a piecewise function method is used to map the grayscale values of the stretched target vehicle image to the pseudo-color range.
3. A rapid inspection system for green channels based on X-ray imaging technology, employing the rapid inspection method for green channels based on X-ray imaging technology as described in any one of claims 1-2, characterized in that, include: The image acquisition module is configured to acquire X-ray imaging slice images of the current vehicle over a period of time, and stitch all slice images together to obtain the original X-ray imaging image. An image flipping module is configured to vertically flip the original X-ray image to obtain a forward-facing original X-ray image. The region removal module is configured to: remove the left and right black borders of the original forward X-ray imaging image using an image processing algorithm to obtain the original vehicle image; remove the upper blank area of the original vehicle image and remove its right white border using an image processing algorithm to obtain the target vehicle image; The image mapping module is configured to: stretch the target vehicle image, cluster all pixels in the stretched target vehicle image using a clustering method, and map pixels in different classes to different colors to obtain a pseudo-color image of the vehicle.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the green channel rapid inspection method based on X-ray imaging technology as described in any one of claims 1-2.
5. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the green channel rapid inspection method based on X-ray imaging technology as described in any one of claims 1-2.
Citation Information
Patent Citations
Radiation inspection system and method
CN106383132A