PROCESSIMAGES Procedure

Example 12.2 Calculate an Image Derivative

(View the complete code for this example.)

This example shows how to use the PROCESSIMAGES procedure to calculate an image derivative by using the Sobel operator.

The following statements calculate the derivative of the image in the mylib.input_image data table and store the processed image in the mylib.output_image table. You use the SOBEL statement to calculate the first-order derivative of the image.

proc processimages data=mylib.input_image;
   sobel kerneloperation=convolution dx=1 dy=0 delta=0 scale=1;
   output out=mylib.output_image;
run;

Output 12.2.1 shows the original image, and Output 12.2.2 shows the processed image.

Output 12.2.1: Original Image

Original Image


Output 12.2.2: Processed Image

Processed Image


Last updated: March 26, 2026