Method for Removing Vertical Strip Interference of Line Scan Camera Based on Band-Pass Filtering and Gray Compensation

The vertical stripe interference in the linear array camera image is removed by bandpass filtering and grayscale compensation, which solves the problem of vertical stripe interference affecting the image grayscale distribution, and realizes efficient defect detection and image grayscale feature retention, which is suitable for line scanning camera systems.

CN120198325BActive Publication Date: 2025-08-05FREESENSE IMAGE TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510688414.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-08-05
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

When removing vertical stripe interference in line array camera images, it is difficult to effectively remove interference while retaining the original grayscale distribution characteristics of the image, affecting the accuracy of defect detection.

Method used

Using a method based on bandpass filtering and grayscale compensation, vertical stripe interference is removed through bandpass filtering, and the grayscale distribution characteristics of the original image are retained through grayscale compensation, including screen area extraction, bandpass filtering, background grayscale feature extraction and grayscale compensation steps.

Benefits of technology

The vertical stripe interference is significantly removed, the accuracy and reliability of defect detection is improved, and the grayscale distribution characteristics of the image are retained. The grayscale fidelity reaches more than 85%, the calculation efficiency is high, and the adaptability is strong, and different types of vertical stripe interference can be effectively handled.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198325B_ABST
    Figure CN120198325B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for removing vertical stripe interference of a line scan camera based on band-pass filtering and gray-scale compensation, which includes the following steps: extracting the screen area to be processed through image preprocessing techniques; applying band-pass filtering to the extracted screen area to remove vertical stripe interference and obtain an image; applying filtering processing to the screen area to obtain a background gray-scale feature set; performing gray-scale compensation on the image based on the column average gray-scale difference of the image sum; generating a result image that removes vertical stripes and retains the original gray-scale distribution characteristics. This algorithm effectively removes vertical stripe interference through band-pass filtering technology, and retains the gray-scale distribution characteristics of the original image through a gray-scale compensation mechanism; effectively identifies and removes vertical stripe interference in the image; retains the original gray-scale distribution characteristics and texture information of the image; and improves the accuracy and reliability of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to a method for removing vertical stripe interference in line scan camera images. Background Art

[0002] Due to its characteristics of high resolution and high-speed acquisition, line array cameras are widely used in the field of industrial vision inspection, especially playing an important role in fields such as flat panel display defect detection. A line array camera is a one-dimensional optoelectronic sensor array that completes two-dimensional image acquisition through relative motion. It has a simple structure, a fast acquisition speed, and a high resolution. However, vertical stripe interference problems often occur during the actual use of line array cameras. This interference is mainly manifested as regular uneven brightness vertical stripes in the image, seriously affecting the image quality and the accuracy of subsequent defect detection. The main reasons for the generation of vertical stripe interference are as follows: 1. Inconsistent pixel sensitivity of the sensor: Due to manufacturing process errors, the sensitivity of each pixel element of the line array camera sensor varies, resulting in different gray values being output under the same illumination conditions; 2. Dust pollution of the optical system: Dust in the lens or optical path will block or scatter light at specific positions; 3. Sensor aging: As the usage time increases, the performance of some pixel elements deteriorates, and the response characteristics change; 4. Vibration in the working environment: In an industrial environment, equipment vibration may cause slight changes in the optical path, forming regular interference; 5. Electrical noise: The noise in the circuit system may be reflected in the image in the form of vertical stripes.

[0003] The existing methods for removing vertical stripes mainly include the following: Hardware correction method: By adjusting camera parameters or adding hardware filtering devices, but this method usually has a high cost and is difficult to completely eliminate interference; Mean filtering method: Calculate the average value of each column of the image and then perform mean correction on the image, but this method will change the overall gray distribution of the image; and by using Fourier transform to convert the image to the frequency domain and suppressing interference at the corresponding frequency, but it is easy to cause loss of image details; Morphological processing method: Using mathematical morphological operations to remove stripes, but it has insufficient adaptability to stripes of different widths and intensities. The common problem is that while removing vertical stripe interference, it will change the gray distribution characteristics of the original image, resulting in loss of image information and affecting the subsequent defect detection effect. Especially in screen detection, the gray characteristics of tiny defects are the key discrimination basis, and it is crucial to maintain the original gray characteristics. Therefore, an algorithm method that can effectively remove vertical stripe interference while retaining the original gray distribution characteristics of the image is needed. Summary of the Invention

[0004] In view of the deficiencies of the prior art, the present invention provides a method for removing vertical stripe interference in a line scan camera based on band-pass filtering and gray-scale compensation. The method aims to solve the problem of vertical stripe interference generated during the screen defect detection process of a line array camera, and provides an algorithm that can effectively remove vertical stripe interference while maximizing the retention of the gray-scale distribution characteristics of the original image, thereby improving the accuracy and reliability of defect detection.

[0005] The present invention proposes a method for removing vertical stripe interference in a line scan camera based on band-pass filtering and gray-scale compensation. This algorithm effectively removes vertical stripe interference through band-pass filtering technology and retains the gray-scale distribution characteristics of the original image through a gray-scale compensation mechanism; effectively identifies and removes vertical stripe interference in the image; retains the original gray-scale distribution characteristics and texture information of the image; improves the accuracy and reliability of defect detection; and provides an algorithm solution with strong applicability and high computational efficiency.

[0006] The specific process is as follows: The method for removing vertical stripe interference in a line scan camera based on band-pass filtering and gray-scale compensation includes the following steps: Step S1: Screen area extraction: Extract the screen area to be processed through image preprocessing technology;

[0007] Step S2: Band-pass filtering: Apply band-pass filtering to the extracted screen area to remove vertical stripe interference and obtain an image ;

[0008] Step S3: Background gray-scale feature extraction: Apply filtering processing to the screen area to obtain a background gray-scale feature set ;

[0009] Step S4: Gray-scale compensation: Based on the column average gray-scale difference between the image and the feature set , perform gray-scale compensation on the image ;

[0010] Step S5: Output result: Generate a result image with vertical stripes removed and the original gray-scale distribution characteristics retained.

[0011] As a further solution of the present invention, Step S1 specifically includes: Let the original image be , where represents the horizontal coordinate of the image, represents the vertical coordinate of the image, and the image size is ; Define a screen area extraction function , and the extraction result is ; = ; The specific implementation process of the screen area extraction function is as follows:

[0012] Apply threshold segmentation: , where is an adaptively determined threshold; apply morphological operations to extract connected regions: = ( , )), where is a morphological closing operation, is a structuring element; extract the largest connected region as ; = ( ) .

[0013] As a further solution of the present invention, the specific process of step S2 is: convert to the frequency domain and apply a band-pass filter for processing: = ; = ; = where represents a two-dimensional Fourier transform, represents a two-dimensional inverse Fourier transform, is the image after band-pass filtering;

[0014] where the band-pass filter is defined as:

[0015] , where represents the frequency in the horizontal direction, represents the frequency in the vertical direction, and are the low cut-off frequency and the high cut-off frequency respectively, = ( + ) is the center frequency, = - is the bandwidth.

[0016] As a further solution of the present invention, the specific process of step S3 is: apply filtering processing to to obtain the background gray-scale feature: = ( ); where the filtering function is selected from any of the following:

[0017] Median filtering: = ;

[0018] Mean filtering: = = = ;

[0019] Gaussian filtering: = = = ,

[0020] where, is the Gaussian kernel function: ; and represent pixel coordinates, and represent relative coordinate offsets; the size of the filtering kernel and the Gaussian standard deviation σ are selected according to the scale characteristics of the vertical stripes.

[0021] As a further solution of the present invention, the specific process of step S4 is: for each column of the image , calculate and the average gray value in this column: = ; = , where, represents the column index of the image, represents the row index of the pixel, represents the height of the image;

[0022] Calculate the gray difference of each column: Δ = - ;

[0023] Perform grayscale compensation on the image to obtain the result image : = + Δ ;

[0024] To avoid grayscale value overflow, constraints are imposed during actual implementation: = + Δ .

[0025] As a further solution of the present invention, the process of screen area extraction is as follows: Input the original image , extract the screen area through threshold segmentation and morphological operations. The specific steps are as follows: Convert the original image to a grayscale image; Use the adaptive threshold method to determine the threshold ; Perform binarization on the image to obtain the binary image ; Apply morphological closing operation to the binary image, using a rectangular structuring element; Mark the connected regions and extract the largest connected region as the mask; Apply the mask to the original image to obtain the extracted screen area .

[0026] As a further solution of the present invention, the process of removing vertical stripes by band-pass filtering is as follows: Apply band-pass filtering to the extracted screen area to remove vertical stripe interference: The specific process is as follows: Apply two-dimensional fast Fourier transform (FFT) to to obtain the frequency-domain image ; Construct a band-pass filter , with parameter settings: = 0.1, = 0.4 (normalized frequency); Apply the band-pass filter to the frequency-domain image: = ; Apply two-dimensional fast Fourier inverse transform (IFFT) to the filtered frequency-domain image to obtain the spatial-domain image .

[0027] As a further solution of the present invention, the process of extracting the background grayscale feature is as follows: For the screen area Apply filtering processing to extract the background grayscale feature: The specific process is as follows: Use The Gaussian filter of is processed, and the standard deviation σ = 8; obtain the background grayscale feature image ;

[0028] The process of grayscale compensation is as follows: Based on the and column average grayscale difference of perform grayscale compensation on Specifically: Calculate the average grayscale value of each column of ; Calculate the average grayscale value of each column of ; Calculate the grayscale difference Δ of each column = - ; Perform column compensation on : = +Δ ; Constrain the grayscale value range within [0, 255]; Output the compensated image as the final result after removing vertical stripes.

[0029] As a further solution of the present invention, it also includes performing spectral analysis on the vertical projection of the original image and adaptively setting the parameters of the band-pass filter according to the analysis results.

[0030] As a further solution of the present invention, it also includes decomposing the screen area into multiple scales: = + +...+ where represents the low-frequency component, and to represent the detail components of different frequencies; Apply band-pass filtering to each scale respectively; Reconstruct the image and perform grayscale compensation.

[0031] The present invention has the following beneficial effects: the present invention realizes the effective removal of vertical stripe interference in line scan camera images through a method combining bandpass filtering and grayscale compensation, while retaining the grayscale distribution characteristics of the original image, and has the following technical effects: significant removal effect: compared with traditional morphological operation methods, the present invention can more effectively remove vertical stripe interference of different intensities and widths. Test results show that the vertical stripe interference suppression rate is improved by more than 20-30%; retain grayscale features: through the grayscale compensation mechanism, the present invention retains the grayscale distribution characteristics of the original image, and the grayscale fidelity reaches more than 85%, while traditional methods can usually only reach 40%-50%; improve defect detection accuracy: while retaining the grayscale characteristics of the image, the interference is removed, so that the accuracy of subsequent defect detection is improved by 15%-20%, especially the detection rate of low-contrast defects is significantly improved; high computational efficiency: the computational complexity of the algorithm of the present invention is , real-time processing can be achieved on modern industrial computing platforms to meet the needs of online detection; strong adaptability: the method of the present invention has good adaptability to different types of vertical stripe interference, and can be applied to various line scan camera systems through parameter adjustment.

[0032] In order to more clearly illustrate the structural features and effects of the present invention, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is the algorithm flow chart of the present invention;

[0034] Figure 2 This is an example of vertical stripe interference;

[0035] Figure 3 It is a schematic diagram of the frequency response of the bandpass filter;

[0036] Figure 4 Schematic diagram of grayscale compensation principle;

[0037] Figure 5 This is a comparison chart of algorithm processing effects;

[0038] Figure 6a 、 Figure 6b 2 is a comparison diagram of the effects of the method of the present invention and the traditional method. DETAILED DESCRIPTION

[0039] The present invention will be further described below with reference to the accompanying drawings and related knowledge, and described clearly and completely. Obviously, the described applications are only part of the embodiments of the present invention, rather than all of the embodiments.

[0040] Reference Figures 1 - 6b As shown, the present invention provides a method for removing vertical stripe interference of a line scan camera based on bandpass filtering and grayscale compensation, comprising the following steps:

[0041] Step S1: Screen area extraction: Extract the screen area to be processed through image preprocessing technology;

[0042] Specifically, let the original image be , where represents the horizontal coordinate of the image, represents the vertical coordinate of the image, and the image size is ;

[0043] Screen area extraction: Define the screen area extraction function , and the extraction result is :

[0044] = ;

[0045] The screen area extraction function can be implemented by the following method:

[0046] Apply threshold segmentation: ;

[0047] where is the threshold adaptively determined.

[0048] Apply morphological operations to extract connected regions:

[0049] = ( , );

[0050] where is the morphological closing operation, is the structuring element.

[0051] Extract the largest connected region as :

[0052] = ( ) .

[0053] Step S2: Band-pass filtering: Apply band-pass filtering to the extracted screen area to remove vertical stripe interference and obtain the image ;

[0054] Specifically, band-pass filtering removes vertical stripes, transforms to the frequency domain, and applies the band-pass filter for processing:

[0055] = ;

[0056] = ;

[0057] = ;

[0058] wherein represents two-dimensional Fourier transform, represents two-dimensional inverse Fourier transform, is the image after band-pass filtering;

[0059] Furthermore, the band-pass filter is defined as:

[0060] ;

[0061] wherein, represents the frequency in the horizontal direction, represents the frequency in the vertical direction, and are the low cut-off frequency and the high cut-off frequency respectively, =( + ) is the center frequency, = - is the bandwidth.

[0062] That is to say, the extracted screen area is transformed into the frequency domain, processed by applying a band-pass filter, and then transformed back to the spatial domain. Referring to Figure 6a shown, compared with the traditional morphological method, through the method of the present invention, the present invention can more effectively remove the interference of vertical stripes with different intensities and widths, and the test results show that the vertical stripe interference suppression rate is increased by more than 20 - 30%.

[0063] Step S3: Background gray-scale feature extraction: Apply filtering processing to the screen area to obtain a background gray-scale feature set ; Specifically, the background gray-scale feature extraction step uses Gaussian filtering, mean filtering or median filtering to extract background gray-scale features.

[0064] Furthermore, it specifically includes: Apply filtering processing to to obtain background gray-scale features:

[0065] = ( )

[0066] Filter function Any one of the following can be selected:

[0067] Median filtering:

[0068] = ; where and represent pixel coordinates, and represent the relative coordinate offset.

[0069] Mean filtering:

[0070] = = = ;

[0071] Gaussian filtering:

[0072] = = = ;

[0073] where is the Gaussian kernel function:

[0074] ;

[0075] Filter kernel size and the Gaussian standard deviation σ are selected according to the scale characteristics of the vertical stripes.

[0076] Step S4: Gray compensation: Based on the image and of the column average gray difference, perform gray compensation on the image ; specifically, the gray compensation steps include: calculating the average gray value of each column of the filtered image and the background feature image, calculating the difference, and adding the corresponding difference to each column pixel of the filtered image;

[0077] Furthermore, specifically including: for each column of the image, calculate and The average gray value in the column:

[0078] = ;

[0079] = ;

[0080] in, represents the column index of the image, Indicates the height of the image.

[0081] Calculate the grayscale difference of each column:

[0082] Δ = - ;

[0083] For images Perform grayscale compensation to obtain the resulting image :

[0084] = +Δ ;

[0085] To avoid grayscale value overflow, the following constraints should be implemented in practice:

[0086] = +Δ .

[0087] Reference Figure 6a As shown in the figure, through the grayscale compensation mechanism, the present invention retains the grayscale distribution characteristics of the original image, and the grayscale fidelity reaches more than 85%, while the traditional frequency domain filtering method can usually only reach 40%-50%;

[0088] Step S5: Output result: Generate a result image with vertical stripes removed and original grayscale distribution characteristics retained.

[0089] In the present invention, to improve the robustness and efficiency of the algorithm, the following optimization measures can be introduced: Adaptive parameter selection: Automatically select the band-pass filter parameters according to the image characteristics; Multi-scale processing: Adopt a multi-scale filtering strategy for vertical stripes of different widths; Region adaptive processing: Use different processing parameters for different regions of the image; Parallel computing: Utilize GPU or multi-thread technology to accelerate the algorithm execution.

[0090] Through the method of combining band-pass filtering and gray-scale compensation, the present invention effectively removes the vertical stripe interference in the line-scan camera image, while retaining the gray-scale distribution characteristics of the original image, and has the following technical effects: Significant removal effect: Compared with the traditional morphological operation method, the present invention can more effectively remove the vertical stripe interference of different intensities and widths. The test results show that the vertical stripe interference suppression rate is increased by more than 20 - 30%; Retain gray-scale features: Through the gray-scale compensation mechanism, the present invention retains the gray-scale distribution characteristics of the original image, and the gray-scale fidelity reaches more than 85%, while the traditional method usually only reaches 40% - 50%; Improve the accuracy of defect detection: While removing interference while retaining the gray-scale features of the image, the accuracy of subsequent defect detection is increased by 15% - 20%, especially the detection rate of low-contrast defects is significantly improved; High computational efficiency: The computational complexity of the algorithm of the present invention is , and real-time processing can be achieved on modern industrial computing platforms to meet the requirements of online detection; Strong adaptability: The method of the present invention has good adaptability to different types of vertical stripe interference, and can be applied to various line-scan camera systems through parameter adjustment.

[0091] To more clearly illustrate the present invention, the following provides several sets of embodiments

[0092] Embodiment 1, referring to Figures 1 - 6a shown, a method for removing vertical stripe interference in a line-scan camera based on band-pass filtering and gray-scale compensation includes the following steps:

[0093] Step 1: Screen area extraction

[0094] Input the original image , and extract the screen area through threshold segmentation and morphological operations. The specific steps are as follows: Convert the original image to a grayscale image; Use the adaptive threshold method to determine the threshold ; Perform binary processing on the image to obtain a binary image ; Apply a morphological closing operation to the binary image, using a rectangular structuring element of ; Mark the connected regions, and extract the largest connected region as the mask; Apply the mask to the original image to obtain the extracted screen area

[0095] Step 2: Band-pass filtering to remove vertical stripes;

[0096] Specifically, for the extracted screen area Apply band-pass filtering to remove vertical stripe interference: For Apply two-dimensional fast Fourier transform (FFT) to obtain the frequency-domain image ; Construct a band-pass filter , with parameter settings: =0.1, =0.4 (normalized frequency); Apply the band-pass filter to the frequency-domain image: = ; Apply two-dimensional inverse fast Fourier transform (IFFT) to the filtered frequency-domain image to obtain the spatial-domain image .

[0097] Step 3: Extract background gray-level features;

[0098] Specifically, for the screen area Apply filtering to extract background gray-level features: Use a Gaussian filter with a standard deviation of σ = 8 to process , and obtain the background gray-level feature image .

[0099] Step 4: Gray-level compensation;

[0100] Specifically, based on the column average gray-level difference between the images and , perform gray-level compensation on : Calculate the average gray-level value of each column of ; Calculate the average gray-level value of each column of ;

[0101] Calculate the gray-level difference Δ = - ; Perform column compensation on : = +Δ ; Constrain the gray-level value range within [0, 255].

[0102] Refer to Figures 5 - 6a ​​As shown, step 5: result output

[0103] The compensated image The final result after removing vertical stripes is output.

[0104] The removal effect, grayscale fidelity and defect detection accuracy of the present invention are significantly higher than those of the traditional method.

[0105] Example 2, based on Example 1, introduces an adaptive parameter selection mechanism, and the specific steps are as follows:

[0106] For the original image Spectral analysis of the vertical projection: Calculate the average gray value of each column ; for sequence Perform one-dimensional FFT to get the spectrum ;analyze The peak value in the vertical stripes determines the main frequency component .

[0107] Adaptively set the bandpass filter parameters based on the analysis results:

[0108] ;

[0109] .

[0110] The subsequent steps are the same as those in Example 1.

[0111] Compared with Example 1, this preferred embodiment introduces an adaptive parameter selection mechanism to dynamically adjust the parameters of the bandpass filter according to the actual vertical stripe characteristics of the original image, thereby having the following technical advantages: Enhanced adaptability: Extracting the main frequency components of the vertical stripes through spectrum analysis , the filter parameters no longer rely on fixed empirical values, but are adjusted according to the characteristics of different images, which improves the versatility of the method. Improve filtering accuracy: The cutoff frequency of the bandpass filter and Determined by the dominant frequency of vertical stripes, the filter can more precisely suppress target stripes, minimizing the impact on background and other structures. Reduced false filtering or filtering: Adaptive adjustment avoids false filtering (inadequate stripe removal) or filtering (loss of image detail) that can occur with fixed parameter settings, improving processing stability. Improved image quality: By optimizing filtering parameters, the resulting image with vertical stripes removed retains valid information while reducing unnecessary artifacts, improving visual quality and facilitating subsequent detection or analysis tasks.

[0112] Example 3, based on Examples 1 and 2, introduces a multi-scale processing strategy, and the specific steps are as follows:

[0113] Decompose the screen area into multiple scales: = + +...+ , where represents the low-frequency component (background); to represent the detail components of different frequencies.

[0114] Apply band-pass filtering to each scale respectively: Apply low-pass filtering to to retain the background; Apply targeted band-pass filtering to to respectively to remove the vertical stripes of the corresponding scale.

[0115] Reconstruct the image and perform gray-level compensation: Recombine the processed images of each scale; Perform gray-level compensation to maintain the original gray-level distribution characteristics.

[0116] This embodiment is particularly applicable to complex scenarios with interference of vertical stripes of multiple scales. Compared with Embodiment 1 and Embodiment 2, this embodiment further introduces a multi-scale processing strategy, and processes the vertical stripes of different frequency components separately, thus having the following technical advantages: Improve the removal effect of complex vertical stripes: Since vertical stripes may be distributed on multiple scales, the traditional single-scale filtering method may not be able to effectively remove all frequency stripes. This solution decomposes the image into different scales and performs band-pass filtering respectively, so that vertical stripes in different frequency ranges can be effectively suppressed, thereby improving the removal effect. Reduce over-smoothing and improve the retention degree of image details: Directly performing band-pass filtering on the entire image may affect other important details, while this solution processes each scale separately, retains more structural information while removing the stripes, and avoids information loss caused by over-smoothing. Enhance the adaptability to complex scenarios: In practical applications, the interference of vertical stripes may come from different causes and the frequency range may be relatively wide. This solution can adaptively process on multiple scales, so that the method can still maintain a good stripe removal effect under various complex interference conditions and is applicable to a wider range of application scenarios. Reduce artifacts and improve visual quality: After multi-scale decomposition, each scale can be optimized independently, so that the filtered image can transition more smoothly, reduce the artificial traces or artifacts that may be generated by traditional filtering methods, and improve the visual quality of the final image. Maintain the original gray-level distribution characteristics: Through the gray-level compensation step, compensate for the brightness deviation that may be caused during the filtering process, so that the final image can remove vertical stripes and maintain the same gray-level characteristics as the original image, avoiding affecting subsequent detection or analysis tasks.

[0117] Refer to Figure 6a , Figure 6bAs shown, compared with the traditional morphological operation method, the present invention can more effectively remove the interference of vertical stripes with different intensities and widths. The test results show that the interference suppression rate of vertical stripes has increased by more than 20 - 30%. Through the gray compensation mechanism, the present invention retains the gray distribution characteristics of the original image, and the gray fidelity reaches more than 85%, while the traditional frequency domain filtering method usually only reaches 40% - 50%. In Figure 6a 1 is marked as the original image, 2 is marked as the morphological method, 3 is marked as the frequency domain filtering method, and 4 is marked as the method of the present invention.

[0118] The technical principle of the present invention has been described above in combination with specific embodiments, which are only the preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. Those skilled in the art can think of other specific embodiments of the present invention without creative labor, and these embodiments will fall within the protection scope of the present invention.

Claims

1. A method for removing vertical fringe interference from a line scan camera based on bandpass filtering and grayscale compensation, characterized in that: The following steps are involved: Step S1: extracting the screen area to be processed by image preprocessing technology; Step S2: Apply bandpass filtering to the extracted screen area to remove vertical stripe interference and obtain image A; Step S3: Apply filtering processing to the screen area to obtain a background grayscale feature set B; Step S4: performing grayscale compensation on image A based on the grayscale difference between image A and the average grayscale of column B of feature set; Step S5: Generate a result image with vertical stripes removed and original grayscale distribution features retained. Step S1 specifically includes: assuming the original image is I(x,y), where x represents the horizontal coordinate of the image, y represents the vertical coordinate of the image, and the image size is M×N; defining a screen area extraction function E, and the extraction result is I roi ;I roi =E(I); The specific implementation process of the screen area extraction function E is: Apply threshold segmentation: , where T is the threshold determined adaptively; morphological operations are applied to extract connected regions: I morph =Close(I bin ,S), where Close is the morphological closing operation and S is the structural element; the largest connected region is extracted as ROI; I roi =MaxConnectedRegion(I morph )•I(x,y); The specific process of step S2 is: I roi Convert to the frequency domain and apply a bandpass filter H bp Processing: F roi =F(I roi );F A =F roi H bp ;I A =F -1 (F A ); where F represents the two-dimensional Fourier transform, F -1 represents the two-dimensional inverse Fourier transform, I A is the image after bandpass filtering; Among them, the bandpass filter H bp Defined as: , where u represents the horizontal frequency, v represents the vertical frequency, and v low and v high are low cutoff frequency and high cutoff frequency respectively, v c =(v low +v high ) / 2 is the center frequency, w=v high -v low It's bandwidth.

2. The method for removing vertical fringe interference of a line scan camera based on bandpass filtering and grayscale compensation according to claim 1, wherein: The specific process of step S3 is: roi Apply filtering to obtain background grayscale features: I B =Filter(I roi ); the filter function Filter can be any of the following: Median filter: I B (x,y)=median{I roi (x+i,y+j)|-k≤i,j≤k}; Mean filtering: ; Gaussian filtering: Among them, G(i,j) is the Gaussian kernel function: ; x and y represent pixel coordinates, i and j represent relative coordinate offsets; the filter kernel size k and Gaussian standard deviation σ are selected according to the scale characteristics of the vertical stripes.

3. The method for removing vertical fringe interference of a line scan camera based on bandpass filtering and grayscale compensation according to claim 2, wherein: The specific process of step S4 is: for each column c of the image, calculate I A and I B The average gray value in the column: ; , where c represents the column index of the image, y represents the row index of the pixel, and N represents the height of the image; Calculate the grayscale difference of each column: Δ(c)=μ B (c)-μ A (c); For image I A Perform grayscale compensation to obtain the result image I R :I R (c,y)=I A (c,y)+Δ(c); To avoid grayscale value overflow, constraints are imposed during actual implementation: I R (x,y)=min(max(I A (x,y)+Δ(x),0),255)。 4. The method for removing vertical fringe interference of a line scan camera based on bandpass filtering and grayscale compensation according to claim 1, wherein: The process of screen area extraction is as follows: input the original image I, extract the screen area through threshold segmentation and morphological operation, the specific steps are as follows: convert the original image I into a grayscale image; use the OTSU adaptive threshold method to determine the threshold T; binarize the image to obtain a binary image I bin Apply morphological closing operation to the binary image, using a 5×5 rectangular structure element; mark the connected regions and extract the largest connected region as the ROI mask; apply the ROI mask to the original image I to obtain the extracted screen region I ROI .

5. The method for removing vertical fringe interference of a line scan camera based on bandpass filtering and grayscale compensation according to claim 4, wherein: The process of removing vertical stripes by bandpass filtering is as follows: ROI Apply bandpass filtering to remove vertical stripe interference: The specific process is: ROI Apply two-dimensional fast Fourier transform to obtain the frequency domain image F ROI ; Construct a bandpass filter H bp , the parameters are set to: v low =0.1, v high =0.4; Apply a bandpass filter to the frequency domain image: F A =F roi •H bp ; Apply two-dimensional inverse fast Fourier transform to the filtered frequency domain image to obtain the spatial domain image I A .

6. The method for removing vertical fringe interference of a line scan camera based on bandpass filtering and grayscale compensation according to claim 5, wherein: The process of background grayscale feature extraction is as follows: ROI Apply filtering to extract background grayscale features: The specific process is: use a 25×25 Gaussian filter to process I ROI , standard deviation σ=8; get the background grayscale feature image I B ; The grayscale compensation process is as follows: Based on image I A and I B The column average grayscale difference, for I A Perform grayscale compensation; specifically: calculate I A The average gray value of each column μ A (x); calculate I B The average gray value of each column μ B (x); calculate the grayscale difference of each column Δ(x)=μ B (x)-μ A (x); for I A Perform column compensation: I R (x,y)=I A (x,y)+Δ(x); constrain the grayscale value range to be within [0,255]; output the compensated image as the final result after removing vertical stripes.

7. The method for removing vertical fringe interference of a line scan camera based on bandpass filtering and grayscale compensation according to claim 6, wherein: The method also includes performing spectrum analysis on the vertical projection of the original image I and adaptively setting bandpass filter parameters according to the analysis results.

8. The method for removing vertical fringe interference of a line scan camera based on bandpass filtering and grayscale compensation according to claim 6, wherein: Also includes the screen area I roi Decomposed into multiple scales: I roi =I1+I2+...+I n , I1 represents the low frequency component, I2 to I n Represent detail components of different frequencies; apply bandpass filtering to each scale; reconstruct the image and perform grayscale compensation.

Citation Information

Patent Citations

  • Improved region growing method for optic cup image segmentation

    CN107346545A

  • Image processing method and device, medium and electronic equipment

    CN111292272A

  • Image preprocessing device for uncooled thermal infrared imager

    CN111340717A