BitmapToolkit Scol plugin
include
ICameraInput.h
Go to the documentation of this file.
1
/*
2
-----------------------------------------------------------------------------
3
This source file is part of OpenSpace3D
4
For the latest info, see http://www.openspace3d.com
5
6
Copyright (c) 2012 I-maginer
7
8
This program is free software; you can redistribute it and/or modify it under
9
the terms of the GNU Lesser General Public License as published by the Free Software
10
Foundation; either version 2 of the License, or (at your option) any later
11
version.
12
13
This program is distributed in the hope that it will be useful, but WITHOUT
14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public License along with
18
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20
http://www.gnu.org/copyleft/lesser.txt
21
22
-----------------------------------------------------------------------------
23
*/
24
25
#ifndef __BTK_ICAMERAINPUT_H__
26
#define __BTK_ICAMERAINPUT_H__
27
28
#include "
Prerequisites.h
"
29
30
#ifdef _WIN32
31
#include <videoInput.h>
32
#endif
33
34
#include <cassert>
35
39
class
ICameraInput
{
40
41
// Static methods
42
public
:
43
static
std::vector<std::string>
GetDevicesList
();
44
static
void
SetCameraInputsState
(
bool
state);
// true : on, false : off
45
46
// Static members
47
protected
:
48
static
std::list<ICameraInput*>
cameraInputsList
;
49
50
protected
:
51
int
mIndex
;
52
bool
mMirrorMode
;
53
cv::Size
mBufferSize
;
54
55
public
:
56
ICameraInput
(
int
index);
57
virtual
~ICameraInput
();
58
59
// Pure virtual methods
60
virtual
bool
Initialize
() = 0;
61
virtual
void
Close
() = 0;
62
virtual
bool
IsOpened
() = 0;
63
virtual
cv::Mat
UpdateImage
() = 0;
64
virtual
int
GetWidth
() = 0;
65
virtual
int
GetHeight
() = 0;
66
virtual
void
SetSize
(
int
width,
int
height) = 0;
67
68
// Virtual methods
69
virtual
bool
TakeSnapshot
(std::string path);
// Store current frame to a file
70
virtual
void
RenderToScreen
();
71
virtual
bool
SetFocusPoint
(
int
x,
int
y);
72
virtual
void
SetTorchState
(
bool
state);
73
74
// Common methods
75
bool
GetMirrorMode
();
76
void
SetMirrorMode
(
bool
mode);
77
};
78
79
#endif
Prerequisites.h
ICameraInput
Interface for camera management. Concrete classes are written for Windows, Android and OpenCV native ...
Definition
ICameraInput.h:39
ICameraInput::GetMirrorMode
bool GetMirrorMode()
Definition
ICameraInput.cpp:49
ICameraInput::SetMirrorMode
void SetMirrorMode(bool mode)
Definition
ICameraInput.cpp:54
ICameraInput::cameraInputsList
static std::list< ICameraInput * > cameraInputsList
Definition
ICameraInput.h:48
ICameraInput::SetSize
virtual void SetSize(int width, int height)=0
ICameraInput::TakeSnapshot
virtual bool TakeSnapshot(std::string path)
Definition
ICameraInput.cpp:215
ICameraInput::mMirrorMode
bool mMirrorMode
Definition
ICameraInput.h:52
ICameraInput::IsOpened
virtual bool IsOpened()=0
ICameraInput::mBufferSize
cv::Size mBufferSize
Definition
ICameraInput.h:53
ICameraInput::Initialize
virtual bool Initialize()=0
ICameraInput::GetHeight
virtual int GetHeight()=0
ICameraInput::GetWidth
virtual int GetWidth()=0
ICameraInput::UpdateImage
virtual cv::Mat UpdateImage()=0
ICameraInput::SetCameraInputsState
static void SetCameraInputsState(bool state)
Definition
ICameraInput.cpp:196
ICameraInput::SetFocusPoint
virtual bool SetFocusPoint(int x, int y)
Definition
ICameraInput.cpp:219
ICameraInput::GetDevicesList
static std::vector< std::string > GetDevicesList()
Definition
ICameraInput.cpp:59
ICameraInput::SetTorchState
virtual void SetTorchState(bool state)
Definition
ICameraInput.cpp:224
ICameraInput::Close
virtual void Close()=0
ICameraInput::mIndex
int mIndex
Definition
ICameraInput.h:51
ICameraInput::~ICameraInput
virtual ~ICameraInput()
Definition
ICameraInput.cpp:44
ICameraInput::RenderToScreen
virtual void RenderToScreen()
Definition
ICameraInput.cpp:231
Generated by
1.9.8