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

6 Spatial Transformations

Perform General 2-D Spatial Transformations

In this section...

“Spatial Transformation Procedure” on page 6-8

“Translate Image Using maketform and imtransform” on page 6-9 “Defining the Transformation Data” on page 6-14

“Creating TFORM Structures” on page 6-16 “Performing the Spatial Transformation” on page 6-17

Spatial Transformation Procedure

Performing general 2-D spatial transformations is a three-step process:

1Define the parameters of the spatial transformation. See “Defining the Transformation Data” on page 6-14 for more information.

2Create a transformation structure, called a TFORM structure, that defines the type of transformation you want to perform.

A TFORM is a MATLAB structure that contains all the parameters required to perform a transformation. You can define many types of spatial transformations in a TFORM, including affine transformations, such as translation, scaling, rotation, and shearing, projective transformations, and custom transformations. You use the maketform function to create TFORM structures. For more information, see “Control Point Registration”. (You can also create a TFORM using the cp2tform function.

3Perform the transformation. To do this, you pass the image to be transformed and the TFORM structure to the imtransform function.

The following figure illustrates this process.

6-8

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