Package org.hyperonline.hyperlib.vision
Class FindTargetsPipeline
- java.lang.Object
-
- org.hyperonline.hyperlib.vision.FindTargetsPipeline
-
- All Implemented Interfaces:
edu.wpi.first.vision.VisionPipeline
,VisionGUIPipeline
public class FindTargetsPipeline extends java.lang.Object implements VisionGUIPipeline
A pipeline which finds rectangles within a given color range. Note that most customization is not done in code, but is instead done in preferences. If no customization is done, reasonable defaults for finding green rectangles are assumed.
-
-
Constructor Summary
Constructors Constructor Description FindTargetsPipeline(java.lang.String name, TargetProcessor processor)
Construct a new pipeline with the given name and target processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
process(org.opencv.core.Mat mat)
Read an input image.void
writeOutput(org.opencv.core.Mat mat)
Draw indicators onto the output image.
-
-
-
Constructor Detail
-
FindTargetsPipeline
public FindTargetsPipeline(java.lang.String name, TargetProcessor processor)
Construct a new pipeline with the given name and target processor.- Parameters:
name
- The name used to define the preferences set associated to this pipeline.processor
- Interface specifying how to extract the result from a list of rectangles.
-
-
Method Detail
-
process
public void process(org.opencv.core.Mat mat)
Read an input image. This method should extract any useful information from the input mat, and update any shared variables that the robot thread may access. It should NOT modify the image. Instead, save any information you want to print, and use it in the next call to writeOutput.- Specified by:
process
in interfaceVisionGUIPipeline
- Specified by:
process
in interfaceedu.wpi.first.vision.VisionPipeline
- Parameters:
mat
- image to process
-
writeOutput
public void writeOutput(org.opencv.core.Mat mat)
Draw indicators onto the output image.- Specified by:
writeOutput
in interfaceVisionGUIPipeline
- Parameters:
mat
- image to write the indicators on
-
-