logo-header

 
 

syntax

  • proximity(sourcegrid, kernel)

definition

proximity(sourcegrid, kernel) results in a convolution of a sourcegrid and a kernel matrix.  For each cell in the sourcegrid, the values of the cell and it's neighbourhood cells are multiplied with the corresponding values in the kernel taking that cell as the focal point in the kernel matrix. The resulting cell value is the maximum of these multiplications. The resulting value type is float32 or float64, based on the value type of the sourcegrid. The resulting domain unit is the domain unit of the sourcegrid attribute.

description

See Configuration Examples, potential with kernel for more information on how to configure different kernels.

applies to

Attribute sourcegrid with float32 or float64 value type

conditions

The domain of the sourcegrid attribute must be a Point value type of the group CanBeDomainUnit.

since version

5.15

example

attribute<float32> proximitygrid (GridDomain) := 
proximity(float32(sourcegrid), pot3Range/RelWeight);
sourcegrid
null 0 0 0 1
0 0 2 1 1
0 2 3 3 3
1 1 1 3 0
0 1 0 1 3
GridDomain, nr of rows = 5, nr of cols = 5

proximitygrid
0 0.18 0.23 0.18 0.18
0.18 0.26 0.35 0.35 0.35
0.24 0.35 0.53 0.53 0.53
0.18 0.26 0.35 0.53 0.35
0.12 0.18 0.26 0.35 0.53
GridDomain, nr of rows = 5, nr of cols = 5

OBJECT VISION BV
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam
The Netherlands

tel: +31 (0)20 598 9083
fax:+31 (0)20 598 9904