Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
2d68b305
Commit
2d68b305
authored
Jun 19, 2016
by
Vladislav Samsonov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes
parent
329f49e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
pcaflow.hpp
modules/optflow/include/opencv2/optflow/pcaflow.hpp
+1
-1
learn_prior.py
modules/optflow/src/learn_prior.py
+1
-1
pcaflow.cpp
modules/optflow/src/pcaflow.cpp
+3
-4
No files found.
modules/optflow/include/opencv2/optflow/pcaflow.hpp
View file @
2d68b305
...
@@ -96,7 +96,7 @@ protected:
...
@@ -96,7 +96,7 @@ protected:
public
:
public
:
OpticalFlowPCAFlow
(
Ptr
<
const
PCAPrior
>
_prior
=
Ptr
<
const
PCAPrior
>
(),
const
Size
_basisSize
=
Size
(
18
,
14
),
OpticalFlowPCAFlow
(
Ptr
<
const
PCAPrior
>
_prior
=
Ptr
<
const
PCAPrior
>
(),
const
Size
_basisSize
=
Size
(
18
,
14
),
float
_sparseRate
=
0.02
,
float
_retainedCornersFraction
=
0.7
,
float
_sparseRate
=
0.02
4
,
float
_retainedCornersFraction
=
0.2
,
float
_occlusionsThreshold
=
0.0003
,
float
_dampingFactor
=
0.00002
);
float
_occlusionsThreshold
=
0.0003
,
float
_dampingFactor
=
0.00002
);
void
calc
(
InputArray
I0
,
InputArray
I1
,
InputOutputArray
flow
);
void
calc
(
InputArray
I0
,
InputArray
I1
,
InputOutputArray
flow
);
...
...
modules/optflow/src/learn_prior.py
View file @
2d68b305
...
@@ -16,7 +16,7 @@ Gamma should be selected experimentally.''')
...
@@ -16,7 +16,7 @@ Gamma should be selected experimentally.''')
argparser
.
add_argument
(
'-f'
,
argparser
.
add_argument
(
'-f'
,
'--files'
,
'--files'
,
nargs
=
'+'
,
nargs
=
'+'
,
help
=
'List of optical flow .flo files for learning'
,
help
=
'List of optical flow .flo files for learning
. You can pass a directory here and it will be scanned recursively for .flo files.
'
,
required
=
True
)
required
=
True
)
argparser
.
add_argument
(
'-o'
,
argparser
.
add_argument
(
'-o'
,
'--output'
,
'--output'
,
...
...
modules/optflow/src/pcaflow.cpp
View file @
2d68b305
...
@@ -117,9 +117,8 @@ static inline void symOrtho( double a, double b, double &c, double &s, double &r
...
@@ -117,9 +117,8 @@ static inline void symOrtho( double a, double b, double &c, double &s, double &r
static
void
solveLSQR
(
const
Mat
&
A
,
const
Mat
&
b
,
OutputArray
xOut
,
const
double
damp
=
0.0
,
static
void
solveLSQR
(
const
Mat
&
A
,
const
Mat
&
b
,
OutputArray
xOut
,
const
double
damp
=
0.0
,
const
unsigned
iter_lim
=
10
)
const
unsigned
iter_lim
=
10
)
{
{
int
m
=
A
.
size
().
height
;
const
int
n
=
A
.
size
().
width
;
int
n
=
A
.
size
().
width
;
CV_Assert
(
A
.
size
().
height
==
b
.
size
().
height
);
CV_Assert
(
m
==
b
.
size
().
height
);
CV_Assert
(
A
.
type
()
==
CV_32F
);
CV_Assert
(
A
.
type
()
==
CV_32F
);
CV_Assert
(
b
.
type
()
==
CV_32F
);
CV_Assert
(
b
.
type
()
==
CV_32F
);
xOut
.
create
(
n
,
1
,
CV_32F
);
xOut
.
create
(
n
,
1
,
CV_32F
);
...
@@ -164,7 +163,7 @@ static void solveLSQR( const Mat &A, const Mat &b, OutputArray xOut, const doubl
...
@@ -164,7 +163,7 @@ static void solveLSQR( const Mat &A, const Mat &b, OutputArray xOut, const doubl
v
+=
AT
*
u
;
v
+=
AT
*
u
;
alfa
=
cv
::
norm
(
v
,
NORM_L2
);
alfa
=
cv
::
norm
(
v
,
NORM_L2
);
if
(
alfa
>
0
)
if
(
alfa
>
0
)
v
=
(
1
/
alfa
)
*
v
;
v
*=
1
/
alfa
;
}
}
double
rhobar1
=
sqrt
(
rhobar
*
rhobar
+
damp
*
damp
);
double
rhobar1
=
sqrt
(
rhobar
*
rhobar
+
damp
*
damp
);
...
...
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