matchCount {cdlTools}R Documentation

Counts distinct pixel pairs in CDL raster images

Description

matchCount counts distinct pixel pairs for CDL raster images with same extents and resolution.

Usage

matchCount(x, y, m = 256)

Arguments

x

A CDL raster image.

y

A CDL raster image.

m

A bound for the max enumeration of CDL categories. The default is 256.

Value

A matrix with pixel counts by unique ordered CDL crop pairs in x and y.

Author(s)

Jonathan Lisic, jlisic@gmail.com

Examples

## Not run: 
z1 <- matrix( rep(c(1,4),8), nrow=4) 
z2 <- matrix( rep(c(1:4),4), nrow=4) 

r1 <- raster(z1)
r2 <- raster(z2)

a <- matchCount(r1,r2)

## End(Not run)

[Package cdlTools version 0.15 Index]