![]() |
Visual Servoing Platform version 3.7.0
|
Namespaces | |
| namespace | visp::cnpy |
Classes | |
| class | vpConvert |
Functions | |
| template<typename MaskType> | |
| static std::enable_if< std::is_same< MaskType, unsignedchar >::value||std::is_same< MaskType, bool >::value, int >::type | vpImageConvert::depthToPointCloud (const vpImage< uint16_t > &depth_raw, float depth_scale, const vpCameraParameters &cam_depth, pcl::PointCloud< pcl::PointXYZ >::Ptr pointcloud, std::mutex *pointcloud_mutex=nullptr, const vpImage< MaskType > *depth_mask=nullptr, float Z_min=0.2, float Z_max=2.5) |
| template<typename MaskType> | |
| static std::enable_if< std::is_same< MaskType, unsignedchar >::value||std::is_same< MaskType, bool >::value, int >::type | vpImageConvert::depthToPointCloud (const vpImage< vpRGBa > &color, const vpImage< uint16_t > &depth_raw, float depth_scale, const vpCameraParameters &cam_depth, pcl::PointCloud< pcl::PointXYZRGB >::Ptr pointcloud, std::mutex *pointcloud_mutex=nullptr, const vpImage< MaskType > *depth_mask=nullptr, float Z_min=0.2, float Z_max=2.5) |
| static void | vpImageConvert::convert (const cv::Mat &src, vpImage< vpRGBa > &dest, bool flip=false) |
| static void | vpImageConvert::convert (const cv::Mat &src, vpImage< unsigned char > &dest, bool flip=false, unsigned int nThreads=0) |
| static void | vpImageConvert::convert (const cv::Mat &src, vpImage< float > &dest, bool flip=false) |
| static void | vpImageConvert::convert (const cv::Mat &src, vpImage< double > &dest, bool flip=false) |
| static void | vpImageConvert::convert (const cv::Mat &src, vpImage< uint16_t > &dest, bool flip=false) |
| static void | vpImageConvert::convert (const cv::Mat &src, vpImage< vpRGBf > &dest, bool flip=false) |
| static void | vpImageConvert::convert (const vpImage< vpRGBa > &src, cv::Mat &dest) |
| static void | vpImageConvert::convert (const vpImage< unsigned char > &src, cv::Mat &dest, bool copyData=true) |
| static void | vpImageConvert::convert (const vpImage< float > &src, cv::Mat &dest, bool copyData=true) |
| static void | vpImageConvert::convert (const vpImage< double > &src, cv::Mat &dest, bool copyData=true) |
| static void | vpImageConvert::convert (const vpImage< vpRGBf > &src, cv::Mat &dest) |
Conversion from/to OpenCV, NPY/NPZ, PCL ...
|
static |
Converts cv::Mat CV_32FC1 format to ViSP vpImage<double>.
| [in] | src | : OpenCV image in CV_32FC1 format. |
| [out] | dest | : ViSP image in double format. |
| [in] | flip | : When true during conversion flip image vertically. |
Definition at line 339 of file vpImageConvert_opencv.cpp.
References convert().
|
static |
Converts cv::Mat CV_32FC1 / CV_16SC1 format to ViSP vpImage<float>.
| [in] | src | : OpenCV image in CV_32FC1 / CV_16SC1 format. |
| [out] | dest | : ViSP image in float format. |
| [in] | flip | : When true during conversion flip image vertically. |
Definition at line 296 of file vpImageConvert_opencv.cpp.
References vpException::badValue.
|
static |
Converts cv::Mat CV_16UC1 format to ViSP vpImage<uint16_t>.
| [in] | src | : OpenCV image in CV_16UC1 format. |
| [out] | dest | : ViSP image in uint16_t format. |
| [in] | flip | : When true during conversion flip image vertically. |
Definition at line 361 of file vpImageConvert_opencv.cpp.
References vpException::fatalError.
|
static |
Convert a cv::Mat to a vpImage<unsigned char>.
A cv::Mat is an OpenCV image class.
| [in] | src | : Source image in OpenCV format. |
| [out] | dest | : Destination image in ViSP format. |
| [in] | flip | : Set to true to vertically flip the converted image. |
| [in] | nThreads | : number of threads to use if OpenMP is available. If 0 is passed, OpenMP will choose the number of threads. |
Definition at line 216 of file vpImageConvert_opencv.cpp.
References BGRaToGrey(), and BGRToGrey().
|
static |
Convert a cv::Mat to a vpImage<vpRGBa>.
A cv::Mat is an OpenCV image class.
If the input image is of type CV_8UC1 or CV_8UC3, the alpha channel is set to vpRGBa::alpha_default, or 0 in certain case (see the warning below).
| [in] | src | : Source image in OpenCV format. |
| [out] | dest | : Destination image in ViSP format. |
| [in] | flip | : Set to true to vertically flip the converted image. |
Definition at line 94 of file vpImageConvert_opencv.cpp.
References vpRGBa::A, vpRGBa::alpha_default, vpRGBa::B, vpRGBa::G, and vpRGBa::R.
|
static |
Converts cv::Mat CV_32FC3 format to ViSP vpImage<vpRGBf>.
| [in] | src | : OpenCV image in CV_32FC3 format. |
| [out] | dest | : ViSP image in vpRGBf format. |
| [in] | flip | : When true during conversion flip image vertically. |
Definition at line 397 of file vpImageConvert_opencv.cpp.
References vpRGBf::B, vpException::badValue, vpRGBf::G, and vpRGBf::R.
|
static |
Convert a float-64 ViSP image into a cv::Mat(CV_32FC1).
| [in] | src | A float-64 ViSP image. |
| [in] | dest | A cv::Mat(CV_32FC1). |
| [in] | copyData | If true, the image is copied and modification in one object will not modified the other. |
Definition at line 558 of file vpImageConvert_opencv.cpp.
References convert(), vpImage< Type >::getCols(), and vpImage< Type >::getRows().
|
static |
Convert a float-32 ViSP image into a cv::Mat(CV_32FC1).
| [in] | src | A float-32 ViSP image. |
| [in] | dest | A cv::Mat(CV_32FC1). |
| [in] | copyData | If true, the image is copied and modification in one object will not modified the other. |
Definition at line 538 of file vpImageConvert_opencv.cpp.
References vpImage< Type >::bitmap, vpImage< Type >::getCols(), and vpImage< Type >::getRows().
|
static |
Convert a vpImage<unsigned char> to a cv::Mat grey level image.
A cv::Mat is an OpenCV image class. See http://opencv.willowgarage.com for the general OpenCV documentation, or http://opencv.willowgarage.com/documentation/cpp/core_basic_structures.html for the specific Mat structure documentation.
| [in] | src | : Source image. |
| [out] | dest | : Destination image. |
| [in] | copyData | : If true, the image is copied and modification in one object will not modified the other. |
Definition at line 518 of file vpImageConvert_opencv.cpp.
References vpImage< Type >::bitmap, vpImage< Type >::getCols(), and vpImage< Type >::getRows().
Convert a vpImage<vpRGBa> to a cv::Mat color image.
A cv::Mat is an OpenCV image class. See http://opencv.willowgarage.com for the general OpenCV documentation, or http://opencv.willowgarage.com/documentation/cpp/core_basic_structures.html for the specific Mat structure documentation.
| [in] | src | : Source image (vpRGBa format). |
| [out] | dest | : Destination image (BGR format). |
Definition at line 468 of file vpImageConvert_opencv.cpp.
References vpImage< Type >::bitmap, vpImage< Type >::getCols(), and vpImage< Type >::getRows().
Convert a vpRGBf ViSP image into a cv::Mat(CV_32FC3) that uses BGR format.
| [in] | src | A vpRGBf ViSP image. |
| [in] | dest | A cv::Mat(CV_32FC3) that uses BGR format. |
Definition at line 578 of file vpImageConvert_opencv.cpp.
References vpImage< Type >::bitmap, vpImage< Type >::getCols(), and vpImage< Type >::getRows().
|
inlinestatic |
Convert a raw depth image into a pcl::PointCloud that has no texture.
| [in] | depth_raw | Raw depth image. |
| [in] | depth_scale | Depth scale to convert the raw depth image into meters. |
| [in] | cam_depth | The depth camera parameters. |
| [out] | pointcloud | A pointer towards the pcl::PointCloud that has no texture. |
| [in] | pointcloud_mutex | Optional, if set a pointer towards the mutex that protects the point cloud. |
| [in] | depth_mask | Optional, if set a pointer towards a binary image that indicates if the point must be considered or not. (Either true or a value different from 0 to keep the point, false or 0 to discard it). |
| [in] | Z_min | The minimum depth to keep the point. |
| [in] | Z_max | The maximum depth to keep the point. |
Definition at line 216 of file vpImageConvert.h.
References vpImage< Type >::bitmap, vpPixelMeterConversion::convertPoint(), vpImage< Type >::getHeight(), vpImage< Type >::getSize(), vpImage< Type >::getWidth(), and vpImageException::notInitializedError.
|
inlinestatic |
Convert a raw depth image in a textured pcl::PointCloud using a vpImage<RGBa> that is aligned with the raw depth image to get the texture.
| [in] | color | The color image that gives the texture of the points. |
| [in] | depth_raw | Raw depth image. |
| [in] | depth_scale | Depth scale to convert the raw depth image into meters. |
| [in] | cam_depth | The depth camera parameters. |
| [out] | pointcloud | A pointer towards the pcl::PointCloud that has no texture. |
| [in] | pointcloud_mutex | Optional, if set a pointer towards the mutex that protects the point cloud. |
| [in] | depth_mask | Optional, if set a pointer towards a binary image that indicates if the point must be considered or not. (Either true or a value different from 0 to keep the point, false or 0 to discard it). |
| [in] | Z_min | The minimum depth to keep the point. |
| [in] | Z_max | The maximum depth to keep the point. |
Definition at line 330 of file vpImageConvert.h.
References vpImage< Type >::bitmap, vpPixelMeterConversion::convertPoint(), vpImage< Type >::getHeight(), vpImage< Type >::getSize(), vpImage< Type >::getWidth(), and vpImageException::notInitializedError.