Level Measurement with OpenCV
In this student project, my team and I developed an application for automated liquid level measurement using computer vision. The goal was to detect and analyze the liquid level in containers based on image data.
The project was implemented using Python and OpenCV. First, the captured images are scaled and cropped to a defined image area. They are then processed using Gaussian filtering and binarization to better distinguish the liquid from the background. Using morphological operations and contour detection, distracting image areas are reduced, and the largest contiguous contour is identified to segment the liquid area and highlight it in the original image.
To verify its accuracy, the application was evaluated using training, test, and external image datasets. Correct and incorrect detections were recorded, and the hit rate was calculated. The system can also be expanded with custom datasets and adapted to different use cases.
The project provides practical experience in image processing, contour analysis, and automated object recognition. The method is particularly well-suited for liquids that contrast sharply with the background, such as dark liquids.
