Reputation: 3289
I am getting an error in using a step
function, which belongs to Computer Vision System Toolbox
in MATLAB. However, I can use other functions from this toolbox.
Error says Unable to checkout a license for the Computer Vision System Toolbox.
Does anybody has any idea about whats going on here? I contacted my system administrator about the toolbox and he told me that I have this toolbox license for my computer.
Upvotes: 2
Views: 4168
Reputation: 386
If you are getting the error "Unable to checkout a license for the Computer Vision System Toolbox.", then it means that you have the license for the toolbox but there is no one available.
But in any case, let's check:
1) On the command window of Matlab type: ver
ver
Then, you must get the computer vision toolbox listed:
MATLAB-----Version 8.5-----(R2015a)
Simulink-----Version 8.5-----(R2015a)
Aerospace Blockset-----Version> 3.15-----(R2015a)
Aerospace Toolbox-----Version 2.15-----(R2015a)
AntennaToolbox-----Version 1.0-----(R2015a)
Computer Vision System Toolbox-----Version 6.2-----(R2015a)
If it is there, we are doing good!!! No, You need to get one :(.
Now, since we know that you have the toolbox. We must look for the feature name that matlab gives to this specific toolbox. The name listed with the 'ver' command is not the feature name that we need to use with the matlab functions. 'ver' gives the product name not feature name.
Exemples:
feature Value ------ MathWorks® Product
'MATLAB' ------ MATLAB
'SIMULINK' ------ Simulink®
'Control_Toolbox' ------ Control System Toolbox
'Curve_Fitting_Toolbox' ------ Curve Fitting Toolbox™
'Signal_Blocks' ------ DSP System Toolbox™
'Image_Toolbox' ------ Image Processing Toolbox™
'Distrib_Computing_Toolbox' ------ Parallel Computing Toolbox™
'Signal_Toolbox' ------ Signal Processing Toolbox™
details(http://fr.mathworks.com/help/matlab/ref/license.html#inputarg_feature)
Then, we have to localize the feature name for the computer vision toolbox. We search for the license file:
linux : /usr/local/MATLAB/R20XXx/licenses
windows : C:\Program Files\MATLAB\R20XXx\licenses
everyone else: http://www.mathworks.com/matlabcentral/answers/99147-where-are-the-license-files-for-matlab-located
You will find something similar to this on the license file:
MATLAB license passcode file for use with FLEXlm.
LicenseNo: ******* HostID: ANY
INCREMENT Aerospace_Toolbox MLM 33 11-nov-2027 uncounted 2060709003A4242654B4 VENDOR_STRING=VI=0:AT=186 HOSTID=ANY
INCREMENT Video_and_Image_Blockset MLM 33 11-nov-2027 uncounted 4060A030C431A28F84B9 VENDOR_STRING=VI=0:AT=186 HOSTID=ANY
INCREMENT Vision_HDL_Toolbox MLM 33 11-nov-2027 uncounted 8060C0B0C06EB02DC5FD VENDOR_STRING=VI=0:AT=186 HOSTID=ANY
For me, the name of the computer vision toolbox is: Video_and_Image_Blockset. It is good idea to look for the feature name because it seems to change according to the matlab version.
Now, we are ready to code. In your matlab script, add:
% Wait until license is available
while (~license('checkout','Video_and_Image_Blockse'))
pause(1);
end
It just try to get one license for you, and if there is no one free, it waits until one is available and execution of the script continues.
it is good to add those lines at the beginning of the script before you call any function of that toolbox .
Details: http://fr.mathworks.com/help/matlab/ref/license.html#inputarg_feature.
To check for any other toolbox, just change the feature name of the code above.
Good luck!!
Upvotes: 1