Functions > Image Processing > Geometric Transforms > Example: Zooming and Scaling
  
Example: Zooming and Scaling
Use the zoom function to zoom or scale an image or a matrix.
For information on using this example, refer to About Image Processing Examples.
Zooming an Image
1. Read in an image:
Click to copy this expression
(pattern.bmp)
2. Set the horizontal and vertical scales then apply the zoom function to the image:
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
(pattern_z1.bmp)
The zooming results in halving the image width and doubling its height.
Zooming a Matrix
1. Define a 3 x 4 matrix, and then use an equation to set the value of its elements:
Click to copy this expression
Click to copy this expression
Click to copy this expression
2. Evaluate the matrix:
Click to copy this expression
3. Apply the zoom function to the matrix:
Click to copy this expression
Click to copy this expression
The zoom produces a 6 x 12 matrix.