You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
933 B
24 lines
933 B
2 months ago
|
% 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
|