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
11b3e132
Commit
11b3e132
authored
13 years ago
by
Manuel Grizonnet
Browse files
Options
Downloads
Patches
Plain Diff
DOC:update PCA example using the new PCA class (TODO:need to document inverse transformation)
parent
1f5ae17c
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
Examples/FeatureExtraction/CMakeLists.txt
+2
-3
2 additions, 3 deletions
Examples/FeatureExtraction/CMakeLists.txt
Examples/FeatureExtraction/PCAExample.cxx
+14
-12
14 additions, 12 deletions
Examples/FeatureExtraction/PCAExample.cxx
with
16 additions
and
15 deletions
Examples/FeatureExtraction/CMakeLists.txt
+
2
−
3
View file @
11b3e132
PROJECT
(
FeatureExtractionExamples
)
INCLUDE_REGULAR_EXPRESSION
(
"^.*$"
)
ADD_EXECUTABLE
(
InnerProductPCAExample InnerProductPCAExample.cxx
)
TARGET_LINK_LIBRARIES
(
InnerProductPCAExample OTBCommon OTBIO OTBBasicFilters
)
ADD_EXECUTABLE
(
PCAExample PCAExample.cxx
)
TARGET_LINK_LIBRARIES
(
PCAExample OTBCommon OTBIO OTBBasicFilters
)
ADD_EXECUTABLE
(
AlignmentsExample AlignmentsExample.cxx
)
TARGET_LINK_LIBRARIES
(
AlignmentsExample OTBFeatureExtraction OTBCommon OTBIO
...
...
This diff is collapsed.
Click to expand it.
Examples/FeatureExtraction/
InnerProduct
PCAExample.cxx
→
Examples/FeatureExtraction/PCAExample.cxx
+
14
−
12
View file @
11b3e132
...
...
@@ -24,14 +24,14 @@
// Software Guide : BeginCommandLineArgs
// INPUTS: {ROI_QB_MUL_1.png}
// OUTPUTS: {
InnerProduct
PCAOutput.tif}, {P
rettyInnerProductPCAOutput1.png}, {PrettyInnerProductPCAOutput2.png}, {PrettyInnerProduct
PCAOutput3.png}
// OUTPUTS: {PCAOutput.tif}, {P
CAOutput1.png}, {PCAOutput2.png}, {
PCAOutput3.png}
// 3
// Software Guide : EndCommandLineArgs
// Software Guide : BeginLatex
//
// This example illustrates the use of the
// \doxygen{otb}{
InnerProduct
PCAImageFilter}.
// \doxygen{otb}{PCAImageFilter}.
// This filter computes a Principal Component Analysis using an
// efficient method based on the inner product in order to compute the
// covariance matrix.
...
...
@@ -41,7 +41,7 @@
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
#include
"otb
InnerProduct
PCAImageFilter.h"
#include
"otbPCAImageFilter.h"
// Software Guide : EndCodeSnippet
int
main
(
int
argc
,
char
*
argv
[])
...
...
@@ -79,12 +79,14 @@ int main(int argc, char* argv[])
// Software Guide : BeginLatex
//
// We define the type for the filter. It is templated over the input
// and the output image types. We the instantiate the filter.
// and the output image types and also the transformat // ion direction. The
// internal structure of this filter is a filter-to-fi // lter like structure.
// The estimation of the covariance matrix has persist // ent capabilities.We the instantiate the filter.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef
otb
::
InnerProduct
PCAImageFilter
<
ImageType
,
ImageType
>
PCAFilterType
;
typedef
otb
::
PCAImageFilter
<
ImageType
,
ImageType
,
otb
::
Transform
::
FORWARD
>
PCAFilterType
;
PCAFilterType
::
Pointer
pcafilter
=
PCAFilterType
::
New
();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
...
...
@@ -125,19 +127,19 @@ int main(int argc, char* argv[])
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
// Figure~\ref{fig:
INNERPRODUCT
PCA_FILTER} shows the result of applying
// Figure~\ref{fig:PCA_FILTER} shows the result of applying
// the PCA to a 3 band RGB image.
// \begin{figure}
// \center
// \includegraphics[width=0.25\textwidth]{ROI_QB_MUL_1.eps}
// \includegraphics[width=0.25\textwidth]{
PrettyInnerProduct
PCAOutput1.eps}
// \includegraphics[width=0.25\textwidth]{
PrettyInnerProduct
PCAOutput2.eps}
// \includegraphics[width=0.25\textwidth]{
PrettyInnerProduct
PCAOutput3.eps}
// \itkcaption[
Inner Product PCA Filter
]{Result of applying the
// \doxygen{otb}{
InnerProduct
PCAImageFilter} to an image. From left
// \includegraphics[width=0.25\textwidth]{PCAOutput1.eps}
// \includegraphics[width=0.25\textwidth]{PCAOutput2.eps}
// \includegraphics[width=0.25\textwidth]{PCAOutput3.eps}
// \itkcaption[
PCA Filter (forward trasnformation)
]{Result of applying the
// \doxygen{otb}{PCAImageFilter} to an image. From left
// to right and top to bottom:
// original image, first PC, second PC, third PC.}
// \label{fig:
INNERPRODUCT
PCA_FILTER}
// \label{fig:PCA_FILTER}
// \end{figure}
//
// 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