2013-09-02 01:34:17 +08:00
|
|
|
Widget
|
|
|
|
======
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 01:34:17 +08:00
|
|
|
.. highlight:: cpp
|
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
In this section, the widget framework is explained. Widgets represent
|
2013-09-18 19:50:55 +08:00
|
|
|
2D or 3D objects, varying from simple ones such as lines to complex one such as
|
2013-09-08 20:26:58 +08:00
|
|
|
point clouds and meshes.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-18 19:50:55 +08:00
|
|
|
Widgets are **implicitly shared**. Therefore, one can add a widget to the scene,
|
2013-09-08 20:26:58 +08:00
|
|
|
and modify the widget without re-adding the widget.
|
|
|
|
|
|
|
|
.. code-block:: cpp
|
|
|
|
|
|
|
|
...
|
|
|
|
/// Create a cloud widget
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCloud cw(cloud, viz::Color::red());
|
2013-09-08 20:26:58 +08:00
|
|
|
/// Display it in a window
|
|
|
|
myWindow.showWidget("CloudWidget1", cw);
|
|
|
|
/// Modify it, and it will be modified in the window.
|
|
|
|
cw.setColor(viz::Color::yellow());
|
|
|
|
...
|
|
|
|
|
|
|
|
viz::Widget
|
|
|
|
-----------
|
2013-09-02 01:34:17 +08:00
|
|
|
.. ocv:class:: Widget
|
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
Base class of all widgets. Widget is implicitly shared. ::
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
class CV_EXPORTS Widget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Widget();
|
|
|
|
Widget(const Widget& other);
|
|
|
|
Widget& operator=(const Widget& other);
|
|
|
|
~Widget();
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
//! Create a widget directly from ply file
|
|
|
|
static Widget fromPlyFile(const String &file_name);
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
//! Rendering properties of this particular widget
|
|
|
|
void setRenderingProperty(int property, double value);
|
|
|
|
double getRenderingProperty(int property) const;
|
|
|
|
|
|
|
|
//! Casting between widgets
|
|
|
|
template<typename _W> _W cast();
|
|
|
|
private:
|
|
|
|
/* hidden */
|
|
|
|
};
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget::fromPlyFile
|
|
|
|
------------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Creates a widget from ply file.
|
|
|
|
|
|
|
|
.. ocv:function:: static Widget fromPlyFile(const String &file_name)
|
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param file_name: Ply file name.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget::setRenderingProperty
|
|
|
|
---------------------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Sets rendering property of the widget.
|
|
|
|
|
|
|
|
.. ocv:function:: void setRenderingProperty(int property, double value)
|
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param property: Property that will be modified.
|
|
|
|
:param value: The new value of the property.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
**Rendering property** can be one of the following:
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
* **POINT_SIZE**
|
|
|
|
* **OPACITY**
|
|
|
|
* **LINE_WIDTH**
|
|
|
|
* **FONT_SIZE**
|
|
|
|
* **REPRESENTATION**: Expected values are
|
|
|
|
* **REPRESENTATION_POINTS**
|
|
|
|
* **REPRESENTATION_WIREFRAME**
|
|
|
|
* **REPRESENTATION_SURFACE**
|
2013-09-18 19:50:55 +08:00
|
|
|
* **IMMEDIATE_RENDERING**:
|
2013-09-08 20:26:58 +08:00
|
|
|
* Turn on immediate rendering by setting the value to ``1``.
|
|
|
|
* Turn off immediate rendering by setting the value to ``0``.
|
|
|
|
* **SHADING**: Expected values are
|
|
|
|
* **SHADING_FLAT**
|
|
|
|
* **SHADING_GOURAUD**
|
|
|
|
* **SHADING_PHONG**
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget::getRenderingProperty
|
|
|
|
---------------------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Returns rendering property of the widget.
|
|
|
|
|
|
|
|
.. ocv:function:: double getRenderingProperty(int property) const
|
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param property: Property.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
**Rendering property** can be one of the following:
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
* **POINT_SIZE**
|
|
|
|
* **OPACITY**
|
|
|
|
* **LINE_WIDTH**
|
|
|
|
* **FONT_SIZE**
|
|
|
|
* **REPRESENTATION**: Expected values are
|
|
|
|
* **REPRESENTATION_POINTS**
|
|
|
|
* **REPRESENTATION_WIREFRAME**
|
|
|
|
* **REPRESENTATION_SURFACE**
|
2013-09-18 19:50:55 +08:00
|
|
|
* **IMMEDIATE_RENDERING**:
|
2013-09-08 20:26:58 +08:00
|
|
|
* Turn on immediate rendering by setting the value to ``1``.
|
|
|
|
* Turn off immediate rendering by setting the value to ``0``.
|
|
|
|
* **SHADING**: Expected values are
|
|
|
|
* **SHADING_FLAT**
|
|
|
|
* **SHADING_GOURAUD**
|
|
|
|
* **SHADING_PHONG**
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget::cast
|
|
|
|
-----------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Casts a widget to another.
|
|
|
|
|
|
|
|
.. ocv:function:: template<typename _W> _W cast()
|
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
.. code-block:: cpp
|
|
|
|
|
|
|
|
// Create a sphere widget
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WSphere sw(Point3f(0.0f,0.0f,0.0f), 0.5f);
|
2013-09-08 20:26:58 +08:00
|
|
|
// Cast sphere widget to cloud widget
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCloud cw = sw.cast<viz::WCloud>();
|
2013-09-08 20:26:58 +08:00
|
|
|
|
|
|
|
.. note:: 3D Widgets can only be cast to 3D Widgets. 2D Widgets can only be cast to 2D Widgets.
|
|
|
|
|
|
|
|
viz::WidgetAccessor
|
|
|
|
-------------------
|
2013-09-02 02:12:31 +08:00
|
|
|
.. ocv:class:: WidgetAccessor
|
|
|
|
|
|
|
|
This class is for users who want to develop their own widgets using VTK library API. ::
|
|
|
|
|
|
|
|
struct CV_EXPORTS WidgetAccessor
|
|
|
|
{
|
|
|
|
static vtkSmartPointer<vtkProp> getProp(const Widget &widget);
|
|
|
|
static void setProp(Widget &widget, vtkSmartPointer<vtkProp> prop);
|
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::WidgetAccessor::getProp
|
|
|
|
----------------------------
|
|
|
|
Returns ``vtkProp`` of a given widget.
|
|
|
|
|
|
|
|
.. ocv:function:: static vtkSmartPointer<vtkProp> getProp(const Widget &widget)
|
|
|
|
|
|
|
|
:param widget: Widget whose ``vtkProp`` is to be returned.
|
|
|
|
|
|
|
|
.. note:: vtkProp has to be down cast appropriately to be modified.
|
|
|
|
|
|
|
|
.. code-block:: cpp
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
vtkActor * actor = vtkActor::SafeDownCast(viz::WidgetAccessor::getProp(widget));
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::WidgetAccessor::setProp
|
|
|
|
----------------------------
|
|
|
|
Sets ``vtkProp`` of a given widget.
|
|
|
|
|
|
|
|
.. ocv:function:: static void setProp(Widget &widget, vtkSmartPointer<vtkProp> prop)
|
|
|
|
|
|
|
|
:param widget: Widget whose ``vtkProp`` is to be set.
|
|
|
|
:param prop: A ``vtkProp``.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget3D
|
|
|
|
-------------
|
2013-09-02 01:34:17 +08:00
|
|
|
.. ocv:class:: Widget3D
|
|
|
|
|
|
|
|
Base class of all 3D widgets. ::
|
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
class CV_EXPORTS Widget3D : public Widget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Widget3D() {}
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-10 23:57:16 +08:00
|
|
|
//! widget position manipulation, i.e. place where it is rendered.
|
2014-01-01 23:58:41 +08:00
|
|
|
void setPose(const Affine3d &pose);
|
|
|
|
void updatePose(const Affine3d &pose);
|
|
|
|
Affine3d getPose() const;
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-10 23:57:16 +08:00
|
|
|
//! updates internal widget data, i.e. points, normals, etc.
|
|
|
|
void applyTransform(const Affine3d &transform);
|
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
void setColor(const Color &color);
|
2014-01-10 23:57:16 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget3D::setPose
|
|
|
|
----------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Sets pose of the widget.
|
|
|
|
|
2014-01-01 23:58:41 +08:00
|
|
|
.. ocv:function:: void setPose(const Affine3d &pose)
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param pose: The new pose of the widget.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget3D::updateWidgetPose
|
|
|
|
-------------------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Updates pose of the widget by pre-multiplying its current pose.
|
|
|
|
|
2014-01-01 23:58:41 +08:00
|
|
|
.. ocv:function:: void updateWidgetPose(const Affine3d &pose)
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param pose: The pose that the current pose of the widget will be pre-multiplied by.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget3D::getPose
|
|
|
|
----------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Returns the current pose of the widget.
|
|
|
|
|
2014-01-01 23:58:41 +08:00
|
|
|
.. ocv:function:: Affine3d getWidgetPose() const
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-10 23:57:16 +08:00
|
|
|
|
|
|
|
viz::Widget3D::applyTransform
|
|
|
|
-------------------------------
|
|
|
|
Transforms internal widget data (i.e. points, normals) using the given transform.
|
|
|
|
|
|
|
|
.. ocv:function:: void applyTransform(const Affine3d &transform);
|
|
|
|
|
|
|
|
:param transform: Specified transformation to apply.
|
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget3D::setColor
|
|
|
|
-----------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Sets the color of the widget.
|
|
|
|
|
|
|
|
.. ocv:function:: void setColor(const Color &color)
|
|
|
|
|
2013-09-18 19:50:55 +08:00
|
|
|
:param color: color of type :ocv:class:`Color`
|
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget2D
|
|
|
|
-------------
|
2013-09-02 01:34:17 +08:00
|
|
|
.. ocv:class:: Widget2D
|
|
|
|
|
|
|
|
Base class of all 2D widgets. ::
|
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
class CV_EXPORTS Widget2D : public Widget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Widget2D() {}
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
void setColor(const Color &color);
|
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
viz::Widget2D::setColor
|
|
|
|
-----------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Sets the color of the widget.
|
|
|
|
|
|
|
|
.. ocv:function:: void setColor(const Color &color)
|
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: color of type :ocv:class:`Color`
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WLine
|
|
|
|
----------
|
|
|
|
.. ocv:class:: WLine
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a finite line. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WLine : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-09-15 22:26:53 +08:00
|
|
|
WLine(const Point3f &pt1, const Point3f &pt2, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WLine::WLine
|
|
|
|
-----------------
|
|
|
|
Constructs a WLine.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
.. ocv:function:: WLine(const Point3f &pt1, const Point3f &pt2, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param pt1: Start point of the line.
|
|
|
|
:param pt2: End point of the line.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the line.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WPlane
|
|
|
|
-----------
|
|
|
|
.. ocv:class:: WPlane
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a finite plane. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WPlane : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-12 18:58:22 +08:00
|
|
|
//! created default plane with center point at origin and normal oriented along z-axis
|
|
|
|
WPlane(const Size2d& size = Size2d(1.0, 1.0), const Color &color = Color::white());
|
|
|
|
|
|
|
|
//! repositioned plane
|
|
|
|
WPlane(const Point3d& center, const Vec3d& normal, const Vec3d& new_plane_yaxis,const Size2d& size = Size2d(1.0, 1.0), const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WPlane::WPlane
|
|
|
|
-------------------
|
2014-01-12 18:58:22 +08:00
|
|
|
Constructs a default plane with center point at origin and normal oriented along z-axis.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 18:58:22 +08:00
|
|
|
.. ocv:function:: WPlane(const Size2d& size = Size2d(1.0, 1.0), const Color &color = Color::white());
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-12 18:58:22 +08:00
|
|
|
:param size: Size of the plane
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the plane.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 18:58:22 +08:00
|
|
|
viz::WPlane::WPlane
|
2014-01-12 19:22:26 +08:00
|
|
|
-------------------
|
2014-01-12 18:58:22 +08:00
|
|
|
Constructs a repositioned plane
|
|
|
|
|
2014-01-12 19:22:26 +08:00
|
|
|
.. ocv:function:: WPlane(const Point3d& center, const Vec3d& normal, const Vec3d& new_yaxis,const Size2d& size = Size2d(1.0, 1.0), const Color &color = Color::white());
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 18:58:22 +08:00
|
|
|
:param center: Center of the plane
|
|
|
|
:param normal: Plane normal orientation
|
2014-01-12 19:22:26 +08:00
|
|
|
:param new_yaxis: Up-vector. New orientation of plane y-axis.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the plane.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WSphere
|
|
|
|
------------
|
|
|
|
.. ocv:class:: WSphere
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a sphere. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WSphere : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-08 01:27:11 +08:00
|
|
|
WSphere(const cv::Point3f ¢er, double radius, int sphere_resolution = 10, const Color &color = Color::white())
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WSphere::WSphere
|
|
|
|
---------------------
|
|
|
|
Constructs a WSphere.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WSphere(const cv::Point3f ¢er, double radius, int sphere_resolution = 10, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param center: Center of the sphere.
|
|
|
|
:param radius: Radius of the sphere.
|
|
|
|
:param sphere_resolution: Resolution of the sphere.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the sphere.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WArrow
|
2013-09-08 20:26:58 +08:00
|
|
|
----------------
|
2013-09-15 22:26:53 +08:00
|
|
|
.. ocv:class:: WArrow
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines an arrow. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WArrow : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-08 01:27:11 +08:00
|
|
|
WArrow(const Point3f& pt1, const Point3f& pt2, double thickness = 0.03, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WArrow::WArrow
|
2013-09-08 20:26:58 +08:00
|
|
|
-----------------------------
|
2013-09-15 22:26:53 +08:00
|
|
|
Constructs an WArrow.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WArrow(const Point3f& pt1, const Point3f& pt2, double thickness = 0.03, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param pt1: Start point of the arrow.
|
|
|
|
:param pt2: End point of the arrow.
|
|
|
|
:param thickness: Thickness of the arrow. Thickness of arrow head is also adjusted accordingly.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the arrow.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 01:34:17 +08:00
|
|
|
Arrow head is located at the end point of the arrow.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCircle
|
2013-09-08 20:26:58 +08:00
|
|
|
-----------------
|
2013-09-15 22:26:53 +08:00
|
|
|
.. ocv:class:: WCircle
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a circle. ::
|
|
|
|
|
2014-01-12 04:05:59 +08:00
|
|
|
class CV_EXPORTS WCircle : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-12 03:29:28 +08:00
|
|
|
//! creates default planar circle centred at origin with plane normal along z-axis
|
|
|
|
WCircle(double radius, double thickness = 0.01, const Color &color = Color::white());
|
|
|
|
|
|
|
|
//! creates repositioned circle
|
|
|
|
WCircle(double radius, const Point3d& center, const Vec3d& normal, double thickness = 0.01, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCircle::WCircle
|
2013-09-08 20:26:58 +08:00
|
|
|
-------------------------------
|
2014-01-12 03:29:28 +08:00
|
|
|
Constructs default planar circle centred at origin with plane normal along z-axis
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 03:29:28 +08:00
|
|
|
.. ocv:function:: WCircle(double radius, double thickness = 0.01, const Color &color = Color::white());
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 03:29:28 +08:00
|
|
|
:param radius: Radius of the circle.
|
2013-09-02 02:12:31 +08:00
|
|
|
:param thickness: Thickness of the circle.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the circle.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-12 03:29:28 +08:00
|
|
|
viz::WCircle::WCircle
|
|
|
|
-------------------------------
|
|
|
|
Constructs repositioned planar circle.
|
|
|
|
|
|
|
|
.. ocv:function:: WCircle(double radius, const Point3d& center, const Vec3d& normal, double thickness = 0.01, const Color &color = Color::white());
|
|
|
|
|
|
|
|
:param radius: Radius of the circle.
|
|
|
|
:param center: Center of the circle.
|
|
|
|
:param normal: Normal of the plane in which the circle lies.
|
|
|
|
:param thickness: Thickness of the circle.
|
|
|
|
:param color: :ocv:class:`Color` of the circle.
|
|
|
|
|
2014-01-12 04:05:59 +08:00
|
|
|
|
|
|
|
viz::WCone
|
2014-01-12 19:22:26 +08:00
|
|
|
-------------------------------
|
2014-01-12 04:05:59 +08:00
|
|
|
.. ocv:class:: WCone
|
|
|
|
|
|
|
|
This 3D Widget defines a cone. ::
|
|
|
|
|
|
|
|
class CV_EXPORTS WCone : public Widget3D
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//! create default cone, oriented along x-axis with center of its base located at origin
|
|
|
|
WCone(double lenght, double radius, int resolution = 6.0, const Color &color = Color::white());
|
|
|
|
|
|
|
|
//! creates repositioned cone
|
|
|
|
WCone(double radius, const Point3d& center, const Point3d& tip, int resolution = 6.0, const Color &color = Color::white());
|
|
|
|
};
|
|
|
|
|
|
|
|
viz::WCone::WCone
|
|
|
|
-------------------------------
|
|
|
|
Constructs default cone oriented along x-axis with center of its base located at origin
|
|
|
|
|
|
|
|
.. ocv:function:: WCone(double length, double radius, int resolution = 6.0, const Color &color = Color::white());
|
|
|
|
|
|
|
|
:param length: Length of the cone.
|
|
|
|
:param radius: Radius of the cone.
|
|
|
|
:param resolution: Resolution of the cone.
|
|
|
|
:param color: :ocv:class:`Color` of the cone.
|
|
|
|
|
|
|
|
viz::WCone::WCone
|
|
|
|
-------------------------------
|
|
|
|
Constructs repositioned planar cone.
|
|
|
|
|
|
|
|
.. ocv:function:: WCone(double radius, const Point3d& center, const Point3d& tip, int resolution = 6.0, const Color &color = Color::white());
|
|
|
|
|
|
|
|
:param radius: Radius of the cone.
|
|
|
|
:param center: Center of the cone base.
|
|
|
|
:param tip: Tip of the cone.
|
|
|
|
:param resolution: Resolution of the cone.
|
|
|
|
:param color: :ocv:class:`Color` of the cone.
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCylinder
|
|
|
|
--------------
|
|
|
|
.. ocv:class:: WCylinder
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a cylinder. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WCylinder : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-12 03:40:56 +08:00
|
|
|
WCylinder(const Point3d& axis_point1, const Point3d& axis_point2, double radius, int numsides = 30, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCylinder::WCylinder
|
2013-09-08 20:26:58 +08:00
|
|
|
-----------------------------------
|
2013-09-15 22:26:53 +08:00
|
|
|
Constructs a WCylinder.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WCylinder(const Point3f& pt_on_axis, const Point3f& axis_direction, double radius, int numsides = 30, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 03:40:56 +08:00
|
|
|
:param axis_point1: A point1 on the axis of the cylinder.
|
|
|
|
:param axis_point2: A point2 on the axis of the cylinder.
|
2013-09-02 02:12:31 +08:00
|
|
|
:param radius: Radius of the cylinder.
|
|
|
|
:param numsides: Resolution of the cylinder.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the cylinder.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCube
|
|
|
|
----------
|
|
|
|
.. ocv:class:: WCube
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a cube. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WCube : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-09-15 22:26:53 +08:00
|
|
|
WCube(const Point3f& pt_min, const Point3f& pt_max, bool wire_frame = true, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCube::WCube
|
2013-09-08 20:26:58 +08:00
|
|
|
---------------------------
|
2013-09-15 22:26:53 +08:00
|
|
|
Constructs a WCube.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
.. ocv:function:: WCube(const Point3f& pt_min, const Point3f& pt_max, bool wire_frame = true, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param pt_min: Specifies minimum point of the bounding box.
|
|
|
|
:param pt_max: Specifies maximum point of the bounding box.
|
|
|
|
:param wire_frame: If true, cube is represented as wireframe.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the cube.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
.. image:: images/cube_widget.png
|
|
|
|
:alt: Cube Widget
|
|
|
|
:align: center
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCoordinateSystem
|
|
|
|
----------------------
|
|
|
|
.. ocv:class:: WCoordinateSystem
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget represents a coordinate system. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WCoordinateSystem : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-08 01:27:11 +08:00
|
|
|
WCoordinateSystem(double scale = 1.0);
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCoordinateSystem::WCoordinateSystem
|
2013-09-08 20:26:58 +08:00
|
|
|
---------------------------------------------------
|
2013-09-15 22:26:53 +08:00
|
|
|
Constructs a WCoordinateSystem.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WCoordinateSystem(double scale = 1.0)
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param scale: Determines the size of the axes.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WPolyLine
|
|
|
|
--------------
|
|
|
|
.. ocv:class:: WPolyLine
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a poly line. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WPolyLine : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-09-15 22:26:53 +08:00
|
|
|
WPolyLine(InputArray points, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WPolyLine::WPolyLine
|
2013-09-08 20:26:58 +08:00
|
|
|
-----------------------------------
|
2013-09-15 22:26:53 +08:00
|
|
|
Constructs a WPolyLine.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
.. ocv:function:: WPolyLine(InputArray points, const Color &color = Color::white())
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param points: Point set.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the poly line.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WGrid
|
|
|
|
----------
|
|
|
|
.. ocv:class:: WGrid
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a grid. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WGrid : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-12 19:22:26 +08:00
|
|
|
//! Creates grid at the origin and normal oriented along z-axis
|
|
|
|
WGrid(const Vec2i &cells = Vec2i::all(10), const Vec2d &cells_spacing = Vec2d::all(1.0), const Color &color = Color::white());
|
|
|
|
|
|
|
|
//! Creates repositioned grid
|
|
|
|
WGrid(const Point3d& center, const Vec3d& normal, const Vec3d& new_yaxis,
|
|
|
|
const Vec2i &cells = Vec2i::all(10), const Vec2d &cells_spacing = Vec2d::all(1.0), const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WGrid::WGrid
|
2013-09-08 20:26:58 +08:00
|
|
|
---------------------------
|
2013-09-15 22:26:53 +08:00
|
|
|
Constructs a WGrid.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 19:22:26 +08:00
|
|
|
.. ocv:function:: WGrid(const Vec2i &cells = Vec2i::all(10), const Vec2d &cells_spacing = Vec2d::all(1.0), const Color &color = Color::white());
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 19:22:26 +08:00
|
|
|
:param cells: Number of cell columns and rows, respectively.
|
|
|
|
:param cells_spacing: Size of each cell, respectively.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the grid.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-12 19:22:26 +08:00
|
|
|
.. ocv:function: WGrid(const Point3d& center, const Vec3d& normal, const Vec3d& new_yaxis, Vec2i &cells, const Vec2d &cells_spacing, const Color &color;
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-12 19:22:26 +08:00
|
|
|
:param center: Center of the grid
|
|
|
|
:param normal: Grid normal orientation
|
|
|
|
:param new_yaxis: Up-vector. New orientation of grid y-axis.
|
|
|
|
:param cells: Number of cell columns and rows, respectively.
|
|
|
|
:param cells_spacing: Size of each cell, respectively.
|
|
|
|
:param color: :ocv:class:`Color` of the grid..
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WText3D
|
|
|
|
------------
|
|
|
|
.. ocv:class:: WText3D
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget represents 3D text. The text always faces the camera. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WText3D : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-08 01:27:11 +08:00
|
|
|
WText3D(const String &text, const Point3f &position, double text_scale = 1.0, bool face_camera = true, const Color &color = Color::white());
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
void setText(const String &text);
|
|
|
|
String getText() const;
|
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WText3D::WText3D
|
2013-09-08 20:26:58 +08:00
|
|
|
-------------------------------
|
2013-09-15 22:26:53 +08:00
|
|
|
Constructs a WText3D.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WText3D(const String &text, const Point3f &position, double text_scale = 1.0, bool face_camera = true, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param text: Text content of the widget.
|
|
|
|
:param position: Position of the text.
|
|
|
|
:param text_scale: Size of the text.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param face_camera: If true, text always faces the camera.
|
|
|
|
:param color: :ocv:class:`Color` of the text.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WText3D::setText
|
|
|
|
---------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Sets the text content of the widget.
|
|
|
|
|
|
|
|
.. ocv:function:: void setText(const String &text)
|
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param text: Text content of the widget.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WText3D::getText
|
|
|
|
---------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Returns the current text content of the widget.
|
|
|
|
|
|
|
|
.. ocv:function:: String getText() const
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WText
|
|
|
|
----------
|
|
|
|
.. ocv:class:: WText
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 2D Widget represents text overlay. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WText : public Widget2D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-09-15 22:26:53 +08:00
|
|
|
WText(const String &text, const Point2i &pos, int font_size = 10, const Color &color = Color::white());
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
void setText(const String &text);
|
|
|
|
String getText() const;
|
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WText::WText
|
|
|
|
-----------------
|
|
|
|
Constructs a WText.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
.. ocv:function:: WText(const String &text, const Point2i &pos, int font_size = 10, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param text: Text content of the widget.
|
|
|
|
:param pos: Position of the text.
|
|
|
|
:param font_size: Font size.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the text.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WText::setText
|
|
|
|
-------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Sets the text content of the widget.
|
|
|
|
|
|
|
|
.. ocv:function:: void setText(const String &text)
|
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param text: Text content of the widget.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WText::getText
|
|
|
|
-------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Returns the current text content of the widget.
|
|
|
|
|
|
|
|
.. ocv:function:: String getText() const
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WImageOverlay
|
|
|
|
------------------
|
|
|
|
.. ocv:class:: WImageOverlay
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 2D Widget represents an image overlay. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WImageOverlay : public Widget2D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-12 02:43:58 +08:00
|
|
|
WImageOverlay(InputArray image, const Rect &rect);
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-12 02:43:58 +08:00
|
|
|
void setImage(InputArray image);
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WImageOverlay::WImageOverlay
|
|
|
|
---------------------------------
|
|
|
|
Constructs an WImageOverlay.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 02:43:58 +08:00
|
|
|
.. ocv:function:: WImageOverlay(InputArray image, const Rect &rect)
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param image: BGR or Gray-Scale image.
|
|
|
|
:param rect: Image is scaled and positioned based on rect.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WImageOverlay::setImage
|
|
|
|
----------------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Sets the image content of the widget.
|
|
|
|
|
2014-01-12 02:43:58 +08:00
|
|
|
.. ocv:function:: void setImage(InputArray image)
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param image: BGR or Gray-Scale image.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WImage3D
|
|
|
|
-------------
|
|
|
|
.. ocv:class:: WImage3D
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
This 3D Widget represents an image in 3D space. ::
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WImage3D : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
2014-01-10 23:57:16 +08:00
|
|
|
public:
|
|
|
|
//! Creates 3D image at the origin
|
2014-01-12 02:43:58 +08:00
|
|
|
WImage3D(InputArray image, const Size2d &size);
|
2014-01-10 23:57:16 +08:00
|
|
|
//! Creates 3D image at a given position, pointing in the direction of the normal, and having the up_vector orientation
|
2014-01-12 02:43:58 +08:00
|
|
|
WImage3D(InputArray image, const Size2d &size, const Vec3d &position, const Vec3d &normal, const Vec3d &up_vector);
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-12 02:43:58 +08:00
|
|
|
void setImage(InputArray image);
|
2014-01-10 23:57:16 +08:00
|
|
|
};
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WImage3D::WImage3D
|
|
|
|
-----------------------
|
|
|
|
Constructs an WImage3D.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-12 02:43:58 +08:00
|
|
|
.. ocv:function:: WImage3D(InputArray image, const Size2d &size)
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param image: BGR or Gray-Scale image.
|
|
|
|
:param size: Size of the image.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-12 02:43:58 +08:00
|
|
|
.. ocv:function:: WImage3D(InputArray image, const Size2d &size, const Vec3d &position, const Vec3d &normal, const Vec3d &up_vector)
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param position: Position of the image.
|
|
|
|
:param normal: Normal of the plane that represents the image.
|
|
|
|
:param up_vector: Determines orientation of the image.
|
|
|
|
:param image: BGR or Gray-Scale image.
|
|
|
|
:param size: Size of the image.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WImage3D::setImage
|
|
|
|
-----------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Sets the image content of the widget.
|
|
|
|
|
2014-01-12 02:43:58 +08:00
|
|
|
.. ocv:function:: void setImage(InputArray image)
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
:param image: BGR or Gray-Scale image.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCameraPosition
|
|
|
|
--------------------
|
|
|
|
.. ocv:class:: WCameraPosition
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
This 3D Widget represents camera position in a scene by its axes or viewing frustum. ::
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WCameraPosition : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
//! Creates camera coordinate frame (axes) at the origin
|
2014-01-08 01:27:11 +08:00
|
|
|
WCameraPosition(double scale = 1.0);
|
2013-09-02 02:12:31 +08:00
|
|
|
//! Creates frustum based on the intrinsic marix K at the origin
|
2014-01-08 01:27:11 +08:00
|
|
|
WCameraPosition(const Matx33d &K, double scale = 1.0, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
//! Creates frustum based on the field of view at the origin
|
2014-01-08 01:27:11 +08:00
|
|
|
WCameraPosition(const Vec2d &fov, double scale = 1.0, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
//! Creates frustum and display given image at the far plane
|
2014-01-12 00:40:10 +08:00
|
|
|
WCameraPosition(const Matx33d &K, InputArray image, double scale = 1.0, const Color &color = Color::white());
|
2013-09-08 20:26:58 +08:00
|
|
|
//! Creates frustum and display given image at the far plane
|
2014-01-12 00:40:10 +08:00
|
|
|
WCameraPosition(const Vec2d &fov, InputArray image, double scale = 1.0, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCameraPosition::WCameraPosition
|
|
|
|
-------------------------------------
|
|
|
|
Constructs a WCameraPosition.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
- **Display camera coordinate frame.**
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WCameraPosition(double scale = 1.0)
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
Creates camera coordinate frame at the origin.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
.. image:: images/cpw1.png
|
|
|
|
:alt: Camera coordinate frame
|
|
|
|
:align: center
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
- **Display the viewing frustum.**
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WCameraPosition(const Matx33d &K, double scale = 1.0, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
:param K: Intrinsic matrix of the camera.
|
|
|
|
:param scale: Scale of the frustum.
|
|
|
|
:param color: :ocv:class:`Color` of the frustum.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
Creates viewing frustum of the camera based on its intrinsic matrix K.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WCameraPosition(const Vec2d &fov, double scale = 1.0, const Color &color = Color::white())
|
2013-09-08 20:26:58 +08:00
|
|
|
|
|
|
|
:param fov: Field of view of the camera (horizontal, vertical).
|
|
|
|
:param scale: Scale of the frustum.
|
|
|
|
:param color: :ocv:class:`Color` of the frustum.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
Creates viewing frustum of the camera based on its field of view fov.
|
|
|
|
|
|
|
|
.. image:: images/cpw2.png
|
|
|
|
:alt: Camera viewing frustum
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
- **Display image on the far plane of the viewing frustum.**
|
|
|
|
|
2014-01-12 00:40:10 +08:00
|
|
|
.. ocv:function:: WCameraPosition(const Matx33d &K, InputArray image, double scale = 1.0, const Color &color = Color::white())
|
2013-09-08 20:26:58 +08:00
|
|
|
|
|
|
|
:param K: Intrinsic matrix of the camera.
|
|
|
|
:param img: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum.
|
|
|
|
:param scale: Scale of the frustum and image.
|
|
|
|
:param color: :ocv:class:`Color` of the frustum.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on the far end plane.
|
|
|
|
|
2014-01-12 00:40:10 +08:00
|
|
|
.. ocv:function:: WCameraPosition(const Vec2d &fov, InputArray image, double scale = 1.0, const Color &color = Color::white())
|
2013-09-08 20:26:58 +08:00
|
|
|
|
|
|
|
:param fov: Field of view of the camera (horizontal, vertical).
|
|
|
|
:param img: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum.
|
|
|
|
:param scale: Scale of the frustum and image.
|
|
|
|
:param color: :ocv:class:`Color` of the frustum.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on the far end plane.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
.. image:: images/cpw3.png
|
|
|
|
:alt: Camera viewing frustum with image
|
|
|
|
:align: center
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WTrajectory
|
|
|
|
----------------
|
|
|
|
.. ocv:class:: WTrajectory
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget represents a trajectory. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WTrajectory : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-12-08 21:12:02 +08:00
|
|
|
enum {FRAMES = 1, PATH = 2, BOTH = FRAMES + PATH};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
//! Displays trajectory of the given path either by coordinate frames or polyline
|
2014-01-10 00:26:51 +08:00
|
|
|
WTrajectory(InputArray path, int display_mode = WTrajectory::PATH, double scale = 1.0, const Color &color = Color::white(),;
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WTrajectory::WTrajectory
|
|
|
|
-----------------------------
|
|
|
|
Constructs a WTrajectory.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-10 00:26:51 +08:00
|
|
|
.. ocv:function:: WTrajectory(InputArray path, int display_mode = WTrajectory::PATH, double scale = 1.0, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-07 16:34:42 +08:00
|
|
|
:param path: List of poses on a trajectory. Takes std::vector<Affine<T>> with T == [float | double]
|
2013-12-08 21:12:02 +08:00
|
|
|
:param display_mode: Display mode. This can be PATH, FRAMES, and BOTH.
|
2013-09-02 02:12:31 +08:00
|
|
|
:param scale: Scale of the frames. Polyline is not affected.
|
2013-12-08 22:07:16 +08:00
|
|
|
:param color: :ocv:class:`Color` of the polyline that represents path. Frames are not affected.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
Displays trajectory of the given path as follows:
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-12-08 21:12:02 +08:00
|
|
|
* PATH : Displays a poly line that represents the path.
|
|
|
|
* FRAMES : Displays coordinate frames at each pose.
|
|
|
|
* PATH & FRAMES : Displays both poly line and coordinate frames.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-12-08 22:07:16 +08:00
|
|
|
viz::WTrajectoryFrustums
|
|
|
|
----------------
|
|
|
|
.. ocv:class:: WTrajectoryFrustums
|
|
|
|
|
|
|
|
This 3D Widget represents a trajectory. ::
|
|
|
|
|
|
|
|
class CV_EXPORTS WTrajectoryFrustums : public Widget3D
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//! Displays trajectory of the given path by frustums
|
2014-01-08 02:35:21 +08:00
|
|
|
WTrajectoryFrustums(InputArray path, const Matx33d &K, double scale = 1.0, const Color &color = Color::white());
|
2013-12-08 22:07:16 +08:00
|
|
|
//! Displays trajectory of the given path by frustums
|
2014-01-08 02:35:21 +08:00
|
|
|
WTrajectoryFrustums(InputArray path, const Vec2d &fov, double scale = 1.0, const Color &color = Color::white());
|
2013-12-08 22:07:16 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
viz::WTrajectoryFrustums::WTrajectoryFrustums
|
|
|
|
-----------------------------
|
|
|
|
Constructs a WTrajectoryFrustums.
|
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WTrajectoryFrustums(const std::vector<Affine3d> &path, const Matx33d &K, double scale = 1.0, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 02:35:21 +08:00
|
|
|
:param path: List of poses on a trajectory. Takes std::vector<Affine<T>> with T == [float | double]
|
2013-09-02 02:12:31 +08:00
|
|
|
:param K: Intrinsic matrix of the camera.
|
|
|
|
:param scale: Scale of the frustums.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the frustums.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
Displays frustums at each pose of the trajectory.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WTrajectoryFrustums(const std::vector<Affine3d> &path, const Vec2d &fov, double scale = 1.0, const Color &color = Color::white())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 02:35:21 +08:00
|
|
|
:param path: List of poses on a trajectory. Takes std::vector<Affine<T>> with T == [float | double]
|
2013-09-02 02:12:31 +08:00
|
|
|
:param fov: Field of view of the camera (horizontal, vertical).
|
|
|
|
:param scale: Scale of the frustums.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the frustums.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
Displays frustums at each pose of the trajectory.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-12-08 21:12:02 +08:00
|
|
|
viz::WTrajectorySpheres
|
2013-09-15 22:26:53 +08:00
|
|
|
-----------------------
|
2013-12-08 21:12:02 +08:00
|
|
|
.. ocv:class:: WTrajectorySpheres
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget represents a trajectory using spheres and lines, where spheres represent the positions of the camera, and lines
|
|
|
|
represent the direction from previous position to the current. ::
|
|
|
|
|
2013-12-08 21:12:02 +08:00
|
|
|
class CV_EXPORTS WTrajectorySpheres : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-08 20:25:14 +08:00
|
|
|
WTrajectorySpheres(InputArray path, double line_length = 0.05, double radius = 0.007,
|
|
|
|
const Color &from = Color::red(), const Color &to = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-12-08 21:12:02 +08:00
|
|
|
viz::WTrajectorySpheres::WTrajectorySpheres
|
2013-09-15 22:26:53 +08:00
|
|
|
-------------------------------------------
|
2013-12-08 21:12:02 +08:00
|
|
|
Constructs a WTrajectorySpheres.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 20:25:14 +08:00
|
|
|
.. ocv:function:: WTrajectorySpheres(InputArray path, double line_length = 0.05, double radius = 0.007, const Color &from = Color::red(), const Color &to = Color::white());
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2014-01-08 20:25:14 +08:00
|
|
|
:param path: List of poses on a trajectory. Takes std::vector<Affine<T>> with T == [float | double]
|
|
|
|
:param line_length: Max length of the lines which point to previous position
|
|
|
|
:param sphere_radius: Radius of the spheres.
|
|
|
|
:param from: :ocv:class:`Color` for first sphere.
|
|
|
|
:param to: :ocv:class:`Color` for last sphere. Intermediate spheres will have interpolated color.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCloud
|
|
|
|
-----------
|
|
|
|
.. ocv:class:: WCloud
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a point cloud. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WCloud : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
//! Each point in cloud is mapped to a color in colors
|
2013-09-15 22:26:53 +08:00
|
|
|
WCloud(InputArray cloud, InputArray colors);
|
2013-09-02 02:12:31 +08:00
|
|
|
//! All points in cloud have the same color
|
2013-09-15 22:26:53 +08:00
|
|
|
WCloud(InputArray cloud, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCloud::WCloud
|
|
|
|
-------------------
|
|
|
|
Constructs a WCloud.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
.. ocv:function:: WCloud(InputArray cloud, InputArray colors)
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
:param cloud: Set of points which can be of type: ``CV_32FC3``, ``CV_32FC4``, ``CV_64FC3``, ``CV_64FC4``.
|
2013-09-02 02:12:31 +08:00
|
|
|
:param colors: Set of colors. It has to be of the same size with cloud.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
|
|
|
Points in the cloud belong to mask when they are set to (NaN, NaN, NaN).
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
.. ocv:function:: WCloud(InputArray cloud, const Color &color = Color::white())
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
:param cloud: Set of points which can be of type: ``CV_32FC3``, ``CV_32FC4``, ``CV_64FC3``, ``CV_64FC4``.
|
|
|
|
:param color: A single :ocv:class:`Color` for the whole cloud.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-18 19:50:55 +08:00
|
|
|
Points in the cloud belong to mask when they are set to (NaN, NaN, NaN).
|
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
.. note:: In case there are four channels in the cloud, fourth channel is ignored.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCloudCollection
|
|
|
|
---------------------
|
|
|
|
.. ocv:class:: WCloudCollection
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a collection of clouds. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WCloudCollection : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-09-15 22:26:53 +08:00
|
|
|
WCloudCollection();
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-02 02:12:31 +08:00
|
|
|
//! Each point in cloud is mapped to a color in colors
|
2014-01-01 23:58:41 +08:00
|
|
|
void addCloud(InputArray cloud, InputArray colors, const Affine3d &pose = Affine3d::Identity());
|
2013-09-02 02:12:31 +08:00
|
|
|
//! All points in cloud have the same color
|
2014-01-01 23:58:41 +08:00
|
|
|
void addCloud(InputArray cloud, const Color &color = Color::white(), Affine3d &pose = Affine3d::Identity());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCloudCollection::WCloudCollection
|
|
|
|
---------------------------------------
|
|
|
|
Constructs a WCloudCollection.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
.. ocv:function:: WCloudCollection()
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCloudCollection::addCloud
|
|
|
|
-------------------------------
|
2013-09-02 01:34:17 +08:00
|
|
|
Adds a cloud to the collection.
|
|
|
|
|
2014-01-01 23:58:41 +08:00
|
|
|
.. ocv:function:: void addCloud(InputArray cloud, InputArray colors, const Affine3d &pose = Affine3d::Identity())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
:param cloud: Point set which can be of type: ``CV_32FC3``, ``CV_32FC4``, ``CV_64FC3``, ``CV_64FC4``.
|
2013-09-02 02:12:31 +08:00
|
|
|
:param colors: Set of colors. It has to be of the same size with cloud.
|
|
|
|
:param pose: Pose of the cloud.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
|
|
|
Points in the cloud belong to mask when they are set to (NaN, NaN, NaN).
|
|
|
|
|
2014-01-01 23:58:41 +08:00
|
|
|
.. ocv:function:: void addCloud(InputArray cloud, const Color &color = Color::white(), const Affine3d &pose = Affine3d::Identity())
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
:param cloud: Point set which can be of type: ``CV_32FC3``, ``CV_32FC4``, ``CV_64FC3``, ``CV_64FC4``.
|
|
|
|
:param colors: A single :ocv:class:`Color` for the whole cloud.
|
2013-09-02 02:12:31 +08:00
|
|
|
:param pose: Pose of the cloud.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
|
|
|
Points in the cloud belong to mask when they are set to (NaN, NaN, NaN).
|
2013-09-08 20:26:58 +08:00
|
|
|
|
|
|
|
.. note:: In case there are four channels in the cloud, fourth channel is ignored.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCloudNormals
|
|
|
|
------------------
|
|
|
|
.. ocv:class:: WCloudNormals
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget represents normals of a point cloud. ::
|
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WCloudNormals : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-08 01:27:11 +08:00
|
|
|
WCloudNormals(InputArray cloud, InputArray normals, int level = 100, double scale = 0.02f, const Color &color = Color::white());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WCloudNormals::WCloudNormals
|
|
|
|
---------------------------------
|
|
|
|
Constructs a WCloudNormals.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-08 01:27:11 +08:00
|
|
|
.. ocv:function:: WCloudNormals(InputArray cloud, InputArray normals, int level = 100, double scale = 0.02f, const Color &color = Color::white())
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
:param cloud: Point set which can be of type: ``CV_32FC3``, ``CV_32FC4``, ``CV_64FC3``, ``CV_64FC4``.
|
2013-09-02 02:12:31 +08:00
|
|
|
:param normals: A set of normals that has to be of same type with cloud.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param level: Display only every ``level`` th normal.
|
2013-09-02 02:12:31 +08:00
|
|
|
:param scale: Scale of the arrows that represent normals.
|
2013-09-08 20:26:58 +08:00
|
|
|
:param color: :ocv:class:`Color` of the arrows that represent normals.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-08 20:26:58 +08:00
|
|
|
.. note:: In case there are four channels in the cloud, fourth channel is ignored.
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WMesh
|
|
|
|
----------
|
|
|
|
.. ocv:class:: WMesh
|
2013-09-02 01:34:17 +08:00
|
|
|
|
|
|
|
This 3D Widget defines a mesh. ::
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
class CV_EXPORTS WMesh : public Widget3D
|
2013-09-02 02:12:31 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-01-10 00:26:51 +08:00
|
|
|
WMesh(const Mesh &mesh);
|
|
|
|
WMesh(InputArray cloud, InputArray polygons, InputArray colors = noArray(), InputArray normals = noArray());
|
2013-09-02 02:12:31 +08:00
|
|
|
};
|
2013-09-18 19:50:55 +08:00
|
|
|
|
2013-09-15 22:26:53 +08:00
|
|
|
viz::WMesh::WMesh
|
|
|
|
-----------------
|
|
|
|
Constructs a WMesh.
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-10 00:26:51 +08:00
|
|
|
.. ocv:function:: WMesh(const Mesh &mesh)
|
|
|
|
|
|
|
|
:param mesh: :ocv:class:`Mesh` object that will be displayed.
|
|
|
|
|
|
|
|
.. ocv:function:: WMesh(InputArray cloud, InputArray polygons, InputArray colors = noArray(), InputArray normals = noArray());
|
2013-09-02 01:34:17 +08:00
|
|
|
|
2014-01-10 00:26:51 +08:00
|
|
|
:param cloud: Points of the mesh object.
|
|
|
|
:param polygons: Points of the mesh object.
|
|
|
|
:param colors: Point colors.
|
|
|
|
:param normals: Point normals.
|
|
|
|
|