-
Notifications
You must be signed in to change notification settings - Fork 0
Performing Vision
Tom Tzook edited this page Sep 6, 2019
·
3 revisions
Sensing and operating is a huge part of operating a robot. One such sensing technique is Vision. There are many libraries to perform Vision calculation, and FlashLib has no need to provide another one. However, managing continuous vision operation, and outputting it to robot actions is not so simple. Thus FlashLib a simple framework to manage vision operations.
- Images are provided by
ImageSource
implementations. The source may provide the same image, different images, or not provide any image at all. - Images then pass through
ImagePipeline
s. These pipelines may perform processing or just write the image to some output.- For processing the image, a pipeline may be a
VisionPipeline
. Such pipeline processes images usingImageProcessor
s, and analyzes the result using anImageAnalyzer
. After an analysis was created, the analysis is passed to an output consumer.
- For processing the image, a pipeline may be a
The most basic process can be displaying an image from a source:
ImageSource<ImageType> source = ...
ImagePipeline<ImageType> displayingPipeline = ...
ImageDelegator delegator = new ImageDelegator(source, displayingPipeline);
The ImageDelegator
object actually runs the process. This can be done in one of 2 ways. Manually:
while(shouldRun) {
delegator.delegate();
}
Or with an executor:
Runner runner = new ImageDelegationRunner(delegator, Time.seconds(1), logger);
runner.start();
To actually process an image, we would need to use VisionPipeline
. This pipelien w