CN113643388A - Black frame calibration and correction method and system for hyperspectral image - Google Patents
Black frame calibration and correction method and system for hyperspectral image Download PDFInfo
- Publication number
- CN113643388A CN113643388A CN202111196941.3A CN202111196941A CN113643388A CN 113643388 A CN113643388 A CN 113643388A CN 202111196941 A CN202111196941 A CN 202111196941A CN 113643388 A CN113643388 A CN 113643388A
- Authority
- CN
- China
- Prior art keywords
- black frame
- image
- dimension
- hyperspectral
- wavelength
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000012937 correction Methods 0.000 title claims description 24
- 239000011159 matrix material Substances 0.000 claims abstract description 49
- 238000012360 testing method Methods 0.000 claims abstract description 27
- 238000013101 initial test Methods 0.000 claims abstract description 14
- 238000012545 processing Methods 0.000 claims description 20
- 239000013598 vector Substances 0.000 claims description 13
- 230000000875 corresponding effect Effects 0.000 description 20
- 238000010586 diagram Methods 0.000 description 7
- 238000012935 Averaging Methods 0.000 description 6
- 238000000701 chemical imaging Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000003595 spectral effect Effects 0.000 description 5
- 238000003705 background correction Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 4
- 238000004088 simulation Methods 0.000 description 3
- 238000010183 spectrum analysis Methods 0.000 description 3
- 239000000126 substance Substances 0.000 description 3
- 230000002596 correlated effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001816 cooling Methods 0.000 description 1
- 238000012888 cubic function Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000017525 heat dissipation Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000002203 pretreatment Methods 0.000 description 1
- 238000012887 quadratic function Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
-
- G06T5/70—
-
- G06T5/90—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Studio Devices (AREA)
- Image Input (AREA)
- Transforming Light Signals Into Electric Signals (AREA)
Abstract
The method comprises the steps of carrying out black frame collection on a shooting wave band at the same test temperature and in different exposure times, carrying out black frame collection on different test temperature sequences at the initial exposure time to obtain a corresponding black frame data set, obtaining a wavelength dimension average value and an image dimension average value from the black frame data set according to the image dimension and the wavelength dimension, respectively fitting the wavelength dimension average value and the image dimension average value based on the exposure time and the initial test temperature, and keeping the wavelength dimension average value and the image dimension average value during the initial exposure time and the initial test temperature. And acquiring a complete hyperspectral black frame image sequence matrix by using the parameters, and deducting the product of the hyperspectral black frame image sequence matrix and the digital gain from the hyperspectral image to obtain a corrected hyperspectral image. The method and the system not only can save the time for repeatedly shooting the black frame every time, but also can greatly reduce the space occupied by storage.
Description
Technical Field
The invention relates to the technical field of hyperspectral imaging and spectral analysis, in particular to a black frame calibration and correction method and system for hyperspectral images.
Background
The hyperspectral imaging technology can simultaneously obtain image information and spectral information, and can perform spectral analysis depending on spectra while distinguishing objects by combining a machine vision technology, so that the hyperspectral imaging technology is a new technology with great potential. The spectral analysis capability of the hyperspectral imaging technology comes from the fact that hyperspectrum can collect spectral information emitted by substances under different wavelengths, and the spectral information directly reflects information such as physical and chemical components of an object; the hyperspectral imaging technology can realize the full automation of target detection, component judgment and result output by combining the information of image identification, region selection and the like.
As with conventional RGB cameras, image data captured by a hyperspectral camera also requires black-frame correction (or flat-field correction) which means that the image captured by the imaging system, after passing through the correction (optics and sensors), each pixel gives the same output value at the same amount of incoming light.
This correction can be achieved by subtracting the black frame (i.e., the image data in the dark) from each frame of the electrical signal read by the sensor without any external light incident on the lens (e.g., with the lens cover on). The black frame deduction can eliminate the nonuniformity of the initial background of the image, keep the consistent corresponding relation between the light input quantity and the digital signal and remove the dark noise to a certain degree. The black frame signal (mainly including dark current and FPN) is positively correlated with temperature and exposure time, and is also correlated with gain or ISO, aperture value, and the like. Dark current and FPN vary from sensor to sensor, and the same sensor has the same FPN at different exposure times, according to which principle: and for the same sensor of the same hyperspectral camera, the corresponding FPNs under different wave bands and exposure time are the same. Therefore, the hyperspectral black frame signal data can be compressed according to the principle, or black frame signal characteristics can be extracted, and the black frame data under different wave bands do not need to be repeatedly acquired.
The black frame deduction can eliminate the nonuniformity of the initial background of the image, keep the consistent corresponding relation between the light incoming quantity and the digital signal and remove dark noise, especially FPN to a certain extent. And is therefore an important pre-treatment step. However, the hyperspectral image has large shooting data amount and takes relatively long time to shoot, if the black frame of the sensor is not processed by a hardware means and needs to be shot in real time for correction, the independent black frame needs to be deducted for each wave band, so that the total time is doubled, and the data storage amount is doubled. Meanwhile, since the exposure time may vary, the black frame cannot be stored in advance, because the amount of data that may exist is extremely large in consideration of different exposure times. Even if only black frame data for the same exposure time is considered and stored, the storage space is consumed.
Disclosure of Invention
In order to solve the technical problem that the data volume of black frame data processing of a hyperspectral image in the prior art is huge and a large amount of time is consumed, the invention provides a black frame calibration and correction method and system for a hyperspectral image, and aims to solve the problems in the prior art.
According to one aspect of the invention, a black frame calibration method for a hyperspectral image is provided, which comprises the following steps:
s1: under the same test temperature and different exposure time, black frame acquisition is carried out on the shooting wave band to obtain a black frame data setWherein, in the step (A),which represents the coordinates of the image and which,which represents the wavelength of the light emitted by the light source,represents an exposure time;
s2: obtaining a first wavelength dimension average from a set of black frame data based on an image dimension and a wavelength dimensionAnd a first image dimension averageBased on exposure time, respectivelyFitting the first wavelength dimension average values respectivelyAnd a first image dimension averageAnd the initial exposure time is keptFirst wavelength dimension average of timeAnd a first image dimension averageThe calibration data of (2);
s3: at the initial exposure timeNext, for different test temperature sequencesShooting and collecting black frames to obtain black frame matrixWherein, in the step (A),it is meant that the temperature of the different tests,;
s4: obtaining a second wavelength dimension average from the black frame data set based on the image dimension and the wavelength dimensionAnd second image dimension averageBased on the initial test temperatureFitting the second wavelength dimension average values respectivelyAnd second image dimension averageAnd testing the initial test temperatureSecond wavelength dimension average ofAnd second image dimension averageAnd storing the data into calibration data.
In some specific embodiments, the first wavelength dimension averageMean value of first image dimensionAverage value of second wavelength dimensionSecond image dimension averageWherein, in the step (A),indicating the number of bands. The random fluctuation of the noise of the individual pixels can be eliminated by the average value.
In some specific embodiments, the first wavelength dimension average is fitted in step S2And a first image dimension averageRespectively is a matrixSum vectorPolynomial function fitting is adopted.
In some specific embodiments, the second wavelength dimension average is fitted in step S4And second image dimension averageRespectively is a matrixSum vector. The function fits to the subtle changes in the fixed pattern noise of different pixels of the black frame image with exposure time.
In some specific embodiments, the method further comprises acquiring corresponding calibration data at different aperture or gain values. The black frame signals of different apertures and internal gains will be different and therefore need to be calibrated separately.
According to a second aspect of the present invention, a black frame correction method for hyperspectral images is provided, where the black frame calibration method includes:
acquiring shooting parameters of the current hyperspectral region, wherein the shooting parameters comprise digital gainsWave bandExposure timeAnd temperatureAnd loading calibration data corresponding to the current aperture and the internal gain, wherein the calibration data comprises a first wavelength dimension average valueFirst image dimension averageMatrix of fitting coefficientsSum vector;
Performing band interpolation processing on the image dimension average value;
respectively pre-generating components of a black frame in a wavelength dimension and components of the black frame in an image dimension, and combining the two components to obtain a complete hyperspectral black frame image sequence matrix;
removing a hyperspectral black frame image sequence matrix and digital gain by using a currently shot hyperspectral imageObtaining a corrected hyperspectral image.
In some specific embodiments, for a hyperspectral device without a temperature sensor, the first image dimension is averagedObtained by performing actual band interpolation processing。
In some specific embodiments, the component of the pre-generated black frame in the wavelength dimension isThe component of the pre-generated black frame in the image dimension isTherein, functionalTo representAnd exposure timeRelation, functional ofTo representAnd exposure timeThe relationship (2) of (c).
In some specific embodiments, for a hyperspectral device with a temperature sensor, the second image dimension is averagedObtained by performing actual band interpolation processing。
In some specific embodiments, the component of the pre-generated black frame in the wavelength dimension isThe component of the pre-generated black frame in the image dimension isTherein, functionalTo representAnd exposure timeRelation, functional ofTo representRelation to temperature T, functionalTo representAnd exposure timeRelation, functional ofTo representAnd temperature T.
In some specific embodiments, the combining the components of the pre-generated black frame in the wavelength dimension and the components in the image dimension to obtain the complete hyperspectral black frame image sequence matrix specifically includes: copying the components of the pre-generated black frame in the image dimension to all current bandsAnd multiplying the image data of each wave band with the component of the pre-generated black frame in the wavelength dimension at the value of the wave band to obtain a complete hyperspectral black frame image sequence matrix.
According to a third aspect of the present invention, a black frame calibration system for hyperspectral images is provided, the system comprising:
black frame data acquisition unit: the device is configured to carry out black frame acquisition on a shooting waveband at the same test temperature and in different exposure times to acquire a black frame data setWherein, in the step (A),which represents the coordinates of the image and which,display waveThe length of the utility model is long,represents an exposure time;
a calibration data acquisition unit: obtaining a first wavelength dimension average from a set of black frame data based on an image dimension and a wavelength dimensionAnd a first image dimension averageBased on exposure time, respectivelyFitting the first wavelength dimension average values respectivelyAnd a first image dimension averageAnd the initial exposure time is keptFirst wavelength dimension average of timeAnd a first image dimension averageThe calibration data of (1).
In some specific embodiments, for a hyperspectral device that does not include a temperature sensor:
the black frame data acquisition unit is further configured to detect an initial exposure timeThen, shooting and collecting black frames for different test temperature sequences to obtain a black frame matrixWherein, in the step (A),it is meant that the temperature of the different tests,;
the calibration data obtaining unit is further configured to obtain a second wavelength dimension average value from the black frame data set based on the image dimension and the wavelength dimensionAnd second image dimension averageBased on the initial test temperatureFitting the second wavelength dimension average values respectivelyAnd second image dimension averageAnd testing the initial test temperatureSecond wavelength dimension average ofAnd second image dimension averageAnd storing the data into calibration data.
In some specific embodiments, the calibration data obtaining unit is further configured to obtain corresponding calibration data at different aperture or gain values. The black frame signals of different apertures and internal gains will be different and therefore need to be calibrated separately.
According to a fourth aspect of the present invention, a black frame rectification system for hyperspectral images is provided, where the black frame calibration system as described above is utilized, and the black frame rectification system further includes:
a data acquisition unit: configuring shooting parameters for acquiring the current hyperspectral image, wherein the shooting parameters comprise digital gainsWave bandExposure timeAnd temperatureAnd loading calibration data corresponding to the current aperture and the internal gain, wherein the calibration data comprises a first wavelength dimension average valueFirst image dimension averageMatrix of fitting coefficientsSum vector;
An interpolation processing unit: the method comprises the steps of configuring and processing wave band interpolation on an image dimension average value;
a hyperspectral black frame image sequence matrix generation unit: the method comprises the steps of configuring components in the wavelength dimension and the image dimension of a black frame for pre-generation respectively, and combining the two components to obtain a complete hyperspectral black frame image sequence matrix;
a correction unit: configuring a sequence matrix and digital gain for removing a hyperspectral black frame image by using a currently shot hyperspectral imageObtaining a corrected hyperspectral image.
The method and the system for calibrating and correcting the hyperspectral image not only can save the time for repeatedly shooting the black frame every time, but also can greatly reduce the space occupied by storage. The corresponding black frame signals under different temperatures, different wave bands and different exposure time are generated by using a very small amount of pre-stored data. It has the following beneficial effects: the method has the characteristic of saving the time for shooting the hyperspectral data, and saves a large amount of hyperspectral imaging shooting time by avoiding shooting the black frame corresponding to each waveband in real time; the method has the technical characteristic of small occupied storage space. The data of corresponding different black frame signals with different exposure time, different wave bands and even different working temperatures are obtained only by calculation simulation of pre-stored extremely small amount of data (single-frame black frame images and other parameters); the method has the characteristic of high adaptability of flexible application, and the black frame generated by calculation under the method can cover corresponding black frame signals at any exposure time, any waveband and even at working temperature, and is still effective for multi-sensor hyperspectral equipment, so that the method has extremely high adaptability and extensibility and can be used under various different shooting requirements.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and together with the description serve to explain the principles of the invention. Other embodiments and many of the intended advantages of embodiments will be readily appreciated as they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale relative to each other. Like reference numerals designate corresponding similar parts.
FIG. 1 is a flow diagram of a black frame calibration method for hyperspectral images according to one embodiment of the invention;
FIG. 2 is a flowchart of a black frame calibration method for hyperspectral equipment with a temperature sensor according to a specific embodiment of the invention;
FIG. 3 is a flow chart of a black frame calibration method for hyperspectral equipment without a temperature sensor in accordance with a specific embodiment of the invention;
FIG. 4 is a flow diagram of a black frame rectification method for hyperspectral images according to one embodiment of the invention;
FIG. 5 is a flow chart of a black frame correction method of a hyperspectral device with a temperature sensor according to a specific embodiment of the invention;
FIG. 6 is a flow diagram of a black frame correction method for a hyperspectral device without a temperature sensor in accordance with a specific embodiment of the invention;
FIG. 7 is a graph of the effect of a fit of black frame means in the wavelength dimension according to one embodiment of the invention;
FIG. 8 is a graph of the corrective effect of black frame means over a certain band of image dimensions, according to one embodiment of the present invention;
FIG. 9 is a block diagram of a black frame calibration system for hyperspectral images in accordance with an embodiment of the invention;
FIG. 10 is a block diagram of a black frame rectification system for hyperspectral images in accordance with an embodiment of the invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows a flowchart of a black frame calibration method for hyperspectral images according to an embodiment of the invention, as shown in fig. 1, the method comprises the following steps:
s101: under the same test temperature and different exposure time, black frame acquisition is carried out on the shooting wave band to obtain a black frame data setWhereinWhich represents the coordinates of the image and which,which represents the wavelength of the light emitted by the light source,the exposure time is indicated.
S102: obtaining a first wavelength dimension average from a set of black frame data based on an image dimension and a wavelength dimensionAnd a first image dimension averageBased on exposure time, respectivelyFitting the first wavelength dimension average values respectivelyAnd a first image dimension averageAnd the initial exposure time is keptFirst wavelength dimension average of timeAnd a first image dimension averageThe calibration data of (1).
In a specific embodiment, the first wavelength dimension averageMean value of first image dimensionWherein, in the step (A),indicating the number of bands. The average value of the wavelength dimension reflects the fixed pattern noise FPN, random fluctuation of individual pixel noise can be eliminated by using the average value, the average value of the image dimension can obtain the average value of each frame of image, and the relation between the size of the average value and the wavelength is obtained.
In a specific embodiment, the first wavelength dimension average is fittedAnd a first image dimension averageRespectively is a matrixSum vectorPolynomial function fitting is adopted. Wherein, functional is utilizedTo representAnd at the time of exposureWorkshopRelation, functional ofTo representAnd exposure timeFitting the first wavelength dimension averageAnd a first image dimension averageRespectively is a matrixSum vectorAnd fitting all the fitting modes by adopting polynomial functions.
In an embodiment where the image sensor carries a temperature sensor, the calibration method further includes the following steps:
s103: at the initial exposure timeThen, shooting and collecting black frames for different test temperature sequences to obtain a black frame matrixWherein, in the step (A),indicating different test temperatures。
S104: obtaining a second wavelength dimension average from the black frame data set based on the image dimension and the wavelength dimensionAnd second image dimension averageBased on the initial test temperatureFitting the second wavelength dimension average values respectivelyAnd second image dimension averageAnd testing the initial test temperatureSecond wavelength dimension average ofAnd second image dimension averageAnd storing the data into calibration data.
In specific embodiments, the second and wavelength dimension averagesAnd second image dimension averageStep S102 is synchronized in the calculation method of (1). Wherein, functional is utilizedTo representRelation to temperature T, functionalTo representAnd temperature T. Fitting the second wavelength dimension averageAnd second image dimension averageRespectively is a matrixSum vector。
In some other embodiments, the steps S101-S104 are repeated at different aperture or gain values and corresponding calibration data is obtained to cope with the black frame processing of the hyperspectral image under different parameters.
With continuing reference to fig. 2, fig. 2 is a flowchart illustrating a black frame calibration method for hyperspectral equipment with a temperature sensor according to a specific embodiment of the invention, where in the case that an image sensor carries a temperature detection sensor, more accurate black frame data can be automatically obtained, and as shown in fig. 2, the method includes the following steps:
step 201: and (3) under the default aperture and internal gain (non-digital gain), placing the equipment in a temperature control box, adjusting to the common test temperature, and starting the equipment to preheat until the temperature is stable. In thatExposure ofObtaining the average temperature of the sensor under time shooting。 Andboth temperature and exposure time are calibrated to initial default values, which are preferably commonly used intermediate values to minimize the offset error of the fitting correction.
Step 202: black frame acquisition is carried out on all the photographable wave bands (such as 1nm interval) under different exposure time (such as a sequence from 1ms to 1 s), and a data set is obtained. The sampling interval of the exposure time can be adjusted according to the degree of change or the frequency of use, and the wavelength can be selected according to a specific application scene, and the wavelength which is continuous as much as possible can be taken in the working wavelength range, for example, every 1nm is taken as an interval, so that the fine correction is realized. The data setAnd sampling the traversed data set of all the photographable wave bands and the exposure time at the same ambient temperature for subsequent feature extraction and calibration. Wherein the content of the first and second substances,y represents the coordinates of the image and,which represents the wavelength of the light emitted by the light source,the exposure time is indicated.
Step 203: respectively averaging the wavelength dimension and the image dimension of the black frame set to obtainAnd. In particular, the method comprises the following steps of,, (ii) a Average value of wavelength dimensionReflecting the FPN (fixed pattern noise),representing the number of bands. Wherein the random rise and fall of the individual pixel noise is eliminated by the averaging method; average of image dimensionsThe average value of each frame image is obtained, and the relation between the average value and the wavelength is obtained.
Step 204: to pairFitting separatelyAndthe fitting coefficients are expressed as vectorsSum matrixUsing a functionAndrespectively represent 、And exposure timeTo preserve the relationship ofTime of flightAndvalue of (A)、. To pairThe fitting uses a second order polynomial function fitting. To pairThe fitting is the slight change of FPN of different pixels of the black frame image along with the exposure time, generally, the longer the exposure time is, the more the hot pixels are, the larger the fluctuation of dark noise is, the change relation can be fitted by a polynomial function, and if the third-order polynomial fitting is used, the dimension size of the obtained coefficient matrix bxyt is X, Y and 3.
Step 205: adjusting the temperature of the temperature control box to other different test temperature sequences to be setSelecting the exposure time after the temperature is stableTaking black frames to obtain the average temperature sequence of the sensorAnd corresponding black frame matrix。
Step 206: respectively collecting black framesAveraging the image dimension and the wavelength dimension to obtainAnd. The method used in this step is the same as that in step 203.
Step 207: to pairFitting separatelyAndthe fitting coefficients are respectively recorded asAndusing a functionAndrespectively represent、And sensor temperatureTo preserve the relationship ofValue of timeAnd. And obtaining the exposure timeAnd the average valueAndthe variation relationship is similarly performed, and the average value of the new data set in the image and wavelength dimensions and the sensor temperature are obtainedThe relationship between the changes of (c).
Step 208: if there are other aperture or internal gain values, repeating all the above calibration processes and storing corresponding data under different aperture or gain values. Because the black frame signals under different apertures and internal gains are different, if the sensor of the hyperspectral camera has other aperture values or gain values (non-digital gain), the steps are required to be repeated for calibration respectively.
Fig. 3 is a flowchart illustrating a black frame calibration method for a hyperspectral device without a temperature sensor according to a specific embodiment of the invention, which takes an FPI hyperspectral device without a temperature sensor (which has non-adjustable internal gain and aperture value and is embedded with two sensors for expansion of the shooting band, and the resolution of each sensor is 1024 × 1024) as an example to attempt to automatically generate a corresponding black frame and obtain flat field correction. By using the method, automatic black frame generation is realized by using a small amount of pre-stored data under different shooting scenes (such as 400-700nm, 100 wave bands and 10ms of exposure time of each frame as an example) and a black frame removing effect of hyperspectral image flat field correction is obtained. As shown in fig. 3, the method comprises the steps of:
step 301: the device is started to be preheated to a stable temperature under default aperture, internal gain (non-digital gain) and use temperature (including operation of a heat dissipation device such as a fan, a water cooling device and the like).
Step 302: under different exposure time (sequence from 1ms to 1 s), black frame acquisition is carried out on all the photographable wave bands of a first sensor in the equipment to obtain a data set. Specifically, in this embodiment, 1, 10, 20, 30, 50, 100, 200, 300, 500, and 1000ms exposure sequences are used, black frame acquisition (400 + 700nm, 1nm interval) is performed on all the photographable bands of the first sensor in the device, and since the hyperspectral device is spliced by two sensors, it needs to be calibrated separately, and one of the two sensors is calibrated in its operating band.
Step 303: respectively averaging the image dimensionality and the wavelength dimensionality of the black frame set to obtainAnd. In particular, the method comprises the following steps of,, whereinIs a matrix of size 1024 x 10,is a matrix of size 300 x 10.
Step 304: to pairFittingBy quadratic functionsFittingAnd integration timeThe fitting coefficient is recorded as a vector(300*3). RetentionTime of flightValue of (A)。
Step 305: to pairFittingUsing cubic functionsFittingAnd integration timeThe fitting coefficient is recorded as a matrix(1024*1024*4). RetentionTime of flightValue of (A). In a specific embodiment, fig. 7 shows the fitting effect of two sensor black frame means in the wavelength dimension.
Step 306: and repeating the calibration process and storing corresponding data for another sensor in the hyperspectral camera, and combining and storing the data of the two sensors as the calibration data of the equipment.
Fig. 4 shows a flowchart of a black frame rectification method for a hyperspectral image according to an embodiment of the invention, and as shown in fig. 4, the rectification method comprises:
s401: acquiring shooting parameters of the current hyperspectral region, wherein the shooting parameters comprise digital gainsWave bandExposure timeAnd temperatureAnd loading calibration data corresponding to the current aperture and the internal gain, wherein the calibration data comprises the mean value of the first image dimensionFirst wavelength dimension average valueFitting coefficientAnd。
s402: and performing band interpolation processing on the image dimension average value.
In a particular embodiment, for a hyperspectral device without a temperature sensor, the first image dimension is averagedObtained by performing actual band interpolation processing(ii) a Averaging the second image dimension for a hyperspectral device with a temperature sensorObtained by performing actual band interpolation processing。
S403: respectively pre-generating components of the black frame in the wavelength dimension and the components in the image dimension, and combining the two components to obtain a complete hyperspectral black frame image sequence matrix.
In a specific embodiment, for a hyperspectral device without a temperature sensor, the component of the pre-generated black frame in the wavelength dimension isThe component of the pre-generated black frame in the image dimension isTherein, functionalTo representAnd exposure timeRelation, functional ofTo representAnd exposure timeThe relationship (2) of (c).
In a specific embodiment, for a hyperspectral device with a temperature sensor, the component of the pre-generated black frame in the wavelength dimension isThe component of the pre-generated black frame in the image dimension isTherein, functionalTo representAnd exposure timeRelation, functional ofTo representRelation to temperature T, functionalTo representAnd exposure timeRelation, functional ofTo representAnd temperature T.
In a specific embodiment, the components of the pre-generated black frame in the image dimension are copied to all current bandsAnd multiplying the image data of each wave band with the component of the pre-generated black frame in the wavelength dimension at the value of the wave band to obtain a complete hyperspectral black frame image sequence matrix.
S404: removing a hyperspectral black frame image sequence matrix and digital gain by using a currently shot hyperspectral imageObtaining a corrected hyperspectral image.
With continuing reference to FIG. 5, FIG. 5 is a flowchart illustrating a black frame correction method for a hyperspectral device carrying a temperature sensor according to a specific embodiment of the invention, as shown in FIG. 5, comprising the steps of:
step 501: acquiring shooting parameters of the current hyperspectral image: gain ofBand of wavelengthsExposure timeTemperature of the sensor。
Step 502: loading the pre-stored value corresponding to the current aperture and the internal gain、 Sum coefficient、 。
Step 503: to pairIs processed by band interpolation to obtain. Namely realityThe shooting wave band can be a part of the shooting wave band range of the hyperspectral equipment or a plurality of certain wave bands, and the actual shooting wave band is obtained in an interpolation modeCorresponding to;
Step 504: the component of the pre-generated black frame in the wavelength dimension is
. The formula gives the data simulation calculated from previous calibration and fitting that at the actual exposure time,and operating temperatureIs as followsAnd (4) components.
Step 505: the component of the pre-generated black frame in the image dimension is
. The formula gives the data simulation calculated from previous calibration and fitting that at the actual exposure time,and operating temperatureIs as followsAnd (4) components.
Step 506:complete pre-generated hyperspectral black frameIs composed ofAndand dimension filling the obtained three-dimensional matrix. Grouping black frame components of image dimensionsCopy to all current bandsMultiplying the image data of each wave band by the value (as a gain coefficient) of the black frame component of the wavelength dimension in the wave band to obtain a complete three-dimensional hyperspectral black frame array。
Step 507: subtracting the currently shot hyperspectral image* And obtaining the hyperspectral image after the black frame correction.
In another embodiment, fig. 6 is a flowchart illustrating a black frame correction method for a hyperspectral device without a temperature sensor according to a specific embodiment of the invention, and when a complete black frame characteristic calibration is established and necessary data (one frame of image data, one piece of spectral data and two sets of polynomial fitting parameters) are stored as in the calibration method in fig. 3, the hyperspectral data captured by the device can be subsequently used for automatic black frame generation and correction. As shown in FIG. 6, assume that the current shooting band sequence wact has 200 wavelengths, exposureLight time ofThe rectification of each sensor comprises the following steps:
step 601: obtaining the shooting parameters of the current hyperspectral camera, including digital gainWave bandAnd exposure time。
Step 604: the component of the pre-generated black frame in the wavelength dimension is
Step 605: the component of the pre-generated black frame in the image dimension is
Step 606: complete pre-generated hyperspectral black frameIs composed ofAndand dimension filling the obtained three-dimensional matrix. Combining the two components obtained aboveAndand obtaining a complete matrix of the hyperspectral black frame image sequence. The specific method comprises the following steps: grouping black frame components of image dimensionsCopy to all current bandsAnd combining the image data of each band with the black frame component of the wavelength dimensionMultiplying the values (as gain coefficients) of the wave bands to obtain a complete three-dimensional hyperspectral black frame arrayIts dimension size is 1024 x 200.
Step 607: subtracting the currently shot hyperspectral image* And obtaining the high spectral data after the black frame correction from the same sensor. The data from another sensor is processed by the same calculation according to the steps, and finally the current shooting wave band sequence is obtainedAnd exposure timeAnd (5) correcting the hyperspectral image by using the complete black frame. In a specific embodiment, fig. 8 shows the correction effect of the black frame on a certain wave band of the image dimension, and the hyperspectral image after the black frame is removed is obtained.
With continuing reference to fig. 9, fig. 9 is a schematic diagram of a frame of a black frame calibration system for hyperspectral images according to an embodiment of the invention, and as shown in fig. 9, the system includes a black frame data acquisition unit 701 and a calibration data acquisition unit 702, where the black frame data acquisition unit 701 is configured to perform black frame acquisition on a shooting waveband at the same test temperature and at different exposure times to acquire a black frame data setWherein, in the step (A),which represents the coordinates of the image and which,which represents the wavelength of the light emitted by the light source,represents an exposure time; at the initial exposure timeThen, shooting and collecting black frames for different test temperature sequences to obtain a black frame matrixWherein, in the step (A),it is meant that the temperature of the different tests,. The calibration data obtaining unit 702 is configured to obtain a first wavelength dimension average value from the set of black frame data based on the image dimension and the wavelength dimensionAnd a first image dimension averageBased on exposure time, respectivelyFitting the first wavelength dimension average values respectivelyAnd a first image dimension averageAnd the initial exposure time is keptFirst wavelength dimension average of timeAnd a first image dimension average(ii) a Obtaining from the black frame data set an image dimension and a wavelength dimension basedMean value of two wavelength dimensionsAnd second image dimension averageBased on the initial test temperatureFitting the second wavelength dimension average values respectivelyAnd second image dimension averageAnd maintaining the initial test temperatureSecond wavelength dimension average ofAnd second image dimension average。
Fig. 10 is a schematic diagram of a framework of a black frame rectification system for hyperspectral images according to an embodiment of the invention, and as shown in fig. 10, the system further includes a data acquisition unit 801, an interpolation processing unit 802, a hyperspectral black frame image sequence matrix generation unit 803, and a rectification unit 804 on the basis of the relevant calibration data acquired by the black frame calibration system in fig. 9. The data acquisition module 801 is configured to acquire shooting parameters of a current hyperspectral region, where the shooting parameters include digital gainsWave bandExposure timeAnd temperatureAnd loading calibration data corresponding to the current aperture and the internal gain, wherein the calibration data comprises a first wavelength dimension average valueFirst image dimension averageMatrix of fitting coefficientsSum vector(ii) a The interpolation processing module 802 is configured to average the second image dimensionObtained by performing band interpolation processing(ii) a The hyperspectral black frame image sequence matrix generation unit 803 is configured to respectively pre-generate components of a black frame in a wavelength dimension and components in an image dimension, and combine the two components to obtain a complete hyperspectral black frame image sequence matrix; the rectification unit 804 is configured to remove the hyperspectral black frame image sequence matrix and the digital gain by using the currently shot hyperspectral imageObtaining a corrected hyperspectral image.
According to the method and the system for calibrating and correcting the black frame in the hyperspectral image, after the black frame data of the sensor are calibrated and extracted, the required black frame data are automatically calculated and generated, the same black frame characteristic data shared by multiple frames is extracted for black frame or flat field correction according to the characteristic that the same hyperspectral image sensor can shoot multiple frames, real-time black frame deduction processing is carried out, and the shooting time of the hyperspectral sensor for black frame correction is greatly saved. Through the characteristics of the black frame signal, the change rule of the black frame signal under different exposure time, different wave bands and different sensor temperatures is found, a small amount of necessary information is extracted to serve as pre-stored data, the complete hyperspectral black frame data under different shooting parameter scenes are reconstructed in real time, and the pre-stored data space is greatly saved. The pre-stored single-frame black frame data is the result of multi-frame averaging, the fixed noise mode of the sensor is directly reflected, and the influence of random thermal noise is reduced.
The above description is only for the specific embodiment of the present invention or the description thereof, and the protection scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the protection scope of the present invention. The protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (16)
1. A black frame calibration method for a hyperspectral image is characterized by comprising the following steps:
s1: under the same test temperature and different exposure time, black frame acquisition is carried out on the shooting wave band to obtain a black frame data setWherein, in the step (A),which represents the coordinates of the image and which,which represents the wavelength of the light emitted by the light source,represents an exposure time;
s2: obtaining a first wavelength dimension average from the set of black frame data based on an image dimension and a wavelength dimensionAnd a first image dimension averageBased on exposure time, respectivelyFitting the first wavelength dimension average values separatelyAnd a first image dimension averageAnd the initial exposure time is keptFirst wavelength dimension average of timeAnd a first image dimension averageThe calibration data of (1).
2. The black frame calibration method for the hyperspectral image according to claim 1, wherein for the hyperspectral equipment including the temperature sensor, the method further comprises:
at the initial exposure timeThen, shooting and collecting black frames for different test temperature sequences to obtain a black frame matrixWherein, in the step (A),it is meant that the temperature of the different tests,;
s4: obtaining a second wavelength dimension average from the black frame data set based on an image dimension and a wavelength dimensionAnd second image dimension averageBased on the initial test temperatureFitting the second wavelength dimension average values separatelyAnd second image dimension averageAnd testing the initial test temperatureSecond wavelength dimension average ofAnd second image dimension averageAnd storing the data into the calibration data.
3. A black frame calibration method for hyperspectral images according to claim 2, wherein the first wavelength dimension averageThe first image dimension averageAverage value of said second wavelength dimensionThe second image dimension averageWherein, in the step (A),indicating the number of bands.
6. A black frame calibration method for hyperspectral images according to claim 1 or 2, characterized by further comprising acquiring corresponding calibration data at different aperture or gain values.
7. A black frame correction method for hyperspectral images, which utilizes the black frame calibration method of any one of claims 1 to 5, and is characterized by comprising the following steps:
acquiring shooting parameters of the current hyperspectral region, wherein the shooting parameters comprise digital gainsWave bandExposure timeAnd temperatureAnd loading calibration data corresponding to the current aperture and the internal gain, wherein the calibration data comprises the mean value of the dimensionality of the first imageFirst wavelength dimension average valueFitting coefficientAnd;
performing band interpolation processing on the image dimension average value;
respectively pre-generating components of a black frame in a wavelength dimension and components of the black frame in an image dimension, and combining the two components to obtain a complete hyperspectral black frame image sequence matrix;
9. A black frame rectification method for hyperspectral images according to claim 8, characterized in that the component of the pre-generated black frame in the wavelength dimension isThe component of the pre-generated black frame in the image dimension isTherein, functionalTo representAnd exposure timeRelation, functional ofTo representAnd exposure timeThe relationship (2) of (c).
11. A black frame rectification method for hyperspectral images according to claim 10, characterized in that the component of the pre-generated black frame in the wavelength dimension isThe component of the pre-generated black frame in the image dimension isTherein, functionalTo representAnd exposure timeRelation, functional ofTo representRelation to temperature T, functionalTo representAnd exposure timeRelation, functional ofTo representAnd temperature T.
12. The black frame correction method for the hyperspectral image according to claim 7, wherein the step of combining the components of the pre-generated black frame in the wavelength dimension and the components in the image dimension to obtain a complete hyperspectral black frame image sequence matrix specifically comprises the following steps: copying the components of the pre-generated black frame in the image dimension to all current bandsAnd multiplying the image data of each wave band with the component of the pre-generated black frame in the wavelength dimension at the value of the wave band to obtain a complete hyperspectral black frame image sequence matrix.
13. A black frame calibration system for hyperspectral images, comprising:
black frame data acquisition unit: the device is configured to carry out black frame acquisition on a shooting waveband at the same test temperature and in different exposure times to acquire a black frame data setWherein, in the step (A),which represents the coordinates of the image and which,which represents the wavelength of the light emitted by the light source,represents an exposure time;
a calibration data acquisition unit: obtaining a first wavelength dimension average from the set of black frame data based on an image dimension and a wavelength dimensionAnd a first image dimension averageBased on exposure time, respectivelyFitting the first wavelength dimension average values separatelyAnd a first image dimension averageAnd the initial exposure time is keptFirst wavelength dimension average of timeAnd a first image dimension averageThe calibration data of (1).
14. A black frame calibration system for hyperspectral images according to claim 13, wherein for a hyperspectral device that does not include a temperature sensor:
the black frame data acquisition unit is further configured to detect an initial exposure timeThen, shooting and collecting black frames for different test temperature sequences to obtain a black frame matrixWherein, in the step (A),it is meant that the temperature of the different tests,;
the calibration data acquisition unit is further configured to obtain a second wavelength dimension average from the set of black frame data based on an image dimension and a wavelength dimensionAnd second image dimension averageBased on the initial test temperatureFitting the second wavelength dimension average values separatelyAnd second image dimension averageAnd testing the initial test temperatureSecond wavelength dimension average ofAnd second image dimension averageAnd storing the data into the calibration data.
15. A black frame calibration system for hyperspectral images according to claim 13, wherein the calibration data acquisition unit is further configured to acquire corresponding calibration data at different aperture or gain values.
16. A black frame rectification system for hyperspectral images, using the black frame calibration system of any of claims 13-15, further comprising:
a data acquisition unit: configuring shooting parameters for acquiring the current hyperspectral image, wherein the shooting parameters comprise digital gainsWave bandExposure timeAnd temperatureAnd loading calibration data corresponding to the current aperture and the internal gain, wherein the calibration data comprises a first wavelength dimension average valueFirst image dimension averageMatrix of fitting coefficientsSum vector;
An interpolation processing unit: the method comprises the steps of configuring and processing wave band interpolation on an image dimension average value;
a hyperspectral black frame image sequence matrix generation unit: the method comprises the steps of configuring components in the wavelength dimension and the image dimension of a black frame for pre-generation respectively, and combining the two components to obtain a complete hyperspectral black frame image sequence matrix;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111196941.3A CN113643388B (en) | 2021-10-14 | 2021-10-14 | Black frame calibration and correction method and system for hyperspectral image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111196941.3A CN113643388B (en) | 2021-10-14 | 2021-10-14 | Black frame calibration and correction method and system for hyperspectral image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113643388A true CN113643388A (en) | 2021-11-12 |
CN113643388B CN113643388B (en) | 2022-02-22 |
Family
ID=78426882
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111196941.3A Active CN113643388B (en) | 2021-10-14 | 2021-10-14 | Black frame calibration and correction method and system for hyperspectral image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113643388B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012053521A1 (en) * | 2010-10-18 | 2012-04-26 | 株式会社トプコン | Optical information processing device, optical information processing method, optical information processing system, and optical information processing program |
US20130016284A1 (en) * | 2011-07-12 | 2013-01-17 | Xerox Corporation | Hyperspectral image reconstruction via a compressed sensing framework |
US20140085622A1 (en) * | 2012-09-27 | 2014-03-27 | Northrop Grumman Systems Corporation | Three-dimensional hyperspectral imaging systems and methods using a light detection and ranging (lidar) focal plane array |
CN106952234A (en) * | 2017-02-27 | 2017-07-14 | 清华大学 | A kind of EO-1 hyperion computation decoupling method |
CN107133976A (en) * | 2017-04-24 | 2017-09-05 | 浙江大学 | A kind of method and apparatus for obtaining three-dimensional hyperspectral information |
CN109389647A (en) * | 2018-09-04 | 2019-02-26 | 中国地质大学(武汉) | A kind of camera shooting angle Calibration Method, equipment and storage equipment |
US20190182440A1 (en) * | 2017-12-13 | 2019-06-13 | The Hong Kong Research Institute Of Textiles And Apparel Limited | Multispectral color imaging device based on integrating sphere lighting and calibration methods thereof |
CN111445469A (en) * | 2020-04-15 | 2020-07-24 | 天津商业大学 | Hyperspectrum-based apple damage parameter lossless prediction method after impact |
CN112381882A (en) * | 2020-11-04 | 2021-02-19 | 山东大学 | Unmanned aerial vehicle image automatic correction method carrying hyperspectral equipment |
CN113436096A (en) * | 2021-06-24 | 2021-09-24 | 南京林业大学 | Push-broom hyperspectral imaging strip noise elimination method based on pixel calibration |
-
2021
- 2021-10-14 CN CN202111196941.3A patent/CN113643388B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012053521A1 (en) * | 2010-10-18 | 2012-04-26 | 株式会社トプコン | Optical information processing device, optical information processing method, optical information processing system, and optical information processing program |
US20130016284A1 (en) * | 2011-07-12 | 2013-01-17 | Xerox Corporation | Hyperspectral image reconstruction via a compressed sensing framework |
US20140085622A1 (en) * | 2012-09-27 | 2014-03-27 | Northrop Grumman Systems Corporation | Three-dimensional hyperspectral imaging systems and methods using a light detection and ranging (lidar) focal plane array |
CN106952234A (en) * | 2017-02-27 | 2017-07-14 | 清华大学 | A kind of EO-1 hyperion computation decoupling method |
CN107133976A (en) * | 2017-04-24 | 2017-09-05 | 浙江大学 | A kind of method and apparatus for obtaining three-dimensional hyperspectral information |
US20190182440A1 (en) * | 2017-12-13 | 2019-06-13 | The Hong Kong Research Institute Of Textiles And Apparel Limited | Multispectral color imaging device based on integrating sphere lighting and calibration methods thereof |
CN109389647A (en) * | 2018-09-04 | 2019-02-26 | 中国地质大学(武汉) | A kind of camera shooting angle Calibration Method, equipment and storage equipment |
CN111445469A (en) * | 2020-04-15 | 2020-07-24 | 天津商业大学 | Hyperspectrum-based apple damage parameter lossless prediction method after impact |
CN112381882A (en) * | 2020-11-04 | 2021-02-19 | 山东大学 | Unmanned aerial vehicle image automatic correction method carrying hyperspectral equipment |
CN113436096A (en) * | 2021-06-24 | 2021-09-24 | 南京林业大学 | Push-broom hyperspectral imaging strip noise elimination method based on pixel calibration |
Non-Patent Citations (1)
Title |
---|
郭志明: "基于近红外光谱及成像的苹果品质无损检测方法和装置研究", 《中国优秀博硕士学位论文全文数据库(博士)农业科技辑》 * |
Also Published As
Publication number | Publication date |
---|---|
CN113643388B (en) | 2022-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7151560B2 (en) | Method and apparatus for producing calibration data for a digital camera | |
JP5374217B2 (en) | Image processing apparatus and method | |
US9332197B2 (en) | Infrared sensor control architecture | |
EP1080443B1 (en) | Improved dark frame subtraction | |
KR101154136B1 (en) | White balance calibration for digital camera device | |
CN110017904B (en) | Multispectral radiation temperature measurement method based on CCD camera | |
WO2005109853A1 (en) | Digital camera with built-in lens calibration table | |
US20080297816A1 (en) | Method and system for black-level correction on digital image data | |
CN102883108B (en) | Picture pick-up device and control method, image processing equipment and method | |
WO2011086433A1 (en) | Radiometric calibration method for infrared detectors | |
CN104221364B (en) | Imaging device and image processing method | |
US7113210B2 (en) | Incorporating pixel replacement for negative values arising in dark frame subtraction | |
CN107509044A (en) | Image combining method, device, computer-readable recording medium and computer equipment | |
US8482629B2 (en) | Processing method for a relative illumination phenomenon on a digital image and associated processing system | |
US8675101B1 (en) | Temperature-based fixed pattern noise and bad pixel calibration | |
CN110213498A (en) | Image generating method and device, electronic equipment, computer readable storage medium | |
US20080279471A1 (en) | Methods, apparatuses and systems for piecewise generation of pixel correction values for image processing | |
WO2010131210A1 (en) | A system and method for correcting non-uniformity defects in captured digital images | |
Venkateswarlu et al. | Nonuniformity compensation for IR focal plane array sensors | |
Monno et al. | N-to-sRGB mapping for single-sensor multispectral imaging | |
CN113643388B (en) | Black frame calibration and correction method and system for hyperspectral image | |
JP4250513B2 (en) | Image processing apparatus and image processing method | |
Karr et al. | Optical effects on HDR calibration via a multiple exposure noise-based workflow | |
Njuguna et al. | Field programmable gate arrays implementation of two-point non-uniformity correction and bad pixel replacement algorithms | |
Brauers et al. | Multispectral image acquisition with flash light sources |
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 |