NVIDIA DeepStream SDK API Reference

9.2 Release
sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2017 Intel Corporation. All Rights Reserved.
3 
4 #ifndef LIBREALSENSE_RS2_FRAME_HPP
5 #define LIBREALSENSE_RS2_FRAME_HPP
6 
7 #include "rs_types.hpp"
8 
9 namespace rs2
10 {
11  class frame_source;
12  class frame_queue;
13  class syncer;
14  class processing_block;
15  class pointcloud;
16  class sensor;
17  class frame;
18  class pipeline_profile;
19  class points;
20  class video_stream_profile;
21 
23  {
24  public:
28  stream_profile() : _profile(nullptr) {}
29 
34  int stream_index() const { return _index; }
39  rs2_stream stream_type() const { return _type; }
44  rs2_format format() const { return _format; }
49  int fps() const { return _framerate; }
54  int unique_id() const { return _uid; }
55 
64  {
65  rs2_error* e = nullptr;
66  auto ref = rs2_clone_stream_profile(_profile, type, index, format, &e);
67  error::handle(e);
68  stream_profile res(ref);
69  res._clone = std::shared_ptr<rs2_stream_profile>(ref, [](rs2_stream_profile* r) { rs2_delete_stream_profile(r); });
70 
71  return res;
72  }
73 
79  bool operator==(const stream_profile& rhs)
80  {
81  return stream_index() == rhs.stream_index() &&
82  stream_type() == rhs.stream_type() &&
83  format() == rhs.format() &&
84  fps() == rhs.fps();
85  }
86 
91  template<class T>
92  bool is() const
93  {
94  T extension(*this);
95  return extension;
96  }
97 
102  template<class T>
103  T as() const
104  {
105  T extension(*this);
106  return extension;
107  }
108 
113  std::string stream_name() const
114  {
115  std::stringstream ss;
117  if (stream_index() != 0) ss << " " << stream_index();
118  return ss.str();
119  }
120 
125  bool is_default() const { return _default; }
126 
131  operator bool() const { return _profile != nullptr; }
132 
137  const rs2_stream_profile* get() const { return _profile; }
138 
149  {
150  rs2_error* e = nullptr;
151  rs2_extrinsics res;
152  rs2_get_extrinsics(get(), to.get(), &res, &e);
153  error::handle(e);
154  return res;
155  }
163  {
164  rs2_error* e = nullptr;
165  rs2_register_extrinsics(get(), to.get(), extrinsics, &e);
166  error::handle(e);
167  }
168 
169  bool is_cloned() { return bool(_clone); }
170  explicit stream_profile(const rs2_stream_profile* profile) : _profile(profile)
171  {
172  rs2_error* e = nullptr;
174  error::handle(e);
175 
177  error::handle(e);
178 
179  }
180  operator const rs2_stream_profile*() { return _profile; }
181  explicit operator std::shared_ptr<rs2_stream_profile>() { return _clone; }
182 
183  protected:
184  friend class rs2::sensor;
185  friend class rs2::frame;
186  friend class rs2::pipeline_profile;
188 
190  std::shared_ptr<rs2_stream_profile> _clone;
191 
192  int _index = 0;
193  int _uid = 0;
194  int _framerate = 0;
197 
198  bool _default = false;
199  };
200 
202  {
203  public:
209  : stream_profile(sp)
210  {
211  rs2_error* e = nullptr;
212  if ((rs2_stream_profile_is(sp.get(), RS2_EXTENSION_VIDEO_PROFILE, &e) == 0 && !e))
213  {
214  _profile = nullptr;
215  }
216  error::handle(e);
217 
218  if (_profile)
219  {
220  rs2_get_video_stream_resolution(_profile, &_width, &_height, &e);
221  error::handle(e);
222  }
223  }
224 
225  int width() const
226  {
227  return _width;
228  }
229 
230  int height() const
231  {
232  return _height;
233  }
239  {
240  rs2_error* e = nullptr;
241  rs2_intrinsics intr;
243  error::handle(e);
244  return intr;
245  }
246 
247  bool operator==(const video_stream_profile& other) const
248  {
249  return (((stream_profile&)*this)==other &&
250  width() == other.width() &&
251  height() == other.height());
252  }
253 
254  using stream_profile::clone;
255 
266  stream_profile clone(rs2_stream type, int index, rs2_format format, int width, int height, const rs2_intrinsics& intr) const
267  {
268  rs2_error* e = nullptr;
269  auto ref = rs2_clone_video_stream_profile(_profile, type, index, format, width, height, &intr, &e);
270  error::handle(e);
271  stream_profile res(ref);
272  res._clone = std::shared_ptr<rs2_stream_profile>(ref, [](rs2_stream_profile* r) { rs2_delete_stream_profile(r); });
273 
274  return res;
275  }
276  private:
277  int _width = 0;
278  int _height = 0;
279  };
280 
281 
283  {
284  public:
290  : stream_profile(sp)
291  {
292  rs2_error* e = nullptr;
293  if ((rs2_stream_profile_is(sp.get(), RS2_EXTENSION_MOTION_PROFILE, &e) == 0 && !e))
294  {
295  _profile = nullptr;
296  }
297  error::handle(e);
298  }
299 
305  {
306  rs2_error* e = nullptr;
308  rs2_get_motion_intrinsics(_profile, &intrin, &e);
309  error::handle(e);
310  return intrin;
311  }
312  };
313 
315  {
316  public:
322  : stream_profile(sp)
323  {
324  rs2_error* e = nullptr;
325  if ((rs2_stream_profile_is(sp.get(), RS2_EXTENSION_POSE_PROFILE, &e) == 0 && !e))
326  {
327  _profile = nullptr;
328  }
329  error::handle(e);
330  }
331  };
332 
337  {
338  public:
339  virtual rs2::frame process(rs2::frame frame) const = 0;
340  virtual ~filter_interface() = default;
341  };
342 
343  class frame
344  {
345  public:
349  frame() : frame_ref(nullptr) {}
354  frame(rs2_frame* ref) : frame_ref(ref)
355  {
356 #ifdef _DEBUG
357  if (ref)
358  {
359  rs2_error* e = nullptr;
360  auto r = rs2_get_frame_number(ref, &e);
361  if (!e)
362  frame_number = r;
363  auto s = rs2_get_frame_stream_profile(ref, &e);
364  if (!e)
365  profile = stream_profile(s);
366  }
367  else
368  {
369  frame_number = 0;
370  profile = stream_profile();
371  }
372 #endif
373  }
378  frame(frame&& other) noexcept : frame_ref(other.frame_ref)
379  {
380  other.frame_ref = nullptr;
381 #ifdef _DEBUG
382  frame_number = other.frame_number;
383  profile = other.profile;
384 #endif
385  }
391  {
392  swap(other);
393  return *this;
394  }
395 
400  frame(const frame& other)
401  : frame_ref(other.frame_ref)
402  {
403  if (frame_ref) add_ref();
404 #ifdef _DEBUG
405  frame_number = other.frame_number;
406  profile = other.profile;
407 #endif
408  }
413  void swap(frame& other)
414  {
415  std::swap(frame_ref, other.frame_ref);
416 
417 #ifdef _DEBUG
418  std::swap(frame_number, other.frame_number);
419  std::swap(profile, other.profile);
420 #endif
421  }
422 
427  {
428  if (frame_ref)
429  {
430  rs2_release_frame(frame_ref);
431  }
432  }
433 
437  void keep() { rs2_keep_frame(frame_ref); }
438 
443  operator bool() const { return frame_ref != nullptr; }
444 
446  {
447  rs2_error* e = nullptr;
448  auto r = rs2_get_frame_sensor(frame_ref, &e);
449  error::handle(e);
450  return r;
451  }
452 
474  double get_timestamp() const
475  {
476  rs2_error* e = nullptr;
477  auto r = rs2_get_frame_timestamp(frame_ref, &e);
478  error::handle(e);
479  return r;
480  }
481 
486  {
487  rs2_error* e = nullptr;
488  auto r = rs2_get_frame_timestamp_domain(frame_ref, &e);
489  error::handle(e);
490  return r;
491  }
492 
498  {
499  rs2_error* e = nullptr;
500  auto r = rs2_get_frame_metadata(frame_ref, frame_metadata, &e);
501  error::handle(e);
502  return r;
503  }
504 
510  {
511  rs2_error* e = nullptr;
512  auto r = rs2_supports_frame_metadata(frame_ref, frame_metadata, &e);
513  error::handle(e);
514  return r != 0;
515  }
516 
521  unsigned long long get_frame_number() const
522  {
523  rs2_error* e = nullptr;
524  auto r = rs2_get_frame_number(frame_ref, &e);
525  error::handle(e);
526  return r;
527  }
528 
533  const int get_data_size() const
534  {
535  rs2_error* e = nullptr;
536  auto r = rs2_get_frame_data_size(frame_ref, &e);
537  error::handle(e);
538  return r;
539  }
540 
545  const void* get_data() const
546  {
547  rs2_error* e = nullptr;
548  auto r = rs2_get_frame_data(frame_ref, &e);
549  error::handle(e);
550  return r;
551  }
552 
558  {
559  rs2_error* e = nullptr;
560  auto s = rs2_get_frame_stream_profile(frame_ref, &e);
561  error::handle(e);
562  return stream_profile(s);
563  }
564 
569  template<class T>
570  bool is() const
571  {
572  T extension(*this);
573  return extension;
574  }
579  template<class T>
580  T as() const
581  {
582  T extension(*this);
583  return extension;
584  }
585 
590  rs2_frame* get() const { return frame_ref; }
591  explicit operator rs2_frame*() { return frame_ref; }
592 
594  {
595  return filter.process(*this);
596  }
597 
598  protected:
604  void add_ref() const
605  {
606  rs2_error* e = nullptr;
607  rs2_frame_add_ref(frame_ref, &e);
608  error::handle(e);
609  }
610 
611  void reset()
612  {
613  if (frame_ref)
614  {
615  rs2_release_frame(frame_ref);
616  }
617  frame_ref = nullptr;
618  }
619 
620  private:
621  friend class rs2::frame_source;
622  friend class rs2::frame_queue;
623  friend class rs2::syncer;
624  friend class rs2::processing_block;
625  friend class rs2::pointcloud;
626  friend class rs2::points;
627 
628  rs2_frame* frame_ref;
629 
630 #ifdef _DEBUG
631  stream_profile profile;
632  unsigned long long frame_number = 0;
633 #endif
634  };
635 
636  class video_frame : public frame
637  {
638  public:
643  video_frame(const frame& f)
644  : frame(f)
645  {
646  rs2_error* e = nullptr;
647  if (!f || (rs2_is_frame_extendable_to(f.get(), RS2_EXTENSION_VIDEO_FRAME, &e) == 0 && !e))
648  {
649  reset();
650  }
651  error::handle(e);
652  }
653 
654 
659  int get_width() const
660  {
661  rs2_error* e = nullptr;
662  auto r = rs2_get_frame_width(get(), &e);
663  error::handle(e);
664  return r;
665  }
666 
671  int get_height() const
672  {
673  rs2_error* e = nullptr;
674  auto r = rs2_get_frame_height(get(), &e);
675  error::handle(e);
676  return r;
677  }
678 
684  {
685  rs2_error* e = nullptr;
686  auto r = rs2_get_frame_stride_in_bytes(get(), &e);
687  error::handle(e);
688  return r;
689  }
690 
695  int get_bits_per_pixel() const
696  {
697  rs2_error* e = nullptr;
698  auto r = rs2_get_frame_bits_per_pixel(get(), &e);
699  error::handle(e);
700  return r;
701  }
702 
707  int get_bytes_per_pixel() const { return get_bits_per_pixel() / 8; }
708 
717  bool extract_target_dimensions(rs2_calib_target_type calib_type, float* target_dims, unsigned int target_dims_size) const
718  {
719  rs2_error* e = nullptr;
720  rs2_extract_target_dimensions(get(), calib_type, target_dims, target_dims_size, &e);
721  error::handle(e);
722  return (e == nullptr);
723  }
724  };
725 
726  struct vertex {
727  float x, y, z;
728  operator const float*() const { return &x; }
729  };
731  float u, v;
732  operator const float*() const { return &u; }
733  };
734 
735  class points : public frame
736  {
737  public:
741  points() : frame(), _size(0) {}
742 
747  points(const frame& f)
748  : frame(f), _size(0)
749  {
750  rs2_error* e = nullptr;
751  if (!f || (rs2_is_frame_extendable_to(f.get(), RS2_EXTENSION_POINTS, &e) == 0 && !e))
752  {
753  reset();
754  }
755  error::handle(e);
756 
757  if (get())
758  {
759  _size = rs2_get_frame_points_count(get(), &e);
760  error::handle(e);
761  }
762  }
767  const vertex* get_vertices() const
768  {
769  rs2_error* e = nullptr;
770  auto res = rs2_get_frame_vertices(get(), &e);
771  error::handle(e);
772  return (const vertex*)res;
773  }
774 
780  void export_to_ply(const std::string& fname, video_frame texture)
781  {
782  rs2_frame* ptr = nullptr;
783  std::swap(texture.frame_ref, ptr);
784  rs2_error* e = nullptr;
785  rs2_export_to_ply(get(), fname.c_str(), ptr, &e);
786  error::handle(e);
787  }
793  {
794  rs2_error* e = nullptr;
795  auto res = rs2_get_frame_texture_coordinates(get(), &e);
796  error::handle(e);
797  return (const texture_coordinate*)res;
798  }
799 
800  size_t size() const
801  {
802  return _size;
803  }
804 
805  private:
806  size_t _size;
807  };
808 
809  class depth_frame : public video_frame
810  {
811  public:
816  depth_frame(const frame& f)
817  : video_frame(f)
818  {
819  rs2_error* e = nullptr;
820  if (!f || (rs2_is_frame_extendable_to(f.get(), RS2_EXTENSION_DEPTH_FRAME, &e) == 0 && !e))
821  {
822  reset();
823  }
824  error::handle(e);
825  }
826 
833  float get_distance(int x, int y) const
834  {
835  rs2_error * e = nullptr;
836  auto r = rs2_depth_frame_get_distance(get(), x, y, &e);
837  error::handle(e);
838  return r;
839  }
840 
845  float get_units() const
846  {
847  rs2_error * e = nullptr;
848  auto r = rs2_depth_frame_get_units( get(), &e );
849  error::handle( e );
850  return r;
851  }
852  };
853 
855  {
856  public:
862  : depth_frame(f)
863  {
864  rs2_error* e = nullptr;
865  if (!f || (rs2_is_frame_extendable_to(f.get(), RS2_EXTENSION_DISPARITY_FRAME, &e) == 0 && !e))
866  {
867  reset();
868  }
869  error::handle(e);
870  }
875  float get_baseline(void) const
876  {
877  rs2_error * e = nullptr;
879  error::handle(e);
880  return r;
881  }
882  };
883 
884  class motion_frame : public frame
885  {
886  public:
891  motion_frame(const frame& f)
892  : frame(f)
893  {
894  rs2_error* e = nullptr;
895  if (!f || (rs2_is_frame_extendable_to(f.get(), RS2_EXTENSION_MOTION_FRAME, &e) == 0 && !e))
896  {
897  reset();
898  }
899  error::handle(e);
900  }
906  {
907  auto data = reinterpret_cast<const float*>(get_data());
908  return rs2_vector{ data[0], data[1], data[2] };
909  }
910  };
911 
912  class pose_frame : public frame
913  {
914  public:
919  pose_frame(const frame& f)
920  : frame(f)
921  {
922  rs2_error* e = nullptr;
923  if (!f || (rs2_is_frame_extendable_to(f.get(), RS2_EXTENSION_POSE_FRAME, &e) == 0 && !e))
924  {
925  reset();
926  }
927  error::handle(e);
928  }
934  {
935  rs2_pose pose_data;
936  rs2_error* e = nullptr;
937  rs2_pose_frame_get_pose_data(get(), &pose_data, &e);
938  error::handle(e);
939  return pose_data;
940  }
941  };
942 
943  class frameset : public frame
944  {
945  public:
949  frameset() :_size(0) {};
954  frameset(const frame& f)
955  : frame(f), _size(0)
956  {
957  rs2_error* e = nullptr;
958  if (!f || (rs2_is_frame_extendable_to(f.get(), RS2_EXTENSION_COMPOSITE_FRAME, &e) == 0 && !e))
959  {
960  reset();
961  // TODO - consider explicit constructor to move resultion to compile time
962  }
963  error::handle(e);
964 
965  if (get())
966  {
967  _size = rs2_embedded_frames_count(get(), &e);
968  error::handle(e);
969  }
970  }
971 
979  {
980  frame result;
981  foreach_rs([&result, s, f](frame frm) {
982  if (!result && frm.get_profile().stream_type() == s && (f == RS2_FORMAT_ANY || f == frm.get_profile().format()))
983  {
984  result = std::move(frm);
985  }
986  });
987  return result;
988  }
996  {
997  auto frm = first_or_default(s, f);
998  if (!frm) throw error("Frame of requested stream type was not found!");
999  return frm;
1000  }
1001 
1007  {
1009  return f.as<depth_frame>();
1010  }
1016  {
1018 
1019  if (!f)
1020  {
1022  if (ir && ir.get_profile().format() == RS2_FORMAT_RGB8)
1023  f = ir;
1024  }
1025  return f;
1026  }
1032  video_frame get_infrared_frame(const size_t index = 0) const
1033  {
1034  frame f;
1035  if (!index)
1036  {
1038  }
1039  else
1040  {
1041  foreach_rs([&f, index](const frame& frm) {
1042  if (frm.get_profile().stream_type() == RS2_STREAM_INFRARED &&
1043  frm.get_profile().stream_index() == index) f = frm;
1044  });
1045  }
1046  return f;
1047  }
1048 
1054  video_frame get_fisheye_frame(const size_t index = 0) const
1055  {
1056  frame f;
1057  if (!index)
1058  {
1060  }
1061  else
1062  {
1063  foreach_rs([&f, index](const frame& frm) {
1064  if (frm.get_profile().stream_type() == RS2_STREAM_FISHEYE &&
1065  frm.get_profile().stream_index() == index) f = frm;
1066  });
1067  }
1068  return f;
1069  }
1070 
1076  pose_frame get_pose_frame(const size_t index = 0) const
1077  {
1078  frame f;
1079  if (!index)
1080  {
1082  }
1083  else
1084  {
1085  foreach_rs([&f, index](const frame& frm) {
1086  if (frm.get_profile().stream_type() == RS2_STREAM_POSE &&
1087  frm.get_profile().stream_index() == index) f = frm;
1088  });
1089  }
1090  return f.as<pose_frame>();
1091  }
1092 
1097  size_t size() const
1098  {
1099  return _size;
1100  }
1101 
1106  template<class T>
1107  void foreach_rs(T action) const
1108  {
1109  rs2_error* e = nullptr;
1110  auto count = size();
1111  for (size_t i = 0; i < count; i++)
1112  {
1113  auto fref = rs2_extract_frame(get(), (int)i, &e);
1114  error::handle(e);
1115 
1116  action(frame(fref));
1117  }
1118  }
1124  frame operator[](size_t index) const
1125  {
1126  rs2_error* e = nullptr;
1127  if (index < size())
1128  {
1129  auto fref = rs2_extract_frame(get(), (int)index, &e);
1130  error::handle(e);
1131  return frame(fref);
1132  }
1133 
1134  throw error("Requested index is out of range!");
1135  }
1136 
1137  class iterator : public std::iterator<std::forward_iterator_tag, frame>
1138  {
1139  public:
1140  iterator(const frameset* owner, size_t index = 0) : _index(index), _owner(owner) {}
1141  iterator& operator++() { ++_index; return *this; }
1142  bool operator==(const iterator& other) const { return _index == other._index; }
1143  bool operator!=(const iterator& other) const { return !(*this == other); }
1144 
1145  frame operator*() { return (*_owner)[_index]; }
1146  private:
1147  size_t _index = 0;
1148  const frameset* _owner;
1149  };
1150 
1151  iterator begin() const { return iterator(this); }
1152  iterator end() const { return iterator(this, size()); }
1153  private:
1154  size_t _size;
1155  };
1156 
1157  template<class T>
1159  {
1160  T on_frame_function;
1161  public:
1162  explicit frame_callback(T on_frame) : on_frame_function(on_frame) {}
1163 
1164  void on_frame(rs2_frame* fref) override
1165  {
1166  on_frame_function(frame{ fref });
1167  }
1168 
1169  void release() override { delete this; }
1170  };
1171 }
1172 #endif // LIBREALSENSE_RS2_FRAME_HPP
rs2_get_extrinsics
void rs2_get_extrinsics(const rs2_stream_profile *from, const rs2_stream_profile *to, rs2_extrinsics *extrin, rs2_error **error)
rs2::vertex
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:726
rs2_register_extrinsics
void rs2_register_extrinsics(const rs2_stream_profile *from, const rs2_stream_profile *to, rs2_extrinsics extrin, rs2_error **error)
rs2::frameset::get_fisheye_frame
video_frame get_fisheye_frame(const size_t index=0) const
Retrieve the fisheye monochrome video frame.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1054
rs2_vector
3D vector in Euclidean coordinate space
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:129
rs2::frameset::foreach_rs
void foreach_rs(T action) const
Template function, extract internal frame handles from the frameset and invoke the action function.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1107
rs2_get_frame_metadata
rs2_metadata_type rs2_get_frame_metadata(const rs2_frame *frame, rs2_frame_metadata_value frame_metadata, rs2_error **error)
retrieve metadata from frame handle
rs2::motion_stream_profile::motion_stream_profile
motion_stream_profile(const stream_profile &sp)
Stream profile instance which contains IMU-specific intrinsics.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:289
rs2::stream_profile::format
rs2_format format() const
Return the stream format.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:44
rs2::stream_profile::operator==
bool operator==(const stream_profile &rhs)
Comparison operator, compare if two stream profiles are the same.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:79
rs2::video_frame::get_stride_in_bytes
int get_stride_in_bytes() const
retrieve frame stride, meaning the actual line width in memory in bytes (not the logical image width)
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:683
rs2::frameset::get_depth_frame
depth_frame get_depth_frame() const
Retrieve the first depth frame, if no frame is found, return an empty frame instance.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1006
rs2_depth_frame_get_units
float rs2_depth_frame_get_units(const rs2_frame *frame, rs2_error **error)
retrieve the scaling factor to use when converting a depth frame's get_data() units to meters
RS2_EXTENSION_DEPTH_FRAME
@ RS2_EXTENSION_DEPTH_FRAME
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:180
rs2_delete_stream_profile
void rs2_delete_stream_profile(rs2_stream_profile *mode)
Delete stream profile allocated by rs2_clone_stream_profile Should not be called on stream profiles r...
rs2::frame
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:343
rs2::video_stream_profile::clone
stream_profile clone(rs2_stream type, int index, rs2_format format, int width, int height, const rs2_intrinsics &intr) const
Clone current profile and change the type, index and format to input parameters.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:266
rs2::video_stream_profile::get_intrinsics
rs2_intrinsics get_intrinsics() const
Get stream profile instrinsics attributes.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:238
rs2::frame_source
The source used to generate frames, which is usually done by the low level driver for each sensor.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp:18
rs2::frameset
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:943
rs2::depth_frame::get_distance
float get_distance(int x, int y) const
Provide the depth in meters at the given pixel.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:833
rs2_extrinsics
Cross-stream extrinsics: encodes the topology describing how the different devices are oriented.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:96
rs2::stream_profile
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:22
RS2_EXTENSION_POINTS
@ RS2_EXTENSION_POINTS
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:179
rs2::video_frame::extract_target_dimensions
bool extract_target_dimensions(rs2_calib_target_type calib_type, float *target_dims, unsigned int target_dims_size) const
Extract the target dimensions on the specific target.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:717
rs2_get_video_stream_intrinsics
void rs2_get_video_stream_intrinsics(const rs2_stream_profile *mode, rs2_intrinsics *intrinsics, rs2_error **error)
When called on a video profile, returns the intrinsics of specific stream configuration.
rs2::frame::get_sensor
rs2_sensor * get_sensor()
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:445
rs2::stream_profile::fps
int fps() const
Return the stream frame per second.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:49
rs2::stream_profile::stream_profile
stream_profile(const rs2_stream_profile *profile)
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:170
rs2::frame::is
bool is() const
Template function, checking if current instance is the type of another class.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:570
rs2::stream_profile::as
T as() const
Template function, casting the instance as another class type.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:103
rs2::disparity_frame::get_baseline
float get_baseline(void) const
Retrieve the distance between the two IR sensors.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:875
rs2::frameset::first
frame first(rs2_stream s, rs2_format f=RS2_FORMAT_ANY) const
Retrieve the first frame of a specific stream type and optionally with a specific format.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:995
rs2::points::get_vertices
const vertex * get_vertices() const
Retrieve the vertices of the point cloud.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:767
rs2::frame::swap
void swap(frame &other)
Swap the internal frame handle with the one in parameter.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:413
rs2::frame::keep
void keep()
keep the frame, otherwise if no refernce to the frame, the frame will be released.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:437
rs2::frame::operator=
frame & operator=(frame other)
Change the internal frame handle to the one in parameter, the function exchange the internal frame ha...
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:390
rs2_intrinsics
Video stream intrinsics.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:58
rs2_extract_frame
rs2_frame * rs2_extract_frame(rs2_frame *composite, int index, rs2_error **error)
Extract frame from within a composite frame.
rs2::vertex::z
float z
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:727
rs2::frame::apply_filter
frame apply_filter(filter_interface &filter)
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:593
rs2_get_frame_vertices
rs2_vertex * rs2_get_frame_vertices(const rs2_frame *frame, rs2_error **error)
When called on Points frame type, this method returns a pointer to an array of 3D vertices of the mod...
rs2_extract_target_dimensions
void rs2_extract_target_dimensions(const rs2_frame *frame, rs2_calib_target_type calib_type, float *target_dims, unsigned int target_dims_size, rs2_error **error)
Extract the target dimensions on the specific target.
rs2::frameset::first_or_default
frame first_or_default(rs2_stream s, rs2_format f=RS2_FORMAT_ANY) const
Retrieve the first frame of a specific stream and optionally with a specific format.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:978
rs2::stream_profile::_type
rs2_stream _type
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:196
rs2::frame::get_frame_number
unsigned long long get_frame_number() const
retrieve frame number (from frame handle)
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:521
rs2::texture_coordinate
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:730
rs2::stream_profile::stream_name
std::string stream_name() const
Return the string of stream name.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:113
rs2::stream_profile::stream_type
rs2_stream stream_type() const
Return the stream type.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:39
absl::swap_internal::swap
void swap()
rs2::stream_profile::clone
stream_profile clone(rs2_stream type, int index, rs2_format format) const
Clone the current profile and change the type, index and format to input parameters.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:63
rs2::pose_stream_profile::pose_stream_profile
pose_stream_profile(const stream_profile &sp)
Stream profile instance with an explicit pose extension type.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:321
rs2_stream_profile_is
int rs2_stream_profile_is(const rs2_stream_profile *mode, rs2_extension type, rs2_error **error)
Try to extend stream profile to an extension type.
rs2::motion_stream_profile::get_motion_intrinsics
rs2_motion_device_intrinsic get_motion_intrinsics() const
Returns scale/bias/covariances of a the motion sensors.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:304
RS2_EXTENSION_MOTION_FRAME
@ RS2_EXTENSION_MOTION_FRAME
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:177
RS2_STREAM_COLOR
@ RS2_STREAM_COLOR
Native stream of color data captured by RealSense device.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:46
rs_types.hpp
RS2_STREAM_DEPTH
@ RS2_STREAM_DEPTH
Native stream of depth data produced by RealSense device.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:45
rs2::frameset::iterator
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1137
rs2::frame::get_data
const void * get_data() const
retrieve data from frame handle
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:545
rs2::stream_profile::get_extrinsics_to
rs2_extrinsics get_extrinsics_to(const stream_profile &to) const
Operator implement, return the internal stream profile instance.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:148
rs2::frameset::operator[]
frame operator[](size_t index) const
Bracket operator retrieves back the frame from frameset using arrary notation.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1124
rs2::frameset::begin
iterator begin() const
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1151
rs2_get_frame_stride_in_bytes
int rs2_get_frame_stride_in_bytes(const rs2_frame *frame, rs2_error **error)
retrieve frame stride in bytes (number of bytes from start of line N to start of line N+1)
rs2::video_frame::get_bits_per_pixel
int get_bits_per_pixel() const
retrieve bits per pixel
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:695
rs2::texture_coordinate::u
float u
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:731
rs2_get_frame_data_size
int rs2_get_frame_data_size(const rs2_frame *frame, rs2_error **error)
retrieve data size from frame handle
rs2_release_frame
void rs2_release_frame(rs2_frame *frame)
relases the frame handle
rs2::frameset::get_pose_frame
pose_frame get_pose_frame(const size_t index=0) const
Retrieve the pose frame.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1076
rs2::stream_profile::_format
rs2_format _format
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:195
rs2::frame::supports_frame_metadata
bool supports_frame_metadata(rs2_frame_metadata_value frame_metadata) const
determine if the device allows a specific metadata to be queried
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:509
rs2_export_to_ply
void rs2_export_to_ply(const rs2_frame *frame, const char *fname, rs2_frame *texture, rs2_error **error)
When called on Points frame type, this method creates a ply file of the model with the given file nam...
rs2_motion_device_intrinsic
Motion device intrinsics: scale, bias, and variances.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:103
rs2::frame::get_timestamp
double get_timestamp() const
retrieve the time at which the frame was captured During the frame's lifetime it receives timestamps ...
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:474
rs2::depth_frame::depth_frame
depth_frame(const frame &f)
Extends the video_frame class with additional depth related attributes and functions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:816
rs2::stream_profile::stream_profile
stream_profile()
Class to store the profile of stream.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:28
rs2::video_stream_profile
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:201
rs2::vertex::y
float y
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:727
rs2::frameset::frameset
frameset(const frame &f)
Extends the frame class with additional frameset related attributes and functions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:954
rs2_depth_stereo_frame_get_baseline
float rs2_depth_stereo_frame_get_baseline(const rs2_frame *frame_ref, rs2_error **error)
Retrieve the stereoscopic baseline value from frame.
rs2::frame::frame
frame()
Base class for multiple frame extensions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:349
rs2::frame::frame
frame(frame &&other) noexcept
Change the internal frame handle to the one in parameter, then put the other frame internal frame han...
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:378
rs2_stream_profile
struct rs2_stream_profile rs2_stream_profile
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:269
rs2::points
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:735
rs2::processing_block
Define the processing block flow, inherit this class to generate your own processing_block.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp:233
rs2_sensor
struct rs2_sensor rs2_sensor
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:282
rs2_get_frame_timestamp_domain
rs2_timestamp_domain rs2_get_frame_timestamp_domain(const rs2_frame *frameset, rs2_error **error)
retrieve timestamp domain from frame handle.
rs2::frame::get
rs2_frame * get() const
Retrieve back the internal frame handle.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:590
rs2::vertex::x
float x
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:727
rs2::stream_profile::_clone
std::shared_ptr< rs2_stream_profile > _clone
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:190
rs2::stream_profile::is_cloned
bool is_cloned()
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:169
rs2::frameset::size
size_t size() const
Return the size of the frameset.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1097
rs2::frame_callback::on_frame
void on_frame(rs2_frame *fref) override
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1164
rs2::video_stream_profile::video_stream_profile
video_stream_profile(const stream_profile &sp)
Stream profile instance which contains additional video attributes.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:208
RS2_STREAM_ANY
@ RS2_STREAM_ANY
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:44
rs2_get_frame_timestamp
rs2_time_t rs2_get_frame_timestamp(const rs2_frame *frame, rs2_error **error)
retrieve timestamp from frame handle in milliseconds
rs2::syncer
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp:597
rs2::stream_profile::_default
bool _default
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:198
rs2_get_frame_width
int rs2_get_frame_width(const rs2_frame *frame, rs2_error **error)
retrieve frame width in pixels
rs2
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/rs.hpp:17
RS2_EXTENSION_VIDEO_FRAME
@ RS2_EXTENSION_VIDEO_FRAME
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:176
RS2_EXTENSION_VIDEO_PROFILE
@ RS2_EXTENSION_VIDEO_PROFILE
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:183
rs2::sensor
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_sensor.hpp:102
rs2::stream_profile::_profile
const rs2_stream_profile * _profile
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:189
rs2::frame::frame
frame(rs2_frame *ref)
Base class for multiple frame extensions with internal frame handle.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:354
rs2_get_motion_intrinsics
void rs2_get_motion_intrinsics(const rs2_stream_profile *mode, rs2_motion_device_intrinsic *intrinsics, rs2_error **error)
Obtain the intrinsics of a specific stream configuration from the device.
rs2_get_frame_sensor
rs2_sensor * rs2_get_frame_sensor(const rs2_frame *frame, rs2_error **error)
retrieve frame parent sensor from frame handle
rs2_frame
struct rs2_frame rs2_frame
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:261
rs2::video_frame::video_frame
video_frame(const frame &f)
Extends the frame class with additional video related attributes and functions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:643
RS2_STREAM_FISHEYE
@ RS2_STREAM_FISHEYE
Native stream of fish-eye (wide) data captured from the dedicate motion camera.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:48
rs2::video_frame::get_width
int get_width() const
returns image width in pixels
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:659
rs2::frameset::iterator::operator==
bool operator==(const iterator &other) const
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1142
rs2::frameset::end
iterator end() const
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1152
rs2::video_stream_profile::operator==
bool operator==(const video_stream_profile &other) const
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:247
rs2_keep_frame
void rs2_keep_frame(rs2_frame *frame)
communicate to the library you intend to keep the frame alive for a while this will remove the frame ...
rs2::stream_profile::_index
int _index
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:192
RS2_EXTENSION_COMPOSITE_FRAME
@ RS2_EXTENSION_COMPOSITE_FRAME
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:178
rs2_frame_metadata_value
rs2_frame_metadata_value
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame...
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_frame.h:29
rs2_pose
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:140
rs2::stream_profile::get
const rs2_stream_profile * get() const
Get back the internal stream profile instance.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:137
RS2_STREAM_INFRARED
@ RS2_STREAM_INFRARED
Native stream of infrared data captured by RealSense device.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:47
rs2_get_frame_texture_coordinates
rs2_pixel * rs2_get_frame_texture_coordinates(const rs2_frame *frame, rs2_error **error)
When called on Points frame type, this method returns a pointer to an array of texture coordinates pe...
rs2::frameset::iterator::operator*
frame operator*()
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1145
rs2::stream_profile::is_default
bool is_default() const
Checks if stream profile is marked/assigned as default, meaning that the profile will be selected whe...
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:125
rs2_get_frame_stream_profile
const rs2_stream_profile * rs2_get_frame_stream_profile(const rs2_frame *frame, rs2_error **error)
Returns the stream profile that was used to start the stream of this frame.
RS2_FORMAT_ANY
@ RS2_FORMAT_ANY
When passed to enable stream, librealsense will try to provide best suited format.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:61
rs2_depth_frame_get_distance
float rs2_depth_frame_get_distance(const rs2_frame *frame_ref, int x, int y, rs2_error **error)
Given the 2D depth coordinate (x,y) provide the corresponding depth in metric units.
rs2_format
rs2_format
A stream's format identifies how binary data is encoded within a frame.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:59
rs2_supports_frame_metadata
int rs2_supports_frame_metadata(const rs2_frame *frame, rs2_frame_metadata_value frame_metadata, rs2_error **error)
determine device metadata
rs2::pose_frame
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:912
rs2::video_stream_profile::height
int height() const
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:230
rs2::frame::~frame
~frame()
releases the frame handle
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:426
rs2_get_frame_data
const void * rs2_get_frame_data(const rs2_frame *frame, rs2_error **error)
retrieve data from frame handle
rs2::points::size
size_t size() const
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:800
rs2::frameset::frameset
frameset()
Extends the frame class with additional frameset related attributes and functions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:949
rs2::pose_stream_profile
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:314
rs2::frameset::iterator::operator++
iterator & operator++()
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1141
rs2_calib_target_type
rs2_calib_target_type
Calibration target type.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_frame.h:74
rs2_is_stream_profile_default
int rs2_is_stream_profile_default(const rs2_stream_profile *mode, rs2_error **error)
Returns non-zero if selected profile is recommended for the sensor This is an optional hint we offer ...
rs2::depth_frame::get_units
float get_units() const
Provide the scaling factor to use when converting from get_data() units to meters.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:845
rs2::points::points
points(const frame &f)
Extends the frame class with additional point cloud related attributes and functions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:747
rs2::frameset::get_color_frame
video_frame get_color_frame() const
Retrieve the first color frame, if no frame is found, search for the color frame from IR stream.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1015
rs2::stream_profile::is
bool is() const
Template function, checking if the instance belongs to specific class type.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:92
rs2::frame::get_frame_metadata
rs2_metadata_type get_frame_metadata(rs2_frame_metadata_value frame_metadata) const
retrieve the current value of a single frame_metadata
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:497
rs2_clone_stream_profile
rs2_stream_profile * rs2_clone_stream_profile(const rs2_stream_profile *mode, rs2_stream stream, int index, rs2_format format, rs2_error **error)
Creates a copy of stream profile, assigning new values to some of the fields.
rs2::frame_callback::frame_callback
frame_callback(T on_frame)
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1162
rs2::filter_interface::~filter_interface
virtual ~filter_interface()=default
rs2::stream_profile::register_extrinsics_to
void register_extrinsics_to(const stream_profile &to, rs2_extrinsics extrinsics)
Assign extrinsic transformation parameters to a specific profile (sensor).
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:162
rs2::points::points
points()
Extends the frame class with additional point cloud related attributes and functions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:741
rs2::frame::get_frame_timestamp_domain
rs2_timestamp_domain get_frame_timestamp_domain() const
retrieve the timestamp domain
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:485
rs2::disparity_frame
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:854
rs2::depth_frame
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:809
rs2::frame::as
T as() const
Template function, cast current instance as the type of another class.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:580
rs2::error
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_types.hpp:92
rs2::filter_interface
Interface for frame filtering functionality.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:336
rs2::frame::frame
frame(const frame &other)
Set the internal frame handle to the one in parameter, the function create additional reference if in...
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:400
rs2::filter
Define the filter workflow, inherit this class to generate your own filter.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp:343
RS2_FORMAT_Z16
@ RS2_FORMAT_Z16
16-bit linear depth values.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:62
RS2_EXTENSION_POSE_FRAME
@ RS2_EXTENSION_POSE_FRAME
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:188
RS2_STREAM_POSE
@ RS2_STREAM_POSE
6 Degrees of Freedom pose data, calculated by RealSense device
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:52
rs2::frame::get_data_size
const int get_data_size() const
retrieve data size from frame handle
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:533
rs2_get_video_stream_resolution
void rs2_get_video_stream_resolution(const rs2_stream_profile *mode, int *width, int *height, rs2_error **error)
When called on a video stream profile, will return the width and the height of the stream.
rs2_is_frame_extendable_to
int rs2_is_frame_extendable_to(const rs2_frame *frame, rs2_extension extension_type, rs2_error **error)
Test if the given frame can be extended to the requested extension.
rs2::frame::get_profile
stream_profile get_profile() const
retrieve stream profile from frame handle
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:557
rs2_get_stream_profile_data
void rs2_get_stream_profile_data(const rs2_stream_profile *mode, rs2_stream *stream, rs2_format *format, int *index, int *unique_id, int *framerate, rs2_error **error)
Extract common parameters of a stream profiles.
rs2::frame_queue
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp:134
rs2::frame_callback::release
void release() override
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1169
rs2::stream_profile::unique_id
int unique_id() const
Return the assigned unique index when the stream was created.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:54
rs2_metadata_type
long long rs2_metadata_type
Metadata attribute type is defined as 64 bit signed integer.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:301
rs2::video_frame
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:636
rs2::filter_interface::process
virtual rs2::frame process(rs2::frame frame) const =0
rs2::error::handle
static void handle(rs2_error *e)
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_types.hpp:144
rs2::frameset::get_infrared_frame
video_frame get_infrared_frame(const size_t index=0) const
Retrieve the first infrared frame, if no frame is found, return an empty frame instance.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1032
rs2::texture_coordinate::v
float v
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:731
rs2::points::export_to_ply
void export_to_ply(const std::string &fname, video_frame texture)
Export the point cloud to a PLY file.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:780
rs2::frame::reset
void reset()
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:611
rs2_pose_frame_get_pose_data
void rs2_pose_frame_get_pose_data(const rs2_frame *frame, rs2_pose *pose, rs2_error **error)
When called on Pose frame type, this method returns the transformation represented by the pose data.
rs2::frameset::iterator::iterator
iterator(const frameset *owner, size_t index=0)
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1140
rs2::points::get_texture_coordinates
const texture_coordinate * get_texture_coordinates() const
Retrieve the texture coordinates (uv map) for the point cloud.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:792
rs2::video_stream_profile::width
int width() const
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:225
rs2::frame_callback
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1158
rs2::video_frame::get_bytes_per_pixel
int get_bytes_per_pixel() const
retrieve bytes per pixel
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:707
rs2_get_frame_bits_per_pixel
int rs2_get_frame_bits_per_pixel(const rs2_frame *frame, rs2_error **error)
retrieve bits per pixels in the frame image (note that bits per pixel is not necessarily divided by 8...
rs2::motion_frame::motion_frame
motion_frame(const frame &f)
Extends the frame class with additional motion related attributes and functions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:891
rs2_frame_add_ref
void rs2_frame_add_ref(rs2_frame *frame, rs2_error **error)
create additional reference to a frame without duplicating frame data
rs2_clone_video_stream_profile
rs2_stream_profile * rs2_clone_video_stream_profile(const rs2_stream_profile *mode, rs2_stream stream, int index, rs2_format format, int width, int height, const rs2_intrinsics *intr, rs2_error **error)
Creates a copy of stream profile, assigning new values to some of the fields.
rs2::stream_profile::_uid
int _uid
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:193
data
JSAMPIMAGE data
Definition: sources/libs/nvll_batch_jpeg_encode/oss/jpeglib.h:967
rs2::pipeline_profile
The pipeline profile includes a device and a selection of active streams, with specific profiles.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_pipeline.hpp:18
rs2_embedded_frames_count
int rs2_embedded_frames_count(rs2_frame *composite, rs2_error **error)
Get number of frames embedded within a composite frame.
rs2::pointcloud
Generates 3D point clouds based on a depth frame.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp:412
rs2::stream_profile::_framerate
int _framerate
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:194
rs2_get_frame_height
int rs2_get_frame_height(const rs2_frame *frame, rs2_error **error)
retrieve frame height in pixels
RS2_EXTENSION_POSE_PROFILE
@ RS2_EXTENSION_POSE_PROFILE
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:189
rs2_get_frame_points_count
int rs2_get_frame_points_count(const rs2_frame *frame, rs2_error **error)
When called on Points frame type, this method returns the number of vertices in the frame.
RS2_EXTENSION_MOTION_PROFILE
@ RS2_EXTENSION_MOTION_PROFILE
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:187
rs2::pose_frame::get_pose_data
rs2_pose get_pose_data() const
Retrieve the pose data from T2xx position tracking sensor.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:933
rs2::motion_frame::get_motion_data
rs2_vector get_motion_data() const
Retrieve the motion data from IMU sensor.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:905
rs2_get_frame_number
unsigned long long rs2_get_frame_number(const rs2_frame *frame, rs2_error **error)
retrieve frame number from frame handle
rs2::stream_profile::stream_index
int stream_index() const
Return the specific stream index.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:34
rs2::motion_stream_profile
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:282
rs2::frameset::iterator::operator!=
bool operator!=(const iterator &other) const
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:1143
rs2::frame::add_ref
void add_ref() const
add additional reference to a frame without duplicating frame data
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:604
RS2_EXTENSION_DISPARITY_FRAME
@ RS2_EXTENSION_DISPARITY_FRAME
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:186
rs2::pose_frame::pose_frame
pose_frame(const frame &f)
Extends the frame class with additional pose related attributes and functions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:919
rs2::motion_frame
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:884
rs2_stream_to_string
const char * rs2_stream_to_string(rs2_stream stream)
rs2::disparity_frame::disparity_frame
disparity_frame(const frame &f)
Extend depth_frame class with additional disparity related attributes/functions.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:861
rs2_stream
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:42
rs2::video_frame::get_height
int get_height() const
returns image height in pixels
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_frame.hpp:671
rs2::filter::process
rs2::frame process(rs2::frame frame) const override
Ask processing block to process the frame and poll the processed frame from internal queue.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp:352
rs2_timestamp_domain
rs2_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_frame.h:19
RS2_FORMAT_RGB8
@ RS2_FORMAT_RGB8
8-bit red, green and blue channels
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_sensor.h:66
rs2_frame_callback
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_types.hpp:25
rs2_error
struct rs2_error rs2_error
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:258