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
f00ba4cd
Commit
f00ba4cd
authored
12 years ago
by
Manuel Grizonnet
Browse files
Options
Downloads
Patches
Plain Diff
ENH: remove adjacency effects in OpticalCalibration application
parent
fe84f723
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
Applications/Radiometry/otbOpticalCalibration.cxx
+29
-28
29 additions, 28 deletions
Applications/Radiometry/otbOpticalCalibration.cxx
with
29 additions
and
28 deletions
Applications/Radiometry/otbOpticalCalibration.cxx
+
29
−
28
View file @
f00ba4cd
...
...
@@ -287,43 +287,44 @@ private:
//GetLogger()->Info("Atmospheric correction parameters : " + oss.str());
//Compute adjacency effect
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
=
SurfaceAdjacencyEffect6SCorrectionSchemeFilterType
::
New
();
//
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
//
= SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::New();
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
->
SetInput
(
m_ReflectanceToSurfaceReflectanceFilter
->
GetOutput
());
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
->
SetAtmosphericRadiativeTerms
(
m_ReflectanceToSurfaceReflectanceFilter
->
GetAtmosphericRadiativeTerms
());
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
->
SetZenithalViewingAngle
(
m_AtmosphericParam
->
GetViewingZenithalAngle
());
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
->
SetWindowRadius
(
GetParameterInt
(
"radius"
));
//
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetInput(m_ReflectanceToSurfaceReflectanceFilter->GetOutput());
//
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->
//
SetAtmosphericRadiativeTerms(
//
m_ReflectanceToSurfaceReflectanceFilter->GetAtmosphericRadiativeTerms());
//
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetZenithalViewingAngle(
//
m_AtmosphericParam->GetViewingZenithalAngle());
//
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetWindowRadius(GetParameterInt("radius"));
//estimate ground spacing in kilometers
GroundSpacingImageType
::
Pointer
groundSpacing
=
GroundSpacingImageType
::
New
();
//
//estimate ground spacing in kilometers
//
GroundSpacingImageType::Pointer groundSpacing = GroundSpacingImageType::New();
groundSpacing
->
SetInputImage
(
inImage
);
IndexType
index
;
//
groundSpacing->SetInputImage(inImage);
//
IndexType index;
vnl_random
rand
;
//
vnl_random rand;
index
[
0
]
=
static_cast
<
IndexValueType
>
(
rand
.
lrand32
(
0
,
inImage
->
GetLargestPossibleRegion
().
GetSize
()[
0
]));
index
[
1
]
=
static_cast
<
IndexValueType
>
(
rand
.
lrand32
(
0
,
inImage
->
GetLargestPossibleRegion
().
GetSize
()[
1
]));
FloatType
tmpSpacing
=
groundSpacing
->
EvaluateAtIndex
(
index
);
//
index[0] = static_cast<IndexValueType>(rand.lrand32(0, inImage->GetLargestPossibleRegion().GetSize()[0]));
//
index[1] = static_cast<IndexValueType>(rand.lrand32(0, inImage->GetLargestPossibleRegion().GetSize()[1]));
//
FloatType tmpSpacing = groundSpacing->EvaluateAtIndex(index);
const
float
spacingInKilometers
=
(
std
::
max
(
tmpSpacing
[
0
],
tmpSpacing
[
1
]))
/
1000.
;
//
const float spacingInKilometers = (std::max(tmpSpacing[0], tmpSpacing[1])) / 1000.;
// std::ostringstream oss2;
// oss2.str("");
// oss2 << spacingInKilometers;
//
//
std::ostringstream oss2;
//
//
oss2.str("");
//
//
oss2 << spacingInKilometers;
// GetLogger()->Info("Spacing in kilometers " + oss2.str());
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
->
SetPixelSpacingInKilometers
(
spacingInKilometers
);
//
//
GetLogger()->Info("Spacing in kilometers " + oss2.str());
//
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->
//
SetPixelSpacingInKilometers(spacingInKilometers);
//rescale the surface reflectance in milli-reflectance
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
->
UpdateOutputInformation
();
//m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->Update();
m_ScaleFilter
->
SetInput
(
m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
->
GetOutput
());
// //rescale the surface reflectance in milli-reflectance
// m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->UpdateOutputInformation();
// //m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->Update();
// m_ScaleFilter->SetInput(m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->GetOutput());
m_ScaleFilter
->
SetInput
(
m_ReflectanceToSurfaceReflectanceFilter
->
GetOutput
());
}
break
;
}
...
...
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