de.softpro.signware.SPImage Class Reference
Inheritance diagram for de.softpro.signware.SPImage:

Detailed Description
The SPImage object implements a representation of a static image. The image may be loaded from a color, a gray-scale or a black-and-white image, most image formats can be read, such as tiff, jpeg, png, gif and many more. The SPImage object can load indexed color images, however the saved image will be converted to a true color image.The SPImage object includes methods to perform signature cleaning, cleaning funtionality is optimized for signature snippets which are typically gray-scale or black-and-white regions of a scanned image that include the handwritten signature. Cleaning methods cannot be applied to color images.
- Note:
- All cleaning functions allow a maximum image size of 1280 * 960 pixel. This also affects getComplexity and invert when using the flag SP_INVERT_ENGINE.
- Operating Systems:
- Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
Public Member Functions | |
void | binarize (int iMethod, int iThreshold) throws SPSignwareException |
Binarize the image contained in an image object. | |
void | brightness (double fGray, double fGreen, double fBlue) throws SPSignwareException |
Change the brightness of an image. | |
void | cleanBatch (SPCleanParameter pParameter) throws SPSignwareException |
Clean an image based on the parameters provided. | |
java.awt.Rectangle | cleanDate () throws SPSignwareException |
Delete handwritten text within a signature image. | |
void | cleanFrames (double dTrust) throws SPSignwareException |
Delete all frames which are weighted less than dTrust. | |
void | cleanLines () throws SPSignwareException |
Clean lines in a black-and-white or a gray image. | |
java.awt.Rectangle | cleanSignature () throws SPSignwareException |
Clean signature image, remove horizontal lines, printed text and dirt particles. | |
Object | clone () |
Create a new SPImage object as a clone of another SPImage object. | |
void | contrast (double fGray, double fGreen, double fBlue) throws SPSignwareException |
Change the contrast of an image. | |
SPImage | createClone () throws SPSignwareException |
Create a new SPImage object as a clone of another SPImage object. | |
void | drawImage (byte[] baXMLImage) throws SPSignwareException |
Draw some images in the image. | |
void | drawImage (String strXMLImage) throws SPSignwareException |
Draw some images in the image. | |
void | drawObject (byte[] baXMLObject) throws SPSignwareException |
Draw some rectangles, text and images in the image. | |
void | drawObject (String strXMLObject) throws SPSignwareException |
Draw some rectangles, text and images in the image. | |
void | drawRect (byte[] baXMLRect) throws SPSignwareException |
Draw some rectangles in the image. | |
void | drawRect (String strXMLRect) throws SPSignwareException |
Draw some rectangles in the image. | |
void | drawText (byte[] baXMLText) throws SPSignwareException |
Draw some text in the image. | |
void | drawText (String strXMLText) throws SPSignwareException |
Draw some text in the image. | |
int | getBitsPerPixel () throws SPSignwareException |
Query the number of bits per pixel of the image contained in this object. | |
int[] | getColorImageData () throws SPSignwareException |
Query the image data, one byte per pixel. | |
int | getComplexity () throws SPSignwareException |
Query the complexity of the image contained in this object. | |
int | getDefaultBinarizeMethod () throws SPSignwareException |
Query the default binarisation method in this object, see sec_Cleaning. | |
int | getDefaultBinarizeThreshold () throws SPSignwareException |
Query the default binarisation threshold in this object, see sec_Cleaning. | |
java.util.Vector< SPWeightedFrame > | getFrames () throws SPSignwareException |
Query all frames and their weights in this image. | |
java.awt.image.MemoryImageSource | getImage () throws SPSignwareException |
Convert the SPImage to a MemoryImageSource object. | |
byte[] | getImageData () throws SPSignwareException |
Query the image data, one byte per pixel. | |
int | getPixel (int iX, int iY) throws SPSignwareException |
Query a Pixel. | |
int | getResolution () throws SPSignwareException |
Query the resolution of the image contained in this object. | |
java.awt.Rectangle | getSignatureRegion (int iFlags) throws SPSignwareException |
Query the signature region within this image. | |
java.awt.Dimension | getSize () throws SPSignwareException |
Query the size of the image contained in this object. | |
java.util.Vector< Integer > | getSplitPositions () throws SPSignwareException |
Query possible vertical split positions in the image. | |
void | invert (int iFlags) throws SPSignwareException |
Invert the image. | |
void | maskImage (SPImage spMask, java.awt.Rectangle rcl, int iFlags) throws SPSignwareException |
Mask this image with another image spMask in the region defined by the rectangle rcl. | |
void | mirror (int iAxes) throws SPSignwareException |
Mirror the image. | |
void | region (java.awt.Rectangle rcl) throws SPSignwareException |
Reduce this image to the region defined by the Rectangle rcl. | |
void | resize (int iResolution, int iAlgo) throws SPSignwareException |
Resize the image to a defined resolution. | |
void | rotate (int iAngle) throws SPSignwareException |
Rotate the image. | |
byte[] | saveInBitmap (int iFormat) throws SPSignwareException |
Convert the image contents of this object to a standard image format. | |
void | setBitsPerPixel (int iBitsPerPixel, int iColorPalette[]) throws SPSignwareException |
Set the number of bits per pixel of the image contained in this object. | |
void | setBitsPerPixel (int iBitsPerPixel) throws SPSignwareException |
Set the number of bits per pixel of the image contained in this object. | |
void | setDefaultBinarizeParams (int iDefaultMethod, int iDefaultThreshold) throws SPSignwareException |
Set the default threshold in this object, see sec_Cleaning. | |
void | setEmpty (int iWidth, int iHeight, int iColor, int iResolution) throws SPSignwareException |
Set an empty image. | |
void | setEmpty (int iWidth, int iHeight, int iColor, int iResolution, int iBitsPerPixel) throws SPSignwareException |
Set an empty image. | |
void | setImage (SPBitmap pBitmap, int iPage) throws SPSignwareException |
Fill this SPImage object with an image from a bitmap. | |
void | setPixel (int iX, int iY, int iGray) throws SPSignwareException |
Set a Pixel. | |
void | setReference (SPReference pReference, int iIndex, SPTicket pTicket) throws SPSignwareException |
Fill this SPImage object with an image from a SPReference object. | |
void | setReference (SPReference pReference, int iIndex) throws SPSignwareException |
Fill this SPImage object with an image from a SPReference object. | |
void | setResolution (int iRes) throws SPSignwareException |
Set the resolution of the image contained in this object. | |
void | setSignature (SPSignature pSignature, SPTicket pTicket) throws SPSignwareException |
Fill this SPImage object with an image from a SPSignature object. | |
void | setSignature (SPSignature pSignature) throws SPSignwareException |
Fill this SPImage object with an image from a SPSignature object. | |
void | setTellerImage (SPTellerImage pTellerImage) throws SPSignwareException |
Fill this SPImage object with an image from a SPTellerImage object. | |
void | setTemplate (SPTemplate pTemplate, SPTicket pTicket) throws SPSignwareException |
Fill this SPImage object with an image from a SPTemplate object. | |
void | setTemplate (SPTemplate pTemplate) throws SPSignwareException |
Fill this SPImage object with an image from a SPTemplate object. | |
SPImage (SPImage origin) throws SPSignwareException | |
Create a new SPImage object as a clone of another SPImage object. | |
SPImage () throws SPSignwareException | |
Create a new SPImage object. | |
Static Public Attributes | |
static final String | SP_BINARIZE_ENABLE = "SPBinarizeEnable" |
SPCleanParameter for SPImageClean: enable binarization, see sec_Cleaning. | |
static final String | SP_BINARIZE_METHOD = "SPBinarizeMethod" |
SPCleanParameter for SPImageClean: define binarization method, see sec_Cleaning. | |
static final String | SP_BINARIZE_THRESHOLD = "SPBinarizeThreshold" |
SPCleanParameter for SPImageClean: define binarization threshold, see sec_Cleaning. | |
static final String | SP_CLEAN_DATE_ENABLE = "SPCleanDateEnable" |
SPCleanParameter for SPImageClean: enable handwritten text cleaning, see sec_Cleaning. | |
static final String | SP_CLEAN_SIGNATURE_ENABLE = "SPCleanSignatureEnable" |
SPCleanParameter for SPImageClean: enable signature cleaning, see sec_Cleaning. | |
static final String | SP_CLEANFRAMES_ENABLE = "SPCleanFrameEnable" |
SPCleanParameter for SPImageClean: enable frame cleaning, see sec_Cleaning. | |
static final String | SP_CLEANFRAMES_TRUST = "SPCleanFrameTrust" |
SPCleanParameter for SPImageClean: define frame cleaning trust, see sec_Cleaning. | |
static final String | SP_CLEANLINES_ENABLE = "SPCleanLineEnable" |
SPCleanParameter for SPImageClean: enable line cleaning, see sec_Cleaning. | |
static final String | SP_CUT_REGION_BOTTOM = "SPCutRegionBottom" |
SPCleanParameter for SPImageClean: define cut region bottom coordinate, see sec_Cleaning. | |
static final String | SP_CUT_REGION_ENABLE = "SPCutRegionEnable" |
SPCleanParameter for SPImageClean: enable cut region, see sec_Cleaning. | |
static final String | SP_CUT_REGION_LEFT = "SPCutRegionLeft" |
SPCleanParameter for SPImageClean: define cut region left coordinate, see sec_Cleaning. | |
static final String | SP_CUT_REGION_RIGHT = "SPCutRegionRight" |
SPCleanParameter for SPImageClean: define cut region right coordinate, see sec_Cleaning. | |
static final String | SP_CUT_REGION_TOP = "SPCutRegionTop" |
SPCleanParameter for SPImageClean: define cut region top coordinate, see sec_Cleaning. | |
static final int | SP_CUT_SIGNATURE = 1 |
Flag to cut the signature region in the image, see sec_Cleaning. | |
static final String | SP_CUT_SIGNATURE_REGION_ENABLE = "SPCutSignatureRegionEnable" |
SPCleanParameter for SPImageClean: enable signature region cut, see sec_Cleaning. | |
static final int | SP_INVERT_AUTO = 1 |
Flag to determine image inversion automatically. | |
static final String | SP_INVERT_ENABLE = "SPInvertEnable" |
SPCleanParameter for SPImageClean: enable inversion, see sec_Cleaning. | |
static final int | SP_INVERT_ENGINE = 2 |
Flag to request usage of the static cleaning engine instead of internal algorithms. | |
static final String | SP_INVERT_FLAGS = "SPInvertFlags" |
SPCleanParameter for SPImageClean: define invert flags, bit combination of SP_INVERT_AUTO, SP_INVERT_ENGINE, SP_INVERT_NONE, see sec_Cleaning. | |
static final int | SP_INVERT_NONE = 4 |
Flag to ignore image inversion. | |
static final int | SP_MASK_AND = 2 |
Mask operation AND, image will be anded with the mask. | |
static final int | SP_MASK_CPY = 4 |
Mask operation COPY, the mask will be copied into the image. | |
static final int | SP_MASK_MAX = 6 |
Mask operation MAX, image will be the maximum of the corresponding pixels in image and mask. | |
static final int | SP_MASK_MIN = 7 |
Mask operation MIN, image will be the minimum of the corresponding pixels in image and mask. | |
static final int | SP_MASK_NOTCPY = 5 |
Mask operation NOT COPY, the mask will be inverted and copied into the image. | |
static final int | SP_MASK_OR = 1 |
Mask operation OR, image will be ored with the mask. | |
static final int | SP_MASK_XOR = 3 |
Mask operation XOR, image will be xored with the mask. | |
static final String | SP_MIRROR_AXES = "SPMirrorAxes" |
SPCleanParameter for SPImageClean: define mirror axes, bit combination of 1: horizontal, 2 vertical, see sec_Cleaning. | |
static final String | SP_MIRROR_ENABLE = "SPMirrorEnable" |
SPCleanParameter for SPImageClean: enable mirror, see sec_Cleaning. | |
static final String | SP_ROTATE_ANGLE = "SPRotateAngle" |
SPCleanParameter for SPImageClean: define rotation angle, 90 / 180 or 270, see sec_Cleaning. | |
static final String | SP_ROTATE_ENABLE = "SPRotateEnable" |
SPCleanParameter for SPImageClean: enable rotation, see sec_Cleaning. | |
Package Functions | |
final native int | jniFree () |
Constructor & Destructor Documentation
|
Create a new SPImage object.
|
|
Create a new SPImage object as a clone of another SPImage object.
|
Member Function Documentation
|
Binarize the image contained in an image object. Images are expected to have black strokes on white background with a gray level 255 equaling white. Binarization will invert the image if the background in black. The image may be inverted after this operation. Calculation of best binarization threshold: find the gray level with the most pixels in the image histogram. The calculated best threshold will be defined at the gray level with most pixel - 25. This function returns immediately if the image is a black-and-white image.
|
|
Change the brightness of an image.
|
|
Clean an image based on the parameters provided. This is a compact call to perform any combination of cleaning, please see sec_Cleaning for details.
|
|
Delete handwritten text within a signature image.
If this image is a gray image then this function will create a black-and-white image, clean frames in the black-and-white image and finally mask this image with the black-and-white image. For an overview on image cleaning see sec_Cleaning.
|
|
Delete all frames which are weighted less than dTrust.
If this image is a gray image then this function will create a black-and-white image, clean frames in the black-and-white image and finally mask this image with the black-and-white image. For an overview on image cleaning see sec_Cleaning.
|
|
Clean lines in a black-and-white or a gray image.
If this image is a gray image then this function will create a black-and-white image, clean lines in the black-and-white image and finally mask this image with the black-and-white image. For an overview on image cleaning see sec_Cleaning.
|
|
Clean signature image, remove horizontal lines, printed text and dirt particles.
If this image is a gray image then this function will create a black-and-white image, clean frames in the black-and-white image and finally mask this image with the black-and-white image. For an overview on image cleaning see sec_Cleaning.
|
|
Create a new SPImage object as a clone of another SPImage object.
|
|
Change the contrast of an image.
|
|
Create a new SPImage object as a clone of another SPImage object.
|
|
Draw some images in the image. For an overview on XML tags please see sec_XML_Data
|
|
Draw some images in the image. For an overview on XML tags please see sec_XML_Data
|
|
Draw some rectangles, text and images in the image. For an overview on XML tags please see sec_XML_Data
|
|
Draw some rectangles, text and images in the image. For an overview on XML tags please see sec_XML_Data
|
|
Draw some rectangles in the image. For an overview on XML tags please see sec_XML_Data
|
|
Draw some rectangles in the image. For an overview on XML tags please see sec_XML_Data
|
|
Draw some text in the image. For an overview on XML tags please see sec_XML_Data
|
|
Draw some text in the image. For an overview on XML tags please see sec_XML_Data
|
|
Query the number of bits per pixel of the image contained in this object.
|
|
Query the image data, one byte per pixel. The returned byte array will contain the gray levels for all pixel of the image, stored from left to right and top to bottom, e.g pixel(w, h) = result[h * width + w].
|
|
Query the complexity of the image contained in this object. The returned complexity is valid only if this object contains a clean signature image.
|
|
Query the default binarisation method in this object, see sec_Cleaning.
|
|
Query the default binarisation threshold in this object, see sec_Cleaning.
|
|
Query all frames and their weights in this image. For an overview on image cleaning see sec_Cleaning
|
|
Convert the SPImage to a MemoryImageSource object. This is a convenience function to convert SPImage objects to java.awt.Image
|
|
Query the image data, one byte per pixel. The returned byte array will contain the gray levels for all pixel of the image, stored from left to right and top to bottom, e.g pixel(w, h) = result[h * width + w].
|
|
Query a Pixel. The gray value 255 represents the color white, 0 represents black.
|
|
Query the resolution of the image contained in this object.
|
|
Query the signature region within this image. For an overview on image cleaning see sec_Cleaning
|
|
Query the size of the image contained in this object.
|
|
Query possible vertical split positions in the image. For an overview on image cleaning see sec_Cleaning
|
|
Invert the image.
|
|
Implements de.softpro.signware.SPSignwareObject. |
|
Mask this image with another image spMask in the region defined by the rectangle rcl. spMask MUST be smaller or equal to this image, width and height of rcl must equal width and height of spMask!
|
|
Mirror the image.
|
|
Reduce this image to the region defined by the Rectangle rcl.
|
|
Resize the image to a defined resolution. The new Resultion must be smaller than the current resolution.
|
|
Rotate the image.
|
|
Convert the image contents of this object to a standard image format.
|
|
Set the number of bits per pixel of the image contained in this object.
|
|
Set the number of bits per pixel of the image contained in this object.
|
|
Set the default threshold in this object, see sec_Cleaning. The default threshold is used to temporarily convert gray to black-and-white images. It affects these functions:
|
|
Set an empty image. SPImage supports gray scale images with 8 bit per pixel.
|
|
Set an empty image. SPImage supports gray scale images with 8 bit per pixel.
|
|
Fill this SPImage object with an image from a bitmap.
|
|
Set a Pixel. The gray value 255 represents the color white, 0 represents black. For black-and-white images pass either 0 or 255.
|
|
Fill this SPImage object with an image from a SPReference object.
|
|
Fill this SPImage object with an image from a SPReference object.
|
|
Set the resolution of the image contained in this object. setResolution overrules the resolution tag of the contained image, use resize() to change the resolution and to calculate the contents based on the new resolution
|
|
Fill this SPImage object with an image from a SPSignature object.
|
|
Fill this SPImage object with an image from a SPSignature object.
|
|
Fill this SPImage object with an image from a SPTellerImage object.
|
|
Fill this SPImage object with an image from a SPTemplate object.
|
|
Fill this SPImage object with an image from a SPTemplate object.
|
Member Data Documentation
|
SPCleanParameter for SPImageClean: enable binarization, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: define binarization method, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: define binarization threshold, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: enable handwritten text cleaning, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: enable signature cleaning, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: enable frame cleaning, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: define frame cleaning trust, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: enable line cleaning, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: define cut region bottom coordinate, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: enable cut region, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: define cut region left coordinate, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: define cut region right coordinate, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: define cut region top coordinate, see sec_Cleaning.
|
|
Flag to cut the signature region in the image, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: enable signature region cut, see sec_Cleaning.
|
|
Flag to determine image inversion automatically. SPImageInvert will invert the image only if the background is black, else SPImageInvert will leave the image unchanged
|
|
SPCleanParameter for SPImageClean: enable inversion, see sec_Cleaning.
|
|
Flag to request usage of the static cleaning engine instead of internal algorithms. SPImageInvert will be delegated to a cleaning engine. SP_PARAMERR will be returned if the image color depth is not supported by the engine. This flag is not supported under Linux.
|
|
SPCleanParameter for SPImageClean: define invert flags, bit combination of SP_INVERT_AUTO, SP_INVERT_ENGINE, SP_INVERT_NONE, see sec_Cleaning.
|
|
Flag to ignore image inversion. SPImageInvert return without inverting the image
|
|
Mask operation AND, image will be anded with the mask.
|
|
Mask operation COPY, the mask will be copied into the image.
|
|
Mask operation MAX, image will be the maximum of the corresponding pixels in image and mask.
|
|
Mask operation MIN, image will be the minimum of the corresponding pixels in image and mask.
|
|
Mask operation NOT COPY, the mask will be inverted and copied into the image.
|
|
Mask operation OR, image will be ored with the mask.
|
|
Mask operation XOR, image will be xored with the mask.
|
|
SPCleanParameter for SPImageClean: define mirror axes, bit combination of 1: horizontal, 2 vertical, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: enable mirror, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: define rotation angle, 90 / 180 or 270, see sec_Cleaning.
|
|
SPCleanParameter for SPImageClean: enable rotation, see sec_Cleaning.
|
The documentation for this class was generated from the following file: