refactored gpu module tests

This commit is contained in:
Vladislav Vinogradov
2011-06-29 10:14:16 +00:00
parent 6e3142f04b
commit d1b4b5f0de
37 changed files with 7383 additions and 5790 deletions

View File

@@ -82,7 +82,9 @@ namespace cv { namespace gpu { namespace mathfunc
{
static __device__ __forceinline__ void calc(int x, int y, float x_data, float y_data, float* dst, size_t dst_step, float scale)
{
dst[y * dst_step + x] = scale * atan2f(y_data, x_data);
float angle = atan2f(y_data, x_data);
angle += (angle < 0) * 2.0 * CV_PI;
dst[y * dst_step + x] = scale * angle;
}
};
template <typename Mag, typename Angle>