Undefined function 'getsnapshot' for input arguments of type 'struct'
2 views (last 30 days)
Show older comments
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 Comments
Answers (4)
Image Analyst
on 11 Mar 2016
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 Comments
MrMedTech
on 11 Mar 2016
Edited: Walter Roberson
on 15 Mar 2016
1 Comment
Image Analyst
on 11 Mar 2016
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
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!