VisionBench
Test an EasyOpenCV pipeline on your computer before using the robot
Overview
VisionBench is the current name of EOCV-Sim. It runs vision code on your computer using a saved image, video, or webcam as the input. This lets you inspect and tune a pipeline without repeatedly installing code.
It simulates the vision parts of the SDK; it is not a full robot . You still need to test camera exposure, lighting, speed, and robot behavior on the real robot.
Installation
- Follow the official VisionBench download instructions. The current release requires 25 or newer. Check with
java -versionbefore launching it. - Download the file for your operating system from the linked release page.
- Launch the downloaded JAR. If double-clicking does nothing, open a terminal in the download folder and run
java -jarfollowed by the actual filename you downloaded.
The Java version needed to run VisionBench on your computer is separate from the Java and Android Gradle settings used to build your FTC app.
Pipeline example
For a first test, use a saved photo of a field object. Create a Java workspace through Workspace → External → Create Gradle Workspace. Open that folder in VS Code or IntelliJ, then add PassThroughPipeline.java under src/main/java:
import org.opencv.core.Mat;
import org.openftc.easyopencv.OpenCvPipeline;
public class PassThroughPipeline extends OpenCvPipeline {
@Override
public Mat processFrame(Mat input) {
return input;
}
}processFrame receives one image frame. Returning input shows the frame without changing it. Once this works, try the one-color pipeline lesson.
The official workspace guide shows the current menu and file locations. If the pipeline does not appear, read the build error in VisionBench and check that the Java filename matches the class name.
Testing
- Choose an image source and open your test photo.
- Select PassThroughPipeline in the pipeline list. The preview should show the same photo.
- Change one part of the pipeline, save the file, and compare the new preview with the original.
- When you add thresholds, expose supported public, non-final Java fields to adjust them in the variable tuner. Record the values you choose in your code.
Use several photos, including different lighting and object positions. A color range that works on one image may fail on another.
Robot pipeline import
VisionBench can load a folder of pipeline classes from an Android Studio project, but those classes should not depend on or other unsupported robot hardware APIs. Follow its Android Studio workspace guide to select only the vision package.
Java workspaces are the simplest supported route. The pipeline guide says Kotlin and other JVM languages require building VisionBench from source, so do not expect a .kt file placed in a Java workspace to appear automatically.
Next steps
After the computer test works, move the pipeline into your FTC project, connect it to EasyOpenCV on the robot, and test with the robot's camera. Keep your first robot test slow and simple.