Skip to content

Commit f49f0ae

Browse files
authored
Merge pull request #3984 from cudawarped:fix_videostab_cuda_13
cuda: update videostab for cuda 13.0
2 parents cb495d9 + 9a9b173 commit f49f0ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/videostab/src/cuda/global_motion.cu

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ namespace cv { namespace cuda { namespace device { namespace globmotion {
5252
__constant__ float cml[9];
5353
__constant__ float cmr[9];
5454

55+
struct is_zero
56+
{
57+
__host__ __device__ bool operator()(uchar x) const { return x == 0; }
58+
};
59+
5560
int compactPoints(int N, float *points0, float *points1, const uchar *mask)
5661
{
5762
thrust::device_ptr<float2> dpoints0((float2*)points0);
@@ -60,7 +65,7 @@ int compactPoints(int N, float *points0, float *points1, const uchar *mask)
6065

6166
return (int)(thrust::remove_if(thrust::make_zip_iterator(thrust::make_tuple(dpoints0, dpoints1)),
6267
thrust::make_zip_iterator(thrust::make_tuple(dpoints0 + N, dpoints1 + N)),
63-
dmask, thrust::not1(thrust::identity<uchar>()))
68+
dmask, is_zero())
6469
- thrust::make_zip_iterator(make_tuple(dpoints0, dpoints1)));
6570
}
6671

0 commit comments

Comments
 (0)