Home » Pumpkin Harvest Robots with MVTec HALCON Vision

Pumpkin Harvest Robots with MVTec HALCON Vision

4 views
Fanuc robot picking pumpkins from a harvest crate with MVTec HALCON 3D vision at a Québec farm

Agmanic Vision and system integrator Génik have built a fully automated robotic application that handles pumpkins after harvest at Les Fermes Émile Gariepy, a farm in Québec, Canada. The line combines two robotic cells with MVTec HALCON machine vision software, using 3D vision and deep learning to find, grasp, wash and pack pumpkins without operator intervention between varieties.

Why post-harvest handling is hard to staff

Agriculture in Canada has a structural labor problem. Tens of thousands of farm jobs go unfilled every peak season, and losses in 2022 alone reached 3.5 billion U.S. dollars. The fruit and vegetable sector is hit hardest, and more than 35,000 positions are expected to remain vacant at peak season by 2030.

At the Émile Gariepy farm, finishing work (loading the washing system, monitoring the line and packing pumpkins into cartons) used to take four employees per shift. The work is seasonal, repetitive and physically demanding, which makes it difficult to staff. The technical difficulty was equally clear. As Peter McLaughlin, CEO and Co-Founder of Agmanic, points out, pumpkins are not industrial parts: shape, size, weight, orientation and variety all change from one to the next.

Two robotic cells, one vision platform

The customer wanted less dependence on manual labor, steady throughput, several varieties without reconfiguration and gentle handling. The line has two robotic cells with a brush washing station and an automatic labelling station between them.

  • Cell 1, bin picking: a robot removes pumpkins from the harvest crate and feeds them into the washer.
  • Cell 2, bin placing: a second robot picks the washed pumpkins from the conveyor and places them in cartons.
Robot cell removing pumpkins from a wooden harvest crate and placing them on a conveyor belt
At the start of the process, the first robot autonomously removes the pumpkins from the delivered crate and places them on the conveyor belt for further processing.

Bin picking from the harvest crate

A Basler 3D time-of-flight camera is mounted on the tool of the bin-picking robot and scans the wooden crate from above, producing a 3D point cloud of the stacked pumpkins. HALCON analyzes the 2D image from the same camera with deep-learning-based instance segmentation and detects every visible pumpkin, whatever its variety, size or orientation.

The 2D detections are then combined with the 3D data to obtain the spatial position of each pumpkin. The software checks position, orientation and surroundings to decide whether the robot can reach a candidate and grasp it without collisions. The best candidate is selected and the robot controller receives the grasping coordinates.

Robot gripper over a crate of pumpkins using HALCON grasp candidates for collision-free gripping
MVTec HALCON identifies suitable gripping candidates and provides the required position data for precise, collision-free gripping.
Brush washing station spraying water on pumpkins moving along a conveyor between the two robot cells
After being removed from the harvest crate, the pumpkins pass through a brush washing system before being transported to the second robot cell for the next process steps.

Placing into cartons

At the washer exit, a stereo 3D camera fixed above the conveyor tracks the moving pumpkins and supplies the data the robot needs to pick them on the fly. A second active stereo 3D camera above the carton generates a point cloud of its interior on every cycle, so HALCON can tell which areas are already occupied. A planning algorithm developed by Agmanic Vision uses that information to choose the next placement position.

Yellow Fanuc LR Mate robot with a vacuum gripper placing a washed pumpkin into a cardboard box
In the second robot cell, the robot picks the cleaned pumpkins from the conveyor and automatically places them into boxes.

3D processing and AI working together

According to McLaughlin, neither sensors alone nor classic rule-based image processing could meet the requirements. The system has to recognize objects and also determine their position in space, calculate grasp points, predict movement and plan packing positions. Felix Podhorsky, Business Development Manager at MVTec, notes that HALCON offers more than 2,100 operators, which covers most industrial use cases.

Two technologies carry the application:

  • 3D point cloud processing and hand-eye calibration. Each point of the cloud has at least X, Y and Z coordinates. HALCON derives shape, position, height, distance, volume and orientation from it. Hand-eye calibration then converts this data into robot coordinates, so the robot can grasp, place or inspect precisely.
  • AI-based instance segmentation. The deep learning method assigns objects to a class with pixel-level precision and extracts exact boundaries, even when pumpkins are closely packed or partially touching in a single container.
3D point cloud of pumpkins in a crate generated by MVTec HALCON from 3D camera data
MVTec HALCON processes the 3D camera data into a point cloud and uses it to determine the spatial position of the pumpkins.

The deep learning model is trained in HALCON, and the training progress and detection results can be reviewed against ground truth. Podhorsky argues that this kind of application shows the value of deep learning for objects that vary and are hard to define by rules in advance. McLaughlin sums up the chain: AI recognizes the pumpkin in the image, 3D vision provides its position in space, and hand-eye calibration passes it to the robot in robot coordinates.

HALCON deep learning training screen with ground truth and pumpkin detection results
Behind the scenes: To ensure that the AI reliably detects the pumpkins, the deep learning model is trained in HALCON. The image shows the training progress as well as the ground truth and detection result.

Results in operation

The system has been running at Les Fermes Émile Gariepy since 2025 and has met expectations. The fully integrated line processes one pumpkin every three seconds, or 1,200 pumpkins per hour. Dependence on the four employees previously needed has been reduced, and different varieties run without operator intervention or reconfiguration between them.

What it means for integrators

For machine builders and integrators working with natural products, the case shows a workable pattern: use 3D data for position, deep learning for detection under high variability, and a calibration step to hand coordinates to the robot. Podhorsky points out that natural products have long resisted automation because they are not standardized, and that this combination makes the variability manageable. The same approach is relevant to other food and agricultural handling tasks.

You can find more on the software on the MVTec HALCON product page and in the official HALCON documentation. More machine vision news is collected in our MVTec category, and a related robot-guidance case is 3D machine vision for aircraft sealant application with HALCON.

Related News