2.1. Image Filtering

The Laplace operator is one possible operator for emphasizing edges in a gray-scale image (edge detection). The operator carries out a simple local difference pattern (see Figure 12) and is therefore well suited to parallel execution. The Laplace operator is applied in parallel to each pixel with its four neighbors.

For each pixel:

In the whole image:

Figure 12 Edge detection with Laplace operator and threshold

A procedure for the Laplace operator in Parallaxis, using the grid structure defined earlier, looks like the following:

PROCEDURE Laplace(x: grid OF INTEGER): grid OF INTEGER; 
BEGIN
	RETURN( 4*x - MOVE.north(x) - MOVE.south(x)
	            -MOVE.east(x)  - MOVE.west(x) ); 
END Laplace;
The data from neighbor PEs is obtained by local data exchange operations, which are directly used in the arithmetic expression to be returned. This simple procedure does not handle range limits for gray-scale values, e.g. [0..255].


[ Previous Page | Table of Contents | Next Page ]