Package com.pocolifo.robobase.vision
Class ConvolutionalColorDetection
java.lang.Object
org.openftc.easyopencv.OpenCvPipeline
com.pocolifo.robobase.vision.AbstractResultCvPipeline
com.pocolifo.robobase.vision.ConvolutionalColorDetection
-
Field Summary
Fields inherited from class com.pocolifo.robobase.vision.AbstractResultCvPipeline
result
Fields inherited from class org.openftc.easyopencv.OpenCvPipeline
MEMLEAK_DETECTION_ENABLED, MEMLEAK_DETECTION_PIPELINE_SETTLE_DELAY_SECONDS, MEMLEAK_THRESHOLD_MB
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
calculateResult
(double[] input) void
computeCutoffs
(org.opencv.core.Mat input) double[][]
computePixelColorness
(org.opencv.core.Mat input) double[]
getColumnAverages
(double[][] input) Get the current result of the pipeline.void
init()
Runs when the pipeline is first set.double[][]
performConvolution
(double[][] input) org.opencv.core.Mat
processFrame
(org.opencv.core.Mat input) Methods inherited from class org.openftc.easyopencv.OpenCvPipeline
getUserContextForDrawHook, init, onDrawFrame, onViewportTapped, requestViewportDrawHook, saveMatToDisk, saveMatToDiskFullPath
-
Constructor Details
-
ConvolutionalColorDetection
public ConvolutionalColorDetection(int extractCol)
-
-
Method Details
-
init
public void init()Description copied from class:AbstractResultCvPipeline
Runs when the pipeline is first set.- Specified by:
init
in classAbstractResultCvPipeline
-
computeCutoffs
public void computeCutoffs(org.opencv.core.Mat input) -
computePixelColorness
public double[][] computePixelColorness(org.opencv.core.Mat input) -
performConvolution
public double[][] performConvolution(double[][] input) -
getColumnAverages
public double[] getColumnAverages(double[][] input) -
calculateResult
public void calculateResult(double[] input) -
processFrame
public org.opencv.core.Mat processFrame(org.opencv.core.Mat input) - Specified by:
processFrame
in classorg.openftc.easyopencv.OpenCvPipeline
- Parameters:
input
- the frame to be processed- Returns:
- the processed frame
-
getResult
Description copied from class:AbstractResultCvPipeline
Get the current result of the pipeline.- Overrides:
getResult
in classAbstractResultCvPipeline
- Returns:
- The result of the pipeline.
-