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?