Author Topic: Using Imshow from a timer  (Read 563 times)

Offline ednaiul

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
Using Imshow from a timer
« on: May 22, 2010, 04:47:47 PM »
Hi:

I'm programming a task in the background using MATLAB timers. In that task, I have to draw constantly an image in one of the axes of my GUI. The problem here is that for some reason, the aplication creates new figures instead of using the current one.

I have tried to force this using instructions like:
Code: [Select]
figure(<the handler of my figure>);
set(0,'CurrentFigure',<the handler of my figure>);
axes(handles.axes_video);

Here is the code that I have written:
Code: [Select]
figure(info.cf);
    axes(handles.axes_video);
    imshow(img1),hold on;
    if(info.estado_izq.detectado)
       % Pintamos la bounding box:
       rectangle('Position',info.estado_izq.b_box,'EdgeColor','g');       
    end
    hold off;

Anyone can help me? Thanks a lot for your answers.

Matlab and SimuLink Development Forum

Using Imshow from a timer
« on: May 22, 2010, 04:47:47 PM »