mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 11:10:21 +08:00
fixed get_first_k_initial_global
This commit is contained in:
parent
b530a2cba9
commit
fe8b95ed80
@ -160,21 +160,21 @@ namespace csbp_krnls
|
||||
|
||||
for(int i = 0; i < nr_plane; i++)
|
||||
{
|
||||
T fmin_ = data_cost[i * cdisp_step1];
|
||||
int id = i;
|
||||
for(int j = 0; j < nr_plane; j++)
|
||||
T minimum = TypeLimits<T>::max();
|
||||
int id = 0;
|
||||
for(int d = 0; d < cndisp; d++)
|
||||
{
|
||||
T cur = data_cost[j * cdisp_step1];
|
||||
if(cur < fmin_)
|
||||
T cur = data_cost[d * cdisp_step1];
|
||||
if(cur < minimum)
|
||||
{
|
||||
fmin_ = cur;
|
||||
id = j;
|
||||
minimum = cur;
|
||||
id = d;
|
||||
}
|
||||
}
|
||||
|
||||
data_cost_selected[i * cdisp_step1] = fmin_;
|
||||
data_cost_selected[i * cdisp_step1] = minimum;
|
||||
selected_disparity[i * cdisp_step1] = id;
|
||||
data_cost [id * cdisp_step1] = TypeLimits<T>::max();;
|
||||
data_cost [id * cdisp_step1] = TypeLimits<T>::max();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user