facebook360_dep
Facebook360 Depth Estimation Pipeline
Functions
fb360_dep::cv_util Namespace Reference

Functions

cv::Mat imreadExceptionOnFail (const filesystem::path &filename, const int flags)
 
void imwriteExceptionOnFail (const filesystem::path &filename, const cv::Mat &image, const std::vector< int > &params)
 
void writeCvMat32FC1ToPFM (const filesystem::path &path, const cv::Mat_< float > &m)
 
cv::Mat_< float > readCvMat32FC1FromPFM (const filesystem::path &path)
 
template<typename T >
cv::Mat_< T > stackHorizontal (const std::vector< cv::Mat_< T >> &images)
 
template<typename T >
cv::Mat_< T > stackVertical (const std::vector< cv::Mat_< T >> &images)
 
template<typename T >
const T & clampToEdge (const cv::Mat_< T > &src, const int x, const int y)
 
template<typename T >
bilerp (const T &p00, const T &p01, const T &p10, const T &p11, float xw, float yw)
 
template<typename T , int N>
cv::Vec< float, N > bilerp (const cv::Vec< T, N > &p00, const cv::Vec< T, N > &p01, const cv::Vec< T, N > &p10, const cv::Vec< T, N > &p11, float xw, float yw)
 
template<typename T , typename ResultType = T>
ResultType getPixelBilinear (const cv::Mat_< T > &src, const float x, const float y)
 
cv::Mat removeAlpha (const cv::Mat &src)
 
cv::Mat extractAlpha (const cv::Mat &src)
 
template<typename T >
cv::Mat_< T > resizeImage (const cv::Mat_< T > &image, const cv::Size &size, const int type=cv::INTER_AREA)
 
template<typename T >
cv::Mat_< T > scaleImage (const cv::Mat_< T > &image, const double scaleFactor, const int type=cv::INTER_AREA)
 
template<typename T >
std::vector< cv::Mat_< T > > resizeImages (const std::vector< cv::Mat_< T >> &imagesIn, const cv::Size &size, const int type=cv::INTER_AREA, const int numThreads=-1)
 
float maxPixelValueFromCvDepth (int cvDepth)
 
float maxPixelValue (const cv::Mat &mat)
 
cv::Mat convertTo (const cv::Mat &srcImage, const int cvDepth)
 
template<typename T >
cv::Mat convertTo (const cv::Mat &srcImage)
 
template<>
cv::Mat convertTo< uint8_t > (const cv::Mat &srcImage)
 
template<>
cv::Mat convertTo< uint16_t > (const cv::Mat &srcImage)
 
template<>
cv::Mat convertTo< float > (const cv::Mat &srcImage)
 
template<typename T >
cv::Mat_< T > convertImage (const cv::Mat &imageIn)
 
cv::Mat loadImageUnchanged (const filesystem::path &filename)
 
template<typename T >
cv::Mat_< T > loadImage (const filesystem::path &filename)
 
template<typename T >
cv::Mat_< T > loadScaledImage (const filesystem::path &filename, const double scaleFactor, const int type=cv::INTER_LINEAR)
 
template<typename T >
cv::Mat_< T > loadResizedImage (const filesystem::path &filename, const cv::Size &size, const int type=cv::INTER_LINEAR)
 
template<typename T >
cv::Mat_< T > gaussianBlur (const cv::Mat_< T > &mat, const int blurRadius, const float sigma=0.0f)
 
template<typename T >
cv::Mat_< T > blur (const cv::Mat_< T > &mat, const int blurRadius=1)
 
cv::Mat_< bool > dilate (const cv::Mat_< bool > &mat, const int dilateRadius=1)
 
cv::Mat_< float > maskedMedianBlur (const cv::Mat_< float > &mat, const cv::Mat_< float > &background, const cv::Mat_< bool > &mask, const int radius, const bool ignoreNan=true)
 
std::vector< uint8_t > getRGBA8Vector (const cv::Mat &src)
 
template<typename T >
createBGR (const float b, const float g, const float r)
 
template<>
cv::Vec3f createBGR (const float b, const float g, const float r)
 
template<>
cv::Vec3w createBGR (const float b, const float g, const float r)
 
template<typename T >
createBGRA (const float b, const float g, const float r, const float a)
 
template<>
cv::Vec4f createBGRA (const float b, const float g, const float r, const float a)
 
template<>
cv::Vec4w createBGRA (const float b, const float g, const float r, const float a)
 
std::vector< cv::Mat_< bool > > generateAllPassMasks (const cv::Size &size, const int numMasks)
 

Function Documentation

◆ bilerp() [1/2]

template<typename T >
T fb360_dep::cv_util::bilerp ( const T &  p00,
const T &  p01,
const T &  p10,
const T &  p11,
float  xw,
float  yw 
)

◆ bilerp() [2/2]

template<typename T , int N>
cv::Vec<float, N> fb360_dep::cv_util::bilerp ( const cv::Vec< T, N > &  p00,
const cv::Vec< T, N > &  p01,
const cv::Vec< T, N > &  p10,
const cv::Vec< T, N > &  p11,
float  xw,
float  yw 
)

◆ blur()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::blur ( const cv::Mat_< T > &  mat,
const int  blurRadius = 1 
)
inline

◆ clampToEdge()

template<typename T >
const T& fb360_dep::cv_util::clampToEdge ( const cv::Mat_< T > &  src,
const int  x,
const int  y 
)

◆ convertImage()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::convertImage ( const cv::Mat &  imageIn)
inline

◆ convertTo() [1/2]

cv::Mat fb360_dep::cv_util::convertTo ( const cv::Mat &  srcImage,
const int  cvDepth 
)
inline

◆ convertTo() [2/2]

template<typename T >
cv::Mat fb360_dep::cv_util::convertTo ( const cv::Mat &  srcImage)
inline

◆ convertTo< float >()

template<>
cv::Mat fb360_dep::cv_util::convertTo< float > ( const cv::Mat &  srcImage)
inline

◆ convertTo< uint16_t >()

template<>
cv::Mat fb360_dep::cv_util::convertTo< uint16_t > ( const cv::Mat &  srcImage)
inline

◆ convertTo< uint8_t >()

template<>
cv::Mat fb360_dep::cv_util::convertTo< uint8_t > ( const cv::Mat &  srcImage)
inline

◆ createBGR() [1/3]

template<typename T >
T fb360_dep::cv_util::createBGR ( const float  b,
const float  g,
const float  r 
)
inline

◆ createBGR() [2/3]

template<>
cv::Vec3f fb360_dep::cv_util::createBGR ( const float  b,
const float  g,
const float  r 
)
inline

◆ createBGR() [3/3]

template<>
cv::Vec3w fb360_dep::cv_util::createBGR ( const float  b,
const float  g,
const float  r 
)
inline

◆ createBGRA() [1/3]

template<typename T >
T fb360_dep::cv_util::createBGRA ( const float  b,
const float  g,
const float  r,
const float  a 
)
inline

◆ createBGRA() [2/3]

template<>
cv::Vec4f fb360_dep::cv_util::createBGRA ( const float  b,
const float  g,
const float  r,
const float  a 
)
inline

◆ createBGRA() [3/3]

template<>
cv::Vec4w fb360_dep::cv_util::createBGRA ( const float  b,
const float  g,
const float  r,
const float  a 
)
inline

◆ dilate()

cv::Mat_<bool> fb360_dep::cv_util::dilate ( const cv::Mat_< bool > &  mat,
const int  dilateRadius = 1 
)
inline

◆ extractAlpha()

cv::Mat fb360_dep::cv_util::extractAlpha ( const cv::Mat &  src)
inline

◆ gaussianBlur()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::gaussianBlur ( const cv::Mat_< T > &  mat,
const int  blurRadius,
const float  sigma = 0.0f 
)
inline

◆ generateAllPassMasks()

std::vector<cv::Mat_<bool> > fb360_dep::cv_util::generateAllPassMasks ( const cv::Size &  size,
const int  numMasks 
)
inline

◆ getPixelBilinear()

template<typename T , typename ResultType = T>
ResultType fb360_dep::cv_util::getPixelBilinear ( const cv::Mat_< T > &  src,
const float  x,
const float  y 
)

◆ getRGBA8Vector()

std::vector<uint8_t> fb360_dep::cv_util::getRGBA8Vector ( const cv::Mat &  src)
inline

◆ imreadExceptionOnFail()

cv::Mat fb360_dep::cv_util::imreadExceptionOnFail ( const filesystem::path &  filename,
const int  flags 
)

◆ imwriteExceptionOnFail()

void fb360_dep::cv_util::imwriteExceptionOnFail ( const filesystem::path &  filename,
const cv::Mat &  image,
const std::vector< int > &  params 
)

◆ loadImage()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::loadImage ( const filesystem::path &  filename)
inline

◆ loadImageUnchanged()

cv::Mat fb360_dep::cv_util::loadImageUnchanged ( const filesystem::path &  filename)
inline

◆ loadResizedImage()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::loadResizedImage ( const filesystem::path &  filename,
const cv::Size &  size,
const int  type = cv::INTER_LINEAR 
)
inline

◆ loadScaledImage()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::loadScaledImage ( const filesystem::path &  filename,
const double  scaleFactor,
const int  type = cv::INTER_LINEAR 
)
inline

◆ maskedMedianBlur()

cv::Mat_<float> fb360_dep::cv_util::maskedMedianBlur ( const cv::Mat_< float > &  mat,
const cv::Mat_< float > &  background,
const cv::Mat_< bool > &  mask,
const int  radius,
const bool  ignoreNan = true 
)
inline

◆ maxPixelValue()

float fb360_dep::cv_util::maxPixelValue ( const cv::Mat &  mat)
inline

◆ maxPixelValueFromCvDepth()

float fb360_dep::cv_util::maxPixelValueFromCvDepth ( int  cvDepth)
inline

◆ readCvMat32FC1FromPFM()

cv::Mat_< float > fb360_dep::cv_util::readCvMat32FC1FromPFM ( const filesystem::path &  path)

◆ removeAlpha()

cv::Mat fb360_dep::cv_util::removeAlpha ( const cv::Mat &  src)
inline

◆ resizeImage()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::resizeImage ( const cv::Mat_< T > &  image,
const cv::Size &  size,
const int  type = cv::INTER_AREA 
)
inline

◆ resizeImages()

template<typename T >
std::vector<cv::Mat_<T> > fb360_dep::cv_util::resizeImages ( const std::vector< cv::Mat_< T >> &  imagesIn,
const cv::Size &  size,
const int  type = cv::INTER_AREA,
const int  numThreads = -1 
)
inline

◆ scaleImage()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::scaleImage ( const cv::Mat_< T > &  image,
const double  scaleFactor,
const int  type = cv::INTER_AREA 
)
inline

◆ stackHorizontal()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::stackHorizontal ( const std::vector< cv::Mat_< T >> &  images)

◆ stackVertical()

template<typename T >
cv::Mat_<T> fb360_dep::cv_util::stackVertical ( const std::vector< cv::Mat_< T >> &  images)

◆ writeCvMat32FC1ToPFM()

void fb360_dep::cv_util::writeCvMat32FC1ToPFM ( const filesystem::path &  path,
const cv::Mat_< float > &  m 
)