Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
camtron
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kr69sugu
camtron
Commits
97818fe3
Commit
97818fe3
authored
6 years ago
by
Thomas Boy
Browse files
Options
Downloads
Patches
Plain Diff
fix logic bug, max area threshold to small, will eleminate a lot of frames, silent mode again
parent
48fbbfa8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Demo.cpp
+15
-16
15 additions, 16 deletions
Demo.cpp
with
15 additions
and
16 deletions
Demo.cpp
+
15
−
16
View file @
97818fe3
...
...
@@ -15,7 +15,7 @@ based on original demo.cpp
#define PROCESS_CENTER_VERSION_MAJOR 0
#define PROCESS_CENTER_VERSION_MINOR 9
#define PROCESS_CENTER_VERSION_MINOR_FIXES
2
#define PROCESS_CENTER_VERSION_MINOR_FIXES
3
//opencv
#include
<opencv2/opencv.hpp>
...
...
@@ -320,10 +320,10 @@ int main(int argc, char * argv[])
fileName
=
inputDir
+
TToolBox
::
getFileName
(
frameCounter
);
//check the string
cout
<<
"open fileName: "
<<
fileName
<<
endl
;
if
(
fileName
.
empty
())
cerr
<<
"error: empty string fileName"
<<
endl
;
//
//check the string
//
cout <<"open fileName: "<< fileName<<endl;
//
if(fileName.empty())
//
cerr <<"error: empty string fileName"<<endl;
cout
<<
"
\t
"
<<
frameCounter
<<
"
\t
of
\t
"
<<
amountFiles
<<
" load file :"
<<
fileName
<<
endl
;
...
...
@@ -410,7 +410,7 @@ int main(int argc, char * argv[])
vector
<
Point2f
>
recCenterPoints
;
float
areaMinThreshold
=
150
;
float
areaMaxThreshold
=
15
000
;
//TODO apply moving filter ??, an more adaptive approach
float
areaMaxThreshold
=
300
000
;
//old max threshold was to small
//TODO apply moving filter ??, an more adaptive approach
//iterate all rectangles
for
(
size_t
i
=
0
;
i
<
minRect
.
size
();
i
++
)
...
...
@@ -529,14 +529,14 @@ int main(int argc, char * argv[])
#endif
cout
<<
"we try to write file: "
<<
i
<<
endl
;
//
cout<<"we try to write file: "<< i <<endl;
//! step 8: we write down all our results in yml file
std
::
string
nameOutPutFileData
=
outputDir
+
TToolBox
::
mNzero
(
frameCounter
)
+
".yml"
;
//check the string
cout
<<
"write output nameOutPutFileData: "
<<
nameOutPutFileData
<<
endl
;
if
(
nameOutPutFileData
.
empty
())
cerr
<<
"error: empty string nameOutPutFileData"
<<
endl
;
//
//check the string
//
cout <<"write output nameOutPutFileData: "<< nameOutPutFileData<<endl;
//
if(nameOutPutFileData.empty())
//
cerr <<"error: empty string nameOutPutFileData"<<endl;
FileStorage
fs
(
nameOutPutFileData
.
c_str
(),
FileStorage
::
WRITE
);
...
...
@@ -582,10 +582,10 @@ int main(int argc, char * argv[])
//we write the file down
std
::
string
nameOutPutFileDBGpic
=
outputDir
+
TToolBox
::
mNzero
(
frameCounter
)
+
".jpg"
;
//check the string
cout
<<
"write dbg file: "
<<
nameOutPutFileDBGpic
<<
endl
;
if
(
nameOutPutFileDBGpic
.
empty
())
cerr
<<
"error: empty string nameOutPutFileDBGpic"
<<
endl
;
//
//check the string
//
cout <<"write dbg file: "<< nameOutPutFileDBGpic<<endl;
//
if(nameOutPutFileDBGpic.empty())
//
cerr <<"error: empty string nameOutPutFileDBGpic"<<endl;
imwrite
(
nameOutPutFileDBGpic
.
c_str
(),
imgOverlay2
);
...
...
@@ -615,7 +615,6 @@ int main(int argc, char * argv[])
double
elapsed
=
double
(
endAll
-
beginAll
)
/
CLOCKS_PER_SEC
;
cout
<<
"process : "
<<
amountFiles
<<
" files took:
\t
"
<<
(
int
)(
elapsed
/
60
)
<<
" min -
\t
"
<<
(
int
)(
elapsed
/
60
/
60
)
<<
" h
\n
in total"
<<
endl
;
//we write the random file list to a file
std
::
string
nameOutRandomFile
=
outputDir
+
"randlist.yml"
;
FileStorage
fs
(
nameOutRandomFile
.
c_str
(),
FileStorage
::
WRITE
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment