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
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
11b3e132
Commit
11b3e132
authored
Jul 21, 2011
by
Manuel Grizonnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DOC:update PCA example using the new PCA class (TODO:need to document inverse transformation)
parent
1f5ae17c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
Examples/FeatureExtraction/CMakeLists.txt
Examples/FeatureExtraction/CMakeLists.txt
+2
-3
Examples/FeatureExtraction/PCAExample.cxx
Examples/FeatureExtraction/PCAExample.cxx
+14
-12
No files found.
Examples/FeatureExtraction/CMakeLists.txt
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
...
...
Examples/FeatureExtraction/
InnerProduct
PCAExample.cxx
→
Examples/FeatureExtraction/PCAExample.cxx
View file @
11b3e132
...
...
@@ -24,14 +24,14 @@
// Software Guide : BeginCommandLineArgs
// INPUTS: {ROI_QB_MUL_1.png}
// OUTPUTS: {
InnerProductPCAOutput.tif}, {PrettyInnerProductPCAOutput1.png}, {PrettyInnerProductPCAOutput2.png}, {PrettyInnerProduct
PCAOutput3.png}
// OUTPUTS: {
PCAOutput.tif}, {PCAOutput1.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
::
InnerProductPCAImageFilter
<
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]{P
rettyInnerProductP
CAOutput1.eps}
// \includegraphics[width=0.25\textwidth]{P
rettyInnerProductP
CAOutput2.eps}
// \includegraphics[width=0.25\textwidth]{P
rettyInnerProductP
CAOutput3.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
...
...
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