CN115829954A - Solution concentration detection method based on image colorimetric analysis - Google Patents

Solution concentration detection method based on image colorimetric analysis Download PDF

Info

Publication number
CN115829954A
CN115829954A CN202211458879.5A CN202211458879A CN115829954A CN 115829954 A CN115829954 A CN 115829954A CN 202211458879 A CN202211458879 A CN 202211458879A CN 115829954 A CN115829954 A CN 115829954A
Authority
CN
China
Prior art keywords
image
concentration
solution
detected
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211458879.5A
Other languages
Chinese (zh)
Inventor
胡佳
姚鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuxi Daiji Biotechnology Co ltd
Suzhou Industrial Technology Research Institute of ZJU
Original Assignee
Wuxi Daiji Biotechnology Co ltd
Suzhou Industrial Technology Research Institute of ZJU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuxi Daiji Biotechnology Co ltd, Suzhou Industrial Technology Research Institute of ZJU filed Critical Wuxi Daiji Biotechnology Co ltd
Priority to CN202211458879.5A priority Critical patent/CN115829954A/en
Publication of CN115829954A publication Critical patent/CN115829954A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention provides a solution concentration detection method based on image colorimetric analysis, which comprises the following steps: acquiring an image of a to-be-detected monochromatic solution acquired by an image acquisition device under the irradiation of a light source; acquiring R, G and B three-channel components of each pixel point of an image under an RGB model; and obtaining the characteristic value of the color depth of the image according to the R, G and B three-channel components of each pixel point so as to match the concentration tau of the to-be-detected monochromatic solution. The invention also provides a system and a storage medium. And establishing a corresponding relation between the characteristic value of the color depth of the image acquired by the image acquisition module and the concentration of the to-be-detected monochromatic solution, and obtaining the R, G and B three-channel components of the image of the to-be-detected monochromatic solution to obtain the concentration of the to-be-detected monochromatic solution. The concentration of a single monochromatic solution to be detected can be measured, and the concentration of a plurality of monochromatic solutions to be detected can also be measured simultaneously, so that high-flux quantitative analysis is realized, and the operation is simple and rapid.

Description

Solution concentration detection method based on image colorimetric analysis
Technical Field
The invention relates to the technical field of detection, in particular to a solution concentration detection method based on image colorimetric analysis.
Background
The colorimetric analysis is a method of determining the concentration of a substance to be measured in a colored solution by observing the color of the colored solution to be measured with the eye (or by visual colorimeter), comparing the color depth of the colored solution, or by measuring with an electro-optical colorimeter, using the color of the colored solution itself or the color developed after adding a reagent. At present, the commonly used principle of a spectrophotometer is adopted for colorimetric analysis, and the method is characterized in that a laser emitter and a laser receiver are arranged on two sides of a container for containing a sample to be detected, and the concentration of the sample to be detected is analyzed by measuring the absorbance of colored solution in a specific wavelength or a certain wavelength range. The method can only adopt single-item sequential operation, when the number of samples to be detected is large, a transmission structure needs to be added to transport different samples to be detected to a detection position, and the method is complex in operation and low in working efficiency.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a solution concentration detection method based on image colorimetric analysis, which is simple and rapid to operate.
In order to achieve the above object, the present invention is achieved by the following technical solutions.
The invention provides a solution concentration detection method based on image colorimetric analysis, which comprises the following steps:
acquiring an image of a to-be-detected monochromatic solution acquired by an image acquisition device under the irradiation of a light source;
acquiring R, G and B three-channel components of each pixel point of an image under an RGB model;
and obtaining the characteristic value of the color depth of the image according to the R, G and B three-channel components of each pixel point so as to match the concentration tau of the to-be-detected monochromatic solution.
Preferably, the step of obtaining the characteristic value of the color depth of the image comprises:
and obtaining an R mean value, a G mean value and a B mean value of the image under the RGB model according to the R, G and B three-channel components of each pixel point to obtain a color depth characteristic value of the image.
Preferably, the step of obtaining the characteristic value of the color depth of the image comprises:
obtaining the maximum value Max (R, G, B) in the R mean value, the G mean value and the B mean value;
obtaining the minimum Min (R, G, B) in the R mean value, the G mean value and the B mean value;
acquiring the color depth characterization value;
wherein, the color depth characterization value is the ratio of the square of the maximum value to the difference value of the maximum value and the minimum value.
Preferably, the concentration of the monochromatic solution to be detected
Figure BDA0003954669330000021
Wherein A and C are coefficients related to the specific monochromatic solution to be detected, e is a constant, and tau is concentration.
Preferably, the method further comprises the steps of:
acquiring color depth characteristic values of a plurality of monochromatic solution images with known concentrations and the same type as that of a monochromatic solution to be detected;
and obtaining a concentration matching library according to the color depth characterization values and the known concentration values in one-to-one correspondence so as to match the concentration of the to-be-detected monochromatic solution.
Preferably, the R mean, the G mean, and the B mean are obtained by:
and acquiring R, G and B three-channel components of each pixel point in a target area of the image, and respectively calculating the arithmetic mean value of the R, G and B three-channel components of all the pixel points in the target area to obtain the R mean value, the G mean value and the B mean value.
Preferably, the R mean, the G mean, and the B mean are obtained by: when the color depth difference of any two pixel points of the monochromatic solution is smaller than a preset threshold value, acquiring three channel components of R, G and B of the pixel points with the preset number in a target area of the image, and respectively calculating the arithmetic mean value of the three channel components of R, G and B of the pixel points with the preset number in the target area to obtain the R mean value, the G mean value and the B mean value.
It is a second object of the present invention to provide a solution concentration detection system based on image colorimetric analysis, the system comprising:
the image acquisition module is configured for acquiring an image of the to-be-detected monochromatic solution and recording the image as a first image;
the analysis module is configured to obtain three channel components of R, G and B of each pixel point of the first image under the RGB model;
and the colorimetric module is configured to obtain a characteristic value of the color depth of the image according to the R, G and B three-channel components of each pixel point so as to match the concentration of the to-be-detected monochromatic solution.
Preferably, the device further comprises a storage module for storing a coefficient matching library of the corresponding relationship between the types of the standard solutions and the coefficient values.
Preferably, the computer program is executed by a processor to perform the method as described above.
Analysis module
Compared with the prior art, the invention has the beneficial effects that:
the solution concentration detection method based on image colorimetric analysis provided by the invention establishes a corresponding relation between the color depth characteristic values obtained by the R, G and B three-channel components of each pixel point of an image and the concentration tau of a to-be-detected monochromatic solution, namely, the concentration tau of the to-be-detected monochromatic solution is indicated by obtaining the color depth characteristic values of the image of the to-be-detected monochromatic solution. The concentration of a single monochromatic solution to be detected can be measured, and the concentration of a plurality of monochromatic solutions to be detected can also be measured simultaneously, so that high-flux quantitative analysis is realized, and the operation is simple and quick. The correspondingly adopted color comparator has simple structure and wide application range.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical means of the present invention more clearly understood and to be implemented according to the content of the description, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings. The detailed description of the present invention is given in detail by the following examples and the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart illustrating the steps of a method for detecting the concentration of a solution based on image colorimetric analysis according to the present invention;
FIG. 2 is a flow chart of the steps for obtaining a color depth characterization value according to the present invention;
FIG. 3 is a flowchart illustrating the steps of obtaining concentrations using a concentration matching library according to the present invention;
fig. 4 is an image of a group 1 to group 16 monochromatic solution of the present invention.
In the figure: 1. a color comparator; 10. a sample-bearing portion; 11. a stage; 12. a container rack; 13 a container; 20. an image acquisition device; 30. a light emitting module; 40. a reflective component;
201. group 1 images; 202. group 2 images; 203. group 3 images; 204. group 4 images; 205. group 5 images; 206. group 6 images; 207. group 7 images; 208. group 8 images; 209. group 9 images; 210. group 10 images; 211. group 11 images; 212. group 12 images; 213. group 13 images; 214. group 14 images; 215. group 15 images; 216. group 16 images.
Detailed Description
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings, which will enable those skilled in the art to practice the present invention with reference to the accompanying specification. In the drawings, the shape and size may be exaggerated for clarity, and the same reference numerals will be used throughout the drawings to designate the same or similar components. In the following description, terms such as center, thickness, height, length, front, back, rear, left, right, top, bottom, upper, lower, and the like are used based on the orientation or positional relationship shown in the drawings. In particular, "height" corresponds to the dimension from top to bottom, "width" corresponds to the dimension from left to right, and "depth" corresponds to the dimension from front to back. These relative terms are for convenience of description and are not generally intended to require a particular orientation. Terms concerning attachments, coupling and the like (e.g., "connected" and "attached") refer to a relationship wherein structures are secured or attached, either directly or indirectly, to one another through intervening structures, as well as both movable or rigid attachments or relationships, unless expressly described otherwise.
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example 1
The light is an electromagnetic wave, and is naturally a mixed light composed of electromagnetic waves with different wavelengths (380-780 nm) according to a certain proportion, and can be decomposed into various continuous visible spectrums with various colors such as red, orange, yellow, green, cyan, blue, purple and the like through a prism. When white light is passed through the solution, the solution is colorless if it does not absorb light of various wavelengths. If the solution absorbs a portion of the wavelengths of light, the solution appears to be colored by the remaining light after it has passed through the solution. The color of the colored solution is complementary to the color of the light absorbed. The more absorption, the darker the complementary color. Comparing the depth of color of the colored solution essentially compares the degree of absorption of light it absorbs by the colored solution.
The invention provides a solution concentration detection method based on image colorimetric analysis, which comprises the following steps as shown in figure 1:
s10, acquiring an image of the to-be-detected monochromatic solution acquired by the image acquisition device under the irradiation of a light source; the image acquisition device has image generation capacity and images the to-be-detected monochromatic solution at an imaging position and generates a corresponding image; further, the image acquisition device includes, but is not limited to, a camera, a video camera; specifically, the image acquisition device and the light emitting module are respectively arranged at two sides of a container for holding the to-be-detected monochromatic solution, when the concentration measurement is started, the light emitting module emits light rays to the container for holding the to-be-detected monochromatic solution, and the light rays are focused on an imaging plane after being linearly transmitted, refracted or reflected, so that an image of the to-be-detected monochromatic solution is finally obtained; further, local position images of the to-be-detected monochromatic solution or images of the whole monochromatic solution or images of a container containing the monochromatic solution can be collected as an image collection area according to needs;
s20, acquiring R, G and B three-channel components of each pixel point of the image under an RGB model; wherein, R, G, B three channels represent red R color channel, green G color channel, blue B color channel respectively; specifically, when an image is acquired by the image acquisition device, the image acquisition device arranges the three channels of R, G and B according to a certain format, and then performs interpolation processing to obtain an image; after the image acquired by the image acquisition device, an analysis module acquires and records R, G and B three-channel components of each pixel point of the image for subsequent calculation work;
and S30, obtaining the characteristic value of the color depth of the image according to the R, G and B three-channel components of each pixel point so as to match the concentration tau of the to-be-detected monochromatic solution. Specifically, in an embodiment, the concentration τ of the to-be-detected monochromatic solution is calculated by obtaining the color depth characteristic value of the image through the colorimetric module according to the R, G and B three-channel components of each pixel point. The device is convenient and quick, high in efficiency and capable of realizing high-throughput measurement, one image acquisition device can acquire images of one to-be-detected monochromatic solution or a plurality of to-be-detected monochromatic solutions at the same time, and the concentration tau of the corresponding to-be-detected monochromatic solution can be calculated after the characteristic value of the color depth of the corresponding to-be-detected monochromatic solution is acquired. The color condition of the to-be-detected monochromatic solution can be obtained by indicating the R, G and B three-channel components of each pixel point of the image, and the concentration tau of the to-be-detected monochromatic solution can be obtained, so that the concentration detection is efficient, rapid and batch.
It will be appreciated that the present invention provides the above method wherein the colour of the monochromatic solution is determined by the solute, the monochromatic solution meaning that the colour of the solution is uniform, the darker the colour of the solution the greater the concentration for the same monochromatic solution. It should be understood that when the method of the present application is used for measuring the concentration of a solution, when a plurality of substances which affect the color of the solution are present in the solution, only the measured substance in the solution can be made to exhibit the color through the pre-treatment, so that the sample to be measured exhibits a single color, and any existing pre-treatment method can be adopted.
Further, the step of obtaining the characteristic value of the color depth of the image comprises:
and obtaining an R mean value, a G mean value and a B mean value of the image under the RGB model according to the R, G and B three-channel components of each pixel point to obtain a color depth characteristic value of the image. The colorimetric module stores a concentration calculation formula, the concentration calculation formula consists of a coefficient, a constant and three channel value relational expressions of an R mean value, a G mean value and a B mean value, namely after three channel components of the R mean value, the G mean value and the B mean value of the to-be-detected monochromatic solution are obtained, the three channels of the R mean value, the G mean value and the B mean value are matched, and the concentration of the to-be-detected monochromatic solution can be calculated.
Further, as shown in fig. 2, the step of obtaining the depth of color characterization value of the image includes:
s301, obtaining a maximum value Max (R, G, B) in three channel components of the R mean value, the G mean value and the B mean value; after three-channel components of the R mean value, the G mean value and the B mean value are obtained, the colorimetric module compares the three-channel components to obtain the maximum value of the three-channel components of the R mean value, the G mean value and the B mean value;
s302, obtaining a minimum Min (R, G, B) in three-channel components of the R mean value, the G mean value and the B mean value; namely, obtaining
Figure BDA0003954669330000071
After the three-channel components are processed, the colorimetric module compares the three-channel components to obtain the minimum value of the R mean value, the G mean value and the B mean value;
s303, acquiring the color depth characterization value;
wherein, the color depth characterization value is the ratio of the square of the maximum value to the difference value of the maximum value and the minimum value. The color depth characterization values of the images corresponding to the to-be-detected monochromatic solutions with different concentrations are obtained through matching of three-channel components of the R mean value, the G mean value and the B mean value, and then the concentrations of the corresponding to-be-detected monochromatic solutions are indicated. The color depth characteristic value of the to-be-detected monochromatic solution is simple to calculate and easy to operate, and the running load of the colorimetric module is small. It should be understood that R in Max (R, G, B) and Min (R, G, B) is the R mean, G is the G mean, and B is the B mean.
In an embodiment, the step of matching the concentration color depth characterization value of the monochromatic solution to be detected includes:
s31, sheet to be detectedConcentration of color solution
Figure BDA0003954669330000072
Wherein A and C are coefficients related to a specific monochromatic solution to be detected, e is a constant, tau is concentration, and the unit of concentration is g/L. Specifically, the colorimetric module substitutes a formula after acquiring the maximum value and the minimum value of the R mean value, the G mean value and the B mean value to calculate the concentration of the to-be-detected monochromatic solution.
Further, if a certain to-be-detected monochromatic solution is frequently detected, a concentration matching library can be established according to the mathematical relationship between the characteristic value of the color depth of the to-be-detected monochromatic solution and the concentration value of the to-be-detected monochromatic solution, and the concentration of the to-be-detected monochromatic solution can be obtained through conventional matching processing. The method comprises the steps of establishing an arithmetic relation between the characteristic value of the color depth of the to-be-detected monochromatic solution and the concentration value of the to-be-detected monochromatic solution, storing the corresponding characteristic value of the color depth of the to-be-detected monochromatic solution through a storage unit, and outputting the characteristic value of the color depth of the to-be-detected monochromatic solution to a user through an output unit so that the user can analyze the relation between the characteristic value of the color depth of the to-be-detected monochromatic solution and the concentration value of the to-be-detected monochromatic solution. Specifically, as shown in fig. 3, the method further includes the steps of:
s321, obtaining color depth characteristic values of a plurality of monochromatic solution images with known concentrations and the same type as that of a monochromatic solution to be detected;
s322, obtaining a concentration matching library according to the color depth characterization values and the known concentration values in one-to-one correspondence, so as to match the concentration of the to-be-detected monochromatic solution.
Specifically, in one embodiment, the concentration matching comprises the steps of:
acquiring images of a plurality of monochromatic solutions with known concentrations and the same type as the monochromatic solution to be detected;
acquiring a color depth characteristic value of a corresponding monochromatic solution according to R, G and B three-channel components of each pixel point of a corresponding image;
and storing the concentration and the color depth characteristic value of the corresponding monochromatic solution in a storage unit to obtain a concentration matching library.
Further, the method also comprises the following steps:
and matching the characteristic value of the color depth of the to-be-detected monochromatic solution with the concentration matching library to obtain the concentration of the to-be-detected monochromatic solution. Specifically, a plurality of known monochromatic solutions with the same type as the to-be-detected monochromatic solution are measured, the corresponding relation between the concentration of the monochromatic solution and the color depth characterization value of the monochromatic solution is established, and the corresponding relation is stored in a storage unit. When the concentration of the to-be-detected monochromatic solution is measured, three-channel components of R, G and B of each pixel point of an image of the to-be-detected monochromatic solution are obtained, the color depth characterization value is obtained by the colorimetric module according to the three-channel components, the obtained color depth characterization value of the to-be-detected monochromatic solution is matched with the color depth characterization value numerical value stored in the storage unit in the concentration matching library, and then the corresponding concentration numerical value in the storage unit is matched, so that the concentration value of the to-be-detected monochromatic solution is calculated. The concentration of the to-be-detected monochromatic solution is determined through two sets of calculation schemes, one is that the concentration of the to-be-detected monochromatic solution is directly calculated through a concentration calculation formula, the other is that the color depth characteristic value of the to-be-detected monochromatic solution is calculated according to R, G and B three-channel components of each pixel point of the to-be-detected monochromatic solution image, and then the concentration of the to-be-detected monochromatic solution is obtained through a concentration matching library, so that the image colorimetric treatment efficiency is improved. Further, when the image colorimetric processing is executed, the corresponding calculation scheme can be selected according to the user, and the corresponding calculation scheme can also be automatically matched. When the corresponding calculation scheme is automatically matched, the color depth characteristic value of the to-be-detected monochromatic solution is obtained and then matched in the concentration matching library, and when the matching result is no, the obtained color depth characteristic value of the to-be-detected monochromatic solution is directly substituted into the concentration calculation formula for calculation, so that the concentration value of the to-be-detected monochromatic solution is obtained.
In an embodiment, the R-mean, the G-mean, and the B-mean are obtained by: and acquiring R, G and B three-channel components of each pixel point in a target area of the image, and respectively calculating the arithmetic mean value of the R, G and B three-channel components of all the pixel points in the target area to obtain the R mean value, the G mean value and the B mean value. . The size or shape of the target area of the image can be adjusted according to requirements, so that the accuracy of extracting the color depth characterization value of the image is improved.
In an embodiment, the R-mean, the G-mean, and the B-mean are obtained by: when the color depth difference of any two pixel points of the monochromatic solution is smaller than a preset threshold value, acquiring three channel components of R, G and B of the pixel points with the preset number in a target area of the image, and respectively calculating the arithmetic mean value of the three channel components of R, G and B of the pixel points with the preset number in the target area to obtain the R mean value, the G mean value and the B mean value. Specifically, when the color depth of each part of the sample to be measured is not greatly different, the difference of three-channel components of different pixel points of the obtained image is not large, and the three-channel components of all the pixel points in the target area do not need to be respectively averaged, that is, when the color depth difference of any two pixel points is smaller than a preset threshold value, the three-channel components of R, G and B of a preset number of pixel points are selected to be respectively averaged.
Specifically, 16 sets of monochromatic solutions of known concentration were prepared for linear regression analysis. Corresponding images are respectively obtained to determine the values of the coefficients A and C according to the relation between the color depth characteristic value of the image of the single-color solution and the concentration of the single-color solution. As shown in fig. 4, for the images of group 1 to group 16, the group 1 to group 16 become darker in color; it should be understood that the actually acquired image is a color picture, and fig. 4 is a graph obtained by performing gray processing on the actually acquired RGB color picture according to the requirements of the patent application document on the attached drawings. Obtaining R, G and B three-channel components of each pixel point of the corresponding image, obtaining R mean, G mean and B mean, calculating Max (R, G, B) and Min (R, G, B), and further calculating the ratio of the square of Max (R, G, B) to the difference between Max (R, G, B) and Min (R, G, B), so as to obtain the color depth characteristic value of the corresponding monochromatic solution. Forming a relational graph by taking the color depth characteristic values and the concentrations of the 16 groups of monochromatic solutions as an abscissa and an ordinate respectively; the abscissa x represents the ratio of the square of Max (R, G, B) to the difference between Max (R, G, B) and Min (R, G, B), and y represents the concentration, and the relation between x and y is obtained as y =0.5222e -1.001x (ii) a Wherein the coefficient A is equal to 0.5222; c is equal to-1.001; r 2 The correlation index is used for reflecting the effect of linear regression analysis and is between 0 and 1, and the correlation index is more connectedNear 1, the better the regression fit, and generally speaking, the model with a goodness of fit exceeding 0.8 is relatively high. Further determining a new and convenient concentration calculation formula
Figure BDA0003954669330000101
The concentration of a single to-be-detected monochromatic solution can be measured, and the concentration of a plurality of to-be-detected monochromatic solutions can be measured simultaneously, so that high-flux quantitative analysis is realized, and the method is rapid and convenient.
The corresponding relation of the depth of color characterization values and the concentration values of the 16 groups of single-color solutions is shown in a table I.
Watch 1
Figure BDA0003954669330000102
Example 2
The invention provides a solution concentration detection system based on image colorimetric analysis, which comprises:
the image acquisition module is configured to acquire an image of the to-be-detected monochromatic solution and record the image as a first image; specifically, a sample bearing part for placing the monochromatic solution to be measured is provided with at least one sample position, when the concentration of a plurality of monochromatic solutions to be measured needs to be measured at the same time, a picture collected by an image collecting module comprises a plurality of images of the monochromatic solutions to be measured, the images are marked as an original picture, the original picture is divided, and one sample corresponds to one image and is marked as a first image;
the analysis module is configured to obtain three channel components of R, G and B of each pixel point of the first image under the RGB model;
and the colorimetric module is configured to obtain a characteristic value of the color depth of the image according to the R, G and B three-channel components of each pixel point so as to match the concentration of the to-be-detected monochromatic solution.
Further, in an embodiment, the image colorimetric system provided by the present invention is only used for determining the concentration of one type of monochromatic solution, obtaining three channel components of R, G, and B of each pixel point of the image of the standard solution corresponding to the type of monochromatic solution, calculating to obtain the values of the corresponding coefficient a and coefficient C, and storing the values in the storage unit. As two coefficient values of A and C are required to be determined, the standard solution can be prepared into a plurality of monochromatic solutions with different concentrations, corresponding images are collected, and the two coefficient values of A and C are determined by substituting the corresponding monochromatic solution concentration and the R, G and B three-channel components of the images into a concentration calculation formula. When the concentration of the monochromatic solution is detected, the concentration of the monochromatic solution can be obtained according to the obtained R, G and B three-channel components of the monochromatic solution to be detected and a concentration calculation formula.
In another embodiment, as shown in fig. 2, the image colorimetric system provided by the present invention, when used for measuring the concentration of a plurality of different types of monochromatic solutions, further includes a storage module for storing a coefficient matching library of the relationship between the types of the standard solutions and the coefficient values. Specifically, the establishment of the coefficient matching library comprises the following steps:
acquiring R, G and B three-channel components of each pixel point of an image of a plurality of monochromatic solutions of known monochromatic solution types;
and obtaining corresponding color depth characterization values according to R, G and B three-channel components of each pixel, obtaining A and C coefficient values after corresponding concentration calculation formulas according to the concentrations of corresponding standard solutions, storing the types and the corresponding A and C coefficient values into a storage unit to obtain a coefficient matching library, and determining a specific concentration calculation formula when the concentration of the to-be-detected monochromatic solution is measured. Similarly, because the A and C coefficient values need to be determined, the standard solution of the same single-color solution type can be prepared into a plurality of single-color solutions with different concentrations, corresponding images are collected, and the A and C coefficient values are determined by substituting the corresponding color depth characterization values into the concentration calculation formula.
Further, when the image colorimetric system performs colorimetry after the monochromatic solution coefficient matching library is established, the method further comprises the following steps:
and matching the type of the to-be-detected monochromatic solution with the monochromatic solution coefficient matching library to obtain a corresponding concentration calculation formula, namely obtaining a coefficient A and a coefficient C of the concentration calculation formula corresponding to the to-be-detected monochromatic solution to obtain corresponding numerical values and substituting the numerical values into the formula. When the concentration of the same batch is measured, the single-color solution to be detected is of the same single-color solution type; when the monochromatic solution of different monochromatic solution types needs to be measured, the measurement is carried out in batches, the detection can be carried out only by inputting the type of the monochromatic solution to be detected, the method is efficient and rapid, the application range is wide, and the monochromatic solution coefficient matching library can be updated at any time so as to expand the range of the measured object.
The present invention also provides a color comparator 1 for implementing the image color comparison system described above, the color comparator 1 including:
a sample holding part 10 configured to hold a monochromatic solution to be detected; specifically, the sample holder 10 may be fixed, and the image capturing device 20 is matched with the position of the monochromatic solution to be detected placed on the sample holder 10, so as to capture the image accurately; the sample bearing part 10 can also be movable to convey the monochromatic solution to be detected to the position where the image acquisition device 20 is matched for image acquisition; the sample bearing part 10 comprises a bearing platform 11, the bearing platform 11 is detachably connected with a container frame 12, a container 13 for containing the monochromatic solution to be detected is fixed on the container frame 12, or a containing groove for placing the container 13 is arranged on the container frame 12, so that the monochromatic solution to be detected can be replaced conveniently; it should be understood that the container is transparent and colorless, so as not to affect the color condition of the monochromatic solution to be detected;
the image acquisition device 20 is configured to acquire an image of the to-be-detected monochromatic solution; the image acquisition device 20 is provided with an image acquisition module;
the light-emitting module 30 is configured to emit light from one side of the monochromatic solution to be detected, which faces away from the image acquisition device; the light emitting module 30 is a lamp panel, and further, the lamp panel includes a fixing plate and a plurality of LED lamp beads arranged on the fixing plate, the plurality of LED lamp beads are uniformly distributed and arranged toward the sample bearing part 10 to emit uniform light to the sample bearing part 10;
the analysis module is configured for acquiring R, G and B three-channel components of each pixel point of the first image under the RGB model;
and the colorimetric module is configured to obtain a characteristic value of the color depth of the image according to the R, G and B three-channel components of each pixel point so as to match the concentration of the to-be-detected monochromatic solution.
Specifically, the sample bearing portion 10, the image acquisition device 20, and the light emitting module 30 are disposed in a closed cavity of the box, and the inner wall of the cavity is black, so as to reduce the reflection of light emitted from the light emitting module 30 by the inner wall of the cavity, and ensure the accuracy of the image acquired by the image acquisition device 20. The sample holder 10, the image acquisition device 20, the light-emitting module 30, the analysis module, the colorimetric module, and the case constitute a basic structure of the colorimeter 1, and are used to implement the image colorimetric system.
In an embodiment, the sample holder 10 and the image capturing device 20 are distributed along the direction of the light emitted from the light emitting module 30, and when the light emitting module 30 is turned on, the image capturing device 20 captures an image of the monochromatic solution to be detected on the sample holder 10. In yet another embodiment, the system further comprises a reflective assembly 40; the sample bearing part 10 is distributed along the direction of the light rays emitted from the light emitting module 30 in a centralized manner, and the light rays emitted from the light emitting module 30 are reflected by the reflection assembly 40 to the image acquisition device 20 after passing through the monochromatic solution to be detected, so that the image acquisition device 20 can acquire the image of the monochromatic solution to be detected. That is, the light emitted from the light-emitting module 30 by the image capturing device 20 changes the direction of the path through the reflecting component 40, so as to reasonably arrange the distribution of the sample holder 10 and the image capturing device 20 in the box, which is beneficial to the miniaturization design of the box size.
In one embodiment, the colorimetric module sends the obtained concentration of the to-be-detected monochromatic solution to the display module, so that a user can read the measured concentration value. Further, the display module can be disposed on the box of the color comparator 1, and also disposed on the display electrically connected to the color comparator 1.
Example 3
The present invention provides a computer-readable storage medium having stored thereon a computer program for execution by a processor of a method as described above. Program code for performing the methods described above is stored on a computer readable storage medium for reading and execution by a processor of a computer.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner; those skilled in the art can readily practice the invention as shown and described in the drawings and detailed description herein; however, those skilled in the art should appreciate that they can readily use the disclosed conception and specific embodiments as a basis for designing or modifying other structures for carrying out the same purposes of the present invention without departing from the scope of the invention as defined by the appended claims; meanwhile, any changes, modifications, and evolutions of the equivalent changes of the above embodiments according to the actual techniques of the present invention are still within the protection scope of the technical solution of the present invention.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present description are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus comprising the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (10)

1. The method for detecting the concentration of the solution based on the image colorimetric analysis is characterized by comprising the following steps of:
acquiring an image of a to-be-detected monochromatic solution acquired by an image acquisition device under the irradiation of a light source;
acquiring R, G and B three-channel components of each pixel point of an image under an RGB model;
and obtaining the characteristic value of the color depth of the image according to the R, G and B three-channel components of each pixel point so as to match the concentration tau of the to-be-detected monochromatic solution.
2. The method for detecting concentration of a solution based on colorimetric image analysis according to claim 1, wherein the step of obtaining the characteristic value of color depth of the image comprises:
and obtaining an R mean value, a G mean value and a B mean value of the image under the RGB model according to the R, G and B three-channel components of each pixel point to obtain a color depth characteristic value of the image.
3. The method for detecting concentration of a solution based on colorimetric image analysis according to claim 2, wherein the step of obtaining the characteristic value of color depth of the image comprises:
obtaining the maximum value Max (R, G, B) in the R mean value, the G mean value and the B mean value;
obtaining the minimum Min (R, G, B) in the R mean value, the G mean value and the B mean value;
acquiring the color depth characterization value;
wherein, the color depth characterization value is the ratio of the square of the maximum value to the difference value of the maximum value and the minimum value.
4. The method for detecting a concentration of a solution based on colorimetric image analysis according to any one of claims 1 to 3,
concentration of the monochromatic solution to be detected
Figure FDA0003954669320000011
Wherein A and C are coefficients related to the specific monochromatic solution to be detected, e is a constant, and tau is concentration.
5. The method for detecting the concentration of a solution based on colorimetric image analysis according to claim 3, further comprising the steps of:
acquiring color depth characteristic values of a plurality of monochromatic solution images with known concentrations and the same type as that of a monochromatic solution to be detected;
and obtaining a concentration matching library according to the color depth characterization values and the known concentration values in one-to-one correspondence so as to match the concentration of the to-be-detected monochromatic solution.
6. The method for detecting the concentration of a solution based on colorimetric image analysis according to claim 2, wherein the R-mean, the G-mean, and the B-mean are obtained by:
and acquiring R, G and B three-channel components of each pixel point in a target area of the image, and respectively calculating the arithmetic mean value of the R, G and B three-channel components of all the pixel points in the target area to obtain the R mean value, the G mean value and the B mean value.
7. The method for detecting the concentration of a solution based on colorimetric image analysis according to claim 2, wherein the R-mean, the G-mean, and the B-mean are obtained by: when the color depth difference of any two pixel points of the monochromatic solution is smaller than a preset threshold value, acquiring three channel components of R, G and B of the pixel points with the preset number in a target area of the image, and respectively calculating the arithmetic mean value of the three channel components of R, G and B of the pixel points with the preset number in the target area to obtain the R mean value, the G mean value and the B mean value.
8. A system for detecting the concentration of a solution based on colorimetric image analysis, the system comprising:
the image acquisition module is configured to acquire an image of the to-be-detected monochromatic solution and record the image as a first image;
the analysis module is configured to obtain three channel components of R, G and B of each pixel point of the first image under the RGB model;
and the colorimetric module is configured to obtain a characteristic value of the color depth of the image according to the R, G and B three-channel components of each pixel point so as to match the concentration of the to-be-detected monochromatic solution.
9. The system according to claim 8, further comprising a storage module for storing a coefficient matching library of the correlation between the types of the standard solutions and the coefficient values.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program is executed by a processor for performing the method according to any of the claims 1-7.
CN202211458879.5A 2022-11-17 2022-11-17 Solution concentration detection method based on image colorimetric analysis Pending CN115829954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211458879.5A CN115829954A (en) 2022-11-17 2022-11-17 Solution concentration detection method based on image colorimetric analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211458879.5A CN115829954A (en) 2022-11-17 2022-11-17 Solution concentration detection method based on image colorimetric analysis

Publications (1)

Publication Number Publication Date
CN115829954A true CN115829954A (en) 2023-03-21

Family

ID=85529830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211458879.5A Pending CN115829954A (en) 2022-11-17 2022-11-17 Solution concentration detection method based on image colorimetric analysis

Country Status (1)

Country Link
CN (1) CN115829954A (en)

Similar Documents

Publication Publication Date Title
USRE49543E1 (en) Fine particle measuring apparatus
US9014430B2 (en) Image analysis platform for identifying artifacts in samples and laboratory consumables
US9002077B2 (en) Visualization of stained samples
US20190197295A1 (en) Full resolution color imaging of an object
EP2299258A1 (en) Absorbance measurements using portable electronic devices with built-in camera
CN107064096A (en) Mix powder non-destructive ration examining device and method based on high light spectrum image-forming
CN112611723B (en) HSV/HSB color space colorimetric method, system and storage medium for measuring concentration of monochromatic solution
CN104160251A (en) Calibration method for reagent card analyzers
CN107884368B (en) Optical test system and test method
US20230139524A1 (en) Systems and methods for characterization of an assay from regions of interest using optical reactions
WO2017019762A1 (en) Image based photometry
CN112595678B (en) RGB-based image colorimetric concentration determination method, system and storage medium
CN112557320B (en) Image colorimetric concentration determination method, system and storage medium based on HSV/HSB
CN115829954A (en) Solution concentration detection method based on image colorimetric analysis
US11698342B2 (en) Method and system for analysing fluorospot assays
CN214584857U (en) Rapid solution colorimetric analysis detection device and system
CN115598124B (en) Color deconvolution water quality detection method
Wright et al. Free and open-source software for object detection, size, and colour determination for use in plant phenotyping
US20220406080A1 (en) Automatic calibration using machine learning
CN214472788U (en) Color comparator for determining concentration of monochromatic solution
CN117848981A (en) Multispectral imaging integrated system, device and use method thereof
US20230349828A1 (en) Method and system for analysing fluorospot assays
Panyangam et al. RGB Color Measuringc Tool Of Simple Colorimetric Detection For High Throughput Antioxidant Capacity Assay On Well Plate
US20220404258A1 (en) Automatic calibration
TR202100634A2 (en) AUTOMATIC PCR RESULT ANALYZER

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination