CN115508341A - Water quality detection method and system based on digital image processing - Google Patents

Water quality detection method and system based on digital image processing Download PDF

Info

Publication number
CN115508341A
CN115508341A CN202110695994.3A CN202110695994A CN115508341A CN 115508341 A CN115508341 A CN 115508341A CN 202110695994 A CN202110695994 A CN 202110695994A CN 115508341 A CN115508341 A CN 115508341A
Authority
CN
China
Prior art keywords
chromaticity
detection
image
target object
test target
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
CN202110695994.3A
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.)
China Petroleum and Chemical Corp
Sinopec Qingdao Safety Engineering Institute
Original Assignee
China Petroleum and Chemical Corp
Sinopec Qingdao Safety Engineering Institute
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 China Petroleum and Chemical Corp, Sinopec Qingdao Safety Engineering Institute filed Critical China Petroleum and Chemical Corp
Priority to CN202110695994.3A priority Critical patent/CN115508341A/en
Priority to PCT/CN2022/094832 priority patent/WO2022267799A1/en
Priority to EP22827296.9A priority patent/EP4343307A1/en
Publication of CN115508341A publication Critical patent/CN115508341A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/75Systems in which material is subjected to a chemical reaction, the progress or the result of the reaction being investigated
    • G01N21/77Systems in which material is subjected to a chemical reaction, the progress or the result of the reaction being investigated by observing the effect on a chemical indicator
    • G01N21/78Systems in which material is subjected to a chemical reaction, the progress or the result of the reaction being investigated by observing the effect on a chemical indicator producing a change of colour
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/94Investigating contamination, e.g. dust

Landscapes

  • Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Plasma & Fusion (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Investigating Or Analysing Materials By The Use Of Chemical Reactions (AREA)

Abstract

The invention provides a water quality detection method and system based on digital image processing, and belongs to the field of water quality detection. The method comprises the following steps: fusing the selected test reagent with a water sample to be detected to obtain a detection sample; acquiring a color image of a detection sample; correcting the image according to the standard chromaticity of the laboratory; and acquiring an actual colorimetric value of the corrected image under a reference condition according to a preset image algorithm as a current colorimetric value of the test target object, determining a detection object colorimetric concentration standard curve corresponding to the test target object, and searching a concentration value corresponding to the current colorimetric value of the test target object from the detection object colorimetric concentration standard curve as an actual concentration of the test target object. The scheme of the invention realizes a method for detecting water quality through image analysis, improves the convenience of water quality detection and improves the detection efficiency.

Description

Water quality detection method and system based on digital image processing
Technical Field
The invention relates to the field of water quality detection, in particular to a water quality detection method based on digital image processing and a water quality detection system based on digital image processing.
Background
The quantitative determination of the target object in the water body is widely applied to the processes of industrial water quality detection, environmental detection, biochemical analysis, accident investigation, domestic water detection, sewage treatment and the like, and relates to the fields of industrial production, medical health, daily life and the like. The water quality detection techniques mainly include chemical analysis methods, instrumental analysis methods, and the like, such as gravimetric analysis, titrimetric analysis, optical analysis, electrochemical analysis, chromatography, mass spectrometry, and the like. Many traditional detection methods have large equipment volume, low analysis speed, low working efficiency and large reagent dosage, and are difficult to adapt to the field and field working environment conditions and portable use. While large-scale and precise monitoring systems are continuously developed, research on small-sized portable, automatic, continuous, simple and rapid monitoring technologies is gradually paid attention. Aiming at the problems of low testing efficiency and harsh monitoring conditions of the existing water body target object quantitative determination method, a water quality detection method based on digital image processing needs to be created.
Disclosure of Invention
The invention aims to provide a water quality detection method and system based on digital image processing, and at least solves the problems of low test efficiency and harsh monitoring conditions of the existing water body target object quantitative determination method.
In order to achieve the above object, a first aspect of the present invention provides a water quality detection method based on digital image processing, the method comprising: selecting a corresponding test reagent according to a test target object in a water sample to be detected, and fusing the selected test reagent with the water sample to be detected to obtain a detection sample; acquiring a color image of the detection sample; correcting the image according to the standard laboratory chromaticity; acquiring an actual colorimetric value of the corrected image under a reference condition according to a preset image algorithm as a current colorimetric value of the test target object, determining a detection object colorimetric concentration standard curve corresponding to the test target object, and searching a concentration value corresponding to the current colorimetric value of the test target object from the detection object colorimetric concentration standard curve as an actual concentration of the test target object; the standard curve of the chromaticity and concentration of the detected object is the corresponding relation between the chromaticity value and the concentration of the detected object in the water body.
Optionally, the test reagent corresponding to the test target is a test reagent that undergoes a color reaction after being fused with the test target.
Optionally, the correcting the image according to a preset laboratory standard chromaticity includes: acquiring the actual chromaticity of the image; comparing the actual chromaticity with the standard chromaticity in the laboratory to obtain a difference value between the actual chromaticity and the standard chromaticity in the laboratory; and if the difference value is larger than a preset difference value threshold value, correcting the image according to a preset chromaticity correction algorithm, so that the difference value between the actual chromaticity of the corrected image and the standard chromaticity of the laboratory is smaller than the preset difference value threshold value.
Optionally, the standard laboratory chromaticity and the actual chromaticity are the same chromaticity system, where the chromaticity system at least includes: RGB, HSV and CMYK.
Optionally, the method further includes: obtaining standard laboratory chromaticity, comprising: selecting a reference object with color information; the reference object is selected according to the chromaticity screened out by the existing picture sample, and each chromaticity at least corresponds to one reference object; and acquiring color images of the reference object corresponding to all chromaticities under the same reference condition, and integrating all the acquired images to be used as standard chromaticities of a laboratory.
Optionally, the reference object with color information is: a color development device or a standard color card.
Optionally, the same reference condition includes: the same shooting angle and the same optical conditions.
Optionally, the obtaining, according to a preset image algorithm, a chromatic value of the corrected image information under a reference condition, where the preset image algorithm at least includes: image transformation, key region selection, edge detection, noise reduction, smoothing and chroma enhancement.
The invention provides a water quality detection system based on digital image processing, which comprises: the mixing unit is used for selecting a corresponding test reagent according to a test target object of a water sample to be detected, and fusing the selected test reagent with the water sample to be detected to obtain a detection sample; the acquisition unit is used for acquiring a color image of the detection sample; a processing unit to: correcting the image according to the standard chromaticity of the laboratory; acquiring an actual colorimetric value of the corrected image under a reference condition according to a preset image algorithm as a current colorimetric value of the test target object, determining a detection object colorimetric concentration standard curve corresponding to the test target object, and searching a concentration value corresponding to the current colorimetric value of the test target object from the detection object colorimetric concentration standard curve as an actual concentration of the test target object; and the human-computer interaction unit is used for inputting a test target object of the water sample to be detected and displaying the actual concentration of the test target object.
Optionally, the collecting unit is: a camera, a cell phone, a camera, a scanner, or a monitoring device.
Optionally, the system further comprises a storage unit for storing the standard laboratory chromaticity.
In another aspect, the present invention provides a computer-readable storage medium, having instructions stored thereon, which, when executed on a computer, cause the computer to perform the above-mentioned water quality detection method based on digital image processing.
Through the technical scheme, the test target object in the test water sample is subjected to differential color development through the test reagent, and then color image information of the test sample is acquired after color development. And (4) correcting the collected color image information through laboratory standard chromaticity to obtain an actual chromaticity value. And acquiring actual concentration information of the test target object according to the contrast relation between the color development chromaticity and the concentration of the test target object. The method for detecting the water quality through image analysis is realized, the convenience of water quality detection is improved, and the detection efficiency is improved.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the embodiments of the invention and do not limit the embodiments. In the drawings:
FIG. 1 is a flow chart illustrating steps of a method for detecting water quality based on digital image processing according to an embodiment of the present invention;
FIG. 2 is a system diagram of a water quality detecting system based on digital image processing according to an embodiment of the present invention;
FIG. 3 is a standard curve of chromium ions in example 1 according to an embodiment of the present invention;
FIG. 4 is a graph comparing the detection result of chromium ions in example 1 with the national standard method according to an embodiment of the present invention;
FIG. 5 is a graph of deviation and correction effect of on-site RGB chromaticity components of a reference object from a reference chromaticity in example 2 according to an embodiment of the present invention;
FIG. 6 is a comparison of the results of nickel ion detection with the national standard method in example 2 according to an embodiment of the present invention;
FIG. 7 is a graph of deviation and correction effect of on-site RGB chromaticity components of a reference object from a reference chromaticity in example 3 according to an embodiment of the present invention;
fig. 8 is a graph comparing the detection result of chromium ions in example 3 with the national standard method according to an embodiment of the present invention.
Description of the reference numerals
10-a mixing unit; 20-a collection unit; 30-a processing unit; and 40-a man-machine interaction unit.
Detailed Description
The following describes in detail embodiments of the present invention with reference to the drawings. It should be understood that the detailed description and specific examples, while indicating the preferred embodiment of the invention, are given by way of illustration and explanation only, not limitation.
Fig. 2 is a system configuration diagram of a water quality detecting system based on digital image processing according to an embodiment of the present invention. As shown in fig. 2, an embodiment of the present invention provides a water quality detection system based on digital image processing, the system including: the mixing unit 10 is used for selecting a corresponding test reagent according to a test target object of a water sample to be detected, and fusing the selected test reagent with the water sample to be detected to obtain a detection sample; the acquisition unit 20 is used for acquiring a color image of the detection sample; a processing unit 30 for: correcting the image according to the standard chromaticity of the laboratory; acquiring an actual colorimetric value of the corrected image under a reference condition according to a preset image algorithm as a current colorimetric value of the test target object, determining a detection object colorimetric concentration standard curve corresponding to the test target object, and searching a concentration value corresponding to the current colorimetric value of the test target object from the detection object colorimetric concentration standard curve as an actual concentration of the test target object; and the human-computer interaction unit 40 is used for inputting a test target object of the water sample to be detected and displaying the actual concentration of the test target object.
Preferably, the collecting unit 20 is: a camera, a cell phone, a camera, a scanner, or a monitoring device.
In the embodiment of the invention, the research on the small-sized portable, automatic, continuous, simple and rapid monitoring technology is gradually paid attention. The combination of optical analysis methods such as chromaticity, gray scale, turbidity and the like and portable water quality detection equipment is an important research and application trend in the field of water quality detection, can fully exert the advantages in the aspects of intellectualization, miniaturization, automation, integration, portability and the like, and has wide application prospect. For example, with the development of cameras, mobile phones or other mobile terminals with shooting functions in recent years, the shooting and result analysis of portable water quality detection equipment such as microfluidic chips and paper chips are widely concerned and researched, on one hand, the convenience of the shooting equipment is highly matched with the portability of the detection equipment, and on the other hand, intelligent equipment with high-resolution cameras and high-speed computing capability provides powerful guarantee for realizing accurate determination of an object to be detected. The key of quantitative detection of water body target objects by using an optical method is to quickly and accurately identify color development information, however, differences in equipment hardware, camera setting, field light source conditions, shooting angles/distances and the like can cause shooting results which are far from each other to be generated in the same system, and the precision and the application range of the shooting quantitative method are greatly limited. The scheme of the invention is to develop a detection technology which does not depend on fixed hardware conditions, and starts from an image processing technology, a simple and convenient water quality detection method based on chromaticity correction and analysis is developed, no additional equipment is needed, or the consistency of shooting conditions is kept, and meanwhile, the detection accuracy is higher, so that the method has very important practical significance.
Preferably, the system further comprises a storage unit for storing the standard laboratory color.
Fig. 1 is a flow chart of a method for detecting water quality based on digital image processing according to an embodiment of the present invention. As shown in fig. 1, an embodiment of the present invention provides a water quality detection method based on digital image processing, the method including:
step S10: and correspondingly selecting a preset test reagent and the water sample to be detected for fusion according to a test target object of the water sample to be detected to obtain a test sample.
Specifically, the water quality judgment is to judge whether some harmful substances exist in the monitored water sample or not and whether the content of the harmful substances exceeds the standard or not. When other dissolved matters exist in the monitored water sample, part of the dissolved matters possibly have a color reaction, and the naked eyes can judge whether harmful substances exist or not through the color development depth. However, many substances are dissolved without abnormal color, and the existence of harmful substances and the content of the harmful substances cannot be judged by naked eyes. Even if a dissolved substance of a color reaction exists, the dissolved substance is easily interfered by a dissolved substance of a similar color reaction, and the content cannot be judged by the shade of the color. In this case, the test target needs to be specially displayed, that is, other interference information is filtered out, and it is ensured that the final color development only has one influence factor of the test target. Under the premise, after a monitoring water sample is obtained, firstly, a test target object needing to be detected in the monitoring water sample is judged, for example, the content of chromium ions in the monitoring water is monitored. The chromium ions are dissolved in water and cannot be observed by naked eyes, but the chromium ions are in contact with the dibenzoyl dihydrazide to generate a color reaction, and the color is displayed in red. Theoretically, contacting a monitoring water sample with dibenzoyl dihydrazide would result in a red sample. Since the red shade is directly related to the content of chromium ions, the content of chromium ions can be quantitatively analyzed by analyzing the red shade of the sample.
Firstly, relevant personnel input a detection target object to be detected into the system through the human-computer interaction unit 40, and the mixing unit 10 acquires information of the detection target object through the human-computer interaction unit 40. The mixing unit 10 searches in a preset database according to the type of the detected target object to obtain a test reagent corresponding to the current detected target object, extracts the corresponding reagent from the reagent database, mixes the test reagent with the test water sample, and outputs the test sample. Preferably, the test sample can be a mixed test water sample or a mixed test color development card, and the specific condition is determined according to the type of the test reagent. For example, when the test reagent is a solid, a color reaction occurs on the surface of the test solid, and the final test sample is the test solid. And if the test reagent is liquid, directly taking the mixed solution as a test sample.
Step S20: and acquiring color image information of the detection sample.
Specifically, after obtaining the test sample, the test sample is placed under conditions favorable for photographing, such as sufficient light and simple environmental color. The color image acquisition of the test sample is then performed by the acquisition unit 20. Preferably, the acquisition unit 20 may be any one of a camera, a mobile phone, a camera, a scanner or a monitoring device, and color analysis may be performed on the acquired color sample as long as color information of the test sample can be obtained. The portable device can acquire images, the acquisition convenience is guaranteed, information can be acquired through the portable acquisition device when outdoor water quality detection is carried out, dependence on shooting equipment, a light source, a shooting method, a fixing device and the like is reduced, the cost is reduced, and a plurality of analysis and verification works are converted into processing analysis programs to be completed.
Step S30: and correcting the image information according to the preset standard chromaticity of the laboratory.
Specifically, the quality of the color image information obtained from different detection points is also very different due to the uncontrollable condition of the detection points. In order to unify the detection standards, the differentiated pictures need to be sorted to the standard and then analyzed. Therefore, a uniform rule needs to be established in advance, and preferably, the method further comprises the step of acquiring standard laboratory colors. Specifically, a reference object containing sufficient color information is selected, and the reference object needs to substantially cover key chromaticity characteristics possibly involved in the actual shooting process. The information can be obtained by training an existing image sample as a training sample to obtain chromaticity information of each detection target object corresponding to each concentration. The reference is finally embodied as a color development device or a standard color card. Then, the reference object is photographed under the same laboratory environment, that is, under the condition that the optical curve is stable and the photographing angle is fixed. And integrating the image information of all the reference objects, and taking the image information as the standard chromaticity of the laboratory. And the information of the shot actual image is detected subsequently, the information is corrected through the standard chromaticity, and all the information of the actual image is sorted into a standard judging system. The actual chromaticity is the comprehensive embodiment of conditions such as a shooting light source, hardware setting, a shooting method and the like, the shooting method can be adjusted and optimized according to the actual chromaticity, the actual chromaticity and reference chromaticity are compared and analyzed, the difference information between the shooting condition and a laboratory reference condition can be obtained, if the difference between the required chromaticity component and a laboratory result is not large, the chromaticity component can be directly used, if the chromaticity deviation is large, a chromaticity correction algorithm is established, and the optional chromaticity correction algorithm comprises a neural network algorithm, multivariate nonlinear fitting and the like.
Step S40: and obtaining the actual colorimetric value of the corrected image under the reference condition as the current colorimetric value of the test target object according to a preset image algorithm, determining a detection object colorimetric concentration standard curve corresponding to the test target object, and searching a concentration value corresponding to the current colorimetric value of the test target object from the detection object colorimetric concentration standard curve to be used as the actual concentration of the test target object.
Specifically, according to the characteristics and precision requirements of the experimental image, the corrected image information is processed through a preset image algorithm, the processing method comprises the steps of image transformation, key area selection, edge detection, noise reduction, smoothing and chroma enhancement, and the processed image is a final standard image. And the final image information reflects the color development chroma of the corresponding concentration of the test target object. As is known from the above, the colorimetric value of the test sample is positively correlated with the concentration of the corresponding test target, so that there is a functional correspondence between the colorimetric value and the concentration of the test target. Preferably, the standard curve is generated according to standard laboratory chromaticity, i.e. each chromaticity value corresponds to a concentration value. And then establishing coordinate curves for the colorimetric values and the concentration values respectively by using the horizontal and vertical axes in the two-dimensional coordinates. After the actual chromatic value is obtained, the actual chromatic value is placed in a standard coordinate curve for matching degree query, then the concentration of the test target object corresponding to the current chromatic value is correspondingly obtained, and the concentration value is the actual concentration of the test target object. The processing unit 30 sends the actual concentration of the detected object to the human-computer interaction unit 40 for display, so that the relevant personnel can consult the display.
The first embodiment is as follows:
taking the detection of chromium ions in water as an example, firstly, the reaction system is determined: according to the property of a target object to be detected, a paper chip is selected for testing, the core part of the chip is filter paper subjected to hydrophobic modification (a sample inlet, a channel and a detection pool are hydrophilic, and the rest areas are hydrophobic, wherein a compound reagent mainly composed of diphenylcarbazide is preset in the detection pool and can perform specific color development reaction with chromium), a chromium-containing water sample is added into the paper chip from a sample adding area during detection, and the sample flows to the detection pool along the channel and reacts with the reagent to generate pink substances.
Photographing by using a smart phone, then constructing a standard curve, performing correlation fitting of the chromium ion concentration and the chromaticity distance under a laboratory condition to obtain standard curve basic data, and detecting the reaction system, wherein the chromaticity distance is in direct proportion to the chromium ion concentration in a linear region, as shown in fig. 3. And selecting a standard color card as a reference object, and shooting the reference object in a laboratory optical environment with a standard curve to obtain the laboratory standard chromaticity of the reference object image.
The reference object is photographed through the smart phone under the field illumination condition, and actual chromaticity information is obtained. And comparing and analyzing the actual chromaticity and the reference chromaticity, finding that the deviation of the required chromaticity component and a laboratory result is not large, and correcting and matching the field image chromaticity and the laboratory chromaticity are not needed.
Further developing field detection experiment, and carrying out reaction and optical test on the chromium-containing system. And performing operations such as key area selection, edge detection, noise reduction smoothing, chromaticity enhancement and the like on the image to finally obtain various chromaticity component values, and performing matching query on a detection reaction chromaticity result shot on site and a chromium ion chromaticity concentration standard curve to obtain the actual concentration of chromium ions. The chromium ion concentration obtained by the method is compared with the national standard method, the deviation is less than 5%, as shown in fig. 4, the reliability of the method is verified, and meanwhile, the method has obvious advantages in the aspects of detection time, convenience and the like.
Example two:
taking the detection of nickel ions in water as an example, firstly, the reaction system is determined: according to the property of a target object to be detected, a paper chip is selected for testing, the core part of the chip is filter paper subjected to hydrophobic modification (a sample inlet, a channel and a detection pool are hydrophilic, and the rest areas are hydrophobic, wherein a compound reagent taking dimethylglyoxime as a main substance is preset in the detection pool and can perform specific color reaction with nickel), a nickel-containing water sample is added into the paper chip from a sample adding area during detection, and the sample flows to the detection pool along the channel and reacts with the reagent to generate a pink substance.
And taking a picture by using a single-lens reflex camera, carrying out correlation fitting on the nickel ion concentration and the chromaticity distance under a laboratory condition to obtain standard curve basic data, wherein the chromaticity distance is in direct proportion to the nickel ion concentration in a detection linear region for the reaction system. And (3) dropwise adding dyes of different colors on the paper chip as a reference object, and shooting the reference object in a laboratory optical environment for obtaining a standard curve to obtain the laboratory standard chromaticity of the reference object image.
And photographing the reference object under the field illumination condition of the digital camera to obtain the actual chromaticity information. The actual chromaticity and the reference chromaticity are compared and analyzed, the deviation between the required chromaticity component and the laboratory result is found to be large, the neural network algorithm is utilized to correct and match the field image chromaticity and the laboratory chromaticity, and the result shows that the deviation between the field shooting chromaticity and the laboratory reference chromaticity can be greatly reduced to be within 5% through the conversion relation established by the method, as shown in fig. 5.
And further carrying out a field detection experiment, carrying out reaction and optical test on the nickel-containing system to obtain each chromaticity component value, and matching a detection reaction chromaticity result shot on the field with the standard curve to obtain the actual concentration of the nickel ions. Comparing the nickel ion concentration obtained by the method with the national standard method, the deviation is less than 10%, as shown in fig. 6, the reliability of the method is verified, and meanwhile, the method has obvious advantages in the aspects of detection time, convenience and the like.
Example three:
taking the detection of chromium ions in water as an example, a microfluidic chip is adopted for testing, organic glass (PMMA) is taken as a base material of the chip, and the chip is prepared by adopting a machining mode of a fine engraving machine or an injection molding processing mode. And (3) constructing structures such as a channel, a detection pool and the like on the chip bottom plate, and then packaging by using a cover plate to finally form a closed space. A certain amount of reagent is preset in the detection pool, and liquid to be detected is injected into the chip from the central sample inlet, reaches the detection pool, is mixed with the reagent and reacts.
In the channels of the negative and some areas of the detecting pool, a compound reagent which is mainly composed of diphenyl carbodihydrazide is embedded, and can generate specific color reaction with chromium. And (3) performing correlation fitting of the chromium ion concentration and the chromaticity distance under a laboratory condition to obtain standard curve basic data, wherein the chromaticity distance is in direct proportion to the chromium ion concentration in the detection linear interval for the reaction system. And selecting the microfluidic chip added with different dyes as a reference object, and shooting the reference object in a laboratory optical environment with a standard curve to obtain the laboratory standard chromaticity of the reference object image.
And taking a picture of the reference object under the field illumination condition of the smart phone to obtain actual chromaticity information. The actual chromaticity and the reference chromaticity are compared and analyzed, the deviation between the required chromaticity component and a laboratory result is found to be large, the multivariate nonlinear fitting algorithm is utilized to correct and match the field image chromaticity and the laboratory chromaticity, and the result shows that the deviation between the field shooting chromaticity and the laboratory reference chromaticity can be greatly reduced to be within 4% through the conversion relation established by the method, as shown in fig. 7.
Further developing field detection experiment, and carrying out reaction and optical test on the chromium-containing system. And performing operations such as key area selection, edge detection, noise reduction smoothing, chromaticity enhancement and the like on the image to finally obtain various chromaticity component values, and performing matching query on a detection reaction chromaticity result shot on site and a standard curve to obtain the actual concentration of the chromium ions. The chromium ion concentration obtained by the method is compared with the national standard method, the deviation is less than 7%, as shown in fig. 8, the reliability of the method is verified, and meanwhile, the method has obvious advantages in the aspects of detection time, convenience and the like.
Example four:
taking the detection of hydrogen in the air as an example, a metal oxide material is used as a detection reagent, and a precipitation method and a hydrothermal method are used for preparing metal powder, wherein the powder is milky white and gradually turns into dark blue along with the contact with the hydrogen. And (3) performing correlation fitting of the hydrogen concentration and the chromaticity distance under a laboratory condition to obtain standard curve basic data, wherein the chromaticity distance is in direct proportion to the hydrogen concentration in the linear region of the reaction system. And selecting particles with different typical colors as a reference object, and shooting the reference object in a laboratory optical environment for obtaining a standard curve to obtain the laboratory standard chromaticity of the reference object image.
And (4) photographing the reference object under the field illumination condition of a certain device to obtain actual chromaticity information. The actual chromaticity and the reference chromaticity are compared and analyzed, the deviation between the required chromaticity component and a laboratory result is found to be large, the neural network algorithm is utilized to correct and match the field image chromaticity and the laboratory chromaticity, and the result shows that the deviation between the field shooting chromaticity and the laboratory reference chromaticity can be greatly reduced to be within 7% through the conversion relation established by the method.
Further carrying out an on-site detection experiment, testing the configured hydrogen with the concentrations of 1%, 2%, 4% and 10% to obtain various chromaticity component values, matching the detection reaction chromaticity result shot on site with a standard curve to obtain the calculated hydrogen concentrations with the deviations of 8%, 6%, 3%, 4% and 1% from the true values respectively, verifying the reliability of the method, and simultaneously having obvious advantages in the aspects of detection time (less than 1 minute), convenience and the like.
The embodiment of the present invention also provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute the above-mentioned water quality detection method based on digital image processing.
Those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments may be implemented by a program, where the program is stored in a storage medium and includes several instructions to enable a single chip, a chip, or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
While the embodiments of the present invention have been described in detail with reference to the accompanying drawings, the embodiments of the present invention are not limited to the details of the above embodiments, and various simple modifications can be made to the technical solution of the embodiments of the present invention within the technical idea of the embodiments of the present invention, and the simple modifications are within the scope of the embodiments of the present invention. It should be noted that the various features described in the foregoing embodiments may be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the embodiments of the present invention will not be described separately for the various possible combinations.
In addition, any combination of various embodiments of the present invention may be made, and the same should be considered as what is disclosed in the embodiments of the present invention as long as it does not depart from the spirit of the embodiments of the present invention.

Claims (12)

1. A water quality detection method based on digital image processing is characterized by comprising the following steps:
selecting a corresponding test reagent according to a test target object in a water sample to be detected, and fusing the selected test reagent with the water sample to be detected to obtain a detection sample;
acquiring a color image of the detection sample;
correcting the image according to the standard laboratory chromaticity;
acquiring an actual colorimetric value of the corrected image under a reference condition according to a preset image algorithm as a current colorimetric value of the test target object, determining a detection object colorimetric concentration standard curve corresponding to the test target object, and searching a concentration value corresponding to the current colorimetric value of the test target object from the detection object colorimetric concentration standard curve as an actual concentration of the test target object; wherein the content of the first and second substances,
and the standard curve of the chroma concentration of the detected object is the corresponding relation between the detected chroma value and the concentration of the detected object in the water body.
2. The method according to claim 1, wherein the test agent corresponding to the test target is a test agent that undergoes a color reaction upon fusion with the test target.
3. The method of claim 1, wherein said correcting said image according to a preset laboratory standard chromaticity comprises:
acquiring the actual chromaticity of the image;
comparing the actual chromaticity with the standard chromaticity in the laboratory to obtain a difference value between the actual chromaticity and the standard chromaticity in the laboratory;
and if the difference value is greater than a preset difference value threshold value, correcting the image according to a preset chromaticity correction algorithm, so that the difference value between the actual chromaticity of the corrected image and the standard chromaticity of the laboratory is smaller than the preset difference value threshold value.
4. The method of claim 3, wherein the laboratory standard chromaticity and the actual chromaticity are the same chromaticity system, wherein the chromaticity system comprises at least:
RGB, HSV and CMYK.
5. The method of claim 3, further comprising:
obtaining standard laboratory chromaticity, comprising:
selecting a reference object with color information; the reference object is selected according to the chromaticity screened out by the existing picture sample, and each chromaticity at least corresponds to one reference object;
and acquiring color images of the reference object corresponding to all chromaticities under the same reference condition, and integrating all the acquired images to be used as standard chromaticities of a laboratory.
6. The method of claim 5, wherein the reference object for the presence of color information is: a color development device or a standard color card.
7. The method of claim 5, wherein the same reference condition comprises:
the same shooting angle and the same optical conditions.
8. The method according to claim 1, wherein the obtaining of the chroma value of the corrected image information under the reference condition is performed according to a preset image algorithm, wherein the preset image algorithm at least comprises:
image transformation, key region selection, edge detection, noise reduction, smoothing and chroma enhancement.
9. A water quality detection system based on digital image processing, characterized in that the system comprises:
the mixing unit is used for selecting a corresponding test reagent according to a test target object of a water sample to be detected, and fusing the selected test reagent with the water sample to be detected to obtain a detection sample;
the acquisition unit is used for acquiring a color image of the detection sample;
a processing unit to:
correcting the image according to the standard laboratory chromaticity;
acquiring an actual colorimetric value of the corrected image under a reference condition according to a preset image algorithm as a current colorimetric value of the test target object, determining a detection object colorimetric concentration standard curve corresponding to the test target object, and searching a concentration value corresponding to the current colorimetric value of the test target object from the detection object colorimetric concentration standard curve as an actual concentration of the test target object;
and the human-computer interaction unit is used for inputting the test target object of the water sample to be detected and displaying the actual concentration of the test target object.
10. The system of claim 9, wherein the acquisition unit is:
a camera, a cell phone, a camera, a scanner, or a monitoring device.
11. The system of claim 9, further comprising a storage unit for storing laboratory standard colorimetric values.
12. A computer-readable storage medium having instructions stored thereon, which when executed on a computer, cause the computer to perform the digital image processing-based water quality detection method of any one of claims 1 to 8.
CN202110695994.3A 2021-06-23 2021-06-23 Water quality detection method and system based on digital image processing Pending CN115508341A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202110695994.3A CN115508341A (en) 2021-06-23 2021-06-23 Water quality detection method and system based on digital image processing
PCT/CN2022/094832 WO2022267799A1 (en) 2021-06-23 2022-05-25 Water quality testing method and water quality testing apparatus
EP22827296.9A EP4343307A1 (en) 2021-06-23 2022-05-25 Water quality testing method and water quality testing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110695994.3A CN115508341A (en) 2021-06-23 2021-06-23 Water quality detection method and system based on digital image processing

Publications (1)

Publication Number Publication Date
CN115508341A true CN115508341A (en) 2022-12-23

Family

ID=84499824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110695994.3A Pending CN115508341A (en) 2021-06-23 2021-06-23 Water quality detection method and system based on digital image processing

Country Status (1)

Country Link
CN (1) CN115508341A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115684039A (en) * 2022-12-29 2023-02-03 湖南省计量检测研究院 Water quality monitoring system and method based on error control
CN115791641A (en) * 2023-02-06 2023-03-14 小水怪(深圳)智能科技有限公司 Method and system for detecting liquid components based on intelligent water cup

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115684039A (en) * 2022-12-29 2023-02-03 湖南省计量检测研究院 Water quality monitoring system and method based on error control
CN115791641A (en) * 2023-02-06 2023-03-14 小水怪(深圳)智能科技有限公司 Method and system for detecting liquid components based on intelligent water cup

Similar Documents

Publication Publication Date Title
CN103123323B (en) Method for detecting multiple anions by using indicator displacement colorimetric sensor array
CN115508341A (en) Water quality detection method and system based on digital image processing
CN110222698B (en) Method and system for water quality analysis based on color information processing
CN104251861A (en) Intelligent terminal-based liquid detection analyzer and detection method using the same
CN110487737B (en) Image information extraction and calculation method and system for spectrum detection of smart phone
RU2754208C1 (en) Methods and systems for calibration and use of camera for determination of analyte in sample
WO2022267799A1 (en) Water quality testing method and water quality testing apparatus
CN105223196A (en) A kind of urinalysis method based on intelligent terminal
WO2019081541A1 (en) Methods and devices for performing an analytical measurement
CN104931488B (en) A method of based on indicator array detection anion
CN113155814A (en) Portable colorimetric array image acquisition device based on optical fiber array and detection method
CN105319210A (en) Urine analysis method
CN115902227B (en) Detection and evaluation method and system for immunofluorescence kit
CN108387542A (en) Fluorine ion colorimetric sensor and its application in a kind of water based on smart mobile phone
Bao et al. A remote computing based point-of-care colorimetric detection system with a smartphone under complex ambient light conditions
Catalan-Carrio et al. Ionogel-based hybrid polymer-paper handheld platform for nitrite and nitrate determination in water samples
CN105223197A (en) A kind of urinalysis method not relying on special instrument
US20220026275A1 (en) Systems and methods for detecting disease using mobile device
CN106802346B (en) Pathological digital image analysis method based on immunohistochemical technology
CN115508276A (en) Water quality detection method, detection device and detection system
CN105606600A (en) Domestic urine analysis method
CN114066818B (en) Cell detection analysis method, cell detection analysis device, computer equipment and storage medium
Tonmoy et al. Error reduction in arsenic detection through color spectrum analysis
CN117848963A (en) Colorimetric quantification-based method and system for detecting component content of object to be detected
CN113607726A (en) Water quality monitoring system device and water quality monitoring method for heavy metal wastewater

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