Back to Aurora Vision Studio website

You are here: Start » Filter Reference » Region » Region Combinators » RegionDifference

RegionDifference


Module: FoundationLite

Computes a region containing pixels from the first input region but not from the second input region.

Name Type Description
Input value inRegion1 Region First input region
Input value inRegion2 Region Second input region
Output value outRegion Region Output region

Description

The operation computes the logical difference of two given regions. That is, the resulting region contains pixel locations that belong to the first input region but do not belong to the second one. Both dimensions (width and height) of the resulting region are set to the corresponding dimensions of the first input region.

Examples

Description of usage of this filter can be found in examples and tutorial: Molybdenum Foil, Brick destroy (Game), Finding PCB Missing Covering.

Sample region inRegion1

Sample region inRegion2

RegionDifference(inRegion1, inRegion2)

RegionDifference(inRegion2, inRegion1)

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Input and output regions are not distinct in RegionDifference.

Complexity Level

This filter is available on Advanced Complexity Level.

See Also