OcrInput

Inheritance: java.lang.Object

All Implemented Interfaces: java.lang.Iterable

public class OcrInput implements Iterable<ImageData>

画像からテキストを認識するためのメインクラスです。

コンストラクタ

コンストラクタ説明
OcrInput(InputType type, PreprocessingFilter filters)コンテナを作成し、画像/ドキュメントのタイプと今後の処理/認識用フィルタを設定するためのコンストラクタです。
OcrInput(InputType type)

メソッド

メソッド説明
add(int[] pixels, int width, int height, int bitsPerPixel)デコードされた画像を認識/処理用リストに追加します。
add(BufferedImage image)認識/処理用の画像を含む BufferedImage を追加します。
add(BufferedImage image, int startPage, int pagesCount)認識/処理用のマルチページ画像を含む BufferedImage を追加します。
add(InputStream stream)認識/処理用の画像を含む InputStream を追加します。
add(InputStream stream, int startPage, int pagesCount)認識/処理用のマルチページ画像を含む InputStream を追加します。
add(String fullPath)認識/処理用の画像を含むパスまたは URI を追加します。
add(String fullPath, int startPage, int pagesCount)認識/処理用のマルチページ画像/ドキュメントを追加します。
addBase64(String base64)認識/処理用の画像を含む base64 文字列を追加します。
clear()処理/認識項目数を 0 に設定します。
clearFilters()すべてのフィルターを削除します。
equals(Object arg0)
get(int index)処理または認識された画像に関する情報を返します。
getClass()
hashCode()
iterator()
notify()
notifyAll()
replaceFilters(PreprocessingFilter filters)古いフィルターを削除し、新しいフィルターを設定します。
size()処理または認識のための項目数。
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

OcrInput(InputType type, PreprocessingFilter filters)

public OcrInput(InputType type, PreprocessingFilter filters)

コンテナを作成し、画像/ドキュメントのタイプと今後の処理/認識用フィルタを設定するためのコンストラクタです。

Parameters:

パラメータタイプ説明
typeInputTypeコンテナに追加される画像/ドキュメントのタイプを設定します。
filtersPreprocessingFilter設定された処理フィルターは、今後の処理または認識に適用されます。

OcrInput(InputType type)

public OcrInput(InputType type)

Parameters:

パラメータタイプ説明
typeInputType

add(int[] pixels, int width, int height, int bitsPerPixel)

public void add(int[] pixels, int width, int height, int bitsPerPixel)

デコードされた画像を認識/処理用のリストに追加します。画像のタイプは、コンストラクタで指定されたタイプ(SingleImage)と一致する必要があります。

Parameters:

パラメータタイプ説明
ピクセルint[]ピクセルは 32 ビット整数値(rgb)で表されます。
int画像の幅。
高さint画像の高さ。
bitsPerPixelint1〜32 ビットをサポートします。

add(BufferedImage image)

public void add(BufferedImage image)

認識/処理用の画像を含む BufferedImage を追加します。画像のタイプは、コンストラクタで指定されたタイプと一致する必要があります。

Parameters:

パラメータタイプ説明
画像java.awt.image.BufferedImage画像またはドキュメントを含む BufferedImage。

add(BufferedImage image, int startPage, int pagesCount)

public void add(BufferedImage image, int startPage, int pagesCount)

認識/処理用のマルチページ画像を含む BufferedImage を追加します。画像のタイプは、コンストラクタで指定されたタイプと一致する必要があります。

Parameters:

パラメータタイプ説明
画像java.awt.image.BufferedImageマルチページドキュメントを含む BufferedImage。
startPageint処理または認識の最初のページ/画像です。ドキュメントに使用します。
pagesCountint処理または認識のためのページ/画像の総数です。ドキュメントに使用します。デフォルト = すべて。

add(InputStream stream)

public void add(InputStream stream)

認識/処理用の画像を含む InputStream を追加します。画像のタイプは、コンストラクタで指定されたタイプと一致する必要があります。

Parameters:

パラメータタイプ説明
ストリームjava.io.InputStream画像またはドキュメントを含む InputStream。

add(InputStream stream, int startPage, int pagesCount)

public void add(InputStream stream, int startPage, int pagesCount)

認識/処理用のマルチページ画像を含む InputStream を追加します。画像のタイプはコンストラクタで指定されたタイプと一致する必要があります。

Parameters:

パラメータタイプ説明
ストリームjava.io.InputStreamマルチページドキュメントを含む InputStream。
startPageint処理または認識の最初のページ/画像です。ドキュメントに使用します。
pagesCountint処理または認識のためのページ/画像の総数です。ドキュメントに使用します。デフォルト = すべて。

add(String fullPath)

public void add(String fullPath)

認識/処理用の画像を含むパスまたは URI を追加します。画像のタイプはコンストラクタで指定されたタイプと一致する必要があります。

Parameters:

パラメータタイプ説明
fullPathjava.lang.String画像/ドキュメント/フォルダー/アーカイブへのパス。

add(String fullPath, int startPage, int pagesCount)

public void add(String fullPath, int startPage, int pagesCount)

認識/処理用のマルチページ画像/ドキュメントを追加します。画像のタイプはコンストラクタで指定されたタイプと一致する必要があります。

Parameters:

パラメータタイプ説明
fullPathjava.lang.String画像/ドキュメント/フォルダー/アーカイブへのパス。
startPageint処理/認識用の最初のページ/画像です。ドキュメント、ZIP、フォルダーで使用します。
pagesCountint処理/認識用のページ/画像の総数です。ドキュメント、ZIP、フォルダーで使用します。デフォルト = すべて。

addBase64(String base64)

public void addBase64(String base64)

認識/処理用の画像を含む base64 文字列を追加します。画像のタイプはコンストラクタで指定されたタイプと一致する必要があります。

Parameters:

パラメータタイプ説明
base64java.lang.String単一画像を含む Base64 文字列。

clear()

public void clear()

処理/認識用の項目数を 0 に設定します。コレクションをクリアします。

clearFilters()

public void clearFilters()

すべてのフィルターを削除します。

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

パラメータタイプ説明
arg0java.lang.Object

Returns: boolean

get(int index)

public ImageData get(int index)

処理または認識された画像に関する情報を返します。

Parameters:

パラメータタイプ説明
indexintリスト内の画像の位置。

Returns: ImageData - The object of @see ImageData

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hashCode()

public native int hashCode()

Returns: int

iterator()

public Iterator<ImageData> iterator()

Returns: java.util.Iterator<com.aspose.ocr.ImageData>

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

replaceFilters(PreprocessingFilter filters)

public void replaceFilters(PreprocessingFilter filters)

古いフィルターを削除し、新しいフィルターを設定します。

Parameters:

パラメータタイプ説明
filtersPreprocessingFilterさらに処理または認識のために処理フィルターが適用されます。

size()

public int size()

処理または認識のための項目数。

Returns: int - 項目数。

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

パラメータタイプ説明
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

パラメータタイプ説明
arg0long
arg1int