Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vfdev-5/ocv_pipeline
OpenCV filters are managed using a pipeline for webcam image processsing; VideoInput library is used
https://github.com/vfdev-5/ocv_pipeline
Last synced: 11 days ago
JSON representation
OpenCV filters are managed using a pipeline for webcam image processsing; VideoInput library is used
- Host: GitHub
- URL: https://github.com/vfdev-5/ocv_pipeline
- Owner: vfdev-5
- Created: 2012-09-30T22:16:59.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-10-12T15:15:43.000Z (about 12 years ago)
- Last Synced: 2024-10-13T12:09:27.771Z (26 days ago)
- Language: C++
- Size: 277 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
OCV_pipeline
============OpenCV filters are managed using a pipeline for webcam image processsing. VideoInput library is used for camera configuration.
Idea is to use a wrapper over OpenCV functionalities as a chain of filters:
Example:// camera handling choice:
CameraCapture_VideoInput cameraCapture;
// filters:
ImageAbstractFilter * motionDetectionFilter = new MotionDetectionFilter();
ImageAbstractFilter * histMotionDetectionFilter = new HistMotionDetectionFilter();
ImageAbstractFilter * logicalAND = new MathBinaryOpFilter(MathBinaryOpFilter::AND);
ImageAbstractFilter * morphoClose = new MorphoFilter(3, MORPH_ELLIPSE, MORPH_CLOSE);
ImageAbstractFilter * morphoOpen = new MorphoFilter(3, MORPH_ELLIPSE, MORPH_OPEN);
// Pipeline:
Pipeline pipeline;pipeline.addSplit(1);
pipeline.addFilter(1, motionDetectionFilter);
pipeline.addFilter(2, histMotionDetectionFilter);PipelineInput in(1,2);
pipeline.addFilter(in, logicalAND);pipeline.addFilter(1, morphoOpen);
pipeline.addFilter(1, morphoClose);// Set keyboard handler:
KeyboardHandle keyHandler;
string path = "data/";
keyHandler.addKey('p', KeyboardHandle::SAVE_MATRIXDATA_ON_DISK, 0, path + "template_image.yml");
keyHandler.addKey('p', KeyboardHandle::SAVE_IMAGE_ON_DISK, 0, path + "template_image.jpg");
keyHandler.addKey('p', KeyboardHandle::SAVE_MATRIXDATA_IN_BUFFER, 0, "templ");
keyHandler.addKey('l', KeyboardHandle::LOAD_MATRIXDATA_FROM_DISK_INTO_BUFFER, "templ", path + "template_image.yml");
// Run camera capture:
cameraCapture.setPipeline(&pipeline);
cameraCapture.setKeyboardHandler(&keyHandler);
cameraCapture.run();