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
93f757f8
Commit
93f757f8
authored
Aug 13, 2013
by
Roman Donchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Boring changes - superres.
parent
f21851f0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
24 deletions
+25
-24
perf_superres.cpp
modules/superres/perf/perf_superres.cpp
+2
-2
perf_superres_ocl.cpp
modules/superres/perf/perf_superres_ocl.cpp
+1
-1
btv_l1.cpp
modules/superres/src/btv_l1.cpp
+2
-2
btv_l1_gpu.cpp
modules/superres/src/btv_l1_gpu.cpp
+1
-1
btv_l1_ocl.cpp
modules/superres/src/btv_l1_ocl.cpp
+1
-1
frame_source.cpp
modules/superres/src/frame_source.cpp
+4
-4
optical_flow.cpp
modules/superres/src/optical_flow.cpp
+10
-10
test_superres.cpp
modules/superres/test/test_superres.cpp
+4
-3
No files found.
modules/superres/perf/perf_superres.cpp
View file @
93f757f8
...
...
@@ -153,7 +153,7 @@ PERF_TEST_P(Size_MatType, SuperResolution_BTVL1,
superRes
->
set
(
"temporalAreaRadius"
,
temporalAreaRadius
);
superRes
->
set
(
"opticalFlow"
,
opticalFlow
);
superRes
->
setInput
(
new
OneFrameSource_GPU
(
GpuMat
(
frame
)));
superRes
->
setInput
(
makePtr
<
OneFrameSource_GPU
>
(
GpuMat
(
frame
)));
GpuMat
dst
;
superRes
->
nextFrame
(
dst
);
...
...
@@ -171,7 +171,7 @@ PERF_TEST_P(Size_MatType, SuperResolution_BTVL1,
superRes
->
set
(
"temporalAreaRadius"
,
temporalAreaRadius
);
superRes
->
set
(
"opticalFlow"
,
opticalFlow
);
superRes
->
setInput
(
new
OneFrameSource_CPU
(
frame
));
superRes
->
setInput
(
makePtr
<
OneFrameSource_CPU
>
(
frame
));
Mat
dst
;
superRes
->
nextFrame
(
dst
);
...
...
modules/superres/perf/perf_superres_ocl.cpp
View file @
93f757f8
...
...
@@ -134,7 +134,7 @@ PERF_TEST_P(Size_MatType, SuperResolution_BTVL1_OCL,
superRes_ocl
->
set
(
"temporalAreaRadius"
,
temporalAreaRadius
);
superRes_ocl
->
set
(
"opticalFlow"
,
opticalFlowOcl
);
superRes_ocl
->
setInput
(
new
OneFrameSource_OCL
(
frame_ocl
));
superRes_ocl
->
setInput
(
makePtr
<
OneFrameSource_OCL
>
(
frame_ocl
));
ocl
::
oclMat
dst_ocl
;
superRes_ocl
->
nextFrame
(
dst_ocl
);
...
...
modules/superres/src/btv_l1.cpp
View file @
93f757f8
...
...
@@ -337,7 +337,7 @@ namespace
// update blur filter and btv weights
if
(
filter_
.
empty
()
||
blurKernelSize_
!=
curBlurKernelSize_
||
blurSigma_
!=
curBlurSigma_
||
src
[
0
].
type
()
!=
curSrcType_
)
if
(
!
filter_
||
blurKernelSize_
!=
curBlurKernelSize_
||
blurSigma_
!=
curBlurSigma_
||
src
[
0
].
type
()
!=
curSrcType_
)
{
filter_
=
createGaussianFilter
(
src
[
0
].
type
(),
Size
(
blurKernelSize_
,
blurKernelSize_
),
blurSigma_
);
curBlurKernelSize_
=
blurKernelSize_
;
...
...
@@ -614,5 +614,5 @@ namespace
Ptr
<
SuperResolution
>
cv
::
superres
::
createSuperResolution_BTVL1
()
{
return
new
BTVL1
;
return
makePtr
<
BTVL1
>
()
;
}
modules/superres/src/btv_l1_gpu.cpp
View file @
93f757f8
...
...
@@ -578,7 +578,7 @@ namespace
Ptr
<
SuperResolution
>
cv
::
superres
::
createSuperResolution_BTVL1_GPU
()
{
return
new
BTVL1_GPU
;
return
makePtr
<
BTVL1_GPU
>
()
;
}
#endif // HAVE_CUDA
modules/superres/src/btv_l1_ocl.cpp
View file @
93f757f8
...
...
@@ -743,6 +743,6 @@ namespace
Ptr
<
SuperResolution
>
cv
::
superres
::
createSuperResolution_BTVL1_OCL
()
{
return
new
BTVL1_OCL
;
return
makePtr
<
BTVL1_OCL
>
()
;
}
#endif
modules/superres/src/frame_source.cpp
View file @
93f757f8
...
...
@@ -74,7 +74,7 @@ namespace
Ptr
<
FrameSource
>
cv
::
superres
::
createFrameSource_Empty
()
{
return
new
EmptyFrameSource
;
return
makePtr
<
EmptyFrameSource
>
()
;
}
//////////////////////////////////////////////////////
...
...
@@ -186,12 +186,12 @@ namespace
Ptr
<
FrameSource
>
cv
::
superres
::
createFrameSource_Video
(
const
String
&
fileName
)
{
return
new
VideoFrameSource
(
fileName
);
return
makePtr
<
VideoFrameSource
>
(
fileName
);
}
Ptr
<
FrameSource
>
cv
::
superres
::
createFrameSource_Camera
(
int
deviceId
)
{
return
new
CameraFrameSource
(
deviceId
);
return
makePtr
<
CameraFrameSource
>
(
deviceId
);
}
#endif // HAVE_OPENCV_HIGHGUI
...
...
@@ -257,7 +257,7 @@ namespace
Ptr
<
FrameSource
>
cv
::
superres
::
createFrameSource_Video_GPU
(
const
String
&
fileName
)
{
return
new
VideoFrameSource
(
fileName
);
return
makePtr
<
VideoFrameSource
>
(
fileName
);
}
#endif // HAVE_OPENCV_GPUCODEC
modules/superres/src/optical_flow.cpp
View file @
93f757f8
...
...
@@ -169,7 +169,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_Farneback
()
{
return
new
Farneback
;
return
makePtr
<
Farneback
>
()
;
}
///////////////////////////////////////////////////////////////////
...
...
@@ -258,7 +258,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_Simple
()
{
return
new
Simple
;
return
makePtr
<
Simple
>
()
;
}
///////////////////////////////////////////////////////////////////
...
...
@@ -337,7 +337,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_DualTVL1
()
{
return
new
DualTVL1
;
return
makePtr
<
DualTVL1
>
()
;
}
///////////////////////////////////////////////////////////////////
...
...
@@ -503,7 +503,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_Brox_GPU
()
{
return
new
Brox_GPU
;
return
makePtr
<
Brox_GPU
>
()
;
}
///////////////////////////////////////////////////////////////////
...
...
@@ -562,7 +562,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_PyrLK_GPU
()
{
return
new
PyrLK_GPU
;
return
makePtr
<
PyrLK_GPU
>
()
;
}
///////////////////////////////////////////////////////////////////
...
...
@@ -636,7 +636,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_Farneback_GPU
()
{
return
new
Farneback_GPU
;
return
makePtr
<
Farneback_GPU
>
()
;
}
///////////////////////////////////////////////////////////////////
...
...
@@ -714,7 +714,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_DualTVL1_GPU
()
{
return
new
DualTVL1_GPU
;
return
makePtr
<
DualTVL1_GPU
>
()
;
}
#endif // HAVE_OPENCV_GPUOPTFLOW
...
...
@@ -827,7 +827,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_PyrLK_OCL
()
{
return
new
PyrLK_OCL
;
return
makePtr
<
PyrLK_OCL
>
()
;
}
///////////////////////////////////////////////////////////////////
...
...
@@ -906,7 +906,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_DualTVL1_OCL
()
{
return
new
DualTVL1_OCL
;
return
makePtr
<
DualTVL1_OCL
>
()
;
}
///////////////////////////////////////////////////////////////////
...
...
@@ -980,7 +980,7 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
cv
::
superres
::
createOptFlow_Farneback_OCL
()
{
return
new
FarneBack_OCL
;
return
makePtr
<
FarneBack_OCL
>
()
;
}
#endif
modules/superres/test/test_superres.cpp
View file @
93f757f8
...
...
@@ -59,7 +59,7 @@ private:
AllignedFrameSource
::
AllignedFrameSource
(
const
cv
::
Ptr
<
cv
::
superres
::
FrameSource
>&
base
,
int
scale
)
:
base_
(
base
),
scale_
(
scale
)
{
CV_Assert
(
!
base_
.
empty
()
);
CV_Assert
(
base_
);
}
void
AllignedFrameSource
::
nextFrame
(
cv
::
OutputArray
frame
)
...
...
@@ -101,7 +101,7 @@ private:
DegradeFrameSource
::
DegradeFrameSource
(
const
cv
::
Ptr
<
cv
::
superres
::
FrameSource
>&
base
,
int
scale
)
:
base_
(
base
),
iscale_
(
1.0
/
scale
)
{
CV_Assert
(
!
base_
.
empty
()
);
CV_Assert
(
base_
);
}
void
addGaussNoise
(
cv
::
Mat
&
image
,
double
sigma
)
...
...
@@ -229,7 +229,8 @@ void SuperResolution::RunTest(cv::Ptr<cv::superres::SuperResolution> superRes)
superRes
->
set
(
"temporalAreaRadius"
,
temporalAreaRadius
);
cv
::
Ptr
<
cv
::
superres
::
FrameSource
>
goldSource
(
new
AllignedFrameSource
(
cv
::
superres
::
createFrameSource_Video
(
inputVideoName
),
scale
));
cv
::
Ptr
<
cv
::
superres
::
FrameSource
>
lowResSource
(
new
DegradeFrameSource
(
new
AllignedFrameSource
(
cv
::
superres
::
createFrameSource_Video
(
inputVideoName
),
scale
),
scale
));
cv
::
Ptr
<
cv
::
superres
::
FrameSource
>
lowResSource
(
new
DegradeFrameSource
(
cv
::
makePtr
<
AllignedFrameSource
>
(
cv
::
superres
::
createFrameSource_Video
(
inputVideoName
),
scale
),
scale
));
// skip first frame
cv
::
Mat
frame
;
...
...
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