Description Creating objects Slots Methods Note Author(s) See Also Examples
This class contains general information about an image, and is inherited by the "CmplxIm"
and "OrthIm"
classes.
It contains basic utilities and object slots which are needed for both continuous complex moment analysis and
discrete/continuous real orthogonal moment analysis. An object of this class can be cast to either a CmplxIm type object
or a OrthIm type object.
Objects will be created by calls of the form new("Image", img, filename)
. When the constructor is called and a filename is given,
the input file will be loaded and the image will be converted to grayscale and stored in slot "I". Only files of type "jpeg", "bmp" or "png" may be imported this way. If the argument "img", an image in matrix or numeric form, is provided
when the constructor is called, the image will be converted to grayscale and stored in slot "I" of the object. When this slot value is set, the centroid and dimensions of the image will be calculated.
The constructor for this class will be called when objects of the inheriting classes "CmplxIm"
and "OrthIm"
are created. See OrthIm
, CmplxIm
.
I
:Object of class "matrix"
representing the image.
dimensions
:Object of class "numeric"
containing dimension of the image.
centroid
:Object of class "numeric"
containing centroid of the image. See calcCentroid
.
filename
:Object of class "character"
containing name of the image
imType
:Object of class "character"
containing image extension.
momentType
:Object of class "character"
containing moment type. Either "gpzm", "fm", "fr", "fc", "krawt", "hahn", "cheby", "gegen", "legend", "chebycont"
. See OrthIm
, CmplxIm
.
moments
:Object of class "matrix"
containing computed moments from the image.
invariant
:Object of class "matrix"
containing computed invariants from the image.
reconstruction
:Object of class "matrix"
representing the reconstructed image from the computed moment.
error
:Object of class "character"
containing a list of error messages produced from calling class methods.
signature(.Object = "Image")
: Construct the "Image"
object. To be used internally when constructing "OrthIm"
and "CmplxIm"
object only.
signature(obj = "Image")
: Plot the calculated moments. Usage: plotMoment(obj).
signature(obj = "Image")
: Set centroid of image to an array of 2 values (the x and y pixel coordinates of the centroid). If a value is not supplied, the centroid will be calculated using geometric moments. Usage: setCentroid(obj)<- c(value1,value2).
signature(obj = "Image")
: Set the image slot of the object to an image in matrix or numeric form. Usage: setImage(obj)<- img.
This class does not have functions available for calculating moments or reconstruction from moments. In order to calculate moments you must use an object of type "OrthIm" or "CmplxIm".
Allison Irvine
OrthIm
,
CmplxIm
,
calcCentroid
,
plotMoment
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.