Undefined function 'getsnapshot' for input arguments of type 'struct'
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I've customized an eye-tracking software in Matlab.
It works just fine, but so far I'm working on the details. I try to force the speed and so I found the possibility to parallize a few steps.
So I tried it with an easy example with using a 'parfor' instead of a general 'for'-loop.
While running it, there was an error within I'm told to add the file containing the parfor loop to te workers with using addAttachedFiles(); So I tried to include the file with the following command:
poolobj = gcp;
addAttachedFiles(poolobj,'boxcalibration.m');
But there is still the same Error und in addition it's told that
Error using boxcalibration (line 11)
An UndefinedFunction error was thrown on the workers for 'getsnapshot'. This might be because the file containing 'getsnapshot' is not accessible on the workers.
Use addAttachedFiles(pool, files) to specify the required files to be attached. See the documentation for 'parallel.Pool/addAttachedFiles' for more details.
Error in eyetracking (line 48)
boxcalibration(fig,vid,scrsz);
Caused by:
Undefined function 'getsnapshot' for input arguments of type 'struct'.
Can someone help to handle that?
THX a lot
0 个评论
回答(4 个)
Image Analyst
2016-3-11
Does "ver" show that you have the Image Acquisition Toolbox installed? You probably need that - not sure if the webcam hardware support package has that function or not. Did you install the webcam packages at all? There are at least 2 packages you need to install for the webcam support. You can have either the webcam package, the Image Acquisition Toolbox, or both. Which do you have?
0 个评论
MrMedTech
2016-3-11
编辑:Walter Roberson
2016-3-15
1 个评论
Image Analyst
2016-3-11
Don't you know about the ver command? It means "version" and when you type that on the command line, it will show your license number and all the toolboxes you have bought.
Sorry I can't help more. My cameras work. You'll have to call tech support to find out why your getsnapshot() function does not work.
What does this say:
which -all getsnapshot
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!