Computational focusing-based liquid concentration measurement method
Through the calculation focus-seeking method and optical imaging processing technology, the existing liquid concentration measurement methods are solved, and fast, accurate, and non-contact liquid concentration measurement is achieved.
Patent Information
- Application Number
- PCT/CN2023/137083
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-29
- Filing Date
- 2023-12-07
- Publication Date
- 2025-06-05
AI Technical Summary
The existing liquid concentration measurement methods require complex sample preparation and experimental environment processing, and are difficult to operate, numerous consumables, and insufficient measurement accuracy and credibility.
Using a method based on computational focus search, a liquid concentration assisted measurement device composed of a laser generator, a planar concave lens, an auxiliary focus search device, an aperture stop and a CCD camera is used to obtain the key parameters of the liquid concentration through optical imaging, and the fitting relationship is called for calculation.
Fast, accurate, contactless measurement of various types of liquid samples is achieved, reducing operational difficulty and consumable consumption, and improving measurement integration and credibility.
Smart Images

Figure CN2023137083_05062025_PF_FP_ABST
Abstract
Description
A method for measuring liquid concentration based on calculation and focusing Technical Field
[0001] The present application relates to the field of liquid measurement technology, and in particular to a method for measuring liquid concentration based on calculation and focusing. Background Art
[0002] In existing technologies, the concentration of liquids is usually determined by analyzing the absorption spectrum based on the absorptive properties of the liquid. However, during this operation, the preparation of liquid samples needs to be handled with caution, and the impact of experimental environmental factors on spectrometer measurements needs to be considered. This not only results in a waste of experimental consumables, but also requires experimental personnel to have corresponding professional operating skills to better complete the liquid measurement task.
[0003] Summary of the Invention
[0004] The present application provides a method for measuring liquid concentration based on calculation and focusing to solve one or more technical problems existing in the prior art and at least provide a beneficial option or create conditions.
[0005] The present application provides a method for measuring liquid concentration based on calculation and focusing, using a liquid concentration auxiliary measurement device composed of a laser generator, a plano-concave lens, an auxiliary focusing device, an aperture stop, and a CCD camera. The method includes:
[0006] When the plano-concave lens is filled with the liquid to be tested, the laser generator is controlled to generate a parallel laser beam. The parallel laser beam passes through the liquid to be tested and then undergoes a change in divergence through the plano-concave lens. The generated divergent beam is projected onto the photosensitive surface of the CCD camera through the auxiliary focus-finding device and the aperture stop.
[0007] Controlling the CCD camera to be fixed at a defocus plane and performing imaging processing on the collected light signal to obtain a test image corresponding to the test liquid;
[0008] Analyzing the image to be measured to obtain the size of the light spot to be measured;
[0009] A fitting relationship between liquid concentration and light spot size is called, and the light spot size to be measured is substituted into the fitting relationship to perform calculation to obtain the concentration of the liquid to be measured.
[0010] Furthermore, the auxiliary focusing device is a convex lens, the divergent light beam is converged by the convex lens, and the generated converged light beam is intercepted in the middle by the aperture stop and then enters the CCD camera.
[0011] Furthermore, the diameter of the convex lens is the same as the aperture of the plano-concave lens, the focal length of the convex lens is related to the focal length variation range of the plano-concave lens after filling with liquid and the layout spacing between the convex lens and the plano-concave lens, and the layout spacing between the aperture diaphragm and the CCD camera is 10 mm.
[0012] Furthermore, the CCD camera is arranged in front of the minimum total focal length formed by the combination of the plano-concave lens and the convex lens after being filled with liquid.
[0013] Furthermore, the CCD camera is arranged behind the maximum total focal length formed by the combination of the plano-concave lens and the convex lens after being filled with liquid.
[0014] Furthermore, the analyzing the image to be measured to obtain the size of the light spot to be measured includes:
[0015] The image to be measured is an original light spot image, which records the focus information of the plano-concave lens after filling with liquid on the defocus plane;
[0016] performing binarization processing on the image to be measured to obtain a binarized image;
[0017] A spot fitting image is segmented from the binary image, a pixel area occupied by the spot fitting image in the binary image is obtained, and the pixel area is output as the spot size to be measured.
[0018] Furthermore, the auxiliary focusing device is a thin scattering medium, the divergent light beam passes through the thin scattering medium to form a spatially distributed speckle signal, and the light beam carrying the speckle signal is intercepted in the middle by the aperture stop and then enters the CCD camera.
[0019] Furthermore, the arrangement spacing between the thin scattering medium and the plano-concave lens is 10 mm, the arrangement spacing between the CCD camera and the thin scattering medium is 10 mm, and the arrangement spacing between the aperture stop and the thin scattering medium is 3 mm.
[0020] Furthermore, the analyzing the image to be measured to obtain the size of the light spot to be measured includes:
[0021] The image to be measured is a speckle original image, which records the speckle particle information presented by the plano-concave lens after being filled with liquid on the defocused plane;
[0022] Processing the image to be measured based on the speckle autocorrelation imaging principle to obtain a spot image to be measured;
[0023] performing binarization processing on the light spot image to be measured to obtain a binarized image;
[0024] A spot fitting image is segmented from the binary image, a pixel area occupied by the spot fitting image in the binary image is obtained, and the pixel area is output as the spot size to be measured.
[0025] Furthermore, the fitting relationship is obtained in the following way:
[0026] Acquiring a plurality of liquid samples with different known concentrations, wherein the plurality of liquid samples are of the same type as the liquid to be tested;
[0027] For each liquid sample, performing multiple imaging processes on the liquid sample using the liquid concentration auxiliary measurement device to obtain multiple image samples corresponding to the liquid sample;
[0028] Analyzing the plurality of image samples to obtain a plurality of spot sizes;
[0029] averaging the multiple spot sizes to obtain an average spot size corresponding to the liquid sample;
[0030] When the measurement of the plurality of liquid samples is completed, curve fitting is performed on the concentrations and average spot sizes corresponding to the plurality of liquid samples to obtain a fitting relationship between the liquid concentration and the spot size.
[0031] The present application has at least the following beneficial effects: it utilizes common optical equipment in optical laboratories to quickly build an auxiliary measurement device for liquid concentration, which has high integration and low operation difficulty. It can directly perform non-contact measurement on a small amount of various types of liquid samples without the need for pre-processing of the liquid samples before the experiment, and has good practicality; by introducing machine vision technology to process the image output by the device to obtain key parameters, and then calling verified and reliable fitting formulas to calculate the key parameters to obtain the required measurement data, the measurement accuracy and reliability can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to provide a further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0033] FIG1 is a schematic diagram of the composition of a liquid concentration auxiliary measurement device in an embodiment of the present application;
[0034] FIG2 is a schematic diagram of a plano-concave lens and a biconcave lens in a liquid-filled state according to an embodiment of the present application;
[0035] FIG3 is another schematic diagram of the composition of a liquid concentration auxiliary measurement device according to an embodiment of the present application;
[0036] FIG4 is a schematic diagram of another composition of a liquid concentration auxiliary measurement device according to an embodiment of the present application;
[0037] FIG5 is a schematic diagram of another composition of a liquid concentration auxiliary measurement device according to an embodiment of the present application;
[0038] FIG6 is a flow chart of a method for measuring liquid concentration based on focus calculation in an embodiment of the present application;
[0039] FIG7 is a schematic diagram of an original light spot image in an embodiment of the present application;
[0040] FIG8 is a schematic diagram of a spot fitting image in an embodiment of the present application;
[0041] FIG9 is a schematic diagram of an original speckle image in an embodiment of the present application;
[0042] FIG10 is a schematic diagram of a light spot image to be measured in an embodiment of the present application;
[0043] FIG11 is a diagram showing the fitting effect between alcohol concentration and spot size in an embodiment of the present application.
[0044] Description of the drawings: 110 - laser generator, 120 - plano-concave lens, 121 - glass sheet, 130 - auxiliary focusing device, 131 - convex lens, 132 - thin scattering medium, 140 - aperture stop, 150 - CCD camera, 160 - first refractor, 170 - second refractor. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0046] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the system or the order in the flow chart. The terms "first", "second", "third", "fourth", etc. in the specification of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units inherent to these processes, methods, products or devices that are not clearly listed.
[0047] Please refer to Figure 1, which is a schematic diagram of the structural composition of a liquid concentration auxiliary measurement device in an embodiment of the present application. The device includes a laser generator 110, a plano-concave lens 120, an auxiliary focusing device 130, an aperture stop 140 and a CCD (Charge Coupled Device) camera 150.
[0048] During the specific implementation process, when the plano-concave lens 120 is filled with a liquid sample, the liquid sample should have certain absorption and scattering capabilities. The laser generator 110 is used to generate a parallel laser beam. The plano-concave lens 120 after being filled with liquid is used to diverge the parallel laser beam passing through the liquid sample and regard it as a divergent beam emitted from a virtual focus. With the assistance of the auxiliary focusing device 130 and the aperture diaphragm 140, the virtual focus is materialized and emitted in another form to the photosensitive surface of the CCD camera 150. The CCD camera 150 is fixed at a defocused plane for imaging processing of the collected light signal. The function of the aperture diaphragm 140 can be understood as approximating the optical path formed by the plane wave beam through the aperture as a geometric projection.
[0049] In the embodiment of the present application, the laser generator 110 preferably adopts a Gaussian beam emitter, and when it is put into use, the corresponding laser power is set to 8 mW. No matter how deep the liquid sample is, as long as it has a certain transparency, even if it is turbid and the liquid surface is uneven due to the generation of small bubbles and small waves, the laser beam with strong coherence and high power can still have high penetration.
[0050] In the embodiment of the present application, the plano-concave lens 120 preferably adopts a K9 plano-concave lens with a diameter of 20 mm and a focal length of -40 mm, which allows a maximum of 1 ml of liquid sample to be loaded. When the refractive index of the liquid sample loaded into the plano-concave lens 120 is different, the parallel laser beam passes through the liquid sample and is incident on the plano-concave lens 120, which will cause the focal length of the plano-concave lens 120 after being loaded with liquid to change.
[0051] In actual application, when the plano-concave lens 120 is filled with liquid sample, due to the surface tension of the liquid sample, the liquid surface forms approximately a small convex lens, resulting in unnecessary scattering and reflection of the incident light, affecting the measurement stability of the liquid sample. It is necessary to place a glass sheet 121 on the top of the plano-concave lens 120 to provide a sealed space for the liquid sample and eliminate surface unevenness, reduce the impact of vibration on the liquid, and in some cases reduce liquid volatilization.
[0052] Of course, there are also biconcave lenses with similar functions on the market. Here, the advantages of using the plano-concave lens 120 for filling liquid to assist in measuring liquid concentration are explained as follows:
[0053] 2( a ), the total focal length of the plano-concave lens 120 after filling with liquid is:
[0054] Wherein, f2 is the total focal length of the plano-concave lens 120 after being filled with liquid, f1 is the focal length of the plano-concave lens 120 before being filled with liquid, n1 is the refractive index of the glass sheet placed on top of the plano-concave lens 120, specifically 1.5163, and n is the refractive index of the liquid sample. There is a certain conversion relationship between the concentration of the liquid sample and its refractive index.
[0055] As shown in Figure 2(b), the total focal length of the biconcave lens after filling with liquid is:
[0056] Where f4 is the total focal length of the biconcave lens after filling with liquid, f3 is the focal length of the biconcave lens without liquid, and n2 is the refractive index of the glass plate placed on top of the biconcave lens and is also 1.5163;
[0057] It can be seen from the above two formulas that, assuming that the focal length f1 of the plano-concave lens 120 without liquid is the same as the focal length f3 of the biconcave lens without liquid, the total focal length f2 of the plano-concave lens 120 after being filled with liquid is larger than the total focal length f4 of the biconcave lens after being filled with liquid. That is, the use of the plano-concave lens 120 can make the focal depth smaller, and the position of the focus generated on the defocus plane in actual application is more precise, ultimately making the measurement result more accurate; and when the refractive index n of the liquid sample changes slightly (which can be understood as a slight change of 0.001), it can be seen from calculation that the total focal length f2 of the plano-concave lens 120 after being filled with liquid changes more significantly, and compared with the biconcave lens after being filled with liquid, it is easier to reflect the refractive index change of the liquid sample. That is, the use of the plano-concave lens 120 can make the measurement result have better sensitivity.
[0058] In one embodiment, the auxiliary focusing device 130 in the auxiliary measurement device for liquid concentration shown in FIG. 1 is described as an example.
[0059] Please refer to Figure 3, which is another structural schematic diagram of a liquid concentration auxiliary measurement device provided in an embodiment of the present application. The device includes a laser generator 110, a plano-concave lens 120, a convex lens 131, an aperture stop 140 and a CCD camera 150. The convex lens 131 is the auxiliary focusing device 130; point A represents the focal position of the plano-concave lens 120 when loaded with a liquid sample with a refractive index of n1, and point B represents the focal position of the plano-concave lens 120 when loaded with a liquid sample with a refractive index of n2, where n1≠n2.
[0060] In a specific implementation process, when the plano-concave lens 120 is filled with a liquid sample, the laser generator 110 is used to generate a parallel laser beam. The plano-concave lens 120 after being filled with liquid is used to diverge the parallel laser beam passing through the liquid sample and regard it as a divergent beam emitted from a virtual focus. The convex lens 131 is used to converge the divergent beam and generate a convergent beam. The aperture diaphragm 140 is used to intercept the middle part of the convergent beam and transmit it to the CCD camera 150. The CCD camera 150 is fixed on a defocus plane for imaging processing of the collected light signal.
[0061] In this embodiment, the minimum spacing between the plano-concave lens 120 and the convex lens 131 is set to 5 mm, and the minimum spacing between the aperture stop 140 and the CCD camera 150 is set to 10 mm. The convex lens 131 can be a biconvex lens with a diameter of 20 mm and a focal length of 100 mm, or a biconvex lens with a diameter of 20 mm and a focal length of 150 mm. The selection of the focal length of the convex lens 131 is explained below:
[0062] The total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after filling with liquid is:
[0063] Wherein, f6 is the total focal length of the plano-concave lens 120 and the convex lens 131 after filling with liquid, f5 is the focal length of the convex lens 131, and d is the minimum arrangement distance between the plano-concave lens 120 and the convex lens 131;
[0064] It can be seen from the above formula that when f2+f5-d≈0, the total focal length f6 formed by the combination of the plano-concave lens 120 and the convex lens 131 after filling with liquid can achieve the maximum value, thereby minimizing the focal depth, which helps to improve the accuracy of the final measurement result; through preliminary experiments, it is known that the focal length f2 of the plano-concave lens 120 after filling with liquid varies in the range of [-117mm, -140mm]. Combined with the formula f2+f5-d≈0, it is calculated that f5 should be close to the range of [121mm, 145mm]. Since the focal length of each biconvex lens on the market is basically a multiple of 50mm, this application uses a biconvex lens with a focal length of 100mm or 150mm.
[0065] In this embodiment, the CCD camera 150 should be arranged in front of the minimum total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after filling with liquid, so that the monotonic change of the focal length of the plano-concave lens 120 after filling with liquid can be included in the range of the unidirectional change of the light spot photographed by the CCD camera 150, while improving the integration of the entire device.
[0066] In addition, this layout position is determined by pre-calibrating the CCD camera 150. The specific implementation method is as follows: when the concentration of the liquid sample is greater, the refractive index of the liquid sample is greater. When the liquid sample is placed on the plano-concave lens 120 for measurement, the total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after filling with liquid is smaller. Therefore, according to the type of liquid sample that the device ultimately wants to test, the liquid sample with the highest known concentration is selected and loaded into the plano-concave lens 120, and the laser generator 110 and the CCD camera 150 are started to perform a calibration experiment. By continuously adjusting and shortening the distance between the CCD camera 150 and the convex lens 131, the size of the light spot can be enlarged to basically cover the acquisition screen of the CCD camera 150, and then the CCD camera 150 is fixed at the current position.
[0067] Of course, if the integration of the entire device is not taken into consideration, the CCD camera 150 can also be arranged behind the maximum total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after filling with liquid. This application does not limit this.
[0068] It should be noted that the image data obtained by the CCD camera 150 after imaging processing actually records the distribution information of the focus spot geometrically projected onto the defocus plane, rather than the focus spot information. Image data directly recording the focus spot information is not used here for the following reasons:
[0069] After the light beam range is limited by the aperture stop 140, the plano-concave lens 120 and the convex lens 131 filled with liquid cooperate to effectively focus the light into a small area at a close distance. There is a significant Fraunhofer diffraction phenomenon, and an Airy disk is formed near the focus. The radius formula is:
[0070] Wherein, r0 is the radius of the Airy disk, λ is the wavelength of the parallel laser beam, and D is the circular radius of the aperture stop 140;
[0071] It can be seen from the above formula that when the total focal length f6 formed by the combination of the plano-concave lens 120 and the convex lens 131 after filling with liquid increases, the radius r0 of the Airy disk will also increase, causing the resolution of the image data recording the focal spot information to decrease, which is likely to cause subsequent measurement errors.
[0072] To solve the problem of non-contact liquid concentration measurement, a simple and effective capillary imaging method has been proposed in the prior art. In this method, liquid is filled into a capillary to form a cylindrical lens. By using the imaging principle of a coaxial spherical optical system, the shape and position of the capillary's inward bend after the liquid is filled can be accurately obtained at the focus to measure the refractive index. The measured refractive index is then used to determine the liquid concentration through an existing conversion relationship. This traditional measurement method requires a very small amount of sample (less than 0.002 ml), but due to the short focal length (about 2 mm), the refractive index sensitivity is not high, and the measurement is difficult. The long focal depth is not conducive to distinguishing the specific focal plane position, and a mechanical scanning method is required for focus search, which is time-consuming. In addition, the entire device is not easy to integrate. The liquid concentration auxiliary measurement device shown in Figure 3 can extend the focal length compared to the capillary imaging method (that is, the focal length of the plano-concave lens 120 after filling with liquid can vary within the range of [-117mm, -140mm]), making the focal depth smaller, which is conducive to obtaining a more accurate and clear focal plane to determine the focal position, thereby improving measurement accuracy, and uses a geometric projection method for focus search, which is less time-consuming.
[0073] In yet another embodiment, the auxiliary focusing device 130 in the auxiliary measurement device for liquid concentration shown in FIG. 1 is described by way of example.
[0074] Please refer to Figure 4, which is another structural schematic diagram of a liquid concentration auxiliary measurement device provided in an embodiment of the present application. The device includes a laser generator 110, a plano-concave lens 120, a thin scattering medium 132, an aperture stop 140 and a CCD camera 150. The thin scattering medium 132 is the auxiliary focusing device 130.
[0075] In a specific implementation, when the plano-concave lens 120 is filled with a liquid sample, the laser generator 110 is used to generate a parallel laser beam. The plano-concave lens 120, after being filled with liquid, is used to diverge the parallel laser beam that has passed through the liquid sample and regard it as a divergent beam emerging from a virtual focus. The divergent beam passes through the thin scattering medium 132 to form a spatially distributed speckle signal. The aperture stop 140 is used to intercept the middle portion of the beam carrying the speckle signal and transmit the captured portion to the CCD camera 150. The CCD camera 150 is fixed at a defocused plane to perform imaging processing on the collected optical signal.
[0076] In this embodiment, the minimum spacing between the plano-concave lens 120 and the thin scattering medium 132 is set to 10 mm, the minimum spacing between the thin scattering medium 132 and the CCD camera 150 is also set to 10 mm, and the minimum spacing between the thin scattering medium 132 and the aperture stop 140 is set to 3 mm.
[0077] In practical applications, wavefront modulation can be used to focus a divergent light beam at any point inside the thin scattering medium 132 after the divergent light beam passes through the thin scattering medium 132. The thin scattering medium 132 after phase compensation can be regarded as a "lens" imaging system. The following relationship exists between the light spot obtained by performing autocorrelation restoration on the speckle pattern received by the CCD camera 150 and the light spot generated before the divergent light beam enters the thin scattering medium 132:
[0078] Where, d i is the distance from the thin scattering medium 132 to the CCD camera 150, d o is the focal length of the plano-concave lens 120 after filling with liquid, r is the radius of the aperture stop 140, and r0 is the spot radius. As can be seen from the above expression, the spot radius r0 increases with the focal length d of the plano-concave lens 120 after filling with liquid. o The size of the light spot changes, and the focal length of the plano-concave lens 120 after filling with liquid is related to the refractive index of the liquid sample. Therefore, the spot size generated before the divergent light beam enters the thin scattering medium 132 varies in accordance with the refractive index of the liquid sample.
[0079] It should be noted that when the liquid sample is in a certain turbid state, the device shown in FIG4 is more suitable for auxiliary measurement of the liquid sample than the device shown in FIG3 , because when the light beam passes through the thin scattering medium 132, speckle particles can be collected to achieve a certain statistical average, and then the speckle autocorrelation can be used to show the light spot on the off-focus plane of the thin scattering medium 132. There is no need to require the liquid sample to be absolutely transparent, and the entire device is easier to build.
[0080] In yet another embodiment, the liquid concentration auxiliary measurement device shown in FIG. 1 is further improved in consideration of the spatial placement of the device.
[0081] Please refer to Figure 5, which is a schematic diagram of another structural composition of a liquid concentration auxiliary measurement device provided in an embodiment of the present application, wherein the device includes a laser generator 110, a plano-concave lens 120, an auxiliary focusing device 130, an aperture stop 140, a CCD camera 150, a first refractor 160 and a second refractor 170; wherein, the first refractor 160 is arranged below the auxiliary focusing device 130 and is tilted at a certain angle, which can be but is not limited to being set to 45 degrees, the second refractor 170 is arranged below the CCD camera 150 and presents a mirror image relationship with the first refractor 160, and the aperture stop 140 is set between the first refractor 160 and the second refractor 170.
[0082] In a specific implementation process, when the plano-concave lens 120 is filled with a liquid sample, the laser generator 110 is used to generate a parallel laser beam. The plano-concave lens 120 after being filled with liquid is used to diverge the parallel laser beam passing through the liquid sample and regard it as a divergent beam emitted from a virtual focus. With the assistance of the auxiliary focusing device 130 and the aperture stop 140, the virtual focus is materialized and emitted in another form to the photosensitive surface of the CCD camera 150. In this process, the first refractor 160 and the second refractor 170 are used to assist in adjusting the light transmission direction. The CCD camera 150 is fixed on a defocused plane for imaging processing of the collected light signal.
[0083] It should be noted that if the device shown in Figure 1 is used to assist in liquid measurement, the longitudinal optical path formed may have problems such as limited position and difficult equipment maintenance; to solve this problem, the device shown in Figure 5 can be used to assist in liquid measurement.
[0084] Please refer to FIG6 , which is a flow chart of a method for measuring liquid concentration based on focus calculation provided by an embodiment of the present application. The method requires the use of the liquid concentration auxiliary measurement device shown in FIG1 , and specifically includes the following:
[0085] Step S210: When the plano-concave lens is filled with the liquid to be tested, controlling the laser generator to generate a parallel laser beam, wherein the parallel laser beam passes through the liquid to be tested and then undergoes a change in exit divergence through the plano-concave lens, and the generated divergent beam is projected onto the photosensitive surface of the CCD camera through the auxiliary focus-finding device and the aperture stop;
[0086] Step S220: controlling the CCD camera to be fixed at a defocus plane and performing imaging processing on the collected light signal to obtain a test image corresponding to the test liquid;
[0087] Step S230: analyzing the image to be measured to obtain the size of the light spot to be measured;
[0088] Step S240: call a fitting relationship between liquid concentration and light spot size, substitute the light spot size to be measured into the fitting relationship to perform calculation, and obtain the concentration of the liquid to be measured.
[0089] It should be noted that the data processing processes such as the above-mentioned step S230, the above-mentioned step S240 and the generation of the fitting relationship can be executed by Python language, MATLAB language or other programming languages on the computer device, and the control actions of the above-mentioned step S210 and the above-mentioned step S220 can also be executed by the computer device.
[0090] In one embodiment, when the auxiliary focus-finding device is the convex lens, that is, the above-mentioned measurement method further selects the liquid concentration auxiliary measurement device shown in FIG3 , the image to be measured obtained at this time is actually the original light spot image, which mainly represents the focus information presented by the plano-concave lens after being filled with liquid on the defocus plane. Referring to FIG7 , the implementation process of the above-mentioned step S230 includes but is not limited to the following:
[0091] Step S231: binarize the image to be tested to obtain a binarized image;
[0092] Step S232: segmenting the binary image to obtain a spot fitting image, as shown in FIG8 ;
[0093] Step S233: Using the outermost fitting ellipse contained in the spot fitting image as a boundary, obtain the pixel area occupied by the spot fitting image in the binary image (i.e., the pixel area within the boundary), and then output the pixel area as the measured spot size covered by the measured image.
[0094] In the above step S232, the existing adaptive threshold method is used to segment the binary image, and the segmentation threshold can be automatically adjusted according to the brightness of the light spot. Because the light spot is not a true circle, the light spot is chosen to be fitted into an elliptical shape for display. The advantage of using the adaptive threshold method here is that, for small light spots, the outward expansion of the fitting circle caused by excessive inner light intensity can be avoided, and for large light spots, the inward contraction of the fitting circle caused by too weak outer circle light intensity can be avoided, so that the final fitting circle is more consistent with the light spot size, and at the same time, the influence of vibration, water waves, small bubbles, etc. on the liquid surface caused by placing the glass sheet can be eliminated.
[0095] In yet another embodiment, when the auxiliary focusing device is the thin scattering medium, that is, the above-mentioned measurement method further uses the liquid concentration auxiliary measurement device shown in FIG4 , the image to be measured obtained in this case is actually a speckle original image, which mainly represents the speckle particle information presented by the plano-concave lens after being filled with liquid on the defocused plane. Referring to FIG9 , the implementation process of the above-mentioned step S230 includes, but is not limited to, the following:
[0096] Step S230.1: Process the image to be measured using the speckle autocorrelation imaging principle to obtain a spot image to be measured, as shown in FIG10 . The spot image to be measured can currently represent the focus information presented by the plano-concave lens after filling with liquid on the defocus plane, thereby implementing the speckle autocorrelation imaging restoration method;
[0097] Step S230.2: binarize the image of the light spot to be measured to obtain a binarized image;
[0098] Step S230.3: Segment the binary image to obtain a spot fitting image;
[0099] Step S230.4: Using the outermost fitting ellipse contained in the spot fitting image as the boundary, obtain the pixel area occupied by the spot fitting image in the binary image (i.e., the pixel area within the boundary), and then output the pixel area as the measured spot size covered by the measured image.
[0100] In the above step S230.1, the shape and size of the focal spot are separated from the random speckle contained in the image to be measured to restore the image of the spot to be measured. The mathematical expression used in this implementation process is:
[0101] Where,<I★I> is the speckle autocorrelation intensity, O★O is the image of the light spot to be measured,<S★S> Refers to the peak function, C is the autocorrelation coefficient, ★ refers to the autocorrelation operation, refers to the convolution operation, and ∝ refers to the proportional to sign.
[0102] In order to improve the reliability of the measured light spot image, it is proposed here to further improve the liquid concentration auxiliary measurement device shown in Figure 4, that is, to add a polarizer between the plano-concave lens 120 and the thin scattering medium 132, and the polarizer contained in the polarizer can rotate 360 degrees, and its rotation plane remains parallel to the thin scattering medium 132. At the same time, the minimum layout spacing between the plano-concave lens 120 and the thin scattering medium 132 is increased, that is, the minimum layout spacing between the plano-concave lens 120 and the polarizer is set to 10 mm, and the minimum layout spacing between the polarizer and the thin scattering medium 132 is set to 10 mm.
[0103] When the plano-concave lens is filled with the liquid to be tested, the polarizer is controlled to rotate according to a given rotation step length, and a different polarization direction is obtained each time it is rotated. The CCD camera is then controlled to perform an imaging operation to obtain a corresponding image to be tested. Assuming that the given rotation step length is α, M images to be tested can be obtained after the polarizer completes a 360-degree rotation, where M = 360 / α.
[0104] At this time, the existing speckle autocorrelation imaging principle is used to process the M images to be measured to obtain the spot image to be measured. The mathematical expression used in this implementation process is:
[0105] Where N m is the background noise in the mth polarization direction, which can be understood as the background noise that occurs when the CCD camera acquires the mth image to be measured.
[0106] In the embodiment of the present application, the process of generating the fitting relationship between the liquid concentration and the spot size mentioned in the above step S240 includes but is not limited to the following:
[0107] Step A1, obtaining N liquid samples having different known concentrations and the same type as the liquid to be tested, where N is a positive integer and greater than 1;
[0108] Step A2: obtaining an i-th liquid sample, and performing K imaging processes on the i-th liquid sample using the liquid concentration auxiliary measurement device to obtain K image samples corresponding to the i-th liquid sample;
[0109] Step A3: parsing the K image samples to obtain K corresponding spot sizes;
[0110] Step A4: averaging the K spot sizes to obtain an average spot size corresponding to the i-th liquid sample;
[0111] Step A5: Determine whether i+1 is less than or equal to N; if so, assign i+1 to i, and then return to the above step A2; if not, it means that N average spot sizes corresponding to the N liquid samples have been obtained, and then execute step A6;
[0112] Step A6: performing curve fitting on the N known concentration values and the N average spot sizes corresponding to the N liquid samples to obtain a fitting relationship between the liquid concentration and the spot size.
[0113] In order to better illustrate the generation of the fitting relationship, an exemplary description is given below:
[0114] (1) Preparation: First, the type of the liquid to be tested is set to alcohol (hereinafter described as the alcohol to be tested), and the liquid concentration auxiliary measurement device shown in FIG3 is used to complete the concentration measurement of the alcohol to be tested and determine the generation of a fitting relationship. At this time, pure alcohol with a concentration of 99.9% or 80% is selected and loaded into the plano-concave lens 120, and the laser generator 110 and the CCD camera 150 are started to perform a calibration experiment to determine the final layout position of the CCD camera 150;
[0115] (2) Experimental content: 22 alcohol samples with different known concentrations were prepared. Each alcohol sample was imaged five times using the liquid concentration auxiliary measurement device shown in FIG3 to obtain five image samples. The five image samples corresponding to each alcohol sample were then analyzed and averaged to obtain the average spot size corresponding to each alcohol sample, as shown in Table 1.
[0116] Table 1 Known concentration values and average spot sizes corresponding to different alcohol samples
[0117] With the known concentration of the alcohol sample as the horizontal axis and the average spot size corresponding to the alcohol sample as the vertical axis, a curve fitting is performed based on the data shown in Table 1, with one alcohol sample as a data point. The fitting curve between the alcohol concentration and the spot size and the fitting relationship it reflects are shown in Figure 11, where 3E+06 refers to 3 times 10 to the power of 6, and R 2 It refers to the square root of the sum of squares of the residuals between the output variable (spot size) and the independent variable (alcohol concentration), which is used to measure the influence of the independent variable (alcohol concentration) on the fitting relationship.
[0118] As can be seen from Figure 11, when the refractive index of the alcohol sample decreases, its concentration value decreases, but the spot size increases accordingly, indicating that the total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after filling with liquid becomes longer, reflecting that the virtual focal length of the plano-concave lens 120 after filling with liquid becomes shorter (that is, the virtual focal position is closer to the CCD camera 150, and the total real focal position is away from the CCD camera 150), proving that there is an observation law between the spot size and the changing focal position of the changing light beam in the same spatial plane, indicating that it is feasible to use this fitting relationship to determine the concentration value of the same type of alcohol to be tested.
[0119] (3) Later expansion application: The liquid concentration auxiliary measurement device shown in FIG3 is used to perform single imaging processing on the alcohol to be tested to obtain the image to be tested, and then the image to be tested is analyzed to obtain the corresponding spot size to be tested. Finally, the spot size to be tested is input into the fitting relationship obtained from the above experimental content for calculation to obtain the concentration value corresponding to the alcohol to be tested.
[0120] For any of the liquid concentration auxiliary measurement devices shown in FIG. 1 and FIG. 3 to FIG. 5 , the reasons for fixing the CCD camera 150 are explained as follows in conjunction with the liquid concentration measurement method based on calculation and focus search shown in FIG. 6 :
[0121] Unlike other interferometric instruments that can capture image information with phase data, the CCD camera 150 captures two-dimensional image information and cannot directly reflect the focal position of the plano-concave lens 120 after filling with liquid. If a traditional autofocus algorithm is used to find the focal position, the required imaging instrument and software computing power are too large. If an interferometric device is used to replace the CCD camera 150 to obtain an interference image to reflect the focal position, it cannot be accomplished with a simple optical path.
[0122] To this end, the present application proposes fixing the CCD camera 150 and related image processing algorithms to infer the relationship between the liquid refractive index and the focal length, so that the spot of the light beam collected on the same spatial plane and the focus of the light beam convergence follow a regular variation pattern. If the focal position is found by moving the CCD camera 150, since the image of the focal plane is clear within a certain range, this will cause errors in the image distance measurement. Moreover, since the focal position will change with the refractive index of the liquid, if the CCD camera 150 needs to be moved every time a liquid sample is measured, not only will the equipment adjustment time be wasted, but the determination of the focal length will be subject to human influence, resulting in large errors in the final liquid measurement results. Conversely, if the CCD camera 150 is fixed and the aperture stop 140 is introduced to generate geometric projection, the influence of the depth of focus can be reduced. That is, after the light beam is geometrically projected onto the CCD camera 150, the focal plane of the focal depth can be accurately determined based on slight changes in the spot size, and the focal depth is condensed to an ideal point, thereby accurately converting the focus into a defocus circle.
[0123] It should be noted that the method for measuring liquid concentration based on calculation and focus search proposed in the present application is actually to explore the relationship between the spot size and the liquid concentration, and the spot size is related to the focal length of the plano-concave lens 120 after filling with liquid, and the focal length is related to the refractive index of the liquid. After the relevant conversion of the liquid refractive index, some physical quantities can be obtained, including but not limited to liquid concentration and liquid density. It can be understood that the liquid concentration auxiliary measurement device proposed in the present application can also be applied to the measurement of liquid refractive index, liquid density, etc.; when the liquid concentration auxiliary measurement device proposed in the present application is applied to the measurement of liquid refractive index, it is only necessary to replace the method for measuring liquid concentration based on calculation and focus search proposed in the present application with calling the fitting relationship between liquid refractive index and spot size obtained by a similar pre-experimental method; when the liquid concentration auxiliary measurement device proposed in the present application is applied to the measurement of liquid density, it is only necessary to replace the method for measuring liquid concentration based on calculation and focus search proposed in the present application with calling the fitting relationship between liquid density and spot size obtained by a similar pre-experimental method.
[0124] In the embodiment of the present application, an auxiliary measurement device for liquid concentration is quickly constructed using common optical equipment in optical laboratories. It has high integration and low operating difficulty. It can directly perform non-contact measurement on a small amount of various types of liquid samples without the need for pre-processing of the liquid samples before the experiment, and has good practicality. By introducing machine vision technology to process the image output by the device to obtain key parameters, and then calling verified and reliable fitting formulas to calculate the key parameters to obtain the required measurement data, the measurement accuracy and reliability can be improved.
[0125] Although the description of the present application has been quite detailed and specifically describes several embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but should be considered to provide a broad possible interpretation of these claims by reference to the appended claims, taking into account the prior art, so as to effectively cover the intended scope of the present application. In addition, the above description of the present application is based on the embodiments foreseen by the inventors, which is intended to provide a useful description, and those non-substantial changes to the present application that have not yet been foreseen may still represent equivalent changes to the present application.
Claims
1. A method for measuring liquid concentration based on computational focusing, characterized in that, a liquid concentration auxiliary measurement device composed of a laser generator, a plano-concave lens, an auxiliary focusing device, an aperture stop, and a CCD camera is adopted, and the method includes: When the plano-concave lens is filled with the liquid to be measured, control the laser generator to generate a parallel laser beam, the parallel laser beam passes through the liquid to be measured and then undergoes a change in the exit divergence degree through the plano-concave lens, and the generated divergent beam is projected onto the photosensitive surface of the CCD camera via the auxiliary focusing device and the aperture stop; Control the CCD camera to be fixed on a defocus plane and perform imaging processing on the collected optical signal to obtain a test image corresponding to the liquid to be measured; Analyze the test image to obtain the size of the test light spot; Call the fitting relationship between the liquid concentration and the light spot size, substitute the size of the test light spot into the fitting relationship for calculation, and obtain the concentration of the liquid to be measured.
2. The method for measuring liquid concentration based on computational focusing according to claim 1, wherein, the auxiliary focusing device is a convex lens, the divergent beam is converged by the convex lens, and the generated converging beam enters the CCD camera after being intercepted in the middle part by the aperture stop.
3. The method for measuring liquid concentration based on computational focusing according to claim 2, wherein, the diameter of the convex lens is the same as the size of the light passing aperture of the plano-concave lens, the focal length of the convex lens is related to the change range of the focal length of the plano-concave lens after liquid filling and the layout distance between the convex lens and the plano-concave lens, and the layout distance between the aperture stop and the CCD camera is 10 mm.
4. The method for measuring liquid concentration based on computational focusing according to claim 2, wherein, the CCD camera is arranged in front of the minimum total focal length formed by the combination of the plano-concave lens after liquid filling and the convex lens.
5. The method for measuring liquid concentration based on computational focusing according to claim 2, wherein, the CCD camera is arranged behind the maximum total focal length formed by the combination of the plano-concave lens after liquid filling and the convex lens.
6. The method for measuring liquid concentration based on computational focusing according to claim 2, wherein, the analyzing the test image to obtain the size of the test light spot includes: the test image is the original light spot image, which records the focus information presented by the plano-concave lens after liquid filling on the defocus plane; perform binarization processing on the test image to obtain a binarized image; segment a light spot fitting image from the binarized image, obtain the pixel area occupied by the light spot fitting image in the binarized image, and output the pixel area as the size of the test light spot.
7. The method for measuring liquid concentration based on computational focusing according to claim 1, wherein, the auxiliary focusing device is a thin scattering medium, the divergent beam forms a spatially distributed speckle signal after passing through the thin scattering medium, and the beam carrying the speckle signal enters the CCD camera after being intercepted in the middle part by the aperture stop. 8. The method for measuring liquid concentration based on computational focusing according to claim 7, wherein, the layout distance between the thin scattering medium and the plano-concave lens is 10 mm, the layout distance between the CCD camera and the thin scattering medium is 10 mm, and the layout distance between the aperture stop and the thin scattering medium is 3 mm.
9. The method for measuring liquid concentration based on computational focusing according to claim 7, wherein, the parsing of the image to be measured to obtain the size of the spot to be measured includes: the image to be measured is the original speckle image, which records the speckle particle information presented by the plano-concave lens after being filled with liquid on the defocus plane; processing the image to be measured based on the principle of speckle autocorrelation imaging to obtain the image of the spot to be measured; performing binarization processing on the image of the spot to be measured to obtain a binarized image; segmenting a spot fitting image from the binarized image, obtaining the pixel area occupied by the spot fitting image in the binarized image, and outputting the pixel area as the size of the spot to be measured.
10. The method for measuring liquid concentration based on computational focusing according to claim 1, wherein, the fitting relationship is obtained by the following method: obtaining a plurality of liquid samples with different known concentrations, and the types of the plurality of liquid samples are the same as those of the liquid to be measured; for each liquid sample, performing multiple imaging processes on the liquid sample by using the liquid concentration auxiliary measuring device to obtain a plurality of image samples corresponding to the liquid sample; parsing the plurality of image samples to obtain a plurality of spot sizes; averaging the plurality of spot sizes to obtain the average spot size corresponding to the liquid sample; when the measurement of the plurality of liquid samples is completed, performing curve fitting on the concentrations and the average spot sizes corresponding to the plurality of liquid samples to obtain a fitting relationship between the liquid concentration and the spot size.
Citation Information
Patent Citations
Optical lens system and method for microfluidic devices
CN101793826A
Liquid refractive index measuring instrument based on electrowetting lens
CN110006845A
Liquid refractive index measuring method, device and system and readable storage medium
CN115711865A
Multiplex optical assembly
GB2496315A
Method and apparatus for measuring absorbing media refraction index
SU623143A1
Cited By
Solution refractive index real-time detection method based on polarization beam splitting differential measurement
CN121207932A