Thin layer chromatography quantitative analysis method based on image processing techniques
Technical field
The invention belongs to computer digital image process field and chemical analysis field.
Background technology
In fields such as chemical analysis, biomedicine, medical research, clinical medicine, food processing, detection to certain micro substance composition is a very necessary job with evaluation, wherein thin-layered chromatography or thin layer chromatography (Thin LayerChromatography is called for short TLC) are widely used.So-called thin-layered chromatography is taped against adsorbent (for example silica gel or aluminium oxide) exactly on the planar object and forms skim as glass plate, plastic sheet or metal forming, with solvent sample is launched and the method for separating then, it is a kind of chromatographic process easy, economic, micro-, applied widely.Thin-layered chromatography mainly is made up of three steps: the expansion of sample behind the point sample of sample, the point sample, the back measurement to sample of expansion.The point sample of sample has become very proven technique with expansion, and the sample after launching is measured, in the middle of particularly accurate quantitative measurment technology but still is in and constantly explores.At present, thin layer chromatography quantitative analysis has all adopted the thin-layer chromatogram scanner method basically.Though thin-layer chromatogram scanner is widely used.But thin-layer chromatogram scanner exists following shortcoming:
(a) measuring speed is slow, measures a thin layer plate and will spend dozens of minutes, is unfavorable for the detection of a large amount of samples;
(b) precision is lower, particularly big, irregular blotches for area, and error is bigger;
(c) can't directly take pictures or record a video, reduced confidence level;
(d) not directly perceived, because of seeing the location situation of scanning, easily cause the location inaccurate, thereby produce than mistake;
(e) complicated operation is because therefore the optical texture more complicated of thin-layer chromatogram scanner adjusts very difficulty;
(f) cost height, because the optical texture more complicated of thin-layer chromatogram scanner, thereby it is many to make operation, thereby the cost height;
Recent years, there is the scholar to propose to utilize flat image reading apparatus method that the sample on the thin layer plate is carried out quantitative test in the world and measures.Someone utilizes the thin layer plate after flat image reading apparatus will dye to scan, and obtains handling after the digital picture again.They with resolution be the scanner of 100DPI with thin layer image scanning in computing machine, utilize computer programming to carry out quantitative test then.Their conclusion is that the method not only can be carried out qualitative analysis, also can carry out quantitative test.For flat image reading apparatus, owing to utilize the linear light sources motion scan, its scanning ray distributes more even, thereby the effect that its thin layer plate after to dyeing obtains when handling is relatively good.But flat image reading apparatus can not scan the thin layer chromatography board that needs special light sources to carry out imaging, as fluorescence irradiation, ultraviolet ray irradiation etc.In addition, this disposal route is time-consuming long, also can't be integrated with other instruments.
Solve the problem that flat image reading apparatus brings, people will expect video camera naturally.In fact, before flat image reading apparatus is used, utilizes video camera imaging that thin-layer chromatography is carried out quantitative test and just be studied, this is because the image taking speed of video camera is fast, easy for installation, and is easy to and the integrated use of Other Instruments.Yet after having adopted video camera to carry out thin-layer chromatographic analysis, the conclusion that people provide is but not very good.Reason is to compare with traditional thin-layer chromatogram scanner, and the correctness of video camera imaging is subjected to the restriction of illumination uniformity, thereby the result is not very accurate, and repeatability is bad.Except the reason that they point out, during video camera imaging, light source is indefinite, aperture is indefinite, film speed is indefinite has also brought difficulty to research, and just repeatability is not strong.These problems make in the quantitative test of video camera imaging method in thin-layer chromatography to can not get using preferably just.
Summary of the invention
From top analysis, if the shortcoming of uneven illumination in the video camera imaging process can be remedied accordingly, video camera imaging just has great vitality in thin-layer chromatography: image taking speed is fast, analysis precision is high, visual result, be easy to the storage, with low cost.The phenomenon of uneven illumination is intrinsic in the video camera imaging process, and for this reason, the means of what use is made of Digital Image Processing remedy the defective that this phenomenon is brought, key point of the present invention that Here it is.
In addition, the present invention also aims to provide a kind of a kind of image partition method based on background estimating.
Ultimate principle of the present invention is: when sample launching on the thin layer plate and drying after, just this thin layer plate is placed in the lamp box with multi-wavelength light photograph, utilize digital camera or the video camera formation digital picture of taking pictures then, at last estimate the intensity of illumination that every bit on the thin layer plate, according to the actual content that the intensity of illumination of estimating splits sample and the integration of gray scale is determined sample per sample by computing machine.Concrete steps comprise utilizes video camera under the illumination condition of different wave length thin layer plate to be taken; Captured image is carried out lens distortion calibration, noise considers and pre-service such as removes; Utilize vertical pixel grey scale integral projection method to determine the reference mark; According to resulting reference mark, utilize interpolation method to construct image background again; To remove the thin layer image of background image behind lens distortion calibration that construct, according to the background image of being constructed each pixel is carried out intensity of illumination normalization simultaneously; The thin layer image that removes behind the background image is cut apart; According to segmentation result the gray scale in each sample area is carried out integration; Linear characteristics of gray integration and sample quality per sample, contrast standard product again calculate the actual content of each sample.
The present invention is characterised in that, successively by following step:
The thin layer plate that step 1. pair is loaded with sample utilizes digital camera or video camera to take under selected wavelength illumination condition, is stored in computing machine or the DSP disposal system after forming digital picture;
Step 2. computing machine carries out pre-service according to the following steps to captured image:
Step 2.1. lens distortion calibration: take the standard graticule with digital camera or video camera, concern one to one according to the grid intersection point again, the image rectification that step 2.1 is obtained becomes the standard graticule, notes the correction parameter of each point, is provided with doing to proofread and correct when the thin layer plate image is taken in the back using;
Step 2.2. consider to remove noise, adopts any method in the following filtering method to carry out: smothing filtering or low-pass filtering or Wiener filtering, thus obtain the digital picture of thin layer plate;
Be along perpendicular to equally distributed these characteristics of expansion direction when step 3. is utilized point sample, after the pre-service that step 2 obtains, find the horizontal ordinate at reference mark the image, according to the principle of fore-and-aft distance five equilibrium, determine the ordinate at reference mark again, thus controlled point;
The structural setting image is come at the reference mark that step 4. utilizes any method in following each interpolation method to obtain according to step 3: described interpolation method is Newton interpolation or the piecewise low-order interpolation or the spline interpolation of Lagrange's interpolation or inequality;
Step 5. deducts the background image that is constructed from the thin layer plate digital picture that step 2 obtains, if f is (x, y) be pixel (x, the gray scale of y) locating, and g (x in the thin layer plate digital picture behind the lens distortion calibration, y) be pixel (x in the background image of estimating, y) gray scale of locating, then subtract each other the pixel that obtains image (x, the gray-scale value of y) locating is (g (x, y)-f (x, y)); According to the background image of being constructed every bit is carried out normalization again, obtain the thin layer plate digital picture of homogeneous background, (x after the gray scale correction of y) locating is corresponding point in this image
Perhaps
Wherein, I
MaxBe the highest gray scale of the background image of being constructed, I
MinBe minimal gray, I
bFor same point in the described background image (x, the gray-scale value of y) locating, promptly every bit (x, y) actual light intensity and bias light are inversely proportional to;
Step 6. utilizes the global threshold method to be partitioned into target image, and described global threshold gets 2 or 3;
Interior each pixel in each zone adds up with gray-scale value in the image that step 7. pair step 6 obtains, and promptly carries out gray integration;
Step 8. is determined quantitative relationship between each sample spot according to the size of the gray integration value that
step 7 obtains by the linear ratio relation.Concrete computing method are: the gray integration value of establishing a certain sample is S, and the integrated value of standard items is T, and the quality of standard items is G, and then the quality of sample is
Adopt this method to handle and to describe the image background information of giving accurately, be partitioned into target image, but also can carry out normalization to the intensity of illumination of every bit, segmentation result reaches very high accuracy rate, thereby makes the result of quantitative test reach higher precision.
The invention will be further described below in conjunction with accompanying drawing.
Description of drawings:
Fig. 1 is a hardware composition frame chart of the present invention;
Fig. 2 is an overall flow block diagram of the present invention;
Fig. 3 is a thin layer plate image collecting device of the present invention;
Fig. 4 is lens distortion calibration shooting figure of the present invention;
Fig. 5 is the former figure of thin layer plate image taking that the present invention collects;
Fig. 6 is that the 3 D stereo of the thin layer plate image gathered of the present invention shows;
Fig. 7 is a filtering template of the present invention;
Fig. 8 is the synoptic diagram that the present invention is used to select the reference mark, takes figure based on Fig. 5;
Fig. 9 is a 3-D display of utilizing institute of the present invention construct image background;
Figure 10 is the 3-D display result of the thin layer plate image after the removal uneven illumination background that obtains of the present invention;
Figure 11 is a sample segmentation result of the present invention.
Embodiment:
Fig. 1 has provided hardware composition frame chart of the present invention.The thin layer plate 1 that is loaded with sample is placed in the lamp box 2, by video camera or digital camera 3 it is taken pictures then, and the image of formation is sent in computing machine or the DSP disposal system 4, the result of processing be sent to that printer 6 is printed or miscellaneous equipment 7 in standby.Monitor 5 among Fig. 1 is in order to show captured image and program operation process.
Fig. 2 has provided workflow block diagram of the present invention, comprises taking thin layer plate image (first step); Photographic images is done image pre-service such as the abnormal correction of lens distortion, noise filtering (second step); Utilize the vertical pixel grey scale integral projection of image to determine the horizontal ordinate at reference mark, utilize the ordinate of obtaining the reference mark apart from five equilibrium then, thus controlled point (the 3rd step); Produce background image (the 4th step) according to above-mentioned reference mark interpolation; From original image, deduct the background that interpolation generates, and each pixel gray scale is carried out correcting process (the 5th step) according to background image; Utilize connected domain or overall thresholding split image (the 6th step); Calculate each regional gray integration (the 7th step) according to segmentation result, according to the gray integration content of calculation sample (the 8th step) as a result.
The first step of the present invention is to take the thin layer plate image, and Fig. 3 has provided concrete shooting process.The thin layer plate a that is loaded with sample is placed on and can selects illumination wavelength (wavelength is 254nm, 312nm, 365nm, and white light) among the lamp box b, then by the digital camera that optical filter is housed or video camera c to thin layer plate take pictures form digital picture and be stored in computing machine or the DSP disposal system in.Fig. 5 has provided a captured thin layer plate image, and wherein f is the sample that will measure.In order to further specify the influence that the analysis of uneven background specified rate brings, the 3 D stereo display effect that Fig. 6 has provided Fig. 5 (for clarity sake, pixel grey scale among Fig. 6 is by anti-phase), g is the position of sample in the three-dimensional plot among the figure, the influence of background is fairly obvious as can be seen.
After obtaining the digital picture of thin layer plate, in order to proofread and correct the influence that causes by lens distortion, and remove noise, must carry out image pre-service such as lens distortion calibration, noise filtering (second step) to resulting thin layer plate digital picture.The antidote of lens distortion is with digital camera or video camera.Shooting standard graticule obtains fault image, shown in Fig. 4 (a), concern one to one according to the grid intersection point then, corresponding relation as e and d, distorted image correction is become the standard graticule, shown in Fig. 4 (b), note correction parameter, when taking the thin layer plate image afterwards, just proofread and correct with this correction parameter.Noise filtering then adopts smothing filtering, or low-pass filtering, or filtering method such as Wiener filtering.For example adopt 3 * 3 smothing filtering template to carry out smothing filtering, Fig. 7 has provided this 3 * 3 template, when specifically calculating
K wherein
iIt is the gray-scale value of each point in the template.
In order to estimate the uneven illumination background that the thin layer plate image, the 3rd step of the present invention and the 4th step search out the horizontal ordinate at reference mark exactly from pretreated thin layer plate digital picture, utilize the ordinate of obtaining the reference mark apart from halving method then, thereby controlled point, this was the 3rd step, then utilize Lagrange's interpolation according to asking reference mark again, or inequality and Newton's interpolation formula, or difference and equidistant knot interpolation, or Hermite interpolation, or piecewise low-order interpolation, or interpolation method such as spline interpolation constructs image background figure, and this was the 5th step.Fig. 8 has provided the synoptic diagram of seeking the reference mark from pretreated thin layer plate digital picture.Because sample launches along equidirectional, thereby we are in point sample, can carry out equidistant point sample along direction perpendicular to expansion direction, when measuring, equidistantly divide earlier according to the point sample port number, find the horizontal ordinate of control vertex, shown in the perpendicular line h among Fig. 8 (a), the position that these perpendicular line passed through is exactly an image background, gets from these straight lines and a little just can obtain the reference mark of structural setting image in the future.After obtaining the horizontal ordinate at reference mark, by the mode that is not more than the horizontal ordinate spacing image is carried out vertically equidistant the division again, thereby determine the ordinate at reference mark, Fig. 8 (b) has provided the last synoptic diagram at reference mark, and each point of crossing i is exactly the reference mark that we will look for.Control vertex has been arranged, utilized curved surface structure method above-mentioned just can construct image background.For example, utilize Catmull-Rom spline surface construct image background 3 times, formula is:
P in the following formula
Ij(i=0,1 ..., n; J=0,1 ..., m) being the reference mark of finding in the step 3, u, v are interpolation parameter, the size of its value affects the density of interpolation point, B
I, 3(u) be harmonic function, their expression is as follows:
B
0,3(u)=-τ+2τu
2-τu
3
B
1,3(u)=1+(τ-3)u
2+(τ-2)u
3
B
2,3(u)=τu+(3-2τ)u
2+(τ-2)u
3
B
3,3(u)=-τu
2+τu
3
τ is the dynamics control coefrficient, 0≤τ≤1, and general value is 0.2.
Fig. 9 is that the 3 D stereo of the background image j that produces according to the determined reference mark of Fig. 8 and by Catmull-Rom spline surface interpolation shows.For clarity sake, the pixel grey scale among Fig. 9 is by anti-phase.
Estimate uneven background image after, the thin layer plate digital picture behind lens distortion calibration deducts the thin layer plate digital picture that the background image that is constructed has just obtained homogeneous background, Here it is of the present invention the 5th the step.Concrete subtractive method is, if f is (x, y) be pixel (x, the gray scale of y) locating, and g (x in the thin layer plate digital picture behind the lens distortion calibration, y) be pixel (x in the background image of estimating, y) gray scale of locating, then subtract each other the pixel that obtains image (x, the gray-scale value of y) locating is (g (x, y)-f (x, y)).Figure 10 has provided the 3-D display of the thin layer plate image that removes non-homogeneous background, wherein k representative sample point.
In addition, the background of estimating has been arranged, we have also just obtained the relative light intensity value of each pixel, thereby can carry out the light intensity correction.The method of revising is: the highest gray scale of establishing estimation background j is I
Max, minimum is I
Min, (x, gray-scale value y) are I to a certain pixel among the j
bIt is, corresponding among Figure 10 that (x, the gray-scale value of y) locating are I, and then corresponding among Figure 10 (x, the gray-scale value of y) locating is corrected for
Perhaps
Just the actual light intensity of every bit and bias light are inversely proportional to.
The thin layer plate image that removes non-homogeneous background has been arranged, utilized the global threshold method to be partitioned into target image (the 6th step), and remove isolated point.Global threshold is 0 in theory, but in fact because the existence of noise generally gets 2 or 3.Figure 11 is exactly last segmentation result, and 1 is exactly the sample area that is partitioned into.
According to top segmentation result, we just can carry out gray integration to respective regions in Figure 10, just the gray-scale value of each pixel in the zone are added up, and this was the 7th step.
At last, just can determine quantitative relationship between each sample spot by linear scaling according to the size of gray integration value, this is final step of the present invention, i.e. the 8th step.Concrete computing method are: the gray integration value of establishing a certain sample is S, and the integrated value of standard items is T, and the quality of standard items is G, and then the quality of sample is