MATLAB:There was an error installing third-party software for Support Package

问题背景

MATLAB读取摄像头,InstalledAdaptors为空的时候,小虎试着去surpport package installer安装适配器。

Warning: No Image Acquisition adaptors found. Image acquisition adaptors may be available as downloadable support packages. Open Support Package Installer to install additional vendors.
在这里插入图片描述
但是当我打开surpport package installer 下载时,每次都失败,估计原因是连不上美国的MATLAB网站或连接不稳定导致下载错误,也可能是软件本身的问题。

There was an error installing third-party software for Support Package DCAM Hardware :C:\MATLAB\SupportPackages~ does not contain archives for third-party software used by the support package.
在这里插入图片描述

问题原因

软件网络代理设置错误,无法正确连接。

解决办法

设置连接proxy(代理)

首先查看自己的代理地址。打开Internet options->connections—>Lan settings,把得到的address和port记下。
在这里插入图片描述
在MATLAB打开preferences->Web,填入刚才记下的地址和端口,然后再test connection一下。如果success就没什么问题了。
在这里插入图片描述
在这里插入图片描述

装比较新版的MATLAB

比如今年是2020,那么可以装MATLAB2019或MATLAB2020。

解决效果

那当然是完美解决啦,小虎难道还骗你不成,看图说话!另外提一下小虎用第一种方法解决的,第二种方法小虎没试过,不过第二种方法可以从另一个方面解决你的问题,就是新版的MATLAB一般是包括你要下载的包的哦
在这里插入图片描述
在这里插入图片描述
摄像机不空了耶,利用电脑摄像头完美看到了小虎的丑照,emmmm,附上相机测试程序让大家玩玩。
在这里插入图片描述

摄像头开启程序

hard=imaqhwinfo;
name=hard.InstalledAdaptors{1};
vid=videoinput(name,1);
preview(vid);
pause
start(vid);
for i=1:10
    gatpic=getsnapshot(vid);
    filename=int2str(i);
    filename=[filename,'.jpg'];
    imwrite(getpic,filename);
    pause(0.5);
end
stop(vid);
closepreview(vid);
delete(vid);
clear

参考资料

How to download a Support package for installation on a offline computer for MATLAB R2016a and below?
How can I configure my proxy server settings within MATLAB?

发布了82 篇原创文章 · 获赞 70 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/Davidietop/article/details/105202611
今日推荐