Created
November 25, 2019 20:31
-
-
Save dropmeaword/339577e95f6c0c8df80d51750ceb76e5 to your computer and use it in GitHub Desktop.
RealSense helper class for openFrameworks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __ALVINUTIL_HPP__ | |
#define __ALVINUTIL_HPP__ | |
#include <string> | |
#include <array> | |
#include <librealsense2/rs.hpp> | |
namespace alvin { | |
void enumerate() { | |
rs2::context ctx; | |
std::vector<rs2::pipeline> pipelines; | |
for(auto &&dev : ctx.query_devices()) { | |
rs2::pipeline pipe(ctx); | |
rs2::config cfg; | |
cfg.enable_device(dev.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER)); | |
pipe.start(cfg); | |
pipelines.emplace_back(pipe); | |
} | |
} // enumarate | |
}; | |
#endif // __ALVINUTIL_HPP__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment