📄 stcrawcosts.cpp
字号:
///////////////////////////////////////////////////////////////////////////
//
// NAME
// StcRawCosts.cpp -- compute raw per-pixel matching score between a pair of frames
//
// DESCRIPTION
// The CStereoMatcher class implements a number of popular stereo
// correspondence algorithms (currently for 2-frame rectified image pairs).
//
// The definition of disparity is as follows:
// Disparity is the (floating point) inter-frame (instantaneous) displacement
// of a pixel between successive frames in a multi-frame stereo pair.
//
// In building the disparity-space image (DSI) m_cost, we enumerate a set of
// m_disp_n disparitites, k = 0..m_disp_n-1.
//
// The mapping between the integral disparities k and the floating point
// disparity d is given by:
// d = disp_min + k * m_disp_num / m_disp_den
//
// Because we may be matching frames that are not adjacent in the sequence
// we also define the frame difference f_d and scaled disparity s_d as:
// f_d = frame_match - frame_ref
// s_d = f_d * d
// The coordinate of a pixel x_m in the matching frame corresponding
// to a reference pixel x_r in the reference frame is given by
// x_m = x_r - s_d
// (this is because input images are ordered left to right, so that pixel
// motion is leftward).
//
// When we store the floating point disparities in a gray_level image, we
// use the formulas
// g_d = (d - disp_min) * disp_scale
// d = disp_min + g_d / disp_scale
// to do the conversions.
//
// IMPLEMENTATION
// For better efficiency, we first interpolate the matching line
// up by a factor of m_disp_den.
//
// SEE ALSO
// StereoMatcher.h longer description of this class
//
// Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -