How to make history like in Photoshop..??

조회 수: 1 (최근 30일)
Rahma Yeni
Rahma Yeni 2012년 8월 7일
Hello,, ^^ How to make history like in Photoshop..?? So, we can move to previous step,. I want to apply it to an image in axes.. In fine, i want to make really like history in Photoshop.. Thank You before..

답변 (1개)

Walter Roberson
Walter Roberson 2012년 8월 7일
There is no built-in method for this. You need to program it yourself, including recording all relevant variables so that you can change the "current" values to be what they used to be.
  댓글 수: 2
Rahma Yeni
Rahma Yeni 2012년 8월 8일
I use axes to display the images that I use. so, when a process the image, then the change will re-appear on the axes. where should I store the images that I have though temporaryly..?? and how can I display it again in a images..?? I've tried to save it, but it is stored in an array, and array values can not be restored to the image. Thank You.. :)
Walter Roberson
Walter Roberson 2012년 8월 8일
this_image = findobj(gca, 'type', 'image');
this_image_props = get(this_image, {'AlphaData', 'AlphaDataMapping', 'CData', 'CDataMapping', 'Xdata', 'YData'});
this_figure_cmap = get(ancestor(this_image, 'figure'), 'colormap');
Now save this_image_props and this_figure_cmap: between the two of them, they have the information needed to recreate the image.
To re-activate, presuming that there is an existing image to restore over top of:
this_image = findobj(gca, 'type', 'image');
set(this_image, this_image_props);
set( ancestor(this_image, 'figure'), 'Colormap', this_figure_cmap);

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by