We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
代码:147-157行in sgm_util.cpp // 自方向上第2个像素开始按顺序聚合 for (sint32 j = 0; j < width - 1; j++) { gray = *img_row; uint8 min_cost = UINT8_MAX; for (sint32 d = 0; d < disp_range; d++){ // Lr(p,d) = C(p,d) + min( Lr(p-r,d), Lr(p-r,d-1) + P1, Lr(p-r,d+1) + P1, min(Lr(p-r))+P2 ) - min(Lr(p-r)) const uint8 cost = cost_init_row[d]; const uint16 l1 = cost_last_path[d + 1]; const uint16 l2 = cost_last_path[d] + P1; const uint16 l3 = cost_last_path[d + 2] + P1; const uint16 l4 = mincost_last_path + std::max(P1, P2_Init / (abs(gray - gray_last) + 1)); 这里面的l1-l3 难道不应该是: const uint16 l1 = cost_last_path[d - 1] + P1; const uint16 l2 = cost_last_path[d] ; const uint16 l3 = cost_last_path[d + 1] + P1; 为啥cost_last_path的d的索引偏差一个而cost_init_row没有?
The text was updated successfully, but these errors were encountered:
您好呀,请问您测过耗时吗,想知道一下这个算法的性能大概如何
Sorry, something went wrong.
No branches or pull requests
代码:147-157行in sgm_util.cpp
// 自方向上第2个像素开始按顺序聚合
for (sint32 j = 0; j < width - 1; j++) {
gray = *img_row;
uint8 min_cost = UINT8_MAX;
for (sint32 d = 0; d < disp_range; d++){
// Lr(p,d) = C(p,d) + min( Lr(p-r,d), Lr(p-r,d-1) + P1, Lr(p-r,d+1) + P1, min(Lr(p-r))+P2 ) - min(Lr(p-r))
const uint8 cost = cost_init_row[d];
const uint16 l1 = cost_last_path[d + 1];
const uint16 l2 = cost_last_path[d] + P1;
const uint16 l3 = cost_last_path[d + 2] + P1;
const uint16 l4 = mincost_last_path + std::max(P1, P2_Init / (abs(gray - gray_last) + 1));
这里面的l1-l3
难道不应该是:
const uint16 l1 = cost_last_path[d - 1] + P1;
const uint16 l2 = cost_last_path[d] ;
const uint16 l3 = cost_last_path[d + 1] + P1;
为啥cost_last_path的d的索引偏差一个而cost_init_row没有?
The text was updated successfully, but these errors were encountered: