Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pmi432 / LR07 / 2read / image processing toolbox guide.pdf
Скачиваний:
150
Добавлен:
18.03.2015
Размер:
18.08 Mб
Скачать

Printing Images

Printing Images

If you want to output a MATLAB image to use in another application (such as a word-processing program or graphics editor), use imwrite to create a file in the appropriate format. See “Writing Image Data to a File” on page 3-5 for details.

If you want to print an image, use imshow to display the image in a MATLAB figure window. If you are using the Image Tool, you must use the Print to Figure option on the Image Tool File menu. When you choose this option, the Image Tool opens a separate figure window and displays the image in it. You can access the standard MATLAB printing capabilities in this figure window. You can also use the Print to Figure option to print the image displayed in the Overview tool and the Pixel Region tool.

Once the image is displayed in a figure window, you can use either the MATLAB print command or the Print option from the File menu of the figure window to print the image. When you print from the figure window, the output includes nonimage elements such as labels, titles, and other annotations.

Printing and Handle Graphics Object Properties

The output reflects the settings of various properties of Handle Graphic objects. In some cases, you might need to change the settings of certain properties to get the results you want. Here are some tips that could be helpful when you print images:

Image colors print as shown on the screen. This means that images are not affected by the figure object’s InvertHardcopy property.

To ensure that printed images have the proper size and aspect ratio, set the figure object’s PaperPositionMode property to auto. When PaperPositionMode is set to auto, the width and height of the printed

figure are determined by the figure’s dimensions on the screen. By default, the value of PaperPositionMode is manual. If you want the default value of PaperPositionMode to be auto, you can add this line to your startup.m file.

set(0,'DefaultFigurePaperPositionMode','auto')

4-75

4 Displaying and Exploring Images

For detailed information about printing with File/Print or the print command (and for information about Handle Graphics), see “Overview of Printing and Exporting” in the MATLAB Graphics documentation. For a complete list of options for the print command, enter help print at the MATLAB command-line prompt or see the print command reference page in the MATLAB documentation.

4-76

Соседние файлы в папке 2read