Skip to content

Commit

Permalink
Fix matlab build
Browse files Browse the repository at this point in the history
Change-Id: I657bcb2382b760dc72b4b9d789f72db35a7363b9
  • Loading branch information
ev-mp committed Nov 27, 2018
1 parent d45c710 commit a49da4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion wrappers/matlab/librealsense_mex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ void make_factory(){
ClassFactory processing_block_factory("rs2::processing_block");
processing_block_factory.record("process", 1, 2, [](int outc, mxArray* outv[], int inc, const mxArray* inv[])
{
auto thiz = MatlabParamParser::parse<rs2::processing_block>(inv[0]);
auto thiz = MatlabParamParser::parse<rs2::filter>(inv[0]);
auto frame = MatlabParamParser::parse<rs2::frame>(inv[1]);
outv[0] = MatlabParamParser::wrap(thiz.process(frame));
});
Expand Down
20 changes: 5 additions & 15 deletions wrappers/matlab/pointcloud_example.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ function pointcloud_example()
% Start streaming on an arbitrary camera with default settings
profile = pipe.start();

% Get streaming device's name
dev = profile.get_device();
name = dev.get_info(realsense.camera_info.name);

figure('visible','on'); hold on;
figure('units','normalized','outerposition',[0 0 1 1])

% Main loop
for i = 1:600
for i = 1:10000

% Obtain frames from a streaming device
fs = pipe.wait_for_frames();

Expand All @@ -37,29 +33,23 @@ function pointcloud_example()
Z = vertices(:,3,1);

plot3(X,Z,-Y,'.');
x = [0 , 3; -1, -5]';
y = [0 , 5; -8, -2]';
z = [0 , 3; -9, -8]';
hold on;
plot3(x, y, z)
grid on
hold off;
view([45 30]);

xlim([-0.5 0.5])
ylim([0.3 1])
zlim([-0.5 0.5])

xlabel('X');
ylabel('Z');
zlabel('Y');

pause(0.01);
end
% pcshow(vertices); Toolbox required
% pcshow(vertices); Toolbox required
end


% Stop streaming
pipe.stop();

Expand Down

0 comments on commit a49da4d

Please sign in to comment.