fixed get_first_k_initial_global

This commit is contained in:
Vladislav Vinogradov 2010-08-18 06:12:00 +00:00
parent b530a2cba9
commit fe8b95ed80

View File

@ -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();
}
}
}