UWARG Computer Vision
decklink_import.h
1 /*
2  This file is part of WARG's computer-vision
3 
4  Copyright (c) 2015, Waterloo Aerial Robotics Group (WARG)
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without
8  modification, are permitted provided that the following conditions are met:
9  1. Redistributions of source code must retain the above copyright
10  notice, this list of conditions and the following disclaimer.
11  2. Redistributions in binary form must reproduce the above copyright
12  notice, this list of conditions and the following disclaimer in the
13  documentation and/or other materials provided with the distribution.
14  3. Usage of this code MUST be explicitly referenced to WARG and this code
15  cannot be used in any competition against WARG.
16  4. Neither the name of the WARG nor the names of its contributors may be used
17  to endorse or promote products derived from this software without specific
18  prior written permission.
19 
20  THIS SOFTWARE IS PROVIDED BY WARG ''AS IS'' AND ANY
21  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23  DISCLAIMED. IN NO EVENT SHALL WARG BE LIABLE FOR ANY
24  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 
32 #ifndef DECKLINK_IMPORT_H_INCLUDED
33 #define DECKLINK_IMPORT_H_INCLUDED
34 
35 
36 #include "frame.h"
37 #include <opencv2/highgui/highgui.hpp>
38 #include <string>
39 #include <vector>
40 #include "imgimport.h"
41 
59 class DeckLinkImport : public ImageImport {
60  public:
64  DeckLinkImport(MetadataInput * reader, Camera &camera);
65 
66  virtual ~DeckLinkImport();
67 
72  int startCapture();
73 
79  int stopCapture();
80 
88  int grabFrame(cv::Mat* frame);
89 
95  virtual Frame* next_frame();
96 
100  virtual std::string to_string();
101  private:
108  int initVideoSource();
109 };
110 
111 #endif // DECKLINK_IMPORT_H_INCLUDED
Abstract class for importing frames and corresponding metadata.
Definition: imgimport.h:29
Module for extracting frames from DeckLink Video cards.
Definition: decklink_import.h:59
virtual std::string to_string()
String representation of the Importer.
A class for storing and searching telemetry logs.
Definition: metadata_input.h:32
virtual Frame * next_frame()
int grabFrame(cv::Mat *frame)
Container class for storing photos or frames of video to be processed and analyzed.
DeckLinkImport(MetadataInput *reader, Camera &camera)
Definition: frame.h:49
Container class for storing information about the camera used to capture an image *...
Definition: camera.h:28