Hello everyone, I have a problem in using imcrop() function in matlab gui.
3 次查看(过去 30 天)
显示 更早的评论
I am using imcrop() in matlab gui to crop the image
global Prev_img;
global Updatd_img;
global Crop_img;
Crop_img = Prev_img;
Prev_img=imcrop(Prev_img);
Updatd_img = Prev_img;
axes(handles.Cropaxis);
imshow(Updatd_img);
but it is giving error llke this:
Error using imcrop
Expected input number 1, I, RGB, or H, to be one of these types:
logical, int16, single, double, uint16, uint8
Error in imcrop>parseInputs (line 233)
validateattributes(a,{'logical','int16','single','double','uint16',...
Error in imcrop (line 93)
[x,y,a,cm,spatial_rect,h_image,placement_cancelled] = parseInputs(varargin{:});
Error in Home>Crop1_Callback (line 197)
Prev_img=imcrop(Prev_img);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in Home (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)Home('Crop1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Language Support 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!