merged new master branch

changed tests for tvl1 optflow
correction of a bug preventing compilation with cuda (fmin changed to fminf)
This commit is contained in:
Ernest Galbrun
2014-08-18 15:29:45 +02:00
parent fae69df9a9
commit 6207d338dd
3 changed files with 10 additions and 5 deletions

View File

@@ -61,7 +61,7 @@ namespace cv { namespace cuda { namespace device
template <int channels> static float __device__ pixeldiff(const uchar* left, const uchar* right, float max_data_term);
template<> __device__ __forceinline__ static float pixeldiff<1>(const uchar* left, const uchar* right, float max_data_term)
{
return fmin( ::abs((int)*left - *right), max_data_term);
return fminf( ::abs((int)*left - *right), max_data_term);
}
template<> __device__ __forceinline__ static float pixeldiff<3>(const uchar* left, const uchar* right, float max_data_term)
{
@@ -69,7 +69,7 @@ namespace cv { namespace cuda { namespace device
float tg = 0.587f * ::abs((int)left[1] - right[1]);
float tr = 0.299f * ::abs((int)left[2] - right[2]);
return fmin(tr + tg + tb, max_data_term);
return fminf(tr + tg + tb, max_data_term);
}
template<> __device__ __forceinline__ static float pixeldiff<4>(const uchar* left, const uchar* right, float max_data_term)
{
@@ -80,7 +80,7 @@ namespace cv { namespace cuda { namespace device
float tg = 0.587f * ::abs((int)l.y - r.y);
float tr = 0.299f * ::abs((int)l.z - r.z);
return fmin(tr + tg + tb, max_data_term);
return fminf(tr + tg + tb, max_data_term);
}
template <typename T>