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
b0606b05
Commit
b0606b05
authored
Jul 10, 2012
by
Marina Kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LBP classifer moved to ptr from DevMem2D
parent
436d2ff1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
lbp.cu
modules/gpu/src/cuda/lbp.cu
+1
-1
lbp.hpp
modules/gpu/src/opencv2/gpu/device/lbp.hpp
+13
-13
No files found.
modules/gpu/src/cuda/lbp.cu
View file @
b0606b05
...
...
@@ -69,7 +69,7 @@ namespace cv { namespace gpu { namespace device
ClNode node = nodes[current_node];
uchar4 feature = features[node.featureIdx];
int c = evaluator( (y + feature.y) * istep + x + feature.x , feature, integral, istep);
int c = evaluator( (y + feature.y) * istep + x + feature.x , feature
.w * istep, feature.z
, integral, istep);
const int* subsetIdx = subsets + (current_node * subsetSize);
int idx = (subsetIdx[c >> 5] & ( 1 << (c & 31))) ? current_leave : current_leave + 1;
...
...
modules/gpu/src/opencv2/gpu/device/lbp.hpp
View file @
b0606b05
...
...
@@ -160,38 +160,38 @@ __device__ __forceinline__ T __atomicMin(T* address, T val)
__device__
__forceinline__
LBP
()
{}
//feature as uchar x, y - left top, z,w - right bottom
__device__
__forceinline__
int
operator
()
(
unsigned
int
y
,
uchar4
feature
,
const
int
*
integral
,
int
step
)
const
__device__
__forceinline__
int
operator
()
(
unsigned
int
y
,
int
featurew
,
int
featurez
,
const
int
*
integral
,
int
step
)
const
{
int
x_off
=
2
*
feature
.
z
;
int
x_off
=
2
*
featurez
;
int
anchors
[
9
];
anchors
[
0
]
=
integral
[
y
];
anchors
[
1
]
=
integral
[
y
+
feature
.
z
];
anchors
[
1
]
=
integral
[
y
+
featurez
];
anchors
[
0
]
-=
anchors
[
1
];
anchors
[
2
]
=
integral
[
y
+
x_off
];
anchors
[
1
]
-=
anchors
[
2
];
anchors
[
2
]
-=
integral
[
y
+
feature
.
z
+
x_off
];
y
+=
feature
.
w
*
step
;
anchors
[
2
]
-=
integral
[
y
+
featurez
+
x_off
];
y
+=
featurew
;
anchors
[
3
]
=
integral
[
y
];
anchors
[
4
]
=
integral
[
y
+
feature
.
z
];
anchors
[
4
]
=
integral
[
y
+
featurez
];
anchors
[
3
]
-=
anchors
[
4
];
anchors
[
5
]
=
integral
[
y
+
x_off
];
anchors
[
4
]
-=
anchors
[
5
];
anchors
[
5
]
-=
integral
[
y
+
feature
.
z
+
x_off
];
anchors
[
5
]
-=
integral
[
y
+
featurez
+
x_off
];
anchors
[
0
]
-=
anchors
[
3
];
anchors
[
1
]
-=
anchors
[
4
];
anchors
[
2
]
-=
anchors
[
5
];
// 0 - 2 contains s0 - s2
y
+=
feature
.
w
*
step
;
y
+=
featurew
;
anchors
[
6
]
=
integral
[
y
];
anchors
[
7
]
=
integral
[
y
+
feature
.
z
];
anchors
[
7
]
=
integral
[
y
+
featurez
];
anchors
[
6
]
-=
anchors
[
7
];
anchors
[
8
]
=
integral
[
y
+
x_off
];
anchors
[
7
]
-=
anchors
[
8
];
anchors
[
8
]
-=
integral
[
y
+
x_off
+
feature
.
z
];
anchors
[
8
]
-=
integral
[
y
+
x_off
+
featurez
];
anchors
[
3
]
-=
anchors
[
6
];
anchors
[
4
]
-=
anchors
[
7
];
...
...
@@ -210,13 +210,13 @@ __device__ __forceinline__ T __atomicMin(T* address, T val)
response
|=
(
~
(
anchors
[
5
]
>>
31
))
&
16
;
response
|=
(
~
(
anchors
[
3
]
>>
31
))
&
1
;
y
+=
feature
.
w
*
step
;
y
+=
featurew
;
anchors
[
0
]
=
integral
[
y
];
anchors
[
1
]
=
integral
[
y
+
feature
.
z
];
anchors
[
1
]
=
integral
[
y
+
featurez
];
anchors
[
0
]
-=
anchors
[
1
];
anchors
[
2
]
=
integral
[
y
+
x_off
];
anchors
[
1
]
-=
anchors
[
2
];
anchors
[
2
]
-=
integral
[
y
+
x_off
+
feature
.
z
];
anchors
[
2
]
-=
integral
[
y
+
x_off
+
featurez
];
anchors
[
6
]
-=
anchors
[
0
];
anchors
[
7
]
-=
anchors
[
1
];
...
...
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