Lines Matching full:y

53         __device__ __forceinline__ float sum(float2 v) { return v.x + v.y; }  in sum()
54 __device__ __forceinline__ float sum(float3 v) { return v.x + v.y + v.z; } in sum()
55 __device__ __forceinline__ float sum(float4 v) { return v.x + v.y + v.z + v.w; } in sum()
63 …vice__ __forceinline__ float2 mul(float2 a, float2 b) { return make_float2(a.x * b.x, a.y * b.y); } in mul()
64 …rceinline__ float3 mul(float3 a, float3 b) { return make_float3(a.x * b.x, a.y * b.y, a.z * b.z); } in mul()
65 …nline__ float4 mul(float4 a, float4 b) { return make_float4(a.x * b.x, a.y * b.y, a.z * b.z, a.w *… in mul()
68 …vice__ __forceinline__ float2 mul(uchar2 a, uchar2 b) { return make_float2(a.x * b.x, a.y * b.y); } in mul()
69 …rceinline__ float3 mul(uchar3 a, uchar3 b) { return make_float3(a.x * b.x, a.y * b.y, a.z * b.z); } in mul()
70 …nline__ float4 mul(uchar4 a, uchar4 b) { return make_float4(a.x * b.x, a.y * b.y, a.z * b.z, a.w *… in mul()
73 …vice__ __forceinline__ float2 sub(float2 a, float2 b) { return make_float2(a.x - b.x, a.y - b.y); } in sub()
74 …rceinline__ float3 sub(float3 a, float3 b) { return make_float3(a.x - b.x, a.y - b.y, a.z - b.z); } in sub()
75 …nline__ float4 sub(float4 a, float4 b) { return make_float4(a.x - b.x, a.y - b.y, a.z - b.z, a.w -… in sub()
78 …vice__ __forceinline__ float2 sub(uchar2 a, uchar2 b) { return make_float2(a.x - b.x, a.y - b.y); } in sub()
79 …rceinline__ float3 sub(uchar3 a, uchar3 b) { return make_float3(a.x - b.x, a.y - b.y, a.z - b.z); } in sub()
80 …nline__ float4 sub(uchar4 a, uchar4 b) { return make_float4(a.x - b.x, a.y - b.y, a.z - b.z, a.w -… in sub()
92 int y = blockDim.y * blockIdx.y + threadIdx.y; in matchTemplateNaiveKernel_CCORR() local
94 if (x < result.cols && y < result.rows) in matchTemplateNaiveKernel_CCORR()
100 const Type* image_ptr = (const Type*)image.ptr(y + i); in matchTemplateNaiveKernel_CCORR()
106 result.ptr(y)[x] = sum(res); in matchTemplateNaiveKernel_CCORR() local
114 const dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplateNaive_CCORR()
158 int y = blockDim.y * blockIdx.y + threadIdx.y; in matchTemplateNaiveKernel_SQDIFF() local
160 if (x < result.cols && y < result.rows) in matchTemplateNaiveKernel_SQDIFF()
167 const Type* image_ptr = (const Type*)image.ptr(y + i); in matchTemplateNaiveKernel_SQDIFF()
176 result.ptr(y)[x] = sum(res); in matchTemplateNaiveKernel_SQDIFF() local
184 const dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplateNaive_SQDIFF()
224 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_SQDIFF_8U() local
226 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_SQDIFF_8U()
229 (image_sqsum.ptr(y + h)[(x + w) * cn] - image_sqsum.ptr(y)[(x + w) * cn]) - in matchTemplatePreparedKernel_SQDIFF_8U()
230 (image_sqsum.ptr(y + h)[x * cn] - image_sqsum.ptr(y)[x * cn])); in matchTemplatePreparedKernel_SQDIFF_8U()
231 float ccorr = result.ptr(y)[x]; in matchTemplatePreparedKernel_SQDIFF_8U()
232 result.ptr(y)[x] = image_sqsum_ - 2.f * ccorr + templ_sqsum; in matchTemplatePreparedKernel_SQDIFF_8U() local
240 const dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_SQDIFF_8U()
294 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_SQDIFF_NORMED_8U() local
296 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_SQDIFF_NORMED_8U()
299 (image_sqsum.ptr(y + h)[(x + w) * cn] - image_sqsum.ptr(y)[(x + w) * cn]) - in matchTemplatePreparedKernel_SQDIFF_NORMED_8U()
300 (image_sqsum.ptr(y + h)[x * cn] - image_sqsum.ptr(y)[x * cn])); in matchTemplatePreparedKernel_SQDIFF_NORMED_8U()
301 float ccorr = result.ptr(y)[x]; in matchTemplatePreparedKernel_SQDIFF_NORMED_8U()
302 result.ptr(y)[x] = normAcc_SQDIFF(image_sqsum_ - 2.f * ccorr + templ_sqsum, in matchTemplatePreparedKernel_SQDIFF_NORMED_8U() local
312 const dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_SQDIFF_NORMED_8U()
340 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_CCOFF_8U() local
342 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_CCOFF_8U()
345 (image_sum.ptr(y + h)[x + w] - image_sum.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8U()
346 (image_sum.ptr(y + h)[x] - image_sum.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8U()
347 float ccorr = result.ptr(y)[x]; in matchTemplatePreparedKernel_CCOFF_8U()
348 result.ptr(y)[x] = ccorr - image_sum_ * templ_sum_scale; in matchTemplatePreparedKernel_CCOFF_8U() local
355 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_CCOFF_8U()
373 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_CCOFF_8UC2() local
375 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_CCOFF_8UC2()
378 (image_sum_r.ptr(y + h)[x + w] - image_sum_r.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8UC2()
379 (image_sum_r.ptr(y + h)[x] - image_sum_r.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8UC2()
381 (image_sum_g.ptr(y + h)[x + w] - image_sum_g.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8UC2()
382 (image_sum_g.ptr(y + h)[x] - image_sum_g.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8UC2()
383 float ccorr = result.ptr(y)[x]; in matchTemplatePreparedKernel_CCOFF_8UC2()
384 result.ptr(y)[x] = ccorr - image_sum_r_ * templ_sum_scale_r in matchTemplatePreparedKernel_CCOFF_8UC2() local
397 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_CCOFF_8UC2()
421 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_CCOFF_8UC3() local
423 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_CCOFF_8UC3()
426 (image_sum_r.ptr(y + h)[x + w] - image_sum_r.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8UC3()
427 (image_sum_r.ptr(y + h)[x] - image_sum_r.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8UC3()
429 (image_sum_g.ptr(y + h)[x + w] - image_sum_g.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8UC3()
430 (image_sum_g.ptr(y + h)[x] - image_sum_g.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8UC3()
432 (image_sum_b.ptr(y + h)[x + w] - image_sum_b.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8UC3()
433 (image_sum_b.ptr(y + h)[x] - image_sum_b.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8UC3()
434 float ccorr = result.ptr(y)[x]; in matchTemplatePreparedKernel_CCOFF_8UC3()
435 result.ptr(y)[x] = ccorr - image_sum_r_ * templ_sum_scale_r in matchTemplatePreparedKernel_CCOFF_8UC3() local
452 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_CCOFF_8UC3()
481 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_CCOFF_8UC4() local
483 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_CCOFF_8UC4()
486 (image_sum_r.ptr(y + h)[x + w] - image_sum_r.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8UC4()
487 (image_sum_r.ptr(y + h)[x] - image_sum_r.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8UC4()
489 (image_sum_g.ptr(y + h)[x + w] - image_sum_g.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8UC4()
490 (image_sum_g.ptr(y + h)[x] - image_sum_g.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8UC4()
492 (image_sum_b.ptr(y + h)[x + w] - image_sum_b.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8UC4()
493 (image_sum_b.ptr(y + h)[x] - image_sum_b.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8UC4()
495 (image_sum_a.ptr(y + h)[x + w] - image_sum_a.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_8UC4()
496 (image_sum_a.ptr(y + h)[x] - image_sum_a.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_8UC4()
497 float ccorr = result.ptr(y)[x]; in matchTemplatePreparedKernel_CCOFF_8UC4()
498 result.ptr(y)[x] = ccorr - image_sum_r_ * templ_sum_scale_r in matchTemplatePreparedKernel_CCOFF_8UC4() local
518 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_CCOFF_8UC4()
545 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_CCOFF_NORMED_8U() local
547 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_CCOFF_NORMED_8U()
549 float ccorr = result.ptr(y)[x]; in matchTemplatePreparedKernel_CCOFF_NORMED_8U()
551 (image_sum.ptr(y + h)[x + w] - image_sum.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8U()
552 (image_sum.ptr(y + h)[x] - image_sum.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8U()
554 (image_sqsum.ptr(y + h)[x + w] - image_sqsum.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8U()
555 (image_sqsum.ptr(y + h)[x] - image_sqsum.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8U()
556 result.ptr(y)[x] = normAcc(ccorr - image_sum_ * templ_sum_scale, in matchTemplatePreparedKernel_CCOFF_NORMED_8U() local
568 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_CCOFF_NORMED_8U()
594 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2() local
596 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
599 (image_sum_r.ptr(y + h)[x + w] - image_sum_r.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
600 (image_sum_r.ptr(y + h)[x] - image_sum_r.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
602 (image_sqsum_r.ptr(y + h)[x + w] - image_sqsum_r.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
603 (image_sqsum_r.ptr(y + h)[x] - image_sqsum_r.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
605 (image_sum_g.ptr(y + h)[x + w] - image_sum_g.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
606 (image_sum_g.ptr(y + h)[x] - image_sum_g.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
608 (image_sqsum_g.ptr(y + h)[x + w] - image_sqsum_g.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
609 (image_sqsum_g.ptr(y + h)[x] - image_sqsum_g.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
611 float num = result.ptr(y)[x] - image_sum_r_ * templ_sum_scale_r in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2()
615 result.ptr(y)[x] = normAcc(num, denum); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC2() local
628 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_CCOFF_NORMED_8UC2()
661 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3() local
663 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
666 (image_sum_r.ptr(y + h)[x + w] - image_sum_r.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
667 (image_sum_r.ptr(y + h)[x] - image_sum_r.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
669 (image_sqsum_r.ptr(y + h)[x + w] - image_sqsum_r.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
670 (image_sqsum_r.ptr(y + h)[x] - image_sqsum_r.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
672 (image_sum_g.ptr(y + h)[x + w] - image_sum_g.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
673 (image_sum_g.ptr(y + h)[x] - image_sum_g.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
675 (image_sqsum_g.ptr(y + h)[x + w] - image_sqsum_g.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
676 (image_sqsum_g.ptr(y + h)[x] - image_sqsum_g.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
678 (image_sum_b.ptr(y + h)[x + w] - image_sum_b.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
679 (image_sum_b.ptr(y + h)[x] - image_sum_b.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
681 (image_sqsum_b.ptr(y + h)[x + w] - image_sqsum_b.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
682 (image_sqsum_b.ptr(y + h)[x] - image_sqsum_b.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
684 float num = result.ptr(y)[x] - image_sum_r_ * templ_sum_scale_r in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3()
690 result.ptr(y)[x] = normAcc(num, denum); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC3() local
705 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_CCOFF_NORMED_8UC3()
742 const int y = blockIdx.y * blockDim.y + threadIdx.y; in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4() local
744 if (x < result.cols && y < result.rows) in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
747 (image_sum_r.ptr(y + h)[x + w] - image_sum_r.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
748 (image_sum_r.ptr(y + h)[x] - image_sum_r.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
750 (image_sqsum_r.ptr(y + h)[x + w] - image_sqsum_r.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
751 (image_sqsum_r.ptr(y + h)[x] - image_sqsum_r.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
753 (image_sum_g.ptr(y + h)[x + w] - image_sum_g.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
754 (image_sum_g.ptr(y + h)[x] - image_sum_g.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
756 (image_sqsum_g.ptr(y + h)[x + w] - image_sqsum_g.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
757 (image_sqsum_g.ptr(y + h)[x] - image_sqsum_g.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
759 (image_sum_b.ptr(y + h)[x + w] - image_sum_b.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
760 (image_sum_b.ptr(y + h)[x] - image_sum_b.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
762 (image_sqsum_b.ptr(y + h)[x + w] - image_sqsum_b.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
763 (image_sqsum_b.ptr(y + h)[x] - image_sqsum_b.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
765 (image_sum_a.ptr(y + h)[x + w] - image_sum_a.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
766 (image_sum_a.ptr(y + h)[x] - image_sum_a.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
768 (image_sqsum_a.ptr(y + h)[x + w] - image_sqsum_a.ptr(y)[x + w]) - in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
769 (image_sqsum_a.ptr(y + h)[x] - image_sqsum_a.ptr(y)[x])); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
771 … float num = result.ptr(y)[x] - image_sum_r_ * templ_sum_scale_r - image_sum_g_ * templ_sum_scale_g in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4()
777 result.ptr(y)[x] = normAcc(num, denum); in matchTemplatePreparedKernel_CCOFF_NORMED_8UC4() local
794 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in matchTemplatePrepared_CCOFF_NORMED_8UC4()
830 const int y = blockIdx.y * blockDim.y + threadIdx.y; in normalizeKernel_8U() local
832 if (x < result.cols && y < result.rows) in normalizeKernel_8U()
835 (image_sqsum.ptr(y + h)[(x + w) * cn] - image_sqsum.ptr(y)[(x + w) * cn]) - in normalizeKernel_8U()
836 (image_sqsum.ptr(y + h)[x * cn] - image_sqsum.ptr(y)[x * cn])); in normalizeKernel_8U()
837 result.ptr(y)[x] = normAcc(result.ptr(y)[x], sqrtf(image_sqsum_ * templ_sqsum)); in normalizeKernel_8U() local
845 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in normalize_8U()
878 int y = blockDim.y * blockIdx.y + threadIdx.y; in extractFirstChannel_32F() local
880 if (x < result.cols && y < result.rows) in extractFirstChannel_32F()
882 Typef val = ((const Typef*)image.ptr(y))[x]; in extractFirstChannel_32F()
883 result.ptr(y)[x] = first(val); in extractFirstChannel_32F() local
890 dim3 grid(divUp(result.cols, threads.x), divUp(result.rows, threads.y)); in extractFirstChannel_32F()