StereoParams not being recognised
3 ビュー (過去 30 日間)
古いコメントを表示
Hey everyone,
I'm trying to figure out a method to make a simulink model for real-time distance measurement to a specified object by using a stereo camera setup.
I've split the basic example ("Depth Estimation From Stereo Video") up into multiple function blocks. The thing I'm encountering and can't seem to fix is the StereoParams object not being recognised for some reason. I've run the Stereo Camera Calibration app, and I'm getting some good rectified images there, but as soon as my function has to use the StereoParams, it gives an error; "Undefined function or variable 'stereoParams'." I've tried pretty much everything I could think of.
The first bit of code I'm using is really really simple, and it's to rectify the stereo images:
function [Gerectificeerd_L,Gerectificeerd_R] = fcn(Video_In_L,Video_In_R)
coder.extrinsic('rectifyStereoImages');
[Gerectificeerd_L,Gerectificeerd_R] = rectifyStereoImages(Video_In_L,Video_In_R,stereoParams);
And that's actually it. It just doesn't seem to use it, but when I hover over the StereoParams object with my mouse and click on the left mouse button I can open it and look inside it, so it does appear to recognise it, but for some reason it doesn't use the variables in it, I guess.
Can anyone help me?
0 件のコメント
回答 (1 件)
Jordan Ross
2017 年 1 月 10 日
Hello Sander,
From the code snippet you provided, "stereoParams" should not be defined since it is not an input argument to your function. To fix this issue have an argument name "stereoParams" and ensure to call the function passes the StereoParams object to this argument.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で MATLAB Support Package for USB Webcams についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!