An automatic recognition method and system for the titration end point of permanganate
By monitoring the color changes of the liquid to be tested during the titration process in real time, combining image processing technology and machine learning algorithms, using the KNN model and the GMM model to work together, extract the images of the color change area, calculate the area and average chromaticity of the color change area, and determine the titration end point, the problem of insufficient accuracy of the traditional titration method is solved and higher accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510396806.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-04-01
AI Technical Summary
Traditional titration methods rely on naked eye observation or simple color sensors, and are susceptible to interference from subtle factors of ambient light and color changes, affecting the accuracy of the detection results.
By monitoring the color changes of the liquid to be tested during the titration process in real time, combining image processing technology and machine learning algorithms, the KNN model and the GMM model work together, extract the image of the color change area, calculate the area and average chromaticity of the color change area, and determine the titration end point.
It realizes more accurate identification of the titration endpoint, avoids the possible errors caused by naked eye observation and simple color sensors, and improves the accuracy and reliability of the titration experiment.
Smart Images

Figure CN119904653B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of titration reactions, and particularly to an automatic recognition method and system for the end point of permanganate titration. Background Art
[0002] As a classic quantitative analysis method, titration is widely used in water quality detection to determine key parameters such as the acidity, hardness, chloride ion content, dissolved oxygen, and organic matter content in water samples. Through these detections, the quality status of water bodies can be accurately evaluated to ensure the safety and compliance of water bodies. For example, the acidity (pH) reflects the chemical properties of water bodies, hardness affects the quality of industrial and domestic water, and chloride ions and dissolved oxygen are used to judge the quality of drinking water and sewage.
[0003] During the titration experiment, the change in color is an important basis for judging the progress of the titration reaction and determining the end point. Potassium permanganate (KMnO4) is often used as a titrant in redox titration. When its dark purple solution is added to the reducing analyte solution, it will quickly react with the reducing agent in it, causing the color of KMnO4 to quickly fade and the solution to become colorless. Only when approaching the end point of the titration, the reducing substances in the solution are nearly exhausted, and the purple color of KMnO4 will begin to appear and gradually deepen until the reaction completely stops and the color of the solution remains a stable light purple, indicating that the titration reaction has reached the end point.
[0004] Most traditional titration methods rely on visual observation or simple color sensors to judge color changes to infer whether the reaction has reached the equivalence point or the end point of the titration. These methods are easily affected by factors such as ambient light and subtle color changes, affecting the accuracy of the detection results. Summary of the Invention
[0005] The purpose of the present invention is to provide an automatic recognition method for the end point of permanganate titration. By real-time monitoring the color change of the analyte solution during the titration process and combining image processing technology and machine learning algorithms, the end point of the titration can be more accurately recognized, thus avoiding the errors that may be brought by visual observation or simple color sensors.
[0006] The technical solution adopted by the present invention to solve its technical problems is: to provide an automatic recognition method for the end point of permanganate titration, including the following steps:
[0007] S1. Real-time collect the video stream of the titration experiment and frame the video stream to obtain image data;
[0008] S2. Preprocess the image data;
[0009] S3. Use the KNN model to preliminarily detect and classify the color change of the preprocessed image;
[0010] S4. Eliminate background noise through the collaborative work of KNN and the Gaussian mixture model, and extract the image of the color change area;
[0011] S5. Conduct feature analysis on the image of the color change area; analyze and calculate the area and average chromaticity of the color change area;
[0012] S6. Determine the titration end point according to the above analysis results, and stop the titration process when the predetermined conditions are met.
[0013] Further, S2 includes:
[0014] Convert each frame of image from the RGB color space to the Lab color space;
[0015] Denoise and smooth the L channel in the Lab color space using Gaussian filtering, and the formula is:
[0016] ;
[0017] Apply contrast-limited adaptive histogram equalization to adjust the brightness distribution, and the formula is:
[0018] ;
[0019] Through the hierarchical image algorithm, conduct hierarchical processing on the L channel, including: smoothing the background layer using Gaussian filtering, compressing and smoothing the exposure area of the background layer, and the formula is:
[0020] ;
[0021] Extract the edge information of the image detail layer through the edge detection algorithm, and the formula is:
[0022] ;
[0023] Sobel x and Sobel y respectively represent the gradient values of the image in the horizontal direction (x-axis) and the vertical direction (y-axis), which are calculated through the Sobel operator; is the core parameter of edge detection and is used to measure the intensity of the brightness change of the image in the horizontal and vertical directions. and are respectively the partial derivatives of the brightness function L(x, y) in the x direction and the y direction, that is, the local brightness change rate of the image in the horizontal and vertical directions. The derivative is calculated through the Sobel convolution kernel and reflects the intensity of the image edge (the larger the gradient, the more obvious the edge).
[0024] Enhance the details using a sharpening filter, and the formula is:
[0025] ;
[0026] Re - synthesize the processed luminance layer, combine the background layer and the detail layer to generate a re - synthesized L channel;
[0027] Merge the re - synthesized L channel with the original a and b channels to obtain the processed Lab image;
[0028] Convert the processed Lab image back to the RGB color space;
[0029] Among them, is the size of the filtering window, ( i , j ) is the offset relative to the current pixel, i is the horizontal offset, and both are vertical offsets; k represents the radius of the Gaussian kernel, that is, the range where the convolution kernel expands from the central pixel to the surrounding; k controls the spatial range of the Gaussian filter, directly affecting the size and smoothness of the filter; and are respectively the minimum and maximum values of the pixel values in the original luminance image, is the standard deviation of the Gaussian distribution, is the original image, is the denoised luminance image, is the image after contrast - limited adaptive histogram equalization, is the smoothed luminance image, is the image after detail enhancement, is the coefficient controlling detail enhancement.
[0030] Furthermore, S3 includes:
[0031] Collect each frame of image in real - time during the titration process;
[0032] Extract the chromaticity information of each frame of image as a feature vector;
[0033] Compare the feature vector of the current frame image with the feature vectors in the known sample set. By calculating the Euclidean distance between the two, classify the current frame into a colorless state, a color - gradient state, or a titration - endpoint state;
[0034] Calculate the distances between the feature vector of the current frame image and all the labeled samples, and select the K nearest neighbors;
[0035] According to the color - change categories of the K neighbors, determine the final classification result of the current frame image by means of majority voting.
[0036] Furthermore, the Euclidean - distance calculation formula is:
[0037] ;
[0038] Among them, is the Euclidean distance between the current frame image and the sample feature; n represents the dimension of the feature vector, that is, the total number of features; i is an index variable used to traverse each component in the feature vector; is the weight coefficient of different features; and are respectively the th component in the feature vector.
[0039] Furthermore, S4 includes:
[0040] In the colorless state stage of titration, continuously monitor each frame of image through the KNN algorithm and classify it as the colorless state;
[0041] Use the GMM model to extract the noise of each frame of image and separate the foreground and background information;
[0042] Process multiple frames of images, and superimpose the noise of each frame of image to generate a comprehensive noise image;
[0043] In the color gradient and titration endpoint stage, use the GMM model to process each frame of image, delete the noise extracted in the colorless state stage, and extract the color change area.
[0044] Furthermore, the formula for using the GMM model to extract the noise of each frame of image and separate the foreground and background information is:
[0045] ;
[0046] Among them, represents the probability that a pixel point belongs to the foreground or background; represents the number of Gaussian components in the Gaussian mixture model; i is an index variable; is the weight of each Gaussian component; and are respectively the mean and covariance matrix of the Gaussian component; represents a Gaussian distribution with mean and covariance matrix as parameters.
[0047] Furthermore, S5 includes:
[0048] Calculate the area S and average chromaticity C of the color change area;
[0049] The calculation formula for the area S of the color change area is:
[0050] ;
[0051] The calculation formula for the average chromaticity C is:
[0052] ;
[0053] Among them, is the pixel set of the extracted color change region, is the value of each pixel in this region, represents the chromaticity value of each pixel in the color change region.
[0054] Furthermore, for S6 to determine the titration end point, the following conditions need to be satisfied simultaneously:
[0055] a) The KNN algorithm determines that the current frame is in the titration end point state;
[0056] b) The change in the area S of the color change region per unit time is less than the set threshold for area change;
[0057] c) The change in the average chromaticity C per unit time is less than the set threshold for chromaticity change.
[0058] There is also provided an automatic recognition system for the permanganate titration end point, which is characterized by including:
[0059] A camera, used to collect the video stream of the solution to be measured in real time during the titration process and transmit the video data to the image processing module;
[0060] An image processing module, used to preprocess each frame of image converted from the RGB color space to the Lab color space;
[0061] A KNN classification module, used to perform dynamic color monitoring by calculating the Euclidean distance between the feature vector of the current frame image and the feature vector of the known sample, and classify the current frame into a colorless state, a color gradient state, or a titration end point state;
[0062] A GMM analysis module, used to extract the noise part of each frame of image in the colorless stage of the titration, and continue to process and remove the previously extracted colorless noise in the color gradient and titration end point stages, so as to improve the accuracy of color change detection;
[0063] A feature analysis module, used to calculate the changes in the area S and the average chromaticity C of the color change region as important indicators for judging the titration end point;
[0064] An end point determination module, used to determine the titration end point according to the stability of the area S and the average chromaticity C of the color change region, and stop the titration process when the predetermined conditions are met;
[0065] A control module, used to control the entire titration experiment process and automatically stop the experiment operation when the titration end point is reached;
[0066] A display module for enabling experimenters to observe the processed images and prompt information in real time.
[0067] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0068] 1. By monitoring the color change of the solution to be measured in real time during the titration process and combining image processing technology and machine learning algorithms, the present invention can more accurately identify the titration end point, thus avoiding errors that may be caused by visual observation or simple color sensors.
[0069] 2. Compared with traditional color recognition methods, the present invention can capture more subtle color changes, which makes the judgment of the reaction process more accurate and helps to improve the accuracy and reliability of the titration experiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 is a flowchart of an automatic recognition method for the end point of permanganate titration in Embodiment 1 of the present invention;
[0071] Figure 2 is the effect diagram after S1 image preprocessing of an automatic recognition method for the end point of permanganate titration in Embodiment 1 of the present invention;
[0072] Figure 3 is a diagram showing three states during the titration process classified by the KNN algorithm of an automatic recognition method for the end point of permanganate titration in Embodiment 1 of the present invention;
[0073] Figure 4 is the effect diagram of extracting the noise part of the image using the GMM model of an automatic recognition method for the end point of permanganate titration in Embodiment 1 of the present invention;
[0074] Figure 5 is the foreground image, noise image and denoised effect diagram after processing using the GMM model of an automatic recognition method for the end point of permanganate titration in Embodiment 1 of the present invention;
[0075] Figure 6 is a schematic structural diagram of an automatic recognition system for the end point of permanganate titration in Embodiment 2 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0076] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention. Embodiment
[0077] AsFigure 1 As shown in Figure 1 , S1: Real-time collect the video stream of the titration experiment, and frame the video stream to obtain image data;
[0078] Input the video stream of the titration experiment collected in real time by the camera into the computer, and frame the video to obtain image data.
[0079] S2: Preprocess the image data to reduce the exposure interference caused by the cold light source and the reflection of the white background;
[0080] First, convert each frame of the image from the RGB color space to the Lab color space. In the Lab space, use Gaussian filtering to denoise the L channel to smooth the noise in the image, as shown in formula (2-1). For the area with uneven brightness, use contrast-limited adaptive histogram equalization to adjust the brightness distribution, enhance the local contrast of the image, improve the uneven brightness phenomenon, effectively reduce overexposure, and balance the overall brightness, as shown in formula (2-2). Then, through the hierarchical image algorithm, the L channel is stratified. Use Gaussian filtering to smooth the background layer to ensure that the exposed area of the background layer is compressed and smoothed, as shown in formula (2-3). For the detail layer, extract the edge information of the image through the edge detection algorithm, and then use the sharpening filter to enhance the details. The Sobel algorithm is used to detect the area with obvious brightness changes without affecting the color part, and finally generate a detail-enhanced image. As shown in formulas (2-4) and (2-5).
[0081] (2-1);
[0082] (2-2);
[0083] (2-3);
[0084] (2-4);
[0085] (2-5);
[0086] Among them, is the size of the filtering window, ( i , j ) is the offset relative to the current pixel, and are respectively the minimum and maximum values of the pixel values in the original luminance image, is the standard deviation of the Gaussian distribution, is the original image, is the denoised luminance image, is the image after contrast-limited adaptive histogram equalization, is the smoothed luminance image, is the image after detail enhancement, is the coefficient for controlling detail enhancement.
[0087] The processed luminance layer is recombined, combined with the background layer and the detail layer, to generate the final L channel. Then this L channel is merged with the original a and b channels to obtain a Lab image with uniform exposure and clear details. Finally, the Lab image is converted back to the RGB space, which not only maintains the brightness consistency of the image but also preserves the color integrity. The effect diagram after image processing is as Figure 2 shown.
[0088] S3: Use the KNN model to perform preliminary detection and classification on the color change of the preprocessed image;
[0089] During the titration process, the color change occurs gradually. To monitor this process in real time, the K-Nearest Neighbors (KNN) algorithm is used for dynamic color monitoring throughout the process. The image features of each frame are compared with the features of known samples. By calculating the Euclidean distance between the two, the current frame is classified into three states: colorless, color gradient, and titration end point. By extracting the chromaticity information of each frame of the image as features, and then the feature vector of each frame of the image Calculate the Euclidean distance from the feature vector to the feature vectors of the known samples (colorless, gradient, titration end point), and the formula is shown in Equation (2-6).
[0090] (2-6)
[0091] where, is the Euclidean distance between the current frame image and the sample features, is the weight coefficient for different features, and are respectively the th components in the feature vector.
[0092] By calculating the distance between the current frame image and all the labeled samples, and selecting the K nearest neighbors (i.e., the K samples with the most similar color changes). After finding the K nearest neighbors, the KNN algorithm will determine the classification result of the current frame image by majority voting according to the categories of these K samples. In the initial stage of titration, the KNN algorithm matches the feature vector of each frame with the set of "colorless" samples. Since the solution has not yet changed color, for samples whose image eigenvalue is close to the colorless state, KNN will classify them as the colorless state. When the titration reaction approaches the end point, the solution color gradually changes, and the color features in the image start to deviate from the colorless samples. At this time, the distance calculated by KNN starts to increase and gradually becomes smaller with the samples in the color gradient state. KNN will gradually classify the current frame as the color gradient state according to the distance change. When the titration reaction reaches the end point and the color changes significantly, the KNN algorithm will calculate that the distance between the current frame and the samples in the titration end point state is the smallest, thus classifying the image as the titration end point state. The three states during the titration process are as Figure 3 shown.
[0093] S4: Eliminate background noise through the collaborative work of KNN and the Gaussian mixture model (GMM), and extract the image of the color change area;
[0094] In the colorless stage of titration:
[0095] The KNN algorithm continuously monitors each frame image and classifies it as the "colorless state". Since the solution has not started to change color at this time, the information in the image is mainly composed of noise. Therefore, KNN can only recognize the characteristics of some noise. In this stage, the noise part of each frame image is extracted through the Gaussian mixture model (GMM), and the effect diagram is as Figure 4 (a) shown. The GMM model can effectively model the image and separate the foreground (possible color change) and background (noise) information. The formula of GMM is shown in Equation (2-7).
[0096] (2-7)
[0097] Among them, represents the probability that a pixel point belongs to the foreground or background, represents the number of Gaussian components in the Gaussian mixture model, is the weight of each Gaussian component, and are the mean and covariance matrix of the Gaussian component respectively, represents the Gaussian distribution with mean and covariance matrix as parameters.
[0098] Through the processing of multiple frames of images, the GMM model continuously extracts noise regions, superimposes the noise of each frame to generate a comprehensive noise image, and performs morphological processing on the noise image to remove smaller non-noise points, further optimizing the noise image, as shown in Figure 4 (b). Since mainly noise is identified in the colorless stage, the noise extraction process provides a key basis for the denoising process in subsequent stages.
[0099] In the color gradient and titration endpoint stages:
[0100] When the titration reaction starts, the color of the solution changes slightly, and KNN begins to recognize the color change and classifies it as the color gradient state. At this time, GMM continues to process each frame of the image, but the color change is usually very subtle and is accompanied by a large amount of noise. In this stage, GMM is used to extract the part of the image with color change. Due to the relatively small color change, GMM may extract many noise signals at the same time. To solve the problem of noise interference in color change extraction, the system deletes the noise extracted in the colorless stage. This step is crucial because by eliminating the known colorless noise, the actual color change region can be more clearly identified. This means that the system can distinguish the color change from the previously extracted noise, thereby improving the detection accuracy. After deleting the noise in the colorless stage, the final remaining part of the GMM image is the color change region. This enables the system to accurately extract and monitor the color change of the solution in the color development state. The foreground image, noise image, and the effect image after denoising processed by GMM are shown in Figure 5 .
[0101] S5: Analyze the features of the image of the color change region; analyze and calculate the area and average chromaticity of the color change region;
[0102] To further analyze the significance of the color change, it is necessary to calculate the area S of the color change region and the average chromaticity C of the color change region as important indicators for judging the titration endpoint. The size of the area can reflect the degree of color change. The calculation of the average chromaticity reflects the depth and nature of the color change. By quantitatively analyzing the chromaticity of the change region, the subtle color changes during the titration process can be more accurately identified. The formulas for the area S and average chromaticity C of the color change region are shown in Eqs. (2-8)(2-9).
[0103] (2-8)
[0104] (2-9)
[0105] Among them, is the set of pixels of the extracted color change region, is the value of each pixel in the region, usually taking a value of 1 (foreground) or 0 (background) in a binary mask image. represents the chromaticity value of each pixel within the color change region.
[0106] S6. Determine the titration endpoint based on the above analysis results and stop the titration process when the predetermined conditions are met.
[0107] By the area of the extracted color change region and the average chromaticity changes, the system can significantly reflect the subtle color changes during the titration process. When continuously monitoring the area and average chromaticity of the color change region, the system sets a threshold to determine whether the changes in these indicators reach stability. The determination of the titration endpoint requires the satisfaction of the following three conditions:
[0108] 1. KNN determination: The KNN algorithm continuously monitors the state of each frame of the image throughout the titration process. When the KNN determines that the current frame is in the titration endpoint state, it indicates that the color change has basically stopped.
[0109] 2. Stability of the area Monitor the area of the extracted color change region. If within a certain period of time, the change in the area is less than the set threshold of the area change per unit time, it indicates that the amplitude of the color change tends to be stable, meaning that the titration reaction is approaching completion.
[0110] 3. Stability of the average chromaticity The average chromaticity is the main and accurate reference condition for judging the titration endpoint. The system continuously monitors the change in the average chromaticity. If within a certain period of time, the change in the average chromaticity is less than the set threshold of the chromaticity change per unit time, it indicates that the color change has become stable.
[0111] When the above three conditions are simultaneously met, the system will prompt that the titration endpoint has been reached, and the experiment will automatically end. This process ensures the accuracy and effectiveness of the experimental results, making the monitoring of the titration process more reliable.
[0112] Example 2:
[0113] As Figure 6 shown, an automatic recognition system for the titration endpoint of permanganate includes:
[0114] A camera for real-time collecting the video stream of the solution to be measured during the titration process and transmitting the video data to the image processing module;
[0115] An image processing module for preprocessing each frame of the image converted from the RGB color space to the Lab color space;
[0116] The KNN classification module is used to perform dynamic color monitoring by calculating the Euclidean distance between the feature vector of the current frame image and the feature vectors of known samples, and classify the current frame into a colorless state, a color gradient state, or a titration end state;
[0117] The GMM analysis module is used to extract the noise part of each frame image in the colorless stage of titration, and continue to process and remove the previously extracted colorless noise in the color gradient and titration end stages, so as to improve the accuracy of color change detection;
[0118] The feature analysis module is used to calculate the changes in the area S and the average chromaticity C of the color change region, which are important indicators for judging the titration end point;
[0119] The end point determination module is used to determine the titration end point according to the stability of the area S and the average chromaticity C of the color change region, and stop the titration process when the predetermined conditions are met;
[0120] The control module is used to control the entire titration experiment process and automatically stop the experiment operation when the titration end point is reached;
[0121] The display module is used to enable the experimenter to observe the processed images and prompt information in real time.
[0122] In this article, specific examples are used to elaborate on the principles and implementation manners of the present invention. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for automatically identifying the endpoint of permanganate titration, characterized in that: The following steps are involved: S1, real-time acquisition of the video stream of the titration experiment, and frame-dividing the video stream to obtain image data; S2, preprocessing the image data; S3, use the KNN model to perform preliminary detection and classification of the color changes of the preprocessed images; S4, the background noise is eliminated through the collaborative work of KNN and GMM mixed Gaussian model, and the image of the color change area is extracted; S5, performing feature analysis on the image of the color change region; analyzing and calculating the area and average chromaticity of the color change region; S6. Determine the titration endpoint according to the analysis result, and stop the titration process when the predetermined condition is met; Among them, S4 includes: During the colorless state stage of titration, each frame of the image is continuously monitored by the KNN algorithm and classified as colorless; Use the GMM model to extract the noise of each frame image and separate the foreground and background information; Process multiple frames of images and add the noise of each frame to generate a comprehensive noise image; In the color gradient and titration endpoint stages, the GMM model is used to process each frame of the image, delete the noise extracted in the colorless state stage, and extract the color change area.
2. The method for automatically identifying the endpoint of permanganate titration according to claim 1, wherein S2 include: Convert each frame of image from RGB color space to Lab color space; Gaussian filtering is used to denoise and smooth the L channel in the Lab color space. The formula is: ; Apply contrast-limited adaptive histogram equalization to adjust the brightness distribution. The formula is: ; The L channel is processed in layers through the layered image algorithm, including: using Gaussian filtering to smooth the background layer, compressing and smoothing the exposure area of the background layer. The formula is: ; The edge information of the image detail layer is extracted through the edge detection algorithm. The formula is: ; Use a sharpening filter to enhance the details. The formula is: ; The processed brightness layer is resynthesized, and the background layer and detail layer are combined to generate a resynthesized L channel; Merge the resynthesized L channel with the original a and b channels to obtain the processed Lab image; Convert the processed Lab image back to RGB color space; in, is the filter window size, is the offset relative to the current pixel; Sobel x and Sobel y They represent the gradient values of the image in the horizontal x-axis and vertical y-axis, respectively, which are calculated by the Sobel operator; k represents the radius of the Gaussian kernel, that is, the range of the convolution kernel extending from the central pixel to the surrounding area; and are the minimum and maximum pixel values in the original brightness image, respectively. is the standard deviation of the Gaussian distribution, is the original image, is the denoised brightness image, is the image after contrast limited adaptive histogram equalization, is the brightness image after smoothing, For the image after detail enhancement, is a coefficient that controls detail enhancement.
3. The method for automatically identifying the endpoint of permanganate titration according to claim 2, wherein S3 include: During the titration process, each frame of the image is acquired in real time; Extract the chromaticity information of each frame of image as a feature vector; Compare the feature vector of the current frame image with the feature vector in the known sample set, and classify the current frame into a colorless state, a color gradient state, or a titration endpoint state by calculating the Euclidean distance between the two; Calculate the distance between the feature vector of the current frame image and all labeled samples, and select the K nearest neighbors; According to the color change categories of the K neighbors, the final classification result of the current frame image is determined by majority voting.
4. A method for automatically identifying a permanganate titration endpoint according to claim 3, characterized in that: The Euclidean distance calculation formula is: ; in, is the Euclidean distance between the current frame image and the sample feature; n represents the dimension of the feature vector, that is, the total number of features; i is the index variable; is the weight coefficient of different features; and are the first A quantity.
5. A method for automatically identifying a permanganate titration endpoint according to claim 4, characterized in that: The GMM model is used to extract the noise of each frame image and the formula for separating foreground and background information is: ; in, Indicates the probability that a pixel belongs to the foreground or background; Represents the number of Gaussian components in the Gaussian mixture model; i is the index variable; is the weight of each Gaussian component; and are the mean and covariance matrices of the Gaussian components respectively; Mean and the covariance matrix is a Gaussian distribution with parameters.
6. The method for automatically identifying the endpoint of permanganate titration according to claim 5, wherein S5 include: Calculate the area S and average chromaticity C of the color change region; The calculation formula for the area S of the color change region is: ; The calculation formula of average chromaticity C is: ; in, is the pixel set of the extracted color change area, is the value of each pixel in the area, Indicates the chromaticity value of each pixel in the color change area.
7. A method for automatically identifying the end point of permanganate titration according to claim 6, characterized in that: S6 determines the titration endpoint when the following conditions are met simultaneously: a) KNN algorithm determines that the current frame is the titration endpoint state; b) The change in the area S of the color change region per unit time is less than the set area change threshold; c) The change in average chromaticity C per unit time is less than the set chromaticity change threshold.
8. An automatic permanganate titration endpoint recognition system using the method according to any one of claims 1 to 7, characterized in that: include: A camera is used to collect the video stream of the liquid to be tested during the titration process in real time and transmit the video data to the image processing module; An image processing module is used to pre-process each frame of the image from the RGB color space to the Lab color space; The KNN classification module is used to perform dynamic color monitoring by calculating the Euclidean distance between the feature vector of the current frame image and the feature vector of the known sample, and classify the current frame into a colorless state, a color gradient state, or a titration endpoint state; The GMM analysis module is used to extract the noise part of each frame image in the colorless stage of titration, and continue to process and remove the previously extracted colorless noise in the color gradient and titration endpoint stages, thereby improving the accuracy of color change detection; The feature analysis module is used to calculate the area S of the color change region and the change of the average chromaticity C, which are important indicators for determining the titration endpoint; An endpoint determination module is used to determine the titration endpoint according to the area S of the color change region and the stability of the average chromaticity C, and to stop the titration process when a predetermined condition is met; The control module is used to control the entire titration experiment process and automatically stop the experiment operation when the titration endpoint is reached; The display module is used to enable the experimenter to observe the processed images and prompt information in real time.
Citation Information
Patent Citations
Full-automatic chemical titration experiment method
CN117517566A
Underwater image enhancement method based on color correction and brightness channel optimization and related device
CN118505579A