mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
replace tabs by spaces
This commit is contained in:
parent
a5b75769a3
commit
31501ebf4f
@ -7,5 +7,3 @@ viz. 3D Visualizer
|
||||
|
||||
viz3d.rst
|
||||
widget.rst
|
||||
types.rst
|
||||
widget_accessor.rst
|
||||
|
@ -7,67 +7,67 @@ 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
|
||||
{
|
||||
public:
|
||||
typedef cv::Ptr<Viz3d> Ptr;
|
||||
typedef void (*KeyboardCallback)(const KeyboardEvent&, void*);
|
||||
typedef void (*MouseCallback)(const MouseEvent&, void*);
|
||||
class CV_EXPORTS Viz3d
|
||||
{
|
||||
public:
|
||||
typedef cv::Ptr<Viz3d> Ptr;
|
||||
typedef void (*KeyboardCallback)(const KeyboardEvent&, void*);
|
||||
typedef void (*MouseCallback)(const MouseEvent&, void*);
|
||||
|
||||
Viz3d(const String& window_name = String());
|
||||
Viz3d(const Viz3d&);
|
||||
Viz3d& operator=(const Viz3d&);
|
||||
~Viz3d();
|
||||
Viz3d(const String& window_name = String());
|
||||
Viz3d(const Viz3d&);
|
||||
Viz3d& operator=(const Viz3d&);
|
||||
~Viz3d();
|
||||
|
||||
void showWidget(const String &id, const Widget &widget, const Affine3f &pose = Affine3f::Identity());
|
||||
void removeWidget(const String &id);
|
||||
Widget getWidget(const String &id) const;
|
||||
void removeAllWidgets();
|
||||
void showWidget(const String &id, const Widget &widget, const Affine3f &pose = Affine3f::Identity());
|
||||
void removeWidget(const String &id);
|
||||
Widget getWidget(const String &id) const;
|
||||
void removeAllWidgets();
|
||||
|
||||
void setWidgetPose(const String &id, const Affine3f &pose);
|
||||
void updateWidgetPose(const String &id, const Affine3f &pose);
|
||||
Affine3f getWidgetPose(const String &id) const;
|
||||
|
||||
void setCamera(const Camera &camera);
|
||||
Camera getCamera() const;
|
||||
Affine3f getViewerPose();
|
||||
void setViewerPose(const Affine3f &pose);
|
||||
|
||||
void resetCameraViewpoint (const String &id);
|
||||
void resetCamera();
|
||||
|
||||
void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord);
|
||||
void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction);
|
||||
|
||||
Size getWindowSize() const;
|
||||
void setWindowSize(const Size &window_size);
|
||||
String getWindowName() const;
|
||||
void saveScreenshot (const String &file);
|
||||
void setWindowPosition (int x, int y);
|
||||
void setFullScreen (bool mode);
|
||||
void setBackgroundColor(const Color& color = Color::black());
|
||||
void setWidgetPose(const String &id, const Affine3f &pose);
|
||||
void updateWidgetPose(const String &id, const Affine3f &pose);
|
||||
Affine3f getWidgetPose(const String &id) const;
|
||||
|
||||
void setCamera(const Camera &camera);
|
||||
Camera getCamera() const;
|
||||
Affine3f getViewerPose();
|
||||
void setViewerPose(const Affine3f &pose);
|
||||
|
||||
void resetCameraViewpoint (const String &id);
|
||||
void resetCamera();
|
||||
|
||||
void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord);
|
||||
void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction);
|
||||
|
||||
Size getWindowSize() const;
|
||||
void setWindowSize(const Size &window_size);
|
||||
String getWindowName() const;
|
||||
void saveScreenshot (const String &file);
|
||||
void setWindowPosition (int x, int y);
|
||||
void setFullScreen (bool mode);
|
||||
void setBackgroundColor(const Color& color = Color::black());
|
||||
|
||||
void spin();
|
||||
void spinOnce(int time = 1, bool force_redraw = false);
|
||||
bool wasStopped() const;
|
||||
void spin();
|
||||
void spinOnce(int time = 1, bool force_redraw = false);
|
||||
bool wasStopped() const;
|
||||
|
||||
void registerKeyboardCallback(KeyboardCallback callback, void* cookie = 0);
|
||||
void registerMouseCallback(MouseCallback callback, void* cookie = 0);
|
||||
|
||||
void setRenderingProperty(const String &id, int property, double value);
|
||||
double getRenderingProperty(const String &id, int property);
|
||||
|
||||
void setDesiredUpdateRate(double rate);
|
||||
double getDesiredUpdateRate();
|
||||
|
||||
void setRepresentationToSurface();
|
||||
void setRepresentationToWireframe();
|
||||
void setRepresentationToPoints();
|
||||
private:
|
||||
/* hidden */
|
||||
};
|
||||
void registerKeyboardCallback(KeyboardCallback callback, void* cookie = 0);
|
||||
void registerMouseCallback(MouseCallback callback, void* cookie = 0);
|
||||
|
||||
void setRenderingProperty(const String &id, int property, double value);
|
||||
double getRenderingProperty(const String &id, int property);
|
||||
|
||||
void setDesiredUpdateRate(double rate);
|
||||
double getDesiredUpdateRate();
|
||||
|
||||
void setRepresentationToSurface();
|
||||
void setRepresentationToWireframe();
|
||||
void setRepresentationToPoints();
|
||||
private:
|
||||
/* hidden */
|
||||
};
|
||||
|
||||
Viz3d::Viz3d
|
||||
------------
|
||||
@ -75,7 +75,7 @@ The constructors.
|
||||
|
||||
.. 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
|
||||
-----------------
|
||||
@ -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())
|
||||
|
||||
:param id: A unique id for the widget.
|
||||
:param widget: The widget to be rendered in the window.
|
||||
:param pose: Pose of the widget.
|
||||
|
||||
:param id: A unique id for the widget.
|
||||
:param widget: The widget to be rendered in the window.
|
||||
:param pose: Pose of the widget.
|
||||
|
||||
Viz3d::removeWidget
|
||||
-------------------
|
||||
Removes a widget from the window.
|
||||
|
||||
.. 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
|
||||
----------------
|
||||
Retrieves a widget from the window. A widget is implicitly shared;
|
||||
@ -103,8 +103,8 @@ immediately visible in the window.
|
||||
|
||||
.. 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
|
||||
-----------------------
|
||||
Removes all widgets from the window.
|
||||
@ -117,8 +117,8 @@ Sets pose of a widget in the window.
|
||||
|
||||
.. ocv:function:: void setWidgetPose(const String &id, const Affine3f &pose)
|
||||
|
||||
:param id: The id of the widget whose pose will be set.
|
||||
:param pose: The new pose of the widget.
|
||||
:param id: The id of the widget whose pose will be set.
|
||||
:param pose: The new pose of the widget.
|
||||
|
||||
Viz3d::updateWidgetPose
|
||||
-----------------------
|
||||
@ -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)
|
||||
|
||||
: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 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.
|
||||
|
||||
Viz3d::getWidgetPose
|
||||
--------------------
|
||||
@ -135,7 +135,7 @@ Returns the current pose of a widget in the window.
|
||||
|
||||
.. 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
|
||||
----------------
|
||||
@ -143,7 +143,7 @@ Sets the intrinsic parameters of the viewer using Camera.
|
||||
|
||||
.. ocv:function:: void setCamera(const Camera &camera)
|
||||
|
||||
:param camera: Camera object wrapping intrinsinc parameters.
|
||||
:param camera: Camera object wrapping intrinsinc parameters.
|
||||
|
||||
Viz3d::getCamera
|
||||
----------------
|
||||
@ -163,7 +163,7 @@ Sets pose of the viewer.
|
||||
|
||||
.. 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
|
||||
---------------------------
|
||||
@ -171,8 +171,8 @@ Resets camera viewpoint to a 3D widget in the scene.
|
||||
|
||||
.. ocv:function:: void resetCameraViewpoint (const String &id)
|
||||
|
||||
:param pose: Id of a 3D widget.
|
||||
|
||||
:param pose: Id of a 3D widget.
|
||||
|
||||
Viz3d::resetCamera
|
||||
------------------
|
||||
Resets camera.
|
||||
@ -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)
|
||||
|
||||
:param pt: Point in world coordinate system.
|
||||
:param window_coord: Output point in window coordinate system.
|
||||
|
||||
:param pt: Point in world coordinate system.
|
||||
:param window_coord: Output point in window coordinate system.
|
||||
|
||||
Viz3d::converTo3DRay
|
||||
--------------------
|
||||
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)
|
||||
|
||||
:param window_coord: Point in window coordinate system.
|
||||
:param origin: Output origin of the ray.
|
||||
:param direction: Output direction of the ray.
|
||||
|
||||
:param window_coord: Point in window coordinate system.
|
||||
:param origin: Output origin of the ray.
|
||||
:param direction: Output direction of the ray.
|
||||
|
||||
Viz3d::getWindowSize
|
||||
--------------------
|
||||
Returns the current size of the window.
|
||||
@ -210,8 +210,8 @@ Sets the size of the window.
|
||||
|
||||
.. 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
|
||||
--------------------
|
||||
Returns the name of the window which has been set in the constructor.
|
||||
@ -224,25 +224,25 @@ Saves screenshot of the current scene.
|
||||
|
||||
.. ocv:function:: void saveScreenshot(const String &file)
|
||||
|
||||
:param file: Name of the file.
|
||||
|
||||
:param file: Name of the file.
|
||||
|
||||
Viz3d::setWindowPosition
|
||||
------------------------
|
||||
Sets the position of the window in the screen.
|
||||
|
||||
.. ocv:function:: void setWindowPosition(int x, int y)
|
||||
|
||||
:param x: x coordinate of the window
|
||||
:param y: y coordinate of the window
|
||||
|
||||
:param x: x coordinate of the window
|
||||
:param y: y coordinate of the window
|
||||
|
||||
Viz3d::setFullScreen
|
||||
--------------------
|
||||
Sets or unsets full-screen rendering 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
|
||||
-------------------------
|
||||
Sets background color.
|
||||
@ -261,8 +261,8 @@ Starts the event loop for a given time.
|
||||
|
||||
.. 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 force_draw: If true, window renders.
|
||||
:param time: Amount of time in milliseconds for the event loop to keep running.
|
||||
:param force_draw: If true, window renders.
|
||||
|
||||
Viz3d::wasStopped
|
||||
-----------------
|
||||
@ -276,17 +276,17 @@ Sets keyboard handler.
|
||||
|
||||
.. ocv:function:: void registerKeyboardCallback(KeyboardCallback callback, void* cookie = 0)
|
||||
|
||||
:param callback: Keyboard callback.
|
||||
:param cookie: The optional parameter passed to the callback.
|
||||
|
||||
:param callback: Keyboard callback.
|
||||
:param cookie: The optional parameter passed to the callback.
|
||||
|
||||
Viz3d::registerMouseCallback
|
||||
----------------------------
|
||||
Sets mouse handler.
|
||||
|
||||
.. ocv:function:: void registerMouseCallback(MouseCallback callback, void* cookie = 0)
|
||||
|
||||
:param callback: Mouse callback.
|
||||
:param cookie: The optional parameter passed to the callback.
|
||||
:param callback: Mouse callback.
|
||||
:param cookie: The optional parameter passed to the callback.
|
||||
|
||||
Viz3d::setRenderingProperty
|
||||
---------------------------
|
||||
@ -294,18 +294,18 @@ Sets rendering property of a widget.
|
||||
|
||||
.. ocv:function:: void setRenderingProperty(const String &id, int property, double value)
|
||||
|
||||
:param id: Id of the widget.
|
||||
:param property: Property that will be modified.
|
||||
:param value: The new value of the property.
|
||||
|
||||
:param id: Id of the widget.
|
||||
:param property: Property that will be modified.
|
||||
:param value: The new value of the property.
|
||||
|
||||
Viz3d::getRenderingProperty
|
||||
---------------------------
|
||||
Returns rendering property of a widget.
|
||||
|
||||
.. ocv:function:: double getRenderingProperty(const String &id, int property)
|
||||
|
||||
:param id: Id of the widget.
|
||||
:param property: Property.
|
||||
:param id: Id of the widget.
|
||||
:param property: Property.
|
||||
|
||||
Viz3d::setDesiredUpdateRate
|
||||
---------------------------
|
||||
@ -313,8 +313,8 @@ Sets desired update rate of the window.
|
||||
|
||||
.. 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
|
||||
---------------------------
|
||||
Returns desired update rate of the window.
|
||||
@ -345,27 +345,27 @@ Color
|
||||
|
||||
This class a represents BGR color. ::
|
||||
|
||||
class CV_EXPORTS Color : public Scalar
|
||||
{
|
||||
public:
|
||||
Color();
|
||||
Color(double gray);
|
||||
Color(double blue, double green, double red);
|
||||
class CV_EXPORTS Color : public Scalar
|
||||
{
|
||||
public:
|
||||
Color();
|
||||
Color(double gray);
|
||||
Color(double blue, double green, double red);
|
||||
|
||||
Color(const Scalar& color);
|
||||
Color(const Scalar& color);
|
||||
|
||||
static Color black();
|
||||
static Color blue();
|
||||
static Color green();
|
||||
static Color cyan();
|
||||
static Color black();
|
||||
static Color blue();
|
||||
static Color green();
|
||||
static Color cyan();
|
||||
|
||||
static Color red();
|
||||
static Color magenta();
|
||||
static Color yellow();
|
||||
static Color white();
|
||||
static Color red();
|
||||
static Color magenta();
|
||||
static Color yellow();
|
||||
static Color white();
|
||||
|
||||
static Color gray();
|
||||
};
|
||||
static Color gray();
|
||||
};
|
||||
|
||||
Mesh3d
|
||||
------
|
||||
@ -373,27 +373,27 @@ Mesh3d
|
||||
|
||||
This class wraps mesh attributes, and it can load a mesh from a ``ply`` file. ::
|
||||
|
||||
class CV_EXPORTS Mesh3d
|
||||
{
|
||||
public:
|
||||
class CV_EXPORTS Mesh3d
|
||||
{
|
||||
public:
|
||||
|
||||
Mat cloud, colors;
|
||||
Mat polygons;
|
||||
Mat cloud, colors;
|
||||
Mat polygons;
|
||||
|
||||
//! Loads mesh from a given ply file
|
||||
static Mesh3d loadMesh(const String& file);
|
||||
|
||||
private:
|
||||
/* hidden */
|
||||
};
|
||||
|
||||
//! Loads mesh from a given ply file
|
||||
static Mesh3d loadMesh(const String& file);
|
||||
|
||||
private:
|
||||
/* hidden */
|
||||
};
|
||||
|
||||
Mesh3d::loadMesh
|
||||
----------------
|
||||
Loads a mesh from a ``ply`` file.
|
||||
|
||||
.. ocv:function:: static Mesh3d loadMesh(const String& file)
|
||||
|
||||
:param file: File name.
|
||||
:param file: File name.
|
||||
|
||||
|
||||
KeyboardEvent
|
||||
@ -402,30 +402,30 @@ KeyboardEvent
|
||||
|
||||
This class represents a keyboard event. ::
|
||||
|
||||
class CV_EXPORTS KeyboardEvent
|
||||
{
|
||||
public:
|
||||
static const unsigned int Alt = 1;
|
||||
static const unsigned int Ctrl = 2;
|
||||
static const unsigned int Shift = 4;
|
||||
class CV_EXPORTS KeyboardEvent
|
||||
{
|
||||
public:
|
||||
static const unsigned int Alt = 1;
|
||||
static const unsigned int Ctrl = 2;
|
||||
static const unsigned int Shift = 4;
|
||||
|
||||
//! Create a keyboard event
|
||||
//! - 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);
|
||||
//! Create a keyboard event
|
||||
//! - 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);
|
||||
|
||||
bool isAltPressed () const;
|
||||
bool isCtrlPressed () const;
|
||||
bool isShiftPressed () const;
|
||||
bool isAltPressed () const;
|
||||
bool isCtrlPressed () const;
|
||||
bool isShiftPressed () const;
|
||||
|
||||
unsigned char getKeyCode () const;
|
||||
unsigned char getKeyCode () const;
|
||||
|
||||
const String& getKeySym () const;
|
||||
bool keyDown () const;
|
||||
bool keyUp () const;
|
||||
const String& getKeySym () const;
|
||||
bool keyDown () const;
|
||||
bool keyUp () const;
|
||||
|
||||
protected:
|
||||
/* hidden */
|
||||
};
|
||||
protected:
|
||||
/* hidden */
|
||||
};
|
||||
|
||||
KeyboardEvent::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)
|
||||
|
||||
:param action: If true, key is pressed. If false, key is released.
|
||||
:param key_sym: Name of the key.
|
||||
:param key: Code of the key.
|
||||
:param alt: If true, ``alt`` is pressed.
|
||||
:param ctrl: If true, ``ctrl`` is pressed.
|
||||
:param shift: If true, ``shift`` is pressed.
|
||||
|
||||
:param action: If true, key is pressed. If false, key is released.
|
||||
:param key_sym: Name of the key.
|
||||
:param key: Code of the key.
|
||||
:param alt: If true, ``alt`` is pressed.
|
||||
:param ctrl: If true, ``ctrl`` is pressed.
|
||||
:param shift: If true, ``shift`` is pressed.
|
||||
|
||||
MouseEvent
|
||||
----------
|
||||
.. ocv:class:: MouseEvent
|
||||
|
||||
This class represents a mouse event. ::
|
||||
|
||||
class CV_EXPORTS MouseEvent
|
||||
{
|
||||
public:
|
||||
enum Type { MouseMove = 1, MouseButtonPress, MouseButtonRelease, MouseScrollDown, MouseScrollUp, MouseDblClick } ;
|
||||
enum MouseButton { NoButton = 0, LeftButton, MiddleButton, RightButton, VScroll } ;
|
||||
class CV_EXPORTS MouseEvent
|
||||
{
|
||||
public:
|
||||
enum Type { MouseMove = 1, MouseButtonPress, MouseButtonRelease, MouseScrollDown, MouseScrollUp, MouseDblClick } ;
|
||||
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;
|
||||
MouseButton button;
|
||||
Point pointer;
|
||||
unsigned int key_state;
|
||||
};
|
||||
|
||||
Type type;
|
||||
MouseButton button;
|
||||
Point pointer;
|
||||
unsigned int key_state;
|
||||
};
|
||||
|
||||
MouseEvent::MouseEvent
|
||||
----------------------
|
||||
Constructs a MouseEvent.
|
||||
|
||||
.. 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 button: Mouse button. This can be **NoButton**, **LeftButton**, **MiddleButton**, **RightButton**, **VScroll**.
|
||||
:param p: Position of the event.
|
||||
:param alt: If true, ``alt`` is pressed.
|
||||
:param ctrl: If true, ``ctrl`` is pressed.
|
||||
:param shift: If true, ``shift`` is pressed.
|
||||
|
||||
: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 p: Position of the event.
|
||||
:param alt: If true, ``alt`` is pressed.
|
||||
:param ctrl: If true, ``ctrl`` is pressed.
|
||||
:param shift: If true, ``shift`` is pressed.
|
||||
|
||||
Camera
|
||||
------
|
||||
.. ocv:class:: Camera
|
||||
@ -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
|
||||
``projection matrix``. ::
|
||||
|
||||
class CV_EXPORTS Camera
|
||||
{
|
||||
public:
|
||||
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 cv::Matx33f &K, const Size &window_size);
|
||||
Camera(const cv::Matx44f &proj, const Size &window_size);
|
||||
|
||||
inline const Vec2d & getClip() const { return clip_; }
|
||||
inline void setClip(const Vec2d &clip) { clip_ = clip; }
|
||||
|
||||
inline const Size & getWindowSize() const { return window_size_; }
|
||||
void setWindowSize(const Size &window_size);
|
||||
|
||||
inline const Vec2f & getFov() const { return fov_; }
|
||||
inline void setFov(const Vec2f & fov) { fov_ = fov; }
|
||||
|
||||
inline const Vec2f & getPrincipalPoint() const { return principal_point_; }
|
||||
inline const Vec2f & getFocalLength() const { return focal_; }
|
||||
|
||||
void computeProjectionMatrix(Matx44f &proj) const;
|
||||
|
||||
static Camera KinectCamera(const Size &window_size);
|
||||
|
||||
private:
|
||||
/* hidden */
|
||||
};
|
||||
class CV_EXPORTS Camera
|
||||
{
|
||||
public:
|
||||
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 cv::Matx33f &K, const Size &window_size);
|
||||
Camera(const cv::Matx44f &proj, const Size &window_size);
|
||||
|
||||
inline const Vec2d & getClip() const { return clip_; }
|
||||
inline void setClip(const Vec2d &clip) { clip_ = clip; }
|
||||
|
||||
inline const Size & getWindowSize() const { return window_size_; }
|
||||
void setWindowSize(const Size &window_size);
|
||||
|
||||
inline const Vec2f & getFov() const { return fov_; }
|
||||
inline void setFov(const Vec2f & fov) { fov_ = fov; }
|
||||
|
||||
inline const Vec2f & getPrincipalPoint() const { return principal_point_; }
|
||||
inline const Vec2f & getFocalLength() const { return focal_; }
|
||||
|
||||
void computeProjectionMatrix(Matx44f &proj) const;
|
||||
|
||||
static Camera KinectCamera(const Size &window_size);
|
||||
|
||||
private:
|
||||
/* hidden */
|
||||
};
|
||||
|
||||
Camera::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)
|
||||
|
||||
:param f_x: Horizontal focal length.
|
||||
:param f_y: Vertical focal length.
|
||||
:param c_x: x 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 f_x: Horizontal focal length.
|
||||
:param f_y: Vertical focal length.
|
||||
:param c_x: x 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.
|
||||
|
||||
.. ocv:function:: Camera(const Vec2f &fov, const Size &window_size)
|
||||
|
||||
:param fov: Field of view (horizontal, vertical)
|
||||
:param window_size: Size of the window.
|
||||
:param fov: Field of view (horizontal, vertical)
|
||||
: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)
|
||||
|
||||
: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 K: Intrinsic matrix of the camera.
|
||||
: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)
|
||||
|
||||
: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 proj: Projection matrix of the camera.
|
||||
:param window_size: Size of the window. This together with projection matrix determines the field of view.
|
||||
|
||||
Camera::computeProjectionMatrix
|
||||
-------------------------------
|
||||
@ -544,13 +544,13 @@ Computes projection matrix using intrinsic parameters of the camera.
|
||||
|
||||
.. ocv:function:: void computeProjectionMatrix(Matx44f &proj) const
|
||||
|
||||
:param proj: Output projection matrix.
|
||||
|
||||
:param proj: Output projection matrix.
|
||||
|
||||
Camera::KinectCamera
|
||||
--------------------
|
||||
Creates a Kinect Camera.
|
||||
|
||||
.. 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.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user