import.map: Import map from jpeg

Description Usage Arguments Value Examples

Description

Load a jpeg map image and convert to a black-and-white binary raster

Usage

1
import.map(jpg.file, plot = T, threshold = 0.2)

Arguments

jpg.file

String containing the full name (including path, if not in current working directory) of the jpeg to import.

plot

Logical indicating whether to draw a plot of the imported data or not. Defaults to T.

threshold

Numeric between 0 and 1, indicating the threshold at which points are divided into white or black. A higher threshold will only convert darker objects to black pixels, while a lower threshold will convert fainter objects to black. defaults to 0.2.

Value

A new feature set: a list containing a raster of numbered features, and a matrix assigning a type to each feature.

Examples

1
genlis <- import.map("Genlis-cropped.jpg", plot = T, threshold = 0.2)

ClairBee/AS.preprocessing documentation built on May 6, 2019, 11:50 a.m.