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
a2eae86c
Commit
a2eae86c
authored
Sep 06, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
99573cb9
8849e078
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
13 deletions
+34
-13
face_alignmentimpl.hpp
modules/face/src/face_alignmentimpl.hpp
+1
-1
getlandmarks.cpp
modules/face/src/getlandmarks.cpp
+6
-1
trainFacemark.cpp
modules/face/src/trainFacemark.cpp
+8
-2
ovis.cpp
modules/ovis/src/ovis.cpp
+16
-8
linemod.cpp
modules/rgbd/samples/linemod.cpp
+2
-0
surf.cpp
modules/xfeatures2d/src/surf.cpp
+1
-1
No files found.
modules/face/src/face_alignmentimpl.hpp
View file @
a2eae86c
...
...
@@ -103,7 +103,7 @@ protected:
// This function randomly generates test splits to get the best split.
splitr
getTestSplits
(
std
::
vector
<
Point2f
>
pixel_coordinates
,
int
seed
);
// This function writes a split node to the XML file storing the trained model
void
writeSplit
(
std
::
ofstream
&
os
,
const
splitr
split
);
void
writeSplit
(
std
::
ofstream
&
os
,
const
splitr
&
split
);
// This function writes a leaf node to the binary file storing the trained model
void
writeLeaf
(
std
::
ofstream
&
os
,
const
std
::
vector
<
Point2f
>
&
leaf
);
// This function writes a tree to the binary file containing the model
...
...
modules/face/src/getlandmarks.cpp
View file @
a2eae86c
...
...
@@ -26,7 +26,12 @@ bool FacemarkKazemiImpl :: findNearestLandmarks( vector< vector<int> >& nearest)
}
void
FacemarkKazemiImpl
::
readSplit
(
ifstream
&
is
,
splitr
&
vec
)
{
is
.
read
((
char
*
)
&
vec
,
sizeof
(
splitr
));
is
.
read
((
char
*
)
&
vec
.
index1
,
sizeof
(
vec
.
index1
));
is
.
read
((
char
*
)
&
vec
.
index2
,
sizeof
(
vec
.
index2
));
is
.
read
((
char
*
)
&
vec
.
thresh
,
sizeof
(
vec
.
thresh
));
uint32_t
dummy_
=
0
;
is
.
read
((
char
*
)
&
dummy_
,
sizeof
(
dummy_
));
// buggy writer structure alignment
CV_CheckEQ
((
int
)(
sizeof
(
vec
.
index1
)
+
sizeof
(
vec
.
index2
)
+
sizeof
(
vec
.
thresh
)
+
sizeof
(
dummy_
)),
24
,
"Invalid build configuration"
);
}
void
FacemarkKazemiImpl
::
readLeaf
(
ifstream
&
is
,
vector
<
Point2f
>
&
leaf
)
{
...
...
modules/face/src/trainFacemark.cpp
View file @
a2eae86c
...
...
@@ -219,9 +219,15 @@ void FacemarkKazemiImpl :: writeLeaf(ofstream& os, const vector<Point2f> &leaf)
os
.
write
((
char
*
)
&
size
,
sizeof
(
size
));
os
.
write
((
char
*
)
&
leaf
[
0
],
leaf
.
size
()
*
sizeof
(
Point2f
));
}
void
FacemarkKazemiImpl
::
writeSplit
(
ofstream
&
os
,
splitr
split
)
void
FacemarkKazemiImpl
::
writeSplit
(
ofstream
&
os
,
const
splitr
&
vec
)
{
os
.
write
((
char
*
)
&
split
,
sizeof
(
split
));
os
.
write
((
char
*
)
&
vec
.
index1
,
sizeof
(
vec
.
index1
));
os
.
write
((
char
*
)
&
vec
.
index2
,
sizeof
(
vec
.
index2
));
os
.
write
((
char
*
)
&
vec
.
thresh
,
sizeof
(
vec
.
thresh
));
uint32_t
dummy_
=
0
;
os
.
write
((
char
*
)
&
dummy_
,
sizeof
(
dummy_
));
// buggy original writer structure alignment
CV_CheckEQ
((
int
)(
sizeof
(
vec
.
index1
)
+
sizeof
(
vec
.
index2
)
+
sizeof
(
vec
.
thresh
)
+
sizeof
(
dummy_
)),
24
,
"Invalid build configuration"
);
}
void
FacemarkKazemiImpl
::
writeTree
(
ofstream
&
f
,
regtree
tree
)
{
...
...
modules/ovis/src/ovis.cpp
View file @
a2eae86c
...
...
@@ -359,18 +359,26 @@ public:
void
setCompositors
(
const
std
::
vector
<
String
>&
names
)
{
Viewport
*
vp
=
frameSrc
->
getViewport
(
0
);
CompositorManager
&
cm
=
CompositorManager
::
getSingleton
();
// this should be applied to all owned render targets
Ogre
::
RenderTarget
*
targets
[]
=
{
frameSrc
,
rWin
,
depthRTT
};
cm
.
removeCompositorChain
(
vp
);
// remove previous configuration
for
(
size_t
i
=
0
;
i
<
names
.
size
();
i
++
)
for
(
int
j
=
0
;
j
<
3
;
j
++
)
{
if
(
!
cm
.
addCompositor
(
vp
,
names
[
i
]))
{
LogManager
::
getSingleton
().
logError
(
"Failed to add compositor: "
+
names
[
i
]);
continue
;
Ogre
::
RenderTarget
*
tgt
=
targets
[
j
];
if
(
!
tgt
||
(
frameSrc
==
rWin
&&
tgt
==
rWin
))
continue
;
Viewport
*
vp
=
tgt
->
getViewport
(
0
);
cm
.
removeCompositorChain
(
vp
);
// remove previous configuration
for
(
size_t
i
=
0
;
i
<
names
.
size
();
i
++
)
{
if
(
!
cm
.
addCompositor
(
vp
,
names
[
i
]))
{
LogManager
::
getSingleton
().
logError
(
"Failed to add compositor: "
+
names
[
i
]);
continue
;
}
cm
.
setCompositorEnabled
(
vp
,
names
[
i
],
true
);
}
cm
.
setCompositorEnabled
(
vp
,
names
[
i
],
true
);
}
}
...
...
modules/rgbd/samples/linemod.cpp
View file @
a2eae86c
...
...
@@ -4,6 +4,8 @@
// This code is also subject to the license terms in the LICENSE_WillowGarage.md file found in this module's directory
#define CV__ENABLE_C_API_CTORS // enable C API ctors (must be removed)
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/imgproc/imgproc_c.h> // cvFindContours
...
...
modules/xfeatures2d/src/surf.cpp
View file @
a2eae86c
...
...
@@ -847,7 +847,7 @@ struct SURFInvoker : ParallelLoopBody
// unit vector is essential for contrast invariance
vec
=
descriptors
->
ptr
<
float
>
(
k
);
float
scale
=
(
float
)(
1.
/
(
std
::
sqrt
(
square_mag
)
+
DBL
_EPSILON
));
float
scale
=
(
float
)(
1.
/
(
std
::
sqrt
(
square_mag
)
+
FLT
_EPSILON
));
for
(
kk
=
0
;
kk
<
dsize
;
kk
++
)
vec
[
kk
]
*=
scale
;
}
...
...
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