Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
David Youssefi
otb
Commits
3f6bd809
Commit
3f6bd809
authored
15 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH : last update for the segment between segment computation
parent
4981b224
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.txx
+10
-3
10 additions, 3 deletions
...on/otbLineSpatialObjectListToRightAnglePointSetFilter.txx
Examples/FeatureExtraction/CMakeLists.txt
+2
-2
2 additions, 2 deletions
Examples/FeatureExtraction/CMakeLists.txt
with
12 additions
and
5 deletions
Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.txx
+
10
−
3
View file @
3f6bd809
...
...
@@ -38,7 +38,7 @@ LineSpatialObjectListToRightAnglePointSetFilter<TImage,TLinesList ,TPointSet>
this->SetNumberOfRequiredOutputs(1);
m_ThresholdDistance = 20.;
m_ThresholdAngle = M_PI/3
6
.; //36 cause we want
5
degrees threshold
m_ThresholdAngle = M_PI/3
0
.; //36 cause we want
6
degrees threshold
}
/**
...
...
@@ -116,8 +116,15 @@ LineSpatialObjectListToRightAnglePointSetFilter<TImage,TLinesList ,TPointSet>
RightAngleCoordinate = this->ComputeAngleRightCoordinate(*itLinesListTest, *itLinesListCur);
/** Compute the distance between the two segments and the right angle formed by this segments*/
if(this->ComputeDistanceFromPointToSegment(RightAngleCoordinate,*itLinesListTest) <m_ThresholdDistance &&
this->ComputeDistanceFromPointToSegment(RightAngleCoordinate,*itLinesListCur) <m_ThresholdDistance)
double dist1 = this->ComputeDistanceFromPointToSegment(RightAngleCoordinate,*itLinesListTest);
double dist2 = this->ComputeDistanceFromPointToSegment(RightAngleCoordinate,*itLinesListCur) ;
/** Use Pythagore to compute the distance between the two segments*/
double SegmentDistance = vcl_sqrt(dist1*dist1 + dist2*dist2);
// if(this->ComputeDistanceFromPointToSegment(RightAngleCoordinate,*itLinesListTest) <m_ThresholdDistance &&
// this->ComputeDistanceFromPointToSegment(RightAngleCoordinate,*itLinesListCur) <m_ThresholdDistance)
if(SegmentDistance < m_ThresholdDistance)
{
/** If Right Angle & not so far from segments: Add it to the pointSet*/
this->AddRightAngleToPointSet(RightAngleCoordinate , *itLinesListTest , *itLinesListCur );
...
...
This diff is collapsed.
Click to expand it.
Examples/FeatureExtraction/CMakeLists.txt
+
2
−
2
View file @
3f6bd809
...
...
@@ -348,8 +348,8 @@ ADD_TEST(RightAngleDetectionExample ${EXE_TESTS2}
${
TEMP
}
/RighAngleOutput.tif
${
TEMP
}
/PrettyRightAngleInput.png
${
TEMP
}
/PrettyRightAngleOutput.png
0.
09
20
.
0.
1
35
.
)
ADD_EXECUTABLE
(
otbFeatureExtractionExamplesTests1 otbFeatureExtractionExamplesTests1.cxx
)
...
...
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