displayImg: Display an image in grayscale

Description Usage Arguments Author(s) See Also Examples

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#### 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)

Example output

Loading required package: png
Loading required package: jpeg
Loading required package: bmp

IM documentation built on May 2, 2019, 8:55 a.m.