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
629877a4
Commit
629877a4
authored
14 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Output should be in milli-reflectance
parent
35a4bdd9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Radiometry/otbOpticalCalibration.cxx
+14
-8
14 additions, 8 deletions
Radiometry/otbOpticalCalibration.cxx
with
14 additions
and
8 deletions
Radiometry/otbOpticalCalibration.cxx
+
14
−
8
View file @
629877a4
...
...
@@ -30,7 +30,7 @@
#include
"otbStreamingImageFileWriter.h"
#include
"otbStandardWriterWatcher.h"
#include
"otbPipelineMemoryPrintCalculator.h"
#include
"otbMultiplyByScalarImageFilter.h"
namespace
otb
{
...
...
@@ -38,7 +38,7 @@ namespace otb
int
OpticalCalibration
::
Describe
(
ApplicationDescriptor
*
descriptor
)
{
descriptor
->
SetName
(
"OpticalCalibration"
);
descriptor
->
SetDescription
(
"Perform optical calibration TOA/TOC"
);
descriptor
->
SetDescription
(
"Perform optical calibration TOA/TOC
. Output image is in milli-reflectance.
"
);
descriptor
->
AddInputImage
();
descriptor
->
AddOutputImage
();
descriptor
->
AddOptionNParams
(
"Level"
,
...
...
@@ -51,14 +51,16 @@ int OpticalCalibration::Describe(ApplicationDescriptor* descriptor)
int
OpticalCalibration
::
Execute
(
otb
::
ApplicationOptionsResult
*
parseResult
)
{
typedef
otb
::
VectorImage
<
unsigned
short
int
,
2
>
ImageType
;
typedef
otb
::
VectorImage
<
float
,
2
>
FloatImageType
;
typedef
otb
::
ImageFileReader
<
ImageType
>
ReaderType
;
typedef
otb
::
StreamingImageFileWriter
<
ImageType
>
WriterType
;
typedef
ImageToLuminanceImageFilter
<
ImageType
,
ImageType
>
ImageToLuminanceImageFilterType
;
typedef
LuminanceToReflectanceImageFilter
<
ImageType
,
ImageType
>
LuminanceToReflectanceImageFilterType
;
typedef
ReflectanceToSurfaceReflectanceImageFilter
<
ImageType
,
ImageType
>
ReflectanceToSurfaceReflectanceImageFilterType
;
typedef
ImageToLuminanceImageFilter
<
ImageType
,
FloatImageType
>
ImageToLuminanceImageFilterType
;
typedef
LuminanceToReflectanceImageFilter
<
FloatImageType
,
FloatImageType
>
LuminanceToReflectanceImageFilterType
;
typedef
otb
::
MultiplyByScalarImageFilter
<
FloatImageType
,
ImageType
>
ScaleFilterType
;
typedef
ReflectanceToSurfaceReflectanceImageFilter
<
FloatImageType
,
FloatImageType
>
ReflectanceToSurfaceReflectanceImageFilterType
;
typedef
otb
::
PipelineMemoryPrintCalculator
MemoryCalculatorType
;
// calibration process
...
...
@@ -77,10 +79,14 @@ int OpticalCalibration::Execute(otb::ApplicationOptionsResult* parseResult)
luminanceToReflectanceFilter
->
SetInput
(
imageToLuminanceFilter
->
GetOutput
());
reflectanceToSurfaceReflectanceFilter
->
SetInput
(
luminanceToReflectanceFilter
->
GetOutput
());
ScaleFilterType
::
Pointer
scaleFilter
=
ScaleFilterType
::
New
();
scaleFilter
->
SetInput
(
luminanceToReflectanceFilter
->
GetOutput
());
scaleFilter
->
SetCoef
(
1000.
);
//Instantiate the writer
WriterType
::
Pointer
writer
=
WriterType
::
New
();
writer
->
SetFileName
(
parseResult
->
GetOutputImage
());
writer
->
SetInput
(
luminanceToReflectanc
eFilter
->
GetOutput
());
writer
->
SetInput
(
scal
eFilter
->
GetOutput
());
writer
->
SetWriteGeomFile
(
true
);
//Instantiate the pipeline memory print estimator
...
...
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