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
51f81eec
Commit
51f81eec
authored
Jun 07, 2013
by
Vadim Pisarevsky
Committed by
OpenCV Buildbot
Jun 07, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #957 from pengx17:2.4_fix_corner_detector
parents
68e4256f
429f84e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
imgproc_calcHarris.cl
modules/ocl/src/opencl/imgproc_calcHarris.cl
+8
-7
imgproc_calcMinEigenVal.cl
modules/ocl/src/opencl/imgproc_calcMinEigenVal.cl
+9
-7
test_optflow.cpp
modules/ocl/test/test_optflow.cpp
+1
-1
No files found.
modules/ocl/src/opencl/imgproc_calcHarris.cl
View file @
51f81eec
...
...
@@ -130,28 +130,29 @@ __kernel void calcHarris(__global const float *Dx,__global const float *Dy, __gl
data[2][i]
=
dy_data[i]
*
dy_data[i]
;
}
#
else
for
(
int
i=0
; i < ksY+1; i++)
{
int
clamped_col
=
min
(
dst_cols,
col
)
;
for
(
int
i=0
; i < ksY+1; i++)
{
int
dx_selected_row
;
int
dx_selected_col
;
dx_selected_row
=
ADDR_H
(
dx_startY+i,
0
,
dx_whole_rows
)
;
dx_selected_row
=
ADDR_B
(
dx_startY+i,
dx_whole_rows,
dx_selected_row
)
;
dx_selected_col
=
ADDR_L
(
dx_startX+col,
0
,
dx_whole_cols
)
;
dx_selected_col
=
ADDR_R
(
dx_startX+col,
dx_whole_cols,
dx_selected_col
)
;
dx_selected_col
=
ADDR_L
(
dx_startX+c
lamped_c
ol,
0
,
dx_whole_cols
)
;
dx_selected_col
=
ADDR_R
(
dx_startX+c
lamped_c
ol,
dx_whole_cols,
dx_selected_col
)
;
dx_data[i]
=
Dx[dx_selected_row
*
(
dx_step>>2
)
+
dx_selected_col]
;
int
dy_selected_row
;
int
dy_selected_col
;
dy_selected_row
=
ADDR_H
(
dy_startY+i,
0
,
dy_whole_rows
)
;
dy_selected_row
=
ADDR_B
(
dy_startY+i,
dy_whole_rows,
dy_selected_row
)
;
dy_selected_col
=
ADDR_L
(
dy_startX+col,
0
,
dy_whole_cols
)
;
dy_selected_col
=
ADDR_R
(
dy_startX+col,
dy_whole_cols,
dy_selected_col
)
;
dy_selected_col
=
ADDR_L
(
dy_startX+c
lamped_c
ol,
0
,
dy_whole_cols
)
;
dy_selected_col
=
ADDR_R
(
dy_startX+c
lamped_c
ol,
dy_whole_cols,
dy_selected_col
)
;
dy_data[i]
=
Dy[dy_selected_row
*
(
dy_step>>2
)
+
dy_selected_col]
;
data[0][i]
=
dx_data[i]
*
dx_data[i]
;
data[1][i]
=
dx_data[i]
*
dy_data[i]
;
data[2][i]
=
dy_data[i]
*
dy_data[i]
;
}
}
#
endif
float
sum0
=
0.0
,
sum1
=
0.0
,
sum2
=
0.0
;
for
(
int
i=1
; i < ksY; i++)
...
...
modules/ocl/src/opencl/imgproc_calcMinEigenVal.cl
View file @
51f81eec
...
...
@@ -130,28 +130,30 @@ __kernel void calcMinEigenVal(__global const float *Dx,__global const float *Dy,
data[2][i]
=
dy_data[i]
*
dy_data[i]
;
}
#
else
for
(
int
i=0
; i < ksY+1; i++)
{
int
clamped_col
=
min
(
dst_cols,
col
)
;
for
(
int
i=0
; i < ksY+1; i++)
{
int
dx_selected_row
;
int
dx_selected_col
;
dx_selected_row
=
ADDR_H
(
dx_startY+i,
0
,
dx_whole_rows
)
;
dx_selected_row
=
ADDR_B
(
dx_startY+i,
dx_whole_rows,
dx_selected_row
)
;
dx_selected_col
=
ADDR_L
(
dx_startX+col,
0
,
dx_whole_cols
)
;
dx_selected_col
=
ADDR_R
(
dx_startX+col,
dx_whole_cols,
dx_selected_col
)
;
dx_selected_col
=
ADDR_L
(
dx_startX+c
lamped_c
ol,
0
,
dx_whole_cols
)
;
dx_selected_col
=
ADDR_R
(
dx_startX+c
lamped_c
ol,
dx_whole_cols,
dx_selected_col
)
;
dx_data[i]
=
Dx[dx_selected_row
*
(
dx_step>>2
)
+
dx_selected_col]
;
int
dy_selected_row
;
int
dy_selected_col
;
dy_selected_row
=
ADDR_H
(
dy_startY+i,
0
,
dy_whole_rows
)
;
dy_selected_row
=
ADDR_B
(
dy_startY+i,
dy_whole_rows,
dy_selected_row
)
;
dy_selected_col
=
ADDR_L
(
dy_startX+col,
0
,
dy_whole_cols
)
;
dy_selected_col
=
ADDR_R
(
dy_startX+col,
dy_whole_cols,
dy_selected_col
)
;
dy_selected_col
=
ADDR_L
(
dy_startX+c
lamped_c
ol,
0
,
dy_whole_cols
)
;
dy_selected_col
=
ADDR_R
(
dy_startX+c
lamped_c
ol,
dy_whole_cols,
dy_selected_col
)
;
dy_data[i]
=
Dy[dy_selected_row
*
(
dy_step>>2
)
+
dy_selected_col]
;
data[0][i]
=
dx_data[i]
*
dx_data[i]
;
data[1][i]
=
dx_data[i]
*
dy_data[i]
;
data[2][i]
=
dy_data[i]
*
dy_data[i]
;
}
}
#
endif
float
sum0
=
0.0
,
sum1
=
0.0
,
sum2
=
0.0
;
for
(
int
i=1
; i < ksY; i++)
...
...
modules/ocl/test/test_optflow.cpp
View file @
51f81eec
...
...
@@ -121,7 +121,7 @@ TEST_P(GoodFeaturesToTrack, EmptyCorners)
cv
::
ocl
::
GoodFeaturesToTrackDetector_OCL
detector
(
maxCorners
,
qualityLevel
,
minDistance
);
cv
::
ocl
::
oclMat
src
(
100
,
1
28
,
CV_8UC1
,
cv
::
Scalar
::
all
(
0
));
cv
::
ocl
::
oclMat
src
(
100
,
1
00
,
CV_8UC1
,
cv
::
Scalar
::
all
(
0
));
cv
::
ocl
::
oclMat
corners
(
1
,
maxCorners
,
CV_32FC2
);
detector
(
src
,
corners
);
...
...
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