forked from IntelRealSense/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
depth_frame.m
24 lines (21 loc) · 933 Bytes
/
depth_frame.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
% Wraps librealsense2 depth_frame class
classdef depth_frame < realsense.video_frame
methods
% Constructor
function this = depth_frame(handle)
this = this@realsense.video_frame(handle);
end
% Destructor (uses base class destructor)
% Functions
function distance = get_distance(this, x, y)
narginchk(3, 3);
validateattributes(x, {'numeric'}, {'scalar', 'nonnegative', 'real', 'integer'}, '', 'x', 2);
validateattributes(y, {'numeric'}, {'scalar', 'nonnegative', 'real', 'integer'}, '', 'y', 2);
distance = realsense.librealsense_mex('rs2::depth_frame', 'get_distance', this.objectHandle, int64(x), int64(y));
end
function unit = get_units(this)
narginchk(1, 1)
unit = realsense.librealsense_mex('rs2::depth_frame', 'get_units', this.objectHandle);
end
end
end