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
Container Registry
Model registry
Operate
Environments
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
Main Repositories
otb
Commits
e825a1e8
Commit
e825a1e8
authored
15 years ago
by
Manuel Grizonnet
Browse files
Options
Downloads
Patches
Plain Diff
DOC:estimate affine transfo with sift
parent
1dbb77a6
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/DisparityMap/CMakeLists.txt
+2
-1
2 additions, 1 deletion
Examples/DisparityMap/CMakeLists.txt
Examples/DisparityMap/EstimateAffineTransformationExample.cxx
+30
-7
30 additions, 7 deletions
...ples/DisparityMap/EstimateAffineTransformationExample.cxx
with
32 additions
and
8 deletions
Examples/DisparityMap/CMakeLists.txt
+
2
−
1
View file @
e825a1e8
...
...
@@ -51,9 +51,10 @@ ADD_TEST(dmTeEstimateAffineTransformationExampleTest ${EXE_TESTS}
${
TEMP
}
/AffineTransformationOutput.png
EstimateAffineTransformationExampleTest
${
INPUTDATA
}
/QB_Suburb.png
${
INPUTDATA
}
/QB_Suburb13
x
17
y
.png
${
INPUTDATA
}
/QB_Suburb
R10X
13
Y
17.png
${
TEMP
}
/AffineTransformationOutput.png
2 3 0 0 0.5 1
${
TEMP
}
/AffineTransformationTxtOutput.txt
)
INCLUDE_DIRECTORIES
(
${
OTB_SOURCE_DIR
}
/Testing/Code
)
...
...
This diff is collapsed.
Click to expand it.
Examples/DisparityMap/EstimateAffineTransformationExample.cxx
+
30
−
7
View file @
e825a1e8
...
...
@@ -24,8 +24,8 @@
#endif
// Software Guide : BeginCommandLineArgs
// INPUTS: {
ROISpot5.png}, {ROISpot5Moving
.png}
// OUTPUTS: {
SIFTResampling
.png}
// INPUTS: {
QB_Suburb.png}, {QB_SuburbR10X13Y17
.png}
// OUTPUTS: {
AffineTransformationOutput
.png}
// Software Guide : EndCommandLineArgs
// Software Guide : BeginLatex
...
...
@@ -75,10 +75,10 @@
int
main
(
int
argc
,
char
*
argv
[])
{
if
(
argc
!=
1
0
)
if
(
argc
!=
1
1
)
{
std
::
cerr
<<
"Usage: "
<<
argv
[
0
];
std
::
cerr
<<
"fixedFileName movingFileName resamplingImageFileName octaves scales threshold ratio secondOrderThreshold useBackMatching"
<<
std
::
endl
;
std
::
cerr
<<
"fixedFileName movingFileName resamplingImageFileName octaves scales threshold ratio secondOrderThreshold useBackMatching
transfofname
"
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
...
...
@@ -92,6 +92,8 @@ int main (int argc, char* argv[])
float
ratio
=
atof
(
argv
[
7
]);
const
double
secondOrderThreshold
=
atof
(
argv
[
8
]);
const
bool
useBackMatching
=
atoi
(
argv
[
9
]);
const
char
*
outputTransformationFilename
=
argv
[
10
];
const
unsigned
int
Dimension
=
2
;
// Software Guide : BeginLatex
...
...
@@ -359,7 +361,7 @@ int main (int argc, char* argv[])
// Write the transformation to a file
std
::
ofstream
ofs
;
ofs
.
open
(
"transfo.txt"
);
ofs
.
open
(
outputTransformationFilename
);
// Set floatfield to format properly
ofs
.
setf
(
std
::
ios
::
fixed
,
std
::
ios
::
floatfield
);
...
...
@@ -391,16 +393,37 @@ int main (int argc, char* argv[])
// Software Guide : BeginLatex
//
// Write resampled image
// Write resampled image
to png
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef
otb
::
ImageFileWriter
<
OutputImageType
>
WriterType
;
WriterType
::
Pointer
writer
=
WriterType
::
New
();
writer
->
SetInput
(
resampler
->
GetOutput
()
);
writer
->
SetFileName
(
outputImageFilename
);
writer
->
Update
();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// Figure~\ref{fig:SIFTDME} shows the result of the resampled image using the
// estimated transformation based on SIFT points
//
// \begin{figure}
// \center
// \includegraphics[width=0.40\textwidth]{QB_Suburb.eps}
// \includegraphics[width=0.40\textwidth]{QB_SuburbR10X13Y17.eps}
// \includegraphics[width=0.40\textwidth]{AffineTransformationOutput.eps}
// \itkcaption[Estimation of affine transformation from SIFT ]{From left
// to right and top to bottom: fixed input image, moving image,
// resampled moving image.}
// \label{fig:SIFTDME}
// \end{figure}
//
// Software Guide : EndLatex
return
EXIT_SUCCESS
;
}
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