Method and device for correcting uneven brightness of cavity

文档序号:70754 发布日期:2021-10-01 浏览:36次 中文

阅读说明:本技术 一种腔室亮度不均匀校正方法及装置 (Method and device for correcting uneven brightness of cavity ) 是由 李继锁 义清文 曹贵强 谢中文 欧阳淑兰 于 2021-07-20 设计创作,主要内容包括:本发明提出一种腔室亮度不均匀校正方法,包括读入腔室原始亮度数据;原始亮度数据的坐标标准化,得到坐标标准化的原始亮度数据;原始亮度不均匀拟合,得到亮度不均匀对应的线性函数;亮度不均匀校正,而消除数字PCR阅读过程中引入的亮度不均匀现象,使阳性腔室的亮度值均匀分布在亮度值1附近,阴性腔室的亮度值均匀分布在亮度值2附近,而提高腔室阳性率计算准确性。(The invention provides a method for correcting uneven brightness of a chamber, which comprises the steps of reading original brightness data of the chamber; standardizing the coordinates of the original brightness data to obtain the original brightness data with standardized coordinates; fitting the original brightness unevenness to obtain a linear function corresponding to the brightness unevenness; the brightness is not uniform, the phenomenon of nonuniform brightness introduced in the digital PCR reading process is eliminated, the brightness value of the positive chamber is uniformly distributed near the brightness value 1, the brightness value of the negative chamber is uniformly distributed near the brightness value 2, and the calculation accuracy of the chamber positive rate is improved.)

1. A method for correcting chamber brightness non-uniformity, comprising:

s101: reading in original brightness data of the chamber, wherein the original brightness data comprise a chamber brightness value and a coordinate value of the chamber in an image;

s102: standardizing the coordinates of the original brightness data to obtain the original brightness data after the coordinates are standardized;

s103: fitting the original brightness unevenness to obtain a fitting curve or a curved surface corresponding to the brightness unevenness;

s104: and correcting the brightness unevenness according to the fitted curve or the curved surface corresponding to the brightness unevenness.

2. The method according to claim 1, wherein the coordinate normalization of the raw brightness data comprises a chamber coordinate transformation.

3. The chamber brightness non-uniformity correction method of claim 2, wherein the chamber coordinates are transformed into: converting the coordinates of the raw brightness data from the coordinates of the full image to the coordinates in the sub-image according to the coordinates of the raw brightness data corresponding to the chamber in the full image, wherein the chamber coordinate transformation formula is as follows:

ui,j=xi,jk,l+n

vi,j=yi,jk,l+n

wherein (x)i,j,yi,j) Denotes the coordinates of the chamber with index (i, j) in the complete large graph, (u)i,j,vi,j) Denotes the coordinates in the subgraph after coordinate transformation of the chamber with index (i, j), (α)k,lk,l) And (3) representing the splicing coordinates of the subgraph with the index number of (k, l) in the complete big graph, wherein n is a natural number.

4. The chamber brightness non-uniformity correction method of claim 1, wherein the raw brightness non-uniformity fitting comprises: calculating a fitting period; calculating a fixed value in the fitting period; judging whether the fitting is abnormal; if so, repairing the abnormal calibration value; if not, the curve or the curved surface is smoothed.

5. The method according to claim 4, wherein the fitting period is determined according to the number of the single row or column of the chambers in the subgraph;

when the chambers are similar chambers, arranging the brightness values in a single fitting period in an ascending order, calculating the gradient values of the sequence, selecting one gradient value to divide the brightness values in the corresponding fitting period into two types, and respectively calculating the brightness mean values of the two types of chambers to be used as calibration values in the fitting period;

when the chambers are different, the brightness mean values of the chambers are respectively calculated, and the maximum and minimum brightness mean values are selected as calibration values in a fitting period;

judging whether the fitting is abnormal or not by adopting quadratic linear regression;

and correcting the abnormal calibration value by adopting the neighborhood value.

6. The method according to claim 1, wherein the non-uniformity of brightness is corrected by linear interpolation according to a curve or a curved surface corresponding to the non-uniformity of brightness, and a new brightness value corresponding to the chamber is determined.

7. The chamber brightness non-uniformity correction method of claim 1, wherein the brightness non-uniformity correction process comprises: calculating a reference value of a fitting curve or a curved surface corresponding to uneven brightness; fitting a straight line by adopting a least square method, and expanding a fitting curve or a curved surface corresponding to uneven brightness; detecting whether the extension is abnormal; if so, assigning the slope of the fitting straight line as 0, and assigning the intercept as a brightness mean value; if not, linear interpolation is adopted to correct the brightness.

8. The chamber brightness non-uniformity correction method according to claim 7, wherein the formula for calculating the reference value of the fitting curve or curved surface corresponding to the brightness non-uniformity is:

wherein, ciIs a coefficient, ViIs the value on the fitted curve or surface;

adopting a least square method to fit a straight line, wherein a fitting curve or a curved surface corresponding to uneven extension brightness is as follows: intercepting the head or tail data of the section of the fitting curve or the curved surface in one direction, performing linear fitting on the intercepted data by adopting a least square method to obtain a fitting straight line, and expanding the coverage range of the fitting curve or the curved surface corresponding to uneven brightness;

detecting whether the extension is abnormal is as follows: judging whether the expansion is abnormal or not by fitting the slope of the straight line;

the formula for calculating the corrected brightness value is:

wherein L isi,j,li,jCorrected and original brightness values, V, of the chamber, respectively index (i, j)b1,Vb2For reference values of fitted curves or surfaces corresponding to uneven brightness, U1,U2The corresponding fitted value of the chamber brightness on the fitted curve or surface is the index (i, j).

9. A luminance unevenness correction apparatus, comprising:

the normalizing unit is used for receiving the original brightness data of the chamber and normalizing the coordinates of the original brightness data to obtain the original brightness data with normalized coordinates;

the fitting unit is used for receiving the original brightness data with the standardized coordinates and fitting a fitting curve or a curved surface corresponding to uneven brightness according to the original brightness data with the standardized coordinates;

and the correcting unit is used for receiving the fitted curve or curved surface corresponding to the uneven brightness and determining a new brightness value corresponding to the chamber according to the fitted curve or curved surface corresponding to the uneven brightness.

10. A luminance unevenness correction apparatus, comprising: a memory having stored thereon computer instructions operable to execute the chamber brightness non-uniformity correction method of any of claims 1-7, and a processor.

Technical Field

The invention relates to the technical field of biological detection, in particular to a method for correcting uneven brightness of a cavity.

Background

Digital PCR (digital PCR, dPCR) is a quantitative analysis technique, in which a PCR reaction system containing target molecules is distributed into tens of thousands of independent chambers to realize single-molecule template PCR amplification, a chamber containing a nucleic acid molecule template after amplification can emit a fluorescence signal, i.e., a positive reaction chamber, and a chamber not emitting a fluorescence signal, i.e., a negative reaction chamber, and the absolute concentration of the target molecules is finally calculated according to the poisson distribution principle and the proportion of the positive chambers (the positive rate is the number of the positive reaction chambers/(the number of the positive reaction chambers + the number of the negative reaction chambers)).

The analysis result of the digital PCR is obtained by calculation according to the Poisson distribution principle and the positive rate, so the accuracy of the positive rate determines the accuracy of the analysis result. However, the conventional positive rate calculation method has many problems, for example, taking a biochip as an example, a CCD camera is used to capture an image of the biochip during digital PCR reading, and information contained in the image is analyzed by an algorithm. The biochip comprises a certain number of positive chambers and a certain number of negative chambers, and theoretically, the brightness values of the positive chambers are uniformly distributed around a brightness value 1, and the brightness values of the negative chambers are uniformly distributed around a brightness value 2. Because the CCD camera has uneven brightness during the process of taking an image, the brightness value obtained after the analysis by the algorithm will have a difference from the true value, and the brightness value of the positive chamber in the analysis result is not uniformly distributed around the brightness value 1 any more, but follows the uneven change of the brightness of the image, and the brightness value of the negative chamber shows a characteristic similar to that of the positive chamber, so that the positive reaction chamber and the negative reaction chamber cannot be correctly distinguished by the threshold, which causes the reduction of the calculation accuracy of the chamber positive rate and the reduction of the accuracy of the digital PCR, please refer to the original brightness distribution diagram of the chamber obtained by the prior art shown in fig. 1.

Therefore, a method capable of eliminating the uneven brightness phenomenon introduced in the digital PCR reading process is urgently needed, so that the brightness values of the positive chambers are uniformly distributed near the brightness value 1, the brightness values of the negative chambers are uniformly distributed near the brightness value 2, and the calculation accuracy of the positive rate of the chambers is improved.

Disclosure of Invention

Aiming at the problems in the prior art, the invention provides a method for correcting uneven brightness of a chamber, which comprises the following steps: s101: reading in original brightness data of the chamber, wherein the original brightness data comprise a chamber brightness value and a coordinate value of the chamber in an image; s102: standardizing the coordinates of the original brightness data to obtain the original brightness data after the coordinates are standardized; s103: fitting the original brightness unevenness to obtain a fitting curve or a curved surface corresponding to the brightness unevenness; s104: and correcting the brightness unevenness according to the fitted curve or the curved surface corresponding to the brightness unevenness.

Further, the coordinate normalization of the raw luminance data includes a chamber coordinate transformation.

Further, the chamber coordinates are transformed to: converting the coordinates of the raw brightness data from the coordinates of the full image to the coordinates in the sub-image according to the coordinates of the raw brightness data corresponding to the chamber in the full image, wherein the chamber coordinate transformation formula is as follows:

ui,j=xi,jk,l+n

vi,j=yi,jk,l+n

wherein (x)i,j,yi,j) Denotes the coordinates of the chamber with index (i, j) in the complete large graph, (u)i,j,vi,j) Denotes the coordinates in the subgraph after coordinate transformation of the chamber with index (i, j), (α)k,l,βk,l) And (3) representing the splicing coordinates of the subgraph with the index number of (k, l) in the complete big graph, wherein n is a natural number.

Further, the raw luminance non-uniformity fitting includes: calculating a fitting period; calculating a fixed value in the fitting period; judging whether the fitting is abnormal; if so, repairing the abnormal calibration value; if not, the curve or the curved surface is smoothed.

Further, determining a fitting period according to the number of the cavities in a single row or a single column in the subgraph;

when the chambers are similar chambers, arranging the brightness values in a single fitting period in an ascending order, calculating the gradient values of the sequence, selecting one gradient value to divide the brightness values in the corresponding fitting period into two types, and respectively calculating the brightness mean values of the two types of chambers to be used as calibration values in the fitting period;

when the chambers are different, the brightness mean values of the chambers are respectively calculated, and the maximum and minimum brightness mean values are selected as calibration values in a fitting period;

judging whether the fitting is abnormal or not by adopting quadratic linear regression;

and correcting the abnormal calibration value by adopting the neighborhood value.

Furthermore, according to the fitted curve or curved surface corresponding to the fitted uneven brightness, the uneven brightness is corrected by adopting a linear interpolation method, and a new brightness value corresponding to the chamber is determined.

Further, the luminance unevenness correcting process includes: calculating a reference value of a fitting curve or a curved surface corresponding to uneven brightness; fitting a straight line by adopting a least square method, and expanding a fitting curve or a curved surface corresponding to uneven brightness; detecting whether the extension is abnormal; if so, assigning the slope of the fitting straight line as 0, and assigning the intercept as a brightness mean value; if not, linear interpolation is adopted to correct the brightness.

Further, the formula for calculating the reference value of the fitting curve or curved surface corresponding to the uneven brightness is:

wherein, ciExpressed as a coefficient, ViIs the value on the fitted curve or surface;

adopting a least square method to fit a straight line, wherein a fitting curve or a curved surface corresponding to uneven extension brightness is as follows: intercepting the head or tail data of a section of the fitting curve or the curved surface, performing linear fitting on the intercepted data by adopting a least square method to obtain a fitting straight line, and expanding the coverage range of the fitting curve or the curved surface corresponding to uneven brightness;

detecting whether the extension is abnormal is as follows: judging whether the expansion is abnormal or not by fitting the slope of the straight line;

the formula for calculating the corrected brightness value is:

wherein L isi,j,li,jCorrected and original brightness values, V, of the chamber, respectively index (i, j)b1,Vb2For reference values of fitted curves or surfaces corresponding to uneven brightness, U1,U2The corresponding fitted value of the chamber brightness on the fitted curve or surface is the index (i, j).

The present application also provides a luminance unevenness correction apparatus, including: the normalizing unit is used for receiving the original brightness data of the chamber and normalizing the coordinates of the original brightness data to obtain the original brightness data with normalized coordinates; the fitting unit is used for receiving the original brightness data with the standardized coordinates and fitting a fitting curve or a curved surface corresponding to uneven brightness according to the original brightness data with the standardized coordinates; and the correcting unit is used for receiving the fitted curve or curved surface corresponding to the uneven brightness and determining a new brightness value corresponding to the chamber according to the fitted curve or curved surface corresponding to the uneven brightness.

The present application further provides a computer-readable storage medium, having stored thereon computer instructions, which when executed perform the above-mentioned method for correcting uneven chamber brightness.

The present application also provides a luminance unevenness correction apparatus, including: the device comprises a memory and a processor, wherein the memory is stored with computer instructions which are used for executing the chamber brightness unevenness correction method when in operation.

Compared with the prior art, the invention has the beneficial effects that: and performing coordinate transformation according to the position coordinate corresponding to the chamber brightness data to obtain standardized brightness data, fitting a fitting curve or a curved surface corresponding to the uneven brightness, and calculating to obtain a corrected brightness value. According to the corrected chamber brightness value, the positive chamber and the negative chamber can be clearly distinguished, the accuracy of the positive rate is improved, the accuracy of the digital PCR detection result is further improved, the problem caused by uneven brightness is eliminated, the accuracy of the digital PCR detection result can be improved, the brightness value of the positive chamber is uniformly distributed near the brightness value 1, the brightness value of the negative chamber is uniformly distributed near the brightness value 2, and the reliability and stability of the digital PCR can be improved.

Drawings

Fig. 1 is a schematic diagram of the original brightness distribution of a chamber obtained by the prior art.

FIG. 2 is a flowchart illustrating a method for correcting uneven brightness in a chamber according to an embodiment of the present invention.

FIG. 3 is a schematic diagram of biochip image subgraph distribution.

Fig. 4 is a flowchart illustrating the process of normalizing the coordinates of the raw luminance data according to an embodiment of the invention.

FIG. 5 is a flow chart of luminance non-uniformity fitting according to an embodiment of the present invention.

FIG. 6 is a flowchart illustrating a luminance nonuniformity correction method according to an embodiment of the present invention.

Fig. 7 is a schematic diagram of the chamber luminance distribution obtained by the luminance nonuniformity correction method according to the embodiment of the invention.

Fig. 8 is a schematic structural diagram of a luminance nonuniformity correction apparatus according to an embodiment of the invention.

Detailed Description

The technical solutions in the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.

The inventor researches and discovers that: according to the actual physical law, the degree of the nonuniform brightness of the chamber existing in the process of shooting the image by the CCD camera and the brightness of the chamber have a strong correlation, and if the nonuniform brightness of the chamber and the strong correlation can be represented, the real brightness of the chamber, namely the corrected brightness, can be obtained by calculation according to the brightness of the chamber.

Based on this, an embodiment of the present invention provides a method for correcting uneven chamber brightness, and in particular, referring to a flowchart of a method for correcting uneven chamber brightness according to an embodiment of the present invention shown in fig. 2, the method for correcting uneven chamber brightness of the present application includes:

s101: reading in original brightness data of the chamber, wherein the original brightness data comprise a chamber brightness value and a coordinate value of the chamber in an image;

in the digital PCR reading process, a biochip image is shot by a CCD camera, the brightness of all chambers in the image is analyzed by an algorithm, the brightness is the average value of the brightness of all pixels corresponding to the chamber area in the image, and the chamber brightness value and the coordinate value of the chamber in the image are the original brightness data which need to be read in by the method. And the original brightness data of the chamber is used as a processing object of the correction method of the uneven brightness of the chamber.

Further, the reading-in chamber raw brightness data is as follows: reading in the brightness data of the positive chamber and the negative chamber obtained by the digital PCR analysis. In a specific implementation, the corrected chamber brightness may be the brightness of any one of the FAM channel, CY5 channel, ROX channel, HEX channel, AF700 channel. It is understood that the corrected chamber brightness may also be brightness of other channel chambers, and is not limited to the above five channels, which is not described herein.

In implementations, various algorithms may be employed to analyze the raw brightness data obtained for the chamber. In practical application, the image is subjected to Hough transform to calculate the area where the circular chamber is located, and then the brightness mean value and the coordinate mean value of all pixels in the area where the chamber is located are counted to be the original brightness data of the chamber. Or carrying out binarization processing on the image, marking an area where the circular cavity is located, and then counting the brightness mean value and the coordinate mean value of all pixels in the area where the cavity is located, namely the original brightness data of the cavity. And performing target identification on the image by adopting a neural network, identifying the area of the chamber in the image, and then counting the brightness mean value and the coordinate mean value of all pixels in the area of the chamber, namely the original brightness data of the chamber. It will be appreciated that there may be other algorithms for analyzing the raw brightness data of the chamber, which are not described in detail herein.

In a specific implementation, the raw luminance data obtained by the previous algorithm analysis may be read in by a variety of different methods. In practical application, the original brightness data can be generated into a two-dimensional matrix structure and written into a storage medium, and then the data of the two-dimensional matrix structure is read in, or an interface provided by the early-stage algorithm module can be used for directly reading in the chamber original brightness data. It is understood that there may be other methods of reading in the original luminance data, which are not described herein. In practical applications, the original brightness data may be read in by any of the methods in the above embodiments.

S102: standardizing the coordinates of the original brightness data to obtain the original brightness data after the coordinates are standardized;

for a measured object such as a biochip image shot in the digital PCR reading process, n × m sub-images need to be shot and then spliced into a complete biochip image, which is called a complete image, please refer to the distribution schematic diagram of the biochip image sub-images shown in fig. 3, and the n × m sub-images are spliced into the complete image of the measured object. Since the brightness non-uniformity is introduced by the CCD camera shooting during digital PCR reading, the brightness non-uniformity is distributed in the individual subgraphs.

The coordinate normalization of the raw luminance data comprises a chamber coordinate transformation. In one embodiment, the chamber coordinates are transformed to: the coordinates of the raw brightness data are transformed from the coordinates of the full image to the coordinates of the sub-image in accordance with the coordinates of the chamber in the full image to which the raw brightness data correspond. More specifically: the relation between the brightness and the coordinates of the chamber is converted from a big image of the whole measured object into a sub-image area formed by shooting of a CCD camera through coordinate conversion. Wherein the chamber coordinate transformation formula is as follows:

ui,j=xi,jk,l+n

vi,j=yi,jk,l+n

wherein (x)i,j,yi,j) Denotes the coordinates of the chamber with index (i, j) in the complete large graph, (u)i,j,vi,j) Denotes the coordinates in the subgraph after coordinate transformation of the chamber with index (i, j), (α)k,l,βk,l) And (3) representing the splicing coordinates of the subgraph with the index number of (k, l) in the complete big graph, wherein n is a natural number.

As described above, coordinate transformation is performed according to the position coordinates of the chamber in the complete large graph and the splicing coordinates of the sub-graph where the chamber is located, and the relationship between the chamber brightness and the chamber position coordinates is converted from the complete large graph to the sub-graph area, so that standardized chamber brightness data is obtained.

Or coordinate transformation can be carried out according to the position coordinate of the chamber in the complete large graph and a preset chamber position coordinate in the sub-graph where the chamber is located, and the relation between the chamber brightness and the chamber position coordinate is converted into the sub-graph area from the complete large graph to obtain standardized chamber brightness data. And the coordinate transformation can be carried out according to the position coordinates of the chamber in the complete large graph and the mathematical operation value of the coordinates of the specific chamber in the sub-graph where the chamber is located, and the relation between the chamber brightness and the position coordinates of the chamber is converted into a sub-graph area from the complete large graph to obtain standardized chamber brightness data.

Referring to the flowchart of the original luminance data coordinate normalization shown in fig. 4, the coordinate normalization of the original luminance data further includes removing abnormal luminance. More specifically, the reject abnormal luminance is: the chamber brightness value in the range of the chamber brightness mean value plus or minus coefficient plus or minus brightness standard deviation is considered as normal and is not eliminated; the range outside the mean value ± coefficient of brightness standard deviation of the chamber is abnormal and is rejected.

After step S102, the coordinates of the original luminance data are converted from the coordinates in the large graph to the coordinates in the sub-graph, i.e., the coordinates of the original luminance data are normalized.

S103: fitting the original brightness unevenness to obtain a fitting curve or a curved surface corresponding to the brightness unevenness;

please refer to the flow chart of the luminance nonuniformity fitting shown in fig. 5, which includes: calculating a fitting period; calculating a fixed value in the fitting period; judging whether the fitting is abnormal; if so, repairing the abnormal calibration value; if not, the curve or the curved surface is smoothed.

In specific implementation, a fitting curve or a curved surface corresponding to the uneven brightness can be fitted to the standardized brightness data of the chamber of the same type, or a fitting curve or a curved surface corresponding to the uneven brightness of the chamber of different types can be fitted to the standardized brightness data of the chamber of different types.

Next, a fitting curve or a curved surface corresponding to uneven fitting brightness is described based on the normalized brightness data of the same kind of chamber. Specifically, the method comprises the following steps:

list A for counting the number of single row chambers in all sub-graphsxOr list A of the number of chambers in a single columnyCalculating the mean value mu of the list of the number of the single row of chambers or the list of the number of the single column of chambersxOr muyThen, multiplying the mean value by a coefficient coef to obtain a fitting period T in the row direction or the column directionxOr TyWherein the coefficient coef is ∈ [3, 8 ]]. That is, the fitting period is calculated as: and determining the fitting period according to the number of the cavities in a single row or a single column in the subgraph.

When the chambers are similar chambers, the brightness values in a single fitting period are arranged in an ascending order, the gradient values of the sequence are calculated, one gradient value is selected to divide the brightness values in the corresponding fitting period into two types, and the brightness mean values of the two types of chambers are respectively calculated to be used as calibration values in the fitting period. In particular, according to the fitting period TxDividing the brightness data after the coordinate standardization into N according to the ordered number sequence of the chamber line direction coordinatesxPeriod according to fitting period TyDividing the brightness data after coordinate standardization into N according to the ordered number series of the column-direction coordinates of the chamberyAnd (4) one period. Orderly arranging the brightness values in each period (such as ascending arrangement of the brightness values) to obtain a brightness ordered sequence, then eliminating abnormal values in each period by adopting the following formula,

Lb=ω+asc*σ,

Ls=ω-asc*σ,

wherein L isbIs an upper limit value of brightness, LsFor the lower brightness value, asc ∈ [2, 6 ]]ω is the mean value of the luminance within a single period, and σ is the standard deviation of the mean value of the luminance within a single period. And calculating a brightness gradient number sequence according to the brightness ordered number sequence, dividing the brightness number sequence into a first part and a second part at the maximum value of the gradient, and respectively calculating the brightness mean value of the two parts as a calibration value in a single period. It is understood that the maximum value or the minimum value of the two parts of the luminance sequence in a single period may also be calculated as a calibration value in one period, which is not described herein again. When the chambers are different, the brightness mean values of the chambers are respectively calculated, and the maximum brightness mean value and the minimum brightness mean value are selected as calibration values in the fitting period, namely the calibration values in the calculation fitting period.

And detecting whether the calibration value is abnormal by adopting quadratic linear regression, namely judging whether the fitting is abnormal, and if the fitting is abnormal, correcting the abnormal calibration value by adopting a neighborhood value, namely repairing the abnormal calibration value. Specifically, the normalized luminance data is used as a variable, and linear regression analysis operation is performed on the variable to obtain a corresponding calibration value abnormality detection fitting curve or curved surface. Subtracting the calibration value in the corresponding period from the calculated value of the fitting curve or the curved surface to obtain a difference value sequence, and calculating taui=(δi1)/σ1Wherein δiIs a difference value of ∈1Is the mean value of the difference array, σ1Is standard deviation wheniWhen the value is more than 3, the calibration value is abnormal, and v is adoptedi=(vi-1+vi+1) 2 recalculation, where viIs the current calibration value, vi-1,vi+1Is the neighborhood value of the current calibration value. The embodiment of the present invention adopts linear regression operation, and it is understood that other types of linear regression operation may also be adopted, which is not described herein in detail and is used to determine whether the fitting is abnormal.

And smoothing the standard value in the fitting period to obtain a fitting curve or a curved surface with uneven brightness. In one embodiment, the following gaussian kernel function is used to smooth the calibration values in the fitting period, so as to obtain a fitting curve or curved surface with non-uniform fitting brightness.

Wherein x and y are respectively an abscissa and an ordinate; mu.s1,μ2Respectively, the center coordinates of the gaussian templates.

In the embodiment of the present invention, gaussian smoothing is adopted, and it is understood that other types of curve smoothing methods can be adopted, which are not described herein.

Next, fitting a curve or a curved surface corresponding to the uneven brightness is performed according to the normalized brightness data of the different types of chambers.

List A for counting the number of single row chambers in all sub-graphsxOr list A of the number of chambers in a single columnyCalculating the mean value mu of the list of the number of the single row of chambers or the list of the number of the single column of chambersxOr muyThen, multiplying the mean value by a coefficient coef to obtain a fitting period T in the row direction or the column directionxOr TyWherein the coefficient coef is ∈ [3, 8 ]]. According to the fitting period TxDividing the normalized luminance data into N according to the ordered sequence of the line coordinates of the chamberxAnd (4) one period. According to the fitting period TyDividing the normalized luminance data into N according to an ordered series of column-wise coordinates of the chamberyAnd (4) one period.

Orderly arranging the brightness values of the chambers of the same type in the single period, eliminating abnormal values in the single period by adopting the following formula,

Lb=ω+asc*σ,

Ls=ω-asc*σ,

wherein L isbIs an upper limit value of brightness, LsFor the lower brightness value, asc ∈ [2, 6 ]]ω is the mean value of the luminance within a single period, and σ is the standard deviation of the mean value of the luminance within a single period. The mean value of the brightness of the same type of chamber is calculated as a calibration value within a single period. It will be appreciated that the maximum or minimum values of the same type of chamber, etc. may also be calculated as calibration values within a single cycle, and will not be described herein.

And taking the standardized brightness data of the chambers of the same type as variables, and performing linear regression analysis operation on the variables to obtain a corresponding abnormal calibration value detection fitting curve or curved surface. Subtracting the calibration value in the corresponding period from the calculated value of the fitting curve or the curved surface to obtain a difference value sequence, and calculating taui=(δi1)/σ1Wherein δiIs a difference value of ∈1Is the mean value of the difference array, σ1Is standard deviation wheniWhen the value is more than 3, the calibration value is abnormal, and v is adoptedi=(vi-1+vi+1) 2 recalculation, where viIs the current calibration value, vi-1,vi+1Is the neighborhood value of the current calibration value. The embodiment of the present invention adopts linear regression operation, and it is understood that other types of linear regression operation may also be adopted, which is not described herein.

And smoothing the calibration value by adopting the following Gaussian kernel function to obtain a fitting curve or curved surface with uneven fitting brightness.

Wherein x and y are respectively an abscissa and an ordinate; mu.s1,μ2Respectively, the center coordinates of the gaussian templates.

I.e. curve smoothness or curved surface smoothness.

As described above, the luminance data is fitted by using a curve or curved surface fitting technique to fit the relationship between the chamber luminance unevenness and the chamber position coordinates, thereby obtaining a first fitted curve or curved surface and a second fitted curve or curved surface.

Specifically, the fitting curve or the curved surface is a linear function.

S104: and correcting the brightness unevenness according to the fitted curve or the curved surface corresponding to the brightness unevenness.

And correcting the uneven brightness by adopting a linear interpolation method according to the fitted curve or curved surface corresponding to the uneven brightness, and determining a new brightness value corresponding to the chamber.

Referring to the luminance nonuniformity correction flow chart shown in fig. 6, the luminance nonuniformity correction process includes: calculating a reference value of a fitting curve or a curved surface corresponding to uneven brightness; fitting a straight line by adopting a least square method, and expanding a fitting curve or a curved surface corresponding to uneven brightness; detecting whether the extension is abnormal; if so, assigning the slope of the fitting straight line as 0, and assigning the intercept as a brightness mean value; if not, linear interpolation is adopted to correct the brightness.

Specifically, the reference value for calculating the fitting curve or curved surface corresponding to the uneven brightness is: the luminance unevenness reference value is calculated by the following formula

Wherein, ciIs a coefficient, ViAre values on a fitted curve or surface. In one embodiment, the luminance unevenness reference value is preferably calculated by the following formula

Vb=c1*Vmax+c2*Vmin

Wherein, c1,c2Expressed as a coefficient, VmaxMaximum value of fitted curve or surface, VminIs the minimum of the fitted curve or surface.

Specifically, a least square method is adopted to fit a straight line, and a fitting curve or a curved surface corresponding to uneven brightness expansion is as follows: and intercepting the head or tail data of a section of the fitting curve or the curved surface, performing linear fitting on the intercepted data by adopting a least square method to obtain a fitting straight line, and expanding the coverage range of the fitting curve or the curved surface corresponding to uneven brightness to achieve brightness correction of all chambers.

Specifically, whether the detection extension is abnormal is as follows: and judging whether the expansion is abnormal or not by fitting the slope of the straight line. Calculating b ═ s1*s2Wherein s is1,s2Is the slope of the line. If b is less than 0, the expansion is abnormal, the slope of the fitting straight line needs to be assigned to be 0, and the intercept is assigned to be the brightness mean value.

Specifically, the brightness is corrected by linear interpolation as follows: the corrected luminance value is calculated by the following formula

Wherein L isi,j,li,jCorrected and original brightness values, V, of the chamber, respectively index (i, j)b1,Vb2For reference values of fitted curves or surfaces corresponding to uneven brightness, U1,U2The corresponding fitted value of the chamber brightness on the fitted curve or surface is the index (i, j).

It should be noted that other high-order interpolation methods can be adopted in the present invention, but the inventors of the present invention found that the improvement of the correction effect of the uneven brightness is limited after adopting other high-order interpolation methods, while the calculation overhead is greatly increased, and comprehensively considered that the present invention adopts the linear interpolation to correct the brightness.

In specific implementation, the new brightness value corresponding to the chamber may be determined for the chamber that is a fitted curve or curved surface of the same type of chamber, or the new brightness value corresponding to the chamber may be determined for the chamber that is a fitted curve or curved surface of a different type of chamber.

The following description is provided for determining a new brightness value corresponding to a chamber according to a fitting curve or a curved surface of the same kind of chamber.

In a specific implementation, a reference value of the fitting curve or the curved surface corresponding to the uneven brightness may be calculated according to the obtained fitting curve or the curved surface. Calculating a reference value V of a fitting curve or a curved surface corresponding to the luminance unevenness by using the following formulab

Wherein, ciIs a coefficient, ViAre values on a fitted curve or surface.

In one embodiment, preferably, theThe following formula calculates the reference value V of luminance unevennessb=c1*Vmax+c2*Vmin

In the formula, c1+c2=1,c1∈[0.6,0.8],VmaxIs the maximum value of the fitted curve or the curved surface, namely the maximum value obtained by substituting the coordinates of the cavity into the corresponding function of the fitted curve or the curved surface, VminThe minimum value of the fitting curve or the curved surface is obtained by substituting the coordinates of the cavity into the function corresponding to the fitting curve or the curved surface.

In specific implementation, according to the obtained fitting curve or curved surface, the application range of the fitting curve or curved surface can be expanded, that is, the fitting curve or curved surface corresponding to the uneven brightness can be expanded. Intercepting the data of 30-50% of the segment of the first section of the fitting curve or the first section of the curved surface corresponding to the uneven brightness, and performing linear fitting on the segment by adopting a least square method to obtain a parameter(s) representing the linear1,i1),(s2,i2) Wherein(s)1,i1) Slope and intercept of a straight line extended for a first fitted curve or surface,(s)2,i2) The slope and intercept of the line extended for the second fitted curve or surface. It is understood that other types of methods may be used to perform the line fitting, and are not described herein.

The slope s of the straight line1And s2Multiplying, when the product is less than 0, representing that the fitted curve or the curved surface is abnormal in expansion, and s needs to be converted according to the data quantity in the intercepted segment1Or s2To 0, corresponding intercept i1Or i2The value is assigned as the first partial luminance mean value or the second partial luminance mean value.

Substituting the position coordinates of the chamber into the first fitting curve or curved surface and the second fitting curve or curved surface to obtain corresponding fitting value U1,U2. Linear interpolation calculation is carried out by adopting the following formula to obtain the corrected brightness value Li,j

In the formula, Li,j,li,jCorrected and original brightness values, V, for the chamber with index number (i, j), respectivelyb1,Vb2Is the luminance unevenness reference value.

The following description is provided for determining new brightness values corresponding to different types of chambers according to the fitting curves or curved surfaces of the chambers.

In a specific implementation, a reference value of the fitting curve or the curved surface corresponding to the uneven brightness may be calculated according to the obtained fitting curve or the curved surface. Calculating a reference value V of a fitting curve or a curved surface corresponding to the luminance unevenness by using the following formulab

Wherein, ciIs a coefficient, ViAre values on a fitted curve or surface. In one embodiment, the luminance unevenness reference value is preferably calculated by the following formula

Vb=c1*Vmax+c2*VminIn the formula, c1+c2=1,c1∈[0.6,0.8],VmaxIs the maximum value of the fitted curve or the curved surface, namely the maximum value obtained by substituting the coordinates of the cavity into the corresponding function of the fitted curve or the curved surface, VminThe minimum value of the fitting curve or the curved surface is obtained by substituting the coordinates of the cavity into the corresponding function of the fitting curve or the curved surface.

In specific implementation, according to the obtained fitting curve or curved surface, the application range of the fitting curve or curved surface can be expanded, that is, the fitting curve or curved surface corresponding to the uneven brightness can be expanded. Intercepting data of 30-50% of the first segment of the section of the fitting curve or the curved surface corresponding to the uneven brightness, and performing linear fitting on the segment by adopting a least square method to obtain a parameter(s) representing the linear1,i1),(s2,i2) Wherein(s)1,i1) Fitting a curve or curved surface extended straight line to a chamber of a first kindSlope and intercept,(s)2,i2) The slope and intercept of the straight line of curve or surface expansion are fitted to the second type of chamber. The first kind of chambers are the kind with the largest brightness mean value in different kinds of chambers, the second kind of chambers are the kind with the smallest brightness mean value in different kinds of chambers, and the first kind and the second kind are only labels which do not represent the type characteristics of the chambers. It is understood that other types of methods may be used to perform the line fitting, and are not described herein.

The slope s of the straight line1And s2Multiplying, when the product is less than 0, representing that the fitted curve or the curved surface is abnormal in expansion, and s needs to be converted according to the data quantity in the intercepted segment1Or s2To 0, corresponding intercept i1Or i2The value is assigned to the mean value of the brightness of the first type of chamber or the mean value of the brightness of the second type of chamber.

Substituting the position coordinates of the chambers into the fitting curve or curved surface of the first chamber and the fitting curve or curved surface of the second chamber to obtain corresponding fitting values U1,U2. Linear interpolation calculation is carried out by adopting the following formula to obtain the corrected brightness value Li,j

In the formula, Li,j,li,jCorrected and original brightness values, V, for the chamber with index number (i, j), respectivelyb1,Vb2And the reference value is the fitting curve or the curved surface corresponding to the uneven brightness.

The method for correcting the unevenness of the brightness of the chamber according to the present invention may further include S105: the luminance data is updated.

More specifically: and updating the original brightness data by using the corrected chamber brightness data obtained by calculation.

In specific implementation, the method of the present invention may be adopted to perform uneven chamber brightness fitting in the x direction or the y direction and in the x direction and then in the y direction or in the y direction and then in the x direction and then in the y direction to obtain a fitting curve representing uneven chamber brightness in the x direction or the y direction, and then perform uneven chamber brightness correction according to the fitting curve to obtain a new brightness value corresponding to the chamber, or the method of the present invention may be adopted to perform uneven chamber brightness fitting in the x direction and the y direction simultaneously to obtain a fitting curved surface representing uneven chamber brightness coupled in the x direction and the y direction, and then perform uneven chamber brightness correction according to the fitting curved surface to obtain a new brightness value corresponding to the chamber.

In the embodiment of the invention, coordinate transformation is carried out according to the position coordinate corresponding to the chamber brightness data to obtain standardized brightness data, then a fitting curve or a curved surface corresponding to the uneven brightness is fitted, and the corrected brightness value is obtained through calculation. According to the corrected chamber brightness value, the positive chamber and the negative chamber can be clearly distinguished, the accuracy of the positive rate is improved, the accuracy of the digital PCR detection result is further improved, and the problem caused by uneven brightness is eliminated. And can improve the accuracy of the digital PCR test result, as shown in figure 7, wherein the abscissa is the number of points, the ordinate is the brightness value of the chamber, through correcting the uneven brightness of the chamber in the biochip, can make the brightness value of the positive chamber between 600 and 700, the brightness value of the negative chamber between 300 and 400, therefore can weaken the influence of the uneven brightness introduced by the CCD camera shooting image in the digital PCR reading process on the information reading of the biochip, make the brightness value of the positive chamber evenly distributed near brightness value 1, the brightness value of the negative chamber evenly distributed near brightness value 2. Therefore, the yin and yang attributes of the cavity can be clearly distinguished, and the detection result can be accurately calculated. The comparison of the real positive rates of 10 groups of samples, the calculated positive rate without brightness unevenness correction and the statistical results of the calculated positive rates after brightness unevenness correction by the method of the present invention can be referred to in table 1, and the data in the following table show that the calculated positive rate after brightness unevenness correction is closer to the real positive rate than the calculated positive rate without brightness unevenness correction, that is, the accuracy of the calculated positive rate after brightness unevenness correction is improved.

Note: in the table, r is the true positive rate of the sample, roThe positive rate when no luminance unevenness correction is performed, rpIn order to obtain a positive rate in the luminance unevenness correction,indicating the percentage of improvement in the accuracy of the calculated positivity after correction for uneven brightness.

The method for correcting the uneven brightness of the chamber can also improve the reliability and stability of the digital PCR, and the requirements on a high-performance CCD camera and a complex optical system can be reduced by adopting the method for correcting the uneven brightness of the chamber, so that the complexity of hardware is reduced, and the overall reliability and stability of the digital PCR are improved.

The method for correcting the uneven brightness of the chamber can also improve the applicability of the detection result of the digital PCR, and after the method for correcting the uneven brightness of the chamber is adopted, the results of different channels of the digital PCR detection can be compared, the distribution characteristics of the brightness of the chamber in the different channels can be analyzed, and the applicability of the detection result of an instrument can be improved.

In an embodiment of the present invention, a luminance nonuniformity correction apparatus is further provided, referring to the schematic structural diagram of the luminance nonuniformity correction apparatus shown in fig. 8, which includes: the normalizing unit is used for receiving the original brightness data of the chamber and normalizing the coordinates of the original brightness data to obtain the original brightness data with normalized coordinates; the fitting unit is used for receiving the original brightness data with the standardized coordinates and fitting a fitting curve or a curved surface corresponding to uneven brightness according to the original brightness data with the standardized coordinates; and the correcting unit is used for receiving the fitted curve or curved surface corresponding to the uneven brightness and determining a new brightness value corresponding to the chamber according to the fitted curve or curved surface corresponding to the uneven brightness.

The principle and technical effects are the same as those of the chamber brightness non-uniformity correction method, and are not described herein again.

More specifically, the normalization unit converts the raw chamber luminance data from coordinates in the large graph to coordinates in the sub graph, resulting in normalized luminance data.

More specifically, the fitted curve or surface corresponding to the luminance unevenness includes a first fitted curve or surface and a second fitted curve or surface.

In an embodiment of the present invention, a computer-readable storage medium is further provided, where computer instructions are stored, and when the computer instructions are executed, the steps of the method for correcting uneven chamber brightness provided in any one of the above embodiments of the present invention are performed, which are not described herein again.

In an embodiment of the present invention, there is further provided a luminance unevenness correction apparatus, including: a memory and a processor, where the memory stores computer instructions, and the computer instructions are executed to perform the steps of the method for correcting uneven chamber brightness provided in any of the above embodiments of the present invention, which are not described herein again.

The above description takes CCD camera shooting as an example, but images may be obtained by other means.

Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种通过大样本转录组测序鉴定结直肠癌中特异分子的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!