全3回
WSphere(球体)
中心座標、円の半径、球体の面を指定。
auto sphere = cv::viz::WSphere(cv::Point3d(0.0, 0.0, -2.5), // 中心
2.0, // 半径
30, // 球体の面
cv::viz::Color::rose()); // 色
myWindow.showWidget("Sphere", sphere);
WText(テキスト)
2次元平面にテキストを描画する。
視点を変えてもテキストの位置は変わらない。
auto text = cv::viz::WText("OpenCV Viz",
cv::Point(100, 100),
20,
cv::viz::Color::black());
myWindow.showWidget("Text", text);
WText3D(3Dテキスト)
3次元平面にテキストを描画する。
引数のface_cameraにtrue(常にテキストが見えるようになる)を指定すると初期表示位置がおかしい(falseを指定するとそんなことはない)。
auto text_3d = cv::viz::WText3D("OpenCV Viz", // 表示するテキスト
cv::Point3d(1.0, 0.0, 0.0), // 表示位置
1.0, // テキストのサイズ
false, // テキストが常に見えるようにするか?
cv::viz::Color::black());
myWindow.showWidget("Text3D", text_3d);
まだ、載せていないのがいくつかあるけど、ここまで












