Summary of the invention
The application provides a kind of combination treatment method of bad point detection peace field calibration, and it is inconvenient right in the prior art to have solved
Newly-increased bad point makes detection and the cumbersome problem of testing process in time, and method provided by the present application is by two kinds of tradition sides
The function of method merges, and ensure that the quality of response curve while simple flow, improves work efficiency.
This application provides a kind of combination treatment methods of bad point detection peace field calibration, comprising:
Image acquisition process is executed, a dark field plot and a bright field figure are obtained;
Flat field calibration factor is calculated using obtained dark field plot and bright field figure;
Bad point detection is carried out based on counted flat field calibration factor, bad point is rejected, obtains normal pixel point set;
Flat field calibration is carried out using formula Output=(Input-FPN) * PRNU to all normal pixel points, is then exported
Image, wherein FPN is fixed pattern noise value, and PRNU is photoelectric respone inconsistency coefficient, and Input and Output distinguish table
The input data and output data of diagram picture.
Optionally, described that bad point detection is carried out based on counted flat field calibration factor, bad point is rejected, normal pixel point is obtained
Set includes:
Flat field calibration factor threshold value T is setFPNAnd TPRNU;Wherein, TFPNFor fixed pattern noise threshold value, TPRNUIt is rung for photoelectricity
Answer inconsistency coefficient threshold;
According to flat field calibration factor peace field calibration coefficient threshold TFPNAnd TPRNU, judge one by one each pixel whether be
Bad point;
If judging, for bad point, the coordinate of the pixel is stored in the camera for the pixel;If judging the pixel is not
Bad point, then it is assumed that be normal pixel point;
When the judgement of all pixels point finishes, by all normal pixel points composition normal pixel point set.
Optionally, described according to flat field calibration factor peace field calibration coefficient threshold TFPNAnd TPRNU, each picture is judged one by one
Whether vegetarian refreshments is that bad point includes:
The flat field calibration factor of all pixels point is averaged, fixed pattern noise mean value mean (FPN) and light are obtained
Electroresponse inconsistency Coefficient Mean mean (PRNU);
The deviation between the flat field calibration factor of each pixel and average value is calculated separately, and deviation and flat field are calibrated
Coefficient threshold is compared;If meeting formula
Then judge the pixel for bad point;If being unsatisfactory for above-mentioned formula, judge the pixel for normal pixel.
Optionally, the flat field calibration factor threshold value TFPN=300%, TPRNU=50%.
Optionally, the dark field plot is camera in darkroom, the figure that light source is all closed and when time for exposure minimum acquires
Picture;The bright field figure is camera under constant exposure time, shoots flat-plate light source, gray value of image is made to reach image saturation value
The image acquired when 80%.
Optionally, the execution image acquisition process, obtains a dark field plot and a bright field figure includes:
At least three dark field plots and at least three bright field figures are shot respectively;
All average gray of dark field plots for shooting and obtaining are calculated, as performing the next step rapid dark field plot;
All average gray of bright field figures for shooting and obtaining are calculated, as performing the next step rapid bright field figure.
Optionally, the flat field calibration factor includes fixed pattern noise value FPN and photoelectric respone inconsistency coefficient
PRNU, the fixed pattern noise value FPN and the corresponding inconsistency FACTOR P RNU of photoelectricity are calculated by following formula:
Wherein, IdarkAnd IlightDarkfield image and bright-field image are respectively indicated, max (-) indicates maximizing operation.
Optionally, before carrying out flat field calibration, the method also includes:
Bad point is modified using bad point correction module, bad point is made to become normal pixel point.
From the above technical scheme, this application provides a kind of combination treatment method of bad point detection peace field calibration,
Including executing image acquisition process, a dark field plot and a bright field figure are obtained;Recycle obtained dark field plot and bright field figure meter
Calculate flat field calibration factor;Then, bad point detection is carried out based on counted flat field calibration factor, rejects bad point, obtains normal pixel
Point set;Finally, carrying out flat field calibration using formula Output=(Input-FPN) * PRNU to all normal pixel points, then
Export image, wherein FPN is fixed pattern noise value, and PRNU is photoelectric respone inconsistency coefficient, and Input and Output divide
Not Biao Shi image input data and output data.Method provided by the embodiments of the present application, by real in flat field calibration process
The function of two kinds of conventional methods is effectively merged, ensure that response while simple flow by detection of the Shi Zengjia to bad point
The quality of curve, improves work efficiency.
Specific embodiment
It is a kind of flow chart of the combination treatment method of bad point detection peace field calibration provided by the present application referring to Fig. 1;
As shown in Figure 1, the embodiment of the present application provides a kind of combination treatment method of bad point detection peace field calibration, packet
It includes:
S10: image acquisition process is executed, a dark field plot and a bright field figure are obtained;It is using two o'clock in the present embodiment
What method carried out flat field calibration adopts figure process, and the acquisition for dark field plot and bright field figure, can use various ways, for example,
In a kind of possible embodiments, the dark field plot is camera in darkroom, and light source is all closed and when time for exposure minimum acquires
Image;The bright field figure is camera under constant exposure time, shoots flat-plate light source, and gray value of image is made to reach image saturation
Value 80% when the image that acquires, it is assumed that the saturation value of image is 255, then the image brightness values for needing to acquire should be 255
80%, i.e., about 204, it should be noted that the uniformity of used flat-plate light source should be at least up to 95%, to obtain quality
Higher bright field figure.
It referring to fig. 4, is the decomposition step figure of step S10 in method provided by the present application;
Further, as shown in Figure 4, in order to reduce the noise in time domain of image, in a kind of preference, step S10 can be with
It is refined as following three step by step:
S11: at least three dark field plots and at least three bright field figures are shot respectively;The number of shooting is more, more can be effective
The interference of noise in time domain is excluded, but since multiple shooting can reduce working efficiency, preferably each shooting three in the present embodiment
Zhang Tu.
S12: calculating all average gray of dark field plots for shooting and obtaining, as performing the next step rapid dark field plot;
S13: calculating all average gray of bright field figures for shooting and obtaining, as performing the next step rapid bright field figure.
It can be seen from the above, multi collect image and average, be in order to reduce noise in time domain, make eventually for
The image response curve of flat field calibration is more accurate, improves processing accuracy.
As shown in Figure 1, it after getting a dark field plot and a bright field figure, needs to carry out step S20: utilizing what is obtained
Dark field plot and bright field figure calculate flat field calibration factor;In step S20, due to the response of each photosensitive unit of imaging sensor
It is substantially linear, in this, as the premise of flat field calibration, the form of the response coordinate diagram of sensing unit can be embodied;
Specifically, the flat field calibration factor includes fixed pattern noise value FPN and photoelectric respone inconsistency coefficient
PRNU, the fixed pattern noise value FPN and the corresponding inconsistency FACTOR P RNU of photoelectricity are calculated by following formula:
Wherein, IdarkAnd IlightDarkfield image and bright-field image are respectively indicated, max (-) indicates maximizing operation.
It is that the response of method provided by the present application photosensitive unit during calculating flat field calibration factor is illustrated referring to Fig. 5
Figure;
As shown in Figure 5, due to fixed pattern noise value FPN characterization be image dark field performance, photosensitive unit is not photosensitive
In the case where gray value should minimum 0, but in fact, it may not be 0, and the effect of fixed pattern noise value FPN is exactly
The gray value of dark field plot is adjusted to 0, is indicated with the intercept of straight line in figure;And photoelectric respone inconsistency FACTOR P RNU is solved
Be the corresponding inconsistency of each photosensitive unit, be presented as the slope of straight line in figure, it can be understood as, flat field calibration in,
Make the slope of line between each photosensitive unit response point equal under the action of photoelectric respone inconsistency FACTOR P RNU, i.e. each point
It is located on the same line.Therefore, in order to guarantee the response of all photosensitive units be it is linear, corresponding one group of each photosensitive unit is flat
Field calibration coefficient.
After corresponding flat field calibration factor is calculated in all photosensitive units, step S30 is carried out: based on counted flat
Field calibration coefficient carries out bad point detection, rejects bad point, obtains normal pixel point set;The essence of the step is to carry out bad point inspection
It surveys, but is different from conventional dead pixel detection method, flat field calibration factor obtained in step S20 can be efficiently used and be used as and sentenced
The factor for determining bad point without regaining the gray value information of acquisition needed for bad point detection, effective simple flow, and improves work
Make efficiency.
It referring to fig. 2, is the decomposition step figure of step S30 in method provided by the present application;
Further, as shown in Figure 2, step S30 can be refined as the following steps:
S31: setting flat field calibration factor threshold value TFPNAnd TPRNU;Wherein, TFPNFor fixed pattern noise threshold value, TPRNUFor light
Electroresponse inconsistency coefficient threshold;Here flat field calibration factor threshold value is percentage expression, for example, when providing one group of numerical value
TFPN=300%, TPRNUWhen=50%, what is indicated is the actual measurement fixed pattern noise value and all pixels when a certain pixel
When the actual measurement fixed pattern noise average value of point is more than the 300% of average value, alternatively, the actual measurement photoelectricity when the pixel is rung
The actual measurement photoelectric respone inconsistency coefficient average value for answering inconsistency coefficient and all pixels point is more than average value
When 50%, as long as above situation occurs in alternative one, determine the pixel for bad point;When the two does not occur above situation
When, then determine that the pixel is normal pixel.
S32: according to flat field calibration factor peace field calibration coefficient threshold TFPNAnd TPRNU, judge that each pixel is one by one
No is bad point;Specifically, being the decomposition step figure of step S32 in method provided by the present application referring to Fig. 3;Decision process are as follows:
S321: the flat field calibration factor of all pixels point is averaged, and obtains fixed pattern noise mean value mean (FPN)
With photoelectric respone inconsistency Coefficient Mean mean (PRNU);
S322: the deviation between the flat field calibration factor of each pixel and average value is calculated separately, and by deviation and is put down
Field calibration coefficient threshold is compared;If meeting formula
Then judge the pixel for bad point;If being unsatisfactory for above-mentioned formula, judge the pixel for normal pixel.
As an example it is assumed that a certain pixel actual measurement flat field calibration factor FPN=65, mean (FPN)=15, TFPN=
300%, then | FPN-mean (PRNU) |=50 > 300%*15 can be determined that the pixel is bad point at this time.
S33: if judging, the pixel for bad point, in the camera by the coordinate storage of the pixel, is convenient for bad point straightening die
Block is modified bad point;If judging, the pixel is not bad point, then it is assumed that is normal pixel point;
S34: when all pixels point judgement finish, by all normal pixel points constitute normal pixel point set, next it is right
The operation of progress is carried out both for the pixel in normal pixel point set, does not include bad point, caused by avoiding bad point
Interference.
S40: flat field calibration is carried out using formula Output=(Input-FPN) * PRNU to all normal pixel points, then
Export image, wherein FPN is fixed pattern noise value, and PRNU is photoelectric respone inconsistency coefficient, and Input and Output divide
Not Biao Shi image input data and output data.
It is a kind of flow chart of the method provided by the present application under preferred embodiment referring to Fig. 6.
If the bad point detected does not correct, practical application will affect, especially industrially to the detection of defect.For
This, can be before step S40, setting steps S50: is modified using bad point correction module to bad point, becomes bad point just
Normal pixel is handled bad point with achieving the purpose that high-volume is concentrated.On how to be corrected to bad point, in this implementation
In example with no restriction, it should think, device, method with bad point calibration function are used equally in the step S50 of the present embodiment;
For example, bad point can be substituted using the normal pixel point around bad point, so that bad point position response is consistent with normal pixel point etc..
From the above technical scheme, this application discloses a kind of combination treatment method of bad point detection peace field calibration,
Including executing image acquisition process, a dark field plot and a bright field figure are obtained;It is calculated using obtained dark field plot and bright field figure
Flat field calibration factor;Bad point detection is carried out based on counted flat field calibration factor, bad point is rejected, obtains normal pixel point set;
Flat field calibration is carried out using formula Output=(Input-FPN) * PRNU to all normal pixel points, then exports image,
In, FPN is fixed pattern noise value, and PRNU is photoelectric respone inconsistency coefficient, and Input and Output respectively indicate image
Input data and output data.Method provided by the embodiments of the present application, by increasing in real time in flat field calibration process to bad point
Detection, effectively the function of two kinds of conventional methods is merged, the quality of response curve is ensure that while simple flow, mentions
High working efficiency.
Field technical staff after considering the specification and implementing the invention disclosed here, will readily occur to of the invention other
Embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Adaptive change follow general principle of the invention and including the undocumented common knowledge in the art of the present invention or
Conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following power
Benefit requires to point out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.