Problems with IMCROP (r2012a)

6 views (last 30 days)
Shaun VanWeelden
Shaun VanWeelden on 5 Jun 2012
Hi,
I just installed MATLAB 2012a on my computer 2 days ago. I do a lot of image processing and everything was working perfectly. This morning, I tried doing the imcrop function for the first time in my life and so I did exactly as the sample shows, literally copy and pasted it, and I got an error about cmenu being undefined or unknown. I also then tried it with the image I was trying to crop and got the same error. I am not sure what is going on and would appreciate any suggestions on how to fix this!
Here is the full error report returned to the home screen:
---MY CODE---
I = imread('circuit.tif');
I2 = imcrop(I);
imshow(I), figure, imshow(I2)
---THE ERROR---
Undefined function or variable "cmenu".
Error in imrect>imrectAPI/deleteContextMenu (line 418) if ishghandle(cmenu)
Error using delete Error while evaluating hggroup DeleteFcn
Undefined function 'uitools.uimodemanager' for input arguments of type 'hg.figure'.
Error in uigetmodemanager (line 34) mmgr = uitools.uimodemanager(hFig);
Error in iptPointerManager>createPointerManager (line 215) figModeManager = uigetmodemanager(figHandle);
Error in iptPointerManager (line 67) pointerManager = createPointerManager(figHandle);
Error in wingedRect/setupCursorManagement (line 362) iptPointerManager(h_fig);
Error in wingedRect/initialize (line 125) setupCursorManagement();
Error in imrect>imrectAPI (line 215) draw_api.initialize(h_group,@startTranslateDrag,@startSideResizeDrag,@startCornerResizeDrag)
Error in imrect (line 83) [h_group,draw_api] = imrectAPI(varargin{:});
Error in iptui.imcropRect (line 33) obj = obj@imrect(parent,position,'positionConstraintFcn',snapToPixelsFcn);
Error in imcrop>interactiveCrop (line 335) h_rect = iptui.imcropRect(hAx,[],h_image);
Error in imcrop>parseInputs (line 228) [spatial_rect,h_image,placement_cancelled] = interactiveCrop(gcf);
Error in imcrop (line 94) [x,y,a,cm,spatial_rect,h_image,placement_cancelled] = parseInputs(varargin{:});

Answers (1)

Image Analyst
Image Analyst on 5 Jun 2012
I ran the code on R2012a and it ran fine. Type "ver" in the command window and report back here what you see (you can cut out your license code if you want). Or else call the Mathworks and ask them.
  1 Comment
Shaun VanWeelden
Shaun VanWeelden on 6 Jun 2012
It turns out the classic restart your computer did the trick! haha thank you though!

Sign in to comment.

Categories

Find more on MATLAB Compiler 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!