Skip to content
Snippets Groups Projects
Commit 50cd9b82 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Add doc and license to SDK

parent 22cfb88d
No related branches found
No related tags found
No related merge requests found
Showing
with 215 additions and 13 deletions
...@@ -166,7 +166,7 @@ voltu::FramePtr ObserverImpl::getFrame() ...@@ -166,7 +166,7 @@ voltu::FramePtr ObserverImpl::getFrame()
voltu::PropertyPtr ObserverImpl::property(voltu::ObserverProperty) voltu::PropertyPtr ObserverImpl::property(voltu::ObserverProperty)
{ {
throw voltu::exceptions::InvalidProperty(); throw voltu::exceptions::NotImplemented();
} }
std::shared_ptr<ftl::data::FrameSet> ObserverImpl::_makeFrameSet() std::shared_ptr<ftl::data::FrameSet> ObserverImpl::_makeFrameSet()
......
Copyright (c) 2020 Nicolas Pope
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
# VolTu - Volumetric Capture SDK
\ No newline at end of file
/**
* @file system.hpp
* @copyright Copyright (c) 2020 Sebastian Hahta, MIT License
* @author Sebastian Hahta
*/
#pragma once #pragma once
#ifndef PY_API #ifndef PY_API
......
/**
* @file feed.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include "defines.hpp" #include "defines.hpp"
......
/**
* @file initialise.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include <memory> #include <memory>
#include <voltu/system.hpp> #include <voltu/system.hpp>
......
/**
* @file observer.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include "defines.hpp" #include "defines.hpp"
......
/**
* @file opencv.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include <opencv2/core/mat.hpp> #include <opencv2/core/mat.hpp>
......
/**
* @file operator.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include <voltu/types/property.hpp> #include <voltu/types/property.hpp>
......
/**
* @file pipeline.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include <voltu/defines.hpp> #include <voltu/defines.hpp>
......
/**
* @file room.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include "defines.hpp" #include "defines.hpp"
......
/**
* @file system.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include "defines.hpp" #include "defines.hpp"
...@@ -6,47 +12,127 @@ ...@@ -6,47 +12,127 @@
#include <voltu/feed.hpp> #include <voltu/feed.hpp>
#include <voltu/pipeline.hpp> #include <voltu/pipeline.hpp>
#include <list> #include <list>
#include <string>
namespace voltu namespace voltu
{ {
/**
* @brief Voltu semantic versioning information.
*/
struct Version struct Version
{ {
int major; // API Incompatible change int major; ///< API Incompatible change
int minor; // Possible binary incompatible, extensions int minor; ///< Possible binary incompatible, extensions
int patch; // Internal only fixes. int patch; ///< Internal only fixes.
}; };
/** /**
* Singleton Voltu system instance. Provides access to the key components such * @brief Singleton Voltu system instance.
* as opening streams or files and creating virtual cameras. *
* Provides access to the key components such as opening streams or files and
* creating virtual cameras. Use `voltu::instance()` to obtain the object. All
* object instances in VolTu are managed by shared smart pointers.
*/ */
class System class System
{ {
public: public:
virtual ~System() = default; virtual ~System() = default;
/** Get the semantic version information. */ /**
* @brief Get the semantic version information.
*
* @return Always returns semantic versioning structure.
*/
virtual voltu::Version getVersion() const = 0; virtual voltu::Version getVersion() const = 0;
/** Make a virtual room or composite room. */ /**
* @brief Make a virtual room or composite room.
*
* @return A new virtual room instance.
*/
PY_API virtual voltu::RoomPtr createRoom() = 0; PY_API virtual voltu::RoomPtr createRoom() = 0;
/** Create a virtual observer. This renderers virtual camera views. */ /**
* @brief Create a virtual observer.
*
* An observer renderers virtual camera views, audio and other data from
* submitted framesets. It is possible and recommended that a single
* observer instance be used to renderer multiple different views, rather
* than creating lots of observers. This saves memory resources.
*
* @return A new observer instance.
*/
PY_API virtual voltu::ObserverPtr createObserver() = 0; PY_API virtual voltu::ObserverPtr createObserver() = 0;
/** Open a file, device or network stream using a URI. */ /**
* @brief Open a file, device or network stream using a URI.
*
* All data sources in VolTu are represented by Universal Resource
* Identifiers (URIs), with some non-standard additions. A few examples
* are:
* * `file:///home/user/file.ftl`
* * `tcp://localhost:9001/*`
* * `ftl://my.stream.name/room1`
* * `ws://ftlab.utu.fi/lab/`
* * `./file.ftl`
* * `device:camera`
* * `device:screen`
*
* Note that returning from this call does not guarantee that the source
* is fully open and operational, this depends on network handshakes or
* file processing that occurs asynchronously.
*
* @throw voltu::exceptions::BadSourceURI If an unrecognised URI is given.
* @return A feed management object for the data source.
*/
PY_API virtual voltu::FeedPtr open(const std::string &uri) = 0; PY_API virtual voltu::FeedPtr open(const std::string &uri) = 0;
/**
* @brief Get a list of all available rooms.
*
* A room is a 3D captured physical space, or a combination of such spaces,
* and is represented by a unique identifier within the local system. This
* method obtains a list of all available rooms from all sources. To obtain
* rooms, either use `open` or `createRoom`.
*
* @return A list of room ids, which can be empty.
*
* @see getRoom
* @see open
*/
PY_API virtual std::list<voltu::RoomId> listRooms() = 0; PY_API virtual std::list<voltu::RoomId> listRooms() = 0;
/**
* @brief Get a room instance from identifier.
*
* A room instance enables access to all data frames associated with that
* room, including image data. Calling `getRoom` with the same ID
* multiple times will return different smart pointers to room instances
* but provides access to the same data regardless and is valid. An invalid
* room ID will throw an exception.
*
* @throw voltu::exceptions::InvalidRoomId If the ID does not exist.
* @return Room instance or accessing room data.
*/
PY_API virtual voltu::RoomPtr getRoom(voltu::RoomId room) = 0; PY_API virtual voltu::RoomPtr getRoom(voltu::RoomId room) = 0;
/** Make a file or streaming feed, to which you can send frames. */ /** Make a file or streaming feed, to which you can send frames. */
PY_API virtual voltu::FeedPtr createFeed(const std::string &uri) = 0; PY_API virtual voltu::FeedPtr createFeed(const std::string &uri) = 0;
/** Make an empty operator pipeline for frame processing. */ /**
* @brief Make an empty operator pipeline for frame processing.
*
* A pipeline allows a sequence of processing operations to be applied to
* a data frame. These operations include stereo correspondence, fusion,
* data evaluation and various image processing operations. Only some
* of these operators are exposed in the SDK. Once a pipeline instance
* is obtained, you can add specific operators to it, configure them and
* then submit frames from processing.
*
* @return A unique pipeline instance.
*/
PY_API virtual voltu::PipelinePtr createPipeline() = 0; PY_API virtual voltu::PipelinePtr createPipeline() = 0;
}; };
} } // namespace voltu
/**
* @file channel.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
namespace voltu { namespace voltu {
......
/**
* @file errors.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include <exception> #include <exception>
...@@ -30,7 +36,7 @@ VOLTU_EXCEPTION(LibraryVersionMismatch, Exception, "Wrong version of library fou ...@@ -30,7 +36,7 @@ VOLTU_EXCEPTION(LibraryVersionMismatch, Exception, "Wrong version of library fou
VOLTU_EXCEPTION(BadSourceURI, Exception, "Bad source URI"); VOLTU_EXCEPTION(BadSourceURI, Exception, "Bad source URI");
VOLTU_EXCEPTION(InvalidFrameObject, Exception, "Invalid Frame object"); VOLTU_EXCEPTION(InvalidFrameObject, Exception, "Invalid Frame object");
VOLTU_EXCEPTION(InternalRenderError, Exception, "Internal renderer error"); VOLTU_EXCEPTION(InternalRenderError, Exception, "Internal renderer error");
VOLTU_EXCEPTION(InvalidProperty, Exception, "Unknown property enum"); VOLTU_EXCEPTION(InvalidRoomId, Exception, "Room identifier does not exist");
VOLTU_EXCEPTION(PropertyUnavailable, Exception, "Property currently not available"); VOLTU_EXCEPTION(PropertyUnavailable, Exception, "Property currently not available");
VOLTU_EXCEPTION(BadPropertyName, Exception, "Not a valid property name"); VOLTU_EXCEPTION(BadPropertyName, Exception, "Not a valid property name");
VOLTU_EXCEPTION(BadPropertyType, Exception, "Incorrect property data type"); VOLTU_EXCEPTION(BadPropertyType, Exception, "Incorrect property data type");
......
/**
* @file frame.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include "../defines.hpp" #include "../defines.hpp"
......
/**
* @file image.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include "../defines.hpp" #include "../defines.hpp"
......
/**
* @file intrinsics.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
namespace voltu namespace voltu
......
/**
* @file pointcloud.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include <memory> #include <memory>
......
/**
* @file property.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
#include "../defines.hpp" #include "../defines.hpp"
......
/**
* @file voltu.hpp
* @copyright Copyright (c) 2020 Nicolas Pope, MIT License
* @author Nicolas Pope
*/
#pragma once #pragma once
// Bump these for each release // Bump these for each release
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment