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
Julien Cabieces
otb
Commits
c95ae417
Commit
c95ae417
authored
9 years ago
by
Guillaume Pasero
Browse files
Options
Downloads
Patches
Plain Diff
ENH: update classification appli to output confidence mask
parent
8c02fd8d
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
Modules/Applications/AppClassification/app/otbImageClassifier.cxx
+15
-0
15 additions, 0 deletions
...Applications/AppClassification/app/otbImageClassifier.cxx
with
15 additions
and
0 deletions
Modules/Applications/AppClassification/app/otbImageClassifier.cxx
+
15
−
0
View file @
c95ae417
...
...
@@ -59,6 +59,7 @@ public:
typedef
ClassificationFilterType
::
ValueType
ValueType
;
typedef
ClassificationFilterType
::
LabelType
LabelType
;
typedef
otb
::
MachineLearningModelFactory
<
ValueType
,
LabelType
>
MachineLearningModelFactoryType
;
typedef
ClassificationFilterType
::
ConfidenceImageType
ConfidenceImageType
;
private:
void
DoInit
()
...
...
@@ -94,6 +95,11 @@ private:
SetParameterDescription
(
"out"
,
"Output image containing class labels"
);
SetParameterOutputImagePixelType
(
"out"
,
ImagePixelType_uint8
);
AddParameter
(
ParameterType_OutputImage
,
"confmap"
,
"Confidence map"
);
SetParameterDescription
(
"confmap"
,
"Confidence map of the produced classification. Meaning depends on the model."
);
SetParameterOutputImagePixelType
(
"confmap"
,
ImagePixelType_double
);
MandatoryOff
(
"confmap"
);
AddRAMParameter
();
// Doc example parameter settings
...
...
@@ -171,6 +177,15 @@ private:
}
SetParameterOutputImage
<
OutputImageType
>
(
"out"
,
m_ClassificationFilter
->
GetOutput
());
// output confidence map
if
(
IsParameterEnabled
(
"confmap"
)
&&
HasValue
(
"confmap"
))
{
if
(
m_Model
->
HasConfidenceIndex
())
{
SetParameterOutputImage
<
ConfidenceImageType
>
(
"confmap"
,
m_ClassificationFilter
->
GetOutputConfidence
());
}
}
}
ClassificationFilterType
::
Pointer
m_ClassificationFilter
;
...
...
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