Package com.nefrock.edgeocr
Class TextRecognizerSettings
java.lang.Object
com.nefrock.edgeocr.TextRecognizerSettings
文字認識モデル設定を表す構造体
-
Constructor Summary
ConstructorsConstructorDescriptionTextRecognizerSettings(int maxCandidates, float confidenceThresholdOne, float confidenceThresholdTwo, boolean enableMasking) 文字認識モデルの設定を初期化する -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatintbooleanvoidsetConfidenceThresholdOne(float confidenceThresholdOne) 文字認識モデルにおける1つ目の閾値を設定するvoidsetConfidenceThresholdTwo(float confidenceThresholdTwo) 文字認識モデルにおける2つ目の閾値を設定するvoidsetEnableMasking(boolean enableMasking) マスク処理を有効にするかどうかを設定する。 行間が狭い画像などで、誤認識を減らす効果がある。voidsetMaxCandidates(int maxCandidates) 文字列の文字ごとの最大候補数を設定する
-
Constructor Details
-
TextRecognizerSettings
public TextRecognizerSettings(int maxCandidates, float confidenceThresholdOne, float confidenceThresholdTwo, boolean enableMasking) 文字認識モデルの設定を初期化する- Parameters:
maxCandidates- 文字列の文字ごとの最大候補数confidenceThresholdOne- 文字候補の確率計算における1つ目の閾値confidenceThresholdTwo- 文字候補の確率計算における2つ目の閾値enableMasking- マスク処理を有効にするかどうか
-
-
Method Details
-
getMaxCandidates
public int getMaxCandidates()- Returns:
- 文字列の文字ごとの最大候補数
-
setMaxCandidates
public void setMaxCandidates(int maxCandidates) 文字列の文字ごとの最大候補数を設定する- Parameters:
maxCandidates- 文字列の文字ごとの最大候補数
-
getConfidenceThresholdOne
public float getConfidenceThresholdOne()- Returns:
- 文字認識モデルにおける1つ目の閾値
-
setConfidenceThresholdOne
public void setConfidenceThresholdOne(float confidenceThresholdOne) 文字認識モデルにおける1つ目の閾値を設定する- Parameters:
confidenceThresholdOne- 文字候補の確率計算における1つ目の閾値
-
getConfidenceThresholdTwo
public float getConfidenceThresholdTwo()- Returns:
- 文字認識モデルにおける2つ目の閾値
-
setConfidenceThresholdTwo
public void setConfidenceThresholdTwo(float confidenceThresholdTwo) 文字認識モデルにおける2つ目の閾値を設定する- Parameters:
confidenceThresholdTwo- 文字候補の確率計算における2つ目の閾値
-
isEnableMasking
public boolean isEnableMasking()- Returns:
- マスク処理が有効かどうか
-
setEnableMasking
public void setEnableMasking(boolean enableMasking) マスク処理を有効にするかどうかを設定する。 行間が狭い画像などで、誤認識を減らす効果がある。- Parameters:
enableMasking- マスク処理を有効にするかどうか
-