Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
9cb48606
Commit
9cb48606
authored
Dec 26, 2013
by
Pierre-Emmanuel Viel
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/2.4' into LshOrthogonalSubvectors
parents
8e93c19d
41fd711a
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
34 additions
and
33 deletions
+34
-33
canny.cpp
modules/imgproc/src/canny.cpp
+2
-1
color.cpp
modules/imgproc/src/color.cpp
+2
-2
imgwarp.cpp
modules/imgproc/src/imgwarp.cpp
+6
-6
haar.cpp
modules/objdetect/src/haar.cpp
+2
-2
bgfg_mog.cl
modules/ocl/src/opencl/bgfg_mog.cl
+4
-4
kmeans_kernel.cl
modules/ocl/src/opencl/kmeans_kernel.cl
+1
-1
meanShift.cl
modules/ocl/src/opencl/meanShift.cl
+1
-1
objdetect_hog.cl
modules/ocl/src/opencl/objdetect_hog.cl
+1
-1
pyrlk.cl
modules/ocl/src/opencl/pyrlk.cl
+10
-10
stereobp.cl
modules/ocl/src/opencl/stereobp.cl
+2
-2
tvl1flow.cl
modules/ocl/src/opencl/tvl1flow.cl
+3
-3
No files found.
modules/imgproc/src/canny.cpp
View file @
9cb48606
...
@@ -41,12 +41,13 @@
...
@@ -41,12 +41,13 @@
#include "precomp.hpp"
#include "precomp.hpp"
/*
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
#define USE_IPP_CANNY 1
#define USE_IPP_CANNY 1
#else
#else
#undef USE_IPP_CANNY
#undef USE_IPP_CANNY
#endif
#endif
*/
#ifdef USE_IPP_CANNY
#ifdef USE_IPP_CANNY
namespace
cv
namespace
cv
{
{
...
...
modules/imgproc/src/color.cpp
View file @
9cb48606
...
@@ -3737,7 +3737,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
...
@@ -3737,7 +3737,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
CV_Assert
(
scn
==
3
||
scn
==
4
);
CV_Assert
(
scn
==
3
||
scn
==
4
);
_dst
.
create
(
sz
,
CV_MAKETYPE
(
depth
,
1
));
_dst
.
create
(
sz
,
CV_MAKETYPE
(
depth
,
1
));
dst
=
_dst
.
getMat
();
dst
=
_dst
.
getMat
();
/*
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
if( code == CV_BGR2GRAY )
if( code == CV_BGR2GRAY )
{
{
...
@@ -3760,7 +3760,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
...
@@ -3760,7 +3760,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
return;
return;
}
}
#endif
#endif
*/
bidx
=
code
==
CV_BGR2GRAY
||
code
==
CV_BGRA2GRAY
?
0
:
2
;
bidx
=
code
==
CV_BGR2GRAY
||
code
==
CV_BGRA2GRAY
?
0
:
2
;
if
(
depth
==
CV_8U
)
if
(
depth
==
CV_8U
)
...
...
modules/imgproc/src/imgwarp.cpp
View file @
9cb48606
...
@@ -1846,7 +1846,7 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
...
@@ -1846,7 +1846,7 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
int
depth
=
src
.
depth
(),
cn
=
src
.
channels
();
int
depth
=
src
.
depth
(),
cn
=
src
.
channels
();
double
scale_x
=
1.
/
inv_scale_x
,
scale_y
=
1.
/
inv_scale_y
;
double
scale_x
=
1.
/
inv_scale_x
,
scale_y
=
1.
/
inv_scale_y
;
int
k
,
sx
,
sy
,
dx
,
dy
;
int
k
,
sx
,
sy
,
dx
,
dy
;
/*
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
int mode = interpolation == INTER_LINEAR ? IPPI_INTER_LINEAR : 0;
int mode = interpolation == INTER_LINEAR ? IPPI_INTER_LINEAR : 0;
int type = src.type();
int type = src.type();
...
@@ -1874,7 +1874,7 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
...
@@ -1874,7 +1874,7 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
return;
return;
}
}
#endif
#endif
*/
if
(
interpolation
==
INTER_NEAREST
)
if
(
interpolation
==
INTER_NEAREST
)
{
{
resizeNN
(
src
,
dst
,
inv_scale_x
,
inv_scale_y
);
resizeNN
(
src
,
dst
,
inv_scale_x
,
inv_scale_y
);
...
@@ -3477,7 +3477,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
...
@@ -3477,7 +3477,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
int
*
adelta
=
&
_abdelta
[
0
],
*
bdelta
=
adelta
+
dst
.
cols
;
int
*
adelta
=
&
_abdelta
[
0
],
*
bdelta
=
adelta
+
dst
.
cols
;
const
int
AB_BITS
=
MAX
(
10
,
(
int
)
INTER_BITS
);
const
int
AB_BITS
=
MAX
(
10
,
(
int
)
INTER_BITS
);
const
int
AB_SCALE
=
1
<<
AB_BITS
;
const
int
AB_SCALE
=
1
<<
AB_BITS
;
/*
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
int depth = src.depth();
int depth = src.depth();
int channels = src.channels();
int channels = src.channels();
...
@@ -3521,7 +3521,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
...
@@ -3521,7 +3521,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
}
}
}
}
#endif
#endif
*/
for
(
x
=
0
;
x
<
dst
.
cols
;
x
++
)
for
(
x
=
0
;
x
<
dst
.
cols
;
x
++
)
{
{
adelta
[
x
]
=
saturate_cast
<
int
>
(
M
[
0
]
*
x
*
AB_SCALE
);
adelta
[
x
]
=
saturate_cast
<
int
>
(
M
[
0
]
*
x
*
AB_SCALE
);
...
@@ -3702,7 +3702,7 @@ void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0,
...
@@ -3702,7 +3702,7 @@ void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0,
if
(
!
(
flags
&
WARP_INVERSE_MAP
)
)
if
(
!
(
flags
&
WARP_INVERSE_MAP
)
)
invert
(
matM
,
matM
);
invert
(
matM
,
matM
);
/*
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
int depth = src.depth();
int depth = src.depth();
int channels = src.channels();
int channels = src.channels();
...
@@ -3746,7 +3746,7 @@ void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0,
...
@@ -3746,7 +3746,7 @@ void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0,
}
}
}
}
#endif
#endif
*/
Range
range
(
0
,
dst
.
rows
);
Range
range
(
0
,
dst
.
rows
);
warpPerspectiveInvoker
invoker
(
src
,
dst
,
M
,
interpolation
,
borderType
,
borderValue
);
warpPerspectiveInvoker
invoker
(
src
,
dst
,
M
,
interpolation
,
borderType
,
borderValue
);
parallel_for_
(
range
,
invoker
,
dst
.
total
()
/
(
double
)(
1
<<
16
));
parallel_for_
(
range
,
invoker
,
dst
.
total
()
/
(
double
)(
1
<<
16
));
...
...
modules/objdetect/src/haar.cpp
View file @
9cb48606
...
@@ -335,7 +335,7 @@ icvCreateHidHaarClassifierCascade( CvHaarClassifierCascade* cascade )
...
@@ -335,7 +335,7 @@ icvCreateHidHaarClassifierCascade( CvHaarClassifierCascade* cascade )
out
->
isStumpBased
&=
node_count
==
1
;
out
->
isStumpBased
&=
node_count
==
1
;
}
}
}
}
/*
#ifdef HAVE_IPP
#ifdef HAVE_IPP
int can_use_ipp = !out->has_tilted_features && !out->is_tree && out->isStumpBased;
int can_use_ipp = !out->has_tilted_features && !out->is_tree && out->isStumpBased;
...
@@ -391,7 +391,7 @@ icvCreateHidHaarClassifierCascade( CvHaarClassifierCascade* cascade )
...
@@ -391,7 +391,7 @@ icvCreateHidHaarClassifierCascade( CvHaarClassifierCascade* cascade )
}
}
}
}
#endif
#endif
*/
cascade
->
hid_cascade
=
out
;
cascade
->
hid_cascade
=
out
;
assert
(
(
char
*
)
haar_node_ptr
-
(
char
*
)
out
<=
datasize
);
assert
(
(
char
*
)
haar_node_ptr
-
(
char
*
)
out
<=
datasize
);
...
...
modules/ocl/src/opencl/bgfg_mog.cl
View file @
9cb48606
...
@@ -63,7 +63,7 @@ inline float sum(float val)
...
@@ -63,7 +63,7 @@ inline float sum(float val)
return
val
;
return
val
;
}
}
static
float
clamp1
(
float
var,
float
learningRate,
float
diff,
float
minVar
)
inline
float
clamp1
(
float
var,
float
learningRate,
float
diff,
float
minVar
)
{
{
return
fmax
(
var
+
learningRate
*
(
diff
*
diff
-
var
)
,
minVar
)
;
return
fmax
(
var
+
learningRate
*
(
diff
*
diff
-
var
)
,
minVar
)
;
}
}
...
@@ -96,7 +96,7 @@ inline float sum(const float4 val)
...
@@ -96,7 +96,7 @@ inline float sum(const float4 val)
return
(
val.x
+
val.y
+
val.z
)
;
return
(
val.x
+
val.y
+
val.z
)
;
}
}
static
void
swap4
(
__global
float4*
ptr,
int
x,
int
y,
int
k,
int
rows,
int
ptr_step
)
inline
void
swap4
(
__global
float4*
ptr,
int
x,
int
y,
int
k,
int
rows,
int
ptr_step
)
{
{
float4
val
=
ptr[
(
k
*
rows
+
y
)
*
ptr_step
+
x]
;
float4
val
=
ptr[
(
k
*
rows
+
y
)
*
ptr_step
+
x]
;
ptr[
(
k
*
rows
+
y
)
*
ptr_step
+
x]
=
ptr[
((
k
+
1
)
*
rows
+
y
)
*
ptr_step
+
x]
;
ptr[
(
k
*
rows
+
y
)
*
ptr_step
+
x]
=
ptr[
((
k
+
1
)
*
rows
+
y
)
*
ptr_step
+
x]
;
...
@@ -104,7 +104,7 @@ static void swap4(__global float4* ptr, int x, int y, int k, int rows, int ptr_s
...
@@ -104,7 +104,7 @@ static void swap4(__global float4* ptr, int x, int y, int k, int rows, int ptr_s
}
}
static
float4
clamp1
(
const
float4
var,
float
learningRate,
const
float4
diff,
float
minVar
)
inline
float4
clamp1
(
const
float4
var,
float
learningRate,
const
float4
diff,
float
minVar
)
{
{
float4
result
;
float4
result
;
result.x
=
fmax
(
var.x
+
learningRate
*
(
diff.x
*
diff.x
-
var.x
)
,
minVar
)
;
result.x
=
fmax
(
var.x
+
learningRate
*
(
diff.x
*
diff.x
-
var.x
)
,
minVar
)
;
...
@@ -128,7 +128,7 @@ typedef struct
...
@@ -128,7 +128,7 @@ typedef struct
uchar
c_shadowVal
;
uchar
c_shadowVal
;
}
con_srtuct_t
;
}
con_srtuct_t
;
static
void
swap
(
__global
float*
ptr,
int
x,
int
y,
int
k,
int
rows,
int
ptr_step
)
inline
void
swap
(
__global
float*
ptr,
int
x,
int
y,
int
k,
int
rows,
int
ptr_step
)
{
{
float
val
=
ptr[
(
k
*
rows
+
y
)
*
ptr_step
+
x]
;
float
val
=
ptr[
(
k
*
rows
+
y
)
*
ptr_step
+
x]
;
ptr[
(
k
*
rows
+
y
)
*
ptr_step
+
x]
=
ptr[
((
k
+
1
)
*
rows
+
y
)
*
ptr_step
+
x]
;
ptr[
(
k
*
rows
+
y
)
*
ptr_step
+
x]
=
ptr[
((
k
+
1
)
*
rows
+
y
)
*
ptr_step
+
x]
;
...
...
modules/ocl/src/opencl/kmeans_kernel.cl
View file @
9cb48606
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
//
//
//M*/
//M*/
static
float
distance_
(
__global
const
float
*
center,
__global
const
float
*
src,
int
feature_length
)
inline
float
distance_
(
__global
const
float
*
center,
__global
const
float
*
src,
int
feature_length
)
{
{
float
res
=
0
;
float
res
=
0
;
float4
v0,
v1,
v2
;
float4
v0,
v1,
v2
;
...
...
modules/ocl/src/opencl/meanShift.cl
View file @
9cb48606
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
//
//
//M*/
//M*/
static
short2
do_mean_shift
(
int
x0,
int
y0,
__global
uchar4*
out,int
out_step,
inline
short2
do_mean_shift
(
int
x0,
int
y0,
__global
uchar4*
out,int
out_step,
__global
uchar4*
in,
int
in_step,
int
dst_off,
int
src_off,
__global
uchar4*
in,
int
in_step,
int
dst_off,
int
src_off,
int
cols,
int
rows,
int
sp,
int
sr,
int
maxIter,
float
eps
)
int
cols,
int
rows,
int
sp,
int
sr,
int
maxIter,
float
eps
)
{
{
...
...
modules/ocl/src/opencl/objdetect_hog.cl
View file @
9cb48606
...
@@ -208,7 +208,7 @@ __kernel void normalize_hists_36_kernel(__global float* block_hists,
...
@@ -208,7 +208,7 @@ __kernel void normalize_hists_36_kernel(__global float* block_hists,
//-------------------------------------------------------------
//-------------------------------------------------------------
//
Normalization
of
histograms
via
L2Hys_norm
//
Normalization
of
histograms
via
L2Hys_norm
//
//
static
float
reduce_smem
(
volatile
__local
float*
smem,
int
size
)
inline
float
reduce_smem
(
volatile
__local
float*
smem,
int
size
)
{
{
unsigned
int
tid
=
get_local_id
(
0
)
;
unsigned
int
tid
=
get_local_id
(
0
)
;
float
sum
=
smem[tid]
;
float
sum
=
smem[tid]
;
...
...
modules/ocl/src/opencl/pyrlk.cl
View file @
9cb48606
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
#
endif
#
endif
#
ifdef
CPU
#
ifdef
CPU
static
void
reduce3
(
float
val1,
float
val2,
float
val3,
__local
float*
smem1,
__local
float*
smem2,
__local
float*
smem3,
int
tid
)
inline
void
reduce3
(
float
val1,
float
val2,
float
val3,
__local
float*
smem1,
__local
float*
smem2,
__local
float*
smem3,
int
tid
)
{
{
smem1[tid]
=
val1
;
smem1[tid]
=
val1
;
smem2[tid]
=
val2
;
smem2[tid]
=
val2
;
...
@@ -71,7 +71,7 @@ static void reduce3(float val1, float val2, float val3, __local float* smem1,
...
@@ -71,7 +71,7 @@ static void reduce3(float val1, float val2, float val3, __local float* smem1,
}
}
}
}
static
void
reduce2
(
float
val1,
float
val2,
volatile
__local
float*
smem1,
volatile
__local
float*
smem2,
int
tid
)
inline
void
reduce2
(
float
val1,
float
val2,
volatile
__local
float*
smem1,
volatile
__local
float*
smem2,
int
tid
)
{
{
smem1[tid]
=
val1
;
smem1[tid]
=
val1
;
smem2[tid]
=
val2
;
smem2[tid]
=
val2
;
...
@@ -88,7 +88,7 @@ static void reduce2(float val1, float val2, volatile __local float* smem1, volat
...
@@ -88,7 +88,7 @@ static void reduce2(float val1, float val2, volatile __local float* smem1, volat
}
}
}
}
static
void
reduce1
(
float
val1,
volatile
__local
float*
smem1,
int
tid
)
inline
void
reduce1
(
float
val1,
volatile
__local
float*
smem1,
int
tid
)
{
{
smem1[tid]
=
val1
;
smem1[tid]
=
val1
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
...
@@ -103,7 +103,7 @@ static void reduce1(float val1, volatile __local float* smem1, int tid)
...
@@ -103,7 +103,7 @@ static void reduce1(float val1, volatile __local float* smem1, int tid)
}
}
}
}
#
else
#
else
static
void
reduce3
(
float
val1,
float
val2,
float
val3,
inline
void
reduce3
(
float
val1,
float
val2,
float
val3,
__local
volatile
float*
smem1,
__local
volatile
float*
smem2,
__local
volatile
float*
smem3,
int
tid
)
__local
volatile
float*
smem1,
__local
volatile
float*
smem2,
__local
volatile
float*
smem3,
int
tid
)
{
{
smem1[tid]
=
val1
;
smem1[tid]
=
val1
;
...
@@ -150,7 +150,7 @@ static void reduce3(float val1, float val2, float val3,
...
@@ -150,7 +150,7 @@ static void reduce3(float val1, float val2, float val3,
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
}
}
static
void
reduce2
(
float
val1,
float
val2,
__local
volatile
float*
smem1,
__local
volatile
float*
smem2,
int
tid
)
inline
void
reduce2
(
float
val1,
float
val2,
__local
volatile
float*
smem1,
__local
volatile
float*
smem2,
int
tid
)
{
{
smem1[tid]
=
val1
;
smem1[tid]
=
val1
;
smem2[tid]
=
val2
;
smem2[tid]
=
val2
;
...
@@ -189,7 +189,7 @@ static void reduce2(float val1, float val2, __local volatile float* smem1, __loc
...
@@ -189,7 +189,7 @@ static void reduce2(float val1, float val2, __local volatile float* smem1, __loc
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
}
}
static
void
reduce1
(
float
val1,
__local
volatile
float*
smem1,
int
tid
)
inline
void
reduce1
(
float
val1,
__local
volatile
float*
smem1,
int
tid
)
{
{
smem1[tid]
=
val1
;
smem1[tid]
=
val1
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
...
@@ -225,7 +225,7 @@ static void reduce1(float val1, __local volatile float* smem1, int tid)
...
@@ -225,7 +225,7 @@ static void reduce1(float val1, __local volatile float* smem1, int tid)
//
Image
read
mode
//
Image
read
mode
__constant
sampler_t
sampler
=
CLK_NORMALIZED_COORDS_FALSE
| CLK_ADDRESS_CLAMP_TO_EDGE |
CLK_FILTER_LINEAR
;
__constant
sampler_t
sampler
=
CLK_NORMALIZED_COORDS_FALSE
| CLK_ADDRESS_CLAMP_TO_EDGE |
CLK_FILTER_LINEAR
;
static
void
SetPatch
(
image2d_t
I,
float
x,
float
y,
inline
void
SetPatch
(
image2d_t
I,
float
x,
float
y,
float*
Pch,
float*
Dx,
float*
Dy,
float*
Pch,
float*
Dx,
float*
Dy,
float*
A11,
float*
A12,
float*
A22
)
float*
A11,
float*
A12,
float*
A22
)
{
{
...
@@ -262,7 +262,7 @@ inline void GetError(image2d_t J, const float x, const float y, const float* Pch
...
@@ -262,7 +262,7 @@ inline void GetError(image2d_t J, const float x, const float y, const float* Pch
*errval
+=
fabs
(
diff
)
;
*errval
+=
fabs
(
diff
)
;
}
}
static
void
SetPatch4
(
image2d_t
I,
const
float
x,
const
float
y,
inline
void
SetPatch4
(
image2d_t
I,
const
float
x,
const
float
y,
float4*
Pch,
float4*
Dx,
float4*
Dy,
float4*
Pch,
float4*
Dx,
float4*
Dy,
float*
A11,
float*
A12,
float*
A22
)
float*
A11,
float*
A12,
float*
A22
)
{
{
...
@@ -285,7 +285,7 @@ static void SetPatch4(image2d_t I, const float x, const float y,
...
@@ -285,7 +285,7 @@ static void SetPatch4(image2d_t I, const float x, const float y,
*A22
+=
sqIdx.x
+
sqIdx.y
+
sqIdx.z
;
*A22
+=
sqIdx.x
+
sqIdx.y
+
sqIdx.z
;
}
}
static
void
GetPatch4
(
image2d_t
J,
const
float
x,
const
float
y,
inline
void
GetPatch4
(
image2d_t
J,
const
float
x,
const
float
y,
const
float4*
Pch,
const
float4*
Dx,
const
float4*
Dy,
const
float4*
Pch,
const
float4*
Dx,
const
float4*
Dy,
float*
b1,
float*
b2
)
float*
b1,
float*
b2
)
{
{
...
@@ -297,7 +297,7 @@ static void GetPatch4(image2d_t J, const float x, const float y,
...
@@ -297,7 +297,7 @@ static void GetPatch4(image2d_t J, const float x, const float y,
*b2
+=
xdiff.x
+
xdiff.y
+
xdiff.z
;
*b2
+=
xdiff.x
+
xdiff.y
+
xdiff.z
;
}
}
static
void
GetError4
(
image2d_t
J,
const
float
x,
const
float
y,
const
float4*
Pch,
float*
errval
)
inline
void
GetError4
(
image2d_t
J,
const
float
x,
const
float
y,
const
float4*
Pch,
float*
errval
)
{
{
float4
diff
=
read_imagef
(
J,
sampler,
(
float2
)(
x,y
))
-*Pch
;
float4
diff
=
read_imagef
(
J,
sampler,
(
float2
)(
x,y
))
-*Pch
;
*errval
+=
fabs
(
diff.x
)
+
fabs
(
diff.y
)
+
fabs
(
diff.z
)
;
*errval
+=
fabs
(
diff.x
)
+
fabs
(
diff.y
)
+
fabs
(
diff.z
)
;
...
...
modules/ocl/src/opencl/stereobp.cl
View file @
9cb48606
...
@@ -97,7 +97,7 @@ inline float pix_diff_1(const uchar4 l, __global const uchar *rs)
...
@@ -97,7 +97,7 @@ inline float pix_diff_1(const uchar4 l, __global const uchar *rs)
return
abs
((
int
)(
l.x
)
-
*rs
)
;
return
abs
((
int
)(
l.x
)
-
*rs
)
;
}
}
static
float
pix_diff_4
(
const
uchar4
l,
__global
const
uchar
*rs
)
inline
float
pix_diff_4
(
const
uchar4
l,
__global
const
uchar
*rs
)
{
{
uchar4
r
;
uchar4
r
;
r
=
*
((
__global
uchar4
*
)
rs
)
;
r
=
*
((
__global
uchar4
*
)
rs
)
;
...
@@ -233,7 +233,7 @@ __kernel void level_up_message(__global T *src, int src_rows, int src_step,
...
@@ -233,7 +233,7 @@ __kernel void level_up_message(__global T *src, int src_rows, int src_step,
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
////////////////////
calc
all
iterations
/////////////////////
////////////////////
calc
all
iterations
/////////////////////
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
static
void
message
(
__global
T
*us_,
__global
T
*ds_,
__global
T
*ls_,
__global
T
*rs_,
inline
void
message
(
__global
T
*us_,
__global
T
*ds_,
__global
T
*ls_,
__global
T
*rs_,
const
__global
T
*dt,
const
__global
T
*dt,
int
u_step,
int
msg_disp_step,
int
data_disp_step,
int
u_step,
int
msg_disp_step,
int
data_disp_step,
float4
cmax_disc_term,
float4
cdisc_single_jump
)
float4
cmax_disc_term,
float4
cdisc_single_jump
)
...
...
modules/ocl/src/opencl/tvl1flow.cl
View file @
9cb48606
...
@@ -62,7 +62,7 @@ __kernel void centeredGradientKernel(__global const float* src, int src_col, int
...
@@ -62,7 +62,7 @@ __kernel void centeredGradientKernel(__global const float* src, int src_col, int
}
}
static
float
bicubicCoeff
(
float
x_
)
inline
float
bicubicCoeff
(
float
x_
)
{
{
float
x
=
fabs
(
x_
)
;
float
x
=
fabs
(
x_
)
;
...
@@ -156,7 +156,7 @@ __kernel void warpBackwardKernel(__global const float* I0, int I0_step, int I0_c
...
@@ -156,7 +156,7 @@ __kernel void warpBackwardKernel(__global const float* I0, int I0_step, int I0_c
}
}
static
float
readImage
(
__global
float
*image,
int
x,
int
y,
int
rows,
int
cols,
int
elemCntPerRow
)
inline
float
readImage
(
__global
float
*image,
int
x,
int
y,
int
rows,
int
cols,
int
elemCntPerRow
)
{
{
int
i0
=
clamp
(
x,
0
,
cols
-
1
)
;
int
i0
=
clamp
(
x,
0
,
cols
-
1
)
;
int
j0
=
clamp
(
y,
0
,
rows
-
1
)
;
int
j0
=
clamp
(
y,
0
,
rows
-
1
)
;
...
@@ -284,7 +284,7 @@ __kernel void estimateDualVariablesKernel(__global const float* u1, int u1_col,
...
@@ -284,7 +284,7 @@ __kernel void estimateDualVariablesKernel(__global const float* u1, int u1_col,
}
}
static
float
divergence
(
__global
const
float*
v1,
__global
const
float*
v2,
int
y,
int
x,
int
v1_step,
int
v2_step
)
inline
float
divergence
(
__global
const
float*
v1,
__global
const
float*
v2,
int
y,
int
x,
int
v1_step,
int
v2_step
)
{
{
if
(
x
>
0
&&
y
>
0
)
if
(
x
>
0
&&
y
>
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment