StereoParams not being recognised

4 vues (au cours des 30 derniers jours)
Sander Veenendaal
Sander Veenendaal le 7 Jan 2017
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?

Réponses (1)

Jordan Ross
Jordan Ross le 10 Jan 2017
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.

Catégories

En savoir plus sur Computer Vision Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by