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
c119c8d2
Commit
c119c8d2
authored
16 years ago
by
Jordi Inglada
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Small changes to CloudDetection exammple
parent
9d333020
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Examples/FeatureExtraction/CloudDetectionExample.cxx
+39
-28
39 additions, 28 deletions
Examples/FeatureExtraction/CloudDetectionExample.cxx
with
39 additions
and
28 deletions
Examples/FeatureExtraction/CloudDetectionExample.cxx
+
39
−
28
View file @
c119c8d2
...
...
@@ -32,16 +32,20 @@
// Software Guide : BeginLatex
//
// The cloud detection functor is a processing chain composed by the computation of a spectral angle (with SpectralAngleFunctor).
// The result is multiplied by a gaussian factor (with CloudEstimatorFunctor) and finally thresholded to obtain
// a binary image (with CloudDetectionFilter).
// However, modifications can be added in the pipeline to adapt to a particular situation.
// The cloud detection functor is a processing chain composed by the
// computation of a spectral angle (with SpectralAngleFunctor). The
// result is multiplied by a gaussian factor (with
// CloudEstimatorFunctor) and finally thresholded to obtain a binary
// image (with CloudDetectionFilter). However, modifications can be
// added in the pipeline to adapt to a particular situation.
//
// This example demonstrates the use of the \doxygen{otb}{CloudDetectionFilter}.
// This filter uses the spectral angle principle to measure the radiometric gap between a reference pixel
// and the other pixels of the image.
// This example demonstrates the use of the
// \doxygen{otb}{CloudDetectionFilter}. This filter uses the spectral
// angle principle to measure the radiometric gap between a reference
// pixel and the other pixels of the image.
//
// The first step toward the use of this filter is the inclusion of the proper header files.
// The first step toward the use of this filter is the inclusion of
// the proper header files.
//
// Software Guide : EndLatex
...
...
@@ -77,9 +81,8 @@ int main( int argc, char * argv[] )
const
unsigned
int
Dimension
=
2
;
// Software Guide : BeginLatex
//
// Then we must decide what pixel type to use for the image. We choose to do
// all the computation in double precision and rescale the results
// between 0 and 255 in order to export PNG images.
// Then we must decide what pixel type to use for the images. We choose to do
// all the computations in double precision.
//
// Software Guide : EndLatex
...
...
@@ -92,9 +95,11 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex
//
// The images are defined using the pixel type and the dimension. Please note that
// the \doxygen{otb}{RoadExtractionFilter} needs an \doxygen{otb}{VectorImage} as input
// to handle multispectral images.
// The images are defined using the pixel type and the
// dimension. Please note that the
// \doxygen{otb}{CloudDetectionFilter} needs an
// \doxygen{otb}{VectorImage} as input to handle multispectral
// images.
//
// Software Guide : EndLatex
...
...
@@ -114,28 +119,32 @@ int main( int argc, char * argv[] )
// Software Guide : BeginCodeSnippet
typedef
otb
::
Functor
::
CloudDetectionFunctor
<
VectorPixelType
,
OutputPixelType
>
FunctorType
;
typedef
otb
::
Functor
::
CloudDetectionFunctor
<
VectorPixelType
,
OutputPixelType
>
FunctorType
;
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// Now we can define the \doxygen{otb}{CloudDetectionFilter} that takes a multi-spectral
// image as input and produces a binary image.
// Now we can define the \doxygen{otb}{CloudDetectionFilter} that
// takes a multi-spectral image as input and produces a binary
// image.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef
otb
::
CloudDetectionFilter
<
VectorImageType
,
OutputImageType
,
FunctorType
>
CloudDetectionFilterType
;
typedef
otb
::
CloudDetectionFilter
<
VectorImageType
,
OutputImageType
,
FunctorType
>
CloudDetectionFilterType
;
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// An \doxygen{otb}{ImageFileReader} class is also instantiated in order to read
// image data from a file. Then, an \doxygen{otb}{ImageFileWriter} is instantiated in order
// to write the output image to a file.
// An \doxygen{otb}{ImageFileReader} class is also instantiated in
// order to read image data from a file. Then, an
// \doxygen{otb}{ImageFileWriter} is instantiated in order to write
// the output image to a file.
//
// Software Guide : EndLatex
...
...
@@ -156,7 +165,8 @@ int main( int argc, char * argv[] )
// Software Guide : BeginCodeSnippet
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
CloudDetectionFilterType
::
Pointer
cloudDetection
=
CloudDetectionFilterType
::
New
();
CloudDetectionFilterType
::
Pointer
cloudDetection
=
CloudDetectionFilterType
::
New
();
WriterType
::
Pointer
writer
=
WriterType
::
New
();
// Software Guide : EndCodeSnippet
...
...
@@ -166,10 +176,10 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex
//
// The \doxygen{otb}{CloudDetectionFilter} needs to have a reference
pixel
// corresponding to the spectral content likely to represent a
cloud. This is done
// by passing a pixel to the filter. Here we
suppose that the input image
// has four spectral bands.
// The \doxygen{otb}{CloudDetectionFilter} needs to have a reference
//
pixel
corresponding to the spectral content likely to represent a
//
cloud. This is done
by passing a pixel to the filter. Here we
//
suppose that the input image
has four spectral bands.
//
// Software Guide : EndLatex
...
...
@@ -188,8 +198,9 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex
//
// We must also set the variance parameter of the filter and the parameter of the gaussian functor.
// The bigger the value, the more tolerant the detector will be.
// We must also set the variance parameter of the filter and the
// parameter of the gaussian functor. The bigger the value, the
// more tolerant the detector will be.
//
// Software Guide : EndLatex
...
...
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