You can use Image Processing Toolbox™ preferences to control certain characteristics of howimshow
and theImage Viewerapp display images on your screen. For example, using toolbox preferences, you can specify the initial magnification used.
To determine the current value of Image Processing Toolbox preferences, you can look in the Preferences dialog box or use theiptgetpref
function.
To open the Preference dialog box, clickPreferencesin theHometab in the MATLAB®desktop. In the Preferences dialog box, select Image Processing Toolbox. You can also access Image Processing Toolbox preferences from theImage ViewerFilemenu, or by typingiptprefs
at the command line.
To retrieve the values of Image Processing Toolbox preferences programmatically, typeiptgetpref
at the command prompt. The following example usesiptgetpref
to retrieve the value to determine the value of theImtoolInitialMagnification
preference.
iptgetpref('ImtoolInitialMagnification')
ans = 100
首选项名称case insensitive and can be abbreviated. For a complete list of toolbox preferences, see theiptprefs
reference page.
To set the value of Image Processing Toolbox preferences, you can use the Preferences dialog box or use theiptsetpref
function.
To open the Preference dialog box, clickPreferencesin theHometab in the MATLAB desktop. In the Preferences dialog box, select Image Processing Toolbox. You can also access Image Processing Toolbox preferences from theImage ViewerFilemenu, or by typingiptprefs
at the command line.
To specify the value of a toolbox preference, use theiptsetpref
function. This example callsiptsetpref
to specify thatimshow
resize the figure window so that it fits tightly around displayed images.
iptsetpref('ImshowBorder','tight');
For a table of the available preferences, see theiptprefs
reference page.