12 #include "../../common/tiny-profiler.h" 13 #include "./../unit-tests-common.h" 14 #include "./../src/environment.h" 21 { { {
RS2_STREAM_DEPTH,
RS2_FORMAT_Z16, 1280, 1024, 0 },{
RS2_STREAM_COLOR,
RS2_FORMAT_YUYV, 2000, 1500, 0 } }, 30,
true },
22 { { {
RS2_STREAM_DEPTH,
RS2_FORMAT_Z16, 1280, 720, 0 },{
RS2_STREAM_COLOR,
RS2_FORMAT_YUYV, 2000, 1500, 0 } }, 30,
true },
23 { { {
RS2_STREAM_DEPTH,
RS2_FORMAT_Z16, 960, 768, 0 },{
RS2_STREAM_COLOR,
RS2_FORMAT_YUYV, 2000, 1500, 0 } }, 30,
true },
24 { { {
RS2_STREAM_DEPTH,
RS2_FORMAT_Z16, 1280, 1024, 0 },{
RS2_STREAM_COLOR,
RS2_FORMAT_YUYV, 1920, 1080, 0 } }, 30,
true },
25 { { {
RS2_STREAM_DEPTH,
RS2_FORMAT_Z16, 1280, 720, 0 },{
RS2_STREAM_COLOR,
RS2_FORMAT_YUYV, 1920, 1080, 0 } }, 30,
true },
26 { { {
RS2_STREAM_DEPTH,
RS2_FORMAT_Z16, 960, 768, 0 },{
RS2_STREAM_COLOR,
RS2_FORMAT_YUYV, 1920, 1080, 0 } }, 30,
true },
27 { { {
RS2_STREAM_DEPTH,
RS2_FORMAT_Z16, 1280, 1024, 0 },{
RS2_STREAM_COLOR,
RS2_FORMAT_YUYV, 960, 720, 0 } }, 30,
true },
28 { { {
RS2_STREAM_DEPTH,
RS2_FORMAT_Z16, 1280, 720, 0 },{
RS2_STREAM_COLOR,
RS2_FORMAT_YUYV, 960, 720, 0 } }, 30,
true },
29 { { {
RS2_STREAM_DEPTH,
RS2_FORMAT_Z16, 960, 768, 0 },{
RS2_STREAM_COLOR,
RS2_FORMAT_YUYV, 960, 720, 0 } }, 30,
true },
55 for (
auto&& pf: test_cfg.streams)
56 cfg.
enable_stream(pf.stream, pf.index, pf.width, pf.height, pf.format, pf.fps);
60 for (
auto&& snr : pf.get_device().query_sensors())
68 std::this_thread::sleep_for(std::chrono::milliseconds(100));
70 std::this_thread::sleep_for(std::chrono::milliseconds(100));
76 const std::string disparity_filter_name =
"Disparity";
79 std::vector<rs2::filter>
filters;
82 filters.push_back(
std::move(depth_to_disparity));
83 filters.push_back(
std::move(temp_filter));
84 filters.push_back(
std::move(disparity_to_depth));
92 while (i < startup + 200)
120 auto h = pf.height();
121 std::stringstream ss;
122 ss <<
"_yuyv_" << w <<
"_" <<
h;
125 ss.clear(); ss.str(
""); ss << i - startup <<
"_yuyv_" << w <<
"_" << h <<
".bin";
138 auto uv_map =
reinterpret_cast<const char*
>(tex_ptr);
140 std::cout <<
"Frame size is " << w * h << std::endl;
142 ss.clear(); ss.str(
""); ss << i - startup <<
"_uv" << w <<
"_" << h << rgb_res <<
".bin";
151 ss.clear(); ss.str(
""); ss << i - startup <<
"_depth_" << w <<
"_" << h << rgb_res <<
".bin";
168 std::cout <<
"Iteration " << i - startup <<
" files were written" << std::endl;
178 auto fmt = test_cfg.streams[0];
183 for (
auto&& snr : pf.get_device().query_sensors())
190 pf = pipe.
start(cfg);
202 auto ir_frame =
frames.get_infrared_frame(1);
210 auto h = pf.height();
211 std::stringstream ss;
212 ss << i - startup <<
"_ir_" << w <<
"_" <<
h <<
".bin";
216 outfile.write((
const char*)ir_frame.get_data(), ir_frame.get_data_size());
219 std::cout <<
"Iteration " << i - startup <<
" files were written" << std::endl;
frameset wait_for_frames(unsigned int timeout_ms=RS2_DEFAULT_TIMEOUT) const
stream_profile get_profile() const
device_list query_devices() const
std::vector< device_profiles > uv_tests_configurations
GLint GLint GLsizei GLsizei GLsizei depth
void map_to(frame mapped)
GLdouble GLdouble GLdouble w
GLsizei const GLchar *const * string
GLfloat GLfloat GLfloat GLfloat h
const texture_coordinate * get_texture_coordinates() const
rs2::frame process(rs2::frame frame) const override
const vertex * get_vertices() const
TEST_CASE("Generate UV-MAP","[live]")
void enable_stream(rs2_stream stream_type, int stream_index, int width, int height, rs2_format format=RS2_FORMAT_ANY, int framerate=0)
pipeline_profile resolve(std::shared_ptr< rs2_pipeline > p) const
const GLuint GLenum const void * binary
typename::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
void log_to_console(rs2_log_severity min_severity)
GLdouble GLdouble GLint GLint const GLdouble * points