University Chemistry ›› 2024, Vol. 39 ›› Issue (12): 378-384.doi: 10.12461/PKU.DXHX202404036

• Future Chemist • Previous Articles     Next Articles

Design and Implementation of a Solution Concentration Monitoring Device Based on OpenCV

Haoran Qi1, Mingqing Lei1, Shuchang Guo1, Ziqi Jiang1, Yikai Zhang2, Ziyan Shen2   

  1. 1 College of Information Science and Technology, Beijing University of Chemical Technology, Beijing 102200, China;
    2 College of Mechanical and Electrical Engineering, Beijing University of Chemical Technology, Beijing 102200, China
  • Received:2024-04-07 Accepted:2024-07-02 Published:2024-12-17
  • Contact: Ziyan Shen E-mail:shenzy@buct.edu.cn

Abstract: Solution concentration detection plays a crucial role in research, education, and industrial applications. To address the complexity, time consumption, and high costs associated with traditional methods, this study introduces a color-based solution concentration detection method. The method employs a simplified device to capture solution color, mitigates the effects of ambient light, and utilizes a system for solution color image recognition based on the Lambert-Beer law and image colorimetry. Using OpenCV (Open Source Computer Vision Library), images of solutions with varying concentrations are processed to establish a regression model correlating HSV (Hue, Saturation, Value) color features with solution concentrations, enabling accurate measurement. Experimental results demonstrate strong linear correlation (R2 = 0.99) between HSV values and concentrations, particularly with copper sulfate solutions ranging from 0 to 50 mg∙mL-1. This method offers a novel solution for quality control in industrial production and enhances educational experiments. Furthermore, the adaptable design of the detection device facilitates measurement of additional solution parameters, including pH, expanding its utility in diverse applications.

Key words: Concentration of colored solution, OpenCV, Machine vision system, HSV color model