DIGITAL ASSESSMENT OF CHEMICAL DIP TESTS
20210325299 · 2021-10-21
Inventors
- Cameron Hardie (Cheltenham, GB)
- Helen Isherwood (Cheltenham, GB)
- Mo Jassal (Cheltenham, GB)
- Shailesh Prakash (Cheltenham, GB)
- Neil Watson (Cheltenham, GB)
- James White (Cheltenham, GB)
Cpc classification
G01N21/27
PHYSICS
International classification
Abstract
A method of digital assessment of chemical dip tests is disclosed. A photograph of a dip tester including a colour change pad is taken with a mobile device, for example a mobile phone. The dip tester is photographed on or alongside a reference card, with both the dip tester and the reference card in the same frame. A processor on the mobile device analyses the photograph thus obtained to determine a value for a characteristic of water being tested. The characteristic may be for example, pH, concentration of iron, concentration of copper. The water may be central heating system water.
Claims
1. A method of testing central heating and/or cooling water comprising the steps of: providing at least one color-change dip tester for measuring a characteristic to be tested, the color-change dip tester having a color-change pad, and dipping the color-change dip tester in the central heating and/or cooling water; providing a color reference card, the color reference card having a range of reference colors on its surface, the reference colors on the color reference card corresponding to a range of possible colors of a dipped color tester; using a digital camera, taking a photograph of the dipped dip tester and the color reference card; by a processor, identifying an area of the digital photograph corresponding to an image of the color-change pad of the dip tester, and determining a color of that area of the photograph; by the processor, identifying areas in the digital photograph corresponding to an image of the reference colors on the color reference card, and determining colors associated with reference areas; determining the closest of the colors associated with reference areas to the color of the image of the color-change pad of the dip tester, and determining on that basis a value of the characteristic to be tested.
2. The method of testing central heating and/or cooling of claim 1, wherein the characteristic to be tested is at least one of pH, concentration of iron, concentration of copper, concentration of aluminum, and concentration of a corrosion inhibitor.
3. The method of testing central heating and/or cooling water of claim 1, wherein the color reference card includes indicia indicating a position in which the dip tester may be placed on or adjacent to the reference card, and in which the dip tester is located in the indicated position before the photograph is taken.
4. The method of testing central heating and/or cooling water of claim 1, wherein the color reference card includes registration marks.
5. The method of testing central heating and/or cooling water of claim 1, wherein identifying the area of the digital photograph corresponding to the color-change pad of the dip test and determining the color of that area comprises identifying a plurality of pixels corresponding to the color-change pad of the dip tester and determining the single most common color among those pixels.
6. The method of testing central heating and/or cooling water of claim 1, wherein identifying areas of the digital photograph corresponding to reference areas and determining the color of the reference areas comprises identifying a plurality of pixels corresponding to each reference area, and determining the single most common color among each plurality of pixels.
7. The method of testing central heating and/or cooling water of claim 1, further comprising determining a difference series based on the differences between the color of the area of the image corresponding with the color-change pad and the color of each of the reference areas.
8. The method of testing central heating and/or cooling water—of claim 7, wherein a Kalman filter is applied to the difference series.
9. The method of testing central heating and/or cooling water of claim 7, wherein a determination as to validity of the determined value of the characteristic is made based on a measure of the smoothness of the difference series.
10. (canceled)
11. The method of testing central heating and/or cooling of claim 1, wherein a pass or fail result is output based on a comparison of the determined value of the characteristic with a predetermined threshold value.
12. The method of testing central heating and/or cooling water of claim 11, wherein the color gradient on the reference card includes portions of increased resolution in areas around the color corresponding to the predetermined threshold.
13. The method of testing central heating and/or cooling of claim 1, wherein color-change pads are provided, and multiple corresponding reference gradients are provided on the reference card.
14. The method of testing central heating and/or cooling water of claim 13, wherein a determination as to the validity of the determined value of a characteristic is made based on comparing the color of the color-change pad corresponding to that characteristic with a color reference gradient corresponding to a different characteristic.
15. The method of testing central heating and/or cooling water of claim 1, wherein a mobile device including a camera, a display screen, and a processor is provided, the mobile device being adapted to stream images from the camera to the display screen, and superimpose a template pattern on the display screen to aid in positioning the camera relative to the reference card and dip tester.
16. The method of testing central heating and/or cooling water of claim 15, wherein the mobile device is adapted to continuously process frames from the camera stream, at the same time as the camera stream is being displayed on the display screen, and to filter frames for suitability.
17. The method of testing central heating and/or cooling water of claim 16, wherein the filter for suitability includes a test against a sharpness threshold.
18. The method of testing central heating and/or cooling water of claim 16, wherein the color reference card includes registration marks and in which the filter for suitability includes a test as to whether registration marks can be detected in expected locations.
19. The method of testing central heating and/or cooling of claim 16, wherein the mobile device is adapted to stop streaming the camera feed to the display when more than a predetermined number of acceptable frames have been captured.
20. The method of testing central heating and/or cooling water of claim 15, wherein the mobile device is a mobile telephone or a tablet computer.
21. (canceled)
22. A non-transitory computer readable medium containing instructions which when executed on a processor of a mobile device, the mobile device including a camera, a display screen and a processor, cause the mobile device to carry out the steps of the method of claim 1 on a dipped color-change dip tester and associated color reference card.
23-25. (canceled)
Description
DESCRIPTION OF THE DRAWINGS
[0044] For a better understanding of the invention, and to show more clearly how it may be carried into effect, a preferred embodiment will now be described with reference to the accompanying drawings, in which:
[0045]
[0046]
[0047]
[0048]
[0049]
DESCRIPTION OF AN EMBODIMENT
[0050] Referring firstly to
[0051] In other embodiments dip tester sticks may include five pads (for example, for testing molybdate, copper, iron, and two pads for pH), or four pads (for example, for testing molybdate, copper, iron, and one pad for pH).
[0052] The dip tester stick has been dipped for a few seconds in a sample of central heating and/or cooling water, and therefore the colour change pads have changed colour according to the characteristics of the central heating and/or cooling water which was sampled.
[0053] The colour reference card is printed with indicia 16 which show where the dip tester stick 10 is to be placed on the card, adjacent to colour reference gradients 18a, 18b, 18c, 18d, 18e, 18f.
[0054] In various embodiments, the dip tester may be placed on the card, or adjacent to the card, as long as the photograph is taken with the reference card and the dip tester in the same frame.
[0055]
[0056] Referring now to
[0057] While the image from the camera is being continually streamed to the display, and the user is trying to adjust the position of the camera as best he can to line up the image of the reference card 12 with the template pattern 110, still photographs are continuously being taken and processed. Typically, the video stream from a mobile phone camera may be about 30 frames per second or more. As many individual frames as possible may be processed, with frames being silently dropped when the processor is too busy. Processing a frame may include an initial filtering stage to determine the sharpness of the image. Frames which are too blurry may be rejected. The Laplacian algorithm may be used as a known test for sharpness.
[0058] If a frame passes the sharpness test, the next stage is to check for the presence of expected registration marks. In this example, four registration marks 20 are provided, substantially at corners of the rectangular reference card 12. The registration marks are in the form of blue circles. The registration marks 20 are the only circular features on the reference card 12. In each image a process of identifying and filtering circles takes place. This typically comprises using an edge detection algorithm to identify and isolate features. For example, the Canny algorithm may be used. A Gaussian blur may first be applied to the image to reduce noise. Candidate circles can be identified firstly by removing straight lines. After straight lines are removed, remaining closed paths may be candidate circles. As a second stage/check, the area of each candidate feature can be measured (number of pixels inside the feature) and compared to a calculated area from a measured average radius of the candidate feature (by A=πr.sup.2). A candidate circle with a measured area of more than the calculated area is likely to be in reality, a square or another shape (bearing in mind that the edges may be pixelated and rough, this may not be obvious to the initial algorithm which finds candidate circle features). Therefore a candidate circle with a measured area more than the calculated area will be rejected and dropped from the set of candidate circles.
[0059] If a frame contains four detected registration marks, then the relative position of those registration marks is checked against predetermined constraints. On the original reference card 12, the registration marks 20 are at corners of a rectangle. The user interface as described above is designed to help the user to minimise skew, but in practice some small amount of skew is likely to be present in most processed images. The registration marks in the processed image will therefore usually not quite form a rectangle, but a trapezium (US: trapezoid). As long as the interior angles of the trapezium are close enough to right angles, within some predetermined tolerance, for example between 85 and 95 degrees, the image may be determined to be good enough for further processing. Whatever small skew is present in an acceptable image can be corrected in software using known techniques, based on the detected registration marks 20.
[0060] Referring now to
[0061] Dominant colours in strips of the colour reference gradients 18 are also identified in the same way. The position of the relevant colour reference strip 18 on the image is identified, and multiple sub-areas within the colour reference strip 18 are processed to find the dominant colour of each (the dominant colour again being the most common colour of pixel within the area). In this embodiment, the colour gradient changes continuously along the dimension running horizontally across
[0062] Once the dominant colour of the image of the coloured pad is identified, as well as the dominant colour of each of the strips of the image of the reference gradient, for each strip of the reference gradient a difference may be calculated between the dominant colour of that strip and the dominant colour of the colour-change pad. This leads to a difference series d.sub.0 . . . d.sub.i.
[0063] The difference metrics may be calculated by the LAB colour space difference system.
[0064] In
[0069] If there are too many local minima, there is no sufficiently clear global minimum (i.e. the second least local minimum is only a slightly greater difference value than the global minimum), or if the curve has a low smoothness measure, the result may be determined to be invalid. This may lead to a repeat of the process of capturing photographs, or an indication to the user that the dip test itself needs to be repeated with a new dip tester, or an indication that a sample needs to be sent away for a lab test.
[0070] A Kalman filter may be applied to the difference series before the global minimum is determined and the various checks for validity are made.
[0071] Typically, the initial process of capturing and screening frames may be repeated until several acceptable frames are obtained. A measure of the characteristic (e.g. concentration of iron) is made on each captured frame. The final determination is preferably made by taking a mean of the values obtained from each frame, and then reporting the single value which is closest to the mean. If there is too much variance in the values obtained from the different frames, then the result may be determined to be invalid.
[0072]
[0073] The invention described can be used to very easily and accurately test central heating and/or cooling water for a range of characteristics. By using an ordinary mobile telephone running appropriate software, an accurate determination of values of various characteristics can be made. The accuracy achieved is comparable with, or better than, experienced human assessment of chemical dip tests. Moreover, various checks are in place to determine when the result obtained can be relied on and when it cannot. In the worst case therefore, the method of the invention will reach the conclusion that it cannot determine the relevant characteristics of the sample, in contrast with some prior art colour matching systems which often return an incorrect result.