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
ca572396
Commit
ca572396
authored
May 02, 2012
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed some problems after r8280 (lost code)
parent
d5a0088b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
114 additions
and
4 deletions
+114
-4
orb.cpp
modules/gpu/src/orb.cpp
+0
-3
test_video.cpp
modules/gpu/test/test_video.cpp
+113
-1
cap_ffmpeg_impl.hpp
modules/highgui/src/cap_ffmpeg_impl.hpp
+0
-0
brox_optical_flow.cpp
samples/gpu/brox_optical_flow.cpp
+1
-0
No files found.
modules/gpu/src/orb.cpp
View file @
ca572396
...
...
@@ -622,9 +622,6 @@ void cv::gpu::ORB_GPU::computeDescriptors(GpuMat& descriptors)
if
(
keyPointsCount_
[
level
]
==
0
)
continue
;
if
(
keyPointsCount_
[
level
]
==
0
)
continue
;
GpuMat
descRange
=
descriptors
.
rowRange
(
offset
,
offset
+
keyPointsCount_
[
level
]);
if
(
blurForDescriptor
)
...
...
modules/gpu/test/test_video.cpp
View file @
ca572396
...
...
@@ -375,7 +375,7 @@ TEST_P(FarnebackOpticalFlow, Accuracy)
EXPECT_MAT_SIMILAR
(
flowxy
[
0
],
d_flowx
,
0.1
);
EXPECT_MAT_SIMILAR
(
flowxy
[
1
],
d_flowy
,
0.1
);
}
;
}
INSTANTIATE_TEST_CASE_P
(
GPU_Video
,
FarnebackOpticalFlow
,
testing
::
Combine
(
ALL_DEVICES
,
...
...
@@ -413,4 +413,116 @@ TEST_P(OpticalFlowNan, Regression)
INSTANTIATE_TEST_CASE_P
(
GPU_Video
,
OpticalFlowNan
,
ALL_DEVICES
);
/////////////////////////////////////////////////////////////////////////////////////////////////
// VideoWriter
#ifdef WIN32
PARAM_TEST_CASE
(
VideoWriter
,
cv
::
gpu
::
DeviceInfo
,
std
::
string
)
{
cv
::
gpu
::
DeviceInfo
devInfo
;
std
::
string
inputFile
;
std
::
string
outputFile
;
virtual
void
SetUp
()
{
devInfo
=
GET_PARAM
(
0
);
inputFile
=
GET_PARAM
(
1
);
cv
::
gpu
::
setDevice
(
devInfo
.
deviceID
());
inputFile
=
std
::
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"video/"
+
inputFile
;
outputFile
=
inputFile
.
substr
(
0
,
inputFile
.
find
(
'.'
))
+
"_test.avi"
;
}
};
TEST_P
(
VideoWriter
,
Regression
)
{
const
double
FPS
=
25.0
;
cv
::
VideoCapture
reader
(
inputFile
);
ASSERT_TRUE
(
reader
.
isOpened
()
);
cv
::
gpu
::
VideoWriter_GPU
d_writer
;
cv
::
Mat
frame
;
std
::
vector
<
cv
::
Mat
>
frames
;
cv
::
gpu
::
GpuMat
d_frame
;
for
(
int
i
=
1
;
i
<
10
;
++
i
)
{
reader
>>
frame
;
if
(
frame
.
empty
())
break
;
frames
.
push_back
(
frame
.
clone
());
d_frame
.
upload
(
frame
);
if
(
!
d_writer
.
isOpened
())
d_writer
.
open
(
outputFile
,
frame
.
size
(),
FPS
);
d_writer
.
write
(
d_frame
);
}
reader
.
release
();
d_writer
.
close
();
reader
.
open
(
outputFile
);
ASSERT_TRUE
(
reader
.
isOpened
()
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
reader
>>
frame
;
ASSERT_FALSE
(
frame
.
empty
()
);
}
}
INSTANTIATE_TEST_CASE_P
(
GPU_Video
,
VideoWriter
,
testing
::
Combine
(
ALL_DEVICES
,
testing
::
Values
(
std
::
string
(
"VID00003-20100701-2204.mpg"
),
std
::
string
(
"big_buck_bunny.mpg"
))));
#endif // WIN32
/////////////////////////////////////////////////////////////////////////////////////////////////
// VideoReader
PARAM_TEST_CASE
(
VideoReader
,
cv
::
gpu
::
DeviceInfo
,
std
::
string
)
{
cv
::
gpu
::
DeviceInfo
devInfo
;
std
::
string
inputFile
;
virtual
void
SetUp
()
{
devInfo
=
GET_PARAM
(
0
);
inputFile
=
GET_PARAM
(
1
);
cv
::
gpu
::
setDevice
(
devInfo
.
deviceID
());
inputFile
=
std
::
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"video/"
+
inputFile
;
}
};
TEST_P
(
VideoReader
,
Regression
)
{
cv
::
gpu
::
VideoReader_GPU
reader
(
inputFile
);
ASSERT_TRUE
(
reader
.
isOpened
()
);
cv
::
gpu
::
GpuMat
frame
;
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
ASSERT_TRUE
(
reader
.
read
(
frame
)
);
ASSERT_FALSE
(
frame
.
empty
()
);
}
reader
.
close
();
ASSERT_FALSE
(
reader
.
isOpened
()
);
}
INSTANTIATE_TEST_CASE_P
(
GPU_Video
,
VideoReader
,
testing
::
Combine
(
ALL_DEVICES
,
testing
::
Values
(
std
::
string
(
"VID00003-20100701-2204.mpg"
))));
}
// namespace
modules/highgui/src/cap_ffmpeg_impl.hpp
View file @
ca572396
This diff is collapsed.
Click to expand it.
samples/gpu/brox_optical_flow.cpp
View file @
ca572396
...
...
@@ -215,6 +215,7 @@ int main(int argc, const char* argv[])
switch
(
key
)
{
case
27
:
return
0
;
case
'A'
:
if
(
currentFrame
>
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