OSVR-Core
ImageSourceFactories.h
Go to the documentation of this file.
1 
11 // Copyright 2015 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 #ifndef INCLUDED_ImageSourceFactories_h_GUID_9C2DA062_802C_41A0_E014_82E9EB8A7D5F
26 #define INCLUDED_ImageSourceFactories_h_GUID_9C2DA062_802C_41A0_E014_82E9EB8A7D5F
27 
28 // Internal Includes
29 #include "ImageSource.h"
30 
31 // Library/third-party includes
32 // - none
33 
34 // Standard includes
35 // - none
36 
37 namespace osvr {
38 namespace vbtracker {
40  ImageSourcePtr openOpenCVCamera(int which);
41 
42 #ifdef _WIN32
43  ImageSourcePtr openHDKCameraDirectShow();
45 #else
46  ImageSourcePtr openUVCCamera(int vendor_id = 0, int product_id = 0, const char* serial_number = nullptr);
49 
51  ImageSourcePtr openHDKCameraUVC(const char* serial_number = nullptr);
52 #endif
53 
56  ImageSourcePtr openImageFileSequence(std::string const &dir);
57 
60  ImageSourcePtr openDK2WrappedCamera(ImageSourcePtr &&cam, bool doHid);
61 } // namespace vbtracker
62 } // namespace osvr
63 #endif // INCLUDED_ImageSourceFactories_h_GUID_9C2DA062_802C_41A0_E014_82E9EB8A7D5F
ImageSourcePtr openHDKCameraDirectShow(bool highGain)
Definition: DirectShowImageSource.cpp:67
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
ImageSourcePtr openOpenCVCamera(int which)
Factory method to open an OpenCV camera by number.
Definition: CVImageSource.cpp:60
ImageSourcePtr openUVCCamera(int vendor_id=0, int product_id=0, const char *serial_number=nullptr)
Factory method to open a USB video class (UVC) device as an image source.
Definition: UVCImageSource.cpp:287
ImageSourcePtr openHDKCameraUVC(const char *serial_number=nullptr)
Factory method to open the HDK camera as an image source via libuvc.
Definition: UVCImageSource.cpp:305
ImageSourcePtr openDK2WrappedCamera(ImageSourcePtr &&cam, bool doHid)
Factory method to wrap an image source, already determined to be an Oculus DK2 camera, with unscrambling and keep-alive code.
Definition: DK2ImageSource.cpp:61
ImageSourcePtr openImageFileSequence(std::string const &dir)
Factory method to open a directory of tif files named 0001.tif and onward as an image source (looping...
Definition: FakeImageSource.cpp:60