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
71a10cca
Commit
71a10cca
authored
4 years ago
by
evenp
Browse files
Options
Downloads
Patches
Plain Diff
Code: Deprecated writeBStraverse withdrawn
parent
3334114b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Code/FBSD/BSTools/bsdetectionwidget.cpp
+0
-72
0 additions, 72 deletions
Code/FBSD/BSTools/bsdetectionwidget.cpp
Code/FBSD/BSTools/bsdetectionwidget.h
+0
-5
0 additions, 5 deletions
Code/FBSD/BSTools/bsdetectionwidget.h
Code/FBSD/ImageTools/absrat.h
+2
-2
2 additions, 2 deletions
Code/FBSD/ImageTools/absrat.h
with
2 additions
and
79 deletions
Code/FBSD/BSTools/bsdetectionwidget.cpp
+
0
−
72
View file @
71a10cca
...
...
@@ -884,11 +884,6 @@ void BSDetectionWidget::keyPressEvent (QKeyEvent *event)
displayDetectionResult
();
break
;
case
Qt
::
Key_Semicolon
:
// Stores blurred segments features
writeBStraverse
();
break
;
case
Qt
::
Key_Plus
:
if
(
zoom
>
1
)
{
...
...
@@ -1217,73 +1212,6 @@ void BSDetectionWidget::writeDetectionResult ()
}
void
BSDetectionWidget
::
writeBStraverse
()
{
int
xlls
=
1939000
;
int
ylls
=
13548000
;
int
travel
=
24
;
vector
<
BlurredSegment
*>
bss
=
detector
.
getBlurredSegments
();
if
(
bss
.
empty
())
{
BlurredSegment
*
bs
=
detector
.
getBlurredSegment
();
if
(
bs
!=
NULL
)
{
ofstream
outf
(
"strokes.txt"
,
ios
::
out
);
DigitalStraightSegment
*
dss
=
bs
->
getSegment
();
AbsRat
x1r
,
y1r
,
x2r
,
y2r
;
dss
->
naiveLine
(
x1r
,
y1r
,
x2r
,
y2r
);
float
x1
=
x1r
.
num
()
/
(
float
)
x1r
.
den
();
float
y1
=
y1r
.
num
()
/
(
float
)
y1r
.
den
();
float
x2
=
x2r
.
num
()
/
(
float
)
x2r
.
den
();
float
y2
=
y2r
.
num
()
/
(
float
)
y2r
.
den
();
float
ln
=
(
float
)
sqrt
((
x2
-
x1
)
*
(
x2
-
x1
)
+
(
y2
-
y1
)
*
(
y2
-
y1
));
float
dx
=
(
x2
-
x1
)
/
ln
;
float
dy
=
(
y2
-
y1
)
/
ln
;
for
(
float
pos
=
0.0
f
;
pos
<=
ln
;
pos
+=
travel
)
{
outf
<<
xlls
+
(
int
)
(
x1
+
pos
*
dx
-
travel
*
dy
+
0.5
f
)
<<
" "
<<
ylls
+
(
int
)
(
y1
+
pos
*
dy
+
travel
*
dx
+
0.5
f
)
<<
" "
<<
xlls
+
(
int
)
(
x1
+
pos
*
dx
+
travel
*
dy
+
0.5
f
)
<<
" "
<<
ylls
+
(
int
)
(
y1
+
pos
*
dy
-
travel
*
dx
+
0.5
f
)
<<
endl
;
}
outf
.
close
();
}
}
else
{
DigitalStraightSegment
*
dss
=
NULL
;
AbsRat
x1r
,
y1r
,
x2r
,
y2r
;
float
x1
,
y1
,
x2
,
y2
,
ln
,
dx
,
dy
;
ofstream
outf
(
"strokes.txt"
,
ios
::
out
);
vector
<
BlurredSegment
*>::
iterator
it
=
bss
.
begin
();
while
(
it
!=
bss
.
end
())
{
if
(
*
it
!=
NULL
)
{
dss
=
(
*
it
)
->
getSegment
();
dss
->
naiveLine
(
x1r
,
y1r
,
x2r
,
y2r
);
x1
=
x1r
.
num
()
/
(
float
)
x1r
.
den
();
y1
=
y1r
.
num
()
/
(
float
)
y1r
.
den
();
x2
=
x2r
.
num
()
/
(
float
)
x2r
.
den
();
y2
=
y2r
.
num
()
/
(
float
)
y2r
.
den
();
ln
=
(
float
)
sqrt
((
x2
-
x1
)
*
(
x2
-
x1
)
+
(
y2
-
y1
)
*
(
y2
-
y1
));
dx
=
(
x2
-
x1
)
/
ln
;
dy
=
(
y2
-
y1
)
/
ln
;
for
(
float
pos
=
0.0
f
;
pos
<=
ln
;
pos
+=
travel
)
{
outf
<<
xlls
+
(
int
)
(
x1
+
pos
*
dx
-
travel
*
dy
+
0.5
f
)
<<
" "
<<
ylls
+
(
int
)
(
y1
+
pos
*
dy
+
travel
*
dx
+
0.5
f
)
<<
" "
<<
xlls
+
(
int
)
(
x1
+
pos
*
dx
+
travel
*
dy
+
0.5
f
)
<<
" "
<<
ylls
+
(
int
)
(
y1
+
pos
*
dy
-
travel
*
dx
+
0.5
f
)
<<
endl
;
}
}
it
++
;
}
outf
.
close
();
}
}
void
BSDetectionWidget
::
displayDetectionResult
()
{
if
(
background
==
BACK_BLACK
)
augmentedImage
.
fill
(
qRgb
(
0
,
0
,
0
));
...
...
This diff is collapsed.
Click to expand it.
Code/FBSD/BSTools/bsdetectionwidget.h
+
0
−
5
View file @
71a10cca
...
...
@@ -410,11 +410,6 @@ private:
*/
void
writeDetectionResult
();
/**
* \brief Computes seeds for ASD (strokes.txt).
*/
void
writeBStraverse
();
/**
* \brief Displays the result of the last detection.
*/
...
...
This diff is collapsed.
Click to expand it.
Code/FBSD/ImageTools/absrat.h
+
2
−
2
View file @
71a10cca
...
...
@@ -7,8 +7,8 @@
* \brief Absolutely useless rational type.
*
* This type is only maintained to ensure the compatibility of
* DigitalStraightSegment::naiveLine function
* for IpolDemo and
BSDetectionWidget::writeBStraverse
* DigitalStraightSegment::naiveLine function
used
* for IpolDemo and
AMREL (seeds selection).
* Better not use it anymore.
*/
class
AbsRat
...
...
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