forked from IntelRealSense/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
points.m
31 lines (29 loc) · 1.3 KB
/
points.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% Wraps librealsense2 points class
classdef points < realsense.frame
methods
% Constructor
function this = points(handle)
this = this@realsense.frame(handle);
end
% Destructor (uses base class destructor)
% Functions
function vertices = get_vertices(this)
vertices = realsense.librealsense_mex('rs2::points', 'get_vertices', this.objectHandle);
end
function export_to_ply(this, fname, texture)
narginchk(3, 3)
validateattributes(fname, {'char'}, {'scalartext', 'nonempty'}, '', 'fname', 2);
validateattributes(texture, {'realsense.frame'}, {'scalar'}, '', 'texture', 3);
if ~texture.is('video_frame')
error('Expected input number 3, texture, to be a video_frame');
end
realsense.librealsense_mex('rs2::points', 'export_to_ply', this.objectHandle, fname, texture.objectHandle);
end
function texture_coordinates = get_texture_coordinates(this)
texture_coordinates = realsense.librealsense_mex('rs2::points', 'get_texture_coordinates', this.objectHandle);
end
function s = point_count(this)
s = realsense.librealsense_mex('rs2::points', 'size', this.objectHandle);
end
end
end