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
764b3414
Commit
764b3414
authored
14 years ago
by
Manuel Grizonnet
Browse files
Options
Downloads
Patches
Plain Diff
DOC:Modify example in the software guide for the derived built-up precense index texture (PanTex)
parent
3815511a
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
Examples/FeatureExtraction/PanTexExample.cxx
+34
-11
34 additions, 11 deletions
Examples/FeatureExtraction/PanTexExample.cxx
with
34 additions
and
11 deletions
Examples/FeatureExtraction/PanTexExample.cxx
+
34
−
11
View file @
764b3414
...
...
@@ -37,7 +37,7 @@
// Software Guide : BeginLatex
//
// This example illustrates the use of the
// \doxygen{otb}{PanTexTexture
Image
Filter}. This texture parameter was
// \doxygen{otb}{
ScalarImageTo
PanTexTextureFilter}. This texture parameter was
// first introduced in \cite{PanTex} and is very useful for urban area
// detection.
// \relatedClasses
...
...
@@ -50,7 +50,7 @@
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
#include
"otbPanTexTexture
Image
Filter.h"
#include
"otb
ScalarImageTo
PanTexTextureFilter.h"
// Software Guide : EndCodeSnippet
int
main
(
int
argc
,
char
*
argv
[])
...
...
@@ -82,7 +82,7 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef
otb
::
PanTexTexture
Image
Filter
<
ImageType
,
ImageType
>
PanTexType
;
typedef
otb
::
ScalarImageTo
PanTexTextureFilter
<
ImageType
,
ImageType
>
PanTexT
extureFilterT
ype
;
// Software Guide : EndCodeSnippet
typedef
otb
::
ImageFileReader
<
ImageType
>
ReaderType
;
typedef
otb
::
ImageFileWriter
<
ImageType
>
WriterType
;
...
...
@@ -100,14 +100,37 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
PanTexType
::
Pointer
textureFilter
=
PanTexType
::
New
();
PanTexT
extureFilterT
ype
::
Pointer
textureFilter
=
PanTexT
extureFilterT
ype
::
New
();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex//
// We can now plug the pipeline and trigger the execution by calling
// the \code{Update} method of the writer.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
// Software Guide : BeginLatex
//
// Then, we set the parameters of the filter.The radius of
// the neighborhood to compute the texture.
// The number of bins per axis for histogramm generation (it is the
// size of the co-occurrence matrix). Moreover, we have to specify
// the Min/Max in the input image. In the example, image Min/Max is setted
// by the user to 0 and 255. Alternatyvely you can use the class \doxygen{itk}{MinimumMaximumImageCalculator}
// to calculate these values.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
PanTexTextureFilterType
::
SizeType
sradius
;
sradius
.
Fill
(
4
);
textureFilter
->
SetNumberOfBinsPerAxis
(
8
);
textureFilter
->
SetRadius
(
sradius
);
textureFilter
->
SetInputImageMinimum
(
0
);
textureFilter
->
SetInputImageMaximum
(
256
);
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// We can now plug the pipeline and trigger the execution by calling
// the \code{Update} method of the writer.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
textureFilter
->
SetInput
(
reader
->
GetOutput
());
writer
->
SetInput
(
textureFilter
->
GetOutput
());
...
...
@@ -122,7 +145,7 @@ int main(int argc, char * argv[])
// \includegraphics[width=0.40\textwidth]{pretty_PanTexInput.eps}
// \includegraphics[width=0.40\textwidth]{pretty_PanTexOutput.eps}
// \itkcaption[PanTex Filter]{Result of applying the
// \doxygen{otb}{PanTexTexture
Image
Filter} to an image. From left to right :
// \doxygen{otb}{
ScalarImageTo
PanTexTextureFilter} to an image. From left to right :
// original image, PanTex feature.}
// \label{fig:PANTEXFILTER}
// \end{figure}
...
...
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