不幸的是,針對所有阻力,我再次被迫使用Matlab。我試圖使用一些我知道的代碼,以便在幾個月前運行。Matlab rgb2gray()未定義函數錯誤
這裏是我的代碼:
colour_image = imread(filename);
grey_image = rgb2gray(colour_image);
這是我的錯誤:
Undefined function 'rgb2gray' for input arguments of type 'uint8'.
這裏是rgb2gray的文檔:
% If the input is an RGB image, it can be uint8, uint16, double, or
% single.
所以功能允許UINT8參數,但給出uint8參數時給我一個錯誤。爲什麼?
我用Google搜索周圍,並導致了此鏈接:
http://www.mathworks.com/support/solutions/en/data/1-4B6E5E/
好讓確保我有正確的工具箱(儘管我知道它的存在)
我輸入:版本
Image Processing Toolbox Version 8.0 (R2012a)
好吧,我有正確的工具箱,授權和所有。
我輸入:這-all rgb2gray
C:\Program Files\MATLAB\R2012a\toolbox\images\images\rgb2gray.m % Has no license available
好吧,即使我有正確的許可工具箱,這個特異功能是不許可....嗯好嗎?
因此,讓我們試試這個「許可證結帳」的事情,但首先我必須找到我的許可證密鑰名。要查找許可證密鑰名稱,我需要查看許可證文件中的INCREMENT行...很好。
所以我去:
http://www.mathworks.com/support/solutions/en/data/1-63ZIR6/index.html
嗯,因爲這是在網絡上,我在客戶機上我有一個「network.lic」,我打開它,找到我的INCREMENT行和當然它不在那裏!
If your license.dat file has no INCREMENT lines, refer to your license administrator for these INCREMENT lines.
有人能讓我擺脫我的痛苦嗎?
編輯:所以運行許可證檢查後,我得到:
License checkout failed.
License Manager Error -101
據現場:
This error message indicates that the license administrator has reserved all the licenses of the product you are trying to use for other users.
而且,由於我的管理是在休假,我要去嘗試說服我讓我切換到使用C/C++圖像處理庫。謝謝您的幫助。
把所有的代碼這裏請 – 0x90 2013-02-14 20:21:03
'colour_image'矩陣的維度是什麼?它需要是3D('m' x'n' x' 3')rgb組件 – Smash 2013-02-14 20:35:35
這就是我所有的代碼。圖像是512x512x3 uint8。 – kbirk 2013-02-14 20:37:55