How could I update the imshow?
Show older comments
Hi,all,
I have a GUI which receive the data through the serial port continuously. And I want to use these data to show the location trace in the picture using imshow.
Afterwards I realize the memory is reduced bacause I continuing creat a new image in the same axes.
So I would like to know how can I updating the imshow rather than creating a new image.
ditu =imread('google.bmp');
[M,N]=size(ditu(:,:,1))
ditu((M-y-1):(M-y+1),((x-1):(x+1)),1)=255;
ditu((M-y-1):(M-y+1),((x-1):(x+1)),2)=0;
ditu((M-y-1):(M-y+1),((x-1):(x+1)),3)=0;
imshow(ditu, 'Parent', handles.axes1);
Thank you,
Shaofan
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!