forked from hybridgroup/gocv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bgsegm.cpp
33 lines (27 loc) · 997 Bytes
/
bgsegm.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "bgsegm.h"
CudaBackgroundSubtractorMOG2 CudaBackgroundSubtractorMOG2_Create() {
return new cv::Ptr<cv::cuda::BackgroundSubtractorMOG2>(cv::cuda::createBackgroundSubtractorMOG2());
}
void CudaBackgroundSubtractorMOG2_Close(CudaBackgroundSubtractorMOG2 b) {
delete b;
}
void CudaBackgroundSubtractorMOG2_Apply(CudaBackgroundSubtractorMOG2 b, GpuMat src, GpuMat dst, Stream s) {
if (s == NULL) {
(*b)->apply(*src, *dst);
return;
}
(*b)->apply(*src, *dst, -1.0, *s);
}
CudaBackgroundSubtractorMOG CudaBackgroundSubtractorMOG_Create() {
return new cv::Ptr<cv::cuda::BackgroundSubtractorMOG>(cv::cuda::createBackgroundSubtractorMOG());
}
void CudaBackgroundSubtractorMOG_Close(CudaBackgroundSubtractorMOG b) {
delete b;
}
void CudaBackgroundSubtractorMOG_Apply(CudaBackgroundSubtractorMOG b, GpuMat src, GpuMat dst, Stream s) {
if (s == NULL) {
(*b)->apply(*src, *dst);
return;
}
(*b)->apply(*src, *dst, -1.0, *s);
}