This tool performs Robert's Cross edge-detection filter on a raster image. The roberts_cross_filter
is similar to the sobel_filter and prewitt_filter, in that it identifies areas of high slope in the input image through the calculation of slopes in the x and y directions. A Robert's Cross filter uses the following 2 × 2 schemes to calculate slope magnitude, |G|:

| . | .
P1 | P2
P3 | P4

| *G* | = | P1 - P4 | + | P2- P3

Note, the filter is centered on pixel P1 and P2, P3, and P4 are the neighbouring pixels towards the east, south, and south-east respectively.

The output image may be overwhelmed by a relatively small number of high-valued pixels, stretching the palette. The user may therefore optionally clip the output image distribution tails by a specified amount (clip) for improved visualization.

## Reference

Fisher, R. 2004. Hypertext Image Processing Resources 2 (HIPR2). Available online: http://homepages.inf.ed.ac.uk/rbf/HIPR2/roberts.htm

## See Also

sobel_filter, prewitt_filter

## Function Signature

`def roberts_cross_filter(self, raster: Raster, clip_amount: float = 0.0) -> Raster: ...`

## Project Links

WbW Homepage User Manual Support WbW