Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2019 FBSD
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Kerautret Bertrand
2019 FBSD
Commits
d2060e86
Unverified
Commit
d2060e86
authored
6 years ago
by
Kerautret Bertrand
Browse files
Options
Downloads
Patches
Plain Diff
edit output
parent
b0eae20b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Seg/IPOLdemo/Input/couloir.gif
+0
-0
0 additions, 0 deletions
Code/Seg/IPOLdemo/Input/couloir.gif
Code/Seg/IPOLdemo/mainIPOL.cpp
+53
-14
53 additions, 14 deletions
Code/Seg/IPOLdemo/mainIPOL.cpp
with
53 additions
and
14 deletions
Code/Seg/IPOLdemo/Input/couloir.gif
0 → 100644
+
0
−
0
View file @
d2060e86
111 KiB
This diff is collapsed.
Click to expand it.
Code/Seg/IPOLdemo/mainIPOL.cpp
+
53
−
14
View file @
d2060e86
...
@@ -4,12 +4,41 @@
...
@@ -4,12 +4,41 @@
#include
"bsdetector.h"
#include
"bsdetector.h"
#include
"vmap.h"
#include
"vmap.h"
#include
<iostream>
#include
<fstream>
void
usage
(
std
::
string
str
)
{
std
::
cout
<<
str
<<
" : something is wrong with the prog parameter (not enough parameters or something wrong)... "
<<
std
::
endl
;
}
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
// Calcul de la carte de gradient (utilise qt)
if
(
argc
<
3
)
{
usage
(
argv
[
0
]);
exit
(
EXIT_FAILURE
);
}
// getting parameters:
// - input file
string
input_filename
=
argv
[
1
];
// - output file
string
output_filename
=
argv
[
2
];
ofstream
fout
;
fout
.
open
(
output_filename
,
std
::
fstream
::
out
);
// Calcul de la carte de gradient (utilise qt)
QImage
image
;
QImage
image
;
image
.
load
(
QString
(
"../couloir.gif"
));
image
.
load
(
QString
(
input_filename
.
c_str
()));
int
width
=
image
.
width
();
int
width
=
image
.
width
();
int
height
=
image
.
height
();
int
height
=
image
.
height
();
int
**
tabImage
=
new
int
*
[
height
];
int
**
tabImage
=
new
int
*
[
height
];
...
@@ -30,6 +59,8 @@ int main (int argc, char *argv[])
...
@@ -30,6 +59,8 @@ int main (int argc, char *argv[])
detector
.
setMaxTrials
(
-
1
);
detector
.
setMaxTrials
(
-
1
);
detector
.
detectAll
();
detector
.
detectAll
();
fout
<<
"# Line detection generated from "
<<
argv
[
0
]
<<
"with format : X1 Y1 X2 Y2 on each line"
<<
std
::
endl
;
// Affichage
// Affichage
vector
<
BlurredSegment
*>
bss
=
detector
.
getBlurredSegments
();
vector
<
BlurredSegment
*>
bss
=
detector
.
getBlurredSegments
();
if
(
!
bss
.
empty
())
if
(
!
bss
.
empty
())
...
@@ -39,22 +70,30 @@ int main (int argc, char *argv[])
...
@@ -39,22 +70,30 @@ int main (int argc, char *argv[])
{
{
// Affichage du premier point
// Affichage du premier point
vector
<
Pt2i
>
points
=
(
*
it
)
->
getAllPoints
();
vector
<
Pt2i
>
points
=
(
*
it
)
->
getAllPoints
();
cout
<<
"BS starts from ("
<<
points
.
front
().
x
()
<<
","
<<
points
.
front
().
y
()
<<
")"
<<
endl
;
fout
<<
points
.
front
().
x
()
<<
" "
<<
points
.
front
().
y
()
<<
" "
<<
points
.
back
().
x
()
<<
" "
<<
points
.
back
().
y
()
<<
std
::
endl
;
// Affichage du DSS englobant
// Affichage du DSS englobant
vector
<
Pt2i
>
bnd
;
// vector<Pt2i> bnd;
DigitalStraightSegment
*
dss
=
(
*
it
)
->
getSegment
();
// DigitalStraightSegment *dss = (*it)->getSegment ();
if
(
dss
!=
NULL
)
// if (dss != NULL)
{
// {
dss
->
getBounds
(
bnd
,
0
,
0
,
width
,
height
);
cout
<<
"DSS starts from ("
<<
bnd
.
front
().
x
()
// dss->getBounds (bnd, 0, 0, width, height, false);
<<
","
<<
bnd
.
front
().
y
()
<<
")"
<<
endl
;
// // cout << "DSS starts from (" << bnd.front().x()
}
// // << "," << bnd.front().y() << ")" << endl;
// auto b = bnd.begin();
// for (auto &x: bnd){
// cout << "DSS starts from (" << x.x()
// << "," << x.y() << ")" << endl;
// }
// }
it
++
;
it
++
;
}
}
}
}
fout
.
close
();
return
(
0
);
return
(
0
);
}
}
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