How to set the scaling of an image (I think using Clim)
13 views (last 30 days)
Show older comments
If I display an image IM, on an axes 1 by,
handles.axes1
imshow(IM, [100, 500];
How do I obtain the scaling parameters that have been used for the imshow and use a default "auto" as one option if a checkbox is ticked. I have the following code, but its not quite there.
InitialScale=get(handles.axes1, 'Clim')
lowInitial=InitialScale(1);
highInitial=InitialScale(2);
if (get(handles.checkboxAS,'Value') == 1)
set(handles.axes1, 'Clim',[]);
else
set(handles.axes1, 'Clim',[lowInitial, highInitial]);
end
Answers (1)
See Also
Categories
Find more on Image Processing and Computer Vision in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!