Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

harmonise.im

Make Pixel Images Compatible


Description

Convert several pixel images to a common pixel raster.

Usage

## S3 method for class 'im'
harmonise(...)

## S3 method for class 'im'
harmonize(...)

Arguments

...

Any number of pixel images (objects of class "im") or data which can be converted to pixel images by as.im.

Details

This function makes any number of pixel images compatible, by converting them all to a common pixel grid.

The command harmonise is generic. This is the method for objects of class "im".

At least one of the arguments ... must be a pixel image. Some arguments may be windows (objects of class "owin"), functions (function(x,y)) or numerical constants. These will be converted to images using as.im.

The common pixel grid is determined by inspecting all the pixel images in the argument list, computing the bounding box of all the images, then finding the image with the highest spatial resolution, and extending its pixel grid to cover the bounding box.

The return value is a list with entries corresponding to the input arguments. If the arguments were named (name=value) then the return value also carries these names.

If you just want to determine the appropriate pixel resolution, without converting the images, use commonGrid.

Value

A list, of length equal to the number of arguments ..., whose entries are pixel images.

Author(s)

See Also

Examples

Image1 <- setcov(square(1), dimyx=32)
   Image2 <- setcov(square(1), dimyx=16)
   Function1 <- function(x,y) { x }
   Window1 <- shift(letterR, c(-2, -1))
   h <- harmonise(X=Image1, Y=Image2, Z=Function1, W=Window1)
   plot(h, main="")

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.