HolisticLandmarker

public final class HolisticLandmarker

画像に対してランドマークの包括的な検出を行います。

この API では、事前トレーニング済みの包括的なランドマーク モデルのアセット バンドルが必要です。

  • 入力画像 MPImage
    • 包括的なランドマーク検出が実行される画像。
  • 出力 HolisticLandmarkerResult
    • 包括的なランドマークを含む HolisticLandscapeerResult。

ネストされたクラス

クラス HolisticLandmarker.HolisticLandmarkerOptions HolisticLandmarker の設定オプション。 

パブリック メソッド

静的 HolisticLandmarker
createFromBuffer(コンテキスト コンテキスト、ByteBuffer modelAssetBuffer)
モデルアセット バンドル バッファとデフォルトの HolisticLandmarker.HolisticLandmarkerOptions から HolisticLandmarker インスタンスを作成します。
静的 HolisticLandmarker
createFromFile(コンテキスト コンテキスト、String modelAssetPath)
モデルアセット バンドルのパスとデフォルトの HolisticLandmarker.HolisticLandmarkerOptions から HolisticLandmarker インスタンスを作成します。
静的 HolisticLandmarker
createFromFile(コンテキスト コンテキスト、File modelAssetFile)
モデルアセット バンドル ファイルとデフォルトの HolisticLandmarker.HolisticLandmarkerOptions から HolisticLandmarker インスタンスを作成します。
静的 HolisticLandmarker
createFromOptions(コンテキスト コンテキスト、HolisticLandmarker.HolisticLandmarkerOptionsランドマーク オプション)
HolisticLandmarker.HolisticLandmarkerOptions から HolisticLandmarker インスタンスを作成します。
HolisticLandmarkerResult
detectMPImage 画像)
指定された 1 つの画像に対して、デフォルトの画像処理オプションを使用して、ランドマークの包括的な検出を行います。
HolisticLandmarkerResult
detectMPImage image、ImageProcessingOptions imageProcessingOptions)
指定された 1 つの画像に対して、総合的なランドマーク検出を行います。
void
detectAsyncMPImage image、ImageProcessingOptions imageProcessingOptions、long timestampMs)
ライブ画像データを送信してランドマークの包括的な検出を行います。結果は HolisticLandmarker.HolisticLandmarkerOptions で提供される OutputHandler.ResultListener で確認できます。
void
detectAsyncMPImage image, long timestampMs)
ライブ画像データを送信して、デフォルトの画像処理オプション(
HolisticLandmarkerResult
detectForVideoMPImage image、ImageProcessingOptions imageProcessingOptions、long timestampMs)
指定された動画フレームに対して、総合的なランドマーク検出を行います。
HolisticLandmarkerResult
detectForVideoMPImage 画像、long timestampMs)
指定された動画フレームに対して、デフォルトの画像処理オプション(

継承されるメソッド

パブリック メソッド

public static HolisticLandmarker createFromBuffer (コンテキスト コンテキスト、ByteBuffer modelAssetBuffer)

モデルアセット バンドル バッファとデフォルトの HolisticLandmarker.HolisticLandmarkerOptions から HolisticLandmarker インスタンスを作成します。

パラメータ
コンテキスト Android ERROR(/Context)
modelAssetBuffer 検出モデルの直接の ByteBuffer または ERROR(/MappedByteBuffer)
例外
HolisticLandmarker の作成中にエラーが発生した場合。

public static HolisticLandmarker createFromFile (コンテキスト コンテキスト、String modelAssetPath)

モデルアセット バンドルのパスとデフォルトの HolisticLandmarker.HolisticLandmarkerOptions から HolisticLandmarker インスタンスを作成します。

パラメータ
コンテキスト Android ERROR(/Context)
modelAssetPath アセットのメタデータを含む総合的なランドマーク モデルへのパス。
例外
HolisticLandmarker の作成中にエラーが発生した場合。

public static HolisticLandmarker createFromFile (コンテキスト コンテキスト、File modelAssetFile)

モデルアセット バンドル ファイルとデフォルトの HolisticLandmarker.HolisticLandmarkerOptions から HolisticLandmarker インスタンスを作成します。

パラメータ
コンテキスト Android ERROR(/Context)
modelAssetFile 総合ランドマーク モデルの File インスタンス。
例外
IOException tflite モデルファイルを開くときに I/O エラーが発生した場合
HolisticLandmarker の作成中にエラーが発生した場合。

public static HolisticLandmarker createFromOptions (コンテキスト コンテキスト、HolisticLandmarker.HolisticLandmarkerOptionsndkerOptions)

HolisticLandmarker.HolisticLandmarkerOptions から HolisticLandmarker インスタンスを作成します。

パラメータ
コンテキスト Android ERROR(/Context)
landmarkerOptions HolisticLandmarker.HolisticLandmarkerOptions インスタンス。
例外
HolisticLandmarker の作成中にエラーが発生した場合。

public HolisticLandmarkerResult detect MPImage image)

指定された 1 つの画像に対して、デフォルトの画像処理オプションを使用して(つまり、回転を適用せずに)総合的なランドマーク検出を行います。このメソッドは、HolisticLandmarkerERROR(/RunningMode.IMAGE) で作成された場合にのみ使用します。

HolisticLandmarker は、次の色空間タイプをサポートしています。

パラメータ
イメージ 処理する MediaPipe MPImage オブジェクト。
例外
内部エラーが発生した場合。

public HolisticLandmarkerResult detect (MPImage image, ImageProcessingOptions imageProcessingOptions)

指定された 1 つの画像に対して、総合的なランドマーク検出を行います。このメソッドは、HolisticLandmarkerERROR(/RunningMode.IMAGE) で作成された場合にのみ使用します。

HolisticLandmarker は、次の色空間タイプをサポートしています。

パラメータ
イメージ 処理する MediaPipe MPImage オブジェクト。
imageProcessingOptions 推論を実行する前に入力画像を処理する方法を指定する ImageProcessingOptions。このタスクでは、関心領域はサポートされていませんImageProcessingOptions.regionOfInterest() を指定すると、このメソッドは IllegalArgumentException をスローします。
例外
IllegalArgumentException ImageProcessingOptions が関心のある地域を指定している場合。
内部エラーが発生した場合。

public void detectAsync (MPImage image, ImageProcessingOptions imageProcessingOptions, long timestampMs)

ライブ画像データを送信してランドマークの包括的な検出を行います。結果は HolisticLandmarker.HolisticLandmarkerOptions で提供される OutputHandler.ResultListener で確認できます。このメソッドは、HolisticLandmarkerERROR(/RunningMode.LIVE_STREAM) で作成された場合にのみ使用します。

入力画像がホリスティック ランドマークにいつ送信されたかを示すタイムスタンプ(ミリ秒単位)を指定する必要があります。入力タイムスタンプは単調に増加している必要があります。

HolisticLandmarker は、次の色空間タイプをサポートしています。

パラメータ
イメージ 処理する MediaPipe MPImage オブジェクト。
imageProcessingOptions 推論を実行する前に入力画像を処理する方法を指定する ImageProcessingOptions。このタスクでは、関心領域はサポートされていませんImageProcessingOptions.regionOfInterest() を指定すると、このメソッドは IllegalArgumentException をスローします。
timestampMs 入力タイムスタンプ(ミリ秒単位)。
例外
IllegalArgumentException ImageProcessingOptions が関心のある地域を指定している場合。
内部エラーが発生した場合。

public void detectAsync (MPImage image, long timestampMs)

ライブ画像データを送信して、デフォルトの画像処理オプション(回転は適用されません)を使用して、ランドマークの包括的な検出を行います。結果は、HolisticLandmarker.HolisticLandmarkerOptions で提供される OutputHandler.ResultListener を介して取得できます。このメソッドは、HolisticLandmarkerERROR(/RunningMode.LIVE_STREAM) で作成された場合にのみ使用します。

入力画像がホリスティック ランドマークにいつ送信されたかを示すタイムスタンプ(ミリ秒単位)を指定する必要があります。入力タイムスタンプは単調に増加している必要があります。

HolisticLandmarker は、次の色空間タイプをサポートしています。

パラメータ
イメージ 処理する MediaPipe MPImage オブジェクト。
timestampMs 入力タイムスタンプ(ミリ秒単位)。
例外
内部エラーが発生した場合。

public HolisticLandmarkerResult detectForVideo (MPImage image, ImageProcessingOptions imageProcessingOptions, long timestampMs)

指定された動画フレームに対して、総合的なランドマーク検出を行います。このメソッドは、HolisticLandmarkerERROR(/RunningMode.VIDEO) で作成された場合にのみ使用します。

動画フレームのタイムスタンプ(ミリ秒単位)を指定する必要があります。入力タイムスタンプは単調に増加している必要があります。

HolisticLandmarker は、次の色空間タイプをサポートしています。

パラメータ
イメージ 処理する MediaPipe MPImage オブジェクト。
imageProcessingOptions 推論を実行する前に入力画像を処理する方法を指定する ImageProcessingOptions。このタスクでは、関心領域はサポートされていませんImageProcessingOptions.regionOfInterest() を指定すると、このメソッドは IllegalArgumentException をスローします。
timestampMs 入力タイムスタンプ(ミリ秒単位)。
例外
IllegalArgumentException ImageProcessingOptions が関心のある地域を指定している場合。
内部エラーが発生した場合。

public HolisticLandmarkerResult detectForVideo (MPImage image, long timestampMs)

指定された動画フレームに対して、デフォルトの画像処理オプションを使用して(つまり、回転を適用せずに)総合的なランドマーク検出を行います。このメソッドは、HolisticLandmarkerERROR(/RunningMode.VIDEO) で作成された場合にのみ使用します。

動画フレームのタイムスタンプ(ミリ秒単位)を指定する必要があります。入力タイムスタンプは単調に増加している必要があります。

HolisticLandmarker は、次の色空間タイプをサポートしています。

パラメータ
イメージ 処理する MediaPipe MPImage オブジェクト。
timestampMs 入力タイムスタンプ(ミリ秒単位)。
例外
内部エラーが発生した場合。