Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matlab wrapper typos #2487

Closed
izaakvc opened this issue Oct 8, 2018 · 9 comments
Closed

Matlab wrapper typos #2487

izaakvc opened this issue Oct 8, 2018 · 9 comments
Assignees

Comments

@izaakvc
Copy link

izaakvc commented Oct 8, 2018

The Matlab wrapper contains some typos in both realsense.depth_sensor and realsense.depth_stereo_sensor:
line 1: classdef depth_sensor < sensor must be classdef depth_sensor < realsense.sensor
line 15: emd must be end

@izaakvc izaakvc changed the title Matlab wrapper: depth_sensor typos Matlab wrapper typos Oct 8, 2018
@dorodnic dorodnic added the matlab label Oct 8, 2018
@izaakvc
Copy link
Author

izaakvc commented Oct 8, 2018

And in realsense.config:
line 21: '<=', realsense.stream.count should be '<=', int64(realsense.stream.count)
(to avoid the error: Error using validateattributes Value for <= must be a real scalar.)
line 22: semicolon missing at the end of the line.

line 86: args = num2cell(int64([varargin{:}])); causes conversion errors, for example:
config.enable_stream(realsense.stream.depth, realsense.format.z16) results in Error using realsense.stream Unsupported conversion from 'realsense.format' to enumeration 'realsense.stream'.

Between lines 84 and 85 following line is missing:
which = 'enable_stream#full';

This is solved when line 86 is replaced by:

args = {size(varargin)};
for i = 1:length(varargin)
    args{i} = int64(varargin{i});
end

lramati pushed a commit to lramati/librealsense that referenced this issue Oct 8, 2018
@izaakvc
Copy link
Author

izaakvc commented Oct 9, 2018

In frameset.m (and the corresponding part in librealsense_mex.cpp) there are some small things missing:
get_size is not implemented in the mex file.
get_infrared_frame has no index argument in the Matlab wrapper, while it does have it in rs_frame.hpp. While you can enable both left and right infrared streams, it is impossible to receive both images. You can only get the first infrared frame.

@izaakvc izaakvc closed this as completed Oct 11, 2018
@izaakvc
Copy link
Author

izaakvc commented Oct 11, 2018

In pipeline_profile.m:
line 30: ..., 'get_streams', ... should be ..., 'get_stream', ... (without the 's')
In stream_profile.m:
line 45: realsense.stream_profile(out{:}); should be profile = realsense.stream_profile(out{:});

I noticed this when I was trying to get the intrinsics from the camera like this.
When doing following steps:

pipeline         = realsense.pipeline();
pipeline_profile = pipeline.start(obj.config);
depth_stream     = pipeline_profile.get_stream(realsense.stream.depth);
depth_stream     = depth_stream.as('video_stream_profile');      % <--- 'Access violation'
intrinsics       = depth_stream.get_intrinsics();

It results in a complete crash (Access violation detected) when executing the last line.
In fact, it crashes when accessing any of the functions of stream_profile (stream_name, stream_index, fps, ...)

I just moved the last part of this comment to a new issue: #2541

@izaakvc izaakvc reopened this Oct 11, 2018
@izaakvc
Copy link
Author

izaakvc commented Oct 11, 2018

None of the filters seem to work in the Matlab wrapper.

depth_decimation_filter = realsense.decimation_filter;
depth_decimation_filter.set_option(realsense.option.filter_magnitude, 3)     % <--- ERROR

results in

Error using librealsense_mex
Error parsing argument of type rs2::options: unrecognized carrier type

I assume the process_interface and its children are stil work in progress? That is suggested in the code of librealsense_mex.cpp on line 1004.

@izaakvc
Copy link
Author

izaakvc commented Oct 11, 2018

disparity_transform.m:
line 11: end missing

@dorodnic dorodnic added the bug label Oct 11, 2018
@dorodnic
Copy link
Contributor

Hi @izaakvc
Yes, the recent post-processing refactoring is giving us troubles with regards to Matlab wrapping, but we are working to address it ASAP.

@lramati
Copy link
Contributor

lramati commented Oct 29, 2018

With the exception of the comment moved to issue #2541 all these typos should now be fixed in development branch thanks to PR #2492

@dorodnic
Copy link
Contributor

dorodnic commented Nov 7, 2018

Closing as resolved. Thanks @izaakvc

@dorodnic dorodnic closed this as completed Nov 7, 2018
@ev-mp
Copy link
Collaborator

ev-mp commented Nov 19, 2018

Fixed by PR2644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants