10#ifndef DMRECON_MVS_TOOLS_H
11#define DMRECON_MVS_TOOLS_H
25 PixelCoords
const& imgPos, PixelCoords
const& gradDir,
26 Samples& color, Samples& deriv);
30 std::vector<math::Vec2i>
const& imgPos, Samples* color);
34 PixelCoords
const& imgPos, Samples* color);
50 float dp = std::max(std::min(dir1.
dot(dir2), 1.f), -1.f);
51 float plx = std::acos(dp) * 180.f /
pi;
58 if (p < 0.f || p > 180.f) {
59 std::cerr <<
"ERROR: invalid parallax value." << std::endl;
68 return exp(-
sqr(p - mean) / (2 * sigma * sigma));
Vector class for arbitrary dimensions and types.
T dot(Vector< T, N > const &other) const
Dot (or scalar) product between self and another vector.
Multi-channel image class of arbitrary but homogenous data type.
std::shared_ptr< SingleView > Ptr
#define MVS_NAMESPACE_BEGIN
#define MVS_NAMESPACE_END
void colAndExactDeriv(mve::ByteImage const &img, PixelCoords const &imgPos, PixelCoords const &gradDir, Samples &color, Samples &deriv)
interpolate color and derivative at given sample positions
void getXYZColorAtPos(mve::ByteImage const &img, PixelCoords const &imgPos, Samples *color)
interpolate only color at given sample positions
float parallax(math::Vec3f p, mvs::SingleView::Ptr v1, mvs::SingleView::Ptr v2)
Computes the parallax between two views with respect to some 3D point p.
float parallaxToWeight(float p)
Turns a parallax value (0 <= p <= 180) into a weight according to a bilateral Gaussian (see [Furukawa...
void getXYZColorAtPix(mve::ByteImage const &img, std::vector< math::Vec2i > const &imgPos, Samples *color)
get color at given pixel positions (no interpolation)