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
79fa530f
Commit
79fa530f
authored
Aug 01, 2014
by
Alex Leontiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vadim
parent
7dca000b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
tld_tracker.cpp
modules/tracking/src/tld_tracker.cpp
+1
-3
tld_tracker.hpp
modules/tracking/src/tld_tracker.hpp
+1
-1
tld_utils.cpp
modules/tracking/src/tld_utils.cpp
+8
-1
No files found.
modules/tracking/src/tld_tracker.cpp
View file @
79fa530f
...
...
@@ -88,8 +88,6 @@ using namespace tld;
*
* ?10. all in one class
*
* -->21. precompute offset
*
* 16. loops limits
* 17. inner scope loops
*/
...
...
@@ -569,7 +567,7 @@ bool TLDDetector::detect(const Mat& img,const Mat& imgBlurred,Rect2d& res,std::v
negs
.
push_back
(
patches
[
i
].
rect
);
}
dfprintf
((
stdout
,
"%d pos and %d neg
\n
"
,(
int
)
poss
.
size
(),(
int
)
negs
.
size
()));
drawWithRects
(
img
,
negs
,
poss
);
drawWithRects
(
img
,
negs
,
poss
,
"tech"
);
#endif
dfprintf
((
stdout
,
"%d after ensemble
\n
"
,
pass
));
...
...
modules/tracking/src/tld_tracker.hpp
View file @
79fa530f
...
...
@@ -70,7 +70,7 @@ void myassert(const Mat& img);
void
printPatch
(
const
Mat_
<
uchar
>&
standardPatch
);
std
::
string
type2str
(
const
Mat
&
mat
);
void
drawWithRects
(
const
Mat
&
img
,
std
::
vector
<
Rect2d
>&
blackOnes
,
Rect2d
whiteOne
=
Rect2d
(
-
1.0
,
-
1.0
,
-
1.0
,
-
1.0
));
void
drawWithRects
(
const
Mat
&
img
,
std
::
vector
<
Rect2d
>&
blackOnes
,
std
::
vector
<
Rect2d
>&
whiteOnes
);
void
drawWithRects
(
const
Mat
&
img
,
std
::
vector
<
Rect2d
>&
blackOnes
,
std
::
vector
<
Rect2d
>&
whiteOnes
,
String
fileName
=
""
);
//aux functions and variables
//#define CLIP(x,a,b) std::min(std::max((x),(a)),(b))
...
...
modules/tracking/src/tld_utils.cpp
View file @
79fa530f
...
...
@@ -65,8 +65,9 @@ void drawWithRects(const Mat& img,std::vector<Rect2d>& blackOnes,Rect2d whiteOne
}
imshow
(
"img"
,
image
);
}
void
drawWithRects
(
const
Mat
&
img
,
std
::
vector
<
Rect2d
>&
blackOnes
,
std
::
vector
<
Rect2d
>&
whiteOnes
){
void
drawWithRects
(
const
Mat
&
img
,
std
::
vector
<
Rect2d
>&
blackOnes
,
std
::
vector
<
Rect2d
>&
whiteOnes
,
String
filename
){
Mat
image
;
static
int
frameCounter
=
1
;
img
.
copyTo
(
image
);
for
(
int
i
=
0
;
i
<
(
int
)
whiteOnes
.
size
();
i
++
){
rectangle
(
image
,
whiteOnes
[
i
],
255
,
1
,
1
);
...
...
@@ -75,6 +76,12 @@ void drawWithRects(const Mat& img,std::vector<Rect2d>& blackOnes,std::vector<Rec
rectangle
(
image
,
blackOnes
[
i
],
0
,
1
,
1
);
}
imshow
(
"img"
,
image
);
if
(
filename
.
length
()
>
0
){
char
inbuf
[
100
];
sprintf
(
inbuf
,
"%s%d.jpg"
,
filename
.
c_str
(),
frameCounter
);
imwrite
(
inbuf
,
image
);
frameCounter
++
;
}
}
void
myassert
(
const
Mat
&
img
){
int
count
=
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