Hello everyone, I have a problem in using imcrop() function in matlab gui.
3 views (last 30 days)
Show older comments
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.
Answers (0)
See Also
Categories
Find more on Language Support in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!