Search

CN-122027892-A - Automatic focusing method, device, equipment and storage medium based on image processing

CN122027892ACN 122027892 ACN122027892 ACN 122027892ACN-122027892-A

Abstract

The invention relates to the technical field of display panels, and discloses an automatic focusing method, device, equipment and storage medium based on image processing, wherein the method comprises the steps of setting light intensity, exposure time, initial direction and initial step length according to defect types and objective parameters, and initializing the highest score and corresponding position; the method comprises the steps of obtaining a defect position image, adaptively extracting an ROI (region of interest) region, filtering and denoising, calculating the mean value of a Laplace operator, the image variance and the mean value of gradient amplitude of the ROI region, distributing feature weights based on defect types, weighting and summing to obtain a current focusing score, adjusting the moving direction and the step length according to the comparison between the current focusing score and a historical focusing score, updating the highest score and the corresponding position, and when the step length is smaller than or equal to 0.25 mu m, stopping focusing and locking the optimal focusing position if the current position is the highest scoring position or the distance between the current position and the highest scoring position is smaller than or equal to 0.25 mu m.

Inventors

  • Cen Jitao
  • ZHONG ZHICHENG
  • CAO YANBO

Assignees

  • 季华实验室

Dates

Publication Date
20260512
Application Date
20251225

Claims (10)

  1. 1. An automatic focusing method based on image processing, characterized in that the automatic focusing method based on image processing comprises the following steps: carrying out defect identification on an original panel image by adopting MobileNetV network, setting light intensity, exposure time, initial direction and initial step length according to defect type and objective lens parameters, and initializing the highest score and corresponding position; acquiring a defect position image, adaptively extracting an ROI (region of interest) region, filtering and denoising, and calculating a Laplacian mean value, an image variance and a gradient amplitude mean value of the ROI region; adopting ResNet network to distribute characteristic weight based on defect type, and obtaining current focusing score based on Laplace operator mean value, image variance and gradient amplitude mean value weighted summation; Based on the DQN algorithm, according to the comparison of the current focusing score and the historical focusing score, the moving direction and the step length are adjusted, and the highest score and the corresponding position are updated; when the step length is smaller than or equal to 0.25 mu m, if the current position is the highest scoring position or the distance between the current position and the highest scoring position is smaller than or equal to 0.25 mu m, focusing is stopped, and the optimal focusing position is locked.
  2. 2. The image processing-based auto-focusing method as claimed in claim 1, wherein the adopting MobileNetV network to perform defect recognition on the original panel image, and setting the light intensity, the exposure time, the initial direction and the initial step length according to the defect type and the objective lens parameters, and initializing the highest score and the corresponding position comprises: acquiring an original panel image to be processed, and performing enhancement processing on the original panel image by adopting a wavelet transformation algorithm; Inputting the enhanced panel image into MobileNetV network, performing dimension-increasing operation by 1×1 convolution check, and expanding the feature information dimension of the image according to the preset output feature image channel number; Performing 3 x3 depth separable convolution operation on the feature map after dimension increase, and extracting preliminary defect features in the image; the preliminary defect characteristics are transmitted into an inverse residual error structure, and weights are automatically distributed to different characteristic channels through global pooling treatment and twice full-connection layer operation in sequence; Performing dimension reduction processing on the weighted feature map through a 1X1 point-by-point convolution module to obtain a dimension reduced defect feature vector; inputting the defect characteristic vector into a classifier formed by a forward Lagrangian multiplier, classifying and judging the defect characteristic vector, and outputting a defect type result; screening out a light intensity value and an exposure time value which are matched with the current scene according to the defect type and the objective lens parameter which are obtained through identification, and setting an initial direction and an initial step length of focusing movement; the initial value of the highest scoring parameter is set to 0, and the initial position corresponding to the highest scoring is set to the focusing initial position.
  3. 3. The image processing-based auto-focusing method as claimed in claim 2, wherein the acquiring the original panel image to be processed, and performing enhancement processing on the original panel image by using a wavelet transform algorithm, comprises: Performing on the original panel image Layer wavelet decomposition operation, decomposing an image into The low frequency coefficient and the high frequency coefficient corresponding to the layer; for the first Determining the low-frequency coefficient of a layer and determining the image pixel point coordinate corresponding to each low-frequency coefficient in the current layer And extracting two different dimension components corresponding to the low frequency coefficient And Wherein j has a value in the range of1 to ; Calculating the wavelet coefficient argument of the low frequency coefficient according to the following formula : Wherein, the Representing the original panel image in coordinates Pixel values at; introducing nonlinear function to calculate wavelet coefficient amplitude angle Adjusting, and marking the adjusted amplitude angle as The nonlinear function expression is: Wherein, the The adjustment operator is represented by a representation of the adjustment operator, The luminance coefficient is represented by a luminance value, Representing the wavelet threshold value(s), Indicating the current first Low frequency coefficient values of the layers; calculating parameters according to the formula To As an enhancement function: Wherein, the For controlling the scaling of the molecules, Is a constant bias term; Associating an enhancement function with the current first Performing product operation on wavelet coefficients corresponding to the low-frequency coefficients in the layer to obtain adjusted low-frequency coefficients; And (3) keeping the high-frequency coefficients of all layers after wavelet decomposition unchanged, and performing wavelet inverse transformation reconstruction operation by combining all the adjusted low-frequency coefficients to reconstruct the enhanced panel image.
  4. 4. The image processing-based auto-focusing method according to claim 1, wherein the steps of obtaining the defect position image, adaptively extracting the ROI area, filtering and denoising, and calculating the mean value of laplacian, the image variance and the mean value of gradient amplitude of the ROI area, comprise: Converting the defect position image into a gray level image, acquiring coordinate information of a defect area, and determining boundary frame coordinates of the defect area; Calculating the width and the height of the boundary frame of the defect area, and if the width is more than 640 or the height is more than 640, taking the geometric center of the boundary frame of the defect area as a reference, and intercepting 640 Square areas of 640 pixels are used as ROI areas; If the width is smaller than or equal to 640 and the height is smaller than or equal to 40, expanding 10% pixel ranges to the periphery on the basis of the boundary frame of the defect region to form an ROI region; Traversing each pixel of the extracted ROI gray level image, multiplying the current pixel and 8 neighborhood pixels thereof with Gaussian kernel corresponding weights respectively, calculating the sum of all products, replacing the gray level value of the current pixel with the sum, and completing noise filtering; Performing edge detection on the denoised ROI gray level image by using a Laplace operator to obtain an edge image containing positive and negative values, converting the value of each pixel of the edge image into an absolute value, and calculating the arithmetic average value of the absolute values of all pixels to obtain a Laplace operator average value; traversing all pixels of the denoised ROI gray level image, calculating an arithmetic average value of gray level values of all pixels, then calculating a difference value of gray level values of all pixels and the arithmetic average value one by one, carrying out square operation on each difference value to obtain a square difference value set, and calculating the arithmetic average value of all elements in the square difference value set to obtain an image variance The formula is: Wherein, the The number of height pixels representing the denoised ROI gray image, The number of width pixels representing the denoised ROI gray image, Representing the ROI area Line 1 The gray values of the column pixels, An arithmetic mean representing the gray values of all pixels; respectively constructing an X-direction gradient operator and a Y-direction gradient operator by adopting a Sobel operator with a 3 multiplied by 3 kernel, and forming each pixel and neighborhood pixels thereof in the denoised ROI gray level image The window is subjected to convolution operation with an X-direction gradient operator and a Y-direction gradient operator respectively to obtain an X-direction gradient value and a Y-direction gradient value; And obtaining the gradient amplitude of the current pixel according to the gradient value in the X direction and the gradient value in the Y direction, calculating the arithmetic average value of the gradient amplitudes of all pixels, and determining the gradient amplitude average value.
  5. 5. The image processing-based auto-focusing method according to claim 1, wherein the employing ResNet network to assign feature weights based on defect types and weighting and summing based on laplacian mean, image variance, gradient magnitude mean to obtain the current focus score comprises: performing digital conversion on the defect type by adopting single thermal coding, and performing normalization processing on three characteristic values of a defect type coding vector and a Laplacian mean value, an image variance and a gradient amplitude mean value; Splicing the normalized defect type coding vector and the three normalized characteristic values to form an input vector of ResNet network; The input vector is transmitted into an input layer of ResNet network, and the characteristic extraction and nonlinear transformation are carried out on the input vector through a convolution layer, a batch normalization layer and a ReLU activation function of the network in sequence; inputting the processed feature vector into a global average pooling layer for dimension reduction, inputting the feature vector into a full-connection layer, and mapping the feature dimension into 3 dimensions through linear transformation to obtain a preliminary weight vector; inputting the preliminary weight vector into a Softmax activation function, and carrying out normalization processing on the preliminary weight vector element to obtain a weight coefficient corresponding to the mean value of the Laplace operator, a weight coefficient corresponding to the image variance and a weight coefficient corresponding to the mean value of the gradient amplitude; And obtaining the current focusing score by weighting summation calculation according to the weight coefficient corresponding to the mean value of the Laplace operator, the weight coefficient corresponding to the image variance and the weight coefficient corresponding to the mean value of the gradient amplitude.
  6. 6. The image processing-based auto-focusing method according to claim 1, wherein the DQN algorithm adjusts moving direction and step length according to a comparison of current focus score and historical focus score, and updates a highest score and a corresponding position, comprising: acquiring a last score, a last position, a current focusing score, a current position, a highest score, a highest scoring position and a current step length, and collecting defect type labels and historical focusing score sequences; judging whether the last scoring is 0, if so, determining the first scoring calculation without direction and step length adjustment; If the historical focusing score sequence is not 0, inputting the historical focusing score sequence into the GRU module, generating a hidden state vector which is dependent on a fusion time sequence through the synergistic effect of a reset gate and an update gate, and capturing the historical scoring change trend; Sequentially splicing the hidden state vector, the last scoring, the last position, the current focusing scoring, the current position, the highest scoring position, the current step length and the defect type label to form a high-dimensional input vector; Inputting the high-dimensional input vector into a DQN algorithm, calculating a Q value, and selecting an action with the largest Q value as an initial suggested action of the DQN; Calculating the ratio of the current focusing score to the last score, halving the step length if the ratio is more than or equal to 5, and adjusting the step length by using the DQN initial suggested action if the ratio is less than 5; if the current focusing score is smaller than the magnitude relation of the last score, the moving direction is set to be negative, and the step length is halved again to obtain a final step length, and if the current focusing score is larger than the last score, the moving direction is kept positive, and the step length is unchanged; according to the final step length and the final moving direction, moving to a new position, collecting a focusing image of the new position, and calculating to obtain a new focusing score; And comparing the new focusing score, the last score and the highest score, assigning the score with the largest value to the highest score, and assigning the position corresponding to the highest score to the highest scoring position.
  7. 7. The image processing-based auto-focusing method according to claim 6, wherein the act of inputting the high-dimensional input vector into the DQN algorithm, calculating the Q value to select the action with the largest Q value as the initial suggested action of DQN, comprises: Input vector with high dimension Inputting a DQN algorithm, sequentially processing by a convolution layer and a full connection layer, then transmitting the processed DQN algorithm into a NoisyLinear layer, and calculating NoisyLinear layer weight Bias and method of making same And calculates NoisyLinear layer output : Wherein, the 、 Representing the parameter of the mean value that can be learned, 、 Representing that the standard deviation parameter can be learned, 、 Indicates gaussian noise, and by which is meant element-level multiplication; the NoisyLinear layer output is transmitted into a Dueling module, and the Q value is calculated by decomposition according to the following formula: Wherein, the The state-cost function is represented as such, The action-dominant function is represented as such, Represents the mean value of the action dominance value, The current state is indicated and the current state is indicated, Representing candidate actions.
  8. 8. An image processing-based autofocus device, the image processing-based autofocus device comprising: The initialization module is used for carrying out defect identification on the original panel image by adopting MobileNetV network, setting light intensity, exposure time, initial direction and initial step length according to defect type and objective lens parameters, and initializing the highest score and corresponding position; the calculation module is used for acquiring the defect position image, adaptively extracting the ROI region, filtering and denoising, and calculating the Laplacian mean value, the image variance and the gradient amplitude mean value of the ROI region; The weighted summation module is used for distributing characteristic weights based on defect types by adopting ResNet network and obtaining a current focusing score based on the average value of the Laplace operator, the image variance and the average value of the gradient amplitude; The updating module is used for adjusting the moving direction and the step length based on the comparison of the current focusing score and the historical focusing score by the DQN algorithm and updating the highest score and the corresponding position; And the focusing module is used for stopping focusing and locking the optimal focusing position if the current position is the highest scoring position or the distance between the current position and the highest scoring position is less than or equal to 0.25 mu m when the step length is less than or equal to 0.25 mu m.
  9. 9. An image processing-based autofocus device comprising a memory having instructions stored therein and at least one processor invoking the instructions in the memory to cause the image processing-based autofocus device to perform the steps of the image processing-based autofocus method of any of claims 1-7.
  10. 10. A computer readable storage medium having instructions stored thereon, which when executed by a processor, implement the steps of the image processing based autofocus method of any of claims 1-7.

Description

Automatic focusing method, device, equipment and storage medium based on image processing Technical Field The present invention relates to the field of display panels, and in particular, to an automatic focusing method, device, apparatus and storage medium based on image processing. Background At present, the yield of OLED display panels is increasingly increased, the more important the laser repair of the OLED display panels for production is, the more accurate focusing can be performed on the premise that the laser repair can be performed, because short-wave repair such as 343nm and 257nm is used, coating on an objective lens is isolated or other lights are weakened, so that the traditional line laser automatic focusing scheme is completely invalid, and the problems of low efficiency, poor stability and high error rate exist in manual focusing, so that the industrial production requirement cannot be met. Disclosure of Invention The invention aims to solve the problems, and designs an automatic focusing method, an automatic focusing device, automatic focusing equipment and a storage medium based on image processing. The first aspect of the present invention provides an image processing-based auto-focusing method, which includes: carrying out defect identification on an original panel image by adopting MobileNetV network, setting light intensity, exposure time, initial direction and initial step length according to defect type and objective lens parameters, and initializing the highest score and corresponding position; acquiring a defect position image, adaptively extracting an ROI (region of interest) region, filtering and denoising, and calculating a Laplacian mean value, an image variance and a gradient amplitude mean value of the ROI region; adopting ResNet network to distribute characteristic weight based on defect type, and obtaining current focusing score based on Laplace operator mean value, image variance and gradient amplitude mean value weighted summation; Based on the DQN algorithm, according to the comparison of the current focusing score and the historical focusing score, the moving direction and the step length are adjusted, and the highest score and the corresponding position are updated; when the step length is smaller than or equal to 0.25 mu m, if the current position is the highest scoring position or the distance between the current position and the highest scoring position is smaller than or equal to 0.25 mu m, focusing is stopped, and the optimal focusing position is locked. Optionally, in a first implementation manner of the first aspect of the present invention, the performing defect identification on the original panel image using the MobileNetV network, setting light intensity, exposure time, initial direction and initial step length according to defect type and objective parameter, and initializing a highest score and a corresponding position includes: acquiring an original panel image to be processed, and performing enhancement processing on the original panel image by adopting a wavelet transformation algorithm; Inputting the enhanced panel image into MobileNetV network, performing dimension-increasing operation by 1×1 convolution check, and expanding the feature information dimension of the image according to the preset output feature image channel number; Performing 3 x3 depth separable convolution operation on the feature map after dimension increase, and extracting preliminary defect features in the image; the preliminary defect characteristics are transmitted into an inverse residual error structure, and weights are automatically distributed to different characteristic channels through global pooling treatment and twice full-connection layer operation in sequence; Performing dimension reduction processing on the weighted feature map through a 1X1 point-by-point convolution module to obtain a dimension reduced defect feature vector; inputting the defect characteristic vector into a classifier formed by a forward Lagrangian multiplier, classifying and judging the defect characteristic vector, and outputting a defect type result; screening out a light intensity value and an exposure time value which are matched with the current scene according to the defect type and the objective lens parameter which are obtained through identification, and setting an initial direction and an initial step length of focusing movement; the initial value of the highest scoring parameter is set to 0, and the initial position corresponding to the highest scoring is set to the focusing initial position. Optionally, in a second implementation manner of the first aspect of the present invention, the acquiring an original panel image to be processed, and performing enhancement processing on the original panel image by using a wavelet transform algorithm includes: Performing on the original panel image Layer wavelet decomposition operation, decomposing an image intoThe low frequency coefficient and the