🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。

クラス Facemark

  • 既知の直接サブクラス:
    FacemarkKazemi, FacemarkTrain

    public class Facemark
    extends Algorithm
    Abstract base class for all facemark models To utilize this API in your program, please take a look at the REF: tutorial_table_of_content_facemark ### Description Facemark is a base class which provides universal access to any specific facemark algorithm. Therefore, the users should declare a desired algorithm before they can use it in their application. Here is an example on how to declare a facemark algorithm: // Using Facemark in your code: Ptr<Facemark> facemark = createFacemarkLBF(); The typical pipeline for facemark detection is as follows:
    • Facemark::loadModel を使って学習済みモデルを読み込む。
    • Facemark::fit を介して画像に対するフィッティングを実行する。
    • コンストラクタの詳細

      • Facemark

        protected Facemark​(long addr)
    • メソッドの詳細

      • __fromPtr__

        public static Facemark __fromPtr__​(long addr)
      • loadModel

        public void loadModel​(java.lang.String model)
        A function to load the trained model before the fitting process.
        引数:
        model - 学習済みモデルのファイル名を表す文字列。<B>使用例</B> facemark->loadModel("../data/lbf.model");
      • fit

        public boolean fit​(Mat image,
                           MatOfRect faces,
                           java.util.List<MatOfPoint2f> landmarks)
        Detect facial landmarks from an image.
        引数:
        image - 入力画像。
        faces - 検出された顔の関心領域 (ROI) を表す関数の出力。各顔は cv::Rect コンテナに格納される。
        landmarks - 各顔について検出されたランドマーク点。<B>使用例</B> Mat image = imread("image.jpg"); std::vector<Rect> faces; std::vector<std::vector<Point2f> > landmarks; facemark->fit(image, faces, landmarks);
        戻り値:
        自動生成