|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.ops.Operation
net.sourceforge.jiu.color.analysis.MeanDifference
public class MeanDifference
This operation determines the mean difference between two images. It requires two images of the same resolution and adds the absolute difference of all samples. Then it divides by the number of samples in the image (width times height times number of channels).
RGB24Image
,
the other of type Paletted8Image
.RGBIntegerImage
.GrayIntegerImage
.Double meanDifference = MeanDifference.compute(image1, image2);
Constructor Summary | |
---|---|
MeanDifference()
|
Method Summary | |
---|---|
static Double |
compute(PixelImage image1,
PixelImage image2)
Compute the mean difference between two images. |
double |
getDifference()
After a call to process, returns the determined mean difference value. |
void |
process()
This method does the actual work of the operation. |
void |
setImages(PixelImage firstImage,
PixelImage secondImage)
Sets the two images for which the mean difference is to be determined. |
Methods inherited from class net.sourceforge.jiu.ops.Operation |
---|
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MeanDifference()
Method Detail |
---|
public static Double compute(PixelImage image1, PixelImage image2)
image1
- first image to be examinedimage2
- second image to be examined
null
on failure (image types
are incompatible)public double getDifference()
public void process() throws MissingParameterException, WrongParameterException
Operation
process
in class Operation
MissingParameterException
- if any mandatory parameter was not given to the operation
WrongParameterException
- if at least one of the input parameters was
not initialized appropriately (values out of the valid interval, etc.)public void setImages(PixelImage firstImage, PixelImage secondImage)
firstImage
- first imagesecondImage
- second image
IllegalArgumentException
- if either of the images is null,
if their resolution is different or if their types are not supported
by this operation
|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |