Visual Servoing Platform  version 3.5.1 under development (2023-09-22)

#include <visp3/core/vpConvert.h>

Static Public Member Functions

static void convertFromOpenCV (const cv::KeyPoint &from, vpImagePoint &to)
 
static void convertFromOpenCV (const cv::Point2f &from, vpImagePoint &to)
 
static void convertFromOpenCV (const cv::Point2d &from, vpImagePoint &to)
 
static void convertFromOpenCV (const cv::Point3f &from, vpPoint &to, bool cameraFrame=false)
 
static void convertFromOpenCV (const cv::Point3d &from, vpPoint &to, bool cameraFrame=false)
 
static void convertFromOpenCV (const std::vector< cv::KeyPoint > &from, std::vector< vpImagePoint > &to)
 
static void convertFromOpenCV (const std::vector< cv::Point2f > &from, std::vector< vpImagePoint > &to)
 
static void convertFromOpenCV (const std::vector< cv::Point2d > &from, std::vector< vpImagePoint > &to)
 
static void convertFromOpenCV (const std::vector< cv::Point3f > &from, std::vector< vpPoint > &to, bool cameraFrame=false)
 
static void convertFromOpenCV (const std::vector< cv::Point3d > &from, std::vector< vpPoint > &to, bool cameraFrame=false)
 
static void convertFromOpenCV (const std::vector< cv::DMatch > &from, std::vector< unsigned int > &to)
 
static void convertToOpenCV (const vpImagePoint &from, cv::Point2f &to)
 
static void convertToOpenCV (const vpImagePoint &from, cv::Point2d &to)
 
static void convertToOpenCV (const vpPoint &from, cv::Point3f &to, bool cameraFrame=false)
 
static void convertToOpenCV (const vpPoint &from, cv::Point3d &to, bool cameraFrame=false)
 
static void convertToOpenCV (const std::vector< vpImagePoint > &from, std::vector< cv::Point2f > &to)
 
static void convertToOpenCV (const std::vector< vpImagePoint > &from, std::vector< cv::Point2d > &to)
 
static void convertToOpenCV (const std::vector< vpPoint > &from, std::vector< cv::Point3f > &to, bool cameraFrame=false)
 
static void convertToOpenCV (const std::vector< vpPoint > &from, std::vector< cv::Point3d > &to, bool cameraFrame=false)
 

Detailed Description

Bridges over other frameworks like OpenCV.

Definition at line 55 of file vpConvert.h.

Member Function Documentation

◆ convertFromOpenCV() [1/11]

void vpConvert::convertFromOpenCV ( const cv::KeyPoint &  from,
vpImagePoint to 
)
static

Convert a cv::KeyPoint to a vpImagePoint.

Parameters
from: cv::KeyPoint to convert.
to: vpImagePoint converted.
Examples
testConvert.cpp.

Definition at line 224 of file vpConvert.cpp.

Referenced by vpKeyPoint::buildReference(), vpKeyPoint::getObjectPoints(), vpKeyPoint::getQueryKeyPoints(), vpKeyPoint::loadLearningData(), and vpKeyPoint::matchPoint().

◆ convertFromOpenCV() [2/11]

void vpConvert::convertFromOpenCV ( const cv::Point2d &  from,
vpImagePoint to 
)
static

Convert a cv::Point2d to a vpImagePoint.

Parameters
from: cv::Point2d to convert.
to: vpImagePoint converted.

Definition at line 238 of file vpConvert.cpp.

◆ convertFromOpenCV() [3/11]

void vpConvert::convertFromOpenCV ( const cv::Point2f &  from,
vpImagePoint to 
)
static

Convert a cv::Point2f to a vpImagePoint.

Parameters
from: cv::Point2f to convert.
to: vpImagePoint converted.

Definition at line 231 of file vpConvert.cpp.

◆ convertFromOpenCV() [4/11]

void vpConvert::convertFromOpenCV ( const cv::Point3d &  from,
vpPoint to,
bool  cameraFrame = false 
)
static

Convert a cv::Point3d to a vpPoint.

Parameters
from: cv::Point3d to convert.
to: vpPoint converted.
cameraFrame: If true, convert into the camera frame, otherwise in the object frame.

Definition at line 263 of file vpConvert.cpp.

◆ convertFromOpenCV() [5/11]

void vpConvert::convertFromOpenCV ( const cv::Point3f &  from,
vpPoint to,
bool  cameraFrame = false 
)
static

Convert a cv::Point3f to a vpPoint.

Parameters
from: cv::Point3f to convert.
to: vpPoint converted.
cameraFrame: If true, convert into the camera frame, otherwise in the object frame.

Definition at line 247 of file vpConvert.cpp.

◆ convertFromOpenCV() [6/11]

void vpConvert::convertFromOpenCV ( const std::vector< cv::DMatch > &  from,
std::vector< unsigned int > &  to 
)
static

Convert a vector of cv::DMatch to a vector of unsigned int (for a query index 0, to[0] ==> train index).

Warning
The list of query indexes in DMatch must be ordered in a way that from[i].queryIdx == i.
Parameters
from: Vector of cv::DMatch to convert.
to: Vector of unsigned int converted.

Definition at line 349 of file vpConvert.cpp.

◆ convertFromOpenCV() [7/11]

void vpConvert::convertFromOpenCV ( const std::vector< cv::KeyPoint > &  from,
std::vector< vpImagePoint > &  to 
)
static

Convert a vector of cv::KeyPoint to a vector of vpImagePoint.

Parameters
from: Vector of cv::KeyPoint to convert.
to: Vector of vpImagePoint converted.

Definition at line 277 of file vpConvert.cpp.

◆ convertFromOpenCV() [8/11]

void vpConvert::convertFromOpenCV ( const std::vector< cv::Point2d > &  from,
std::vector< vpImagePoint > &  to 
)
static

Convert a vector of cv::Point2d to a vector of vpImagePoint.

Parameters
from: Vector of cv::Point2d to convert.
to: Vector of vpImagePoint converted.

Definition at line 299 of file vpConvert.cpp.

◆ convertFromOpenCV() [9/11]

void vpConvert::convertFromOpenCV ( const std::vector< cv::Point2f > &  from,
std::vector< vpImagePoint > &  to 
)
static

Convert a vector of cv::Point2f to a vector of vpImagePoint.

Parameters
from: Vector of cv::Point2f to convert.
to: Vector of vpImagePoint converted.

Definition at line 288 of file vpConvert.cpp.

◆ convertFromOpenCV() [10/11]

void vpConvert::convertFromOpenCV ( const std::vector< cv::Point3d > &  from,
std::vector< vpPoint > &  to,
bool  cameraFrame = false 
)
static

Convert a vector of cv::Point3d to a vector of vpPoint.

Parameters
from: Vector of cv::Point3d to convert.
to: Vector of vpPoint converted.
cameraFrame: If true, convert into the camera frame, otherwise in the object frame.

Definition at line 329 of file vpConvert.cpp.

◆ convertFromOpenCV() [11/11]

void vpConvert::convertFromOpenCV ( const std::vector< cv::Point3f > &  from,
std::vector< vpPoint > &  to,
bool  cameraFrame = false 
)
static

Convert a vector of cv::Point3f to a vector of vpPoint.

Parameters
from: Vector of cv::Point3f to convert.
to: Vector of vpPoint converted.
cameraFrame: If true, convert into the camera frame, otherwise in the object frame.

Definition at line 312 of file vpConvert.cpp.

◆ convertToOpenCV() [1/8]

void vpConvert::convertToOpenCV ( const std::vector< vpImagePoint > &  from,
std::vector< cv::Point2d > &  to 
)
static

Convert a vector of vpImagePoint to a vector of cv::Point2d.

Parameters
from: Vector of vpImagePoint to convert.
to: Vector of cv::Point2d converted.

Definition at line 417 of file vpConvert.cpp.

◆ convertToOpenCV() [2/8]

void vpConvert::convertToOpenCV ( const std::vector< vpImagePoint > &  from,
std::vector< cv::Point2f > &  to 
)
static

Convert a vector of vpImagePoint to a vector of cv::Point2f.

Parameters
from: Vector of vpImagePoint to convert.
to: Vector of cv::Point2f converted.

Definition at line 406 of file vpConvert.cpp.

◆ convertToOpenCV() [3/8]

void vpConvert::convertToOpenCV ( const std::vector< vpPoint > &  from,
std::vector< cv::Point3d > &  to,
bool  cameraFrame = false 
)
static

Convert a vector of vpPoint to a vector of cv::Point3d.

Parameters
from: Vector of vpPoint to convert.
to: Vector of cv::Point3d converted.
cameraFrame: If true, the camera frame is considered, otherwise the object frame.

Definition at line 447 of file vpConvert.cpp.

◆ convertToOpenCV() [4/8]

void vpConvert::convertToOpenCV ( const std::vector< vpPoint > &  from,
std::vector< cv::Point3f > &  to,
bool  cameraFrame = false 
)
static

Convert a vector of vpPoint to a vector of cv::Point3f.

Parameters
from: Vector of vpPoint to convert.
to: Vector of cv::Point3f converted.
cameraFrame: If true, the camera frame is considered, otherwise the object frame.

Definition at line 430 of file vpConvert.cpp.

◆ convertToOpenCV() [5/8]

void vpConvert::convertToOpenCV ( const vpImagePoint from,
cv::Point2d &  to 
)
static

Convert a vpImagePoint to a cv::Point2d.

Parameters
from: vpImagePoint to convert.
to: cv::Point2d converted.

Definition at line 367 of file vpConvert.cpp.

◆ convertToOpenCV() [6/8]

void vpConvert::convertToOpenCV ( const vpImagePoint from,
cv::Point2f &  to 
)
static

Convert a vpImagePoint to a cv::Point2f.

Parameters
from: vpImagePoint to convert.
to: cv::Point2f converted.
Examples
testConvert.cpp.

Definition at line 360 of file vpConvert.cpp.

◆ convertToOpenCV() [7/8]

void vpConvert::convertToOpenCV ( const vpPoint from,
cv::Point3d &  to,
bool  cameraFrame = false 
)
static

Convert a vpPoint to a cv::Point3d.

Parameters
from: vpPoint to convert.
to: cv::Point3d converted.
cameraFrame: If true, convert from coordinates in the camera frame, otherwise in the object frame.

Definition at line 392 of file vpConvert.cpp.

◆ convertToOpenCV() [8/8]

void vpConvert::convertToOpenCV ( const vpPoint from,
cv::Point3f &  to,
bool  cameraFrame = false 
)
static

Convert a vpPoint to a cv::Point3f.

Parameters
from: vpPoint to convert.
to: cv::Point3f converted.
cameraFrame: If true, convert from coordinates in the camera frame, otherwise in the object frame.

Definition at line 376 of file vpConvert.cpp.