rectifyStereoImages 投掷 "Not enough input arguments error"

rectifyStereoImages throwing "Not enough input arguments error"

我不是要纠正一对立体图像,但我从函数中收到一个奇怪的错误

Error using rectifyStereoImages (line 106)
Not enough input arguments.

Error in RealTimeProcessing>captureButton_Callback (line 134)
[I1Rect, I2Rect] = rectifyStereoImages(I1, I2,stereoParams);

我写的这行代码是

[I1Rect, I2Rect] = rectifyStereoImages(I1, I2,stereoParams);

如您所见,存在两个图像和立体参数。我通过使用 MATLAB 中的立体相机校准工具获得了 stereoParams。我缺少一些输入吗? link 个文件是 here。我已经包含了两个输入图像和 stereoParams。

class(stereoParams)return是什么意思?

rectifyStereoImages 函数有两种语法:已校准和未校准。对于校准的情况,它需要两个图像和一个 stereoParameters 对象。对于未校准的情况,它采用 class projective2d 的两个图像和两个投影变换对象。

从您所写的看来,您的 stereoParams 实际上是一个投影变换对象。在这种情况下,rectifyStereoImages 进入未校准模式,并期望其中两个。