forked from IntelRealSense/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 1
/
spatial_filter.m
24 lines (22 loc) · 1.05 KB
/
spatial_filter.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 spatial_filter class
classdef spatial_filter < realsense.filter
methods
% Constructor
function this = spatial_filter(smooth_alpha, smooth_delta, magnitude, hole_fill)
if (nargin == 0)
out = realsense.librealsense_mex('rs2::spatial_filter', 'new');
elseif (nargin == 4)
validateattributes(smooth_alpha, {'numeric'}, {'scalar', 'real'});
validateattributes(smooth_delta, {'numeric'}, {'scalar', 'real'});
validateattributes(magnitude, {'numeric'}, {'scalar', 'real'});
validateattributes(hole_fill, {'numeric'}, {'scalar', 'real'});
out = realsense.librealsense_mex('rs2::spatial_filter', 'new', double(smooth_alpha), double(smooth_delta), double(magnitude), double(hole_fill));
else
% TODO: Error out on bad arg count
end
this = this@realsense.filter(out);
end
% Destructor (uses base class destructor)
% Functions
end
end