CN108986170B - Linear array camera flat field correction method suitable for field working conditions - Google Patents

Linear array camera flat field correction method suitable for field working conditions Download PDF

Info

Publication number
CN108986170B
CN108986170B CN201810720139.1A CN201810720139A CN108986170B CN 108986170 B CN108986170 B CN 108986170B CN 201810720139 A CN201810720139 A CN 201810720139A CN 108986170 B CN108986170 B CN 108986170B
Authority
CN
China
Prior art keywords
matrix
coefficient
gray value
pixel
row
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810720139.1A
Other languages
Chinese (zh)
Other versions
CN108986170A (en
Inventor
洪志坤
汪舟
张胜森
李仲禹
郑增强
欧昌东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Jingce Electronic Group Co Ltd
Original Assignee
Wuhan Jingce Electronic Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Jingce Electronic Group Co Ltd filed Critical Wuhan Jingce Electronic Group Co Ltd
Priority to CN201810720139.1A priority Critical patent/CN108986170B/en
Publication of CN108986170A publication Critical patent/CN108986170A/en
Application granted granted Critical
Publication of CN108986170B publication Critical patent/CN108986170B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Photometry And Measurement Of Optical Pulse Characteristics (AREA)

Abstract

The invention discloses a linear array camera flat field correction method suitable for field working conditions, which comprises the steps of shooting to obtain an initial gray value matrix of an initial row of a screen to be detected to obtain an original correction coefficient matrix; scanning and shooting a gray value image of a screen to be detected by a linear array camera to obtain an original gray value matrix; correspondingly multiplying the original gray value matrix by the original correction coefficients of the corresponding columns to obtain a preliminarily corrected gray value matrix; dividing each pixel gray value in the gray value matrix subjected to the primary correction by the median value of the row, and determining a pixel response nonuniformity coefficient of an initial row in the pixel matrix to be screened; and obtaining an effective flat field correction coefficient, and correcting the gray value image shot by the linear array camera. The method of the technical scheme of the invention aims at the problems that the existing flat field correction method of the linear array camera is difficult to adapt to the difference of working environments and has low precision, and under the condition of actual working conditions, the flat field correction is carried out on the linear array camera by combining optics and an algorithm, so that the adaptability is good and the precision is high.

Description

Linear array camera flat field correction method suitable for field working conditions
Technical Field
The invention belongs to the technical field of flat field correction of a linear array camera, in particular relates to a correction technology before panel defect detection based on the linear array camera, and particularly relates to a flat field correction method of the linear array camera, which is suitable for field working conditions.
Background
In machine vision, cameras can be respectively an area camera and a line camera according to different arrangement modes of sensor pixels. The area-array camera, i.e. the target surface of the sensor, is a surface, and is very commonly used. In the line camera, the sensor pixels are distributed in a linear shape, that is, the pixels are arranged in only one row. The line camera has higher precision compared with an area camera. The field of view shot by the linear array camera is a long and thin strip which is mainly used for scanning detection, a screen to be detected which moves at a constant speed is scanned, and a complete shot picture of the panel or the screen to be detected is generated by synthesizing a single picture shot by the linear array camera.
The line camera needs to be flat field corrected before use. When the linear array camera is used for shooting a target object with uniform brightness, the obtained shot picture should reflect the characteristics of the target object really and have uniform brightness. However, the brightness of the actually shot picture is not uniform, that is, the gray level of each pixel point in the image is different, and the surface characteristics of the shot target object cannot be truly reflected. Line cameras are generally used for high precision defect detection, so that such errors introduced by the camera system itself are not allowed. The typical causes of the gray scale value non-uniformity are non-uniformity of the light source, non-uniformity of the response of the lens center and the lens edge to the light, and the difference of the response degree of each pixel of the sensor to the incident light. Therefore, if the camera is not subjected to flat field correction before use, the influence on the imaging quality can be caused in the actual use process.
The flat field correction is to correct the influence of other factors except the defects of the screen to be detected on the image uniformity of the picture. Which comprises the following steps: m represents the illumination intensity nonuniformity coefficient along the direction of the strip-shaped light source, n represents the lens response nonuniformity coefficient to light, p represents the response nonuniformity coefficient of each pixel of the linear array camera, and q represents the reflection nonuniformity coefficient to light at each position of the screen to be detected. Flat field correction requires correction of three coefficients, m, n, p, and the fact that the three coefficients, m, n, p, are equal to 1 means that this parameter is not corrected. As shown in fig. 1, a typical line scan camera is used, and incident light from a strip light source is irradiated onto a plane to be inspected (generally, glass, steel plate, or liquid crystal panel), and the light is reflected and collected by the line scan camera on the other side. The camera shoots the surface characteristics of one line on the plane to be detected at every time, and when the screen to be detected moves at a constant speed through a lower conveying belt, the linear array camera can shoot the whole screen surface to be detected, so that the camera can image the whole screen surface to be detected. When there is no defect on the plane to be inspected, the image output from the camera should be a uniform gray scale image. When the surface of the screen has defects, the reflection effect of the defects on the surface of the screen on light is changed, and the intensity of light rays incident to the linear array camera is changed, so that the defects on the surface of the screen can be detected by detecting the gray value of a shot picture. If the used camera is not corrected by a flat field, the uniformity of the strip light source, the response consistency of the lens to the central light and the marginal light and the responsivity of each pixel point of the camera are different, so that even if a defect-free surface screen is shot, the picture still shows uneven gray value, the false detection in the detection is caused, and the detection precision is reduced. Therefore, flat field correction work before use of the line camera is necessary.
There are two methods for flat field calibration, one is to perform calibration before shipping the camera lens. According to the above analysis, the imaging nonuniformity of the system is caused by the camera lens and the light source. The camera lens flat field correction is carried out by manufacturers, and the nonuniformity of the light source and the influence caused by the correction are generally ignored. The correction plate is a flat plate specially designed and manufactured for flat field correction, and is required to have no defects per se, and is expensive for high-precision application scenes. Similarly, the working environment of a manufacturer is different from the working environment of an actual working site, such as background stray light and working distance adjustment, and external factors cannot be consistent with the field adjustment, so that the flat field correction effect has a certain problem. Another calibration method is to calibrate the line-array camera directly after field installation. The correction method is consistent with the actual working state, and eliminates errors caused by light source, background stray light and working distance adjustment. The correction plates used still introduce uncertainty. The linear array camera has high shooting precision, and if the correction plate has certain defects, errors introduced by the correction plate can be brought inevitably in the correction process. In addition, in some installed tables, due to a narrow space, a mechanism seal, and the like, the calibration plate cannot be placed in the field of view of the actual camera for flat field calibration, and therefore, the calibration plate cannot be used for imaging.
In addition, in the prior art, CN102479005A discloses a flat field correction method for two-dimensional optical detection, which realizes the correction of two-dimensional optical intensity by a correction circuit, and the introduction of the correction circuit means that the flat field correction cannot be realized by the device itself to be corrected, and besides the correction cost, the correction range and space need to be considered. CN105701209A discloses a normal correction method based on line camera scanning, which is characterized in that a correction coefficient curve of each color is obtained by calculating a gray scale image of three colors, red, green and blue, obtained by shooting with a line camera, so as to implement flat-field correction of a scanned image of the line camera.
Disclosure of Invention
Aiming at the defects or improvement requirements of the prior art, the invention provides a linear array camera flat field correction method suitable for field working conditions. The method of the technical scheme of the invention aims at the problems that the existing flat field correction method of the linear array camera is difficult to adapt to the difference of working environments and has low precision, and under the condition of actual working conditions, the flat field correction is carried out on the linear array camera by combining optics and an algorithm, so that the adaptability is good and the precision is high.
To achieve the above object, according to one aspect of the present invention, there is provided a line camera flat field correction method suitable for on-site working conditions, characterized in that,
s1, shooting by using a linear array camera to obtain an initial gray value matrix of any initial row of a pixel matrix to be screened, and acquiring an original correction coefficient matrix by using the initial gray value image matrix image;
s2, moving the screen to be detected at a constant speed, scanning and shooting a gray value image of the screen to be detected by the linear array camera, and obtaining an original gray value matrix of the screen to be detected according to the position distribution of pixel coordinates on the screen to be detected;
s3, correspondingly multiplying the gray value of each row in the original gray value matrix by the original correction coefficient of the corresponding column in the original correction coefficient matrix to obtain a preliminarily corrected gray value matrix;
s4, dividing each pixel gray value in the gray value matrix subjected to the primary correction by the median value of the row to obtain a coefficient matrix, analyzing the coefficient matrix and determining the imaging nonuniformity coefficient of the initial row in the pixel matrix to be screened;
s5, according to the pixel response nonuniformity coefficient of each column in the initial row in the pixel matrix to be inspected and the original correction coefficient corresponding to the column, obtaining the effective flat field correction coefficient of the linear array camera, and correcting the gray value image shot by the linear array camera.
As a preferable aspect of the present invention, step S1 includes,
s11, shooting by using a linear array camera to obtain an initial gray value matrix of an initial row of a pixel matrix to be screened, and determining the median of the gray value of each pixel coordinate in the initial gray value matrix;
s12, dividing the gray value of each pixel in the row initial gray value matrix by the median value in sequence to obtain pixel coefficients of pixels of other coordinates relative to the median value in the initial gray image of the initial row to be screened;
s13, according to the pixel coordinates in the initial gray level image, the pixel coefficients are sequentially inverted to obtain the original correction coefficients of each column of the screen to be detected, and an original correction coefficient matrix is formed.
As a preferable aspect of the present invention, step S4 includes,
s41, analyzing the preliminarily corrected gray value matrix to obtain the median of each row of gray values in the matrix;
s42, dividing the gray value of each row of the gray value matrix by the median value of the row in sequence to obtain a coefficient matrix;
s41, analyzing the coefficient matrix column by column, and comparing the size of each column of coefficients;
s42, if no less than 90% of the coefficient values in the row of coefficients are equal to the coefficient values in the initial row of coefficients, determining the pixel response non-uniformity coefficient at the corresponding position in the initial row of coefficients as the reciprocal of the coefficient values in the initial row of coefficients;
s43, acquiring the pixel response nonuniformity coefficients of each column of the coefficient matrix to form the pixel response nonuniformity coefficient matrix of the linear array camera.
As a preferable aspect of the present invention, step S5 includes,
s51, determining the effective flat field correction coefficient of the line camera as the pixel response nonuniformity coefficient of each initial row of each column multiplied by the original correction coefficient corresponding to the column;
s52, shooting a gray value image of the screen to be detected by using the linear array camera, and multiplying the gray value of each column of pixels by the effective flat field correction coefficient corresponding to the column to obtain a real image subjected to flat field correction.
As a preferred aspect of the technical solution of the present invention, the initial gray value matrix of any initial row of the pixel matrix to be screened is preferably the initial gray value matrix of the first row of the pixel matrix to be screened.
As a preferred embodiment of the present invention, in step S2, the screen to be inspected is preferably placed on the conveying stage, and the conveying stage moves at a constant speed to drive the screen to be inspected to move at a constant speed.
As an optimization of the technical scheme of the invention, the row number and the column number of the pixel matrix to be detected, the original gray value matrix and the coefficient matrix are respectively equal.
As a preferable aspect of the present invention, the pixel coefficient k preferably has a calculation formula,
k=m*n*p*q;
wherein m is a light intensity non-uniformity coefficient along the direction of the strip-shaped light source; n is the coefficient of non-uniformity of lens response to light; p is the response nonuniformity coefficient of each pixel point of the linear array camera, and q is the reflection nonuniformity coefficient of the pixel point to be detected to the light.
As an optimization of the technical scheme of the invention, the reflection nonuniformity coefficient of the pixel point to be detected to the light is preferably equal to 1 when the pixel point is free from defects, and is not equal to 1 when the pixel point is defective.
As an optimization of the technical solution of the present invention, the coefficient L of each pixel point in the coefficient matrixj,iPreferably, the following calculation formula is provided:
Lj,i=qj,i/q1,i
wherein q isj,iThe reflection nonuniformity coefficient of the pixel point of the jth row and ith column on the screen to be detected to the light is calculated.
Generally, compared with the prior art, the above technical solution conceived by the present invention has the following beneficial effects:
1) the method of the technical scheme of the invention has no requirement on the correction environment of the linear array camera, the correction environment of the linear array camera can be a standard correction environment or an actual working condition, correction errors caused by working distance, background stray light and other irrelevant factors due to inconsistency of external environments do not exist, and the method has high adaptability and high correction accuracy.
2) According to the method provided by the technical scheme of the invention, the linear array camera correction method is simple and easy to operate, the to-be-detected screen is directly used for correcting the linear array camera in the correction process, a correction plate is not required to be additionally added, the correction cost is low, and the method has good adaptability to closed and narrow actual working condition conditions.
3) According to the method of the technical scheme, through the combination of optics and an algorithm, factors which possibly influence the measurement accuracy of the linear-array camera in the using process are corrected according to the categories, no new correction error is introduced in the correction process, the calculation of a correction coefficient is simple, and the accuracy of a correction result is high.
Drawings
Fig. 1 is a working schematic diagram of a line camera in an embodiment of the technical solution of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other. The present invention will be described in further detail with reference to specific embodiments.
In this embodiment, the working principle of the line camera is shown in fig. 1, where 1 is a camera sensor, 2 is a lens, 3 is a screen to be inspected, and 4 is a bar light source.
In the ordinary calibration process of an actual line camera, the influence of various factors needs to be considered, wherein the factors mainly comprise the following factors: m represents the illumination intensity nonuniformity coefficient along the direction of the strip-shaped light source, n represents the lens response nonuniformity coefficient to light, p represents the response nonuniformity coefficient of each pixel of the linear array camera, and q represents the reflection nonuniformity coefficient to light at each position of the screen to be detected. Generally, the three coefficients m, n and p are caused by the linear camera, and the three coefficients m, n and p are the most needed to be corrected for flat field correction. In practice, however, the coefficient of non-uniformity p of the screen to be inspected (or calibration plate, hereinafter referred to collectively as screen to be inspected) with respect to the reflection of light is inevitably introduced in the flat field correction. The present embodiment aims to provide a common correction method for a line camera, which aims to avoid the problem of nonuniformity of light reflection of a screen to be detected, so as to complete accurate correction of three coefficients of m, n and p.
Although several factors m, n, p and q can cause flat field problems to pictures shot by the line camera, three factors m, n and p are caused by reasons other than a screen (or a calibration board) to be detected, and need to be corrected and eliminated in advance when the line camera is actually used for shooting detection. And q is the problem of the screen to be detected, which has a close relation with the screen to be detected, and the reflection nonuniformity coefficients of each screen to be detected are different. Therefore, in order to realize the flat field correction of the line-array camera as accurate as possible, the reflection nonuniformity coefficient of the light existing in the screen to be detected needs to be corrected before the three coefficients of m, n and p are corrected. It should be noted that the surface of the screen to be inspected produced by the manufacturer has no obvious defects, that is, it can be assumed that most of the area on the screen has a reflection coefficient of 1 to the light, and each row has a few pixels (less than 10%) with a response coefficient not equal to 1.
Before specific correction, for the sake of convenience in measurement and calculation, the whole screen to be detected is divided into a pixel matrix (M × N matrix) composed of a plurality of pixels, and each time the linear array camera shoots, a gray value matrix (1 × N matrix) is obtained.
Specifically, in this embodiment, the flat field correction step of the line camera includes:
firstly, acquiring an original correction coefficient matrix of a screen to be detected. Firstly, a screen to be detected is placed in a camera visual field, a linear array camera shoots a first picture, namely an initial gray value matrix (1 x N matrix), preferably a first row of a pixel matrix (M x N matrix) of the screen to be detected, the gray value of each pixel point in the picture is confirmed, namely the gray value of each pixel point in the initial gray value matrix is confirmed, the median of the gray values of the pixels in the picture is found, and the coordinates a of the pixel point corresponding to the median in the initial gray value matrix and the pixel matrix of the screen to be detected are recorded. Then, the gray value of each pixel point in the picture is sequentially and respectively divided by the median value to sequentially obtain the coefficient value k of each pixel corresponding to the median value, so that a new ratio matrix (1 x N matrix) is formed.
In fact, there is a relationship between the above coefficient value k and the influence factors of the line camera, namely, the following relationship exists
k=m*n*p*q,
For example, for each particular pixel in the first row of the pixel matrix, k is1,i=m1,i*n1,i*p1,i*q1,i. The subscript 1 of k, m, N, p, q indicates the first row, i.e. only one row of the first picture (initial gray value matrix), the subscript i indicates the ith column, and the maximum number of columns is N. On the basis, the original correction coefficient of 1/k can be further obtained1,iForming an original correction coefficient matrix of the screen to be inspected, as shown in Table 1 below, wherein k1,a=1。
K1,1 K1,2 K1,3 ... K1,a ... k1,N-1 K1,N
TABLE 1 original correction coefficient matrix for screen to be inspected
And secondly, starting a conveying carrier platform below the screen to be detected, enabling the screen to be detected to start to move at a constant speed, and enabling the linear array camera to scan the shooting screen at a constant speed to obtain all pictures of the pixel matrix of the shooting screen, namely shooting one picture (a 1 × N matrix) in each row of the pixel matrix, wherein the maximum number of the pictures is M. In the pixel matrix to be screened, the gray value of the pixel point of the ith column of the jth row is Aj,iThe images of all rows (M1 × N matrices) are combined together to form a complete original gray image of the screen to be inspected (i.e. the original gray value matrix of the screen to be inspected, M × N matrix), as shown in table 2 below:
A1,1 A1,2 A1,3 ... A1,a ... A1,N-1 A1,N
A2,1 A2,2 A2,3 ... A2,a ... A2,N-1 A2,N
A3,1 A3,2 A3,3 ... A3,a ... A3,N-1 A3,N
... ... ... ... ... ... ... ...
AM-2,1 AM-2,2 AM-2,3 ... AM-2,a ... AM-2,N-1 AM-2,N
AM-1,1 AM-1,2 AM-1,3 ... AM-1,a ... AM-1,N-1 AM-1,N
AM,1 AM,2 AM,3 ... AM,a ... AM,N-1 AM,N
TABLE 2 original Gray value matrix for Screen to be inspected
And thirdly, performing primary correction on the original gray value matrix of the screen by using the original correction coefficient matrix obtained in the first step. Multiplying the gray value of each row of the original gray matrix in the table 2 by the correction coefficient of the corresponding column in the original correction coefficient matrix in the table 1 one by one to obtain a new momentAnd (5) arraying. That is, for each row of gray scale values of the original gray scale matrix, the gray scale values of the ith row of pixels in the original gray scale matrix are multiplied by the correction coefficients of the corresponding row in the original correction coefficient matrix in turn, that is, the gray scale values of the ith row of pixels in the original gray scale matrix are multiplied by the correction coefficients 1/K at the pixel coordinates1iA preliminarily corrected gray value matrix is obtained as shown in table 3 below:
Figure BDA0001718468150000071
TABLE 3
Further, the correction coefficient is 1/K1iAnd (3) calculating, namely correcting an illumination intensity non-uniformity coefficient M in the direction of a strip light source on an image (M x N matrix) to be detected, which is obtained by shooting by the linear array camera, a lens response non-uniformity coefficient N to light and a response non-uniformity coefficient p of each pixel point of the linear array camera. However, since the correction coefficient is 1/k1iThe reflection nonuniformity coefficients q of the light at each position of the surface of the screen to be detected contained in the image processing device are nonuniformity coefficients of the first line of the screen to be detected, so that the image obtained by shooting is still not a real and accurate image, but an image corrected by the reflection nonuniformity coefficients of the pixel points of the first line of the surface of the screen to be detected. Therefore, the preliminarily corrected picture (gray value matrix) needs to be further corrected to eliminate errors caused by the reflection nonuniformity coefficient difference existing in the screen to be inspected.
Fourth, divide each pixel in table 3 by the median of the row pixel values, where there is a median of the gray scale values of each row of pixels in the gray scale matrix. Thus, a new coefficient table, i.e. a coefficient matrix of the screen to be inspected for the screen to be inspected, can be obtained, as shown in table 4 below, where each coefficient element of the coefficient matrix is represented by LjiAnd (4) showing.
L1,1 L1,2 L1,3 ... L1,a ... L1,N-1 L1,N
L2,1 L2,2 L2,3 ... L2,a ... L2,N-1 L2,N
L3,1 L3,2 L3,3 ... L3,a ... L3,N-1 L3,N
... ... ... ... ... ... ... ...
LM-2,1 LM-2,2 LM-2,3 ... LM-2,a ... LM-2,N-1 LM-2,N
LM-1,1 LM-1,2 LM-1,3 ... LM-1,a ... LM-1,N-1 LM-1,N
LM,1 LM,2 LM,3 ... LM,a ... LM,N-1 LM,N
TABLE 4 coefficient matrix of the screen to be inspected
After the calculation process, the calculation is easy to obtain,
Lj,i=Kj,i*(1/K1,i)=mj,i*nj,i*Pj,i*qj,i*(1/(m1,i*n1,i*p1,i*q1,i));
the values of m, n and p respectively represent the illumination intensity non-uniformity coefficient, the lens response non-uniformity coefficient and the response non-uniformity coefficient of each pixel point of the linear array camera along the direction of the strip-shaped light source. These factors are independent of the position of the different lines on the pixel matrix of the screen to be inspected, i.e. m, takenj,i=m1,i,nj,i=n1,i,Pj,i=p1,iThus the above formula can be obtained after simplification
Lj,i=qj,i/q1,i
Wherein q isj,iThe reflection nonuniformity coefficient of the pixel points of the jth row and the ith column on the pixel matrix to be detected to the light is calculated.
In fact, only a few pixels in each row of the screen to be detected produced in a factory have defects, namely q of most pixelsj,iIs 1, and non-uniformity is present in q of a few pixelsj,iThe value is not equal to 1. And between different rows, these qj,iThe distribution of pixel points with a value different from 1 is random. Because each line of the shot picture to be screened is subjected to flat field correction by the shooting result of the first line, the defect of the ith pixel point of the first line is expressed in the ith pixel of each line. I.e. there will be q in the correction coefficients of each row in the same column (i is the same)1,iIs present.
Fifthly, analyzing the obtained coefficient table row by row, and when a certain row has more than 90% of coefficients Lj,iAre identical, i.e. L1,i=Lj,iThen, the reflection uniformity coefficient q of the screen to be detected of the pixel point where the first row of the coefficient of the column (i-th column) is positioned is indicated1,i=1/L1,i. If a certain column of coefficients Lj,iIf the probability of the consistent values is not more than 90%, the quality of the screen is considered to be unqualified, the defects are very many, and a screen to be detected needs to be replaced to perform retesting from the first step.
And sequentially carrying out the operations on each column of the pixel matrix, and finally obtaining the nonuniformity coefficients of the pixel responses of all the columns of the pixel matrix. In this embodiment, the finally obtained effective flat field correction coefficient is 1/k1i*q1,iI.e. 1/k1,i*1/L1,i. When a picture (pixel matrix) of the screen to be detected is shot subsequently each time, multiplying the gray value of the pixel point of each row in the obtained pixel matrix by (1/k)1,i*1/L1,i) The real picture after the flat field correction effect can be obtained.
In fact, in the embodiment of the technical solution of the present invention, after obtaining the effective flat-field correction coefficient of the line camera, when the line camera is used to continue shooting, the line camera shoots one line of pictures each time, that is, corrects the gray value obtained by shooting, and can obtain an accurate real picture until the last line of pictures is completed and the correction is completed, that is, the shooting and the correction of the line camera are performed synchronously, so as to save the time cost. Meanwhile, by using the method for correcting the flat field of the linear array camera in the embodiment, the original picture obtained by shooting can be corrected by using the effective flat field correction coefficient of the linear array camera after the linear array camera completes all shooting tasks. The above two processes are all within the protection scope of the technical scheme of the invention.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A linear array camera flat field correction method suitable for field working conditions is characterized in that,
s1, shooting by using a linear array camera to obtain an initial gray value matrix of any initial row of a pixel matrix to be screened, and acquiring an original correction coefficient matrix by using the initial gray value matrix;
s2, moving the screen to be detected at a constant speed, scanning and shooting a gray value image of the screen to be detected by the linear array camera, and obtaining an original gray value matrix of the screen to be detected according to the position distribution of pixel coordinates on the screen to be detected;
s3, correspondingly multiplying the gray value of each row in the original gray value matrix by the original correction coefficient of the corresponding column in the original correction coefficient matrix to obtain a preliminarily corrected gray value matrix;
s4, dividing each pixel gray value in the gray value matrix subjected to the primary correction by the median value of the row to obtain a coefficient matrix, analyzing the coefficient matrix and determining the pixel response nonuniformity coefficient of the initial row in the pixel matrix to be screened;
s5, according to the pixel response nonuniformity coefficient of each column in the initial row in the pixel matrix to be inspected and the original correction coefficient corresponding to the column, obtaining the effective flat field correction coefficient of the linear array camera, and correcting the gray value image shot by the linear array camera.
2. The line camera flat field correction method suitable for the field working condition as claimed in claim 1, wherein said step S1 includes,
s11, shooting by using a linear array camera to obtain an initial gray value matrix of an initial row of a pixel matrix to be screened, and determining the median of the gray value of each pixel coordinate in the initial gray value matrix;
s12, dividing the gray value of each pixel in the row initial gray value matrix by the median value in sequence to obtain pixel coefficients of pixels of other coordinates relative to the median value in the initial gray image of the initial row to be screened;
s13, according to the pixel coordinates in the initial gray level image, the pixel coefficients are sequentially inverted to obtain the original correction coefficients of each column of the screen to be detected, and an original correction coefficient matrix is formed.
3. The line camera flat field correction method suitable for field conditions as claimed in claim 1 or 2, wherein said step S4 includes,
s41, analyzing the preliminarily corrected gray value matrix to obtain the median of each row of gray values in the matrix;
s42, dividing the gray value of each row of the gray value matrix by the median value of the row in sequence to obtain a coefficient matrix;
s41, analyzing the coefficient matrix column by column, and comparing the size of each column of coefficients;
s42, if no less than 90% of the coefficient values in the row of coefficients are equal to the coefficient values in the initial row of coefficients, determining the pixel response non-uniformity coefficient at the corresponding position in the initial row of coefficients as the reciprocal of the coefficient values in the initial row of coefficients;
s43, acquiring the pixel response nonuniformity coefficients of each column of the coefficient matrix to form the pixel response nonuniformity coefficient matrix of the linear array camera.
4. The line camera flat field correction method suitable for field conditions as claimed in claim 1 or 2, wherein said step S5 includes,
s51, determining the effective flat field correction coefficient of the line camera as the pixel response nonuniformity coefficient of each initial row of each column multiplied by the original correction coefficient corresponding to the column;
s52, shooting a gray value image of the screen to be detected by using the linear array camera, and multiplying the gray value of each column of pixels by the effective flat field correction coefficient corresponding to the column to obtain a corrected real image.
5. The line camera flat field correction method suitable for the field working condition according to claim 1 or 2, wherein the initial gray value matrix of any initial row of the pixel matrix to be screened is preferably the initial gray value matrix of the first row of the pixel matrix to be screened.
6. The line camera flat field correction method suitable for the field working condition according to claim 1 or 2, wherein the screen to be detected is preferably placed on the conveying platform in the step S2, and the conveying platform moves at a constant speed to drive the screen to be detected to move at a constant speed.
7. The line camera flat field correction method suitable for the field working condition according to claim 1 or 2, wherein the pixel matrix to be screened, the original gray value matrix and the coefficient matrix are respectively equal in row and column number.
8. The line camera flat field correction method suitable for the field working condition as claimed in claim 2, wherein the pixel coefficient k preferably has the following calculation formula,
k=m*n*p*q;
wherein m is a light intensity non-uniformity coefficient along the direction of the strip-shaped light source; n is the coefficient of non-uniformity of lens response to light; p is the response nonuniformity coefficient of each pixel point of the linear array camera, and q is the reflection nonuniformity coefficient of the pixel point to be detected to the light.
9. The line camera flat field correction method suitable for on-site working conditions according to claim 8, wherein the reflection nonuniformity factor of the pixel point to be screened to the light is preferably equal to 1 when the pixel point is not defective and is not equal to 1 when the pixel point is defective.
10. The line camera flat field correction method suitable for on-site working conditions as claimed in claim 3, wherein the coefficient L of each pixel point in the coefficient matrixj,iPreferably, the following calculation formula is provided:
Lj,i=qj,i/q1,i
wherein q isj,iThe reflection nonuniformity coefficient of the pixel point of the jth row and ith column on the screen to be detected to the light is calculated.
CN201810720139.1A 2018-07-03 2018-07-03 Linear array camera flat field correction method suitable for field working conditions Active CN108986170B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810720139.1A CN108986170B (en) 2018-07-03 2018-07-03 Linear array camera flat field correction method suitable for field working conditions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810720139.1A CN108986170B (en) 2018-07-03 2018-07-03 Linear array camera flat field correction method suitable for field working conditions

Publications (2)

Publication Number Publication Date
CN108986170A CN108986170A (en) 2018-12-11
CN108986170B true CN108986170B (en) 2020-11-06

Family

ID=64536018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810720139.1A Active CN108986170B (en) 2018-07-03 2018-07-03 Linear array camera flat field correction method suitable for field working conditions

Country Status (1)

Country Link
CN (1) CN108986170B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109708584B (en) * 2018-12-30 2020-07-28 南京航空航天大学 Oil film interference method fringe spacing image identification method
CN114757853B (en) * 2022-06-13 2022-09-09 武汉精立电子技术有限公司 Method and system for acquiring flat field correction function and flat field correction method and system
CN116029938B (en) * 2023-02-24 2023-06-23 浙江双元科技股份有限公司 Image flat field correction method and device based on linear fitting
CN116634285B (en) * 2023-04-25 2024-02-02 钛玛科(北京)工业科技有限公司 Automatic white balance method of linear array camera for raw material detection equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105701809A (en) * 2016-01-11 2016-06-22 宁波江丰生物信息技术有限公司 Flat-field correction method based on line-scan digital camera scanning
CN106780388A (en) * 2016-12-22 2017-05-31 哈尔滨工业大学 A kind of line-scan digital camera optical distortion antidote
CN107197122A (en) * 2017-06-12 2017-09-22 武汉中导光电设备有限公司 A kind of method for correcting flat field being imaged for area array cameras
CN107194972A (en) * 2017-05-16 2017-09-22 成都通甲优博科技有限责任公司 A kind of camera marking method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9491376B2 (en) * 2009-02-23 2016-11-08 Flir Systems, Inc. Flat field correction for infrared cameras

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105701809A (en) * 2016-01-11 2016-06-22 宁波江丰生物信息技术有限公司 Flat-field correction method based on line-scan digital camera scanning
CN106780388A (en) * 2016-12-22 2017-05-31 哈尔滨工业大学 A kind of line-scan digital camera optical distortion antidote
CN107194972A (en) * 2017-05-16 2017-09-22 成都通甲优博科技有限责任公司 A kind of camera marking method and system
CN107197122A (en) * 2017-06-12 2017-09-22 武汉中导光电设备有限公司 A kind of method for correcting flat field being imaged for area array cameras

Also Published As

Publication number Publication date
CN108986170A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
CN108986170B (en) Linear array camera flat field correction method suitable for field working conditions
TWI414780B (en) Inspection system
US8077909B2 (en) Apparatus and method for testing infrared camera
CN100367293C (en) Method and apparatus for optical inspection of a display
US10931924B2 (en) Method for the generation of a correction model of a camera for the correction of an aberration
US20080111989A1 (en) Transparent material inspection system
TWI484283B (en) Image measurement method, image measurement apparatus and image inspection apparatus
WO2005119638A2 (en) Uniformity and brightness measurement in oled displays
US11619591B2 (en) Image inspection apparatus and image inspection method
KR101630596B1 (en) Photographing apparatus for bottom of car and operating method thereof
KR20200001658A (en) Apparatus for testing a display panel and driving method thereof
US8045788B2 (en) Product setup sharing for multiple inspection systems
KR20050051535A (en) Defect inspection system
CN115602093A (en) Method, system and equipment for performing Demura compensation based on white picture
CN112885289A (en) Display screen calibration method and device
US7714914B2 (en) Method and device for the correction of the brightness of a raw image generated by a sensor matrix
CN114745538A (en) Display screen visual angle and camera dark angle combined correction method and device
CN115942127A (en) Method, device and system for acquiring compensation basic data of display panel and storage medium
KR100852093B1 (en) Stripe-Light Range Finding System and Method Minimizing Errors
CN110428793B (en) Brightness correction system and method
CN110672631B (en) Panel defect photographing method and panel defect photographing device
Irwin et al. MIRAGE: calibration radiometry system
TW202113344A (en) Appearance inspection device, appearance inspection device calibration method, and program
KR100902301B1 (en) Defect inspection system
EP2134099B1 (en) Method of compensation for spatial non-uniformities of image devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant