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
77f286ad
Commit
77f286ad
authored
Feb 13, 2012
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed build under linux
added PyrLKOpticalFlowDense performance test
parent
a10fed8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
6 deletions
+39
-6
CMakeLists.txt
modules/gpu/CMakeLists.txt
+1
-1
perf_video.cpp
modules/gpu/perf/perf_video.cpp
+32
-0
surf.cu
modules/gpu/src/cuda/surf.cu
+6
-5
No files found.
modules/gpu/CMakeLists.txt
View file @
77f286ad
...
...
@@ -3,7 +3,7 @@ if(ANDROID OR IOS)
endif
()
set
(
the_description
"GPU-accelerated Computer Vision"
)
ocv_add_module
(
gpu opencv_imgproc opencv_calib3d opencv_objdetect
)
ocv_add_module
(
gpu opencv_imgproc opencv_calib3d opencv_objdetect
opencv_video
)
ocv_module_include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/cuda"
)
...
...
modules/gpu/perf/perf_video.cpp
View file @
77f286ad
...
...
@@ -193,4 +193,36 @@ INSTANTIATE_TEST_CASE_P(Video, PyrLKOpticalFlowSparse, testing::Combine
testing
::
Values
(
17
,
21
)
));
//////////////////////////////////////////////////////
// PyrLKOpticalFlowDense
GPU_PERF_TEST_1
(
PyrLKOpticalFlowDense
,
cv
::
gpu
::
DeviceInfo
)
{
cv
::
gpu
::
DeviceInfo
devInfo
=
GetParam
();
cv
::
gpu
::
setDevice
(
devInfo
.
deviceID
());
cv
::
Mat
frame0_host
=
readImage
(
"gpu/perf/aloe.jpg"
,
cv
::
IMREAD_GRAYSCALE
);
cv
::
Mat
frame1_host
=
readImage
(
"gpu/perf/aloeR.jpg"
,
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
frame0_host
.
empty
());
ASSERT_FALSE
(
frame1_host
.
empty
());
cv
::
gpu
::
GpuMat
frame0
(
frame0_host
);
cv
::
gpu
::
GpuMat
frame1
(
frame1_host
);
cv
::
gpu
::
GpuMat
u
;
cv
::
gpu
::
GpuMat
v
;
cv
::
gpu
::
PyrLKOpticalFlow
pyrLK
;
declare
.
time
(
10
);
TEST_CYCLE
()
{
pyrLK
.
dense
(
frame0
,
frame1
,
u
,
v
);
}
}
INSTANTIATE_TEST_CASE_P
(
Video
,
PyrLKOpticalFlowDense
,
ALL_DEVICES
);
#endif
modules/gpu/src/cuda/surf.cu
View file @
77f286ad
...
...
@@ -541,8 +541,8 @@ namespace cv { namespace gpu { namespace device
angle = atan2f(Y, X);
if (angle < 0)
angle += 2.0f * CV_PI;
angle *= 180.0f / CV_PI;
angle += 2.0f * CV_PI
_F
;
angle *= 180.0f / CV_PI
_F
;
}
}
s_X[tid] = X;
...
...
@@ -636,8 +636,8 @@ namespace cv { namespace gpu { namespace device
{
float kp_dir = atan2f(besty, bestx);
if (kp_dir < 0)
kp_dir += 2.0f * CV_PI;
kp_dir *= 180.0f / CV_PI;
kp_dir += 2.0f * CV_PI
_F
;
kp_dir *= 180.0f / CV_PI
_F
;
featureDir[blockIdx.x] = kp_dir;
}
...
...
@@ -724,7 +724,7 @@ namespace cv { namespace gpu { namespace device
const float centerX = featureX[blockIdx.x];
const float centerY = featureY[blockIdx.x];
const float size = featureSize[blockIdx.x];
const float descriptor_dir = featureDir[blockIdx.x] * (float)(CV_PI
/ 180
);
const float descriptor_dir = featureDir[blockIdx.x] * (float)(CV_PI
_F / 180.0f
);
/* The sampling intervals and wavelet sized for selecting an orientation
and building the keypoint descriptor are defined relative to 's' */
...
...
@@ -817,6 +817,7 @@ namespace cv { namespace gpu { namespace device
calc_dx_dy(sdx, sdy, featureX, featureY, featureSize, featureDir);
__syncthreads();
const int tid = threadIdx.y * blockDim.x + threadIdx.x;
if (tid < 25)
...
...
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