🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.face
クラス Facemark
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.face.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 を介して画像に対するフィッティングを実行する。
-
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedFacemark​(long addr)
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static Facemark__fromPtr__​(long addr)booleanfit​(Mat image, MatOfRect faces, java.util.List<MatOfPoint2f> landmarks)Detect facial landmarks from an image.voidloadModel​(java.lang.String model)A function to load the trained model before the fitting process.-
クラス org.opencv.core.Algorithm から継承されたメソッド
clear, empty, getDefaultName, getNativeObjAddr, save
-
-
-
-
メソッドの詳細
-
__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);- 戻り値:
- 自動生成
-
-