Effectiveness judgment method and system based on security check image
By pre-processing, graying, denoising and invalid pixel removal of security images, and combining with the effectiveness discrimination algorithm, the problem of inaccurate evaluation of security images in the prior art is solved, and the accuracy of image quality and effectiveness is achieved Assess and improve.
Patent Information
- Application Number
- CN202411506952.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art cannot accurately evaluate the quality and effectiveness of security images, and it is difficult to effectively deal with noise, interference lines and blur problems in the images.
Through image preprocessing, grayscale processing, denoising processing and invalid pixel removal, combined with the effectiveness discrimination algorithm, feature information in the image is extracted to accurately evaluate the quality and effectiveness of the image.
Accurate evaluation of the quality and effectiveness of security images is achieved, the clarity and quality of the image are improved, and noise and invalid pixels are effectively removed.
Smart Images

Figure CN119477831A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to image processing technology, and in particular to a method and system for determining the validity of security inspection images. Background Art
[0002] X-ray baggage inspection devices are used in baggage inspection at airports or large-scale event venues. X-ray baggage inspection devices usually generate grayscale images representing the amount of X-ray transmission or color images colored for each material based on the material determined. Image determination usually refers to processing an image to remove or reduce noise, interference lines, blur, and other problems in the image, thereby improving the quality and clarity of the image. Traditional image processing methods include filtering, noise reduction, sharpening, and other technologies.
[0003] For example, the prior art CN202010065461.2 cannot properly handle the quality and effectiveness of the evaluation image. Summary of the invention
[0004] The present invention aims at the problem that the quality and validity of images cannot be accurately evaluated in the prior art, and provides a method and system for determining the validity of security inspection images.
[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions:
[0006] A method for determining validity based on security inspection images, the method comprising:
[0007] Image preprocessing: loading security inspection images and preprocessing the loaded images;
[0008] Grayscale processing of the image, grayscale processing is performed on the pre-processed security inspection image to obtain a grayscale image;
[0009] Image denoising: denoising the grayscale image to obtain a denoised image;
[0010] Removal of invalid pixels from the image: Remove invalid pixels from the denoised image using a validity judgment algorithm.
[0011] Preferably, the image preprocessing includes:
[0012] Convert the loaded image into an image matrix;
[0013] Get pixel information of image matrix.
[0014] Preferably, the grayscale processing of the image includes:
[0015] Get RGB image information, get original color image data from files or other sources, and convert color images from RGB color space to grayscale color space;
[0016] Calculate the pixel grayscale, and calculate the grayscale value of each pixel according to the selected color space conversion method;
[0017] Grayscale image assignment: Map the calculated grayscale value to the corresponding grayscale level and assign the grayscale value to each pixel in the image.
[0018] As a preferred method: the validity determination algorithm includes
[0019] The size of the discrimination image window is selected based on the security inspection image;
[0020] Calculate the local variance of the discriminant image, traverse each pixel of the discriminant image window, and calculate the local variance of the discriminant image;
[0021] The noise pixel is judged based on the local variance of the judged image;
[0022] The marking of noise pixels is to mark the pixels determined to be noise pixels as noise pixels.
[0023] As a preferred method: calculating the local variance of the discriminant image, obtaining the image window area, extracting the window area (m, n) centered at the pixel (x, y), determining the size (m, n) of the local area and the center pixel coordinates (x, y);
[0024] Calculate the average gray value μ of the local area;
[0025] According to the average gray value, the local variance σ is obtained 2
[0026]
[0027] Among them, n is the average gray value of the local area, mn is the total number of pixels in the local area, I(i,j) is each pixel value, (i,j) is the pixel coordinate, and (x,y) is the center pixel coordinate.
[0028] In order to solve the above technical problems, the present invention also provides a validity determination system based on security inspection images, which:
[0029] The image preprocessing module loads the security inspection image and preprocesses the loaded image;
[0030] The image grayscale processing module performs grayscale processing on the pre-processed security inspection image to obtain a grayscale image;
[0031] The image denoising module denoises the grayscale image to obtain a denoised image;
[0032] The module for removing invalid pixels from the image is used to remove invalid pixels from the denoised image using a validity judgment algorithm.
[0033] The present invention has significant technical effects due to the adoption of the above technical solution:
[0034] The present invention can accurately evaluate the quality and effectiveness of an image by extracting feature information from the image and combining it with an effectiveness determination algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a flow chart of the present invention;
[0036] Figure 2 It is a grayscale processing flow chart of the present invention;
[0037] Figure 3 This is a flow chart of the effectiveness determination algorithm of the present invention;
[0038] Figure 4 A grayscale image of the present invention;
[0039] Figure 5 The image after the effectiveness of the present invention is determined;
[0040] Figure 6-1 It is the invalid image 1 of the present invention; Figure 6-2 This is the invalid image 2 of the present invention;
[0041] Figure 6-3 It is the invalid image 3 of the present invention; Figure 6-4 This is the invalid image 4 of the present invention;
[0042] Figure 7-1 is the effective image 1 of the present invention; Figure 7-2 is the effective image 2 of the present invention;
[0043] Figure 7-3 This is the effective image three of the present invention. DETAILED DESCRIPTION
[0044] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0045] Example 1
[0046] A validity determination method based on security inspection images. Figure 1 The methods include:
[0047] Image preprocessing: loading security inspection images and preprocessing the loaded images;
[0048] Grayscale processing of the image, grayscale processing is performed on the pre-processed security inspection image to obtain a grayscale image;
[0049] Image denoising: denoising the grayscale image to obtain a denoised image;
[0050] Removal of invalid pixels from the image: Remove invalid pixels from the denoised image using a validity judgment algorithm.
[0051] Image preprocessing includes:
[0052] Convert the loaded image into an image matrix;
[0053] Get pixel information of image matrix.
[0054] Figure 2 The grayscale processing of the image includes:
[0055] Get RGB image information, get original color image data from files or other sources, and convert color images from RGB color space to grayscale color space;
[0056] Calculate the pixel grayscale, and calculate the grayscale value of each pixel according to the selected color space conversion method;
[0057] Grayscale image assignment: Map the calculated grayscale value to the corresponding grayscale level and assign the grayscale value to each pixel in the image. Figure 4 Grayscale image of .
[0058] Figure 3 The validity judgment algorithm includes
[0059] Window division is performed based on the characteristics of the image and the complexity of the image content. If the image content is relatively simple, the object boundaries are clear, and there are few textures, then a smaller window can be selected. If the image content is complex, with rich textures, details, and complex color changes, a larger window may be required to capture more local information.
[0060] The size of the discriminant image window is selected based on the security inspection image; the window area centered on the current pixel is extracted
[0061] At present, because we use every four columns to output the image, we usually choose a 3×3 size for window selection.
[0062] Calculate the local variance of the discriminant image, traverse each pixel of the discriminant image window, and calculate the local variance of the discriminant image;
[0063] The noise pixel is judged based on the local variance of the discriminant image; when the local variance exceeds the set threshold, it is a noise pixel, otherwise it is a valid pixel
[0064] The marking of noise pixels is to mark the pixels determined to be noise pixels as noise pixels.
[0065] Calculate the local variance of the discriminant image, obtain the image window area, and extract the pixel ( x,y ) Centered window area ( m,n ) , determine the size (m,n) of the local area and the center pixel coordinates (x,y);
[0066] Calculate the average gray value μ of the local area;
[0067] According to the average gray value, the local variance σ is obtained 2
[0068]
[0069] Among them, μ is the average gray value of the local area, mn is the total number of pixels in the local area, I(i,j) is each pixel value, (i,j) is the pixel coordinate, and (x,y) is the center pixel coordinate.
[0070] In the process of judging the validity of an image, Figures 6-1 to 6-4 is an invalid image. Figures 7-1 to 7-3 is a valid image.
[0071] Save the processed image to file or memory.
[0072] Example 2
[0073] Based on Example 1, this example is a validity determination system based on security inspection images, which:
[0074] The image preprocessing module loads the security inspection image and preprocesses the loaded image;
[0075] The image grayscale processing module performs grayscale processing on the pre-processed security inspection image to obtain a grayscale image;
[0076] The image denoising module denoises the grayscale image to obtain a denoised image;
[0077] The module for removing invalid pixels from the image is used to remove invalid pixels from the denoised image using a validity judgment algorithm.
Claims
1. A method for determining the validity of a security inspection image, the method comprising: Image preprocessing: loading security inspection images and preprocessing the loaded images; Grayscale processing of the image, grayscale processing is performed on the pre-processed security inspection image to obtain a grayscale image; Image denoising: denoising the grayscale image to obtain a denoised image; Removal of invalid pixels from the image: Remove invalid pixels from the denoised image using a validity judgment algorithm.
2. The method for determining validity based on security inspection images according to claim 1, characterized in that: Image preprocessing includes: Convert the loaded image into an image matrix; Get pixel information of image matrix.
3. The method for determining validity based on security inspection images according to claim 1, characterized in that: The grayscale processing of the image includes: Get RGB image information, get original color image data from files or other sources, and convert color images from RGB color space to grayscale color space; Calculate the pixel grayscale, and calculate the grayscale value of each pixel according to the selected color space conversion method; Grayscale image assignment: Map the calculated grayscale value to the corresponding grayscale level and assign the grayscale value to each pixel in the image.
4. The method for determining validity based on security inspection images according to claim 1, characterized in that: The validity judgment algorithm includes The size of the discrimination image window is selected based on the security inspection image; Calculate the local variance of the discriminant image, traverse each pixel of the discriminant image window, and calculate the local variance of the discriminant image; The noise pixel is judged based on the local variance of the judged image; The marking of noise pixels is to mark the pixels determined to be noise pixels as noise pixels.
5. The method for determining validity based on security inspection images according to claim 1, characterized in that: Calculate the local variance of the discriminant image, obtain the image window area, and extract the pixel ( X,Y ) Centered window area ( M,n ) , determine the size (m,n) of the local area and the center pixel coordinates (x,y); Calculate the average gray value μ of the local area; According to the average gray value, the local variance σ is obtained 2 Among them, n is the average gray value of the local area, mn is the total number of pixels in the local area, I(i,j) is each pixel value, (i,j) is the pixel coordinate, and (x,y) is the center pixel coordinate.
6. A validity determination system based on security inspection images, characterized in that: The image preprocessing module loads the security inspection image and preprocesses the loaded image; The image grayscale processing module performs grayscale processing on the pre-processed security inspection image to obtain a grayscale image; The image denoising module denoises the grayscale image to obtain a denoised image; The module for removing invalid pixels from the image is used to remove invalid pixels from the denoised image using a validity judgment algorithm.
Citation Information
Patent Citations
Method and device for detecting image validity
CN111325712B