Rout = affineOutputView(sizeA,tform)
takes the size of an input image, sizeA, and an affine geometric
transformation, tform, and returns a spatial referencing object,
Rout. You can use this object as input to imwarp to control the output limits and grid spacing of a warped image.
Rout = affineOutputView(sizeA,tform,'BoundsStyle',style)
also specifies constraints on the spatial limits of the output view, such as whether the
output view should completely contain the output image or whether the output view should
match the input limits.
Read and display an image. To see the spatial extents of the image, make the axes visible.
A = imread('kobi.png');
iptsetpref('ImshowAxesVisible','on')
imshow(A)
Create a 2-D affine transformation. This example creates a randomized transformation that consists of scale by a factor in the range [1.2, 2.4], rotation by an angle in the range [-45, 45] degrees, and horizontal translation by a distance in the range [100, 200] pixels.
Spatial referencing, returned as an imref2d or imref3d object. Use
Rout as the OutputView argument of the
imwarp function to specify the spatial
referencing of the warped output.