Jacson

de.spieleck.app.jacson.source
Class OCRSource

java.lang.Object
  extended byde.spieleck.app.jacson.PluginBase
      extended byde.spieleck.app.jacson.source.ChunkSourceBase
          extended byde.spieleck.app.jacson.source.LineChunkSource
              extended byde.spieleck.app.jacson.source.OCRSource
All Implemented Interfaces:
JacsonChunkSource, JacsonReporting, JacsonStately

public class OCRSource
extends LineChunkSource

This Sources uses images as input and delievers chunks which are taken from OCR.
Don't see a use case at the moment, but let's have a try!
What you need is a OCR tool with a command-line-interface like GOCR, which I use.

Version:
$Id: OCRSource.java 13 2005-09-28 06:02:56Z pcs $
Author:
Patrick Carl

Field Summary
 
Fields inherited from class de.spieleck.app.jacson.source.LineChunkSource
chunks, fileName, in
 
Constructor Summary
OCRSource(java.lang.String imageFile, java.lang.String ocrPath)
          Creates a new instance of OCRSource using the imageFile as input and the parameter ocrPath as path to your OCR-tool with command-line-interface.
 
Method Summary
 java.lang.String getImageFile()
          Getter for property imageFile.
 java.lang.String getOcrPath()
          Getter for property ocrPath.
static void main(java.lang.String[] args)
           
 java.lang.String message()
           
 void setImageFile(java.lang.String imageFile)
          Setter for property imageFile.
 void setOcrPath(java.lang.String ocrPath)
          Setter for property ocrPath.
 
Methods inherited from class de.spieleck.app.jacson.source.LineChunkSource
nextChunk, setReader, setStream, setStream, summary, unwrapGZIP
 
Methods inherited from class de.spieleck.app.jacson.PluginBase
getRegReport, getRegState, registerReport, registerState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.spieleck.app.jacson.JacsonStately
registerState
 
Methods inherited from interface de.spieleck.app.jacson.JacsonReporting
registerReport
 

Constructor Detail

OCRSource

public OCRSource(java.lang.String imageFile,
                 java.lang.String ocrPath)
Creates a new instance of OCRSource using the imageFile as input and the parameter ocrPath as path to your OCR-tool with command-line-interface.

Method Detail

getImageFile

public java.lang.String getImageFile()
Getter for property imageFile.

Returns:
Value of property imageFile.

setImageFile

public void setImageFile(java.lang.String imageFile)
Setter for property imageFile.

Parameters:
imageFile - New value of property imageFile.

getOcrPath

public java.lang.String getOcrPath()
Getter for property ocrPath.

Returns:
Value of property ocrPath.

setOcrPath

public void setOcrPath(java.lang.String ocrPath)
Setter for property ocrPath.

Parameters:
ocrPath - New value of property ocrPath.

message

public java.lang.String message()
Specified by:
message in interface JacsonChunkSource
Overrides:
message in class LineChunkSource

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

Spieleck

Copyleft 2002 spieleck.de.