problem with Silder and ButtonDownFcn

I have a problem with Slider and ButtonDownFcn.
Currently I display to the user an image in the GUI (using GUIDE), then I let them select a license plate by drawing a rectangle around it.
I have added slider to turn the image in degrees.
When I turn the image and then click on it, the image returns to its initial state (angle).
What can I do to make sure that the image stays in its location and then draw the rectangle on it?
This is my ButtonDownFcn function:
function axes1_ButtonDownFcn(hObject, eventdata, handles)
global image h
imshow(image, []);
h = imrect;
setColor(h, 'black');
This is my slider function:
function slider2_Callback(hObject, eventdata, handles)
global image hImage
slider_value = get(handles.slider2,'Value');
axes(handles.axes1);
hImage = imshow(imrotate(image,slider_value,'bilinear'), 'Parent',handles.axes1);
set(hImage, 'ButtonDownFcn', @(s,e) axes1_ButtonDownFcn());
Thanks in advance.

Respuestas (0)

Categorías

Más información sobre Interactive Control and Callbacks en Centro de ayuda y File Exchange.

Preguntada:

el 7 de Jul. de 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by