Functions > Image Processing > Combinations of Images > Example: Replacing a Part of an Image
  
Example: Replacing a Part of an Image
Use the putregion function to insert matrix N into matrix M at position (row, col). Matrix M must be large enough to contain all of N when inserted at the given position.
For information on using this example, refer to About Image Processing Examples.
1. Read in a starting image.
Click to copy this expression
Click to copy this expression
Click to copy this expression
2. Create a second image, smaller than the first.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
Make sure that
Click to copy this expression is less than Click to copy this expression
Click to copy this expression is less than Click to copy this expression
3. Insert matrix N into M and view the resulting image:
Click to copy this expression
Click to copy this expression
(camera.bmp)
(mona_in_camera.bmp)