A visual perception-based PH automatic titrator metering calibration method and system
By collecting and modeling data using visual perception technology, combined with HSV color analysis, automated titration calibration of glass instruments has been achieved. This solves the problems of subjectivity and high cost associated with manual endpoint determination in existing methods, and improves the accuracy and efficiency of titration calibration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG MAOMING QUALITY METROLOGY SUPERVISION & INSPECTION INST
- Filing Date
- 2026-06-02
- Publication Date
- 2026-07-03
AI Technical Summary
Existing pH titration methods rely on manual determination of the endpoint, which is highly subjective and cannot record process data. Potentiometric titration is costly and susceptible to interference, while glass instrument calibration is inefficient and its errors are difficult to control.
A vision-based approach is adopted to collect the contour data of glass instruments through a vision sensing unit, perform 3D modeling to identify specification parameters, combine HSV color analysis titration endpoint, automatically collect titration data and perform deviation analysis to achieve automated instrument calibration.
It improves the accuracy and efficiency of automatic pH titration calibration, reduces manual judgment steps, and ensures the reliability and traceability of digital evidence.
Smart Images

Figure CN122330352A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of metrology and calibration technology, and in particular to an automatic pH titration metrology and calibration method and system based on visual perception. Background Technology
[0002] With the improvement of laboratory automation, higher requirements are placed on the integration, automation, and data traceability of pH titration and glass instrument metrology calibration.
[0003] Existing methods have significant shortcomings: titration methods based on manual visual judgment rely on operator experience, endpoint identification is highly subjective, and process data cannot be recorded. While potentiometric titration can achieve automatic endpoint determination, electrode maintenance costs are high and it is susceptible to interference from complex samples. For the metrological calibration of glassware, traditional methods rely on manual reading and weighing, which is inefficient and difficult to control errors. Therefore, there is an urgent need for an automated method that integrates visual sensing, 3D modeling, and dynamic titration control. Summary of the Invention
[0004] This invention provides a visual perception-based automatic pH titration calibration method and system, the main purpose of which is to improve the reliability, accuracy and traceability integrity of digital script storage.
[0005] To achieve the above objectives, the present invention provides a visual perception-based automatic pH titration calibration method, comprising: The titration calibration command is confirmed upon receipt. Based on the titration calibration command, the titration calibration environment is confirmed. The titration calibration environment includes a titration calibration system, a glass instrument to be calibrated, and a pH sample to be tested. The titration calibration system includes a visual sensing unit, an intelligent recognition unit, and an electromechanical execution unit. The electromechanical actuator grips the glass instrument to be calibrated and dries it using a pre-built drying device to obtain a dried glass instrument. Based on the visual sensing unit, the inner and outer contour features of the dry glass instrument are collected to obtain a multimodal dataset of the instrument contour. Based on the intelligent recognition unit, the multimodal dataset of the instrument contour is used to perform three-dimensional spatial modeling to obtain a three-dimensional model of the instrument. Based on the three-dimensional model of the instrument, the instrument specification parameters are identified. The pH test sample is added to the dry glass instrument, and the initial liquid level height value and HSV hue reference value are obtained based on the pH test sample in the dry glass instrument. The HSV hue offset and dynamic color difference gradient value are calculated based on the visual sensing unit and the HSV hue reference value. Titration is performed and data is collected based on the initial liquid level height, HSV hue shift and dynamic color difference gradient value to obtain a titration endpoint dataset, wherein the titration endpoint dataset includes the initial sample volume, total liquid mass and ambient temperature. The actual liquid volume is calculated based on the titration endpoint dataset. Deviation analysis is performed based on the actual liquid volume and the instrument specifications to obtain a metrological calibration evaluation report. The glass instruments to be calibrated are automatically sorted based on the metrological calibration evaluation report to obtain calibrated glass instruments. Based on the calibrated glass instruments and the metrological calibration evaluation report, automatic pH titration metrological calibration of the glass instruments to be calibrated and the pH test samples is realized.
[0006] Optionally, the step of gripping the glass instrument to be calibrated in the electromechanical actuation unit and drying the glass instrument to be calibrated based on a pre-built drying device to obtain a dried glass instrument includes: Based on the visual sensing unit, the pose image of the glass instrument to be calibrated is detected to obtain the initial pose image set of the instrument. The initial pose image set of the instrument is then calculated to obtain the grasping coordinates and clamping angle. The electromechanical actuator, gripping coordinates, and clamping angle are used to grip the glass instrument to be calibrated, and the drying device receives the glass instrument to be calibrated. The drying device includes a drying chamber and an air outlet pipe. The following operations are performed on the glass instrument to be calibrated using the drying device: The glass instrument to be calibrated is dried using the drying oven and the preset drying temperature, and the humidity of the air outlet is collected using the preset humidity sensor to obtain the real-time humidity. The real-time humidity is compared with a preset humidity threshold. If the real-time humidity is less than the humidity threshold, the glass instrument to be calibrated is identified as a dry glass instrument.
[0007] Optionally, the step of acquiring the inner and outer contour features of the dry glass instrument based on the visual sensing unit to obtain a multimodal dataset of the instrument contour includes: The electromechanical actuator drives the drying glass instrument to spin at a constant speed, and the visual sensing unit collects the inner and outer contours of the drying glass instrument to obtain the outer wall contour point cloud, the inner wall structure point cloud and the scale distribution image. By summarizing the point cloud of the outer wall contour, the point cloud of the inner wall structure, and the scale distribution image, a multimodal dataset of the instrument contour is obtained.
[0008] Optionally, the step of performing three-dimensional spatial modeling on the instrument contour multimodal dataset based on the intelligent recognition unit to obtain a three-dimensional model of the instrument, and identifying instrument specification parameters based on the three-dimensional model of the instrument, including: Outlier points are removed from the outer wall contour point cloud and the inner wall structure point cloud based on a pre-built statistical filtering algorithm to obtain optimized outer wall point cloud and optimized inner wall point cloud. Based on the intelligent recognition unit, the optimized outer wall point cloud and the optimized inner wall point cloud are transformed into a pre-constructed world coordinate system, and point cloud registration is performed on the optimized outer wall point cloud and the optimized inner wall point cloud to obtain a fused point cloud model. Based on the fused point cloud model and the scale distribution image, texture mapping is performed to obtain a three-dimensional model of the instrument. The actual liquid volume of the inner cavity is calculated based on the three-dimensional model of the instrument, and the actual liquid volume of the inner cavity is matched with a preset set of nominal volumes to obtain the instrument specifications, which include the instrument type, nominal volume and accuracy class.
[0009] Optionally, obtaining the initial liquid level height value and HSV hue reference value based on the pH sample in the dried glass instrument includes: Based on the visual sensing unit, a panoramic image of the dry glass instrument is acquired to obtain the original image of the liquid level height; The original image of the liquid level height is converted to grayscale to obtain a preprocessed liquid level image; The preprocessed liquid surface image is subjected to edge detection based on a pre-built edge detection algorithm to obtain the curved edge of the liquid surface and the edge of the scale line, and the initial liquid surface height value is calculated based on the curved edge of the liquid surface and the edge of the scale line. The initial color original image is obtained by acquiring a static image of the PH sample to be tested based on the visual sensing unit. The initial color image is white-balance corrected to obtain an initial color image, and the HSV hue reference value is extracted based on the initial color image.
[0010] Optionally, the step of calculating the HSV hue shift and dynamic color difference gradient value based on the visual sensing unit and the HSV hue reference value includes: The electromechanical actuator performs titration on the dry glass instrument, and the visual sensing unit performs image acquisition at a preset sampling frame rate to obtain a real-time color frame sequence, wherein the real-time color frame sequence includes multiple real-time color frames arranged in chronological order. Each real-time color frame in the real-time color frame sequence is converted to a color space to obtain a real-time HSV chromaticity feature vector sequence. Each real-time HSV chromaticity feature vector in the real-time HSV chromaticity feature vector sequence contains a hue channel mean, a saturation channel mean, and a lightness channel mean. The current hue value is obtained based on the real-time HSV hue feature vector sequence, and the HSV hue offset is calculated based on the current hue value and the HSV hue reference value. The sampling interval is calculated based on the sampling frame rate, and the dynamic color difference gradient value is calculated based on the real-time HSV chromaticity feature vector sequence and the sampling interval. The calculation formula is as follows: in, This represents the dynamic color difference gradient value at time t, where t represents time. Indicates the sampling interval. and Representing time t and time t respectively in the real-time HSV chromaticity feature vector sequence The mean value of the hue channel at that time. and Representing time t and time t respectively in the real-time HSV chromaticity feature vector sequence The average saturation channel value at time 1. and Representing time t and time t respectively in the real-time HSV chromaticity feature vector sequence The corresponding brightness channel mean.
[0011] Optionally, the titration based on the initial liquid level height, HSV hue shift, and dynamic color difference gradient value, and the subsequent data acquisition to obtain the titration endpoint dataset, includes: The initial sample volume is calculated based on the initial liquid level height and the instrument's three-dimensional model. Obtain the droplet pattern, wherein the droplet pattern is fast droplet, slow droplet, or micro-pulse droplet, and perform the following operations on the HSV hue shift, dynamic color difference gradient value, preset first threshold, and preset endpoint threshold: When the dynamic color difference gradient value is less than the first threshold, the dripping mode is switched to rapid dripping. When the dynamic color difference gradient value reaches the first threshold and the HSV hue offset is less than the endpoint threshold, the dropping mode is switched to slow dropping; when the HSV hue offset reaches the endpoint threshold, the dropping mode is switched to micro-pulse dropping. If the dropping mode is micro-pulse dropping, the offset change rate is calculated based on the HSV hue shift and the preset adjacent pulse interval. If the offset change rate is less than the preset change rate threshold, data is collected from the pH sample to be tested in the dry glass instrument to obtain the total liquid mass and ambient temperature. The initial sample volume, total liquid mass and ambient temperature are summarized to obtain the titration endpoint dataset.
[0012] Optionally, calculating the actual liquid volume based on the titration endpoint dataset includes: Based on the ambient temperature, obtain the liquid density and air density at the current temperature. Based on the ambient temperature, total liquid mass, liquid density at current temperature, and air density at current temperature, the actual liquid volume is calculated using the following formula: in, Indicates the actual liquid volume. Indicates the total mass of the liquid. This indicates the liquid density at the current temperature. This indicates the current air density at the current temperature. This represents the coefficient of thermal expansion of glass. Indicates ambient temperature. Indicates the reference temperature.
[0013] Optionally, the deviation analysis based on the actual liquid volume and the instrument specifications yields a metrological calibration evaluation report. Based on the metrological calibration evaluation report, the glass instruments to be calibrated are automatically sorted to obtain calibrated glass instruments, including: The volume error is calculated based on the nominal volume and the actual liquid volume. The maximum permissible error is obtained based on the accuracy level. If the volume error is less than the maximum permissible error, a pass / fail indicator is obtained and the pass / fail indicator is confirmed as pass / fail. If the volume error is greater than the maximum permissible error, the pass / fail indicator is confirmed as fail / fail. By integrating the initial sample volume, instrument type, nominal volume, actual liquid volume, volume error, and conformity mark, a metrological calibration evaluation report is obtained. If the qualification mark is qualified, the glass instrument to be calibrated is transferred to the preset qualified area based on the electromechanical execution unit to obtain a qualified instrument; If the conformity mark is unqualified, the glass instrument to be calibrated is transferred to the preset unqualified area based on the electromechanical execution unit, resulting in an unqualified instrument; The glassware is calibrated using either qualified or unqualified instruments.
[0014] To achieve the above objectives, the present invention also provides a vision-based automatic pH titration calibration system, comprising: The environment verification module is used to verify the receipt of the titration calibration command and verify the titration calibration environment based on the titration calibration command. The titration calibration environment includes a titration calibration system, a glass instrument to be calibrated, and a pH sample to be tested. The titration calibration system includes a visual sensing unit, an intelligent recognition unit, and an electromechanical execution unit. The three-dimensional modeling module is used to grip the glass instrument to be calibrated based on the electromechanical execution unit, and to dry the glass instrument to be calibrated based on the pre-built drying device to obtain a dried glass instrument. Based on the visual sensing unit, the inner and outer contour features of the dry glass instrument are collected to obtain a multimodal dataset of the instrument contour. Based on the intelligent recognition unit, the multimodal dataset of the instrument contour is used to perform three-dimensional spatial modeling to obtain a three-dimensional model of the instrument. Based on the three-dimensional model of the instrument, the instrument specification parameters are identified. The titration sensing module is used to add the pH test sample into the dry glass instrument, and obtain the initial liquid level height value and HSV hue reference value based on the pH test sample in the dry glass instrument. Based on the visual sensing unit and the HSV hue reference value, the module calculates the HSV hue offset and dynamic color difference gradient value. Titration is performed and data is collected based on the initial liquid level height, HSV hue shift and dynamic color difference gradient value to obtain a titration endpoint dataset, wherein the titration endpoint dataset includes the initial sample volume, total liquid mass and ambient temperature. The calibration and sorting module is used to calculate the actual liquid volume based on the titration endpoint dataset, perform deviation analysis based on the actual liquid volume and the instrument specifications, obtain a metrological calibration evaluation report, automatically sort the glass instruments to be calibrated based on the metrological calibration evaluation report, obtain calibrated glass instruments, and realize automatic pH titration metrological calibration of the glass instruments to be calibrated and the pH test samples based on the calibrated glass instruments and the metrological calibration evaluation report.
[0015] To address the above problems, the present invention also provides an electronic device, the electronic device comprising: Memory, storing at least one instruction; The processor executes the instructions stored in the memory to implement the aforementioned vision-based automatic pH titration calibration method.
[0016] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor in an electronic device to implement the aforementioned vision-based automatic pH titration calibration method.
[0017] To address the problems described in the background art, this invention first confirms the receipt of a titration calibration command. Based on this command, it confirms the titration calibration environment, which includes a titration calibration system, a glass instrument to be calibrated, and a pH sample. The titration calibration system comprises a visual sensing unit, an intelligent recognition unit, and an electromechanical execution unit. This invention integrates visual acquisition, recognition modeling, and mechanical operation, enabling the glass instrument's size calibration, titration process monitoring, and final sorting to be completed within the same system. The electromechanical execution unit grips the glass instrument to be calibrated and uses a pre-built drying device to dry it, resulting in a dried glass instrument. This invention removes residual water film from the inner wall before calibrating the instrument's specifications, preventing residual liquid from altering the actual volume of the instrument's internal cavity and interfering with the accuracy of subsequent 3D modeling. Based on the visual sensing unit, the internal and external contour features of the dried glass instrument are collected to obtain a multimodal dataset of the instrument contour. The intelligent recognition unit then performs three-dimensional spatial modeling on this dataset to obtain a three-dimensional model of the instrument. Based on this three-dimensional model, the instrument's specifications are identified. This invention, by collecting the internal and external contour data of the glass instrument for three-dimensional modeling, directly extracts specifications such as inner diameter and wall thickness from the model, replacing manual reading of nominal values one by one, and reducing measurement starting point errors caused by individual manufacturing deviations of the instrument. The pH sample to be tested is added to the dried glass instrument, and the initial liquid level height and HSV hue reference value are obtained based on the pH sample in the dried glass instrument. Based on the visual sensing unit and the HSV hue reference value, the HSV hue shift and dynamic color difference gradient value are calculated. This invention records the initial liquid level height and HSV hue reference value of the sample before titration begins through the visual sensing unit, and continuously calculates the hue shift and dynamic color difference gradient value during titration. Using the rate of color change as the endpoint prediction criterion, it is better able to handle situations where the initial color of the sample is inconsistent than single-frame hue comparison. Titration is performed and data is collected based on the initial liquid level height, HSV hue shift, and dynamic color difference gradient value to obtain a titration endpoint dataset. The titration endpoint dataset includes the initial sample volume, total liquid mass, and ambient temperature. It can be seen that the present invention collects three data points—initial sample volume, total liquid mass, and ambient temperature—when determining the titration endpoint, providing input conditions for temperature and density correction during subsequent volume conversion.The actual liquid volume is calculated based on the titration endpoint dataset. Deviation analysis is performed based on the actual liquid volume and the instrument specifications to obtain a metrological calibration evaluation report. The glass instruments to be calibrated are then automatically sorted based on the metrological calibration evaluation report to obtain calibrated glass instruments. Based on the calibrated glass instruments and the metrological calibration evaluation report, automatic pH titration calibration of the glass instruments to be calibrated and the pH test samples is achieved. It is evident that this invention uses actual liquid volume and instrument specifications for deviation analysis, and performs automatic sorting based on the evaluation report, eliminating unqualified instruments. This directly links the calibration conclusion to the final sorting action, reducing manual judgment. Therefore, this invention can improve the accuracy and efficiency of automatic pH titration calibration. Attached Figure Description
[0018] Figure 1 This is a schematic flowchart of a vision-based automatic pH titration calibration method according to an embodiment of the present invention. Figure 2 A functional block diagram of a vision-based automatic pH titration calibration system provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device that implements the vision-based automatic pH titration calibration method according to an embodiment of the present invention.
[0019] Explanation of reference numerals in the attached figures: 10. Electronic device; 11. Processor; 12. Memory; 13. Bus.
[0020] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0022] This application provides a vision-based automatic pH titration calibration method. The execution entity of the vision-based automatic pH titration calibration method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the vision-based automatic pH titration calibration method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.
[0023] Reference Figure 1The diagram shown is a schematic flowchart of a vision-based automatic pH titration calibration method according to an embodiment of the present invention. In this embodiment, the vision-based automatic pH titration calibration method includes: S1. Confirm receipt of titration calibration instruction, and confirm the titration calibration environment based on the titration calibration instruction. The titration calibration environment includes a titration calibration system, a glass instrument to be calibrated, and a pH sample to be tested. The titration calibration system includes a visual sensing unit, an intelligent recognition unit, and an electromechanical execution unit.
[0024] It should be explained that the titration calibration instruction refers to the instruction issued by the personnel who wish to perform automatic pH titration calibration; the titration calibration environment refers to the necessary environment for performing automatic pH titration calibration; the titration calibration system refers to the system capable of performing automatic pH titration calibration, which includes a visual sensing unit, an intelligent recognition unit, and an electromechanical execution unit. For the specific application of these units, please refer to subsequent embodiments. The glassware to be calibrated refers to the glass container requiring metrological calibration, such as a burette, volumetric flask, or pipette; and the pH test sample refers to the solution sample used for pH titration testing, such as a hydrochloric acid solution. The purpose of this invention is to improve the accuracy and controllability of automatic pH titration calibration.
[0025] For example, Xiao Zhang is a worker in a pharmaceutical factory. In order to improve the accuracy and controllability of automatic pH titration calibration, Xiao Zhang issued a titration calibration instruction and confirmed the titration calibration environment.
[0026] S2. The glass instrument to be calibrated is gripped in the electromechanical execution unit and dried using a pre-built drying device to obtain a dried glass instrument.
[0027] Furthermore, the step of gripping the glass instrument to be calibrated in the electromechanical actuator and drying the glass instrument to be calibrated using a pre-built drying device to obtain a dried glass instrument includes: Based on the visual sensing unit, the pose image of the glass instrument to be calibrated is detected to obtain the initial pose image set of the instrument. The initial pose image set of the instrument is then calculated to obtain the grasping coordinates and clamping angle. The electromechanical actuator, gripping coordinates, and clamping angle are used to grip the glass instrument to be calibrated, and the drying device receives the glass instrument to be calibrated. The drying device includes a drying chamber and an air outlet pipe. The following operations are performed on the glass instrument to be calibrated using the drying device: The glass instrument to be calibrated is dried using the drying oven and the preset drying temperature, and the humidity of the air outlet is collected using the preset humidity sensor to obtain the real-time humidity. The real-time humidity is compared with a preset humidity threshold. If the real-time humidity is less than the humidity threshold, the glass instrument to be calibrated is identified as a dry glass instrument.
[0028] It should be understood that the method for detecting the pose image of the glass instrument to be calibrated based on the visual sensing unit refers to the visual sensing unit acquiring images of the glass instrument to be calibrated from multiple angles. The initial pose image set of the instrument refers to a collection of images containing the spatial position and orientation of the glass instrument. The method for solving the initial pose image set of the instrument to obtain the grasping coordinates and clamping angle refers to using a pose estimation algorithm (such as the PnP algorithm based on feature point matching or the pose regression algorithm based on deep learning) to calculate the coordinate points suitable for the robotic arm equipped with the electromechanical actuator to grasp and the optimal clamping angle. The grasping coordinates refer to the target position coordinates that the robotic arm should reach, and the clamping angle refers to the angle when clamping the glass instrument. The method for clamping the glass instrument to be calibrated based on the electromechanical actuator, grasping coordinates, and clamping angle refers to the electromechanical actuator completing the grasping according to the calculated grasping coordinates and clamping angle. The electromechanical actuator refers to the functional module responsible for physical operation. Optionally, the electromechanical actuator can be constructed using a PLC (Programmable Logic Controller) and a robotic arm. The method of receiving the glass instrument to be calibrated based on the drying device refers to the robotic arm placing the gripped glass instrument into a drying chamber, where the drying chamber is a device for providing a dry hot air environment, and the air outlet duct is a channel for discharging humid and hot air. The method of drying the glass instrument to be calibrated based on the drying chamber and a preset drying temperature refers to the drying chamber controlling the temperature at a preset drying temperature and continuously heating and drying the glass instrument, where the preset drying temperature is a predetermined safe and effective drying temperature, such as 40 degrees Celsius. The method of collecting humidity data from the air outlet duct based on a preset humidity sensor refers to the humidity sensor monitoring the humidity value of the air inside the air outlet duct in real time, where the humidity sensor is a device for detecting humidity, such as a temperature and humidity transmitter, and the real-time humidity refers to the humidity of the air currently discharged from the air outlet. The method of comparing the real-time humidity with a preset humidity threshold, and confirming the glass instrument to be calibrated as a dry glass instrument if the real-time humidity is less than the humidity threshold, means that when the humidity of the discharged air is lower than the preset humidity threshold (e.g., 15%RH), it indicates that the moisture inside and on the surface of the glass instrument has been fully removed and the dryness standard has been met. The humidity threshold is the humidity threshold for judging whether the glass instrument is dry. The dry glass instrument refers to a glass container that has been confirmed as dry after being clamped and dried.
[0029] S3. Based on the visual sensing unit, the inner and outer contour features of the dry glass instrument are collected to obtain a multimodal dataset of the instrument contour. Based on the intelligent recognition unit, the multimodal dataset of the instrument contour is used to perform three-dimensional spatial modeling to obtain a three-dimensional model of the instrument. Based on the three-dimensional model of the instrument, the instrument specification parameters are identified.
[0030] It should be explained that the process of acquiring the inner and outer contour features of the dry glass instrument based on the visual sensing unit to obtain a multimodal dataset of the instrument contour includes: The electromechanical actuator drives the drying glass instrument to spin at a constant speed, and the visual sensing unit collects the inner and outer contours of the drying glass instrument to obtain the outer wall contour point cloud, the inner wall structure point cloud and the scale distribution image. By summarizing the point cloud of the outer wall contour, the point cloud of the inner wall structure, and the scale distribution image, a multimodal dataset of the instrument contour is obtained.
[0031] Furthermore, the method of driving the dry glass instrument to rotate at a constant speed based on the electromechanical actuator refers to the electromechanical actuator controlling the rotating platform (a platform capable of stably placing the dry glass instrument) to make the dry glass instrument rotate stably at a constant speed, ensuring that the visual sensing unit can completely acquire the surface information of the dry glass instrument. The method of acquiring the inner and outer contours of the dry glass instrument based on the visual sensing unit refers to the visual sensing unit acquiring the three-dimensional point cloud of the outer wall, the three-dimensional structure of the inner wall, and the surface scale image. The outer wall contour point cloud refers to the three-dimensional point cloud data of the outer surface of the dry glass instrument, the inner wall structure point cloud refers to the three-dimensional point cloud data of the internal cavity of the instrument, and the scale distribution image refers to a high-definition two-dimensional image of the instrument's scale lines. The visual sensing unit refers to a device used to acquire two-dimensional images and point cloud data of the glass instrument to be calibrated and the pH test sample. Optionally, the visual sensing unit can be constructed using a three-dimensional laser scanner and a high-resolution industrial camera. The instrument contour multimodal dataset refers to the data set of the outer wall contour point cloud, the inner wall structure point cloud, and the scale distribution image.
[0032] It should be understood that the process of performing three-dimensional spatial modeling of the instrument contour multimodal dataset based on the intelligent recognition unit to obtain a three-dimensional model of the instrument, and identifying the instrument specification parameters based on the three-dimensional model, includes: Outlier points are removed from the outer wall contour point cloud and the inner wall structure point cloud based on a pre-built statistical filtering algorithm to obtain optimized outer wall point cloud and optimized inner wall point cloud. Based on the intelligent recognition unit, the optimized outer wall point cloud and the optimized inner wall point cloud are transformed into a pre-constructed world coordinate system, and point cloud registration is performed on the optimized outer wall point cloud and the optimized inner wall point cloud to obtain a fused point cloud model. Based on the fused point cloud model and the scale distribution image, texture mapping is performed to obtain a three-dimensional model of the instrument. The actual liquid volume of the inner cavity is calculated based on the three-dimensional model of the instrument, and the actual liquid volume of the inner cavity is matched with a preset set of nominal volumes to obtain the instrument specifications, which include the instrument type, nominal volume and accuracy class.
[0033] It should be explained that the method of removing outliers from the outer wall contour point cloud and inner wall structure point cloud based on the pre-built statistical filtering algorithm refers to using a statistical filtering algorithm to remove outliers from the outer wall contour point cloud and inner wall structure point cloud. The statistical filtering algorithm is an algorithm used for outlier removal. Optionally, the SOR statistical filtering algorithm can be used as the statistical filtering algorithm. The optimized outer wall point cloud and optimized inner wall point cloud refer to the point cloud data after outlier removal. The method of transforming the optimized outer wall point cloud and optimized inner wall point cloud to the pre-built world coordinate system based on the intelligent recognition unit and performing point cloud registration on the optimized outer wall point cloud and optimized inner wall point cloud refers to transforming the point cloud from the local coordinate system to the unified world coordinate system, and then aligning it through the Iterative Closest Point (ICP) algorithm. The fused point cloud model refers to the complete three-dimensional point cloud model after the inner and outer wall point clouds are fused. The world coordinate system refers to a pre-constructed Cartesian reference system used to unify point cloud data collected by different sensors into the same spatial coordinate system. The method of obtaining the instrument's 3D model by texture mapping based on the fused point cloud model and the scale distribution image refers to mapping the scale distribution image as a texture map onto the surface of the fused point cloud model to form a textured, visualized 3D model. The instrument's 3D model refers to a complete digital model with geometric structure and surface texture. The method of calculating the actual liquid volume value of the inner cavity based on the instrument's 3D model and matching the actual liquid volume value of the inner cavity with a preset nominal volume set refers to calculating the inner cavity volume through the closed surface integral of the 3D model, and then matching it with a standard volume library to identify the instrument type, nominal volume, and accuracy level. The instrument specifications refer to relevant information of the drying and stripping instrument, including instrument type (e.g., burette, volumetric flask, etc.), nominal volume (e.g., 50mL, 100mL), and accuracy level (e.g., Grade A, Grade B, etc.).
[0034] S4. Add the pH test sample to the dry glass instrument, and obtain the initial liquid level height value and HSV hue reference value based on the pH test sample in the dry glass instrument. Calculate the HSV hue offset and dynamic color difference gradient value based on the visual sensing unit and the HSV hue reference value.
[0035] Furthermore, the step of obtaining the initial liquid level height value and HSV hue reference value based on the pH sample to be tested in the dried glass instrument includes: Based on the visual sensing unit, a panoramic image of the dry glass instrument is acquired to obtain the original image of the liquid level height; The original image of the liquid level height is converted to grayscale to obtain a preprocessed liquid level image; The preprocessed liquid surface image is subjected to edge detection based on a pre-built edge detection algorithm to obtain the curved edge of the liquid surface and the edge of the scale line, and the initial liquid surface height value is calculated based on the curved edge of the liquid surface and the edge of the scale line. The initial color original image is obtained by acquiring a static image of the PH sample to be tested based on the visual sensing unit. The initial color image is white-balance corrected to obtain an initial color image, and the HSV hue reference value is extracted based on the initial color image.
[0036] It should be understood that the method of adding the pH test sample to the dry glass instrument refers to injecting the pH test sample into the dry glass instrument. The method of acquiring a panoramic image of the dry glass instrument based on the visual sensing unit to obtain the original liquid level image refers to the visual sensing unit capturing a complete image containing the liquid level and scale from a suitable angle; the original liquid level image refers to a color image containing the liquid level position. The method of grayscale processing the original liquid level image refers to using a grayscale algorithm (e.g., a weighted average grayscale algorithm) to convert the color image into a single-channel grayscale image, highlighting edge information; the preprocessed liquid level image refers to the grayscale image. The method of performing edge detection on the preprocessed liquid level image based on a pre-constructed edge detection algorithm to obtain the liquid surface meniscus edge and scale line edge refers to using the Canny edge detection algorithm to extract the edge contours of the liquid surface meniscus and scale lines; the liquid surface meniscus edge refers to the edge line of the meniscus formed by the surface tension of the liquid, and the scale line edge refers to the edge line of the instrument's scale markings. The method for calculating the initial liquid level height based on the edge of the meniscus and the edge of the scale line refers to obtaining the actual height of the liquid level on the scale by converting pixel distance. For example, the conversion rule between pixel distance and actual distance is: 100 pixels equals 1 mm of actual physical distance. If the pixel distance between the lowest point of the meniscus and the 0 mL scale line is 35 pixels, then the actual height difference = (35 / 100) × 1 mm = 0.35 mm. The initial liquid level height value refers to the height reading of the solution level before titration begins. The method for acquiring a static image of the pH sample based on the visual sensing unit refers to taking a static picture of the solution. The initial color image refers to the solution image before titration. The method for performing white balance correction on the initial color image to obtain the initial color image refers to using an automatic white balance algorithm to eliminate the influence of the light source color temperature, making the color closer to reality. The initial color image refers to the corrected image. The method for extracting HSV hue reference values based on the initial color image refers to converting the image to the HSV color space and calculating the average hue value of all pixels in the hue channel within a preset reaction area (e.g., a rectangular region of interest of a fixed size below the liquid surface) as the HSV hue reference value. The HSV hue reference value refers to the average pixel value of the hue channel in the HSV color space of the initial steady-state image of the pH test sample.
[0037] It should be explained that the calculation of HSV hue shift and dynamic color difference gradient value based on the visual sensing unit and HSV hue reference value includes: The electromechanical actuator performs titration on the dry glass instrument, and the visual sensing unit performs image acquisition at a preset sampling frame rate to obtain a real-time color frame sequence, wherein the real-time color frame sequence includes multiple real-time color frames arranged in chronological order. Each real-time color frame in the real-time color frame sequence is converted to a color space to obtain a real-time HSV chromaticity feature vector sequence. Each real-time HSV chromaticity feature vector in the real-time HSV chromaticity feature vector sequence contains a hue channel mean, a saturation channel mean, and a lightness channel mean. The current hue value is obtained based on the real-time HSV hue feature vector sequence, and the HSV hue offset is calculated based on the current hue value and the HSV hue reference value. The sampling interval is calculated based on the sampling frame rate, and the dynamic color difference gradient value is calculated based on the real-time HSV chromaticity feature vector sequence and the sampling interval. The calculation formula is as follows: in, This represents the dynamic color difference gradient value at time t, where t represents time. Indicates the sampling interval. and Representing time t and time t respectively in the real-time HSV chromaticity feature vector sequence The mean value of the hue channel at that time. and Representing time t and time t respectively in the real-time HSV chromaticity feature vector sequence The average saturation channel value at time 1. and Representing time t and time t respectively in the real-time HSV chromaticity feature vector sequence The corresponding brightness channel mean.
[0038] Furthermore, the method of titrating the dry glass instrument based on the electromechanical actuator refers to adding a titrant to the glass instrument under the control of the electromechanical actuator. The titrant is a reagent used to react with the pH sample for acid-base neutralization and to determine the titration endpoint, such as phenolphthalein or methyl red. The method of obtaining a real-time color frame sequence by acquiring images at a preset sampling frame rate based on the visual sensing unit refers to the visual sensing unit continuously acquiring image frames at a preset sampling frame rate and arranging the image frames into a sequence according to chronological order. The real-time color frame sequence refers to the sequence of image frames acquired during the titration process at a fixed frame rate. The sampling frame rate refers to the number of image frames acquired by the visual sensing unit per unit time, for example, 1 frame every 2 seconds. The method for color space conversion of each real-time color frame in the real-time color frame sequence refers to converting each real-time color frame in the real-time color frame sequence into the HSV color space to obtain the hue (H), saturation (S), and lightness (V) components of each pixel, and calculating the statistical mean of the hue, saturation, and lightness channels of each frame within a preset reaction area (e.g., a rectangular region of interest of a fixed size below the liquid surface). The real-time HSV chromaticity feature vector sequence refers to a set of HSV feature vectors arranged in chronological order, and each real-time HSV chromaticity feature vector in the real-time HSV chromaticity feature vector sequence contains a hue channel mean, a saturation channel mean, and a lightness channel mean. The hue channel mean, saturation channel mean, and lightness channel mean refer to the arithmetic mean of the hue value, saturation value, and lightness value of all pixels within the preset reaction area in the corresponding image frame, respectively. The method for obtaining the current hue value based on the real-time HSV chromaticity feature vector sequence and calculating the HSV hue offset based on the current hue value and the HSV hue reference value refers to subtracting the HSV hue reference value from the average hue value of the current frame. The HSV hue offset refers to the degree of color shift during titration. The method for calculating the sampling interval based on the sampling frame rate refers to using the reciprocal of the sampling frame rate as the time interval between two adjacent frames, i.e., sampling interval = 1 / sampling frame rate. The method for calculating the dynamic color difference gradient value based on the real-time HSV chromaticity feature vector sequence and the sampling interval refers to calculating the sum of the squares of the average hue, average saturation, and average brightness values of two adjacent frames in three-dimensional HSV space, and dividing this distance by the sampling interval to obtain the dynamic color difference gradient value. The dynamic color difference gradient value is a parameter reflecting the severity of color change during titration and is used to control the titration speed and determine the endpoint.
[0039] S5. Titration is performed based on the initial liquid level height, HSV hue shift, and dynamic color difference gradient value, and data is collected to obtain the titration endpoint dataset, wherein the titration endpoint dataset includes the initial sample volume, total liquid mass, and ambient temperature.
[0040] It should be understood that the titration based on the initial liquid level height, HSV hue shift, and dynamic color difference gradient value, and the resulting titration endpoint dataset, includes: The initial sample volume is calculated based on the initial liquid level height and the instrument's three-dimensional model. Obtain the droplet pattern, wherein the droplet pattern is fast droplet, slow droplet, or micro-pulse droplet, and perform the following operations on the HSV hue shift, dynamic color difference gradient value, preset first threshold, and preset endpoint threshold: When the dynamic color difference gradient value is less than the first threshold, the dripping mode is switched to rapid dripping. When the dynamic color difference gradient value reaches the first threshold and the HSV hue offset is less than the endpoint threshold, the dropping mode is switched to slow dropping; when the HSV hue offset reaches the endpoint threshold, the dropping mode is switched to micro-pulse dropping. If the dropping mode is micro-pulse dropping, the offset change rate is calculated based on the HSV hue shift and the preset adjacent pulse interval. If the offset change rate is less than the preset change rate threshold, data is collected from the pH sample to be tested in the dry glass instrument to obtain the total liquid mass and ambient temperature. The initial sample volume, total liquid mass and ambient temperature are summarized to obtain the titration endpoint dataset.
[0041] It should be explained that the method of calculating the initial sample volume based on the initial liquid level and the instrument's three-dimensional model refers to using the instrument's three-dimensional model, combined with the initial liquid level, to obtain the volume of the solution before titration begins through geometric calculations. For example, assuming the instrument's three-dimensional model shows the glass instrument as cylindrical with a constant internal cross-sectional area of 2.5 cm². 2The initial page height is 8cm, and the initial sample volume can be calculated based on the cylinder volume calculation formula. The initial sample volume refers to the volume of the pH sample to be tested at the start of titration. The method for obtaining the dropping mode refers to selecting the dropping speed according to the current color change state. The dropping mode includes fast dropping (initial stage), slow dropping (near the endpoint), and micro-pulse dropping (precise dropping near the endpoint). The method for performing the following operations on the HSV hue shift, dynamic color difference gradient value, preset first threshold, and preset endpoint threshold refers to judging the relationship between the HSV hue shift and the endpoint threshold, and the dynamic color difference gradient value and the first threshold in real time, and switching the dropping mode to ensure titration efficiency and titration accuracy at the endpoint. The first threshold refers to the preset dynamic color difference gradient critical value, used to distinguish between the fast titration stage and the slow titration stage. The endpoint threshold refers to the preset HSV hue shift critical value, used to determine whether the titration endpoint is approached and trigger micro-pulse titration. The method of switching the dropping mode to fast dropping when the dynamic color difference gradient value is less than the first threshold refers to using a faster dropping rate in the initial stage when the color change is slow to improve efficiency (a magnetic stirrer is used for stirring here and in the subsequent titration process to promote reaction and uniform color distribution). The method of switching the dropping mode to slow dropping when the dynamic color difference gradient value reaches the first threshold and the HSV hue offset is less than the endpoint threshold refers to reducing the dropping rate to avoid over-dropping when the dynamic color difference gradient value first rises to the preset first threshold (indicating that the color has begun to change significantly, but has not yet approached the endpoint hue), and the current HSV hue offset is still less than the endpoint threshold (i.e., has not yet reached the range where the target hue is located). The method of switching the dropping mode to micro-pulse dropping when the HSV hue offset reaches the endpoint threshold refers to using micro-pulse dropping for high-precision dropping when approaching the titration endpoint. If the dropping mode is micro-pulse dropping, the method for calculating the rate of change of offset based on the HSV hue offset and the preset adjacent pulse interval (e.g., 0.25 seconds) refers to calculating the rate of hue change between adjacent pulses. The rate of change of offset refers to the dynamic rate of color change. For example, the adjacent pulse interval is 0.25 seconds, the rate of change threshold is 0.8° / second, the hue offset is 8.0° after the first pulse, 8.3° after the second pulse, and the calculated rate of change is 1.2° / second, which is greater than the threshold. Titration continues. After the third pulse, the hue offset is 8.4°, and the rate of change is 0.4° / second, which is less than the threshold. Therefore, the color is determined to be stable and the titration endpoint has been reached.If the rate of change of offset is less than a preset rate of change threshold, data is collected from the pH sample in the dry glass instrument to obtain the total mass of the liquid and the ambient temperature. This method involves collecting the total mass of the liquid and the ambient temperature using a precision balance and a temperature sensor when the color change stabilizes (reaching the endpoint). The total mass of the liquid refers to the total mass of the solution in the glass instrument at the end of the titration, and the ambient temperature refers to the ambient temperature surrounding the experiment. The titration endpoint dataset is the set of the initial sample volume, the total mass of the liquid, and the ambient temperature.
[0042] S6. Calculate the actual liquid volume based on the titration endpoint dataset, perform deviation analysis based on the actual liquid volume and the instrument specifications, obtain a metrological calibration evaluation report, automatically sort the glass instruments to be calibrated based on the metrological calibration evaluation report, obtain calibrated glass instruments, and realize automatic pH titration metrological calibration of the glass instruments to be calibrated and the pH test samples based on the calibrated glass instruments and the metrological calibration evaluation report.
[0043] Furthermore, the calculation of the actual liquid volume based on the titration endpoint dataset includes: Based on the ambient temperature, obtain the liquid density and air density at the current temperature. Based on the ambient temperature, total liquid mass, liquid density at current temperature, and air density at current temperature, the actual liquid volume is calculated using the following formula: in, Indicates the actual liquid volume. Indicates the total mass of the liquid. This indicates the liquid density at the current temperature. This indicates the current air density at the current temperature. This represents the coefficient of thermal expansion of glass. Indicates ambient temperature. Indicates the reference temperature.
[0044] It should be understood that the method for obtaining the current temperature liquid density and current temperature air density based on the ambient temperature refers to looking up the liquid density and air density at the corresponding temperature from a pre-constructed density lookup table based on the real-time measured ambient temperature. The density lookup table is a table containing the densities of corresponding substances at different temperatures, which can be obtained according to the IAPWS-IF97 standard or through pre-experiments. The current temperature liquid density refers to the density value of the pH test sample solution at the current temperature, and the current temperature air density refers to the density value of air at the current temperature. The method for calculating the actual liquid volume based on the ambient temperature, total liquid mass, current temperature liquid density, and current temperature air density refers to substituting into the above formula and considering the buoyancy of air and the thermal expansion of glass for correction. The coefficient of thermal expansion of glass is a coefficient used to correct for the influence of thermal expansion of glass, with units of 1 / °C; the actual liquid volume refers to the corrected liquid volume of the glass instrument.
[0045] Furthermore, the deviation analysis based on the actual liquid volume and the instrument specifications yields a metrological calibration evaluation report. Based on this report, the glass instruments to be calibrated are automatically sorted to obtain calibrated glass instruments, including: The volume error is calculated based on the nominal volume and the actual liquid volume. The maximum permissible error is obtained based on the accuracy level. If the volume error is less than the maximum permissible error, a pass / fail indicator is obtained and the pass / fail indicator is confirmed as pass / fail. If the volume error is greater than the maximum permissible error, the pass / fail indicator is confirmed as fail / fail. By integrating the initial sample volume, instrument type, nominal volume, actual liquid volume, volume error, and conformity mark, a metrological calibration evaluation report is obtained. If the qualification mark is qualified, the glass instrument to be calibrated is transferred to the preset qualified area based on the electromechanical execution unit to obtain a qualified instrument; If the conformity mark is unqualified, the glass instrument to be calibrated is transferred to the preset unqualified area based on the electromechanical execution unit, resulting in an unqualified instrument; The glassware is calibrated using either qualified or unqualified instruments.
[0046] It should be understood that the method for calculating volumetric error based on the nominal volume and actual liquid volume refers to first identifying the volume reading corresponding to the pH sample to be tested in the current container based on the nominal volume (this can be directly identified from the scale; if the instrument is full, the nominal volume is used directly), and then calculating: Volumetric error = |Actual liquid volume - Volume reading| / Volume reading × 100%. The volumetric error refers to the degree of deviation between the actual liquid volume of the instrument and the volume reading corresponding to the pH sample to be tested in the current container. The method for obtaining the maximum permissible error based on the accuracy class refers to querying the corresponding maximum permissible error value according to the instrument's accuracy class (A, B, etc.). For example, assuming the glass instrument to be calibrated is a 100mL volumetric flask with an accuracy class of A, the maximum permissible error for a 100mL A-class volumetric flask is 0.10%. The maximum permissible error refers to the maximum volumetric deviation allowed by the instrument at this accuracy class. The method of obtaining a pass / fail indicator and confirming the pass / fail indicator as passable if the volume error is less than the maximum permissible error means that the error is marked as passable when it is within the permissible range. The pass / fail indicator is a judgment label indicating passability or failure. The method of confirming the pass / fail indicator as failable if the volume error is greater than the maximum permissible error means that the error exceeds the limit and is marked as failable. The method of integrating the initial sample volume, instrument type, nominal volume, actual liquid volume, volume error, and pass / fail indicator to obtain a metrological calibration evaluation report means that all key parameters and judgment results are compiled into a text report. The metrological calibration evaluation report is a text report containing multiple information such as initial sample volume and instrument type. The method of transferring the glass instrument to be calibrated to a preset passable area based on the electromechanical execution unit if the pass / fail indicator is passable means that the robotic arm automatically places the passable instrument into the passable storage area. The passable instrument is a glass instrument that has passed calibration. The method of transferring the glass instrument to be calibrated to a preset non-compliance area based on the electromechanical execution unit if the conformity mark is non-conforming refers to transferring the non-conforming instrument to the non-conforming area. The conformity area and non-conforming area refer to areas used to classify instruments with different conformity marks. The non-conforming instrument refers to a glass instrument that has failed calibration. The calibrated glass instrument refers to a glass instrument that has completed calibration.
[0047] To address the problems described in the background art, this invention first confirms the receipt of a titration calibration command. Based on this command, it confirms the titration calibration environment, which includes a titration calibration system, a glass instrument to be calibrated, and a pH sample. The titration calibration system comprises a visual sensing unit, an intelligent recognition unit, and an electromechanical execution unit. This invention integrates visual acquisition, recognition modeling, and mechanical operation, enabling the glass instrument's size calibration, titration process monitoring, and final sorting to be completed within the same system. The electromechanical execution unit grips the glass instrument to be calibrated and uses a pre-built drying device to dry it, resulting in a dried glass instrument. This invention removes residual water film from the inner wall before calibrating the instrument's specifications, preventing residual liquid from altering the actual volume of the instrument's internal cavity and interfering with the accuracy of subsequent 3D modeling. Based on the visual sensing unit, the internal and external contour features of the dried glass instrument are collected to obtain a multimodal dataset of the instrument contour. The intelligent recognition unit then performs three-dimensional spatial modeling on this dataset to obtain a three-dimensional model of the instrument. Based on this three-dimensional model, the instrument's specifications are identified. This invention, by collecting the internal and external contour data of the glass instrument for three-dimensional modeling, directly extracts specifications such as inner diameter and wall thickness from the model, replacing manual reading of nominal values one by one, and reducing measurement starting point errors caused by individual manufacturing deviations of the instrument. The pH sample to be tested is added to the dried glass instrument, and the initial liquid level height and HSV hue reference value are obtained based on the pH sample in the dried glass instrument. Based on the visual sensing unit and the HSV hue reference value, the HSV hue shift and dynamic color difference gradient value are calculated. This invention records the initial liquid level height and HSV hue reference value of the sample before titration begins through the visual sensing unit, and continuously calculates the hue shift and dynamic color difference gradient value during titration. Using the rate of color change as the endpoint prediction criterion, it is better able to handle situations where the initial color of the sample is inconsistent than single-frame hue comparison. Titration is performed and data is collected based on the initial liquid level height, HSV hue shift, and dynamic color difference gradient value to obtain a titration endpoint dataset. The titration endpoint dataset includes the initial sample volume, total liquid mass, and ambient temperature. It can be seen that the present invention collects three data points—initial sample volume, total liquid mass, and ambient temperature—when determining the titration endpoint, providing input conditions for temperature and density correction during subsequent volume conversion.The actual liquid volume is calculated based on the titration endpoint dataset. Deviation analysis is performed based on the actual liquid volume and the instrument specifications to obtain a metrological calibration evaluation report. The glass instruments to be calibrated are then automatically sorted based on the metrological calibration evaluation report to obtain calibrated glass instruments. Based on the calibrated glass instruments and the metrological calibration evaluation report, automatic pH titration calibration of the glass instruments to be calibrated and the pH test samples is achieved. It is evident that this invention uses actual liquid volume and instrument specifications for deviation analysis, and performs automatic sorting based on the evaluation report, eliminating unqualified instruments. This directly links the calibration conclusion to the final sorting action, reducing manual judgment. Therefore, this invention can improve the accuracy and efficiency of automatic pH titration calibration.
[0048] like Figure 2 The diagram shown is a functional block diagram of a vision-based automatic pH titration calibration system provided in an embodiment of the present invention.
[0049] The vision-based automatic pH titration calibration system 100 described in this invention can be installed in an electronic device. Depending on the functions implemented, the vision-based automatic pH titration calibration system 100 may include an environmental verification module 101, a 3D modeling module 102, a titration sensing module 103, and a calibration sorting module 104. The module described in this invention can also be called a unit, referring to a series of computer program segments that can be executed by the processor of an electronic device and perform a fixed function, stored in the memory of the electronic device.
[0050] The environment verification module 101 is used to verify the receipt of the titration calibration command and verify the titration calibration environment based on the titration calibration command. The titration calibration environment includes a titration calibration system, a glass instrument to be calibrated, and a pH sample to be tested. The titration calibration system includes a visual sensing unit, an intelligent recognition unit, and an electromechanical execution unit. The three-dimensional modeling module 102 is used to grip the glass instrument to be calibrated in the electromechanical execution unit and dry the glass instrument to be calibrated in a pre-built drying device to obtain a dried glass instrument. Based on the visual sensing unit, the inner and outer contour features of the dry glass instrument are collected to obtain a multimodal dataset of the instrument contour. Based on the intelligent recognition unit, the multimodal dataset of the instrument contour is used to perform three-dimensional spatial modeling to obtain a three-dimensional model of the instrument. Based on the three-dimensional model of the instrument, the instrument specification parameters are identified. The titration sensing module 103 is used to add the pH test sample into the dry glass instrument, and obtain the initial liquid level height value and HSV hue reference value based on the pH test sample in the dry glass instrument, and calculate the HSV hue offset and dynamic color difference gradient value based on the visual sensing unit and the HSV hue reference value. Titration is performed and data is collected based on the initial liquid level height, HSV hue shift and dynamic color difference gradient value to obtain a titration endpoint dataset, wherein the titration endpoint dataset includes the initial sample volume, total liquid mass and ambient temperature. The calibration and sorting module 104 is used to calculate the actual liquid volume based on the titration endpoint dataset, perform deviation analysis based on the actual liquid volume and the instrument specifications, obtain a metrological calibration evaluation report, automatically sort the glass instruments to be calibrated based on the metrological calibration evaluation report, obtain calibrated glass instruments, and realize automatic pH titration metrological calibration of the glass instruments to be calibrated and the pH test samples based on the calibrated glass instruments and the metrological calibration evaluation report.
[0051] In detail, the modules in the vision-based automatic pH titration calibration system 100 described in this embodiment of the invention employ the same methods as described above during use. Figure 1 The method uses the same technical means as the visual perception-based automatic pH titration calibration method described above and can produce the same technical effect, so it will not be repeated here.
[0052] like Figure 3 The diagram shown is a structural schematic of an electronic device for implementing a vision-based automatic pH titration calibration method according to an embodiment of the present invention.
[0053] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a visual perception-based automatic pH titration calibration method program.
[0054] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as the portable hard drive of the electronic device 1. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 1. Furthermore, the memory 11 includes both internal storage units and external storage devices of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of a visual perception-based automatic pH titration calibration method program, but also to temporarily store data that has been output or will be output.
[0055] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device via various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., a visual perception-based automatic pH titration calibration method program) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.
[0056] The bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize the connection and communication between the memory 11 and at least one processor 10, etc.
[0057] Figure 3 Only electronic devices with components are shown; those skilled in the art will understand that... Figure 3The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0058] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0059] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.
[0060] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.
[0061] The visual perception-based automatic pH titration calibration method program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When run in the processor 10, it can achieve the following: The titration calibration command is confirmed upon receipt. Based on the titration calibration command, the titration calibration environment is confirmed. The titration calibration environment includes a titration calibration system, a glass instrument to be calibrated, and a pH sample to be tested. The titration calibration system includes a visual sensing unit, an intelligent recognition unit, and an electromechanical execution unit. The electromechanical actuator grips the glass instrument to be calibrated and dries it using a pre-built drying device to obtain a dried glass instrument. Based on the visual sensing unit, the inner and outer contour features of the dry glass instrument are collected to obtain a multimodal dataset of the instrument contour. Based on the intelligent recognition unit, the multimodal dataset of the instrument contour is used to perform three-dimensional spatial modeling to obtain a three-dimensional model of the instrument. Based on the three-dimensional model of the instrument, the instrument specification parameters are identified. The pH test sample is added to the dry glass instrument, and the initial liquid level height value and HSV hue reference value are obtained based on the pH test sample in the dry glass instrument. The HSV hue offset and dynamic color difference gradient value are calculated based on the visual sensing unit and the HSV hue reference value. Titration is performed and data is collected based on the initial liquid level height, HSV hue shift and dynamic color difference gradient value to obtain a titration endpoint dataset, wherein the titration endpoint dataset includes the initial sample volume, total liquid mass and ambient temperature. The actual liquid volume is calculated based on the titration endpoint dataset. Deviation analysis is performed based on the actual liquid volume and the instrument specifications to obtain a metrological calibration evaluation report. The glass instruments to be calibrated are automatically sorted based on the metrological calibration evaluation report to obtain calibrated glass instruments. Based on the calibrated glass instruments and the metrological calibration evaluation report, automatic pH titration metrological calibration of the glass instruments to be calibrated and the pH test samples is realized.
[0062] Specifically, the processor 10's implementation method for the above instructions can be found in [reference needed]. Figures 1 to 3 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.
[0063] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0064] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following: The titration calibration command is confirmed upon receipt. Based on the titration calibration command, the titration calibration environment is confirmed. The titration calibration environment includes a titration calibration system, a glass instrument to be calibrated, and a pH sample to be tested. The titration calibration system includes a visual sensing unit, an intelligent recognition unit, and an electromechanical execution unit. The electromechanical actuator grips the glass instrument to be calibrated and dries it using a pre-built drying device to obtain a dried glass instrument. Based on the visual sensing unit, the inner and outer contour features of the dry glass instrument are collected to obtain a multimodal dataset of the instrument contour. Based on the intelligent recognition unit, the multimodal dataset of the instrument contour is used to perform three-dimensional spatial modeling to obtain a three-dimensional model of the instrument. Based on the three-dimensional model of the instrument, the instrument specification parameters are identified. The pH test sample is added to the dry glass instrument, and the initial liquid level height value and HSV hue reference value are obtained based on the pH test sample in the dry glass instrument. The HSV hue offset and dynamic color difference gradient value are calculated based on the visual sensing unit and the HSV hue reference value. Titration is performed and data is collected based on the initial liquid level height, HSV hue shift and dynamic color difference gradient value to obtain a titration endpoint dataset, wherein the titration endpoint dataset includes the initial sample volume, total liquid mass and ambient temperature. The actual liquid volume is calculated based on the titration endpoint dataset. Deviation analysis is performed based on the actual liquid volume and the instrument specifications to obtain a metrological calibration evaluation report. The glass instruments to be calibrated are automatically sorted based on the metrological calibration evaluation report to obtain calibrated glass instruments. Based on the calibrated glass instruments and the metrological calibration evaluation report, automatic pH titration metrological calibration of the glass instruments to be calibrated and the pH test samples is realized.
[0065] In the embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and actual implementations may have other classification methods.
[0066] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0067] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0068] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A visual perception-based automatic pH titration calibration method, characterized in that, The method includes: Confirm receipt of the titration calibration instruction, and confirm the titration calibration environment based on the titration calibration instruction; The glass instrument to be calibrated is dried using a drying device to obtain a dried glass instrument. The internal and external contour features of the dry glass instrument are collected based on the visual sensing unit to obtain a multimodal dataset of the instrument contour. The instrument contour multimodal dataset is then used to perform three-dimensional spatial modeling based on the intelligent recognition unit to obtain a three-dimensional model of the instrument. The instrument specification parameters are then identified based on the three-dimensional model of the instrument. The pH sample to be tested is added to the dry glass instrument, and the initial liquid level height value and HSV hue reference value are obtained based on the pH sample to be tested in the dry glass instrument. The HSV hue offset and dynamic color difference gradient value are calculated based on the image acquired by the visual sensing unit and the HSV hue reference value. Based on the initial liquid level height, HSV hue shift, and dynamic color difference gradient, titration is performed using different titration modes and data is collected to obtain a titration endpoint dataset, wherein the titration endpoint dataset includes the initial sample volume, total liquid mass, and ambient temperature. The actual liquid volume is calculated based on the titration endpoint dataset. Deviation analysis is performed based on the actual liquid volume and the instrument specifications to obtain a metrological calibration evaluation report. The glass instruments to be calibrated are automatically sorted based on the metrological calibration evaluation report to obtain calibrated glass instruments.
2. The visual perception-based automatic pH titration calibration method as described in claim 1, characterized in that, The drying device includes a drying chamber and an air outlet pipe; The drying process, based on the drying device, involves drying the glass instrument to be calibrated to obtain a dried glass instrument, including: The glass instrument to be calibrated is dried using a drying oven and a preset drying temperature, and the humidity of the air outlet is collected using a humidity sensor to obtain the real-time humidity. The real-time humidity is compared with a preset humidity threshold. If the real-time humidity is less than the humidity threshold, the glass instrument to be calibrated is identified as a dry glass instrument.
3. The visual perception-based automatic pH titration calibration method as described in claim 2, characterized in that, The process of acquiring the inner and outer contour features of the dried glass instrument based on the visual sensing unit to obtain a multimodal dataset of the instrument contour includes: The electromechanical actuator drives the drying glass instrument to spin at a constant speed, and the visual sensing unit collects the inner and outer contours of the drying glass instrument to obtain the outer wall contour point cloud, the inner wall structure point cloud and the scale distribution image. By summarizing the point cloud of the outer wall contour, the point cloud of the inner wall structure, and the scale distribution image, a multimodal dataset of the instrument contour is obtained.
4. The visual perception-based automatic pH titration calibration method as described in claim 3, characterized in that, The process involves performing three-dimensional spatial modeling on the instrument contour multimodal dataset based on the intelligent recognition unit to obtain a three-dimensional model of the instrument, and identifying instrument specification parameters based on the three-dimensional model, including: Outlier points are removed from the outer wall contour point cloud and the inner wall structure point cloud based on a statistical filtering algorithm to obtain optimized outer wall point cloud and optimized inner wall point cloud. Based on the intelligent recognition unit, the optimized outer wall point cloud and the optimized inner wall point cloud are transformed to the world coordinate system, and point cloud registration is performed on the optimized outer wall point cloud and the optimized inner wall point cloud to obtain a fused point cloud model. Based on the fused point cloud model and the scale distribution image, texture mapping is performed to obtain a three-dimensional model of the instrument. The actual liquid volume of the inner cavity is calculated based on the three-dimensional model of the instrument, and the actual liquid volume of the inner cavity is matched with a preset set of nominal volumes to obtain the instrument specifications, which include the instrument type, nominal volume and accuracy class.
5. The visual perception-based automatic pH titration calibration method as described in claim 4, characterized in that, The process of obtaining the initial liquid level height value and HSV hue reference value based on the pH sample in the dried glass instrument includes: Based on the visual sensing unit, a panoramic image of the dry glass instrument is acquired to obtain the original image of the liquid level height; The original image of the liquid level height is converted to grayscale to obtain a preprocessed liquid level image; Edge detection is performed on the preprocessed liquid surface image based on the edge detection algorithm to obtain the curved edge of the liquid surface and the edge of the scale line, and the initial liquid surface height value is calculated based on the curved edge of the liquid surface and the edge of the scale line. The initial color original image is obtained by acquiring a static image of the PH sample to be tested based on the visual sensing unit. The initial color image is white-balance corrected to obtain an initial color image, and the HSV hue reference value is extracted based on the initial color image.
6. The visual perception-based automatic pH titration calibration method as described in claim 5, characterized in that, The calculation of HSV hue shift and dynamic color difference gradient value based on the image acquired by the visual sensing unit and the HSV hue reference value includes: The electromechanical actuator performs titration on the dry glass instrument, and the visual sensing unit performs image acquisition at a preset sampling frame rate to obtain a real-time color frame sequence, wherein the real-time color frame sequence includes multiple real-time color frames arranged in chronological order. Each real-time color frame in the real-time color frame sequence is converted to a color space to obtain a real-time HSV chromaticity feature vector sequence. Each real-time HSV chromaticity feature vector in the real-time HSV chromaticity feature vector sequence contains a hue channel mean, a saturation channel mean, and a lightness channel mean. The current hue value is obtained based on the real-time HSV hue feature vector sequence, and the HSV hue offset is calculated based on the current hue value and the HSV hue reference value. The sampling interval is calculated based on the sampling frame rate, and the dynamic color difference gradient value is calculated based on the real-time HSV chromaticity feature vector sequence and the sampling interval. The calculation formula is as follows: in, This represents the dynamic color difference gradient value at time t, where t represents time. Indicates the sampling interval. and Representing time t and time t respectively in the real-time HSV chromaticity feature vector sequence The mean value of the hue channel at that time. and Representing time t and time t respectively in the real-time HSV chromaticity feature vector sequence The average saturation channel value at time 1. and Representing time t and time t respectively in the real-time HSV chromaticity feature vector sequence The corresponding brightness channel mean.
7. The visual perception-based automatic pH titration calibration method as described in claim 6, characterized in that, The titration is performed using different titration modes based on the initial liquid level height, HSV hue shift, and dynamic color difference gradient value, and data is collected to obtain a titration endpoint dataset, including: The initial sample volume is calculated based on the initial liquid level height and the instrument's three-dimensional model. Obtain the droplet pattern, wherein the droplet pattern is fast droplet, slow droplet, or micro-pulse droplet, and perform the following operations on the HSV hue shift, dynamic color difference gradient value, preset first threshold, and preset endpoint threshold: When the dynamic color difference gradient value is less than the first threshold, the dripping mode is switched to rapid dripping. When the dynamic color difference gradient value reaches the first threshold and the HSV hue offset is less than the endpoint threshold, the dropping mode is switched to slow dropping; when the HSV hue offset reaches the endpoint threshold, the dropping mode is switched to micro-pulse dropping. If the dropping mode is micro-pulse dropping, the offset change rate is calculated based on the HSV hue shift and the preset adjacent pulse interval. If the offset change rate is less than the preset change rate threshold, data is collected from the pH sample to be tested in the dry glass instrument to obtain the total liquid mass and ambient temperature. The initial sample volume, total liquid mass and ambient temperature are summarized to obtain the titration endpoint dataset.
8. The visual perception-based automatic pH titration calibration method as described in claim 7, characterized in that, The calculation of the actual liquid volume based on the titration endpoint dataset includes: Based on the ambient temperature, obtain the liquid density and air density at the current temperature. Based on the ambient temperature, total liquid mass, liquid density at current temperature, and air density at current temperature, the actual liquid volume is calculated using the following formula: in, Indicates the actual liquid volume. Indicates the total mass of the liquid. This indicates the liquid density at the current temperature. This indicates the current air density at the current temperature. This represents the coefficient of thermal expansion of glass. Indicates ambient temperature. Indicates the reference temperature.
9. The automatic pH titration calibration method based on visual perception as described in claim 8, characterized in that, The process involves deviation analysis based on the actual liquid volume and the instrument specifications to obtain a metrological calibration evaluation report. Based on this report, the glass instruments to be calibrated are automatically sorted to obtain calibrated glass instruments, including: The volume error is calculated based on the nominal volume and the actual liquid volume. The maximum permissible error is obtained based on the accuracy level. If the volume error is less than the maximum permissible error, a pass / fail indicator is obtained and the pass / fail indicator is confirmed as pass / fail. If the volume error is greater than the maximum permissible error, the pass / fail indicator is confirmed as fail / fail. By integrating the initial sample volume, instrument type, nominal volume, actual liquid volume, volume error, and conformity mark, a metrological calibration evaluation report is obtained. If the qualification mark is qualified, the glass instrument to be calibrated is transferred to the preset qualified area based on the electromechanical execution unit to obtain a qualified instrument; If the conformity mark is unqualified, the glass instrument to be calibrated is transferred to the preset unqualified area based on the electromechanical execution unit, resulting in an unqualified instrument; The glassware is calibrated using either qualified or unqualified instruments.
10. A visual perception-based automatic pH titration calibration system, characterized in that, The system includes: The environment verification module is used to verify the receipt of the titration calibration command and to verify the titration calibration environment based on the titration calibration command. The 3D modeling module is used to dry the glass instrument to be calibrated based on the drying device, so as to obtain a dried glass instrument. The internal and external contour features of the dry glass instrument are collected based on the visual sensing unit to obtain a multimodal dataset of the instrument contour. The instrument contour multimodal dataset is then used to perform three-dimensional spatial modeling based on the intelligent recognition unit to obtain a three-dimensional model of the instrument. The instrument specification parameters are then identified based on the three-dimensional model of the instrument. The titration sensing module is used to add the pH test sample into the dry glass instrument, and obtain the initial liquid level height value and HSV hue reference value based on the pH test sample in the dry glass instrument. Based on the image acquired by the visual sensing unit and the HSV hue reference value, the module calculates the HSV hue offset and dynamic color difference gradient value. Based on the initial liquid level height, HSV hue shift, and dynamic color difference gradient, titration is performed using different titration modes and data is collected to obtain a titration endpoint dataset, wherein the titration endpoint dataset includes the initial sample volume, total liquid mass, and ambient temperature. The calibration and sorting module is used to calculate the actual liquid volume based on the titration endpoint dataset, perform deviation analysis based on the actual liquid volume and the instrument specifications, obtain a metrological calibration evaluation report, and automatically sort the glass instruments to be calibrated based on the metrological calibration evaluation report to obtain calibrated glass instruments.