net.sourceforge.javaocr.scanner
Interface DocumentScannerListener

All Known Implementing Classes:
DocumentScannerListenerAdaptor

Deprecated. dusplicates functionality

public interface DocumentScannerListener

Listener interface for the DocumentScanner utility class.

Author:
Ronald B. Cemer

Method Summary
 void beginDocument(PixelImage pixelImage)
          Deprecated. This method is called when scanning of the document begins.
 void beginRow(PixelImage pixelImage, int y1, int y2)
          Deprecated. This method is called when scanning of a row of text within the document begins.
 void endDocument(PixelImage pixelImage)
          Deprecated. This method is called when scanning of the document is complete.
 void endRow(PixelImage pixelImage, int y1, int y2)
          Deprecated. This method is called when scanning of a row of text within the document is complete.
 void processChar(PixelImage pixelImage, int x1, int y1, int x2, int y2, int rowY1, int rowY2)
          Deprecated. This method is called to process a character or group of characters within the document.
 void processSpace(PixelImage pixelImage, int x1, int y1, int x2, int y2)
          Deprecated. This method is called to process a space within the document.
 

Method Detail

beginDocument

void beginDocument(PixelImage pixelImage)
Deprecated. 
This method is called when scanning of the document begins.

Parameters:
pixelImage - The PixelImage containing the document which is being scanned.

beginRow

void beginRow(PixelImage pixelImage,
              int y1,
              int y2)
Deprecated. 
This method is called when scanning of a row of text within the document begins.

Parameters:
pixelImage - The PixelImage containing the document which is being scanned.
y1 - The y position of the top pixel row of the row of text that is being scanned.
y2 - The y position of the pixel row immediately below the last pixel row of the row of text that is being scanned. This is always one more than the last pixel row of the row of text that is being scanned.

processChar

void processChar(PixelImage pixelImage,
                 int x1,
                 int y1,
                 int x2,
                 int y2,
                 int rowY1,
                 int rowY2)
Deprecated. 
This method is called to process a character or group of characters within the document.

Note that when two or more characters are connected together without enough whitespace to determine where the first one ends and the next one begins, the document scanner may not be able to split the characters properly. If this occurs, then two or more characters may be included in a single call to this method. In this case, it is the responsibility of this method to process all characters included in the area passed into this method.

Parameters:
pixelImage - The PixelImage containing the document which is being scanned.
x1 - The x position of the first pixel column of the character or group of characters being scanned.
y1 - The y position of the top pixel row of the row of text that is being scanned.
x2 - The x position of the pixel column immediately to the right of the last pixel column of the character or group of characters being scanned. This is always one more than the last pixel column of the character or group of characters that is being scanned.
y2 - The y position of the pixel row immediately below the last pixel row of the row of text that is being scanned. This is always one more than the last pixel row of the row of text that is being scanned.
rowY1 - The y position of the top scan line of the row.
rowY2 - The y position of the scan line immediately below the bottom of the row.

processSpace

void processSpace(PixelImage pixelImage,
                  int x1,
                  int y1,
                  int x2,
                  int y2)
Deprecated. 
This method is called to process a space within the document.

A space is simply an area of whitespace between two characters that is deemed by the document scanner to be wide enough to represent a space character.

Parameters:
pixelImage - The PixelImage containing the document which is being scanned.
x1 - The x position of the first pixel column of the character or group of characters being scanned.
y1 - The y position of the top pixel row of the row of text that is being scanned.
x2 - The x position of the pixel column immediately to the right of the last pixel column of the character or group of characters being scanned. This is always one more than the last pixel column of the character or group of characters that is being scanned.
y2 - The y position of the pixel row immediately below the last pixel row of the row of text that is being scanned. This is always one more than the last pixel row of the row of text that is being scanned.

endRow

void endRow(PixelImage pixelImage,
            int y1,
            int y2)
Deprecated. 
This method is called when scanning of a row of text within the document is complete.

Parameters:
pixelImage - The PixelImage containing the document which is being scanned.
y1 - The y position of the top pixel row of the row of text that is being scanned.
y2 - The y position of the pixel row immediately below the last pixel row of the row of text that is being scanned. This is always one more than the last pixel row of the row of text that is being scanned.

endDocument

void endDocument(PixelImage pixelImage)
Deprecated. 
This method is called when scanning of the document is complete.

Parameters:
pixelImage - The PixelImage containing the document which is being scanned.


Copyright © -2012. All Rights Reserved.