forked from plusone-robotics/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolorizer.m
23 lines (21 loc) · 853 Bytes
/
colorizer.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
% Wraps librealsense2 colorizer class
classdef colorizer < realsense.options
methods
% Constructor
function this = colorizer()
out = realsense.librealsense_mex('rs2::colorizer', 'new');
this = [email protected](out);
end
% Destructor (uses base class destructor)
% Functions
function video_frame = colorize(this, depth)
narginchk(2, 2)
validateattributes(depth, {'realsense.frame'}, {'scalar'}, '', 'depth', 2);
if ~depth.is('depth_frame')
error('Expected input number 2, depth, to be a depth_frame');
end
out = realsense.librealsense_mex('rs2::colorizer', 'colorize', this.objectHandle, depth.objectHandle);
video_frame = realsense.video_frame(out);
end
end
end