Commit 31501ebf authored by Ozan Tonkal's avatar Ozan Tonkal

replace tabs by spaces

parent a5b75769
...@@ -7,5 +7,3 @@ viz. 3D Visualizer ...@@ -7,5 +7,3 @@ viz. 3D Visualizer
viz3d.rst viz3d.rst
widget.rst widget.rst
types.rst
widget_accessor.rst
...@@ -7,67 +7,67 @@ Viz3d ...@@ -7,67 +7,67 @@ Viz3d
----- -----
.. ocv:class:: Viz3d .. ocv:class:: Viz3d
The Viz3d class represents a 3D visualizer window. This class is implicitly shared. :: The Viz3d class represents a 3D visualizer window. This class is implicitly shared. ::
class CV_EXPORTS Viz3d class CV_EXPORTS Viz3d
{ {
public: public:
typedef cv::Ptr<Viz3d> Ptr; typedef cv::Ptr<Viz3d> Ptr;
typedef void (*KeyboardCallback)(const KeyboardEvent&, void*); typedef void (*KeyboardCallback)(const KeyboardEvent&, void*);
typedef void (*MouseCallback)(const MouseEvent&, void*); typedef void (*MouseCallback)(const MouseEvent&, void*);
Viz3d(const String& window_name = String()); Viz3d(const String& window_name = String());
Viz3d(const Viz3d&); Viz3d(const Viz3d&);
Viz3d& operator=(const Viz3d&); Viz3d& operator=(const Viz3d&);
~Viz3d(); ~Viz3d();
void showWidget(const String &id, const Widget &widget, const Affine3f &pose = Affine3f::Identity()); void showWidget(const String &id, const Widget &widget, const Affine3f &pose = Affine3f::Identity());
void removeWidget(const String &id); void removeWidget(const String &id);
Widget getWidget(const String &id) const; Widget getWidget(const String &id) const;
void removeAllWidgets(); void removeAllWidgets();
void setWidgetPose(const String &id, const Affine3f &pose); void setWidgetPose(const String &id, const Affine3f &pose);
void updateWidgetPose(const String &id, const Affine3f &pose); void updateWidgetPose(const String &id, const Affine3f &pose);
Affine3f getWidgetPose(const String &id) const; Affine3f getWidgetPose(const String &id) const;
void setCamera(const Camera &camera); void setCamera(const Camera &camera);
Camera getCamera() const; Camera getCamera() const;
Affine3f getViewerPose(); Affine3f getViewerPose();
void setViewerPose(const Affine3f &pose); void setViewerPose(const Affine3f &pose);
void resetCameraViewpoint (const String &id); void resetCameraViewpoint (const String &id);
void resetCamera(); void resetCamera();
void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord); void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord);
void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction); void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction);
Size getWindowSize() const; Size getWindowSize() const;
void setWindowSize(const Size &window_size); void setWindowSize(const Size &window_size);
String getWindowName() const; String getWindowName() const;
void saveScreenshot (const String &file); void saveScreenshot (const String &file);
void setWindowPosition (int x, int y); void setWindowPosition (int x, int y);
void setFullScreen (bool mode); void setFullScreen (bool mode);
void setBackgroundColor(const Color& color = Color::black()); void setBackgroundColor(const Color& color = Color::black());
void spin(); void spin();
void spinOnce(int time = 1, bool force_redraw = false); void spinOnce(int time = 1, bool force_redraw = false);
bool wasStopped() const; bool wasStopped() const;
void registerKeyboardCallback(KeyboardCallback callback, void* cookie = 0); void registerKeyboardCallback(KeyboardCallback callback, void* cookie = 0);
void registerMouseCallback(MouseCallback callback, void* cookie = 0); void registerMouseCallback(MouseCallback callback, void* cookie = 0);
void setRenderingProperty(const String &id, int property, double value); void setRenderingProperty(const String &id, int property, double value);
double getRenderingProperty(const String &id, int property); double getRenderingProperty(const String &id, int property);
void setDesiredUpdateRate(double rate); void setDesiredUpdateRate(double rate);
double getDesiredUpdateRate(); double getDesiredUpdateRate();
void setRepresentationToSurface(); void setRepresentationToSurface();
void setRepresentationToWireframe(); void setRepresentationToWireframe();
void setRepresentationToPoints(); void setRepresentationToPoints();
private: private:
/* hidden */ /* hidden */
}; };
Viz3d::Viz3d Viz3d::Viz3d
------------ ------------
...@@ -75,7 +75,7 @@ The constructors. ...@@ -75,7 +75,7 @@ The constructors.
.. ocv:function:: Viz3d::Viz3d(const String& window_name = String()) .. ocv:function:: Viz3d::Viz3d(const String& window_name = String())
:param window_name: Name of the window. :param window_name: Name of the window.
Viz3d::showWidget Viz3d::showWidget
----------------- -----------------
...@@ -83,18 +83,18 @@ Shows a widget in the window. ...@@ -83,18 +83,18 @@ Shows a widget in the window.
.. ocv:function:: void Viz3d::showWidget(const String &id, const Widget &widget, const Affine3f &pose = Affine3f::Identity()) .. ocv:function:: void Viz3d::showWidget(const String &id, const Widget &widget, const Affine3f &pose = Affine3f::Identity())
:param id: A unique id for the widget. :param id: A unique id for the widget.
:param widget: The widget to be rendered in the window. :param widget: The widget to be rendered in the window.
:param pose: Pose of the widget. :param pose: Pose of the widget.
Viz3d::removeWidget Viz3d::removeWidget
------------------- -------------------
Removes a widget from the window. Removes a widget from the window.
.. ocv:function:: void removeWidget(const String &id) .. ocv:function:: void removeWidget(const String &id)
:param id: The id of the widget that will be removed. :param id: The id of the widget that will be removed.
Viz3d::getWidget Viz3d::getWidget
---------------- ----------------
Retrieves a widget from the window. A widget is implicitly shared; Retrieves a widget from the window. A widget is implicitly shared;
...@@ -103,8 +103,8 @@ immediately visible in the window. ...@@ -103,8 +103,8 @@ immediately visible in the window.
.. ocv:function:: Widget getWidget(const String &id) const .. ocv:function:: Widget getWidget(const String &id) const
:param id: The id of the widget that will be returned. :param id: The id of the widget that will be returned.
Viz3d::removeAllWidgets Viz3d::removeAllWidgets
----------------------- -----------------------
Removes all widgets from the window. Removes all widgets from the window.
...@@ -117,8 +117,8 @@ Sets pose of a widget in the window. ...@@ -117,8 +117,8 @@ Sets pose of a widget in the window.
.. ocv:function:: void setWidgetPose(const String &id, const Affine3f &pose) .. ocv:function:: void setWidgetPose(const String &id, const Affine3f &pose)
:param id: The id of the widget whose pose will be set. :param id: The id of the widget whose pose will be set.
:param pose: The new pose of the widget. :param pose: The new pose of the widget.
Viz3d::updateWidgetPose Viz3d::updateWidgetPose
----------------------- -----------------------
...@@ -126,8 +126,8 @@ Updates pose of a widget in the window by pre-multiplying its current pose. ...@@ -126,8 +126,8 @@ Updates pose of a widget in the window by pre-multiplying its current pose.
.. ocv:function:: void updateWidgetPose(const String &id, const Affine3f &pose) .. ocv:function:: void updateWidgetPose(const String &id, const Affine3f &pose)
:param id: The id of the widget whose pose will be updated. :param id: The id of the widget whose pose will be updated.
:param pose: The pose that the current pose of the widget will be pre-multiplied by. :param pose: The pose that the current pose of the widget will be pre-multiplied by.
Viz3d::getWidgetPose Viz3d::getWidgetPose
-------------------- --------------------
...@@ -135,7 +135,7 @@ Returns the current pose of a widget in the window. ...@@ -135,7 +135,7 @@ Returns the current pose of a widget in the window.
.. ocv:function:: Affine3f getWidgetPose(const String &id) const .. ocv:function:: Affine3f getWidgetPose(const String &id) const
:param id: The id of the widget whose pose will be returned. :param id: The id of the widget whose pose will be returned.
Viz3d::setCamera Viz3d::setCamera
---------------- ----------------
...@@ -143,7 +143,7 @@ Sets the intrinsic parameters of the viewer using Camera. ...@@ -143,7 +143,7 @@ Sets the intrinsic parameters of the viewer using Camera.
.. ocv:function:: void setCamera(const Camera &camera) .. ocv:function:: void setCamera(const Camera &camera)
:param camera: Camera object wrapping intrinsinc parameters. :param camera: Camera object wrapping intrinsinc parameters.
Viz3d::getCamera Viz3d::getCamera
---------------- ----------------
...@@ -163,7 +163,7 @@ Sets pose of the viewer. ...@@ -163,7 +163,7 @@ Sets pose of the viewer.
.. ocv:function:: void setViewerPose(const Affine3f &pose) .. ocv:function:: void setViewerPose(const Affine3f &pose)
:param pose: The new pose of the viewer. :param pose: The new pose of the viewer.
Viz3d::resetCameraViewpoint Viz3d::resetCameraViewpoint
--------------------------- ---------------------------
...@@ -171,8 +171,8 @@ Resets camera viewpoint to a 3D widget in the scene. ...@@ -171,8 +171,8 @@ Resets camera viewpoint to a 3D widget in the scene.
.. ocv:function:: void resetCameraViewpoint (const String &id) .. ocv:function:: void resetCameraViewpoint (const String &id)
:param pose: Id of a 3D widget. :param pose: Id of a 3D widget.
Viz3d::resetCamera Viz3d::resetCamera
------------------ ------------------
Resets camera. Resets camera.
...@@ -185,19 +185,19 @@ Transforms a point in world coordinate system to window coordinate system. ...@@ -185,19 +185,19 @@ Transforms a point in world coordinate system to window coordinate system.
.. ocv:function:: void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord) .. ocv:function:: void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord)
:param pt: Point in world coordinate system. :param pt: Point in world coordinate system.
:param window_coord: Output point in window coordinate system. :param window_coord: Output point in window coordinate system.
Viz3d::converTo3DRay Viz3d::converTo3DRay
-------------------- --------------------
Transforms a point in window coordinate system to a 3D ray in world coordinate system. Transforms a point in window coordinate system to a 3D ray in world coordinate system.
.. ocv:function:: void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction) .. ocv:function:: void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction)
:param window_coord: Point in window coordinate system. :param window_coord: Point in window coordinate system.
:param origin: Output origin of the ray. :param origin: Output origin of the ray.
:param direction: Output direction of the ray. :param direction: Output direction of the ray.
Viz3d::getWindowSize Viz3d::getWindowSize
-------------------- --------------------
Returns the current size of the window. Returns the current size of the window.
...@@ -210,8 +210,8 @@ Sets the size of the window. ...@@ -210,8 +210,8 @@ Sets the size of the window.
.. ocv:function:: void setWindowSize(const Size &window_size) .. ocv:function:: void setWindowSize(const Size &window_size)
:param window_size: New size of the window. :param window_size: New size of the window.
Viz3d::getWindowName Viz3d::getWindowName
-------------------- --------------------
Returns the name of the window which has been set in the constructor. Returns the name of the window which has been set in the constructor.
...@@ -224,25 +224,25 @@ Saves screenshot of the current scene. ...@@ -224,25 +224,25 @@ Saves screenshot of the current scene.
.. ocv:function:: void saveScreenshot(const String &file) .. ocv:function:: void saveScreenshot(const String &file)
:param file: Name of the file. :param file: Name of the file.
Viz3d::setWindowPosition Viz3d::setWindowPosition
------------------------ ------------------------
Sets the position of the window in the screen. Sets the position of the window in the screen.
.. ocv:function:: void setWindowPosition(int x, int y) .. ocv:function:: void setWindowPosition(int x, int y)
:param x: x coordinate of the window :param x: x coordinate of the window
:param y: y coordinate of the window :param y: y coordinate of the window
Viz3d::setFullScreen Viz3d::setFullScreen
-------------------- --------------------
Sets or unsets full-screen rendering mode. Sets or unsets full-screen rendering mode.
.. ocv:function:: void setFullScreen(bool mode) .. ocv:function:: void setFullScreen(bool mode)
:param mode: If true, window will use full-screen mode. :param mode: If true, window will use full-screen mode.
Viz3d::setBackgroundColor Viz3d::setBackgroundColor
------------------------- -------------------------
Sets background color. Sets background color.
...@@ -261,8 +261,8 @@ Starts the event loop for a given time. ...@@ -261,8 +261,8 @@ Starts the event loop for a given time.
.. ocv:function:: void spinOnce(int time = 1, bool force_redraw = false) .. ocv:function:: void spinOnce(int time = 1, bool force_redraw = false)
:param time: Amount of time in milliseconds for the event loop to keep running. :param time: Amount of time in milliseconds for the event loop to keep running.
:param force_draw: If true, window renders. :param force_draw: If true, window renders.
Viz3d::wasStopped Viz3d::wasStopped
----------------- -----------------
...@@ -276,17 +276,17 @@ Sets keyboard handler. ...@@ -276,17 +276,17 @@ Sets keyboard handler.
.. ocv:function:: void registerKeyboardCallback(KeyboardCallback callback, void* cookie = 0) .. ocv:function:: void registerKeyboardCallback(KeyboardCallback callback, void* cookie = 0)
:param callback: Keyboard callback. :param callback: Keyboard callback.
:param cookie: The optional parameter passed to the callback. :param cookie: The optional parameter passed to the callback.
Viz3d::registerMouseCallback Viz3d::registerMouseCallback
---------------------------- ----------------------------
Sets mouse handler. Sets mouse handler.
.. ocv:function:: void registerMouseCallback(MouseCallback callback, void* cookie = 0) .. ocv:function:: void registerMouseCallback(MouseCallback callback, void* cookie = 0)
:param callback: Mouse callback. :param callback: Mouse callback.
:param cookie: The optional parameter passed to the callback. :param cookie: The optional parameter passed to the callback.
Viz3d::setRenderingProperty Viz3d::setRenderingProperty
--------------------------- ---------------------------
...@@ -294,18 +294,18 @@ Sets rendering property of a widget. ...@@ -294,18 +294,18 @@ Sets rendering property of a widget.
.. ocv:function:: void setRenderingProperty(const String &id, int property, double value) .. ocv:function:: void setRenderingProperty(const String &id, int property, double value)
:param id: Id of the widget. :param id: Id of the widget.
:param property: Property that will be modified. :param property: Property that will be modified.
:param value: The new value of the property. :param value: The new value of the property.
Viz3d::getRenderingProperty Viz3d::getRenderingProperty
--------------------------- ---------------------------
Returns rendering property of a widget. Returns rendering property of a widget.
.. ocv:function:: double getRenderingProperty(const String &id, int property) .. ocv:function:: double getRenderingProperty(const String &id, int property)
:param id: Id of the widget. :param id: Id of the widget.
:param property: Property. :param property: Property.
Viz3d::setDesiredUpdateRate Viz3d::setDesiredUpdateRate
--------------------------- ---------------------------
...@@ -313,8 +313,8 @@ Sets desired update rate of the window. ...@@ -313,8 +313,8 @@ Sets desired update rate of the window.
.. ocv:function:: void setDesiredUpdateRate(double rate) .. ocv:function:: void setDesiredUpdateRate(double rate)
:param rate: Desired update rate. The default is 30. :param rate: Desired update rate. The default is 30.
Viz3d::getDesiredUpdateRate Viz3d::getDesiredUpdateRate
--------------------------- ---------------------------
Returns desired update rate of the window. Returns desired update rate of the window.
...@@ -345,27 +345,27 @@ Color ...@@ -345,27 +345,27 @@ Color
This class a represents BGR color. :: This class a represents BGR color. ::
class CV_EXPORTS Color : public Scalar class CV_EXPORTS Color : public Scalar
{ {
public: public:
Color(); Color();
Color(double gray); Color(double gray);
Color(double blue, double green, double red); Color(double blue, double green, double red);
Color(const Scalar& color); Color(const Scalar& color);
static Color black(); static Color black();
static Color blue(); static Color blue();
static Color green(); static Color green();
static Color cyan(); static Color cyan();
static Color red(); static Color red();
static Color magenta(); static Color magenta();
static Color yellow(); static Color yellow();
static Color white(); static Color white();
static Color gray(); static Color gray();
}; };
Mesh3d Mesh3d
------ ------
...@@ -373,27 +373,27 @@ Mesh3d ...@@ -373,27 +373,27 @@ Mesh3d
This class wraps mesh attributes, and it can load a mesh from a ``ply`` file. :: This class wraps mesh attributes, and it can load a mesh from a ``ply`` file. ::
class CV_EXPORTS Mesh3d class CV_EXPORTS Mesh3d
{ {
public: public:
Mat cloud, colors; Mat cloud, colors;
Mat polygons; Mat polygons;
//! Loads mesh from a given ply file //! Loads mesh from a given ply file
static Mesh3d loadMesh(const String& file); static Mesh3d loadMesh(const String& file);
private: private:
/* hidden */ /* hidden */
}; };
Mesh3d::loadMesh Mesh3d::loadMesh
---------------- ----------------
Loads a mesh from a ``ply`` file. Loads a mesh from a ``ply`` file.
.. ocv:function:: static Mesh3d loadMesh(const String& file) .. ocv:function:: static Mesh3d loadMesh(const String& file)
:param file: File name. :param file: File name.
KeyboardEvent KeyboardEvent
...@@ -402,30 +402,30 @@ KeyboardEvent ...@@ -402,30 +402,30 @@ KeyboardEvent
This class represents a keyboard event. :: This class represents a keyboard event. ::
class CV_EXPORTS KeyboardEvent class CV_EXPORTS KeyboardEvent
{ {
public: public:
static const unsigned int Alt = 1; static const unsigned int Alt = 1;
static const unsigned int Ctrl = 2; static const unsigned int Ctrl = 2;
static const unsigned int Shift = 4; static const unsigned int Shift = 4;
//! Create a keyboard event //! Create a keyboard event
//! - Note that action is true if key is pressed, false if released //! - Note that action is true if key is pressed, false if released
KeyboardEvent (bool action, const std::string& key_sym, unsigned char key, bool alt, bool ctrl, bool shift); KeyboardEvent (bool action, const std::string& key_sym, unsigned char key, bool alt, bool ctrl, bool shift);
bool isAltPressed () const; bool isAltPressed () const;
bool isCtrlPressed () const; bool isCtrlPressed () const;
bool isShiftPressed () const; bool isShiftPressed () const;
unsigned char getKeyCode () const; unsigned char getKeyCode () const;
const String& getKeySym () const; const String& getKeySym () const;
bool keyDown () const; bool keyDown () const;
bool keyUp () const; bool keyUp () const;
protected: protected:
/* hidden */ /* hidden */
}; };
KeyboardEvent::KeyboardEvent KeyboardEvent::KeyboardEvent
---------------------------- ----------------------------
...@@ -433,46 +433,46 @@ Constructs a KeyboardEvent. ...@@ -433,46 +433,46 @@ Constructs a KeyboardEvent.
.. ocv:function:: KeyboardEvent (bool action, const std::string& key_sym, unsigned char key, bool alt, bool ctrl, bool shift) .. ocv:function:: KeyboardEvent (bool action, const std::string& key_sym, unsigned char key, bool alt, bool ctrl, bool shift)
:param action: If true, key is pressed. If false, key is released. :param action: If true, key is pressed. If false, key is released.
:param key_sym: Name of the key. :param key_sym: Name of the key.
:param key: Code of the key. :param key: Code of the key.
:param alt: If true, ``alt`` is pressed. :param alt: If true, ``alt`` is pressed.
:param ctrl: If true, ``ctrl`` is pressed. :param ctrl: If true, ``ctrl`` is pressed.
:param shift: If true, ``shift`` is pressed. :param shift: If true, ``shift`` is pressed.
MouseEvent MouseEvent
---------- ----------
.. ocv:class:: MouseEvent .. ocv:class:: MouseEvent
This class represents a mouse event. :: This class represents a mouse event. ::
class CV_EXPORTS MouseEvent class CV_EXPORTS MouseEvent
{ {
public: public:
enum Type { MouseMove = 1, MouseButtonPress, MouseButtonRelease, MouseScrollDown, MouseScrollUp, MouseDblClick } ; enum Type { MouseMove = 1, MouseButtonPress, MouseButtonRelease, MouseScrollDown, MouseScrollUp, MouseDblClick } ;
enum MouseButton { NoButton = 0, LeftButton, MiddleButton, RightButton, VScroll } ; enum MouseButton { NoButton = 0, LeftButton, MiddleButton, RightButton, VScroll } ;
MouseEvent (const Type& type, const MouseButton& button, const Point& p, bool alt, bool ctrl, bool shift); MouseEvent (const Type& type, const MouseButton& button, const Point& p, bool alt, bool ctrl, bool shift);
Type type; Type type;
MouseButton button; MouseButton button;
Point pointer; Point pointer;
unsigned int key_state; unsigned int key_state;
}; };
MouseEvent::MouseEvent MouseEvent::MouseEvent
---------------------- ----------------------
Constructs a MouseEvent. Constructs a MouseEvent.
.. ocv:function:: MouseEvent (const Type& type, const MouseButton& button, const Point& p, bool alt, bool ctrl, bool shift) .. ocv:function:: MouseEvent (const Type& type, const MouseButton& button, const Point& p, bool alt, bool ctrl, bool shift)
:param type: Type of the event. This can be **MouseMove**, **MouseButtonPress**, **MouseButtonRelease**, **MouseScrollDown**, **MouseScrollUp**, **MouseDblClick**. :param type: Type of the event. This can be **MouseMove**, **MouseButtonPress**, **MouseButtonRelease**, **MouseScrollDown**, **MouseScrollUp**, **MouseDblClick**.
:param button: Mouse button. This can be **NoButton**, **LeftButton**, **MiddleButton**, **RightButton**, **VScroll**. :param button: Mouse button. This can be **NoButton**, **LeftButton**, **MiddleButton**, **RightButton**, **VScroll**.
:param p: Position of the event. :param p: Position of the event.
:param alt: If true, ``alt`` is pressed. :param alt: If true, ``alt`` is pressed.
:param ctrl: If true, ``ctrl`` is pressed. :param ctrl: If true, ``ctrl`` is pressed.
:param shift: If true, ``shift`` is pressed. :param shift: If true, ``shift`` is pressed.
Camera Camera
------ ------
.. ocv:class:: Camera .. ocv:class:: Camera
...@@ -481,33 +481,33 @@ This class wraps intrinsic parameters of a camera. It provides several construct ...@@ -481,33 +481,33 @@ This class wraps intrinsic parameters of a camera. It provides several construct
that can extract the intrinsic parameters from ``field of view``, ``intrinsic matrix`` and that can extract the intrinsic parameters from ``field of view``, ``intrinsic matrix`` and
``projection matrix``. :: ``projection matrix``. ::
class CV_EXPORTS Camera class CV_EXPORTS Camera
{ {
public: public:
Camera(float f_x, float f_y, float c_x, float c_y, const Size &window_size); Camera(float f_x, float f_y, float c_x, float c_y, const Size &window_size);
Camera(const Vec2f &fov, const Size &window_size); Camera(const Vec2f &fov, const Size &window_size);
Camera(const cv::Matx33f &K, const Size &window_size); Camera(const cv::Matx33f &K, const Size &window_size);
Camera(const cv::Matx44f &proj, const Size &window_size); Camera(const cv::Matx44f &proj, const Size &window_size);
inline const Vec2d & getClip() const { return clip_; } inline const Vec2d & getClip() const { return clip_; }
inline void setClip(const Vec2d &clip) { clip_ = clip; } inline void setClip(const Vec2d &clip) { clip_ = clip; }
inline const Size & getWindowSize() const { return window_size_; } inline const Size & getWindowSize() const { return window_size_; }
void setWindowSize(const Size &window_size); void setWindowSize(const Size &window_size);
inline const Vec2f & getFov() const { return fov_; } inline const Vec2f & getFov() const { return fov_; }
inline void setFov(const Vec2f & fov) { fov_ = fov; } inline void setFov(const Vec2f & fov) { fov_ = fov; }
inline const Vec2f & getPrincipalPoint() const { return principal_point_; } inline const Vec2f & getPrincipalPoint() const { return principal_point_; }
inline const Vec2f & getFocalLength() const { return focal_; } inline const Vec2f & getFocalLength() const { return focal_; }
void computeProjectionMatrix(Matx44f &proj) const; void computeProjectionMatrix(Matx44f &proj) const;
static Camera KinectCamera(const Size &window_size); static Camera KinectCamera(const Size &window_size);
private: private:
/* hidden */ /* hidden */
}; };
Camera::Camera Camera::Camera
-------------- --------------
...@@ -515,28 +515,28 @@ Constructs a Camera. ...@@ -515,28 +515,28 @@ Constructs a Camera.
.. ocv:function:: Camera(float f_x, float f_y, float c_x, float c_y, const Size &window_size) .. ocv:function:: Camera(float f_x, float f_y, float c_x, float c_y, const Size &window_size)
:param f_x: Horizontal focal length. :param f_x: Horizontal focal length.
:param f_y: Vertical focal length. :param f_y: Vertical focal length.
:param c_x: x coordinate of the principal point. :param c_x: x coordinate of the principal point.
:param c_y: y coordinate of the principal point. :param c_y: y coordinate of the principal point.
:param window_size: Size of the window. This together with focal length and principal point determines the field of view. :param window_size: Size of the window. This together with focal length and principal point determines the field of view.
.. ocv:function:: Camera(const Vec2f &fov, const Size &window_size) .. ocv:function:: Camera(const Vec2f &fov, const Size &window_size)
:param fov: Field of view (horizontal, vertical) :param fov: Field of view (horizontal, vertical)
:param window_size: Size of the window. :param window_size: Size of the window.
Principal point is at the center of the window by default. Principal point is at the center of the window by default.
.. ocv:function:: Camera(const cv::Matx33f &K, const Size &window_size) .. ocv:function:: Camera(const cv::Matx33f &K, const Size &window_size)
:param K: Intrinsic matrix of the camera. :param K: Intrinsic matrix of the camera.
:param window_size: Size of the window. This together with intrinsic matrix determines the field of view. :param window_size: Size of the window. This together with intrinsic matrix determines the field of view.
.. ocv:function:: Camera(const cv::Matx44f &proj, const Size &window_size) .. ocv:function:: Camera(const cv::Matx44f &proj, const Size &window_size)
:param proj: Projection matrix of the camera. :param proj: Projection matrix of the camera.
:param window_size: Size of the window. This together with projection matrix determines the field of view. :param window_size: Size of the window. This together with projection matrix determines the field of view.
Camera::computeProjectionMatrix Camera::computeProjectionMatrix
------------------------------- -------------------------------
...@@ -544,13 +544,13 @@ Computes projection matrix using intrinsic parameters of the camera. ...@@ -544,13 +544,13 @@ Computes projection matrix using intrinsic parameters of the camera.
.. ocv:function:: void computeProjectionMatrix(Matx44f &proj) const .. ocv:function:: void computeProjectionMatrix(Matx44f &proj) const
:param proj: Output projection matrix. :param proj: Output projection matrix.
Camera::KinectCamera Camera::KinectCamera
-------------------- --------------------
Creates a Kinect Camera. Creates a Kinect Camera.
.. ocv:function:: static Camera KinectCamera(const Size &window_size) .. ocv:function:: static Camera KinectCamera(const Size &window_size)
:param window_size: Size of the window. This together with intrinsic matrix of a Kinect Camera determines the field of view. :param window_size: Size of the window. This together with intrinsic matrix of a Kinect Camera determines the field of view.
Widget Widget
====== ======
.. highlight:: cpp .. highlight:: cpp
In this section, the built-in widgets are presented. In this section, the built-in widgets are presented.
...@@ -11,26 +11,26 @@ Widget ...@@ -11,26 +11,26 @@ Widget
Base class of all widgets. Widget is implicitly shared.:: Base class of all widgets. Widget is implicitly shared.::
class CV_EXPORTS Widget class CV_EXPORTS Widget
{ {
public: public:
Widget(); Widget();
Widget(const Widget& other); Widget(const Widget& other);
Widget& operator=(const Widget& other); Widget& operator=(const Widget& other);
~Widget(); ~Widget();
//! Create a widget directly from ply file //! Create a widget directly from ply file
static Widget fromPlyFile(const String &file_name); static Widget fromPlyFile(const String &file_name);
//! Rendering properties of this particular widget //! Rendering properties of this particular widget
void setRenderingProperty(int property, double value); void setRenderingProperty(int property, double value);
double getRenderingProperty(int property) const; double getRenderingProperty(int property) const;
//! Casting between widgets //! Casting between widgets
template<typename _W> _W cast(); template<typename _W> _W cast();
private: private:
/* hidden */ /* hidden */
}; };
Widget::fromPlyFile Widget::fromPlyFile
------------------- -------------------
...@@ -38,50 +38,62 @@ Creates a widget from ply file. ...@@ -38,50 +38,62 @@ Creates a widget from ply file.
.. ocv:function:: static Widget fromPlyFile(const String &file_name) .. ocv:function:: static Widget fromPlyFile(const String &file_name)
:param file_name: Ply file name. :param file_name: Ply file name.
Widget::setRenderingProperty Widget::setRenderingProperty
---------------------------- ----------------------------
Sets rendering property of the widget. Sets rendering property of the widget.
.. ocv:function:: void setRenderingProperty(int property, double value) .. ocv:function:: void setRenderingProperty(int property, double value)
:param property: Property that will be modified. :param property: Property that will be modified.
:param value: The new value of the property. :param value: The new value of the property.
Widget::getRenderingProperty Widget::getRenderingProperty
---------------------------- ----------------------------
Returns rendering property of the widget. Returns rendering property of the widget.
.. ocv:function:: double getRenderingProperty(int property) const .. ocv:function:: double getRenderingProperty(int property) const
:param property: Property. :param property: Property.
Widget::cast Widget::cast
------------ ------------
Casts a widget to another. Casts a widget to another.
.. ocv:function:: template<typename _W> _W cast() .. ocv:function:: template<typename _W> _W cast()
WidgetAccessor
--------------
.. 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);
};
Widget3D Widget3D
-------- --------
.. ocv:class:: Widget3D .. ocv:class:: Widget3D
Base class of all 3D widgets. :: Base class of all 3D widgets. ::
class CV_EXPORTS Widget3D : public Widget class CV_EXPORTS Widget3D : public Widget
{ {
public: public:
Widget3D() {} Widget3D() {}
void setPose(const Affine3f &pose); void setPose(const Affine3f &pose);
void updatePose(const Affine3f &pose); void updatePose(const Affine3f &pose);
Affine3f getPose() const; Affine3f getPose() const;
void setColor(const Color &color); void setColor(const Color &color);
private: private:
/* hidden */ /* hidden */
}; };
Widget3D::setPose Widget3D::setPose
----------------- -----------------
...@@ -89,15 +101,15 @@ Sets pose of the widget. ...@@ -89,15 +101,15 @@ Sets pose of the widget.
.. ocv:function:: void setPose(const Affine3f &pose) .. ocv:function:: void setPose(const Affine3f &pose)
:param pose: The new pose of the widget. :param pose: The new pose of the widget.
Widget3D::updateWidgetPose Widget3D::updateWidgetPose
-------------------------- --------------------------
Updates pose of the widget by pre-multiplying its current pose. Updates pose of the widget by pre-multiplying its current pose.
.. ocv:function:: void updateWidgetPose(const Affine3f &pose) .. ocv:function:: void updateWidgetPose(const Affine3f &pose)
:param pose: The pose that the current pose of the widget will be pre-multiplied by. :param pose: The pose that the current pose of the widget will be pre-multiplied by.
Widget3D::getPose Widget3D::getPose
----------------- -----------------
...@@ -111,29 +123,29 @@ Sets the color of the widget. ...@@ -111,29 +123,29 @@ Sets the color of the widget.
.. ocv:function:: void setColor(const Color &color) .. ocv:function:: void setColor(const Color &color)
:param color: Color :param color: Color
Widget2D Widget2D
-------- --------
.. ocv:class:: Widget2D .. ocv:class:: Widget2D
Base class of all 2D widgets. :: Base class of all 2D widgets. ::
class CV_EXPORTS Widget2D : public Widget class CV_EXPORTS Widget2D : public Widget
{ {
public: public:
Widget2D() {} Widget2D() {}
void setColor(const Color &color); void setColor(const Color &color);
}; };
Widget2D::setColor Widget2D::setColor
------------------ ------------------
Sets the color of the widget. Sets the color of the widget.
.. ocv:function:: void setColor(const Color &color) .. ocv:function:: void setColor(const Color &color)
:param color: Color :param color: Color
LineWidget LineWidget
---------- ----------
...@@ -141,64 +153,64 @@ LineWidget ...@@ -141,64 +153,64 @@ LineWidget
This 3D Widget defines a finite line. :: This 3D Widget defines a finite line. ::
class CV_EXPORTS LineWidget : public Widget3D class CV_EXPORTS LineWidget : public Widget3D
{ {
public: public:
LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color = Color::white()); LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color = Color::white());
}; };
LineWidget::LineWidget LineWidget::LineWidget
---------------------- ----------------------
Constructs a LineWidget. Constructs a LineWidget.
.. ocv:function:: LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color = Color::white()) .. ocv:function:: LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color = Color::white())
:param pt1: Start point of the line. :param pt1: Start point of the line.
:param pt2: End point of the line. :param pt2: End point of the line.
:param color: Color of the line. :param color: Color of the line.
PlaneWidget PlaneWidget
----------- -----------
.. ocv:class:: PlaneWidget .. ocv:class:: PlaneWidget
This 3D Widget defines a finite plane. :: This 3D Widget defines a finite plane. ::
class CV_EXPORTS PlaneWidget : public Widget3D class CV_EXPORTS PlaneWidget : public Widget3D
{ {
public: public:
PlaneWidget(const Vec4f& coefs, double size = 1.0, const Color &color = Color::white()); PlaneWidget(const Vec4f& coefs, double size = 1.0, const Color &color = Color::white());
PlaneWidget(const Vec4f& coefs, const Point3f& pt, double size = 1.0, const Color &color = Color::white()); PlaneWidget(const Vec4f& coefs, const Point3f& pt, double size = 1.0, const Color &color = Color::white());
private: private:
/* hidden */ /* hidden */
}; };
PlaneWidget::PlaneWidget PlaneWidget::PlaneWidget
------------------------ ------------------------
Constructs a PlaneWidget. Constructs a PlaneWidget.
.. ocv:function:: PlaneWidget(const Vec4f& coefs, double size = 1.0, const Color &color = Color::white()) .. ocv:function:: PlaneWidget(const Vec4f& coefs, double size = 1.0, const Color &color = Color::white())
:param coefs: Plane coefficients as in (A,B,C,D) where Ax + By + Cz + D = 0. :param coefs: Plane coefficients as in (A,B,C,D) where Ax + By + Cz + D = 0.
:param size: Size of the plane. :param size: Size of the plane.
:param color: Color of the plane. :param color: Color of the plane.
.. ocv:function:: PlaneWidget(const Vec4f& coefs, const Point3f& pt, double size = 1.0, const Color &color = Color::white()) .. ocv:function:: PlaneWidget(const Vec4f& coefs, const Point3f& pt, double size = 1.0, const Color &color = Color::white())
:param coefs: Plane coefficients as in (A,B,C,D) where Ax + By + Cz + D = 0. :param coefs: Plane coefficients as in (A,B,C,D) where Ax + By + Cz + D = 0.
:param pt: Position of the plane. :param pt: Position of the plane.
:param color: Color of the plane. :param color: Color of the plane.
SphereWidget SphereWidget
------------ ------------
.. ocv:class:: SphereWidget .. ocv:class:: SphereWidget
This 3D Widget defines a sphere. :: This 3D Widget defines a sphere. ::
class CV_EXPORTS SphereWidget : public Widget3D class CV_EXPORTS SphereWidget : public Widget3D
{ {
public: public:
SphereWidget(const cv::Point3f &center, float radius, int sphere_resolution = 10, const Color &color = Color::white()) SphereWidget(const cv::Point3f &center, float radius, int sphere_resolution = 10, const Color &color = Color::white())
}; };
SphereWidget::SphereWidget SphereWidget::SphereWidget
-------------------------- --------------------------
...@@ -206,10 +218,10 @@ Constructs a SphereWidget. ...@@ -206,10 +218,10 @@ Constructs a SphereWidget.
.. ocv:function:: SphereWidget(const cv::Point3f &center, float radius, int sphere_resolution = 10, const Color &color = Color::white()) .. ocv:function:: SphereWidget(const cv::Point3f &center, float radius, int sphere_resolution = 10, const Color &color = Color::white())
:param center: Center of the sphere. :param center: Center of the sphere.
:param radius: Radius of the sphere. :param radius: Radius of the sphere.
:param sphere_resolution: Resolution of the sphere. :param sphere_resolution: Resolution of the sphere.
:param color: Color of the sphere. :param color: Color of the sphere.
ArrowWidget ArrowWidget
----------- -----------
...@@ -217,59 +229,59 @@ ArrowWidget ...@@ -217,59 +229,59 @@ ArrowWidget
This 3D Widget defines an arrow. :: This 3D Widget defines an arrow. ::
class CV_EXPORTS ArrowWidget : public Widget3D class CV_EXPORTS ArrowWidget : public Widget3D
{ {
public: public:
ArrowWidget(const Point3f& pt1, const Point3f& pt2, double thickness = 0.03, const Color &color = Color::white()); ArrowWidget(const Point3f& pt1, const Point3f& pt2, double thickness = 0.03, const Color &color = Color::white());
}; };
ArrowWidget::ArrowWidget ArrowWidget::ArrowWidget
------------------------ ------------------------
Constructs an ArrowWidget. Constructs an ArrowWidget.
.. ocv:function:: ArrowWidget(const Point3f& pt1, const Point3f& pt2, double thickness = 0.03, const Color &color = Color::white()) .. ocv:function:: ArrowWidget(const Point3f& pt1, const Point3f& pt2, double thickness = 0.03, const Color &color = Color::white())
:param pt1: Start point of the arrow. :param pt1: Start point of the arrow.
:param pt2: End 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. :param thickness: Thickness of the arrow. Thickness of arrow head is also adjusted accordingly.
:param color: Color of the arrow. :param color: Color of the arrow.
Arrow head is located at the end point of the arrow. Arrow head is located at the end point of the arrow.
CircleWidget CircleWidget
------------ ------------
.. ocv:class:: CircleWidget .. ocv:class:: CircleWidget
This 3D Widget defines a circle. :: This 3D Widget defines a circle. ::
class CV_EXPORTS CircleWidget : public Widget3D class CV_EXPORTS CircleWidget : public Widget3D
{ {
public: public:
CircleWidget(const Point3f& pt, double radius, double thickness = 0.01, const Color &color = Color::white()); CircleWidget(const Point3f& pt, double radius, double thickness = 0.01, const Color &color = Color::white());
}; };
CircleWidget::CircleWidget CircleWidget::CircleWidget
-------------------------- --------------------------
Constructs a CircleWidget. Constructs a CircleWidget.
.. ocv:function:: CircleWidget(const Point3f& pt, double radius, double thickness = 0.01, const Color &color = Color::white()) .. ocv:function:: CircleWidget(const Point3f& pt, double radius, double thickness = 0.01, const Color &color = Color::white())
:param pt: Center of the circle. :param pt: Center of the circle.
:param radius: Radius of the circle. :param radius: Radius of the circle.
:param thickness: Thickness of the circle. :param thickness: Thickness of the circle.
:param color: Color of the circle. :param color: Color of the circle.
CylinderWidget CylinderWidget
-------------- --------------
.. ocv:class:: CylinderWidget .. ocv:class:: CylinderWidget
This 3D Widget defines a cylinder. :: This 3D Widget defines a cylinder. ::
class CV_EXPORTS CylinderWidget : public Widget3D class CV_EXPORTS CylinderWidget : public Widget3D
{ {
public: public:
CylinderWidget(const Point3f& pt_on_axis, const Point3f& axis_direction, double radius, int numsides = 30, const Color &color = Color::white()); CylinderWidget(const Point3f& pt_on_axis, const Point3f& axis_direction, double radius, int numsides = 30, const Color &color = Color::white());
}; };
CylinderWidget::CylinderWidget CylinderWidget::CylinderWidget
------------------------------ ------------------------------
...@@ -277,146 +289,146 @@ Constructs a CylinderWidget. ...@@ -277,146 +289,146 @@ Constructs a CylinderWidget.
.. ocv:function:: CylinderWidget(const Point3f& pt_on_axis, const Point3f& axis_direction, double radius, int numsides = 30, const Color &color = Color::white()) .. ocv:function:: CylinderWidget(const Point3f& pt_on_axis, const Point3f& axis_direction, double radius, int numsides = 30, const Color &color = Color::white())
:param pt_on_axis: A point on the axis of the cylinder. :param pt_on_axis: A point on the axis of the cylinder.
:param axis_direction: Direction of the axis of the cylinder. :param axis_direction: Direction of the axis of the cylinder.
:param radius: Radius of the cylinder. :param radius: Radius of the cylinder.
:param numsides: Resolution of the cylinder. :param numsides: Resolution of the cylinder.
:param color: Color of the cylinder. :param color: Color of the cylinder.
CubeWidget CubeWidget
---------- ----------
.. ocv:class:: CubeWidget .. ocv:class:: CubeWidget
This 3D Widget defines a cube. :: This 3D Widget defines a cube. ::
class CV_EXPORTS CubeWidget : public Widget3D class CV_EXPORTS CubeWidget : public Widget3D
{ {
public: public:
CubeWidget(const Point3f& pt_min, const Point3f& pt_max, bool wire_frame = true, const Color &color = Color::white()); CubeWidget(const Point3f& pt_min, const Point3f& pt_max, bool wire_frame = true, const Color &color = Color::white());
}; };
CubeWidget::CubeWidget CubeWidget::CubeWidget
---------------------- ----------------------
Constructs a CudeWidget. Constructs a CudeWidget.
.. ocv:function:: CubeWidget(const Point3f& pt_min, const Point3f& pt_max, bool wire_frame = true, const Color &color = Color::white()) .. ocv:function:: CubeWidget(const Point3f& pt_min, const Point3f& pt_max, bool wire_frame = true, const Color &color = Color::white())
:param pt_min: Specifies minimum point of the bounding box. :param pt_min: Specifies minimum point of the bounding box.
:param pt_max: Specifies maximum 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. :param wire_frame: If true, cube is represented as wireframe.
:param color: Color of the cube. :param color: Color of the cube.
CoordinateSystemWidget CoordinateSystemWidget
---------------------- ----------------------
.. ocv:class:: CoordinateSystemWidget .. ocv:class:: CoordinateSystemWidget
This 3D Widget represents a coordinate system. :: This 3D Widget represents a coordinate system. ::
class CV_EXPORTS CoordinateSystemWidget : public Widget3D class CV_EXPORTS CoordinateSystemWidget : public Widget3D
{ {
public: public:
CoordinateSystemWidget(double scale = 1.0); CoordinateSystemWidget(double scale = 1.0);
}; };
CoordinateSystemWidget::CoordinateSystemWidget CoordinateSystemWidget::CoordinateSystemWidget
---------------------------------------------- ----------------------------------------------
Constructs a CoordinateSystemWidget. Constructs a CoordinateSystemWidget.
.. ocv:function:: CoordinateSystemWidget(double scale = 1.0) .. ocv:function:: CoordinateSystemWidget(double scale = 1.0)
:param scale: Determines the size of the axes. :param scale: Determines the size of the axes.
PolyLineWidget PolyLineWidget
-------------- --------------
.. ocv:class:: PolyLineWidget .. ocv:class:: PolyLineWidget
This 3D Widget defines a poly line. :: This 3D Widget defines a poly line. ::
class CV_EXPORTS PolyLineWidget : public Widget3D class CV_EXPORTS PolyLineWidget : public Widget3D
{ {
public: public:
PolyLineWidget(InputArray points, const Color &color = Color::white()); PolyLineWidget(InputArray points, const Color &color = Color::white());
private: private:
/* hidden */ /* hidden */
}; };
PolyLineWidget::PolyLineWidget PolyLineWidget::PolyLineWidget
------------------------------ ------------------------------
Constructs a PolyLineWidget. Constructs a PolyLineWidget.
.. ocv:function:: PolyLineWidget(InputArray points, const Color &color = Color::white()) .. ocv:function:: PolyLineWidget(InputArray points, const Color &color = Color::white())
:param points: Point set. :param points: Point set.
:param color: Color of the poly line. :param color: Color of the poly line.
GridWidget GridWidget
---------- ----------
.. ocv:class:: GridWidget .. ocv:class:: GridWidget
This 3D Widget defines a grid. :: This 3D Widget defines a grid. ::
class CV_EXPORTS GridWidget : public Widget3D class CV_EXPORTS GridWidget : public Widget3D
{ {
public: public:
//! Creates grid at the origin //! Creates grid at the origin
GridWidget(const Vec2i &dimensions, const Vec2d &spacing, const Color &color = Color::white()); GridWidget(const Vec2i &dimensions, const Vec2d &spacing, const Color &color = Color::white());
//! Creates grid based on the plane equation //! Creates grid based on the plane equation
GridWidget(const Vec4f &coeffs, const Vec2i &dimensions, const Vec2d &spacing, const Color &color = Color::white()); GridWidget(const Vec4f &coeffs, const Vec2i &dimensions, const Vec2d &spacing, const Color &color = Color::white());
private: private:
/* hidden */ /* hidden */
}; };
GridWidget::GridWidget GridWidget::GridWidget
---------------------- ----------------------
Constructs a GridWidget. Constructs a GridWidget.
.. ocv:function:: GridWidget(const Vec2i &dimensions, const Vec2d &spacing, const Color &color = Color::white()) .. ocv:function:: GridWidget(const Vec2i &dimensions, const Vec2d &spacing, const Color &color = Color::white())
:param dimensions: Number of columns and rows, respectively. :param dimensions: Number of columns and rows, respectively.
:param spacing: Size of each column and row, respectively. :param spacing: Size of each column and row, respectively.
:param color: Color of the grid. :param color: Color of the grid.
.. ocv:function: GridWidget(const Vec4f &coeffs, const Vec2i &dimensions, const Vec2d &spacing, const Color &color = Color::white()) .. ocv:function: GridWidget(const Vec4f &coeffs, const Vec2i &dimensions, const Vec2d &spacing, const Color &color = Color::white())
:param coeffs: Plane coefficients as in (A,B,C,D) where Ax + By + Cz + D = 0. :param coeffs: Plane coefficients as in (A,B,C,D) where Ax + By + Cz + D = 0.
:param dimensions: Number of columns and rows, respectively. :param dimensions: Number of columns and rows, respectively.
:param spacing: Size of each column and row, respectively. :param spacing: Size of each column and row, respectively.
:param color: Color of the grid. :param color: Color of the grid.
Text3DWidget Text3DWidget
------------ ------------
.. ocv:class:: Text3DWidget .. ocv:class:: Text3DWidget
This 3D Widget represents 3D text. The text always faces the camera. :: This 3D Widget represents 3D text. The text always faces the camera. ::
class CV_EXPORTS Text3DWidget : public Widget3D class CV_EXPORTS Text3DWidget : public Widget3D
{ {
public: public:
Text3DWidget(const String &text, const Point3f &position, double text_scale = 1.0, const Color &color = Color::white()); Text3DWidget(const String &text, const Point3f &position, double text_scale = 1.0, const Color &color = Color::white());
void setText(const String &text); void setText(const String &text);
String getText() const; String getText() const;
}; };
Text3DWidget::Text3DWidget Text3DWidget::Text3DWidget
-------------------------- --------------------------
Constructs a Text3DWidget. Constructs a Text3DWidget.
.. ocv:function:: Text3DWidget(const String &text, const Point3f &position, double text_scale = 1.0, const Color &color = Color::white()) .. ocv:function:: Text3DWidget(const String &text, const Point3f &position, double text_scale = 1.0, const Color &color = Color::white())
:param text: Text content of the widget. :param text: Text content of the widget.
:param position: Position of the text. :param position: Position of the text.
:param text_scale: Size of the text. :param text_scale: Size of the text.
:param color: Color of the text. :param color: Color of the text.
Text3DWidget::setText Text3DWidget::setText
--------------------- ---------------------
Sets the text content of the widget. Sets the text content of the widget.
.. ocv:function:: void setText(const String &text) .. ocv:function:: void setText(const String &text)
:param text: Text content of the widget. :param text: Text content of the widget.
Text3DWidget::getText Text3DWidget::getText
--------------------- ---------------------
...@@ -430,33 +442,33 @@ TextWidget ...@@ -430,33 +442,33 @@ TextWidget
This 2D Widget represents text overlay. :: This 2D Widget represents text overlay. ::
class CV_EXPORTS TextWidget : public Widget2D class CV_EXPORTS TextWidget : public Widget2D
{ {
public: public:
TextWidget(const String &text, const Point2i &pos, int font_size = 10, const Color &color = Color::white()); TextWidget(const String &text, const Point2i &pos, int font_size = 10, const Color &color = Color::white());
void setText(const String &text); void setText(const String &text);
String getText() const; String getText() const;
}; };
TextWidget::TextWidget TextWidget::TextWidget
---------------------- ----------------------
Constructs a TextWidget. Constructs a TextWidget.
.. ocv:function:: TextWidget(const String &text, const Point2i &pos, int font_size = 10, const Color &color = Color::white()) .. ocv:function:: TextWidget(const String &text, const Point2i &pos, int font_size = 10, const Color &color = Color::white())
:param text: Text content of the widget. :param text: Text content of the widget.
:param pos: Position of the text. :param pos: Position of the text.
:param font_size: Font size. :param font_size: Font size.
:param color: Color of the text. :param color: Color of the text.
TextWidget::setText TextWidget::setText
--------------------- ---------------------
Sets the text content of the widget. Sets the text content of the widget.
.. ocv:function:: void setText(const String &text) .. ocv:function:: void setText(const String &text)
:param text: Text content of the widget. :param text: Text content of the widget.
TextWidget::getText TextWidget::getText
--------------------- ---------------------
...@@ -470,181 +482,181 @@ ImageOverlayWidget ...@@ -470,181 +482,181 @@ ImageOverlayWidget
This 2D Widget represents an image overlay. :: This 2D Widget represents an image overlay. ::
class CV_EXPORTS ImageOverlayWidget : public Widget2D class CV_EXPORTS ImageOverlayWidget : public Widget2D
{ {
public: public:
ImageOverlayWidget(const Mat &image, const Rect &rect); ImageOverlayWidget(const Mat &image, const Rect &rect);
void setImage(const Mat &image); void setImage(const Mat &image);
}; };
ImageOverlayWidget::ImageOverlayWidget ImageOverlayWidget::ImageOverlayWidget
-------------------------------------- --------------------------------------
Constructs a ImageOverlayWidget. Constructs a ImageOverlayWidget.
.. ocv:function:: ImageOverlayWidget(const Mat &image, const Rect &rect) .. ocv:function:: ImageOverlayWidget(const Mat &image, const Rect &rect)
:param image: BGR or Gray-Scale image. :param image: BGR or Gray-Scale image.
:param rect: Image is scaled and positioned based on rect. :param rect: Image is scaled and positioned based on rect.
ImageOverlayWidget::setImage ImageOverlayWidget::setImage
---------------------------- ----------------------------
Sets the image content of the widget. Sets the image content of the widget.
.. ocv:function:: void setImage(const Mat &image) .. ocv:function:: void setImage(const Mat &image)
:param image: BGR or Gray-Scale image. :param image: BGR or Gray-Scale image.
Image3DWidget Image3DWidget
------------- -------------
.. ocv:class:: Image3DWidget .. ocv:class:: Image3DWidget
This 3D Widget represents 3D image. :: This 3D Widget represents 3D image. ::
class CV_EXPORTS Image3DWidget : public Widget3D class CV_EXPORTS Image3DWidget : public Widget3D
{ {
public: public:
//! Creates 3D image at the origin //! Creates 3D image at the origin
Image3DWidget(const Mat &image, const Size &size); Image3DWidget(const Mat &image, const Size &size);
//! Creates 3D image at a given position, pointing in the direction of the normal, and having the up_vector orientation //! Creates 3D image at a given position, pointing in the direction of the normal, and having the up_vector orientation
Image3DWidget(const Vec3f &position, const Vec3f &normal, const Vec3f &up_vector, const Mat &image, const Size &size); Image3DWidget(const Vec3f &position, const Vec3f &normal, const Vec3f &up_vector, const Mat &image, const Size &size);
void setImage(const Mat &image); void setImage(const Mat &image);
}; };
Image3DWidget::Image3DWidget Image3DWidget::Image3DWidget
---------------------------- ----------------------------
Constructs a Image3DWidget. Constructs a Image3DWidget.
.. ocv:function:: Image3DWidget(const Mat &image, const Size &size) .. ocv:function:: Image3DWidget(const Mat &image, const Size &size)
:param image: BGR or Gray-Scale image. :param image: BGR or Gray-Scale image.
:param size: Size of the image. :param size: Size of the image.
.. ocv:function:: Image3DWidget(const Vec3f &position, const Vec3f &normal, const Vec3f &up_vector, const Mat &image, const Size &size) .. ocv:function:: Image3DWidget(const Vec3f &position, const Vec3f &normal, const Vec3f &up_vector, const Mat &image, const Size &size)
:param position: Position of the image. :param position: Position of the image.
:param normal: Normal of the plane that represents the image. :param normal: Normal of the plane that represents the image.
:param up_vector: Determines orientation of the image. :param up_vector: Determines orientation of the image.
:param image: BGR or Gray-Scale image. :param image: BGR or Gray-Scale image.
:param size: Size of the image. :param size: Size of the image.
Image3DWidget::setImage Image3DWidget::setImage
----------------------- -----------------------
Sets the image content of the widget. Sets the image content of the widget.
.. ocv:function:: void setImage(const Mat &image) .. ocv:function:: void setImage(const Mat &image)
:param image: BGR or Gray-Scale image. :param image: BGR or Gray-Scale image.
CameraPositionWidget CameraPositionWidget
-------------------- --------------------
.. ocv:class:: CameraPositionWidget .. ocv:class:: CameraPositionWidget
This 3D Widget represents camera position. :: This 3D Widget represents camera position. ::
class CV_EXPORTS CameraPositionWidget : public Widget3D class CV_EXPORTS CameraPositionWidget : public Widget3D
{ {
public: public:
//! Creates camera coordinate frame (axes) at the origin //! Creates camera coordinate frame (axes) at the origin
CameraPositionWidget(double scale = 1.0); CameraPositionWidget(double scale = 1.0);
//! Creates frustum based on the intrinsic marix K at the origin //! Creates frustum based on the intrinsic marix K at the origin
CameraPositionWidget(const Matx33f &K, double scale = 1.0, const Color &color = Color::white()); CameraPositionWidget(const Matx33f &K, double scale = 1.0, const Color &color = Color::white());
//! Creates frustum based on the field of view at the origin //! Creates frustum based on the field of view at the origin
CameraPositionWidget(const Vec2f &fov, double scale = 1.0, const Color &color = Color::white()); CameraPositionWidget(const Vec2f &fov, double scale = 1.0, const Color &color = Color::white());
//! Creates frustum and display given image at the far plane //! Creates frustum and display given image at the far plane
CameraPositionWidget(const Matx33f &K, const Mat &img, double scale = 1.0, const Color &color = Color::white()); CameraPositionWidget(const Matx33f &K, const Mat &img, double scale = 1.0, const Color &color = Color::white());
}; };
CameraPositionWidget::CameraPositionWidget CameraPositionWidget::CameraPositionWidget
------------------------------------------ ------------------------------------------
Constructs a CameraPositionWidget. Constructs a CameraPositionWidget.
.. ocv:function:: CameraPositionWidget(double scale = 1.0) .. ocv:function:: CameraPositionWidget(double scale = 1.0)
Creates camera coordinate frame at the origin. Creates camera coordinate frame at the origin.
.. ocv:function:: CameraPositionWidget(const Matx33f &K, double scale = 1.0, const Color &color = Color::white()) .. ocv:function:: CameraPositionWidget(const Matx33f &K, double scale = 1.0, const Color &color = Color::white())
:param K: Intrinsic matrix of the camera. :param K: Intrinsic matrix of the camera.
:param scale: Scale of the frustum. :param scale: Scale of the frustum.
:param color: Color of the frustum. :param color: Color of the frustum.
Creates viewing frustum of the camera based on its intrinsic matrix K. Creates viewing frustum of the camera based on its intrinsic matrix K.
.. ocv:function:: CameraPositionWidget(const Vec2f &fov, double scale = 1.0, const Color &color = Color::white()) .. ocv:function:: CameraPositionWidget(const Vec2f &fov, double scale = 1.0, const Color &color = Color::white())
:param fov: Field of view of the camera (horizontal, vertical). :param fov: Field of view of the camera (horizontal, vertical).
:param scale: Scale of the frustum. :param scale: Scale of the frustum.
:param color: Color of the frustum. :param color: Color of the frustum.
Creates viewing frustum of the camera based on its field of view fov. Creates viewing frustum of the camera based on its field of view fov.
.. ocv:function:: CameraPositionWidget(const Matx33f &K, const Mat &img, double scale = 1.0, const Color &color = Color::white()) .. ocv:function:: CameraPositionWidget(const Matx33f &K, const Mat &img, double scale = 1.0, const Color &color = Color::white())
:param K: Intrinsic matrix of the camera. :param K: Intrinsic matrix of the camera.
:param img: BGR or Gray-Scale image that is going to be displayed at the far plane of the frustum. :param img: BGR or Gray-Scale image that is going to be displayed at the far plane of the frustum.
:param scale: Scale of the frustum and image. :param scale: Scale of the frustum and image.
:param color: Color of the frustum. :param color: Color of the frustum.
Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on the far end plane. Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on the far end plane.
TrajectoryWidget TrajectoryWidget
---------------- ----------------
.. ocv:class:: TrajectoryWidget .. ocv:class:: TrajectoryWidget
This 3D Widget represents a trajectory. :: This 3D Widget represents a trajectory. ::
class CV_EXPORTS TrajectoryWidget : public Widget3D class CV_EXPORTS TrajectoryWidget : public Widget3D
{ {
public: public:
enum {DISPLAY_FRAMES = 1, DISPLAY_PATH = 2}; enum {DISPLAY_FRAMES = 1, DISPLAY_PATH = 2};
//! Displays trajectory of the given path either by coordinate frames or polyline //! Displays trajectory of the given path either by coordinate frames or polyline
TrajectoryWidget(const std::vector<Affine3f> &path, int display_mode = TrajectoryWidget::DISPLAY_PATH, const Color &color = Color::white(), double scale = 1.0); TrajectoryWidget(const std::vector<Affine3f> &path, int display_mode = TrajectoryWidget::DISPLAY_PATH, const Color &color = Color::white(), double scale = 1.0);
//! Displays trajectory of the given path by frustums //! Displays trajectory of the given path by frustums
TrajectoryWidget(const std::vector<Affine3f> &path, const Matx33f &K, double scale = 1.0, const Color &color = Color::white()); TrajectoryWidget(const std::vector<Affine3f> &path, const Matx33f &K, double scale = 1.0, const Color &color = Color::white());
//! Displays trajectory of the given path by frustums //! Displays trajectory of the given path by frustums
TrajectoryWidget(const std::vector<Affine3f> &path, const Vec2f &fov, double scale = 1.0, const Color &color = Color::white()); TrajectoryWidget(const std::vector<Affine3f> &path, const Vec2f &fov, double scale = 1.0, const Color &color = Color::white());
private: private:
/* hidden */ /* hidden */
}; };
TrajectoryWidget::TrajectoryWidget TrajectoryWidget::TrajectoryWidget
---------------------------------- ----------------------------------
Constructs a TrajectoryWidget. Constructs a TrajectoryWidget.
.. ocv:function:: TrajectoryWidget(const std::vector<Affine3f> &path, int display_mode = TrajectoryWidget::DISPLAY_PATH, const Color &color = Color::white(), double scale = 1.0) .. ocv:function:: TrajectoryWidget(const std::vector<Affine3f> &path, int display_mode = TrajectoryWidget::DISPLAY_PATH, const Color &color = Color::white(), double scale = 1.0)
:param path: List of poses on a trajectory. :param path: List of poses on a trajectory.
:param display_mode: Display mode. This can be DISPLAY_PATH, DISPLAY_FRAMES, DISPLAY_PATH & DISPLAY_FRAMES. :param display_mode: Display mode. This can be DISPLAY_PATH, DISPLAY_FRAMES, DISPLAY_PATH & DISPLAY_FRAMES.
:param color: Color of the polyline that represents path. Frames are not affected. :param color: Color of the polyline that represents path. Frames are not affected.
:param scale: Scale of the frames. Polyline is not affected. :param scale: Scale of the frames. Polyline is not affected.
Displays trajectory of the given path as follows: Displays trajectory of the given path as follows:
* DISPLAY_PATH : Displays a poly line that represents the path. * DISPLAY_PATH : Displays a poly line that represents the path.
* DISPLAY_FRAMES : Displays coordinate frames at each pose. * DISPLAY_FRAMES : Displays coordinate frames at each pose.
* DISPLAY_PATH & DISPLAY_FRAMES : Displays both poly line and coordinate frames. * DISPLAY_PATH & DISPLAY_FRAMES : Displays both poly line and coordinate frames.
.. ocv:function:: TrajectoryWidget(const std::vector<Affine3f> &path, const Matx33f &K, double scale = 1.0, const Color &color = Color::white()) .. ocv:function:: TrajectoryWidget(const std::vector<Affine3f> &path, const Matx33f &K, double scale = 1.0, const Color &color = Color::white())
:param path: List of poses on a trajectory. :param path: List of poses on a trajectory.
:param K: Intrinsic matrix of the camera. :param K: Intrinsic matrix of the camera.
:param scale: Scale of the frustums. :param scale: Scale of the frustums.
:param color: Color of the frustums. :param color: Color of the frustums.
Displays frustums at each pose of the trajectory. Displays frustums at each pose of the trajectory.
.. ocv:function:: TrajectoryWidget(const std::vector<Affine3f> &path, const Vec2f &fov, double scale = 1.0, const Color &color = Color::white()) .. ocv:function:: TrajectoryWidget(const std::vector<Affine3f> &path, const Vec2f &fov, double scale = 1.0, const Color &color = Color::white())
:param path: List of poses on a trajectory. :param path: List of poses on a trajectory.
:param fov: Field of view of the camera (horizontal, vertical). :param fov: Field of view of the camera (horizontal, vertical).
:param scale: Scale of the frustums. :param scale: Scale of the frustums.
:param color: Color of the frustums. :param color: Color of the frustums.
Displays frustums at each pose of the trajectory. Displays frustums at each pose of the trajectory.
SpheresTrajectoryWidget SpheresTrajectoryWidget
----------------------- -----------------------
...@@ -653,62 +665,62 @@ SpheresTrajectoryWidget ...@@ -653,62 +665,62 @@ SpheresTrajectoryWidget
This 3D Widget represents a trajectory using spheres and lines, where spheres represent the positions of the camera, and lines 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. :: represent the direction from previous position to the current. ::
class CV_EXPORTS SpheresTrajectoryWidget : public Widget3D class CV_EXPORTS SpheresTrajectoryWidget : public Widget3D
{ {
public: public:
SpheresTrajectoryWidget(const std::vector<Affine3f> &path, float line_length = 0.05f, SpheresTrajectoryWidget(const std::vector<Affine3f> &path, float line_length = 0.05f,
double init_sphere_radius = 0.021, sphere_radius = 0.007, double init_sphere_radius = 0.021, sphere_radius = 0.007,
Color &line_color = Color::white(), const Color &sphere_color = Color::white()); Color &line_color = Color::white(), const Color &sphere_color = Color::white());
}; };
SpheresTrajectoryWidget::SpheresTrajectoryWidget SpheresTrajectoryWidget::SpheresTrajectoryWidget
------------------------------------------------ ------------------------------------------------
Constructs a SpheresTrajectoryWidget. Constructs a SpheresTrajectoryWidget.
.. ocv:function:: SpheresTrajectoryWidget(const std::vector<Affine3f> &path, float line_length = 0.05f, double init_sphere_radius = 0.021, double sphere_radius = 0.007, const Color &line_color = Color::white(), const Color &sphere_color = Color::white()) .. ocv:function:: SpheresTrajectoryWidget(const std::vector<Affine3f> &path, float line_length = 0.05f, double init_sphere_radius = 0.021, double sphere_radius = 0.007, const Color &line_color = Color::white(), const Color &sphere_color = Color::white())
:param path: List of poses on a trajectory. :param path: List of poses on a trajectory.
:param line_length: Length of the lines. :param line_length: Length of the lines.
:param init_sphere_radius: Radius of the first sphere which represents the initial position of the camera. :param init_sphere_radius: Radius of the first sphere which represents the initial position of the camera.
:param sphere_radius: Radius of the rest of the spheres. :param sphere_radius: Radius of the rest of the spheres.
:param line_color: Color of the lines. :param line_color: Color of the lines.
:param sphere_color: Color of the spheres. :param sphere_color: Color of the spheres.
CloudWidget CloudWidget
----------- -----------
.. ocv:class:: CloudWidget .. ocv:class:: CloudWidget
This 3D Widget defines a point cloud. :: This 3D Widget defines a point cloud. ::
class CV_EXPORTS CloudWidget : public Widget3D class CV_EXPORTS CloudWidget : public Widget3D
{ {
public: public:
//! Each point in cloud is mapped to a color in colors //! Each point in cloud is mapped to a color in colors
CloudWidget(InputArray cloud, InputArray colors); CloudWidget(InputArray cloud, InputArray colors);
//! All points in cloud have the same color //! All points in cloud have the same color
CloudWidget(InputArray cloud, const Color &color = Color::white()); CloudWidget(InputArray cloud, const Color &color = Color::white());
private: private:
/* hidden */ /* hidden */
}; };
CloudWidget::CloudWidget CloudWidget::CloudWidget
------------------------ ------------------------
Constructs a CloudWidget. Constructs a CloudWidget.
.. ocv:function:: CloudWidget(InputArray cloud, InputArray colors) .. ocv:function:: CloudWidget(InputArray cloud, InputArray colors)
:param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. :param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4.
:param colors: Set of colors. It has to be of the same size with cloud. :param colors: Set of colors. It has to be of the same size with cloud.
Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). Points in the cloud belong to mask when they are set to (NaN, NaN, NaN).
.. ocv:function:: CloudWidget(InputArray cloud, const Color &color = Color::white()) .. ocv:function:: CloudWidget(InputArray cloud, const Color &color = Color::white())
:param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. :param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4.
:param color: A single color for the whole cloud. :param color: A single color for the whole cloud.
Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). Points in the cloud belong to mask when they are set to (NaN, NaN, NaN).
CloudCollectionWidget CloudCollectionWidget
--------------------- ---------------------
...@@ -716,20 +728,20 @@ CloudCollectionWidget ...@@ -716,20 +728,20 @@ CloudCollectionWidget
This 3D Widget defines a collection of clouds. :: This 3D Widget defines a collection of clouds. ::
class CV_EXPORTS CloudCollectionWidget : public Widget3D class CV_EXPORTS CloudCollectionWidget : public Widget3D
{ {
public: public:
CloudCollectionWidget(); CloudCollectionWidget();
//! Each point in cloud is mapped to a color in colors //! Each point in cloud is mapped to a color in colors
void addCloud(InputArray cloud, InputArray colors, const Affine3f &pose = Affine3f::Identity()); void addCloud(InputArray cloud, InputArray colors, const Affine3f &pose = Affine3f::Identity());
//! All points in cloud have the same color //! All points in cloud have the same color
void addCloud(InputArray cloud, const Color &color = Color::white(), Affine3f &pose = Affine3f::Identity()); void addCloud(InputArray cloud, const Color &color = Color::white(), Affine3f &pose = Affine3f::Identity());
private: private:
/* hidden */ /* hidden */
}; };
CloudCollectionWidget::CloudCollectionWidget CloudCollectionWidget::CloudCollectionWidget
-------------------------------------------- --------------------------------------------
Constructs a CloudCollectionWidget. Constructs a CloudCollectionWidget.
...@@ -742,69 +754,69 @@ Adds a cloud to the collection. ...@@ -742,69 +754,69 @@ Adds a cloud to the collection.
.. ocv:function:: void addCloud(InputArray cloud, InputArray colors, const Affine3f &pose = Affine3f::Identity()) .. ocv:function:: void addCloud(InputArray cloud, InputArray colors, const Affine3f &pose = Affine3f::Identity())
:param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. :param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4.
:param colors: Set of colors. It has to be of the same size with cloud. :param colors: Set of colors. It has to be of the same size with cloud.
:param pose: Pose of the cloud. :param pose: Pose of the cloud.
Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). Points in the cloud belong to mask when they are set to (NaN, NaN, NaN).
.. ocv:function:: void addCloud(InputArray cloud, const Color &color = Color::white(), const Affine3f &pose = Affine3f::Identity()) .. ocv:function:: void addCloud(InputArray cloud, const Color &color = Color::white(), const Affine3f &pose = Affine3f::Identity())
:param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. :param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4.
:param colors: A single color for the whole cloud. :param colors: A single color for the whole cloud.
:param pose: Pose of the cloud. :param pose: Pose of the cloud.
Points in the cloud belong to mask when they are set to (NaN, NaN, NaN). Points in the cloud belong to mask when they are set to (NaN, NaN, NaN).
CloudNormalsWidget CloudNormalsWidget
------------------ ------------------
.. ocv:class:: CloudNormalsWidget .. ocv:class:: CloudNormalsWidget
This 3D Widget represents normals of a point cloud. :: This 3D Widget represents normals of a point cloud. ::
class CV_EXPORTS CloudNormalsWidget : public Widget3D class CV_EXPORTS CloudNormalsWidget : public Widget3D
{ {
public: public:
CloudNormalsWidget(InputArray cloud, InputArray normals, int level = 100, float scale = 0.02f, const Color &color = Color::white()); CloudNormalsWidget(InputArray cloud, InputArray normals, int level = 100, float scale = 0.02f, const Color &color = Color::white());
private: private:
/* hidden */ /* hidden */
}; };
CloudNormalsWidget::CloudNormalsWidget CloudNormalsWidget::CloudNormalsWidget
-------------------------------------- --------------------------------------
Constructs a CloudNormalsWidget. Constructs a CloudNormalsWidget.
.. ocv:function:: CloudNormalsWidget(InputArray cloud, InputArray normals, int level = 100, float scale = 0.02f, const Color &color = Color::white()) .. ocv:function:: CloudNormalsWidget(InputArray cloud, InputArray normals, int level = 100, float scale = 0.02f, const Color &color = Color::white())
:param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4. :param cloud: Point set which can be of type: CV_32FC3, CV_32FC4, CV_64FC3, CV_64FC4.
:param normals: A set of normals that has to be of same type with cloud. :param normals: A set of normals that has to be of same type with cloud.
:param level: Display only every levelth normal. :param level: Display only every levelth normal.
:param scale: Scale of the arrows that represent normals. :param scale: Scale of the arrows that represent normals.
:param color: Color of the arrows that represent normals. :param color: Color of the arrows that represent normals.
MeshWidget MeshWidget
---------- ----------
.. ocv:class:: MeshWidget .. ocv:class:: MeshWidget
This 3D Widget defines a mesh. :: This 3D Widget defines a mesh. ::
class CV_EXPORTS MeshWidget : public Widget3D class CV_EXPORTS MeshWidget : public Widget3D
{ {
public: public:
MeshWidget(const Mesh3d &mesh); MeshWidget(const Mesh3d &mesh);
private: private:
/* hidden */ /* hidden */
}; };
MeshWidget::MeshWidget MeshWidget::MeshWidget
---------------------- ----------------------
Constructs a MeshWidget. Constructs a MeshWidget.
.. ocv:function:: MeshWidget(const Mesh3d &mesh) .. ocv:function:: MeshWidget(const Mesh3d &mesh)
:param mesh: Mesh object that will be displayed. :param mesh: Mesh object that will be displayed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment