Package com.pocolifo.robobase.vision
Class Webcam
java.lang.Object
com.pocolifo.robobase.vision.Webcam
- All Implemented Interfaces:
 AutoCloseable
Abstracts away certain parts of 
OpenCvCamera.- 
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.qualcomm.robotcore.hardware.HardwareMapTheHardwareMapassociated with this webcam.final org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamNameThe webcam device. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidUnsets the webcam pipeline; no data will be able to be processed since there is no pipeline active.voidclose()Closes the camera.Gets the current active pipeline of the webcam.voidopen(AbstractResultCvPipeline<?> pipeline) Opens the camera.voidsetPipeline(AbstractResultCvPipeline<?> pipeline) Sets the pipeline for the webcam which can process the data stream coming in from the webcam. 
- 
Field Details
- 
hardwareMap
public final com.qualcomm.robotcore.hardware.HardwareMap hardwareMapTheHardwareMapassociated with this webcam. - 
webcamDevice
public final org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName webcamDeviceThe webcam device. 
 - 
 - 
Constructor Details
- 
Webcam
public Webcam(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName webcamDevice)  - 
Webcam
Initializes aWebcam.- Parameters:
 hardwareMap- TheHardwareMapthat has the webcam in it.name- The name of the webcam in theHardwareMap.
 
 - 
 - 
Method Details
- 
open
Opens the camera. For this to be of any use, callsetPipeline(AbstractResultCvPipeline). Pipelines allow data from the camera to be processed. This is a blocking method. WHEN YOU'RE DONE WITH THE WEBCAM, CLOSE IT!- Parameters:
 pipeline- The initial pipeline which will process camera input.- Throws:
 RuntimeException- If there was an error while opening the camera.
 - 
setPipeline
Sets the pipeline for the webcam which can process the data stream coming in from the webcam.- Parameters:
 pipeline- The pipeline to use to process data.
 - 
clearPipeline
public void clearPipeline()Unsets the webcam pipeline; no data will be able to be processed since there is no pipeline active. - 
getPipeline
Gets the current active pipeline of the webcam.- Returns:
 - The current active pipeline.
 
 - 
close
Closes the camera. THIS SHOULD BE CALLED AFTER THE CAMERA IS UNNECESSARY TO THE PROGRAM!- Specified by:
 closein interfaceAutoCloseable- Throws:
 Exception- If an error occurred while closing the camera.
 
 -