displayImg {IM}R Documentation

Display an image in grayscale

Description

Display an image in grayscale. If the image is in color, it will still be displayed in grayscale. All images displayed will be processed with histogram equalization.

Usage

displayImg(img)

Arguments

img

A matrix or numeric array representation of the image. If the image is not in grayscale, it will still be displayed in grayscale. If using a CmplxIm, Image, or OrthIm object, the original image would be represented as obj@I and the reconstructed image would be obj@reconstruction. For MultiIm object, function takes in list of images. In this case the input argument would be obj@imageList to access the original images or obj@reconstructionto access the reconstructed images. If the input is a list of images, they will all be plotted in one window.

Author(s)

Allison Irvine, Tan Dang

See Also

Image,CmplxIm,OrthIm, MultiIm

Examples

#### display the original image in a "OrthIm" object.
data(pirate);

#create OrthIm object from image
obj <- new("OrthIm",img = img,filename = "");
momentType(obj) = "cheby";
setOrder(obj) = c(200,200);

#display original image
displayImg(obj@I);

## Not run: 
	#analyze image
	Moments(obj) = 0;
	Reconstruct(obj) = NULL;
	
	#display reconstructed image
	displayImg(obj@reconstruction)

## End(Not run)


## Not run: 
	#### display a list of images from a "MultiIm" object.
	data(characters)
	#take a small subset
	img = img[1:5];
	#analyze images
	obj= momentObj(I=img, type = "cheby", order = c(dim(img[[1]])[2],dim(img[[1]])[1]) );
	Reconstruct(obj)= NULL;
	
	#display original images
	displayImg(obj@imageList);
	
	#display reconstructed images
	displayImg(obj@reconstruction);

## End(Not run)

[Package IM version 1.0 Index]