unit-tests-live.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
5 // This set of tests is valid for any number and combination of RealSense cameras, including R200 and F200 //
7 
8 #if !defined(MAKEFILE) || ( defined(LIVE_TEST) )
9 
10 #include "unit-tests-common.h"
11 
12 TEST_CASE( "Device metadata enumerates correctly", "[live]" )
13 {
14  // Require at least one device to be plugged in
16  const int device_count = rs_get_device_count(ctx, require_no_error());
17  REQUIRE(device_count > 0);
18 
19  // For each device
20  for(int i=0; i<device_count; ++i)
21  {
23  REQUIRE(dev != nullptr);
24 
25  SECTION( "device metadata strings are nonempty" )
26  {
27  REQUIRE( rs_get_device_name(dev, require_no_error()) != nullptr );
28  REQUIRE( rs_get_device_serial(dev, require_no_error()) != nullptr );
30  }
31 
32  SECTION( "device supports standard picture options" )
33  {
35  {
37  }
38  }
39  }
40 }
41 
43 // Test basic streaming functionality //
45 TEST_CASE("Start-Stop stream sequence", "[live]")
46 {
47  // Require at least one device to be plugged in
49  const int device_count = rs_get_device_count(ctx, require_no_error());
50  REQUIRE(device_count > 0);
51 
52  std::vector<rs_stream> supported_streams;
53 
54  // For each device
55  for(int i=0; i<device_count; ++i)
56  {
58  REQUIRE(dev != nullptr);
59 
62  supported_streams.push_back((rs_stream)i);
63 
64  // Configure all supported streams to run at 30 frames per second
65  for (auto & stream : supported_streams)
67 
68  for (int i = 0; i< 5; i++)
69  {
70  // Test sequence
73  }
74 
75  for (auto & stream : supported_streams)
77  }
78 }
79 
81 // Calibration information tests //
83 
84 TEST_CASE( "no extrinsic transformation between a stream and itself", "[live]" )
85 {
86  // Require at least one device to be plugged in
88  const int device_count = rs_get_device_count(ctx, require_no_error());
89  REQUIRE(device_count > 0);
90 
91  // For each device
92  for(int i=0; i<device_count; ++i)
93  {
95  REQUIRE(dev != nullptr);
96 
97  for(int j=0; j<RS_STREAM_COUNT; ++j)
98  {
99  rs_extrinsics extrin = {};
100  rs_error * e = nullptr;
101  rs_get_device_extrinsics(dev, (rs_stream)j, (rs_stream)j, &extrin, &e);
102  if (!e) // if device is not calibrated, rs_get_device_extrinsic has to return an error
103  {
106  }
107  }
108  }
109 }
110 
111 TEST_CASE( "extrinsic transformation between two streams is a rigid transform", "[live]" )
112 {
113  // Require at least one device to be plugged in
115  const int device_count = rs_get_device_count(ctx, require_no_error());
116  REQUIRE(device_count > 0);
117 
118  // For each device
119  for(int i=0; i<device_count; ++i)
120  {
122  REQUIRE(dev != nullptr);
123 
124  // For every pair of streams
125  for(int j=0; j<RS_STREAM_COUNT; ++j)
126  {
127  const rs_stream stream_a = (rs_stream)j;
128 
129  for(int k=j+1; k<RS_STREAM_COUNT; ++k)
130  {
131  const rs_stream stream_b = (rs_stream)k;
132 
133  // Extrinsics from A to B should have an orthonormal 3x3 rotation matrix and a translation vector of magnitude less than 10cm
134  rs_extrinsics a_to_b = {};
135 
136  rs_error * e = nullptr;
137 
138  rs_get_device_extrinsics(dev, stream_a, stream_b, &a_to_b, &e);
139 
140  if (!e)
141  {
143  REQUIRE( vector_length(a_to_b.translation) < 0.1f );
144 
145  // Extrinsics from B to A should be the inverse of extrinsics from A to B
146  rs_extrinsics b_to_a = {};
147  rs_get_device_extrinsics(dev, stream_b, stream_a, &b_to_a, require_no_error());
148  require_transposed(a_to_b.rotation, b_to_a.rotation);
149  REQUIRE( b_to_a.rotation[0] * a_to_b.translation[0] + b_to_a.rotation[3] * a_to_b.translation[1] + b_to_a.rotation[6] * a_to_b.translation[2] == Approx(-b_to_a.translation[0]) );
150  REQUIRE( b_to_a.rotation[1] * a_to_b.translation[0] + b_to_a.rotation[4] * a_to_b.translation[1] + b_to_a.rotation[7] * a_to_b.translation[2] == Approx(-b_to_a.translation[1]) );
151  REQUIRE( b_to_a.rotation[2] * a_to_b.translation[0] + b_to_a.rotation[5] * a_to_b.translation[1] + b_to_a.rotation[8] * a_to_b.translation[2] == Approx(-b_to_a.translation[2]) );
152  }
153  }
154  }
155  }
156 }
157 
158 TEST_CASE( "extrinsic transformations are transitive", "[live]" )
159 {
160  // Require at least one device to be plugged in
162  const int device_count = rs_get_device_count(ctx, require_no_error());
163  REQUIRE(device_count > 0);
164 
165  // For each device
166  for(int i=0; i<device_count; ++i)
167  {
169  REQUIRE(dev != nullptr);
170 
171  // For every pair of streams
172  for(int a=0; a<RS_STREAM_COUNT; ++a)
173  {
174  for(int b=0; b<RS_STREAM_COUNT; ++b)
175  {
176  for(int c=0; c<RS_STREAM_COUNT; ++c)
177  {
178  // Require that the composition of a_to_b and b_to_c is equal to a_to_c
179  rs_extrinsics a_to_b, b_to_c, a_to_c;
180  rs_error * a_to_b_e = nullptr,* a_to_c_e = nullptr, * b_to_c_e = nullptr;
181 
182  rs_get_device_extrinsics(dev, (rs_stream)a, (rs_stream)b, &a_to_b, &a_to_b_e);
183  rs_get_device_extrinsics(dev, (rs_stream)b, (rs_stream)c, &b_to_c, &b_to_c_e);
184  rs_get_device_extrinsics(dev, (rs_stream)a, (rs_stream)c, &a_to_c, &a_to_c_e);
185 
186  if ((!a_to_b_e) && (!b_to_c_e) && (!a_to_c_e))
187  {
188  // a_to_c.rotation == a_to_b.rotation * b_to_c.rotation
189  REQUIRE( a_to_c.rotation[0] == Approx(a_to_b.rotation[0] * b_to_c.rotation[0] + a_to_b.rotation[3] * b_to_c.rotation[1] + a_to_b.rotation[6] * b_to_c.rotation[2]) );
190  REQUIRE( a_to_c.rotation[2] == Approx(a_to_b.rotation[2] * b_to_c.rotation[0] + a_to_b.rotation[5] * b_to_c.rotation[1] + a_to_b.rotation[8] * b_to_c.rotation[2]) );
191  REQUIRE( a_to_c.rotation[1] == Approx(a_to_b.rotation[1] * b_to_c.rotation[0] + a_to_b.rotation[4] * b_to_c.rotation[1] + a_to_b.rotation[7] * b_to_c.rotation[2]) );
192  REQUIRE( a_to_c.rotation[3] == Approx(a_to_b.rotation[0] * b_to_c.rotation[3] + a_to_b.rotation[3] * b_to_c.rotation[4] + a_to_b.rotation[6] * b_to_c.rotation[5]) );
193  REQUIRE( a_to_c.rotation[4] == Approx(a_to_b.rotation[1] * b_to_c.rotation[3] + a_to_b.rotation[4] * b_to_c.rotation[4] + a_to_b.rotation[7] * b_to_c.rotation[5]) );
194  REQUIRE( a_to_c.rotation[5] == Approx(a_to_b.rotation[2] * b_to_c.rotation[3] + a_to_b.rotation[5] * b_to_c.rotation[4] + a_to_b.rotation[8] * b_to_c.rotation[5]) );
195  REQUIRE( a_to_c.rotation[6] == Approx(a_to_b.rotation[0] * b_to_c.rotation[6] + a_to_b.rotation[3] * b_to_c.rotation[7] + a_to_b.rotation[6] * b_to_c.rotation[8]) );
196  REQUIRE( a_to_c.rotation[7] == Approx(a_to_b.rotation[1] * b_to_c.rotation[6] + a_to_b.rotation[4] * b_to_c.rotation[7] + a_to_b.rotation[7] * b_to_c.rotation[8]) );
197  REQUIRE( a_to_c.rotation[8] == Approx(a_to_b.rotation[2] * b_to_c.rotation[6] + a_to_b.rotation[5] * b_to_c.rotation[7] + a_to_b.rotation[8] * b_to_c.rotation[8]) );
198 
199  // a_to_c.translation = a_to_b.transform(b_to_c.translation)
200  REQUIRE( a_to_c.translation[0] == Approx(a_to_b.rotation[0] * b_to_c.translation[0] + a_to_b.rotation[3] * b_to_c.translation[1] + a_to_b.rotation[6] * b_to_c.translation[2] + a_to_b.translation[0]) );
201  REQUIRE( a_to_c.translation[1] == Approx(a_to_b.rotation[1] * b_to_c.translation[0] + a_to_b.rotation[4] * b_to_c.translation[1] + a_to_b.rotation[7] * b_to_c.translation[2] + a_to_b.translation[1]) );
202  REQUIRE( a_to_c.translation[2] == Approx(a_to_b.rotation[2] * b_to_c.translation[0] + a_to_b.rotation[5] * b_to_c.translation[1] + a_to_b.rotation[8] * b_to_c.translation[2] + a_to_b.translation[2]) );
203  }
204  }
205  }
206  }
207  }
208 }
209 
210 TEST_CASE( "aligned images have no extrinsic transformation from the image they are aligned to", "[live]" )
211 {
212  // Require at least one device to be plugged in
214  const int device_count = rs_get_device_count(ctx, require_no_error());
215  REQUIRE(device_count > 0);
216 
217  // For each device
218  for(int i=0; i<device_count; ++i)
219  {
221  REQUIRE(dev != nullptr);
222 
223  // Require no TRANSLATION (but rotation is acceptable) between RECTIFIED_COLOR and COLOR (because they come from the same imager)
224  rs_extrinsics extrin = {};
227 
228  // Require no extrinsic transformation between COLOR_ALIGNED_TO_DEPTH and DEPTH (because, by definition, they are aligned)
232 
233  // Require no extrinsic transformation between DEPTH_ALIGNED_TO_COLOR and COLOR (because, by definition, they are aligned)
237 
238  // Require no extrinsic transformation between DEPTH_ALIGNED_TO_RECTIFIED_COLOR and RECTIFIED_COLOR (because, by definition, they are aligned)
242  }
243 }
244 
245 TEST_CASE( "streaming mode intrinsics are sane", "[live]" )
246 {
247  // Require at least one device to be plugged in
249  const int device_count = rs_get_device_count(ctx, require_no_error());
250  REQUIRE(device_count > 0);
251 
252  // For each device
253  for(int i=0; i<device_count; ++i)
254  {
256  REQUIRE(dev != nullptr);
257 
258  // For each of the basic streams
260  {
261  // Require that there are modes for this stream
262  const int stream_mode_count = rs_get_stream_mode_count(dev, stream, require_no_error());
263  REQUIRE(stream_mode_count > 0);
264 
265  // For each streaming mode
266  for(int j=0; j<stream_mode_count; ++j)
267  {
268  // Retrieve mode settings
269  int width = 0, height = 0, framerate = 0;
271  rs_get_stream_mode(dev, stream, j, &width, &height, &format, &framerate, require_no_error());
272 
273  // Require that the mode settings are sane
274  REQUIRE( width >= 320 );
275  REQUIRE( width <= 1920 );
276  REQUIRE( height >= 180 );
277  REQUIRE( height <= 1080 );
278  REQUIRE( format > RS_FORMAT_ANY );
279  REQUIRE( format < RS_FORMAT_COUNT );
280  REQUIRE( framerate >= 2 );
281  REQUIRE( framerate <= 300 );
282 
283  // Require that we can set the stream to this mode
284  rs_enable_stream(dev, stream, width, height, format, framerate, require_no_error());
288 
289  // Intrinsic width/height must match width/height of streaming mode we requested
290  rs_intrinsics intrin;
292  REQUIRE( intrin.width == width );
293  REQUIRE( intrin.height == height );
294 
295  // Principal point must be within center 20% of image
296  REQUIRE( intrin.ppx > width * 0.4f );
297  REQUIRE( intrin.ppx < width * 0.6f );
298  REQUIRE( intrin.ppy > height * 0.4f );
299  REQUIRE( intrin.ppy < height * 0.6f );
300 
301  // Focal length must be nonnegative (todo - Refine requirements based on known expected FOV)
302  REQUIRE( intrin.fx > 0.0f );
303  REQUIRE( intrin.fy > 0.0f );
304 
305  // Require that we can disable the stream afterwards
308  }
309 
310  // Require that we cannot retrieve intrinsic/format/framerate when stream is disabled
312  rs_intrinsics intrin;
313  rs_get_stream_intrinsics(dev, stream, &intrin, require_error(std::string("stream not enabled: ") + rs_stream_to_string(stream)));
316  }
317  }
318 }
319 
320 //TEST_CASE( "synthetic streaming mode properties are correct", "[live]" )
321 //{
322 // // Require at least one device to be plugged in
323 // safe_context ctx;
324 // const int device_count = rs_get_device_count(ctx, require_no_error());
325 // REQUIRE(device_count > 0);
326 //
327 // // For each device
328 // for(int i=0; i<device_count; ++i)
329 // {
330 // rs_device * dev = rs_get_device(ctx, 0, require_no_error());
331 // REQUIRE(dev != nullptr);
332 //
333 // // For each combination of COLOR and DEPTH streaming modes
334 // const int color_mode_count = rs_get_stream_mode_count(dev, RS_STREAM_COLOR, require_no_error());
335 // const int depth_mode_count = rs_get_stream_mode_count(dev, RS_STREAM_DEPTH, require_no_error());
336 // for(int j=0; j<color_mode_count; ++j)
337 // {
338 // // Enable a COLOR mode and retrieve intrinsics
339 // int color_width = 0, color_height = 0, color_framerate = 0; rs_format color_format = RS_FORMAT_ANY;
340 // rs_get_stream_mode(dev, RS_STREAM_COLOR, j, &color_width, &color_height, &color_format, &color_framerate, require_no_error());
341 // rs_enable_stream(dev, RS_STREAM_COLOR, color_width, color_height, color_format, color_framerate, require_no_error());
342 //
343 // rs_intrinsics color_intrin = {};
344 // rs_get_stream_intrinsics(dev, RS_STREAM_COLOR, &color_intrin, require_no_error());
345 //
346 // // Validate that RECTIFIED_COLOR properties match size/format/framerate of COLOR, and have no distortion
347 // REQUIRE( rs_get_stream_format(dev, RS_STREAM_RECTIFIED_COLOR, require_no_error()) == color_format );
348 // REQUIRE( rs_get_stream_framerate(dev, RS_STREAM_RECTIFIED_COLOR, require_no_error()) == color_framerate );
349 //
350 // rs_intrinsics rectified_color_intrin = {};
351 // rs_get_stream_intrinsics(dev, RS_STREAM_RECTIFIED_COLOR, &rectified_color_intrin, require_no_error());
352 // REQUIRE( rectified_color_intrin.width == color_width );
353 // REQUIRE( rectified_color_intrin.height == color_height );
354 // REQUIRE( rectified_color_intrin.ppx > color_width * 0.4f );
355 // REQUIRE( rectified_color_intrin.ppx < color_width * 0.6f );
356 // REQUIRE( rectified_color_intrin.ppy > color_height * 0.4f );
357 // REQUIRE( rectified_color_intrin.ppy < color_height * 0.6f );
358 // REQUIRE( rectified_color_intrin.fx > 0.0f );
359 // REQUIRE( rectified_color_intrin.fy > 0.0f );
360 // REQUIRE( rectified_color_intrin.model == RS_DISTORTION_NONE );
361 // for(int k=0; k<5; ++k) REQUIRE( rectified_color_intrin.coeffs[k] == 0.0f );
362 //
363 // for(int k=0; k<depth_mode_count; ++k)
364 // {
365 // // Enable a DEPTH mode and retrieve intrinsics
366 // int depth_width = 0, depth_height = 0, depth_framerate = 0; rs_format depth_format = RS_FORMAT_ANY;
367 // rs_get_stream_mode(dev, RS_STREAM_DEPTH, k, &depth_width, &depth_height, &depth_format, &depth_framerate, require_no_error());
368 // rs_enable_stream(dev, RS_STREAM_DEPTH, depth_width, depth_height, depth_format, color_framerate, require_no_error());
369 //
370 // rs_intrinsics depth_intrin = {};
371 // rs_get_stream_intrinsics(dev, RS_STREAM_DEPTH, &depth_intrin, require_no_error());
372 //
373 // // COLOR_ALIGNED_TO_DEPTH must have same format/framerate as COLOR
374 // REQUIRE( rs_get_stream_format(dev, RS_STREAM_COLOR_ALIGNED_TO_DEPTH, require_no_error()) == color_format );
375 // REQUIRE( rs_get_stream_framerate(dev, RS_STREAM_COLOR_ALIGNED_TO_DEPTH, require_no_error()) == color_framerate );
376 //
377 // // COLOR_ALIGNED_TO_DEPTH must have same intrinsics as DEPTH
378 // rs_intrinsics color_aligned_to_depth_intrin = {};
379 // rs_get_stream_intrinsics(dev, RS_STREAM_COLOR_ALIGNED_TO_DEPTH, &color_aligned_to_depth_intrin, require_no_error());
380 // REQUIRE( color_aligned_to_depth_intrin.width == depth_intrin.width );
381 // REQUIRE( color_aligned_to_depth_intrin.height == depth_intrin.height );
382 // REQUIRE( color_aligned_to_depth_intrin.ppx == depth_intrin.ppx );
383 // REQUIRE( color_aligned_to_depth_intrin.ppy == depth_intrin.ppy );
384 // REQUIRE( color_aligned_to_depth_intrin.fx == depth_intrin.fx );
385 // REQUIRE( color_aligned_to_depth_intrin.fy == depth_intrin.fy );
386 // REQUIRE( color_aligned_to_depth_intrin.model == depth_intrin.model );
387 // for(int l=0; l<5; ++l) REQUIRE( color_aligned_to_depth_intrin.coeffs[l] == depth_intrin.coeffs[l] );
388 //
389 // // DEPTH_ALIGNED_TO_COLOR must have same format/framerate as DEPTH
390 // REQUIRE( rs_get_stream_format(dev, RS_STREAM_DEPTH_ALIGNED_TO_COLOR, require_no_error()) == depth_format );
391 // REQUIRE( rs_get_stream_framerate(dev, RS_STREAM_DEPTH_ALIGNED_TO_COLOR, require_no_error()) == color_framerate );
392 //
393 // // DEPTH_ALIGNED_TO_COLOR must have same intrinsics as COLOR
394 // rs_intrinsics depth_aligned_to_color_intrin = {};
395 // rs_get_stream_intrinsics(dev, RS_STREAM_DEPTH_ALIGNED_TO_COLOR, &depth_aligned_to_color_intrin, require_no_error());
396 // REQUIRE( depth_aligned_to_color_intrin.width == color_intrin.width );
397 // REQUIRE( depth_aligned_to_color_intrin.height == color_intrin.height );
398 // REQUIRE( depth_aligned_to_color_intrin.ppx == color_intrin.ppx );
399 // REQUIRE( depth_aligned_to_color_intrin.ppy == color_intrin.ppy );
400 // REQUIRE( depth_aligned_to_color_intrin.fx == color_intrin.fx );
401 // REQUIRE( depth_aligned_to_color_intrin.fy == color_intrin.fy );
402 // REQUIRE( depth_aligned_to_color_intrin.model == color_intrin.model );
403 // for(int l=0; l<5; ++l) REQUIRE( depth_aligned_to_color_intrin.coeffs[l] == color_intrin.coeffs[l] );
404 //
405 // // DEPTH_ALIGNED_TO_RECTIFIED_COLOR must have same format/framerate as DEPTH
406 // REQUIRE( rs_get_stream_format(dev, RS_STREAM_DEPTH_ALIGNED_TO_RECTIFIED_COLOR, require_no_error()) == depth_format );
407 // REQUIRE( rs_get_stream_framerate(dev, RS_STREAM_DEPTH_ALIGNED_TO_RECTIFIED_COLOR, require_no_error()) == color_framerate );
408 //
409 // // DEPTH_ALIGNED_TO_RECTIFIED_COLOR must have same intrinsics as RECTIFIED_COLOR
410 // rs_intrinsics depth_aligned_to_rectified_color_intrin = {};
411 // rs_get_stream_intrinsics(dev, RS_STREAM_DEPTH_ALIGNED_TO_RECTIFIED_COLOR, &depth_aligned_to_rectified_color_intrin, require_no_error());
412 // REQUIRE( depth_aligned_to_rectified_color_intrin.width == rectified_color_intrin.width );
413 // REQUIRE( depth_aligned_to_rectified_color_intrin.height == rectified_color_intrin.height );
414 // REQUIRE( depth_aligned_to_rectified_color_intrin.ppx == rectified_color_intrin.ppx );
415 // REQUIRE( depth_aligned_to_rectified_color_intrin.ppy == rectified_color_intrin.ppy );
416 // REQUIRE( depth_aligned_to_rectified_color_intrin.fx == rectified_color_intrin.fx );
417 // REQUIRE( depth_aligned_to_rectified_color_intrin.fy == rectified_color_intrin.fy );
418 // REQUIRE( depth_aligned_to_rectified_color_intrin.model == rectified_color_intrin.model );
419 // for(int l=0; l<5; ++l) REQUIRE( depth_aligned_to_rectified_color_intrin.coeffs[l] == rectified_color_intrin.coeffs[l] );
420 // }
421 // }
422 // }
423 //}
424 
425 #endif /* !defined(MAKEFILE) || ( defined(LIVE_TEST) ) */
int rs_supports(rs_device *device, rs_capabilities capability, rs_error **error)
Determines device capabilities.
Definition: rs.cpp:442
void rs_get_stream_intrinsics(const rs_device *device, rs_stream stream, rs_intrinsics *intrin, rs_error **error)
Retrieves intrinsic camera parameters for a specific stream.
Definition: rs.cpp:289
const char * rs_stream_to_string(rs_stream stream)
Definition: rs.cpp:754
Definition: rs.cpp:16
rs_error * e
int rs_get_device_count(const rs_context *context, rs_error **error)
Determines number of connected devices.
Definition: rs.cpp:113
GLint GLint GLsizei GLsizei height
Definition: glext.h:112
float ppy
Definition: rs.h:305
GLsizei const GLchar *const * string
Definition: glext.h:683
#define REQUIRE(expr)
Definition: catch.hpp:9333
const char * rs_get_device_name(const rs_device *device, rs_error **error)
Retrieves human-readable device model string.
Definition: rs.cpp:128
rs_option
Defines general configuration controls.
Definition: rs.h:128
GLuint GLuint stream
Definition: glext.h:1774
void require_zero_vector(const float(&vector)[3])
void rs_get_stream_mode(const rs_device *device, rs_stream stream, int index, int *width, int *height, rs_format *format, int *framerate, rs_error **error)
Determines the properties of a specific streaming mode.
Definition: rs.cpp:198
int rs_get_stream_mode_count(const rs_device *device, rs_stream stream, rs_error **error)
Determines the number of streaming modes available for a given stream.
Definition: rs.cpp:190
float translation[3]
Definition: rs.h:335
rs_format rs_get_stream_format(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the pixel format for a specific stream.
Definition: rs.cpp:273
void rs_disable_stream(rs_device *device, rs_stream stream, rs_error **error)
Disables a specific stream.
Definition: rs.cpp:241
const GLubyte * c
Definition: glext.h:11542
void rs_get_device_extrinsics(const rs_device *device, rs_stream from_stream, rs_stream to_stream, rs_extrinsics *extrin, rs_error **error)
Retrieves extrinsic transformation between the viewpoints of two different streams.
Definition: rs.cpp:163
int rs_device_supports_option(const rs_device *device, rs_option option, rs_error **error)
Determines if the device allows a specific option to be queried and set.
Definition: rs.cpp:182
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
void require_rotation_matrix(const float(&matrix)[9])
const char * rs_get_device_firmware_version(const rs_device *device, rs_error **error)
Retrieves the version of the firmware currently installed on the device.
Definition: rs.cpp:156
void require_transposed(const float(&a)[9], const float(&b)[9])
void rs_enable_stream(rs_device *device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_error **error)
Enables a specific stream and requests specific properties.
Definition: rs.cpp:220
rs_format
Formats: defines how each stream can be encoded.
Definition: rs.h:53
float vector_length(const float(&v)[3])
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:1104
auto ctx
int height
Definition: rs.h:303
float fy
Definition: rs.h:307
TEST_CASE("Device metadata enumerates correctly","[live]")
int width
Definition: rs.h:302
Video stream intrinsics.
Definition: rs.h:300
void require_identity_matrix(const float(&matrix)[9])
GLboolean GLboolean GLboolean b
Definition: glext.h:1104
Cross-stream extrinsics: encode the topology describing how the different devices are connected...
Definition: rs.h:332
int rs_get_stream_framerate(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the frame rate for a specific stream.
Definition: rs.cpp:281
float rotation[9]
Definition: rs.h:334
rs_stream
Streams are different types of data provided by RealSense devices.
Definition: rs.h:33
GLint GLint GLsizei width
Definition: glext.h:112
rs_device * dev
float fx
Definition: rs.h:306
rs_capabilities
Specifies various capabilities of a RealSense device.
Definition: rs.h:213
rs_device * rs_get_device(rs_context *context, int index, rs_error **error)
Retrieves connected device by index.
Definition: rs.cpp:120
const char * rs_get_device_serial(const rs_device *device, rs_error **error)
Retrieves unique serial number of the device.
Definition: rs.cpp:135
void rs_enable_stream_preset(rs_device *device, rs_stream stream, rs_preset preset, rs_error **error)
Enables a specific stream and requests properties using a preset.
Definition: rs.cpp:232
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:112
#define SECTION(name, description)
Definition: catch.hpp:9370
void rs_start_device(rs_device *device, rs_error **error)
Begins streaming on all enabled streams for this device.
Definition: rs.cpp:383
void rs_stop_device(rs_device *device, rs_error **error)
Ends data acquisition for the specified source providers.
Definition: rs.cpp:398
float ppx
Definition: rs.h:304
int rs_is_stream_enabled(const rs_device *device, rs_stream stream, rs_error **error)
Determines if a specific stream is enabled.
Definition: rs.cpp:249


librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:18