Class DetectionFilter

java.lang.Object
com.nefrock.edgeocr.DetectionFilter

public abstract class DetectionFilter extends Object
検出結果のフィルタを表すクラスです。このクラスを継承して、filterメソッドを実装してください。
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    元画像の高さ(ピクセル)。「元画像」とは、ViewPortの適応後の(画面に見えている)画像を指します。
    int
    元画像の幅(ピクセル)。「元画像」とは、ViewPortの適応後の(画面に見えている)画像を指します。
    android.graphics.RectF
    読み取り範囲。 この範囲は、元画像の左上を原点とした相対座標系になります。
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract List<Detection>
    filter(List<Detection> detections)
    検出結果をフィルタリングします。
    このメソッドをオーバーライドして、フィルタリング処理を実装してください。Detectionの 情報を参照して、フィルタリングを行ってください。 この関数は、認識を行う前のDetectionを扱うので、TextまたはBarcodeの具体的なクラスを 使用することはできません。

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • imageWidth

      public int imageWidth
      元画像の幅(ピクセル)。「元画像」とは、ViewPortの適応後の(画面に見えている)画像を指します。
    • imageHeight

      public int imageHeight
      元画像の高さ(ピクセル)。「元画像」とは、ViewPortの適応後の(画面に見えている)画像を指します。
    • scanArea

      public android.graphics.RectF scanArea
      読み取り範囲。 この範囲は、元画像の左上を原点とした相対座標系になります。
  • Constructor Details

    • DetectionFilter

      public DetectionFilter()
  • Method Details

    • filter

      public abstract List<Detection> filter(List<Detection> detections)
      検出結果をフィルタリングします。
      このメソッドをオーバーライドして、フィルタリング処理を実装してください。Detectionの 情報を参照して、フィルタリングを行ってください。 この関数は、認識を行う前のDetectionを扱うので、TextまたはBarcodeの具体的なクラスを 使用することはできません。
      Parameters:
      detections - 検出結果
      Returns:
      フィルタリングされた検出結果