AUGMENTIMAGES Procedure

Example 3.3 Augment an Image Using Patches and Mutate

(View the complete code for this example.)

This example shows how to use two separate AUGMENTIMAGES procedure runs to create patches and mutate those patches.

The following statements augment the image that is loaded in the mylib.image table. First, you can use the CROP statement to create patches from the image.

proc augmentimages data=mylib.image;
   crop width=250 height=250 sweep(step=250);
   output out=mylib.output_patches;
run;

Next, you can use PROC AUGMENTIMAGES again as follows, but with a MUTATE statement to modify the images in the mylib.output_patches table. The mutations include changing the intensity values of the image, flipping it horizontally and vertically, rotating it to the right and to the left, and sampling it up and down. The output images are stored in the mylib.output table.

proc augmentimages data=mylib.output_patches;
   mutate fliphorizontal flipvertical rotateleft
      rotateright pyramidup pyramiddown lighten darken;
   output out=mylib.output;
run;
Last updated: March 26, 2026