Open Access

Application of the OpenCV library in indoor hydroponic plantations for automatic height assessment of plants


This paper presents a method for automatically measuring plants’ heights in indoor hydroponic plantations using the OpenCV library and the Python programming language. Using the elaborated algorithm and Raspberry Pi-driven system with an external camera, the growth process of multiple pak choi cabbages (Brassica rapa L. subsp. Chinensis) was observed. The main aim and novelty of the presented research is the elaborated algorithm, which allows for observing the plants’ height in hydroponic stations, where reflective foil is used. Based on the pictures of the hydroponic plantation, the bases of the plants, their reflections, and plants themselves were separated. Finally, the algorithm was used for estimating the plants’ heights. The achieved results were then compared to the results obtained manually. With the help of a ML (Machine Learning) approach, the algorithm will be used in future research to optimize the plants’ growth in indoor hydroponic plantations.