|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jigl.image.utils.ImageOps
ImageOps is a class that allows
basic opearations on images from the Command Line. Below is a table
of the currently supported operations and their syntax
|
|
||
|
|
|
|
| Add two images | -add <image1> <image2> <output file> | * Note: Some image types
are incompatible for these operations (in any order).
|
| Subtract two images | -subtract <image1> <image2> <output file> | |
| Multiply two images | -multiply <image1> <image2> <output file> | |
| Divide two images | -divide <image1> <image2> <output file> | |
| Add a constant to all the pixels in an image | -addconst <image1> <const>+ <output file> | * Note: It is not possible
to use these operations using float or double values on eithier a GrayImage
or a ColorImage.
* Note: ColorImages and RealColorImages require 3 constants, one for each plane. Complex Images require two, one for the real plane and one for the imaginary plane. |
| Subtract a constant from all the pixels in an image | -subtractconst <image1> <const>+ <output file> | |
| Multiply a constant by all the pixels in an image | -multiplyconst <image1> <const>+ <output file> | |
| Divide all the pixels in an image by a constant | -divideconst <image1> <const>+ <output file> | |
| Clip an arbitary region of an image | -clip <image1> <const1> <const2> <output file> | const1 is the low value
const2 is the high value |
| Clear an image to a value | -clear <image1> <const> <output file> | the constant is the value to set it to |
| ByteSize operation | -bytesize <image1> <output file> | |
| Diff operation | -diff <image1> <image2> <output file> | |
Examples of a Command-lines:
java ImageOpps -add C:\pictures\test1.ppm C:\pictures\test2.ppm C:\Output\out_test.ppm
java ImageOpps -mulitiplyconst C:\pictures\test1.ppm 5 C:\Output\out_test.ppm -debug
java ImageOpps -clip C:\pictures\test1.ppm 40 150 C:\Output\out_test.ppm
| Field Summary | |
private static boolean |
debug
Debug flag. |
private static String[] |
param
Command line parameters |
| Constructor Summary | |
ImageOps()
|
|
| Method Summary | |
private static Image |
basic(int which)
Utility method: handling the addition, subtraction, multiplicationa and division of two images. |
private static Image |
basicConst(int which)
Utility method; handling the addition of a contant to an image. |
private static Image |
byteSize()
Scale the range to [0..255] |
private static Image |
clear()
Clear an image with a constant. |
private static Image |
clip()
Clip an image. |
private static Image |
imageOpen(int file)
Utility method: open an image file. |
static void |
main(String[] argv)
For command line operations. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static boolean debug
private static String[] param
| Constructor Detail |
public ImageOps()
| Method Detail |
public static void main(String[] argv)
private static Image imageOpen(int file)
throws InterruptedException,
IOException,
IllegalPBMFormatException,
ImageNotSupportedException
InterruptedException
IOException
IllegalPBMFormatException
ImageNotSupportedException
private static Image basic(int which)
throws IncompatibleImagesException,
ImageNotSupportedException,
ColorModelNotSupportedException,
InterruptedException,
ColorModelUnknownException,
IllegalPBMFormatException,
IOException
IncompatibleImagesException
ImageNotSupportedException
ColorModelNotSupportedException
InterruptedException
ColorModelUnknownException
IllegalPBMFormatException
IOException
private static Image basicConst(int which)
throws IncompatibleImagesException,
ColorModelNotSupportedException,
ColorModelUnknownException,
InterruptedException,
IllegalPBMFormatException,
IOException,
ImageNotSupportedException
IncompatibleImagesException
ColorModelNotSupportedException
ColorModelUnknownException
InterruptedException
IllegalPBMFormatException
IOException
ImageNotSupportedException
private static Image byteSize()
throws ImageNotSupportedException,
ColorModelNotSupportedException,
ColorModelUnknownException,
InterruptedException,
IllegalPBMFormatException,
IOException
ImageNotSupportedException
ColorModelNotSupportedException
ColorModelUnknownException
InterruptedException
IllegalPBMFormatException
IOException
private static Image clip()
throws ImageNotSupportedException,
ColorModelNotSupportedException,
ColorModelUnknownException,
InterruptedException,
IllegalPBMFormatException,
IOException
ImageNotSupportedException
ColorModelNotSupportedException
ColorModelUnknownException
InterruptedException
IllegalPBMFormatException
IOException
private static Image clear()
throws ImageNotSupportedException,
ColorModelNotSupportedException,
ColorModelUnknownException,
InterruptedException,
IllegalPBMFormatException,
IOException
ImageNotSupportedException
ColorModelNotSupportedException
ColorModelUnknownException
InterruptedException
IllegalPBMFormatException
IOException
|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||