Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
LSGRM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cresson Remi
LSGRM
Commits
c4ee96b1
Commit
c4ee96b1
authored
Aug 31, 2016
by
remicres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: breaks the partial segmentations loop when max nb of iteration is reached
parent
d7bd8738
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
include/lsgrmController.txx
include/lsgrmController.txx
+12
-8
include/lsgrmHeader.h
include/lsgrmHeader.h
+2
-2
No files found.
include/lsgrmController.txx
View file @
c4ee96b1
...
...
@@ -14,7 +14,6 @@ Controller<TSegmenter>::Controller()
m_TileWidth = 0;
m_NbTilesX = 0;
m_NbTilesY = 0;
m_CleanTemporaryFiles = true;
m_Threshold = 75;
m_Memory = 0;
}
...
...
@@ -103,18 +102,23 @@ void Controller<TSegmenter>::RunSegmentation()
m_InputImage->GetNumberOfComponentsPerPixel(),
isFusion);
// Update the number of iterations remaining
if (numberOfIterationsRemaining > numberOfIterationsForPartialSegmentations)
{
numberOfIterationsRemaining -= numberOfIterationsForPartialSegmentations;
}
#ifdef OTB_USE_MPI
// Gathering useful variables
GatherUsefulVariables(accumulatedMemory, isFusion);
#endif
// Time monitoring
ShowTime(t);
// Update the number of iterations remaining
if (numberOfIterationsRemaining > numberOfIterationsForPartialSegmentations)
{
numberOfIterationsRemaining -= numberOfIterationsForPartialSegmentations;
}
else
{
break;
}
}
...
...
@@ -315,7 +319,7 @@ void Controller<TSegmenter>::GetAutomaticConfiguration()
// Compactness
float perimeter = tileWidth + tileHeight;
float surface = tileWidth * tileHeight;
float compactness = perimeter / surface * (float)
vcl_
max(tileWidth,tileHeight); // [1,+inf]
float compactness = perimeter / surface * (float)
std::
max(tileWidth,tileHeight); // [1,+inf]
// Update minimum criterion
float criterion = compactness / percentMemory; // ]0, +inf]
...
...
include/lsgrmHeader.h
View file @
c4ee96b1
...
...
@@ -19,8 +19,8 @@
#endif
/*
* This function returns TRUE if
it's to the process #myrank to do the
*
work on the yard #div in a pool of #nprocs thread
s
* This function returns TRUE if
the process #myrank is assigned
*
to the task #div in a pool of #nprocs processe
s
*/
bool
MyTurn
(
int
div
=
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment