Classes | Typedefs | Functions

ntk Namespace Reference

Classes

class  RGBDCalibration
class  RGBDImage
class  RGBDProcessor
class  KinectProcessor
class  NiteProcessor
class  EulerAngles
class  Pose3D
class  Face
class  Mesh
class  MeshGenerator
class  Ptr
class  exception
class  Rect3_

Typedefs

typedef Rect3_< float > Rect3f

Functions

void compute_color_encoded_depth (const cv::Mat1f &depth_im, cv::Mat3b &color_depth_im, double *i_min_val, double *i_max_val)
template<typename CvScalarType , typename EScalarType >
void toEigen (const cv::Point3_< CvScalarType > &p, Eigen::Matrix< EScalarType, 3, 1 > &ep)
template<typename CvScalarType , typename EScalarType >
void toEigen (const cv::Vec< CvScalarType, 3 > &p, Eigen::Matrix< EScalarType, 3, 1 > &ep)
template<typename CvScalarType , typename EScalarType >
void toEigen (const cv::Vec< CvScalarType, 3 > &p, Eigen::Matrix< EScalarType, 4, 1 > &ep)
template<typename CvScalarType , typename EScalarType >
void toEigen (const cv::Point3_< CvScalarType > &p, Eigen::Matrix< EScalarType, 4, 1 > &ep)
template<typename CvScalarType , typename EigenScalarType , int H, int W>
void toOpencv (const Eigen::Matrix< EigenScalarType, H, W > &ep, cv::Mat_< CvScalarType > &mat)
template<typename CvScalarType , typename EScalarType , int H, int W>
void toEigen (const cv::Mat_< CvScalarType > &mat, Eigen::Matrix< EScalarType, H, W > &ep)
template<typename EScalarType >
cv::Vec3f toVec3f (const Eigen::Matrix< EScalarType, 3, 1 > &v)
template<typename EScalarType >
cv::Vec3f toVec3f (const Eigen::Matrix< EScalarType, 4, 1 > &v)
Eigen::Vector2d toEigenVector2d (const cv::Point2f &v)
Eigen::Vector3d toEigenVector3d (const cv::Vec3f &v)
Eigen::Vector4d toEigenVector4d (const cv::Vec3f &v)
Vec3f getP3D (const Mat1f &depth_yml, const Pose3D &pose, int r, int c)
Vec3f estimate_normal_from_depth (const Mat1f &depth_yml, const Pose3D &pose, int r, int c)
Vec3f camera_eye_vector (const Pose3D &pose, int r, int c)
cv::Vec3f compute_axis_angle_rotation (const cv::Vec3f &src, const cv::Vec3f &dst)
cv::Vec3f estimate_normal_from_depth (const cv::Mat1f &depth_yml, const Pose3D &pose, int r, int c)
template<typename _Tp , typename _Up >
Ptr< _Tp > dynamic_Ptr_cast (const Ptr< _Up > &ptr)
template<class T >
ntk::Ptr< T > toPtr (T *ptr)
cv::Mat4b toMat4b (const cv::Mat3b &im)
cv::Mat3b toMat3b (const cv::Mat4b &im)
void apply_mask (cv::Mat1b &im, const cv::Mat1b &mask)
void apply_mask (cv::Mat3b &im, const cv::Mat1b &mask)
void apply_mask (cv::Mat1f &im, const cv::Mat1b &mask)
void read_from_yaml (cv::FileNode node, bool &b)
void write_to_yaml (cv::FileStorage &output_file, const std::string &name, bool b)
void read_from_yaml (cv::FileNode node, int &i)
void write_to_yaml (cv::FileStorage &output_file, const std::string &name, int i)
void read_from_yaml (cv::FileNode node, double &b)
void write_to_yaml (cv::FileStorage &output_file, const std::string &name, double b)
void write_to_yaml (FileStorage &output_file, const std::string &name, const cv::Rect &r)
void read_from_yaml (FileNode node, cv::Rect &r)
void write_to_yaml (FileStorage &output_file, const std::string &name, const cv::Vec3f &v)
void write_to_yaml (FileStorage &output_file, const std::string &name, const cv::Vec2f &v)
void read_from_yaml (FileNode node, cv::Vec3f &v)
void read_from_yaml (FileNode node, cv::Vec2f &v)
void write_to_yaml (cv::FileStorage &output_file, const std::string &name, const cv::Mat &matrix)
void read_from_yaml (cv::FileNode node, cv::Mat &matrix)
void writeMatrix (FileStorage &output_file, const std::string &name, const cv::Mat &matrix)
void readMatrix (FileStorage &input_file, const std::string &name, cv::Mat &matrix)
void imwrite_yml (const std::string &filename, const cv::Mat &image)
cv::Mat1f imread_Mat1f_raw (const std::string &filename)
void imwrite_Mat1f_raw (const std::string &filename, const cv::Mat1f &m)
cv::Mat imread_yml (const std::string &filename)
cv::Mat3b toMat3b (const cv::Mat1b &image)
cv::Mat1b normalize_toMat1b (const cv::Mat1f &image)
void imwrite_normalized (const std::string &filename, const cv::Mat1f &image)
void imshow_normalized (const std::string &window_name, const cv::Mat1f &image)
double overlap_ratio (const cv::Rect_< float > &r1, const cv::Rect_< float > &r2)
void adjustRectToImage (cv::Rect &rect, const cv::Size &image_size)
ntk::Rect3f bounding_box (const std::vector< cv::Point3f > &points)
cv::Point2f box_center (const cv::Rect_< float > &bbox)
template<class ScalarType >
cv::Vec3d toVec3d (const cv::Mat_< ScalarType > &m)
template<class ScalarType >
cv::Vec2f toVec2f (const cv::Mat_< ScalarType > &m)
template<class ScalarType1 , class ScalarType2 >
void copyMatWithCast (cv::Mat_< ScalarType1 > &dest, const cv::Mat_< ScalarType2 > &src)
void read_from_yaml (cv::FileNode node, cv::Vec3f &v)
void write_to_yaml (cv::FileStorage &output_file, const std::string &name, const cv::Vec3f &v)
void read_from_yaml (cv::FileNode node, cv::Rect &v)
void write_to_yaml (cv::FileStorage &output_file, const std::string &name, const cv::Rect &v)
void writeMatrix (cv::FileStorage &output_file, const std::string &name, const cv::Mat &matrix)
void readMatrix (cv::FileStorage &input_file, const std::string &name, cv::Mat &matrix)
cv::Mat getCvByteImage (int width, int height)
cv::Mat getCvFloatImage (int width, int height)
cv::Mat getCvColorByteImage (int width, int height)
cv::Mat getCvColorFloatImage (int width, int height)
bool is_yx_in_range (const cv::Mat &image, int y, int x)
void normalize (cv::Vec3f &v)
cv::Vec3b bgr_to_rgb (const cv::Vec3b &v)

Detailed Description

This file is part of the nestk library.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Author: Nicolas Burrus <nicolas.burrus@uc3m.es>, (C) 2010 Author: Jorge Garcia Bueno <jgarcia@ing.uc3m.es>, (C) 2010

This file is part of the nestk library.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Author: Nicolas Burrus <nicolas.burrus@uc3m.es>, (C) 2010


Typedef Documentation

typedef Rect3_<float> ntk::Rect3f

Function Documentation

void ntk::adjustRectToImage ( cv::Rect &  rect,
const cv::Size &  image_size 
)
void ntk::apply_mask ( cv::Mat3b &  im,
const cv::Mat1b &  mask 
)
void ntk::apply_mask ( cv::Mat1b &  im,
const cv::Mat1b &  mask 
)
void ntk::apply_mask ( cv::Mat1f &  im,
const cv::Mat1b &  mask 
)
cv::Vec3b ntk::bgr_to_rgb ( const cv::Vec3b &  v  )  [inline]
ntk::Rect3f ntk::bounding_box ( const std::vector< cv::Point3f > &  points  ) 
cv::Point2f ntk::box_center ( const cv::Rect_< float > &  bbox  )  [inline]
cv::Vec3f ntk::camera_eye_vector ( const Pose3D &  pose,
int  r,
int  c 
)

Estimate the line of sight for the given pixel.

cv::Vec3f ntk::compute_axis_angle_rotation ( const cv::Vec3f &  src,
const cv::Vec3f &  dst 
)

Return the angle axis rotation (using Rodrigues representation) transforming vector src into vector dst.

void ntk::compute_color_encoded_depth ( const cv::Mat1f &  depth,
cv::Mat3b &  color_dept,
double *  min_val = 0,
double *  max_val = 0 
)

Compute a false color image from a depth map. Optional min/max values can be provided to force the value range.

template<class ScalarType1 , class ScalarType2 >
void ntk::copyMatWithCast ( cv::Mat_< ScalarType1 > &  dest,
const cv::Mat_< ScalarType2 > &  src 
)
template<typename _Tp , typename _Up >
Ptr<_Tp> ntk::dynamic_Ptr_cast ( const Ptr< _Up > &  ptr  )  [inline]
cv::Vec3f ntk::estimate_normal_from_depth ( const cv::Mat1f &  depth_yml,
const Pose3D &  pose,
int  r,
int  c 
)

Estimate a normal vector from neighborhood depth measurements.

Vec3f ntk::estimate_normal_from_depth ( const Mat1f &  depth_yml,
const Pose3D &  pose,
int  r,
int  c 
)
cv::Mat ntk::getCvByteImage ( int  width,
int  height 
) [inline]
cv::Mat ntk::getCvColorByteImage ( int  width,
int  height 
) [inline]
cv::Mat ntk::getCvColorFloatImage ( int  width,
int  height 
) [inline]
cv::Mat ntk::getCvFloatImage ( int  width,
int  height 
) [inline]
Vec3f ntk::getP3D ( const Mat1f &  depth_yml,
const Pose3D &  pose,
int  r,
int  c 
) [inline]
cv::Mat1f ntk::imread_Mat1f_raw ( const std::string filename  ) 

Read a float image from raw binary file. Only works for Little Endian platforms.

cv::Mat ntk::imread_yml ( const std::string filename  ) 
void ntk::imshow_normalized ( const std::string window_name,
const cv::Mat1f &  image 
)
void ntk::imwrite_Mat1f_raw ( const std::string filename,
const cv::Mat1f &  m 
)

Write a float image to binary file. Only works for Little Endian platforms.

void ntk::imwrite_normalized ( const std::string filename,
const cv::Mat1f &  image 
)
void ntk::imwrite_yml ( const std::string filename,
const cv::Mat &  image 
)
bool ntk::is_yx_in_range ( const cv::Mat &  image,
int  y,
int  x 
) [inline]
void ntk::normalize ( cv::Vec3f &  v  )  [inline]
cv::Mat1b ntk::normalize_toMat1b ( const cv::Mat1f &  image  ) 
double ntk::overlap_ratio ( const cv::Rect_< float > &  r1,
const cv::Rect_< float > &  r2 
)
void ntk::read_from_yaml ( FileNode  node,
cv::Rect &  r 
)
void ntk::read_from_yaml ( FileNode  node,
cv::Vec3f &  v 
)
void ntk::read_from_yaml ( FileNode  node,
cv::Vec2f &  v 
)
void ntk::read_from_yaml ( cv::FileNode  node,
cv::Mat &  matrix 
)
void ntk::read_from_yaml ( cv::FileNode  node,
bool &  b 
)
void ntk::read_from_yaml ( cv::FileNode  node,
int &  i 
)
void ntk::read_from_yaml ( cv::FileNode  node,
double &  b 
)
void ntk::read_from_yaml ( cv::FileNode  node,
cv::Vec3f &  v 
)
void ntk::read_from_yaml ( cv::FileNode  node,
cv::Rect &  v 
)
void ntk::readMatrix ( FileStorage &  input_file,
const std::string name,
cv::Mat &  matrix 
)
void ntk::readMatrix ( cv::FileStorage &  input_file,
const std::string name,
cv::Mat &  matrix 
)
template<typename CvScalarType , typename EScalarType , int H, int W>
void ntk::toEigen ( const cv::Mat_< CvScalarType > &  mat,
Eigen::Matrix< EScalarType, H, W > &  ep 
) [inline]
template<typename CvScalarType , typename EScalarType >
void ntk::toEigen ( const cv::Vec< CvScalarType, 3 > &  p,
Eigen::Matrix< EScalarType, 4, 1 > &  ep 
) [inline]
template<typename CvScalarType , typename EScalarType >
void ntk::toEigen ( const cv::Point3_< CvScalarType > &  p,
Eigen::Matrix< EScalarType, 3, 1 > &  ep 
) [inline]
template<typename CvScalarType , typename EScalarType >
void ntk::toEigen ( const cv::Point3_< CvScalarType > &  p,
Eigen::Matrix< EScalarType, 4, 1 > &  ep 
) [inline]
template<typename CvScalarType , typename EScalarType >
void ntk::toEigen ( const cv::Vec< CvScalarType, 3 > &  p,
Eigen::Matrix< EScalarType, 3, 1 > &  ep 
) [inline]
Eigen::Vector2d ntk::toEigenVector2d ( const cv::Point2f &  v  )  [inline]
Eigen::Vector3d ntk::toEigenVector3d ( const cv::Vec3f &  v  )  [inline]
Eigen::Vector4d ntk::toEigenVector4d ( const cv::Vec3f &  v  )  [inline]
cv::Mat3b ntk::toMat3b ( const cv::Mat1b &  image  ) 
cv::Mat3b ntk::toMat3b ( const cv::Mat4b &  im  ) 
cv::Mat4b ntk::toMat4b ( const cv::Mat3b &  im  ) 
template<typename CvScalarType , typename EigenScalarType , int H, int W>
void ntk::toOpencv ( const Eigen::Matrix< EigenScalarType, H, W > &  ep,
cv::Mat_< CvScalarType > &  mat 
) [inline]
template<class T >
ntk::Ptr<T> ntk::toPtr ( T *  ptr  ) 
template<class ScalarType >
cv::Vec2f ntk::toVec2f ( const cv::Mat_< ScalarType > &  m  ) 
template<class ScalarType >
cv::Vec3d ntk::toVec3d ( const cv::Mat_< ScalarType > &  m  ) 
template<typename EScalarType >
cv::Vec3f ntk::toVec3f ( const Eigen::Matrix< EScalarType, 3, 1 > &  v  )  [inline]
template<typename EScalarType >
cv::Vec3f ntk::toVec3f ( const Eigen::Matrix< EScalarType, 4, 1 > &  v  )  [inline]
void ntk::write_to_yaml ( FileStorage &  output_file,
const std::string name,
const cv::Rect &  r 
)
void ntk::write_to_yaml ( cv::FileStorage &  output_file,
const std::string name,
int  i 
)
void ntk::write_to_yaml ( FileStorage &  output_file,
const std::string name,
const cv::Vec3f &  v 
)
void ntk::write_to_yaml ( FileStorage &  output_file,
const std::string name,
const cv::Vec2f &  v 
)
void ntk::write_to_yaml ( cv::FileStorage &  output_file,
const std::string name,
const cv::Rect &  v 
)
void ntk::write_to_yaml ( cv::FileStorage &  output_file,
const std::string name,
const cv::Vec3f &  v 
)
void ntk::write_to_yaml ( cv::FileStorage &  output_file,
const std::string name,
const cv::Mat &  matrix 
)
void ntk::write_to_yaml ( cv::FileStorage &  output_file,
const std::string name,
double  b 
)
void ntk::write_to_yaml ( cv::FileStorage &  output_file,
const std::string name,
bool  b 
)
void ntk::writeMatrix ( FileStorage &  output_file,
const std::string name,
const cv::Mat &  matrix 
)
void ntk::writeMatrix ( cv::FileStorage &  output_file,
const std::string name,
const cv::Mat &  matrix 
)

Obsolete. Use write_to_yaml. This is provided for API compatility.