error in displaying an image in axes of GUI
古いコメントを表示
sir.... i cant load the image in the following link....
it is showing error as
??? Error using ==> imageDisplayValidateParams>validateCData at 114
Unsupported dimension
Error in ==> imageDisplayValidateParams at 31
common_args.CData = validateCData(common_args.CData,image_type);
Error in ==> imageDisplayParseInputs at 79
common_args = imageDisplayValidateParams(common_args);
Error in ==> imshow at 199
[common_args,specific_args] = ...
Error in ==> denoisemain>Select_Callback at 87
imshow(image);
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> denoisemain at 42
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)denoisemain('Select_Callback',hObject,eventdata,guidata(hObject))
please can anyone help me to rectify this error....
6 件のコメント
Walter Roberson
2013 年 3 月 18 日
What is the code for denoisemain() ?
Elysi Cochin
2013 年 3 月 18 日
Walter Roberson
2013 年 3 月 18 日
編集済み: Walter Roberson
2013 年 3 月 18 日
You left out the directory separator between the path and the filename. Use fullfile() to build your filenames.
inputImage = imread( fullfile(pathname, filename) );
After that you could display size(inputImage) . I have a suspicion that perhaps it is not grayscale or RGB (e.g., might be CMYK or have multiple channels)
Elysi Cochin
2013 年 3 月 18 日
編集済み: Elysi Cochin
2013 年 3 月 18 日
Walter Roberson
2013 年 3 月 18 日
The image is an RGB image that contains alpha data. You will need to use
if size(inputImage,3) == 4 %alpha
inputImage = inputImage(:,:,1:3); %strip alpha
end
if size(inputImage,3) == 3
inputImage = rgb2gray(inputImage); %convert to grayscale
end
Elysi Cochin
2013 年 3 月 18 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!