A method for measuring liquid concentration based on computational focusing

The liquid concentration auxiliary measurement device, built by computational focusing methods and optical equipment, solves the complexity and professionalism issues of liquid concentration measurement, and realizes rapid and accurate liquid concentration measurement.

CN117929322BActive Publication Date: 2025-12-02SHANTOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311621036.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2025-12-02
Estimated Expiration
2043-11-29

AI Technical Summary

Technical Problem

Existing technologies for measuring liquid concentration rely on the absorbability of liquids, requiring careful handling of liquid sample preparation and specialized operations, as well as numerous experimental consumables and complex procedures.

Method used

A computational focusing method is adopted, which utilizes a liquid concentration auxiliary measurement device consisting of a laser generator, a plano-concave lens, an auxiliary focusing device, an aperture stop, and a CCD camera. The liquid concentration is calculated through image processing and fitting formulas, simplifying operation and improving measurement accuracy.

Benefits of technology

It enables rapid, non-contact measurement of the concentration of various liquids, requires no pretreatment, is easy to operate, has high measurement accuracy, and is highly integrated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117929322B_ABST
    Figure CN117929322B_ABST
Patent Text Reader

Abstract

This invention discloses a method for measuring liquid concentration based on computational focusing. It employs a liquid concentration auxiliary measurement device including a laser generator, a plano-concave lens, an auxiliary focusing device, an aperture stop, and a CCD camera. The method includes: when the plano-concave lens is filled with the liquid to be measured, controlling the laser generator to generate a parallel laser beam so that it passes through the liquid and then undergoes a change in divergence after passing through the plano-concave lens. The resulting divergent beam is projected onto the photosensitive surface of the CCD camera via the auxiliary focusing device and the aperture stop; controlling the CCD camera to be fixed on a defocus plane and performing image processing on the acquired light signal; then analyzing the obtained image to obtain the size of the light spot to be measured; and finally, using a fitted relationship between liquid concentration and light spot size, substituting the light spot size into the fitted relationship to calculate the concentration of the liquid to be measured. This invention improves measurement accuracy and reliability by introducing a simple measurement optical path and machine vision technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of liquid measurement technology, specifically to a method for measuring liquid concentration based on computational focusing. Background Technology

[0002] In existing technologies, the concentration of a liquid is usually determined by analyzing its absorption spectrum, which relies on the absorbability of the liquid. However, this process requires careful handling of the liquid sample preparation and consideration of the impact of environmental factors on the spectrometer measurement. This not only results in the consumption of experimental materials but also requires the experimental personnel to have the corresponding professional operating skills to better complete the liquid measurement task. Summary of the Invention

[0003] This invention provides a method for measuring liquid concentration based on computational focusing, in order to solve one or more technical problems existing in the prior art, and at least provide a beneficial option or create conditions.

[0004] This invention provides a method for measuring liquid concentration based on computational focusing, employing a liquid concentration auxiliary measurement device including a laser generator, a plano-concave lens, an auxiliary focusing device, an aperture stop, and a CCD camera. The method includes:

[0005] 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 exit divergence through the plano-concave lens. The resulting divergent beam is projected onto the photosensitive surface of the CCD camera through the auxiliary focusing device and the aperture stop.

[0006] The CCD camera is fixed to a defocus plane and the acquired light signal is processed to obtain the image of the liquid to be tested.

[0007] The image to be tested is analyzed to obtain the size of the light spot to be tested;

[0008] The formula relating liquid concentration and spot size is used to calculate the concentration of the liquid to be tested by substituting the spot size into the formula.

[0009] Furthermore, the auxiliary focusing device is a convex lens, the diverging beam is converged by the convex lens, and the resulting converged beam is intercepted in the middle by the aperture stop before entering the CCD camera.

[0010] Furthermore, the diameter of the convex lens is the same as the aperture size of the plano-concave lens, the focal length of the convex lens is related to the range of focal length variation of the plano-concave lens after liquid filling and the arrangement spacing between the convex lens and the plano-concave lens, and the arrangement spacing between the aperture stop and the CCD camera is 10mm.

[0011] Furthermore, the CCD camera is positioned in front of the minimum total focal length formed by the combination of the plano-concave lens and the convex lens after the liquid is filled.

[0012] Furthermore, the CCD camera is positioned behind the maximum total focal length formed by the combination of the plano-concave lens and the convex lens after the liquid is filled.

[0013] Furthermore, the step of analyzing the image to be tested to obtain the size of the light spot to be tested includes:

[0014] The image to be tested is the original image of the light spot, which records the focal information presented by the plano-concave lens on the defocus plane after being filled with liquid;

[0015] The image to be tested is binarized to obtain a binarized image;

[0016] The light spot fitting image is segmented from the binarized image, and the pixel area occupied by the light spot fitting image in the binarized image is obtained. The pixel area is then output as the size of the light spot to be measured.

[0017] Furthermore, the auxiliary focusing device is a thin scattering medium, and the diverging beam passes through the thin scattering medium to form a spatially distributed speckle signal. The beam carrying the speckle signal is intercepted in the middle by the aperture stop and then enters the CCD camera.

[0018] Furthermore, the spacing between the thin scattering medium and the plano-concave lens is 10 mm, the spacing between the CCD camera and the thin scattering medium is 10 mm, and the spacing between the aperture stop and the thin scattering medium is 3 mm.

[0019] Furthermore, the step of analyzing the image to be tested to obtain the size of the light spot to be tested includes:

[0020] The image to be tested is the original speckle image, which records the speckle particle information presented by the plano-concave lens on the defocus plane after being filled with liquid;

[0021] The image to be tested is processed based on the principle of speckle autocorrelation imaging to obtain the image of the light spot to be tested;

[0022] The image of the light spot to be tested is binarized to obtain a binarized image;

[0023] The light spot fitting image is segmented from the binarized image, and the pixel area occupied by the light spot fitting image in the binarized image is obtained. The pixel area is then output as the size of the light spot to be measured.

[0024] Furthermore, the fitting relationship is obtained in the following way:

[0025] Obtain multiple liquid samples with different known concentrations, wherein the multiple liquid samples are of the same type as the liquid to be tested;

[0026] For each liquid sample, the liquid concentration auxiliary measurement device is used to perform multiple imaging processes on the liquid sample to obtain multiple image samples corresponding to the liquid sample;

[0027] The multiple image samples are analyzed to obtain multiple spot sizes;

[0028] The average spot size corresponding to the liquid sample is obtained by averaging the multiple spot sizes.

[0029] When the measurements of the various liquid samples are completed, curve fitting is performed on the concentration and average spot size of the various liquid samples to obtain the fitting relationship between liquid concentration and spot size.

[0030] The present invention has at least the following beneficial effects: it can quickly build a liquid concentration auxiliary measurement device using common optical equipment in optical laboratories, with high integration and low operation difficulty. It can directly perform non-contact measurement on small amounts of various types of liquid samples without pre-processing the liquid samples before the experiment, and has good practicality. By introducing machine vision technology to process the images output by the device to obtain key parameters, and then calling the verified and reliable fitting relationship to calculate the key parameters to obtain the required measurement data, the accuracy and reliability of the measurement can be improved. Attached Figure Description

[0031] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0032] Figure 1 This is a schematic diagram of the composition of a liquid concentration auxiliary measuring device in an embodiment of the present invention;

[0033] Figure 2 This is a schematic diagram of the plano-concave lens and biconcave lens in the liquid-filled state in the embodiments of the present invention.

[0034] Figure 3 This is another schematic diagram of the components of a liquid concentration auxiliary measuring device in an embodiment of the present invention;

[0035] Figure 4 This is another schematic diagram of the composition of a liquid concentration auxiliary measuring device in an embodiment of the present invention;

[0036] Figure 5 This is another schematic diagram of the composition of a liquid concentration auxiliary measuring device in an embodiment of the present invention;

[0037] Figure 6 This is a flowchart illustrating a method for measuring liquid concentration based on computational focusing, as described in an embodiment of the present invention.

[0038] Figure 7 This is a schematic diagram of the original light spot image in an embodiment of the present invention;

[0039] Figure 8 This is a schematic diagram of a light spot fitting image in an embodiment of the present invention;

[0040] Figure 9 This is a schematic diagram of the original speckle pattern in an embodiment of the present invention;

[0041] Figure 10 This is a schematic diagram of the light spot image to be tested in an embodiment of the present invention;

[0042] Figure 11 This is a fitting effect diagram of the relationship between alcohol concentration and spot size in an embodiment of the present invention.

[0043] Figure description: 110-Laser generator, 120-Planar-concave lens, 121-Glass plate, 130-Auxiliary focusing device, 131-Convex lens, 132-Thin scattering medium, 140-Aperture stop, 150-CCD camera, 160-First refracting mirror, 170-Second refracting mirror. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0045] It should be noted that although functional modules are divided in the system diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first," "second," "third," "fourth," etc., used in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed and are inherent to these processes, methods, products, or apparatuses.

[0046] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of a liquid concentration auxiliary measurement device in an embodiment of the present invention. 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.

[0047] In the specific implementation process, when the plano-concave lens 120 is filled with a liquid sample, the liquid sample should have a certain absorption and scattering ability. 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 diverging 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 to the photosensitive surface of the CCD camera 150 in another form. The CCD camera 150 is fixed to a defocus plane for imaging processing of the acquired light signal. The function of the aperture stop 140 can be understood as approximating the optical path formed by the plane wave beam as a geometric projection through the aperture.

[0048] In this embodiment of the invention, the laser generator 110 is preferably a Gaussian beam emitter. When it is put into use, the corresponding laser power is set to 8mW. No matter how deep the liquid sample is, as long as it has a certain degree of 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.

[0049] In this embodiment of the invention, the plano-concave lens 120 is preferably 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 onto the plano-concave lens 120 is different, the parallel laser beam passes through the liquid sample and enters the plano-concave lens 120, which will cause the focal length of the plano-concave lens 120 to change after being loaded with liquid.

[0050] In practical applications, when the plano-concave lens 120 is filled with a liquid sample, the surface tension of the liquid sample causes the liquid surface to approximately form a small convex lens, resulting in unnecessary scattering and reflection of the incident light, which affects the measurement stability of the liquid sample. It is necessary to place a glass plate 121 on 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 evaporation.

[0051] Of course, there are also biconcave lenses with similar functions on the market. Here, the advantages of using the plano-concave lens 120 in this invention to fill the liquid and assist in liquid concentration measurement are explained as follows:

[0052] See Figure 2 As shown in (a), the total focal length of the plano-concave lens 120 after being filled with liquid is:

[0053]

[0054] In the formula, This refers to the total focal length of the plano-concave lens 120 after it has been filled with liquid. The focal length of the plano-concave lens 120 when it is not filled with liquid. The refractive index of the glass plate placed on top of the plano-concave lens 120 is specifically taken as 1.5163. Here 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] See Figure 2 As shown in (b), the total focal length of the biconcave lens after being filled with liquid is:

[0056]

[0057] In the formula, This is the total focal length of the biconcave lens after being filled with liquid. The focal length of the unfilled biconcave lens. Let be the refractive index of the glass plate placed on top of the biconcave lens, and also take the value of 1.5163;

[0058] From the two formulas above, we can see that the focal length of the plano-concave lens 120 without liquid is... Focal length of an unfilled biconcave lens At the same time, the total focal length of the plano-concave lens 120 after being filled with liquid is... The total focal length of the biconcave lens after liquid filling Larger focal lengths, meaning that using the plano-concave lens 120 allows for a smaller depth of focus, result in a more precise focal point on the defocus plane in practical applications, ultimately leading to more accurate measurement results; and when the refractive index of the liquid sample... When a minute change occurs (which can be understood as a change of 0.001), the total focal length of the plano-concave lens 120 after being filled with liquid can be calculated. The change is greater, and compared to a biconcave lens after liquid filling, it is easier to reflect the refractive index change of the liquid sample. In other words, using the plano-concave lens 120 can make the measurement results more sensitive.

[0059] In a preferred embodiment, the above... Figure 1 The auxiliary focusing device 130 in the liquid concentration auxiliary measuring device shown is described by way of example.

[0060] Please refer to Figure 3 , Figure 3 This is a schematic diagram of another structural composition of a liquid concentration auxiliary measurement device provided in an embodiment of the present invention. 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 presented by the plano-concave lens 120 when a liquid sample with a refractive index of n1 is loaded, and point B represents the focal position presented by the plano-concave lens 120 when a liquid sample with a refractive index of n2 is loaded, where n1≠n2.

[0061] In the specific implementation process, when the plano-concave lens 120 is filled with liquid sample, the laser generator 110 is used to generate a parallel laser beam. After being filled with liquid, the plano-concave lens 120 is used to diverge the parallel laser beam passing through the liquid sample and regard it as a diverging beam emitted from a virtual focal point. The convex lens 131 is used to converge the diverging beam and generate a converged beam. The aperture stop 140 is used to cut off the middle part of the converged beam and transmit it to the CCD camera 150. The CCD camera 150 is fixed to a defocus plane for imaging processing of the acquired light signal.

[0062] In this preferred 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 it can be 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:

[0063] The total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after liquid filling is:

[0064]

[0065] In the formula, The total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after liquid filling. The focal length of the convex lens 131 is... This is the minimum spacing between the plano-concave lens 120 and the convex lens 131;

[0066] From the above formula, it can be seen that when At that time, the total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after being filled with liquid Only by achieving the maximum value can the depth of focus be minimized, which helps improve the accuracy of the final measurement results; the focal length of the plano-concave lens 120 after being filled with liquid is determined through preliminary experiments. It varies within the range of [-117mm, -140mm], combined with the formula. Calculations show that It should be close to the range of [121mm, 145mm]. Since the focal length of most biconvex lenses on the market is basically a multiple of 50mm, this invention selects a biconvex lens with a focal length of 100mm or 150mm.

[0067] In this preferred embodiment, the CCD camera 150 should be positioned in front of the minimum total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after liquid filling, so that the monotonic changes in the focal length of the plano-concave lens 120 after liquid filling can be included within the range of the unidirectional change in the light spot captured by the CCD camera 150, while improving the integration of the entire device.

[0068] Furthermore, this placement position is determined by pre-calibrating the CCD camera 150. Specifically, the higher the concentration of the liquid sample, the higher its refractive index. 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 liquid loading 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 onto the plano-concave lens 120. The laser generator 110 and the CCD camera 150 are then activated for calibration experiments. 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 magnified to basically fill the acquisition screen of the CCD camera 150. Then, the CCD camera 150 is fixed at the current position.

[0069] Of course, if the integration of the entire device is not taken into account, the CCD camera 150 can also be positioned behind the maximum total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after the liquid is filled. The present invention does not limit this.

[0070] It should be noted that the image data obtained by the CCD camera 150 after imaging processing actually records the distribution information of the geometric projection of the focal spot onto the defocus plane, and not the focal spot information itself. The image data directly recording the focal spot information is not used here for the following reasons:

[0071] After the aperture stop 140 limits the beam range, the plano-concave lens 120 and the convex lens 131, after being filled with liquid, can effectively focus the light into a small area at close range. This results in significant Fraunhofer diffraction, forming an Airy disk near the focal point, the radius of which is calculated as follows:

[0072]

[0073] In the formula, Let the radius of the Airy disk be . The wavelength of the parallel laser beam is [wavelength]. The radius of the circular aperture of the aperture stop 140;

[0074] As can be seen from the above formula, the total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after being filled with liquid is... As the radius of the Airy disk increases, This will also increase the resolution of the image data that records the spot information at the focal point, making it easier to cause subsequent measurement errors.

[0075] To address the problem of non-contact liquid concentration measurement, a simple and effective capillary imaging method has been proposed in existing technologies. This method involves filling a capillary with liquid to form a cylindrical lens. Utilizing the imaging principle of a coaxial spherical optical system, the refractive index can be accurately measured at the focal point, providing information such as the shape and position of the capillary's inward bending after liquid filling. The measured refractive index is then used to determine the liquid concentration through existing conversion relationships. This traditional measurement method requires a very small sample volume (less than 0.002 ml), but due to its short focal length (approximately 2 mm), the refractive index sensitivity is low, the depth of field for distance measurement is long, making it difficult to distinguish the specific focal plane position, and it requires mechanical scanning for focusing, which is time-consuming. Furthermore, the entire device is difficult to integrate. Figure 3 The liquid concentration auxiliary measuring device shown can extend the focal length (i.e., the focal length of the plano-concave lens 120 after being filled with liquid can vary within the range of [-117mm, -140mm]) compared to the capillary imaging method, resulting in a smaller depth of focus. This is beneficial for obtaining a more accurate and clear focal plane to determine the focal position, thereby improving the measurement accuracy. Furthermore, the use of geometric projection for focusing takes less time.

[0076] In yet another preferred embodiment, regarding the above... Figure 1 The auxiliary focusing device 130 in the liquid concentration auxiliary measuring device shown is described by way of example.

[0077] Please refer to Figure 4 , Figure 4 This is a schematic diagram of another structural composition of a liquid concentration auxiliary measurement device provided in an embodiment of the present invention. 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.

[0078] In the specific implementation process, when the plano-concave lens 120 is filled with liquid sample, the laser generator 110 is used to generate a parallel laser beam. After being filled with liquid, the plano-concave lens 120 is used to diverge the parallel laser beam passing through the liquid sample and regard it as a diverging beam emitted from a virtual focal point. The diverging 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 part of the beam carrying the speckle signal and then transmit it to the CCD camera 150. The CCD camera 150 is fixed to a defocus plane for imaging processing of the acquired light signal.

[0079] In this preferred 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.

[0080] In practical applications, wavefront modulation allows the divergent light beam to be focused at any point within the thin scattering medium 132 after passing through it. The thin scattering medium 132, after phase compensation, can be considered as a "lens" imaging system. The light spot obtained by autocorrelation reconstruction of the speckle pattern received by the CCD camera 150 and the light spot generated before the divergent light beam incident on the thin scattering medium 132 have the following relationship:

[0081]

[0082] In the formula, The distance from the thin scattering medium 132 to the CCD camera 150. The focal length of the plano-concave lens 120 after being filled with liquid. The radius of the aperture stop 140 is... Let be the radius of the light spot. From the above expression, we can see that the radius of the light spot is... As the focal length of the plano-concave lens 120 increases after being filled with liquid... The size changes, and the focal length of the plano-concave lens 120 after being filled with liquid is related to the refractive index of the liquid sample. Therefore, the size of the light spot generated before the diverging beam is incident on the thin scattering medium 132 varies with the refractive index of the liquid sample.

[0083] It should be noted that when the liquid sample exhibits a certain degree of turbidity, Figure 4 The device shown will be more Figure 3 The device shown is more suitable for auxiliary measurement of the liquid sample because when the light beam passes through the thin scattering medium 132, it can collect speckle particles to achieve a certain statistical average. Then, by speckle autocorrelation, the light spot on the defocus plane on the thin scattering medium 132 can be displayed. It is not necessary for the liquid sample to be absolutely transparent, and the entire device is easier to build.

[0084] In yet another preferred embodiment, considering the spatial arrangement of the device, the above-mentioned... Figure 1 The liquid concentration auxiliary measuring device shown has been further improved.

[0085] Please refer to Figure 5 , Figure 5This is a schematic diagram of another structural composition of a liquid concentration auxiliary measurement device provided in an embodiment of the present invention. 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 refractive mirror 160, and a second refractive mirror 170. The first refractive mirror 160 is disposed below the auxiliary focusing device 130 and tilted at a certain angle, which may be, but is not limited to, 45 degrees. The second refractive mirror 170 is disposed below the CCD camera 150 and is a mirror image of the first refractive mirror 160. The aperture stop 140 is disposed between the first refractive mirror 160 and the second refractive mirror 170.

[0086] In the specific implementation process, when the plano-concave lens 120 is filled with liquid sample, the laser generator 110 is used to generate a parallel laser beam. After being filled with liquid, the plano-concave lens 120 is used to diverge the parallel laser beam passing through the liquid sample and regard it as a diverging 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 to the photosensitive surface of the CCD camera 150 in another form. During this process, the light transmission direction is adjusted with the assistance of the first refractive mirror 160 and the second refractive mirror 170. The CCD camera 150 is fixed to a defocus plane for imaging processing of the acquired light signal.

[0087] It should be noted that if you choose Figure 1 The device shown, used for liquid measurement, may suffer from limitations in the longitudinal optical path it forms, leading to placement constraints and difficulties in equipment maintenance. To address this issue, a different approach can be adopted. Figure 5 The device shown assists in liquid measurement.

[0088] Please refer to Figure 6 , Figure 6 This is a flowchart illustrating a method for measuring liquid concentration based on computational focusing, provided by an embodiment of the present invention. The method requires the use of... Figure 1 The liquid concentration auxiliary measuring device shown specifically includes the following:

[0089] Step S210: 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 exit divergence through the plano-concave lens. The resulting divergent beam is projected onto the photosensitive surface of the CCD camera through the auxiliary focusing device and the aperture stop.

[0090] Step S220: Control the CCD camera to be fixed on a defocus plane and perform imaging processing on the acquired light signal to obtain the image of the liquid to be tested.

[0091] Step S230: Analyze the image to be tested to obtain the size of the light spot to be tested;

[0092] Step S240: Call the fitting relationship between liquid concentration and spot size, substitute the spot size to be measured into the fitting relationship to calculate the concentration of the liquid to be measured.

[0093] It should be noted that the data processing processes such as the above steps S230, S240 and generating the fitting relationship can be executed by Python, MATLAB or other programming languages ​​on the computer device, and the control actions of the above steps S210 and S220 can also be executed by the computer device.

[0094] In one embodiment, when the auxiliary focusing device is the convex lens, that is, the above measurement method is further selected as such Figure 3 The liquid concentration auxiliary measuring device shown in this diagram acquires an image of the light spot, which is actually the original image of the light spot. This image primarily represents the focal information presented by the plano-concave lens on the defocus plane after liquid loading. (See also...) Figure 7 As shown, the implementation process of step S230 above includes, but is not limited to, the following:

[0095] Step S231: Perform binarization processing on the image to be tested to obtain a binarized image;

[0096] Step S232: Segment the binarized image to obtain a spot-fitting image, such as... Figure 8 As shown;

[0097] Step S233: Using the outermost fitted ellipse contained in the light spot fitted image as the boundary, obtain the pixel area occupied by the light spot fitted image in the binarized image (i.e., the pixel area within the boundary), and then output the pixel area as the size of the light spot to be tested covered in the image to be tested.

[0098] In step S232 above, the existing adaptive thresholding method is used to segment the binarized image. The segmentation threshold can be automatically adjusted according to the brightness of the light spot. Since the light spot is not a true circle, it is chosen to fit the light spot into an ellipse for display. The advantage of using the adaptive thresholding method here is that it can avoid the fitted circle from expanding outward due to excessive inner light intensity for small light spots, and it can avoid the fitted circle from shrinking inward due to insufficient outer light intensity for large light spots. This makes the final fitted circle fit the size of the light spot better, and at the same time, it can eliminate the influence of vibration, water waves, small bubbles, etc. on the liquid surface when placing the glass slide.

[0099] In another embodiment, when the auxiliary focusing device is the thin scattering medium, that is, the above measurement method is further selected as such... Figure 4 The liquid concentration auxiliary measuring device shown in this diagram acquires an image that is actually the original speckle image, which mainly characterizes the speckle particle information presented by the plano-concave lens on the defocus plane after liquid loading. (See also...) Figure 9 As shown, the implementation process of step S230 above includes, but is not limited to, the following:

[0100] Step S230.1: Process the image to be tested using the speckle autocorrelation imaging principle to obtain the image of the light spot to be tested, such as... Figure 10 As shown, the image of the light spot to be tested can currently characterize the focal information presented by the plano-concave lens on the defocus plane after being filled with liquid, thereby realizing the speckle autocorrelation imaging recovery method;

[0101] Step S230.2: Perform binarization processing on the image of the light spot to be tested to obtain a binarized image;

[0102] Step S230.3: Perform segmentation processing on the binarized image to obtain a spot fitting image;

[0103] Step S230.4: Using the outermost fitted ellipse contained in the light spot fitted image as the boundary, obtain the pixel area occupied by the light spot fitted image in the binarized image (i.e., the pixel area within the boundary), and then output the pixel area as the size of the light spot to be tested covered in the image to be tested.

[0104] In step S230.1 above, the shape and size of the focal spot are separated from the random speckle contained in the image to be tested in order to reconstruct the image of the spot to be tested. The mathematical expression used in this implementation process is as follows:

[0105]

[0106] In the formula, The value represents the speckle autocorrelation intensity. The image of the light spot to be tested. Refers to the peak function, The autocorrelation coefficient is... Refers to autocorrelation operation, Refers to convolution operation. It refers to something that is proportional to the symbol.

[0107] To improve the reliability of the image of the light spot under test, a method is proposed here. Figure 4The liquid concentration auxiliary measurement device shown is further improved by adding a polarizer between the plano-concave lens 120 and the thin scattering medium 132. The polarizer contains a polarizer that can rotate 360 ​​degrees, and its rotation plane remains parallel to the thin scattering medium 132. At the same time, the minimum spacing between the plano-concave lens 120 and the thin scattering medium 132 is increased, that is, the minimum spacing between the plano-concave lens 120 and the polarizer is set to 10 mm, and the minimum spacing between the polarizer and the thin scattering medium 132 is set to 10 mm.

[0108] 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 size. Each rotation yields a different polarization direction. Then, the CCD camera is controlled to perform an imaging operation to obtain a corresponding image of the liquid to be tested. Assuming the given rotation step size is... At that time, after the polarizer has completed a 360-degree rotation, the image can be obtained. Zhang images to be tested, among which ;

[0109] At this point, the existing speckle autocorrelation imaging principle is used to analyze the... The image to be tested is processed to obtain the image of the light spot to be tested. The mathematical expression used in this process is:

[0110]

[0111] In the formula, The background noise in the m-th polarization direction can be understood as the background noise that occurs when the CCD camera acquires the m-th image to be tested.

[0112] In this embodiment of the invention, the process of generating the fitting relationship between liquid concentration and spot size mentioned in step S240 above includes, but is not limited to, the following:

[0113] Step A1: Obtain N liquid samples with different known concentrations and the same type as the liquid to be tested, where N is a positive integer and N is greater than 1;

[0114] Step A2: Obtain the i-th liquid sample, and perform K imaging processing 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;

[0115] Step A3: Analyze the K image samples to obtain the corresponding K spot sizes;

[0116] Step A4: Average the K spot sizes to obtain the average spot size corresponding to the i-th liquid sample;

[0117] Step A5: Determine if i+1 is less than or equal to N; if yes, assign i+1 to i and return to step A2 above; if no, it means that the N average spot sizes corresponding to the N liquid samples have been obtained, and then proceed to step A6.

[0118] Step A6: Perform curve fitting on the N known concentration values ​​and N average spot sizes corresponding to the N liquid samples to obtain the fitting relationship between liquid concentration and spot size.

[0119] To better illustrate the generation of the fitted relation, an illustrative example is provided below:

[0120] (1) Preparation: First, set the type of the liquid to be tested as alcohol (hereinafter referred to as the alcohol to be tested), and use the following method: Figure 3 The liquid concentration auxiliary measuring device shown is used to measure the concentration of the alcohol to be tested and to determine the fitted relationship. At this time, pure alcohol with a concentration of 99.9% or 80% is selected and loaded into the plano-concave lens 120. The laser generator 110 and the CCD camera 150 are started to perform a calibration experiment to determine the final placement position of the CCD camera 150.

[0121] (2) Experimental content: Prepare 22 alcohol samples with different known concentrations, and then... Figure 3 The liquid concentration auxiliary measuring device shown performs five imaging processes on each alcohol sample to obtain five image samples. Then, it analyzes and averages the five image samples corresponding to each alcohol sample to obtain the average spot size corresponding to each alcohol sample, as shown in Table 1.

[0122] Table 1. Known concentration values ​​and average spot size for different alcohol samples.

[0123]

[0124] Using the known concentration values ​​of the alcohol samples as the x-axis and the average spot size corresponding to the alcohol samples as the y-axis, based on the data shown in Table 1, a curve was fitted using one alcohol sample as a data point, resulting in the following... Figure 11 The fitted curves and their corresponding formulas for the relationship between alcohol concentration and spot size are shown, where 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), and is used to measure the degree of influence of the independent variable (alcohol concentration) on the fitted relationship.

[0125] Depend on Figure 11 It can be seen that when the refractive index of the alcohol sample decreases, its concentration value decreases, but the spot size increases accordingly. This indicates that the total focal length formed by the combination of the plano-concave lens 120 and the convex lens 131 after liquid loading becomes longer, reflecting that the virtual focal length of the plano-concave lens 120 becomes shorter after liquid loading (i.e., the virtual focal point position moves closer to the CCD camera 150, and the total real focal point position moves away from the CCD camera 150). This proves that there is an observational pattern between the spot size of the changing beam and the changing focal point position 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.

[0126] (3) Later extended applications: through such as Figure 3 The liquid concentration auxiliary measuring device shown performs a single imaging process on the alcohol to be tested to obtain the image to be tested. Then, after analyzing the image to be tested, the corresponding spot size to be tested is obtained. Finally, the spot size to be tested is input into the fitting relationship obtained in the above experiment to calculate the concentration value corresponding to the alcohol to be tested.

[0127] against Figure 1 , Figures 3 to 5 Any of the liquid concentration auxiliary measuring devices shown here, combined with Figure 6 The rationale for fixing the CCD camera 150 using the calculation-based focus measurement method shown is explained below:

[0128] Unlike other interferometers that can capture image information with phase data, the CCD camera 150 captures two-dimensional image information, which cannot directly reflect the focal position of the plano-concave lens 120 after liquid filling. If a traditional autofocus algorithm is used to find the focal position, the required imaging instrument and software computing power are too great. If an interferometer is used to replace the CCD camera 150 to obtain an interferometric image to reflect the focal position, it cannot be accomplished by a simple optical path.

[0129] To address this, the present invention proposes fixing the CCD camera 150 and using a related image processing algorithm to deduce the relationship between the liquid's refractive index and focal length. This allows for a predictable variation in the light spot and the focal point where the light beam converges on the same spatial plane. If the focal position is found by moving the CCD camera 150, the image will be clear within a certain range of the focal plane, leading to errors in image distance measurement. Furthermore, since the focal position changes with the liquid's refractive index, moving the CCD camera 150 for each liquid sample measurement not only wastes equipment adjustment time but also introduces human error in determining the focal length, resulting in significant errors in the final liquid measurement results. Conversely, by fixing the CCD camera 150 and introducing the aperture stop 140 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 subtle changes in the light spot size can accurately determine a specific focal plane within the depth of focus, concentrating the depth of focus into an ideal point, thereby precisely converting the focal point into a defocus circle.

[0130] It should be noted that the liquid concentration measurement method based on computational focusing proposed in this invention actually aims to explore the relationship between the spot size and the liquid concentration. The spot size is related to the focal length of the plano-concave lens 120 after liquid loading, and the focal length is related to the liquid refractive index. After relevant conversions 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 this invention can also be applied to the measurement of liquid refractive index, liquid density, etc. When the liquid concentration auxiliary measurement device proposed in this invention is applied to the measurement of liquid refractive index, it is only necessary to replace the liquid concentration measurement method based on computational focusing with the fitting relationship between liquid refractive index and spot size obtained through a similar pre-experiment method. When the liquid concentration auxiliary measurement device proposed in this invention is applied to the measurement of liquid density, it is only necessary to replace the liquid concentration measurement method based on computational focusing with the fitting relationship between liquid density and spot size obtained through a similar pre-experiment method.

[0131] In this embodiment of the invention, a liquid concentration auxiliary measurement device is quickly constructed using common optical equipment found in optical laboratories. It has a high degree of integration and is easy to operate. It can directly perform non-contact measurements on small quantities 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 images output by the device to obtain key parameters, and then calling a verified and reliable fitting formula to calculate the key parameters to obtain the required measurement data, the measurement accuracy and reliability can be improved.

[0132] Although the description of this application has been quite detailed and particularly focused on several of the described embodiments, it is not intended to limit itself to any of these details or embodiments or any particular embodiment. Rather, it should be considered as effectively covering the intended scope of this application by referring to the appended claims and taking into account the prior art, which provides for a broad possible interpretation of these claims. Furthermore, the foregoing description of this application with respect to embodiments foreseeable by the inventors is intended to provide a useful description, and non-substantial modifications to this application that have not yet been foreseen may still represent equivalent modifications.

Claims

1. A method for measuring liquid concentration based on computational focusing, characterized in that, The method employs a liquid concentration auxiliary measurement device including a laser generator, a plano-concave lens, an auxiliary focusing device, an aperture stop, and a CCD camera, and includes: 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 exit divergence through the plano-concave lens. The resulting divergent beam is projected onto the photosensitive surface of the CCD camera through the auxiliary focusing device and the aperture stop. The CCD camera is fixed to a defocus plane and the acquired light signal is processed to obtain the image of the liquid to be tested. The image to be tested is analyzed to obtain the size of the light spot to be tested; The formula relating liquid concentration and spot size is used to calculate the concentration of the liquid to be tested by substituting the spot size into the formula.

2. The method for measuring liquid concentration based on computational focusing according to claim 1, characterized in that, The auxiliary focusing device is a convex lens. The diverging light beam is converged by the convex lens, and the resulting converged light beam is intercepted in the middle by the aperture stop before entering the CCD camera.

3. The method for measuring liquid concentration based on computational focusing according to claim 2, characterized in that, The diameter of the convex lens is the same as the aperture size of the plano-concave lens. The focal length of the convex lens is related to the range of focal length variation of the plano-concave lens after liquid loading and the arrangement spacing between the convex lens and the plano-concave lens. The arrangement spacing between the aperture stop and the CCD camera is 10mm.

4. The method for measuring liquid concentration based on computational focusing according to claim 2, characterized in that, The CCD camera is positioned in front of the minimum total focal length formed by the combination of the plano-concave lens and the convex lens after the liquid is filled.

5. The method for measuring liquid concentration based on computational focusing according to claim 2, characterized in that, The CCD camera is positioned behind the maximum total focal length formed by the combination of the plano-concave lens and the convex lens after the liquid is filled.

6. The method for measuring liquid concentration based on computational focusing according to claim 2, characterized in that, The step of analyzing the image to be tested to obtain the size of the light spot includes: The image to be tested is the original image of the light spot, which records the focal information presented by the plano-concave lens on the defocus plane after being filled with liquid; The image to be tested is binarized to obtain a binarized image; The light spot fitting image is segmented from the binarized image, and the pixel area occupied by the light spot fitting image in the binarized image is obtained. The pixel area is then output as the size of the light spot to be measured.

7. The method for measuring liquid concentration based on computational focusing according to claim 1, characterized in that, The auxiliary focusing device is a thin scattering medium. The diverging beam passes through the thin scattering medium to form a spatially distributed speckle signal. The beam carrying the speckle signal is intercepted in the middle by the aperture stop and then enters the CCD camera.

8. The method for measuring liquid concentration based on computational focusing according to claim 7, characterized in that, The spacing between the thin scattering medium and the plano-concave lens is 10 mm, the spacing between the CCD camera and the thin scattering medium is 10 mm, and the spacing 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, characterized in that, The step of analyzing the image to be tested to obtain the size of the light spot includes: The image to be tested is the original speckle image, which records the speckle particle information presented by the plano-concave lens on the defocus plane after being filled with liquid; The image to be tested is processed based on the principle of speckle autocorrelation imaging to obtain the image of the light spot to be tested; The image of the light spot to be tested is binarized to obtain a binarized image; The light spot fitting image is segmented from the binarized image, and the pixel area occupied by the light spot fitting image in the binarized image is obtained. The pixel area is then output as the size of the light spot to be measured.

10. The method for measuring liquid concentration based on computational focusing according to claim 1, characterized in that, The fitting relationship is obtained in the following way: Obtain multiple liquid samples with different known concentrations, wherein the multiple liquid samples are of the same type as the liquid to be tested; For each liquid sample, the liquid concentration auxiliary measurement device is used to perform multiple imaging processes on the liquid sample to obtain multiple image samples corresponding to the liquid sample; The multiple image samples are analyzed to obtain multiple spot sizes; The average spot size corresponding to the liquid sample is obtained by averaging the multiple spot sizes. When the measurements of the various liquid samples are completed, curve fitting is performed on the concentration and average spot size of the various liquid samples to obtain the fitting relationship between liquid concentration and spot size.

Citation Information

Patent Citations

  • Optical system for cell imaging

    CN101099104A

  • Refractive index measuring method and system

    CN111812061A