Green channel fast detection method and system based on X-ray imaging technology

Through the image processing method based on X-ray imaging technology, black and white edges are cut off, stretched and clustered to generate pseudo-color images, solving the problems of low detection efficiency and poor accuracy of Green Pass vehicle, and achieving efficient and accurate automated detection.

CN119991625AActive Publication Date: 2025-05-13SHANDONG HOUDE MEASUREMENT & CONTROL TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510101854.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-13
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

In the prior art, Green Pass vehicles have low detection efficiency, poor accuracy, and difficult to identify vehicles that have passed through the test. The manual detection method has a high working intensity and the low image quality of the X-ray radiation imaging method leads to insufficient inspection accuracy.

Method used

The Green Pass quick detection method based on X-ray imaging technology is adopted to remove black and white edges through an image processing algorithm, stretch and cluster images, generate pseudo-color images, improve image quality, and realize automated detection.

Benefits of technology

It improves the efficiency and accuracy of Green Pass vehicle inspection, can quickly identify illegal vehicles, retain evidence, and reduce manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991625A_ABST
    Figure CN119991625A_ABST
Patent Text Reader

Abstract

The invention discloses a green channel fast detection method and system based on an X-ray imaging technology, and belongs to the technical field of image processing, and the method comprises the steps: obtaining X-ray imaging slice images of a current vehicle in a period of time, and splicing all the slice images to obtain an X-ray imaging original image; vertically overturning the original X-ray imaging image to obtain a forward original X-ray imaging image; removing left and right black edges of the forward X-ray imaging original image through an image processing algorithm to obtain a vehicle original image; cutting off a blank area above the original vehicle image, and cutting off a right white edge through an image processing algorithm to obtain a target vehicle image; image stretching is carried out on the target vehicle image, all pixel points in the stretched target vehicle image are clustered through a clustering method, the pixel points in different classes are mapped to different colors, and a pseudo-color image of the vehicle is obtained. The highway traffic efficiency is improved, and the accuracy of green channel vehicle inspection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to a green-pass rapid detection method and system based on X-ray imaging technology. Background Art

[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.

[0003] Vehicles that transport fresh agricultural products are called "green pass vehicles". In order to facilitate the transportation of fresh agricultural products, the state exempts green pass vehicles from highway fees. According to relevant policy regulations, vehicles loaded with fresh agricultural products (vehicles that reach the rated load or load capacity of the vehicle are calculated as a whole vehicle) can use the green channel to pass through the toll station of the highway, and vehicles that meet the green channel requirements are exempt from tolls. However, it is difficult to identify green pass vehicles, and they often need to be unpacked for inspection, which has low inspection efficiency. There are also cases where some vehicles transport some green vegetables and try to pass through customs.

[0004] At present, the vast majority of green pass vehicles are inspected manually, which requires unpacking for inspection. The workload of the staff is high, and the slow inspection speed easily leads to road congestion. It is impossible to effectively identify vehicles that have slipped through the inspection, and it is difficult to retain evidence. There are also inspection methods that use green pass vehicle detectors to assist manual inspections, but there are still many defects in manual inspection methods. There are also inspection methods that use the principle of X-ray radiation imaging, but most of the existing X-ray radiation imaging inspection methods are directly based on the vehicle images generated by X-rays. The low quality of vehicle images leads to low inspection accuracy. Summary of the invention

[0005] In order to overcome the deficiencies of the above-mentioned prior art, the present invention provides a green pass rapid inspection method and system based on X-ray imaging technology, which improves the efficiency of high-speed passage, improves the efficiency and accuracy of green pass vehicle inspection, and can retain evidence.

[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 green pass rapid detection method based on X-ray imaging technology, comprising:

[0008] Obtain the X-ray imaging slice images of the current vehicle within a period of time, and combine all the slice images to obtain the original X-ray imaging image;

[0009] Vertically flipping the X-ray imaging original image to obtain a positive X-ray imaging original image;

[0010] The left and right black edges of the positive X-ray imaging original image are cut off by an image processing algorithm to obtain the original image of the vehicle; the upper blank area of ​​the original image of the vehicle is cut off, and the right white edge is cut off by 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 by a clustering method, and pixels in different classes are mapped to different colors to obtain a pseudo-color image of the vehicle.

[0012] According to a further technical solution, the image processing algorithm adopts an adaptive threshold method.

[0013] A further technical solution is to obtain the original image of the vehicle as follows:

[0014] Count the maximum value of all pixel values ​​in the forward X-ray imaging original image, and then multiply the maximum value by a factor as the threshold;

[0015] Calculate the average value of the largest set number of values ​​in each column of the original image of the forward X-ray imaging;

[0016] Scan each column of the image from left to right, and if the average value is less than the threshold, delete this column; then scan from right to left, and if the average value is less than the threshold, delete this column.

[0017] In a further technical solution, the formula of the threshold is expressed as:

[0018]

[0019] Among them, θ is the threshold, α is the empirical value, I i,j is the pixel value of the image in the i-th row and j-th column;

[0020] The formula for the average value is:

[0021]

[0022] Among them, v j is the average value, m is the set number, and M is the index set of the maximum m values.

[0023] A further technical solution is to stretch the target vehicle image by calculating an image stretching factor based on the vehicle speed, the scanning speed of the X-ray machine, 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 stretching the target vehicle image according to the image width.

[0024] In a further technical solution, the calculation formula of the image stretching factor is:

[0025]

[0026] Where λ is the stretch factor, v s represents the sampling frequency, v c is the vehicle speed, λ p is the scale factor.

[0027] A further technical solution is to map pixels in different classes to different colors to obtain a pseudo-color image of the vehicle. Specifically, the grayscale value of the stretched target vehicle image is mapped using a piecewise function method, and the original grayscale value is mapped to a pseudo-color range.

[0028] In a second aspect, the present invention provides a green pass rapid inspection system based on X-ray imaging technology, comprising:

[0029] An image acquisition module is configured to: acquire X-ray imaging slice images of the current vehicle within a period of time, and combine all the slice images to obtain an X-ray imaging original image;

[0030] An image flipping module is configured to: vertically flip the X-ray imaging original image to obtain a positive X-ray imaging original image;

[0031] The area cutting module is configured to: cut off the left and right black edges of the positive X-ray imaging original image through an image processing algorithm to obtain the original image of the vehicle; cut off the upper blank area of ​​the original image of the vehicle, and cut off the right white edge thereof through 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 by a clustering method, map pixels in different classes to different colors, and obtain a pseudo-color image of the vehicle.

[0033] In a third aspect, 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 a green pass rapid inspection method based on X-ray imaging technology as described in the first aspect.

[0034] In a fourth aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of a green pass rapid inspection method based on X-ray imaging technology as described in the first aspect are implemented.

[0035] One or more of the above technical solutions have the following beneficial effects:

[0036] The present invention processes vehicle images generated by X-ray imaging technology. First, all cross-sectional images are spliced ​​and flipped vertically. Then, the left and right black edges are cut off by an adaptive threshold algorithm. Then, the upper blank area is cut off, and the right white edge is cut off by an adaptive threshold algorithm. The image stretching factor is calculated according to the speed, geometric relationship and scanning speed, and the image is stretched. Finally, the image is pseudo-colored by using the K-means clustering algorithm plus a segmented mapping function to obtain a clear color image of the vehicle, that is, a high-quality vehicle image. The staff can accurately check the internal items of the vehicle based on the high-quality vehicle image, and quickly determine whether it is a green pass vehicle, which improves the accuracy of the green pass vehicle inspection, and can effectively avoid the situation where the vehicle passes through the customs, and can also retain evidence.

[0037] The present invention automatically generates vehicle interior images through X-ray imaging equipment, eliminating the need for manual unpacking inspection of the vehicle. Staff can make judgments based on the processed high-quality vehicle images, thereby improving the inspection speed and accuracy of green pass vehicles. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0039] Figure 1 is a flow chart of a green pass quick detection method according to an embodiment of the present invention;

[0040] Figure 2 is an example diagram of an inverted X-ray imaging original image in an embodiment of the present invention;

[0041] Figure 3 is an example diagram of an original image of forward X-ray imaging in an embodiment of the present invention;

[0042] Figure 4 is an example diagram of an original image of a vehicle in an embodiment of the present invention;

[0043] Figure 5 is an example image of an original image of a vehicle after the upper blank area is cut off in an embodiment of the present invention;

[0044] Figure 6 is an example diagram of a target vehicle image in an embodiment of the present invention;

[0045] Figure 7 is an example diagram of a stretched target vehicle image in an embodiment of the present invention;

[0046] Figure 8 is an example of a pseudo-color image of a vehicle in an embodiment of the present invention;

[0047] Fig. 9It is an actual deployment diagram of the green pass quick inspection system in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0049] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0050] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0051] Embodiment 1

[0052] like Figure 1 As shown, this embodiment discloses a green pass fast detection method based on X-ray imaging technology, which includes the following steps:

[0053] S1: Obtain X-ray imaging slice images of the current vehicle within a period of time, and combine all the slice images to obtain the original X-ray imaging image;

[0054] In this embodiment, if Fig. 9 As shown, an X-ray transmitter and an X-ray receiver are respectively arranged on both sides of the road. A vehicle passes between the transmitter and the receiver at a constant speed, and the X-ray receiver obtains a slice image of the cross section of the vehicle within a period of time, and the slice images of all the cross sections of the vehicle are spliced ​​to obtain the original X-ray imaging image.

[0055] It should be noted that in order to reduce the image loss caused by the delay of opening and closing, 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. In this way, when the vehicle passes, the receiver can receive the image of the entire cross section when the vehicle passes, but it will cause black edges on both sides.

[0056] It should be noted that this method can detect the gap between the front of the vehicle and the car body through the distance measuring sensor to accurately prevent the front of the vehicle (driver's cab) from being exposed to X-rays; for vehicles without a gap between the front of the vehicle and the car body, a preset fixed front length value is used to avoid the front of the vehicle, and the fixed front length value can ensure that the driver's cab of such vehicles is not exposed to X-rays. The above method prevents X-rays from having adverse effects on the driver.

[0057] S2: vertically flipping the X-ray imaging original image to obtain a positive X-ray imaging original image;

[0058] In this embodiment, if Figure 2 , Figure 3 As shown, the image taken by the currently used X-ray receiver device is an inverted image, and the image needs to be vertically flipped to obtain a positive image.

[0059] S3: Cutting off the left and right black edges of the positive X-ray imaging original image by an image processing algorithm to obtain the vehicle original image; cutting off the upper blank area of ​​the vehicle original image, and cutting off the right white edge thereof by an image processing algorithm to obtain the target vehicle image;

[0060] In this embodiment, if Figure 3 , Figure 4 As shown, the black areas (black edges) on the left and right sides of the original image are removed using an image processing algorithm, namely the adaptive threshold method. The specific steps are:

[0061] First, the maximum value of all pixel values ​​in the original image of the forward X-ray imaging is counted, and then the maximum value is multiplied by a factor α as the first threshold θ, where α is an empirical value. The formula is expressed as:

[0062]

[0063] Among them, I i,j is the pixel value of the image in the i-th row and j-th column.

[0064] Calculate the average value v of the largest m values ​​in each column of the image j , the maximum m value is used to avoid the influence of noise points on the algorithm. The formula is expressed as:

[0065]

[0066] Among them, 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 v is less than θ, delete this column. Then scan from right to left. j If it is less than θ, delete this column.

[0068] In this embodiment, if Figure 4 , Figure 5 As shown, the blank area above the original image of the vehicle is cut off. Specifically, the average value p of all pixel values ​​of each row of elements is calculated. i , if p i If it is greater than the second threshold τ, then delete this row. The formula is:

[0069]

[0070] Among them, β is an empirical value, and n represents the number of columns, that is, the width of the image.

[0071] like Figure 5 , Figure 6 As shown, in order to avoid missing graphics at the rear of the vehicle, the X-ray transmitter is turned off with a delay, which will result in a white edge on the right. The image processing algorithm, i.e., the adaptive threshold method, is used to cut off the white area (white edge) on the right. The specific steps are:

[0072] First, count the maximum value of all pixel values, use τ as the threshold, and scan from right to left. If the average value of the jth column ω j If it is less than τ, delete this column. Average value ω j The formula is:

[0073]

[0074] S4: stretching the target vehicle image, clustering all pixels in the stretched target vehicle image by a clustering method, mapping pixels in different classes to different colors, and obtaining a pseudo-color image of the vehicle.

[0075] In this embodiment, if Figure 6 , Figure 7 As shown in the figure, because the speed of the vehicle passing through the X-ray is inconsistent, the image width is different when the same vehicle passes through the X-ray. In order to correct the different image widths caused by different vehicle speeds, the image needs to be stretched. The speed sensor in the system can be used to know the speed v of the vehicle. c , and the scanning speed of the X-ray machine is known to be f frames / second, according to the geometric relationship between the vehicle and the transmitter and receiver, we can get λ p , then the image stretch factor λ is:

[0076]

[0077] Among them, v s represents the sampling frequency of the X-ray receiver, v c represents the vehicle speed, λ p Represents the scaling factor based on the geometric relationship between the vehicle and the transmitter and receiver.

[0078] The width of the stretched image can be obtained by multiplying the existing image width by λ, and the image is stretched to this width.

[0079] All pixels in the stretched target vehicle image are clustered by a clustering method, namely, a K-means clustering method, and 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, the grayscale value of the stretched target vehicle image is mapped using a piecewise function method, and the original grayscale value is mapped to the pseudo color range. Let C = (c1, c2, ..., c n ) is a list of pseudo-color demarcation points, and the mapped colors are:

[0081]

[0082] Among them, t is the original gray value, c(t) represents the color after the gray value t is mapped, [t i ,t i+1 ] is the original grayscale value range, [c i ,c i+1 ] is the corresponding pseudo color range.

[0083] Depending on the setting of C, different effects can be obtained, such as Figure 8 The pseudo-color image shown. The staff can directly determine whether the vehicle is a green pass vehicle based on the proportion of agricultural products in the processed pseudo-color image, thereby improving the efficiency and accuracy of green pass vehicle judgment.

[0084] like Figure 2-Figure 8 As shown, the present invention uses a vehicle with cabbage in the compartment as an example, and the irregular shaded portion of the figure is the area occupied by agricultural products. Figure 8 Through the pseudo-color image, the staff can visually observe the area occupied by agricultural products in the carriage (the shadow area with irregular edges) to determine whether the vehicle is a green pass vehicle.

[0085] Therefore, the green pass quick inspection method of the present invention first combines all cross-sectional images, flips them vertically, and then cuts off the left and right black edges through an adaptive threshold algorithm, then cuts off the upper blank area, and cuts off the right white edge through an adaptive threshold algorithm. The image stretching factor is calculated based on the speed, geometric relationship and scanning speed, and the image is stretched. Finally, the image is processed with pseudo-color by the K-means clustering algorithm plus the segmented mapping function to obtain a clear, high-quality image of the vehicle interior, which is convenient for judging whether the vehicle is a green pass vehicle.

[0086] Embodiment 2

[0087] This embodiment discloses a green pass rapid inspection system based on X-ray imaging technology, including:

[0088] An image acquisition module is configured to: acquire X-ray imaging slice images of the current vehicle within a period of time, and combine all the slice images to obtain an X-ray imaging original image;

[0089] An image flipping module is configured to: vertically flip the X-ray imaging original image to obtain a positive X-ray imaging original image;

[0090] The area cutting module is configured to: cut off the left and right black edges of the positive X-ray imaging original image through an image processing algorithm to obtain the original image of the vehicle; cut off the upper blank area of ​​the original image of the vehicle, and cut off the right white edge thereof through 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 by a clustering method, map pixels in different classes to different colors, and obtain a pseudo-color image of the vehicle.

[0092] Embodiment 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 implements the steps of the method of embodiment 1 when executing the program.

[0094] Embodiment 4

[0095] The purpose of this embodiment is to provide a computer-readable storage medium, a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method of embodiment 1 are performed.

[0096] The steps involved in the apparatus of the above embodiments 3 and 4 correspond to the method embodiment 1, and the specific implementation method can refer to the relevant description part 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 to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0097] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0099] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it 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 on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A green pass rapid inspection method based on X-ray imaging technology, characterized in that: include: Obtain X-ray imaging slice images of the current vehicle within a period of time, and combine all the slice images to obtain the original X-ray imaging image; Vertically flipping the X-ray imaging original image to obtain a positive X-ray imaging original image; The left and right black edges of the positive X-ray imaging original image are cut off by an image processing algorithm to obtain the original image of the vehicle; the upper blank area of ​​the original image of the vehicle is cut off, and the right white edge is cut off by an image processing algorithm to obtain the target vehicle image; The target vehicle image is stretched, and all pixels in the stretched target vehicle image are clustered by a clustering method, and pixels in different classes are mapped to different colors to obtain a pseudo-color image of the vehicle.

2. A green pass rapid inspection method based on X-ray imaging technology as claimed in claim 1, characterized in that: The image processing algorithm adopts an adaptive threshold method.

3. A green pass rapid inspection method based on X-ray imaging technology as claimed in claim 2, characterized in that: The original image of the vehicle is obtained as follows: Count the maximum value of all pixel values ​​in the positive X-ray imaging original image, and then multiply the maximum value by a factor as the threshold; Calculate the average value of the largest set number of values ​​in each column of the original image of the forward X-ray imaging; Scan each column of the image from left to right, and if the average value is less than the threshold, delete this column; then scan from right to left, and if the average value is less than the threshold, delete this column.

4. A green pass rapid inspection method based on X-ray imaging technology as claimed in claim 2, characterized in that: The threshold value is expressed as: Among them, θ is the threshold, α is the empirical value, I i,j is the pixel value of the image in the i-th row and j-th column; The formula for the average value is: Among them, v j is the average value, m is the set number, and M is the index set of the maximum m values.

5. The green pass rapid inspection method based on X-ray imaging technology as claimed in claim 1, characterized in that: The image stretching of the target vehicle image is specifically performed as follows: an image stretching factor is calculated according to the vehicle speed, the scanning speed of the X-ray machine, and the geometric relationship between the vehicle and the X-ray machine, the width of the target vehicle image is multiplied by the image stretching factor to obtain the stretched image width, and the target vehicle image is stretched according to the image width.

6. A green pass rapid inspection method based on X-ray imaging technology as claimed in claim 5, characterized in that: The calculation formula of the image stretching factor is: Where λ is the stretch factor, v s represents the sampling frequency, v c is the vehicle speed, λ p is the scale factor.

7. The green pass rapid inspection method based on X-ray imaging technology as claimed in claim 1, characterized in that: Pixels in different classes are mapped to different colors to obtain a pseudo-color image of the vehicle. Specifically, the grayscale value of the stretched target vehicle image is mapped using a piecewise function method, and the original grayscale value is mapped to a pseudo-color range.

8. A green pass rapid inspection system based on X-ray imaging technology, characterized in that: include: An image acquisition module is configured to: acquire X-ray imaging slice images of the current vehicle within a period of time, and combine all the slice images to obtain an X-ray imaging original image; An image flipping module is configured to: vertically flip the X-ray imaging original image to obtain a positive X-ray imaging original image; The area cutting module is configured to: cut off the left and right black edges of the positive X-ray imaging original image through an image processing algorithm to obtain a vehicle original image; cut off the upper blank area of ​​the vehicle original image, and cut off the right white edge thereof through an image processing algorithm to obtain a target vehicle image; The image mapping module is configured to: stretch the target vehicle image, cluster all pixels in the stretched target vehicle image by a clustering method, map pixels in different classes to different colors, and obtain a pseudo-color image of the vehicle.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a green pass rapid inspection method based on X-ray imaging technology as described in any one of claims 1 to 7 are implemented.

10. 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, the steps in the green pass quick detection method based on X-ray imaging technology as described in any one of claims 1-7 are implemented.

Citation Information

Patent Citations

  • Radiation inspection system and method

    CN106383132A

  • Electronic component quality detection system

    CN109870461A

  • License plate recognition method in hazy weather

    CN110443166A

  • Vehicle inspection method and system

    WO2016034022A1