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].