Computer Vision In Agriculture

Humans use their eyes and their brains to see and visually sense the world around them. Computer vision is the science that aims to give a similar, if not better, capability to a machine or computer.

Computer vision is concerned with the automatic extraction, analysis and understanding of useful and meaning information from a single image or a sequence of images. It involves the development of a theoretical and algorithmic basis to achieve automatic visual understanding.

Industries working on this field



Applications of Computer Vision for Assessing Quality of Agricultural-food Products

Computer vision, comprising a damage less assessment approach, has the aptitude to estimate the characteristics of food products with its advantages of fast speed, ease of use, and minimal training sample preparation.

Specifically, computer vision systems are feasible for classifying food products into specific grades, detecting defects, and estimating properties such as color, shape, size, surface defects, and contamination.

Plant Diseases:

Detection of plant disease through some automatic technique is beneficial as it reduces a large work of monitoring in big farms of crops, and at very early stage itself it detects the symptoms of diseases means when they appear on plant leaves. This paper presents an algorithm for image segmentation technique used for automatic detection as well as classification of plant leaf diseases and survey on different diseases classification techniques that can be used for plant leaf disease detection. Image segmentation, which is an important aspect for disease detection in plant leaf disease, is done by using genetic algorithm.

Grading and Sorting of Fruits and Vegetables

Modern methods, such as deep learning, successfully challenge the human factor in traditional vision algorithms. The tuning phase is replaced by automatic learning. When the deep learning algorithm is provided with a set of “good” fruits (oranges for example) and another set of oranges with defects — it is self-adjusted to classify (grade) additional oranges based on the sample sets. No fine tuning is needed here. Every time an orange looks like one of the sets, it is classified and graded accordingly. This method is fast and reliable; more importantly, it yields a consistent performance. The deep learning is the state-of-the-art solution we recommend today for many applications of this kind.


Nowadays, technological advances enable automatic, precise, high-throughput measurements as well as an exact analysis of the traits and factors that affect them, opening the door to a new age in agriculture.

As phenotyping largely relies on visible traits, advanced computer vision algorithms in this field. Since plants are in many cases grown in an uncontrolled environment, yet precision agriculture requires, by its nature, precise measurements, phenotyping projects are best approached by a combination of algorithm types, to provide both precision and robustness.

A single instance of the system consists of at least one camera, directed at 1 to 3 plants that are to be automatically analysed/detected. The main features of interest include the plant’s height and width along regions, colour based analysis and automatic fruit-yield estimation.

As in most outdoor scenarios, the initial challenge involved detecting the plant of focus and differentiating it from environment and the rest of the plants. Pre-processing of data is done to remove unwanted portion from the image, yet could be generalized to other conditions and plant types.

Detection of the plant was established in three steps.

The initial step produces the general position of the plant and is performed based on colour index & structural ques in relatively low resolution, saving computational resources and power .

In the next step, the plant is detected in a precise manner, using an iterative process in which short segments are concatenated, until an anomaly in texture or geometry is reached, marking a transition between the surrounding environment and the plant.

The segmentation then undergoes further refinement, taking into account a-prior knowledge regarding the plant and the environment.

Next, the dimensions of the plant are extracted using different techniques, relying on several colour indices and on textures. The measurements are then converted from pixel units to a meaningful unit of measure (e.g. cm). Such a conversion can be generated in two ways:

i) an artificial reference object can be placed next to the plant, providing an anchor for computing the needed transformations in an accurate manner;


ii) sensors that allow depth estimation, such as stereo cameras, can be incorporated in the hardware of the system, eliminating the need for a reference object.

Once the plant is detected and its position is well estimated, additional algorithmic layers can be implemented: advanced machine learning /Deep Learning schemes are “taught“ to recognize specific plant structures such as the fruit and flowers, and obtain measurements regarding their dimensions, colour and yield.

Image processing for Precision Agriculture

Computer vision for precision agriculture

The opportunities to utilize computer vision and machine learning algorithms to reduce costs for farmers are huge. For example: machine learning can be applied to detect fruit diseases from uploaded cellphone camera images, thus allowing timely intervention; real-time detection of weed from tractors allow to apply herbicides in the right place and to reduce the use of chemicals; water leaks can be detected in large fields by infrared cameras. As part of a production line, cameras installed above conveyor belts can be used to sort and grade agricultural products in real-time; cameras in greenhouses can be used to track plant growth state; animals tracking cameras can be used to automatically monitor their behaviour and give timely alert.

Sophistication of computer vision algorithms operating in precision agriculture and precise farming are expected to rise due to the complexity of outdoor ground and weather conditions in which they operate. No off-the-shelf algorithms exists, which can account for the huge variability encountered in weather, soil, and other environmental conditions in real applications. Therefore, computer vision and machine learning scientists developed algorithms in order to face the challenging outdoor and indoor conditions and meet accuracy demands from our clients in the agricultural field.

Thanks for following along.

Remember, this was just an introductory look on computer vision based agricultural products. There are several more features and options we haven’t covered, but we’ll do so in future posts.

Machine Learning enthusiast |Python |C++|JavaScript|Tensorflow|keras