Color recognition control method and system for ph test paper

By acquiring the sampling rod position and test strip coordinate information, adjusting the ratio of the droplet and the reference color block, and combining camera adjustment and image processing, the problems of inaccurate positioning, shooting color difference, and inaccurate droplet in pH test strip color recognition are solved, thus improving the accuracy and robustness of the system.

WO2026102989A1PCT designated stage Publication Date: 2026-05-21NANJING YIMU INTELLIGENT TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
NANJING YIMU INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2025-03-31
Publication Date
2026-05-21

AI Technical Summary

Technical Problem

Existing technologies for pH test strip color recognition suffer from problems such as inaccurate positioning, color difference during photography, light aging, and inaccurate liquid application, which affect the accuracy and robustness of the color recognition system.

Method used

By acquiring the sampling rod position information, adjusting the test strip coordinate information, droplet information, and the color ratio of the reference color block, and combining camera adjustment and image processing algorithms, accurate calculation and recognition control of color information can be achieved.

Benefits of technology

This improves the accuracy and robustness of the pH test strip color recognition system, ensuring the precision and consistency of color recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025086435_21052026_PF_FP_ABST
    Figure CN2025086435_21052026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of image processing, and provide a color recognition control method and system for pH test paper. The present application comprises: obtaining coordinate information of a test strip on the basis of position information of a sampling rod; sampling and liquid dropping: acquiring liquid dropping information on the basis of the coordinate information of the test strip and the position information of the sampling rod; adjusting the color ratio of a reference color block; obtaining color information on the basis of the color ratio and the liquid dropping information; and processing the color information by means of calculation to complete recognition control. The present application can improve the accuracy and robustness of a color recognition system.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for color recognition control of pH test strips Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method and system for color recognition control of pH test strips. Background Technology

[0002] Color recognition technology faces several challenges in automated testing, mainly including the following aspects:

[0003] Positioning inaccuracies: Manufacturing tolerances may cause the actual position of an object to deviate from its intended position. This deviation can affect the accuracy of a color recognition system, as the system may fail to properly align or position the object being measured, leading to incorrect or inaccurate recognition results.

[0004] Color difference during shooting: Hardware differences (such as different camera sensors) may cause color differences in the captured images. This color difference affects the color representation in the image, causing color recognition algorithms to fail to accurately identify or match the target color.

[0005] Light aging issue: As light bulbs age, they change the color temperature and intensity of the illumination, causing color variations in captured images. This change can introduce additional color differences, making it difficult for color recognition systems to maintain consistent performance.

[0006] Rotation speed adjustment issue: Changes in the roll radius affect the relative speed between the object and the sensor during movement. This change can lead to image blurring or distortion, thus affecting the accuracy of the color recognition system.

[0007] Inaccurate liquid application: Misalignment of the test strip may cause the liquid to be positioned inaccurately on the strip, affecting the color distribution and display. This misalignment can impact the detection results of the color recognition algorithm, potentially leading to misjudgments. Summary of the Invention

[0008] The main objective of this application is to provide a method and system for color recognition control of pH test strips.

[0009] The technical solution adopted in this application is:

[0010] On one hand, embodiments of this application provide a method for color recognition control of pH test strips, the method comprising the following steps:

[0011] Obtain the sampling rod position information;

[0012] Based on the sampling rod position information, the test strip coordinate information is obtained;

[0013] Sampling droplet: Based on the coordinate information of the test strip and the position information of the sampling rod, obtain the droplet information;

[0014] Adjust the color ratio of the reference color block;

[0015] Color information is obtained based on the color ratio and the droplet information;

[0016] The color information is calculated to complete the recognition control.

[0017] Furthermore, obtaining the sampling rod position information includes the following steps:

[0018] Move the sampling rod in and obtain its initial information based on its position within the camera's field of view;

[0019] Adjust the camera's field of view to include any colored targets to obtain the camera's initial field of view;

[0020] Based on the initial field of view of the camera and the initial information of the sampling rod, the information of the top of the sampling rod is obtained;

[0021] Based on the information at the top of the sampling rod, the position information of the sampling rod is obtained.

[0022] Further, obtaining the test strip coordinate information based on the sampling rod position information includes the following steps:

[0023] Based on the sampling rod position information, the horizontal coordinates of the top of the sampling rod are recorded;

[0024] The horizontal coordinate of the top of the sampling rod is used as the initial horizontal coordinate of the test strip;

[0025] Based on the initial horizontal coordinates of the test strip, the camera is adjusted to identify the test strip, and the horizontal coordinates of the test strip are obtained;

[0026] Record the vertical coordinates of the test strip;

[0027] The horizontal and vertical coordinates of the test strip are used as the coordinate information of the test strip.

[0028] Further, the sampling droplet, based on the coordinate information of the test strip and the position information of the sampling stick, obtains droplet information, including the following steps:

[0029] After sampling, the coordinate information of the test strip and the position information of the sampling rod are recorded.

[0030] Based on the coordinate information of the sampled test strip and the position information of the sampling rod, the camera field of view is adjusted to obtain online monitoring and recognition data of the camera.

[0031] Based on the online monitoring and recognition data from the camera, color block data is obtained;

[0032] Based on the color block data, the droplet information is obtained.

[0033] Further, obtaining color block data based on the online monitoring and recognition data from the camera includes the following steps:

[0034] Based on the online monitoring and identification data from the camera, the sampling rod pressure information is obtained;

[0035] Based on the information from the downward pressure of the sampling rod, the size information of the color block in the camera's field of view is obtained;

[0036] Based on the color block size information, color block data is obtained.

[0037] Furthermore, adjusting the color ratio of the reference color block includes the following steps:

[0038] Adjust the brightness of the RGB lights above the camera;

[0039] Adjust the camera exposure;

[0040] Based on the brightness of the RGB lights and the exposure of the camera, the RGB values ​​of the reference color block are adjusted to match the standard values ​​in the database, thus completing the adjustment of the color ratio of the reference color block.

[0041] Further, obtaining color information based on the color ratio and the droplet information includes the following steps:

[0042] Set the calculation mode;

[0043] Based on the calculation mode, the color ratio and the droplet information are calculated to obtain color information.

[0044] On the other hand, embodiments of this application also provide a system for pH test strip color recognition control, the system comprising:

[0045] The first module is used to obtain the sampling rod position information;

[0046] The second module is used to obtain the test strip coordinate information based on the sampling rod position information;

[0047] The third module is used for sampling the droplet, and obtains the droplet information based on the coordinate information of the test strip and the position information of the sampling rod;

[0048] The fourth module is used to adjust the color ratio of the reference color block;

[0049] The fifth module is used to obtain color information based on the color ratio and the droplet information;

[0050] The sixth module is used to calculate the color information and complete the recognition control.

[0051] On the other hand, embodiments of this application also provide an apparatus for pH test strip color recognition control, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for pH test strip color recognition control as described above.

[0052] On the other hand, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the methods described above.

[0053] This application provides a method and system for color recognition control of pH test strips. The method involves: acquiring sampling rod position information; obtaining test strip coordinate information based on the sampling rod position information; sampling a drop of liquid; acquiring drop information based on the test strip coordinate information and the sampling rod position information; adjusting the color ratio of a reference color block; obtaining color information based on the color ratio and the drop information; and calculating the color information to complete the recognition control. This application can improve the accuracy and robustness of the color recognition system. Attached Figure Description

[0054] Figure 1 is a flowchart of a method for pH test strip color recognition control provided in an embodiment of this application;

[0055] Figure 2 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0056] Figure 3 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0057] Figure 4 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0058] Figure 5 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0059] Figure 6 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0060] Figure 7 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0061] Figure 8 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0062] Figure 9 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0063] Figure 10 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0064] Figure 11 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0065] Figure 12 is a schematic diagram of color recognition control provided in an embodiment of this application;

[0066] Figure 13 is a schematic diagram of the color recognition control system provided in an embodiment of this application. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0068] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0069] 1) pH: The full name is "potential hydrogen", which is used to measure the concentration of hydrogen ions in a solution. It is a measurement scale used to express the acidity or alkalinity of a solution.

[0070] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0071] On one hand, this application provides a method for color recognition control of pH test strips. Specifically, referring to FIG1, the method includes the following steps:

[0072] S100, Obtain sampling rod position information;

[0073] S200. Based on the sampling rod position information, obtain the test strip coordinate information;

[0074] S300, Sampling droplet: Obtain droplet information based on the test strip coordinate information and the sampling rod position information;

[0075] S400, Adjust the color ratio of the reference color block;

[0076] S500: Obtain color information based on color ratio and droplet information;

[0077] S600 calculates color information to complete recognition control.

[0078] This application analyzes and calculates the acquired color information to perform final color recognition. This includes steps such as color matching and threshold determination, thereby completing the recognition and control of the test strip results.

[0079] This application embodiment discloses step S100 for obtaining sampling rod position information, including the following steps:

[0080] S110. Adjust the camera's field of view to include any colored targets to obtain the camera's initial field of view;

[0081] S120. Move in the sampling rod and obtain the initial information of the sampling rod based on its position within the camera's field of view.

[0082] S130. Based on the initial field of view of the camera and the initial information of the sampling rod, obtain the information of the top of the sampling rod;

[0083] S140. Obtain the sampling rod position information based on the information at the top of the sampling rod.

[0084] In S110 of this application, the camera's field of view is adjusted to include any target with color blocks, thus obtaining the camera's initial field of view:

[0085] 1. Eliminate interference: Ensure that there are no interfering targets, such as color blocks or other objects, in the camera's field of view to avoid affecting the identification of the sampling rod's position.

[0086] 2. Obtain initial field of view: Adjust the camera's field of view to include only background information, ensuring that there are no sampling bars or other colored targets in the field of view in the initial state. Record the camera's field of view data at this time as the initial field of view reference.

[0087] In step S120 of this embodiment, the sampling rod is moved in, and initial information of the sampling rod is obtained based on its position within the camera's field of view.

[0088] 1. Start the system: Start the control system and ensure that the sampling rod and camera are working properly.

[0089] 2. Sampling rod positioning: Drive the sampling rod to move within the camera's field of view to ensure that the tip of the sampling rod can be clearly captured by the camera.

[0090] 3. Data Acquisition: Use a camera to capture images of the sampling rod, and use image processing algorithms to identify the position of the sampling rod. At this time, record the initial coordinate data of the top of the sampling rod as the initial information of the sampling rod.

[0091] Based on the initial field of view of the camera and the initial information of the sampling rod, this application S130 obtains the information of the top of the sampling rod:

[0092] 1. Information matching: The initial information of the sampling rod is compared with the data in the initial field of view of the camera to identify the specific position of the sampling rod in the field of view.

[0093] 2. Coordinate extraction: The coordinate information of the top of the sampling rod is extracted by image processing algorithm to obtain the accurate position of the top of the sampling rod in the camera's field of view.

[0094] Based on the information at the tip of the sampling rod, this application S140 obtains the sampling rod position information:

[0095] 1. Position Calculation: Based on the information of the top of the sampling rod, its coordinate data in the field of view is converted into the actual position of the sampling rod.

[0096] 2. Record data: Record the final position information of the sampling rod for accurate alignment and positioning in subsequent steps.

[0097] This application discloses step S200, which obtains test strip coordinate information based on the sampling rod position information, including the following steps:

[0098] S210. Based on the sampling rod position information, record the horizontal coordinates of the top of the sampling rod.

[0099] S220. Use the horizontal coordinate of the top of the sampling rod as the initial horizontal coordinate of the test paper;

[0100] S230. Based on the initial horizontal coordinates of the test strip, adjust the camera to recognize the test strip and obtain the horizontal coordinates of the test strip;

[0101] S240, Record the vertical coordinates of the test strip;

[0102] S250. Use the horizontal and vertical coordinates of the test strip as the coordinate information of the test strip.

[0103] Based on the sampling rod position information, this application S210 records the horizontal coordinates of the top of the sampling rod:

[0104] Horizontal coordinate recording: Extract the horizontal coordinate value of the top of the sampling rod from the sampling rod position information, and use it as a reference point for test strip alignment. Record this horizontal coordinate value and save it as x0.

[0105] This application S220 uses the horizontal coordinate of the top of the sampling rod as the initial horizontal coordinate of the test strip:

[0106] Initial alignment: Use the horizontal coordinate x0 of the sampling stick tip as the initial horizontal coordinate of the test strip. Ensure that the horizontal position of the test strip is aligned with the reference coordinate of the sampling stick.

[0107] In this application, S230 adjusts the camera to recognize the test strip based on the initial horizontal coordinates of the test strip, thereby obtaining the horizontal coordinates of the test strip:

[0108] 1. Adjust the test strip: Adjust the position of the test strip by driving the test strip motor until the horizontal coordinate of the test strip is aligned with x0.

[0109] 2. Data Acquisition: The camera continuously acquires the horizontal coordinates of the test strip through a recognition algorithm and compares and adjusts them with x0 to ensure that the horizontal coordinates of the test strip are accurate.

[0110] This application S240 records the vertical coordinates of the test strip:

[0111] 1. Vertical coordinate acquisition: After the horizontal coordinates of the test strip are adjusted, the vertical coordinates of the test strip are acquired through the camera.

[0112] 2. Data recording: Record the vertical coordinate value of the test strip and save it as y1.

[0113] This application S250 uses the horizontal and vertical coordinates of the test strip as the test strip coordinate information:

[0114] 1. Coordinate information determination: Combine the horizontal coordinate x0 and vertical coordinate y1 of the test strip to obtain the complete coordinate information of the test strip.

[0115] 2. Data storage: Saves the coordinate information of the test strip for accurate operation and sampling in subsequent steps.

[0116] This application discloses step S300, sampling droplet acquisition, which involves obtaining droplet information based on the test strip coordinate information and the sampling stick position information, including the following steps:

[0117] S310. After sampling with the sampling rod, record the coordinate information of the test strip and the position information of the sampling rod after sampling.

[0118] S320. Based on the coordinate information of the sampled test strip and the position information of the sampling rod, adjust the camera field of view to obtain the camera's online monitoring and recognition data;

[0119] S330: Obtain color block data based on the online monitoring and recognition data from the camera;

[0120] S340. Obtain the droplet information based on the color block data.

[0121] S310 of this application: Sampling droplet, after sampling with the sampling rod, record the coordinate information of the test strip and the position information of the sampling rod after sampling:

[0122] 1. Sampling droplet:

[0123] The sampling rod is moved in again. By identifying the vertical coordinate of the top of the sampling rod, the motor is continuously adjusted so that the coordinate is consistent with y1. It is believed that the sampling rod has reached the top of the test strip. The driving motor drips liquid downward, then lifts the sampling rod upward, and finally moves it out of the camera area.

[0124] 2. Record the coordinate information of the test strip after sampling:

[0125] After the liquid collection process is complete, the sampling stick should have been removed from the test strip. At this point, the current position data of the test strip is acquired via a camera system. This is done in real time using the camera's image recognition algorithm.

[0126] The camera's image recognition module is invoked to detect the target area on the test strip and record the x and y coordinates of the test strip within the camera's field of view. These coordinate values ​​can be labeled as test strip_x and test strip_y.

[0127] Save this data to the system for use in subsequent calibration and adjustment steps.

[0128] This application S320 adjusts the camera's field of view based on the coordinate information of the sampled test strip and the position information of the sampling stick to obtain online monitoring and recognition data from the camera:

[0129] 1. Adjust the camera's field of view:

[0130] Based on the recorded test strip coordinates and sampling stick position information, the optimal position and orientation of the camera's field of view are calculated. This may involve fine-tuning the camera to ensure that key areas within the field of view (such as the current positions of the test strip and sampling stick) are clearly captured.

[0131] Use the control system to adjust the position and angle of the camera to ensure that the test strip and sampling stick are both within the camera's field of view.

[0132] 2. Obtain online monitoring and recognition data from cameras:

[0133] Once the camera's field of view is adjusted and the real-time monitoring mode is activated, the camera will continuously acquire image data within its field of view.

[0134] These data are processed using image recognition algorithms to extract key target information within the field of view, including the positions of the test strip and sampling stick.

[0135] Collect online monitoring and identification data from cameras, including the specific coordinates and color information of the test strips and sampling sticks in the field of view.

[0136] Based on the online monitoring and recognition data from the camera, this application's S330 obtains color block data:

[0137] 1. Process camera recognition data:

[0138] Image information is extracted from online monitoring and identification data from cameras, with particular attention paid to the color blocks on the test strips.

[0139] Image processing algorithms are used to detect and segment color patches on the test strip. The regions and boundaries of the color patches need to be accurately identified to ensure the accuracy of color analysis.

[0140] 2. Obtain color block data:

[0141] Color analysis is performed on the identified color blocks to obtain the RGB values ​​of each block. Color extraction algorithms can then be used to perform detailed analysis of the color blocks, revealing their color characteristics.

[0142] Record the color data for each color patch, including its RGB values ​​and any other possible color parameters. This data will be used for subsequent droplet information analysis.

[0143] Based on the color patch data, this application S340 obtains the droplet information:

[0144] 1. Analyze color block data:

[0145] The color patch data is compared with predefined standard color patch data. By comparing the RGB values ​​of the identified color patches with the standard values, it is determined whether the expected reaction color exists on the test strip.

[0146] Calculate the intensity, area, and changes in the color patch; this information can be used to determine whether the liquid has been successfully applied to the test strip.

[0147] 2. Obtain droplet information:

[0148] Based on the analysis of the color patch data, determine the effect of the liquid drop on the test strip. For example, if the color change of the color patch matches the expectation, the liquid drop operation was successful.

[0149] Record the information about the liquid drop, including whether the drop was successful and the intensity of its effect, for subsequent analysis and processing.

[0150] This application embodiment discloses step S330, which obtains color block data based on online monitoring and recognition data from a camera, including the following steps:

[0151] S331. Obtain the sampling rod pressure information based on the online monitoring and identification data from the camera;

[0152] S332. Based on the sampling rod's downward pressure information, obtain the size information of the color block in the camera's field of view;

[0153] S333. Obtain the color block data based on the color block size information.

[0154] This application embodiment identifies whether the sampling rod is in a depressed state. This is determined by analyzing changes in the relative position of the sampling rod and changes in the image. For example, the sampling rod descends from a certain height to a state of contact with the sample.

[0155] The pressure information of the sampling rod is correlated with the color block detection results to determine whether the pressure operation affects the display or size of the color block.

[0156] Based on the size of the color patches, they can be classified, labeled, or further processed. For example, they can be categorized according to their size or their distribution within a sample can be calculated.

[0157] This application discloses step S400, which adjusts the color ratio of the reference color block, including the following steps:

[0158] S410, Adjust the brightness of the RGB light above the camera;

[0159] S420, Adjust camera exposure;

[0160] S430: Based on the brightness of the RGB lights and the exposure of the camera, adjust the RGB values ​​of the reference color block to match the standard values ​​in the database, thus completing the adjustment of the color ratio of the reference color block.

[0161] This application (S410) adjusts the brightness of the RGB lights above the camera: Ensure the RGB lights are working properly and correctly installed above the camera. Using the control panel or related software, gradually adjust the brightness settings of the three colors of the RGB lights to ensure a uniform and stable light source. Observe the brightness changes of the RGB lights and record the optimal brightness and color levels to ensure accurate illumination of the reference color block.

[0162] In embodiment S420 of this application, the camera exposure is adjusted as follows: The camera control software is opened, and the exposure settings menu is accessed. The camera's exposure time and gain are adjusted according to the ambient light and the brightness of the RGB lights. A test shot is taken to check if the image is clear and free from overexposure or underexposure. Fine-tuning is performed as necessary until the image quality meets the requirements.

[0163] In embodiment S430 of this application, the RGB values ​​of the reference color block are adjusted to match the standard values ​​in the database based on the RGB light brightness and camera exposure, thus completing the adjustment of the color ratio of the reference color block: Calibration software or instruments are used to read the RGB values ​​of the reference color block under the current lighting and exposure conditions. The actual read RGB values ​​are compared with the standard values ​​stored in the database. The brightness of the RGB lights and the camera exposure are adjusted according to the differences to ensure that the RGB values ​​of the reference color block are consistent with the standard values. Measurements and adjustments are repeated until the color ratio of the reference color block reaches the final target, and the adjustment results are recorded for subsequent reference.

[0164] This application discloses step S500, which involves obtaining color information based on color ratio and droplet information, including the following steps:

[0165] S510, Set the calculation mode;

[0166] S520. Based on the calculation mode, calculate the color ratio and droplet information to obtain color information.

[0167] In embodiment S510 of this application, the calculation mode is set as follows:

[0168] Determine the required calculation mode, including those based on RGB (red, green, blue) and CMYK (cyan, magenta, yellow, black) color models.

[0169] Configure the parameters required for the calculation, including color space, color gamut, and accuracy requirements.

[0170] In embodiment S520 of this application, color information is obtained by calculating the color ratio and droplet information according to the calculation mode:

[0171] Obtain and parse the input color ratio and droplet information, such as the ratio of each color and the specific color of the droplet.

[0172] The application uses a pre-defined calculation mode to convert color ratios and droplet information into usable color data. This includes calculation methods such as color mixing and weighted averaging.

[0173] Output the final color information, including color values ​​(such as RGB or CMYK values) and their corresponding color descriptions, ensuring that the results meet the expected color effects.

[0174] As an optional implementation, the steps of this application include:

[0175] The test strip can only be moved in the x-direction, and the sampling rod can only be moved in the y-direction; the two directions are perpendicular to each other.

[0176] S1. Obtain the x-direction position of the sampling rod to prevent errors that may occur during the installation and production process.

[0177] 1. Drive the sampling rod motor into the camera's field of view and continuously acquire the data returned by the recognition algorithm. Initially, there should be no color block target in the camera's field of view, as shown in Figure 2.

[0178] 2. As the sampling rod motor moves in, the camera identifies the identification point at the top of the sampling rod. By continuously acquiring the return data from the identification algorithm, the x-coordinate of the identification point is obtained and recorded as the x-coordinate x0 of the test strip, as shown in Figure 3.

[0179] 3. Remove the sampling rod and remove the identification point at the top of the sampling rod from the display area, as shown in Figure 4.

[0180] S2. Align the test paper in the x-direction and obtain the position of the sampling rod in the y-direction to prevent errors during the installation of the sampling rod.

[0181] 1. Drive the test strip motor to continuously acquire data returned by the recognition algorithm. In the initial state, there should be no test strip target in the camera's field of view, as shown in Figure 5.

[0182] 2. As the test strip motor moves, the camera recognizes the test strip and obtains the x-coordinate of the test strip by continuously acquiring the return data from the recognition algorithm. The motor is then adjusted left and right to make the x-coordinate of the test strip equal to x0, as shown in Figure 6.

[0183] 3. Record the y-coordinate of the current second test strip as y1.

[0184] S3. Take liquid, move the sampling rod, and achieve precise alignment using the data stored on it.

[0185] 1. The normal liquid collection process is outside the camera's range, and the camera will not interfere.

[0186] 2. Since the sampling rod enters a long distance, first fix it and move it quickly once, and record the coordinates of the sampling rod at the end of the movement, denoted as y1, as shown in Figure 7.

[0187] 3. After liquid collection is completed, the sampling rod moves into the camera and continuously acquires the return data from the recognition algorithm to obtain the y-coordinate of the sampling rod. By adjusting the motor left and right, the y-coordinate of the sampling rod is made equal to y0.

[0188] S4. The sampling rod is lowered to drop the liquid, which helps to determine whether the dropping was successful.

[0189] 1. Press the sampling stick down onto the test paper and continuously obtain the return data from the recognition algorithm. Determine if the press was successful based on the size of the color block, then lift it up, as shown in Figure 8.

[0190] S5. Sampling rod reset, achieving precise reset with the assistance of a camera.

[0191] 1. Adjust the position of the sampling rod and continuously obtain the return data of the recognition algorithm to obtain the y-coordinate of the sampling rod. Adjust the motor left and right to make the y-coordinate of the sampling rod equal to y1, as shown in Figure 9.

[0192] 2. Perform a long-distance movement to reset the sampling rod.

[0193] S6. Color Adjustment: Adjust the color of the reference color block in the camera's field of view to the standard value.

[0194] 1. Adjust the brightness of the RGB LED light above the camera to adjust the color ratio of the reference color block, as shown in Figure 10.

[0195] 2. By adjusting the camera's exposure, the specific RGB values ​​of the reference color block are adjusted to match the reference values ​​in the database.

[0196] S7. Color Extraction.

[0197] 1. Set the recognition module to calculation mode.

[0198] 2. Wait approximately 6 seconds to obtain the final RGB test strip value and pH estimate returned by the algorithm, as shown in Figure 11.

[0199] The above steps are shown in Figure 12.

[0200] On the other hand, embodiments of this application also provide a system for pH test strip color recognition control, the system comprising:

[0201] The first module is used to obtain the sampling rod position information;

[0202] The second module is used to obtain the test strip coordinate information based on the sampling rod position information;

[0203] The third module is used for sampling and dripping, and obtains dripping information based on the coordinate information of the test strip and the position information of the sampling rod;

[0204] The fourth module is used to adjust the color ratio of the reference color block;

[0205] The fifth module is used to obtain color information based on the color ratio and droplet information;

[0206] The sixth module is used to calculate color information and complete recognition control.

[0207] Referring to Figure 13, the system for pH test strip color recognition control in this application includes a motor drive module, a camera module, a control algorithm module, and a recognition algorithm module.

[0208] On the other hand, embodiments of this application also provide an apparatus for pH test strip color recognition control, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for pH test strip color recognition control as described above.

[0209] The apparatus for pH test strip color recognition control according to embodiments of this application includes a memory and a processor.

[0210] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0211] Memory can include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. ROM can store static data or instructions required by the processor or other modules of the computer. Permanent storage devices can be read-write storage devices. Permanent storage devices can be non-volatile storage devices that retain stored instructions and data even when the computer is powered off. In some embodiments, permanent storage devices use high-capacity storage devices (e.g., magnetic or optical disks, flash memory) as permanent storage devices. In other embodiments, permanent storage devices can be removable storage devices (e.g., floppy disks, optical drives). System memory can be a read-write storage device or a volatile read-write storage device, such as dynamic random access memory. System memory can store some or all of the instructions and data required by the processor during operation. Furthermore, memory can include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks can also be used. In some implementations, the memory may include removable storage devices that are readable and / or writable, such as laser discs (CDs), read-only digital versatile optical discs (e.g., DVD-ROMs, dual-layer DVD-ROMs), read-only Blu-ray discs, ultra-high density optical discs, flash memory cards (e.g., SD cards, mini SD cards, Micro-SD cards, etc.), magnetic floppy disks, etc. Computer-readable storage media do not contain carrier waves or transient electronic signals transmitted wirelessly or via wired connections.

[0212] The memory stores executable code, which, when processed by the processor, can cause the processor to execute some or all of the methods described above.

[0213] On the other hand, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the methods described above.

Claims

1. A method for pH test paper color recognition control, characterized in that, The method includes the following steps: Obtain the sampling rod position information; Based on the sampling rod position information, the test strip coordinate information is obtained; Sampling droplet: Based on the coordinate information of the test strip and the position information of the sampling rod, obtain the droplet information; Adjust the color ratio of the reference color block; Color information is obtained based on the color ratio and the droplet information; The color information is calculated to complete the recognition control.

2. The method of claim 1, wherein, The process of obtaining the sampling rod location information includes the following steps: Adjust the camera's field of view to include any colored targets to obtain the camera's initial field of view; Move the sampling rod in and obtain its initial information based on its position within the camera's field of view; Based on the initial field of view of the camera and the initial information of the sampling rod, the information of the top of the sampling rod is obtained; Based on the information at the top of the sampling rod, the position information of the sampling rod is obtained.

3. The method of claim 1, wherein, The step of obtaining the test strip coordinate information based on the sampling rod position information includes the following steps: Based on the sampling rod position information, the horizontal coordinates of the top of the sampling rod are recorded; The horizontal coordinate of the top of the sampling rod is used as the initial horizontal coordinate of the test strip; Based on the initial horizontal coordinates of the test strip, the camera is adjusted to identify the test strip, and the horizontal coordinates of the test strip are obtained; Record the vertical coordinates of the test strip; The horizontal and vertical coordinates of the test strip are used as the coordinate information of the test strip.

4. The method of claim 1, wherein, The sampling droplet information is obtained based on the coordinate information of the test strip and the position information of the sampling rod. Includes the following steps: After sampling, the coordinate information of the test strip and the position information of the sampling rod are recorded. Based on the coordinate information of the sampled test strip and the position information of the sampling rod, the camera field of view is adjusted to obtain online monitoring and recognition data of the camera. Based on the online monitoring and recognition data from the camera, color block data is obtained; Based on the color block data, the droplet information is obtained.

5. The method of claim 4, wherein, The process of obtaining color block data based on the online monitoring and recognition data from the camera includes the following steps: Based on the online monitoring and identification data from the camera, the sampling rod pressure information is obtained; Based on the information from the downward pressure of the sampling rod, the size information of the color block in the camera's field of view is obtained; Based on the color block size information, color block data is obtained.

6. The method of claim 1, wherein, Adjusting the color ratio of the reference color block includes the following steps: Adjust the brightness of the RGB lights above the camera; Adjust the camera exposure; Based on the brightness of the RGB lights and the exposure of the camera, the RGB values ​​of the reference color block are adjusted to match the standard values ​​in the database, thus completing the adjustment of the color ratio of the reference color block.

7. The method of claim 1, wherein, Obtaining color information based on the color ratio and the droplet information includes the following steps: Set the calculation mode; Based on the calculation mode, the color ratio and the droplet information are calculated to obtain color information.

8. A system for pH test paper color recognition control, characterized by, The system includes: The first module is used to obtain the sampling rod position information; The second module is used to obtain the test strip coordinate information based on the sampling rod position information; The third module is used for sampling the droplet, and obtains the droplet information based on the coordinate information of the test strip and the position information of the sampling rod; The fourth module is used to adjust the color ratio of the reference color block; The fifth module is used to obtain color information based on the color ratio and the droplet information; A sixth module is configured to calculate the color information to complete the identification control.

9. A device for pH test paper color recognition control, characterized in that, The application provides a computer readable storage medium storing a computer executable instruction, and the computer executable instruction is used to make a computer execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions, and the computer executable instructions are used to make a computer execute the method according to any one of claims 1 to 7.