← Wiki

Ingredient

OpenCV

Also known as: Open Source Computer Vision Library, cv2

The dominant open-source computer-vision library — implementations of every classical CV algorithm (filtering, edge detection, feature matching, optical flow, calibration) plus modern wrappers for deep-learning model inference. Apache 2.0 licensed. C++ core with bindings for Python (the most-used), Java, JavaScript, MATLAB. The right ingredient for any farm-vision task that doesn't require training a custom neural network: color-based fruit segmentation, weed-vs-crop classification by leaf morphology, plant-height estimation by stereo, motion detection in surveillance feeds, ArUco-marker-based robot localization.

Inputs / outputs

  • Languages: Python (cv2), C++, Java
  • Image formats: JPEG, PNG, BMP, TIFF, video files (FFmpeg backend)
  • Deep-learning runtimes: ONNX, TensorFlow, PyTorch (via dnn module)
  • Hardware acceleration: CUDA (NVIDIA), OpenCL (cross-vendor), VAAPI (Intel)

Solves / unlocks

  • Color-threshold fruit segmentation (HSV color space)
  • Leaf-morphology weed-vs-crop classification (contour analysis)
  • ArUco / AprilTag marker detection for robot localization in greenhouses
  • Stereo-vision plant-height estimation
  • Optical-flow-based motion tracking (drone navigation, animal monitoring)
  • Time-lapse stitching and analysis
  • Real-time inference of pretrained models (YOLOv8 for plant disease, MobileNet for crop type)

Constraints

  • Classical CV needs careful tuning — color thresholds, kernel sizes, morphology parameters change per crop and lighting.
  • Lighting is everything — controlled lighting (greenhouse) gives stable algorithms; outdoor field lighting punishes naive thresholds.
  • CPU-only Pi performance is limited — for >10 FPS HD work, move to Jetson with CUDA acceleration.
  • Not a training framework — OpenCV runs inference; train models in PyTorch/TensorFlow first.

Source

See also

Auto-generated from this entry’s typed relations: frontmatter, grouped by relation type so the editorial signal isn’t flattened.

  • Member of: [[ingredient]]
  • Combines with: [[raspberry-pi]] · [[nvidia-jetson]] · [[rgbd-camera]] · [[ros2]]

What links here, and how

Inbound connections from across the wiki, grouped by lens and by relationship. These appear automatically — every entity page declares what it links to, and that data populates here on the targets.

Practical

contains

combines with

  • iNaturalist API preprocess camera frames in OpenCV, send via API for species ID
  • NVIDIA Jetson OpenCV with CUDA backend = real-time computer vision; YOLOv8/v10 runs at 30+ FPS on Orin Nano
  • PlantVillage dataset OpenCV dnn module loads ONNX models trained on PlantVillage for inference
  • PX4 / ArduPilot autopilot vision-based precision-landing and target-following via Jetson + companion-computer setup
  • Raspberry Pi Pi 5 with Camera Module 3 = real-time computer vision for crop monitoring or weed detection
  • RGB-D camera depth + color frames feed into computer-vision pipelines for fruit detection, weed segmentation
  • YOLO (object detection) OpenCV dnn module runs YOLO ONNX exports for inference outside Python

combines

10 inbound links · 5 outbound