Method and system for color recognition control of pH test paper
By obtaining the position of the sampling stick and the coordinate information of the test strip and adjusting the color ratio of the reference color block, the problem of inaccurate positioning and droplets in automated tests is solved, the accuracy and robustness of the recognition are improved, and the pH is achieved Efficient identification and control of test strips.
Patent Information
- Application Number
- CN202411647658.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2024-12-17
AI Technical Summary
The color recognition system faces problems such as inaccurate positioning, color aberration of shooting, lighting aging, speed adjustment and inaccurate dripping in automated tests, resulting in insufficient inaccuracy and robustness of the identification results.
By obtaining the position information of the sampling stick, calculating the test paper coordinate information, adjusting the color ratio of the reference color block, and performing color recognition control based on the dropping information to ensure the accurate acquisition and calculation of the color information.
It improves the accuracy and robustness of the color recognition system and enhances the recognition and control ability of pH test strips.
Smart Images

Figure CN119152164A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and system for color recognition control of pH test paper. Background Art
[0002] Color recognition technology faces many challenges in automated testing, mainly including the following aspects: Misalignment: Manufacturing tolerances can cause the actual object position to deviate from the expected position. This deviation can affect the accuracy of the color recognition system because the system may not properly align or position the object being measured, resulting in false recognition or inaccurate results.
[0003] Color difference in shooting: Hardware differences (such as different camera sensors) may cause color difference in the captured images. This color difference will affect the color performance in the image, causing the color recognition algorithm to be unable to accurately identify or match the target color.
[0004] Light aging problem: The aging of light will change the color temperature and intensity of the lighting, which will cause the color in the captured image to change. This change may introduce additional color differences, making it difficult for the color recognition system to maintain consistent recognition performance.
[0005] Speed adjustment problem: The change of the scroll radius will affect the relative speed of the object and the sensor during the movement. This change may cause the image to be blurred or deformed, thus affecting the accuracy of the color recognition system.
[0006] Inaccurate drop problem: The deviation of the test paper may cause the position of the liquid on the test paper to be inaccurate, thus affecting the distribution and display of the color. This deviation will affect the detection results of the color recognition algorithm and may lead to misjudgment of the test results. Summary of the invention
[0007] The main purpose of the embodiments of the present application is to provide a method and system for color recognition control of pH test paper.
[0008] The technical solution adopted by the present invention is: In one aspect, an embodiment of the present invention provides a method for pH test paper color recognition control, the method comprising the following steps: Obtaining sampling rod position information; According to the sampling stick position information, the test paper coordinate information is obtained; Sampling liquid drops, and obtaining liquid drop information according to the test paper coordinate information and the sampling rod position information; Adjust the color ratio of the reference color block; Obtaining color information according to the color ratio and the drop information; The color information is calculated to complete the recognition control.
[0009] Furthermore, the obtaining of the sampling rod position information comprises the following steps: Move the sampling stick in, and obtain the initial information of the sampling stick according to the position of the sampling stick in the camera field of view; Adjust the camera's field of view to a point where there is no color block target, and obtain the camera's initial field of view; According to the initial field of view of the camera and the initial information of the sampling rod, the top information of the sampling rod is obtained; The sampling rod position information is obtained according to the sampling rod top information.
[0010] Further, obtaining the test paper coordinate information according to the sampling stick position information comprises the following steps: According to the sampling rod position information, the horizontal coordinate of the top of the sampling rod is recorded; The horizontal coordinate of the top of the sampling stick is used as the initial horizontal coordinate of the test paper; According to the initial horizontal coordinate of the test paper, adjusting the camera to identify the test paper to obtain the horizontal coordinate of the test paper; Record the vertical coordinate of the test paper; The horizontal coordinate of the test paper and the vertical coordinate of the test paper are used as the test paper coordinate information.
[0011] Furthermore, the sampling and dripping of liquid, according to the test paper coordinate information and the sampling rod position information, obtains the dripping information, including the following steps: After the sampling rod takes samples, the test paper coordinate information and the sampling rod position information after sampling are recorded; According to the test paper coordinate information and the sampling rod position information after sampling, the camera field of view is adjusted to obtain the camera online monitoring identification data; Obtaining color block data according to the online monitoring and recognition data of the camera; The drop information is obtained according to the color block data.
[0012] Furthermore, obtaining the color block data according to the online monitoring recognition data of the camera includes the following steps: According to the online monitoring and identification data of the camera, the downward pressure information of the sampling rod is obtained; According to the downward pressure information of the sampling rod, the size information of the color block in the camera field of view is obtained; Color block data is obtained according to the color block size information.
[0013] Furthermore, the adjusting the color ratio of the reference color block comprises the following steps: Adjust the brightness of the RGB light above the camera; Adjust camera exposure; According to the brightness of the RGB lamp and the exposure of the camera, the RGB value of the reference color block is adjusted to be consistent with the standard value in the database, and the color ratio of the reference color block is adjusted.
[0014] Further, obtaining the color information according to the color ratio and the drop information comprises the following steps: Set the calculation mode; According to the calculation mode, the color ratio and the drop information are calculated to obtain color information.
[0015] On the other hand, an embodiment of the present invention further provides a system for pH test paper color recognition control, the system comprising: The first module is used to obtain the position information of the sampling rod; The second module is used to obtain the test paper coordinate information according to the sampling stick position information; The third module is used to sample the droplet and obtain the droplet information according to the test paper coordinate information and the sampling rod position information; The fourth module is used to adjust the color ratio of the reference color block; A fifth module is used to obtain color information according to the color ratio and the drop information; The sixth module is used to calculate the color information and complete the recognition control.
[0016] On the other hand, an embodiment of the present invention also provides a device for color recognition control of pH test paper, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for color recognition control of pH test paper as described above is implemented.
[0017] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method described above.
[0018] The embodiments of the present application include at least the following beneficial effects: The present application provides a method and system for pH test paper color recognition control. The present invention obtains sampling rod position information; obtains test paper coordinate information based on the sampling rod position information; samples droplets, and obtains droplet information based on the test paper coordinate information and the sampling rod position information; adjusts the color ratio of the reference color block; obtains color information based on the color ratio and the droplet information; calculates the color information to complete recognition control. The present invention can improve the accuracy and robustness of the color recognition system. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a flow chart of a method for pH test paper color recognition control provided by an embodiment of the present invention; Figure 2 is a schematic diagram of the initial state of the color recognition control provided by an embodiment of the present invention; Figure 3 is a schematic diagram of the top end recognition of the sampling rod for color recognition control provided by an embodiment of the present invention; Figure 4 is a schematic diagram of a color recognition control after identification of a test paper according to an embodiment of the present invention; Figure 5 is a schematic diagram of a color recognition control after pressing a sampling stick according to an embodiment of the present invention; Figure 6 is a schematic diagram of the color recognition control provided by an embodiment of the present invention after obtaining the sampling rod coordinates; Figure 7 is a schematic diagram of adjusting the color ratio of a reference color block in the color recognition control provided by an embodiment of the present invention; Figure 8 It is a schematic diagram of the color recognition control provided by an embodiment of the present invention after returning the RGB test paper value and the pH estimation value; Fig. 9 is a schematic diagram of the steps of color recognition control provided by an embodiment of the present invention; Fig.10 Schematic diagram of a color recognition control system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the 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 the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0021] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0022] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0024] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0025] 1) pH: The full name is "potential hydrogen", which is used to measure the concentration of hydrogen ions in a solution and is a measurement scale used to indicate the acidity or alkalinity of a solution.
[0026] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0027] On the one hand, the embodiment of the present invention provides a method for color recognition control of pH test paper, specifically, referring to Figure 1 , the method comprises the following steps: S100, obtaining sampling rod position information; S200, obtaining the test paper coordinate information according to the sampling stick position information; S300, sampling and dripping liquid, obtaining dripping liquid information according to the test paper coordinate information and the sampling rod position information; S400, adjusting the color ratio of the reference color block; S500, obtaining color information according to the color ratio and the drop information; S600: Calculate the color information to complete the recognition control.
[0028] The present invention analyzes and calculates the acquired color information to perform final color recognition, which includes steps such as color matching and threshold determination, and completes the recognition and control of the test paper results.
[0029] The embodiment of the present invention discloses step S100 of acquiring the sampling rod position information, including the following steps: S110, adjusting the camera field of view to a state where there is no color block target, thereby obtaining the camera initial field of view; S120, move the sampling stick in, and obtain initial information of the sampling stick according to the position of the sampling stick in the field of view of the camera; S130, obtaining the top information of the sampling rod according to the initial field of view of the camera and the initial information of the sampling rod; S140, obtaining the sampling rod position information according to the sampling rod top information.
[0030] The present invention S110 adjusts the camera field of view to a state without any color block target, and obtains the camera initial field of view: 1. Clear interference: Make sure there are no interfering targets, such as color blocks or other objects, in the camera's field of view to avoid affecting the recognition of the sampling stick position.
[0031] 2. Get the initial field of view: Adjust the camera field of view to include only background information, and ensure that there are no sampling rods or other color block targets in the field of view in the initial state. Record the camera's field of view data at this time as a reference for the initial field of view.
[0032] In step S120 of the embodiment of the present invention, the sampling stick is moved in, and initial information of the sampling stick is obtained according to the position of the sampling stick in the field of view of the camera: 1. Start the system: Start the control system and ensure that the sampling rod and camera are working properly.
[0033] 2. Sampling rod positioning: Drive the sampling rod to move within the camera's field of view to ensure that the top of the sampling rod can be clearly captured by the camera.
[0034] 3. Data collection: Use a camera to capture the image of the sampling rod, and use the image processing algorithm 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.
[0035] The present invention S130 obtains the top information of the sampling rod according to the initial field of view of the camera and the initial information of the sampling rod: 1. Information matching: Compare the initial information of the sampling rod 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.
[0036] 2. Coordinate extraction: The coordinate information of the top of the sampling rod is extracted through the image processing algorithm to obtain the exact position of the top of the sampling rod in the camera field of view.
[0037] The present invention S140 obtains the sampling rod position information according to the sampling rod top information: 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.
[0038] 2. Record data: record the final position information of the sampling rod for accurate alignment and positioning of the sampling rod in subsequent steps.
[0039] The embodiment of the present invention discloses that step S200 obtains the test paper coordinate information according to the sampling stick position information, including the following steps: S210, recording the horizontal coordinate of the top of the sampling rod according to the position information of the sampling rod; S220, taking the horizontal coordinate of the top of the sampling stick as the initial horizontal coordinate of the test paper; S230, adjusting the camera to identify the test paper according to the initial horizontal coordinate of the test paper to obtain the horizontal coordinate of the test paper; S240, recording the vertical coordinate of the test paper; S250: Use the horizontal coordinate of the test paper and the vertical coordinate of the test paper as the test paper coordinate information.
[0040] The present invention S210 records the horizontal coordinate of the top of the sampling rod according to the sampling rod position information: Horizontal coordinate recording: Extract the horizontal coordinate value of the top of the sampling rod from the sampling rod position information as the reference point for the test paper alignment. Record this horizontal coordinate value and save it as x0.
[0041] In the present invention S220, the horizontal coordinate of the top of the sampling rod is used as the initial horizontal coordinate of the test paper: Initialization alignment: Set the horizontal coordinate x0 of the top of the sampling rod as the initial horizontal coordinate of the test paper. Ensure that the horizontal position of the test paper can be aligned with the reference coordinate of the sampling rod.
[0042] The present invention S230 adjusts the camera to identify the test paper according to the initial horizontal coordinate of the test paper to obtain the horizontal coordinate of the test paper: 1. Adjust the test paper: By driving the test paper motor, adjust the position of the test paper until the horizontal coordinate of the test paper is aligned with x0.
[0043] 2. Data acquisition: The camera continuously obtains the horizontal coordinates of the test paper through the recognition algorithm, and compares and adjusts it with x0 to ensure that the horizontal coordinates of the test paper are accurate.
[0044] The present invention S240 records the vertical coordinates of the test paper: 1. Obtaining the vertical coordinate: After the horizontal coordinate of the test paper is adjusted, the vertical coordinate of the test paper is obtained through the camera.
[0045] 2. Data recording: Record the vertical coordinate value of the test paper and save it as y1.
[0046] The present invention S250 uses the horizontal coordinate of the test paper and the vertical coordinate of the test paper as the test paper coordinate information: 1. Determine the coordinate information: Combine the horizontal coordinate x0 and the vertical coordinate y1 of the test paper as the complete coordinate information of the test paper.
[0047] 2. Data storage: Save the coordinate information of the test paper for accurate operation and sampling of the test paper in subsequent steps.
[0048] The embodiment of the present invention discloses step S300 of sampling liquid drops, and obtaining liquid drop information according to the test paper coordinate information and the sampling rod position information, including the following steps: S310, after the sampling rod takes a sample, record the test paper coordinate information and the sampling rod position information after the sampling; S320, adjusting the camera field of view according to the test paper coordinate information and the sampling rod position information after sampling, and obtaining the camera online monitoring identification data; S330, obtaining color block data according to the online monitoring and recognition data of the camera; S340, obtaining drop information according to the color block data.
[0049] The present invention S310: sampling dripping liquid, after the sampling rod takes samples, the test paper coordinate information and the sampling rod position information after sampling are recorded: Sampling and dripping liquid: Move the sampling stick in again, identify the vertical coordinate of the top of the sampling stick, and continuously adjust the motor to make the coordinate consistent with y1. It is considered that the sampling stick has reached the top of the test paper, and then drive the motor to drip liquid downward, then lift the sampling stick upward, and finally move it out of the camera area.
[0050] 2. Record the test paper coordinate information after sampling: After the liquid extraction operation is completed, the sampling stick should have been removed from the test strip. At this time, the current position data of the test strip is obtained through the camera system. This is obtained in real time through the camera's image recognition algorithm.
[0051] Call the camera's image recognition module to detect the target area on the test paper and record the x and y coordinates of the test paper in the camera's field of view. These coordinate values can be marked as test paper_x and test paper_y.
[0052] Save this data to the system so that it can be used for calibration and adjustment in subsequent steps.
[0053] The present invention S320 adjusts the camera field of view according to the test paper coordinate information and the sampling rod position information after sampling, and obtains the camera online monitoring identification data: 1. Adjust the camera field of view: Based on the recorded test strip coordinate information and sampling stick position information, the optimal position and orientation of the camera field of view is calculated. This may involve fine-tuning the camera to ensure that key areas within the field of view (such as the current position of the test strip and sampling stick) can be clearly captured.
[0054] Use the control system to adjust the position and angle of the camera to ensure that the current positions of the test strip and sampling stick are within the field of view of the camera.
[0055] 2. Obtain camera online monitoring identification data: Once the camera field of view is adjusted, the real-time monitoring mode is enabled and the camera will continue to acquire image data within the field of view.
[0056] This data is processed using an image recognition algorithm to extract key target information within the field of view, including the location of the test strip and sampling stick.
[0057] Collect the camera's online monitoring and identification data, which includes the specific coordinates and color information of the test paper and sampling stick in the field of view.
[0058] The present invention S330 obtains color block data based on the online monitoring recognition data of the camera: 1. Processing camera recognition data: Extract image information from the camera's online monitoring recognition data, paying special attention to the color block area on the test paper.
[0059] Image processing algorithms are used to detect and segment the color blocks on the test paper. The area and boundaries of the color blocks need to be accurately identified to ensure the accuracy of color analysis.
[0060] 2. Get color block data: Perform color analysis on the identified color blocks to obtain the RGB value of each color block. The color block can be analyzed in detail using a color extraction algorithm to obtain the color characteristics of the color block.
[0061] Record the color data of each color block, including its RGB value and possible other color indicators. These data will be used for subsequent drop information analysis.
[0062] The present invention S340 obtains the drip information according to the color block data: 1. Analyze color block data: Compare the color block data with the predefined standard color block data. By comparing the RGB value of the identified color block with the standard value, determine whether the expected reaction color exists on the test paper.
[0063] The intensity, area and change of the color patch are calculated, and this information can be used to determine whether the liquid has been successfully dropped on the test paper.
[0064] 2. Get drip information: The effect of dropping the liquid on the test paper is determined based on the analysis results of the color block data. For example, if the color change of the color block is as expected, it means that the drop operation is successful.
[0065] The dripping information, including the success or failure of the dripping, the intensity of the dripping effect and other data, is recorded for subsequent analysis and processing.
[0066] The embodiment of the present invention discloses that step S330 obtains color block data according to the online monitoring recognition data of the camera, including the following steps: S331, obtaining the sampling rod pressing information according to the camera online monitoring identification data; S332, obtaining the color block size information in the camera field of view according to the sampling rod pressing information; S333. Obtain color block data according to the color block size information.
[0067] The embodiment of the present invention identifies whether the sampling rod is in a downward pressure state by analyzing the relative position change of the sampling rod and the change in the image. For example, the sampling rod is lowered from a certain height to a state of contacting the sample.
[0068] The pressing information of the sampling rod is associated with the color block detection result. It is determined whether the pressing operation affects the display or size of the color block.
[0069] According to the size information of the color block, the color block is classified, marked or further processed. For example, the color block is classified into different categories according to its size, or its distribution in the sample is calculated.
[0070] The embodiment of the present invention discloses that step S400 adjusts the color ratio of the reference color block, including the following steps: S410, adjust the brightness of the RGB light above the camera; S420, adjusting camera exposure; S430, according to the brightness of the RGB light and the exposure of the camera, the RGB value of the reference color block is adjusted to be consistent with the standard value in the database, and the color ratio of the reference color block is adjusted.
[0071] The present invention S410 adjusts the brightness of the RGB light above the camera: Ensure that the RGB light is working properly and is correctly installed above the camera. Through the control panel or related software, gradually adjust the brightness settings of the three colors of the RGB light to ensure that the light source is uniform and stable. Observe the brightness changes of the RGB light and record the optimal brightness and color levels to ensure accurate illumination of the reference color block.
[0072] In the embodiment of the present invention, S420 adjusts the camera exposure: Open the camera control software and enter the exposure setting menu. Adjust the exposure time and gain of the camera according to the ambient light and the brightness of the RGB light. Take a test shot to check whether the image is clear and not overexposed or underexposed. Make fine adjustments if necessary until the image quality meets the requirements.
[0073] Embodiment S430 of the present invention adjusts the RGB value of the reference color block to be consistent with the standard value in the database according to the brightness of the RGB lamp and the exposure of the camera, and completes the adjustment of the color ratio of the reference color block: use calibration software or instruments to read the RGB value of the reference color block under the current lighting and exposure conditions. Compare the RGB value actually read with the standard value stored in the database. Adjust the brightness of the RGB lamp and the exposure of the camera according to the difference to ensure that the RGB value of the reference color block is consistent with the standard value. Repeat the measurement and adjustment until the color ratio of the reference color block reaches the final target, and record the adjustment results for subsequent reference.
[0074] The embodiment of the present invention discloses that step S500 obtains color information according to the color ratio and the drop information, including the following steps: S510, setting a calculation mode; S520: Calculate the color ratio and the drip information according to the calculation mode to obtain color information.
[0075] In the embodiment of the present invention, S510 sets the calculation mode: Determine the required calculation mode, including RGB (red, green, blue) and CMYK (cyan, magenta, yellow, black) color models.
[0076] Configure the parameters required for calculation, including color space, color range, and accuracy requirements.
[0077] In S520 of the embodiment of the present invention, the color ratio and the drop information are calculated according to the calculation mode to obtain color information: Get and parse the input color ratio and drop information, such as the ratio of each color and the specific color of the drop.
[0078] Apply the set calculation mode to convert the color ratio and drop information into usable color data. This includes calculation methods such as color mixing and weighted average.
[0079] Output the final color information, including color values (such as RGB values or CMYK values) and their corresponding color descriptions, to ensure that the result meets the expected color effect.
[0080] As an optional embodiment, the steps of the present invention include: The overall structure of the test paper can only move in the x direction, and the sampling rod can only move in the y direction, and the two directions are perpendicular to each other.
[0081] S1. Obtain the x-direction position of the sampling rod to prevent errors during installation and production 1. Drive the sampling rod motor into the camera field of view and continuously obtain the return data of the recognition algorithm. In the initial state, there should be no color block target in the camera field of view. Figure 2 .
[0082] 2. As the sampling rod motor moves in, the camera recognizes the identification point at the top of the sampling rod, and obtains the return data of the recognition algorithm to obtain the x coordinate of the identification point. This data is recorded as the x coordinate x0 of the test paper. Figure 3 .
[0083] 3. Remove the sampling rod and remove the identification point at the top of the sampling rod from the display area. Figure 2 .
[0084] S2. Align the test paper in the x direction to obtain the y direction position of the sampling rod to prevent errors during the installation of the sampling rod 1. Drive the test paper motor and continuously obtain the data returned by the recognition algorithm. In the initial state, there should be no test paper target in the camera field of view. Figure 2 .
[0085] 2. As the test paper motor moves, the camera recognizes the test paper and obtains the x coordinate of the test paper by continuously acquiring the return data of the recognition algorithm. By adjusting the motor left and right, the x coordinate of the test paper is equal to x0. Figure 4 .
[0086] 3. Record the current y coordinate of the second test paper block as y1.
[0087] S3. Take the liquid, move the sampling rod, and achieve precise alignment through the data stored above 1. The normal liquid collection process is not within the camera range and the camera does not interfere.
[0088] 2. Because the sampling rod moves a long distance, first move it quickly and record the coordinates of the sampling rod at the end of the movement, which is recorded as y1. Figure 3 .
[0089] 3. After the liquid is collected, the sampling rod moves into the camera, continuously obtains the return data of the recognition algorithm, obtains the y coordinate of the sampling rod, and adjusts the motor left and right to make the y coordinate of the sampling rod equal to y0.
[0090] S4. The sampling rod moves downward to drip liquid, which helps to determine whether the dripping is successful. 1. Press the sampling stick down onto the test paper, and continuously obtain the return data of the recognition algorithm. Determine whether the pressing is successful based on the size of the color block, and then lift it up. Figure 5 .
[0091] S5. Sampling rod reset, accurate reset with camera assistance 1. Adjust the position of the sampling rod, continuously obtain the return data of the recognition algorithm, obtain the y coordinate of the sampling rod, and adjust the motor left and right to make the y coordinate of the sampling rod equal to y1. Figure 6 .
[0092] 2. Move the sampling rod over a long distance to reset it.
[0093] S6. Color adjustment, adjust the color of the reference color block in the camera field of view to the standard value 1. Adjust the brightness of the RGB LED light above the camera and adjust the color ratio of the reference color block. Figure 7 .
[0094] 2. Adjust the specific RGB values of the reference color block by adjusting the camera exposure to make them consistent with the reference values in the database.
[0095] S7. Color extraction 1. Set the recognition module to calculation mode.
[0096] 2. Wait for about 6 seconds to obtain the final RGB test paper value and pH estimated value returned by the algorithm, refer to Figure 8 .
[0097] The above steps refer to Fig. 9 .
[0098] On the other hand, an embodiment of the present invention further provides a system for pH test paper color recognition control, the system comprising: The first module is used to obtain the position information of the sampling rod; The second module is used to obtain the test paper coordinate information according to the sampling stick position information; The third module is used to sample the droplet and obtain the droplet information according to the test paper coordinate information and the sampling rod position information; The fourth module is used to adjust the color ratio of the reference color block; The fifth module is used to obtain color information according to the color ratio and the drop information; The sixth module is used to calculate the color information and complete the recognition control.
[0099] refer to Fig.10 The system for pH test paper color recognition control of the present invention includes a motor drive module, a camera module, a control algorithm module, and a recognition algorithm module.
[0100] On the other hand, an embodiment of the present invention also provides a device for color recognition control of pH test paper, 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, the method for color recognition control of pH test paper as described above is implemented.
[0101] The device for pH test paper color recognition control according to the embodiment of the present invention includes a memory and a processor.
[0102] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0103] The memory may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage. Among them, ROM can store static data or instructions required by the processor or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory may 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 may also be used. In some embodiments, the memory may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0104] The memory stores executable codes, and when the executable codes are processed by the processor, the processor can execute part or all of the methods described above.
[0105] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above method.
[0106] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0107] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for pH test paper color recognition control, characterized in that: The method comprises the following steps: Obtaining sampling rod position information; According to the sampling stick position information, the test paper coordinate information is obtained; Sampling liquid drops, and obtaining liquid drop information according to the test paper coordinate information and the sampling rod position information; Adjust the color ratio of the reference color block; Obtaining color information according to the color ratio and the drop information; The color information is calculated to complete the recognition control.
2. The method according to claim 1, characterized in that The method of obtaining the sampling rod position information comprises the following steps: Adjust the camera's field of view to a point where there is no color block target, and obtain the camera's initial field of view; Move the sampling stick in, and obtain the initial information of the sampling stick according to the position of the sampling stick in the camera field of view; According to the initial field of view of the camera and the initial information of the sampling rod, the top information of the sampling rod is obtained; The sampling rod position information is obtained according to the sampling rod top information.
3. The method according to claim 1, characterized in that: The method of obtaining the test paper coordinate information according to the sampling stick position information comprises the following steps: According to the sampling rod position information, the horizontal coordinate of the top of the sampling rod is recorded; The horizontal coordinate of the top of the sampling stick is used as the initial horizontal coordinate of the test paper; According to the initial horizontal coordinate of the test paper, adjusting the camera to identify the test paper to obtain the horizontal coordinate of the test paper; Record the vertical coordinate of the test paper; The horizontal coordinate of the test paper and the vertical coordinate of the test paper are used as the test paper coordinate information.
4. The method according to claim 1, characterized in that: The sampling droplet obtains the droplet information according to the test paper coordinate information and the sampling rod position information, The following steps are involved: After the sampling rod takes samples, the test paper coordinate information and the sampling rod position information after sampling are recorded; According to the test paper coordinate information and the sampling rod position information after sampling, the camera field of view is adjusted to obtain the camera online monitoring identification data; Obtaining color block data according to the online monitoring and recognition data of the camera; The drop information is obtained according to the color block data.
5. The method according to claim 4, characterized in that The method of obtaining the color block data according to the online monitoring recognition data of the camera comprises the following steps: According to the online monitoring and identification data of the camera, the downward pressure information of the sampling rod is obtained; According to the downward pressure information of the sampling rod, the size information of the color block in the camera field of view is obtained; Color block data is obtained according to the color block size information.
6. The method according to claim 1, characterized in that The step of adjusting the color ratio of the reference color block comprises the following steps: Adjust the brightness of the RGB light above the camera; Adjust camera exposure; According to the brightness of the RGB lamp and the exposure of the camera, the RGB value of the reference color block is adjusted to be consistent with the standard value in the database, and the color ratio of the reference color block is adjusted.
7. The method according to claim 1, characterized in that The step of obtaining color information according to the color ratio and the drop information comprises the following steps: Set the calculation mode; According to the calculation mode, the color ratio and the drop information are calculated to obtain color information.
8. A system for pH test paper color recognition control, characterized in that: The system comprises: The first module is used to obtain the position information of the sampling rod; The second module is used to obtain the test paper coordinate information according to the sampling stick position information; The third module is used to sample the droplet and obtain the droplet information according to the test paper coordinate information and the sampling rod position information; The fourth module is used to adjust the color ratio of the reference color block; A fifth module is used to obtain color information according to the color ratio and the drop information; The sixth module is used to calculate the color information and complete the recognition control.
9. A device for pH test paper color recognition control, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for color recognition control of pH test paper as claimed in any one of claims 1 to 7 is implemented.
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 enable a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Urine test paper physiological index quantification identification method based on cloud platform
CN106991679A
Urine test strip quantitative detection system and method based on machine vision
CN110887960A
Instant visual sensing detection system and method for Cr(VI) ions in water
CN110907441A
Identification method for detecting secretions through mobile phone photographing based on cloud platform
CN115032157A
White balance adjusting method and system based on endocrine test paper color histogram
CN115131349A
Cited By
Color recognition control method and system for ph test paper
WO2026102989A1
