images.geotrans.Warper
Apply same geometric transformation to many images efficiently
Description
AWarper
object creates an image warper from anaffine2d
orprojective2d
geometric transformation object for images with a specific size.
Creation
Syntax
w = images.geotrans.Warper(tform,inputSize)
w = images.geotrans.Warper(tform,inputRef)
w = images.geotrans.Warper(tform,inputRef,outputRef)
w = images.geotrans.Warper(sourceX,sourceY)
w = images.geotrans.Warper(___,Name,Value)
Description
w = images.geotrans.Warper(
creates an image warper, wheresourceX,sourceY
)sourceX
andsourceY
specify the input image coordinates required to perform the geometric transformation.sourceX
andsourceY
are 2-D matrices of the same size as the required output image. Each (x,y) index insourceX
andsourceY
specifies the location in the input image for the corresponding output pixel.
w = images.geotrans.Warper(___,
sets properties using one or more name-value pairs, for any of the previous syntaxes. For example,Name,Value
)warper = images.geotrans.Warper(tform,size(im),'FillValue',1)
specifies the value used for pixels outside the original image. Enclose each property name in single quotes.
Input Arguments
Properties
Object Functions
warp |
Apply geometric transformation |
例子
Tips
If the input images havepplanes ([m,n,p]),
warp
applies the transform to each plane independently.
Algorithms
Warper
is optimized to apply the same geometric transformation across a batch of same size images.Warper
achieves this optimization by splitting the warping process into two steps: computation of the transformed coordinates (done once) and interpolation on the image (done for each image). Compared toimwarp
, this approach speeds up the whole process significantly for small to medium-sized images, with diminishing returns for larger images.