You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, the cuda kenel of cost aggregation is pretty hard understand for me, i am writting the cuda version of opencv sgbm, i find your project so well! i am trying to confirm if the cost aggregation of libsgm is equal implement opencv-sgbm, the latter's cost aggregation is Dynamic Programming,i found the test instance of libsgm cost aggregation is not, the minLp is Minimum along disp dim !https://github.com/fixstars/libSGM/blob/master/test/cost_aggregation_test.cpp line 94
can you give some advice to implement the cost aggregation of opencv-sgbm, the paper is the same with libsgm in term of cost aggregation? Thx
Embedded_ real-time stereo estimation via Semi-Global Matching on the GPU D. Hernandez-Juarez, A. Chacón, A. Espinosa, D. Vázquez, J. C. Moure, and A. M. López ICCS2016 – International Conference on Computational Science 2016**
for (int vc = v0; vc != v1; vc += dv) {
const CENSUS_TYPE* censusL = srcL.ptr<CENSUS_TYPE>(vc);
const CENSUS_TYPE* censusR = srcR.ptr<CENSUS_TYPE>(vc);
for (int uc = u0; uc != u1; uc += du) {
const int vp = vc - rv;
const int up = uc - ru;
const bool inside = vp >= 0 && vp < h&& up >= 0 && up < w;
const CENSUS_TYPE cL = censusL[uc];
COST_TYPE* Lc = dst.ptr<COST_TYPE>(vc * w + uc);
COST_TYPE* Lp = inside ? dst.ptr<COST_TYPE>(vp * w + up) : zero.data();
COST_TYPE minLp = std::numeric_limits<COST_TYPE>::max();
for (int d = 0; d < n; d++)
minLp = std::min(minLp, Lp[d]);
const COST_TYPE _P1 = P1 - minLp;
for (int d = 0; d < n; d++) {
const int uR = uc - d - min_disp;
const CENSUS_TYPE cR = uR >= 0 && uR < w ? censusR[uR] : 0;
const COST_TYPE MC = HammingDistance(cL, cR);
const COST_TYPE Lp0 = Lp[d] - minLp;
const COST_TYPE Lp1 = d > 0 ? Lp[d - 1] + _P1 : 0xFF;
const COST_TYPE Lp2 = d < n - 1 ? Lp[d + 1] + _P1 : 0xFF;
const COST_TYPE Lp3 = P2;
Lc[d] = static_cast<COST_TYPE>(MC + min4(Lp0, Lp1, Lp2, Lp3));
}
}
}
}
The text was updated successfully, but these errors were encountered:
hi, the cuda kenel of cost aggregation is pretty hard understand for me, i am writting the cuda version of opencv sgbm, i find your project so well! i am trying to confirm if the cost aggregation of libsgm is equal implement opencv-sgbm, the latter's cost aggregation is Dynamic Programming,i found the test instance of libsgm cost aggregation is not, the minLp is Minimum along disp dim !https://github.com/fixstars/libSGM/blob/master/test/cost_aggregation_test.cpp line 94
can you give some advice to implement the cost aggregation of opencv-sgbm, the paper is the same with libsgm in term of cost aggregation? Thx
Embedded_ real-time stereo estimation via Semi-Global Matching on the GPU D. Hernandez-Juarez, A. Chacón, A. Espinosa, D. Vázquez, J. C. Moure, and A. M. López ICCS2016 – International Conference on Computational Science 2016**
for (int vc = v0; vc != v1; vc += dv) {
}
The text was updated successfully, but these errors were encountered: