Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
laser_scan_utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
labrobotica
algorithms
laser_scan_utils
Commits
4db8bd9c
Commit
4db8bd9c
authored
9 years ago
by
acoromin
Browse files
Options
Downloads
Patches
Plain Diff
Working version. Filling start and end points to Hough lines. Not yet tested.
parent
65005a8e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/line_detector.cpp
+4
-3
4 additions, 3 deletions
src/line_detector.cpp
with
4 additions
and
3 deletions
src/line_detector.cpp
+
4
−
3
View file @
4db8bd9c
...
@@ -211,11 +211,12 @@ unsigned int laserscanutils::extractLinesHough( const std::vector<Eigen::MatrixX
...
@@ -211,11 +211,12 @@ unsigned int laserscanutils::extractLinesHough( const std::vector<Eigen::MatrixX
double
theta
,
range
;
double
theta
,
range
;
int
kr
;
int
kr
;
Line
line
;
Line
line
;
double
xmax
,
xmin
,
ymax
,
ymin
;
//A 2D array of lists. Each cell is a (r,theta) discretization in the line parameter space.
//A 2D array of lists. Each cell is a (r,theta) discretization in the line parameter space.
//Each list keeps the laser point coordinates that support that cell
//Each list keeps the laser point coordinates that support that cell
std
::
vector
<
std
::
vector
<
std
::
list
<
std
::
pair
<
double
,
double
>
>
>
>
hough_grid
;
std
::
vector
<
std
::
vector
<
std
::
list
<
std
::
pair
<
double
,
double
>
>
>
>
hough_grid
;
std
::
list
<
std
::
pair
<
double
,
double
>::
iterator
pt_it
;
//iterator over the points of a given cell list
std
::
list
<
std
::
pair
<
double
,
double
>
>
::
iterator
pt_it
;
//iterator over the points of a given cell list
//clear line list
//clear line list
_line_list
.
clear
();
_line_list
.
clear
();
...
@@ -279,8 +280,8 @@ unsigned int laserscanutils::extractLinesHough( const std::vector<Eigen::MatrixX
...
@@ -279,8 +280,8 @@ unsigned int laserscanutils::extractLinesHough( const std::vector<Eigen::MatrixX
//set the limiting points of the line
//set the limiting points of the line
if
(
ii
<
hough_grid_rows_half
)
//first and third quartile
if
(
ii
<
hough_grid_rows_half
)
//first and third quartile
{
{
line
.
point_first_
<<
,,
1
;
//
line.point_first_ << ,,1;
line
.
point_last_
<<
,,
1
;
//
line.point_last_ << ,,1;
}
}
else
//second and fourth quartile
else
//second and fourth quartile
...
...
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