// 左视图匹配点p的位置及其视差平面
const sint32 p = y * width_ + x;
const auto& plane_p = plane_left_[p];
auto* cost_cpt = dynamic_cast<CostComputerPMS*>(cost_cpt_right_);
const float32 d_p = plane_p.to_disparity(x, y);
// 计算右视图列号
const sint32 xr = lround(x - d_p);
if (xr < 0 || xr >= width_) {
return;
}
const sint32 q = y * width_ + xr;
auto& plane_q = plane_right_[q];
auto& cost_q = cost_right_[q];
// 将左视图的视差平面转换到右视图
const auto plane_p2q = plane_p.to_another_view(x, y);
const float32 d_q = plane_p2q.to_disparity(xr,y);
const auto cost = cost_cpt->ComputeA(xr, y, plane_p2q);
if (cost < cost_q) {
plane_q = plane_p2q;
cost_q = cost;
}