问题描述
camera模块中输出的是28x1的矩阵,camera中的函数没有起作用。
解决办法
在stackflow中找到了答案新建slcamera.m
function p = slcamera(cam, u)
% u'
if all(u == 0)
% Simulink is probing for the dimensions
np = (length(u)-16)/3;
p = zeros(2, np);
else
P = reshape(u(17:end), 3, []);
Tcam = reshape(u(1:16), 4, 4);
p = cam.plot(P, 'pose', Tcam, 'drawnow');
end
```
并将slcamera.m放到machine vision toobox下的vision目录下。