forked from realsenseai/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdepth_frame.m
More file actions
19 lines (17 loc) · 753 Bytes
/
depth_frame.m
File metadata and controls
19 lines (17 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
% 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
end
end