Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ale
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
aflab
astrogeology
Ale
Commits
d5571c13
Unverified
Commit
d5571c13
authored
1 year ago
by
Oleg Alexandrov
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add radtan distortion (#575)
parent
e1959ec2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/ale/Distortion.h
+2
-1
2 additions, 1 deletion
include/ale/Distortion.h
src/Util.cpp
+18
-2
18 additions, 2 deletions
src/Util.cpp
with
20 additions
and
3 deletions
include/ale/Distortion.h
+
2
−
1
View file @
d5571c13
...
...
@@ -9,7 +9,8 @@ namespace ale {
DAWNFC
,
LROLROCNAC
,
CAHVOR
,
LUNARORBITER
LUNARORBITER
,
RADTAN
};
}
...
...
This diff is collapsed.
Click to expand it.
src/Util.cpp
+
18
−
2
View file @
d5571c13
...
...
@@ -342,9 +342,9 @@ double getSemiMinorRadius(json isd) {
// type. Defaults to transverse
DistortionType
getDistortionModel
(
json
isd
)
{
try
{
json
distor
i
ton_subset
=
isd
.
at
(
"optical_distortion"
);
json
distort
i
on_subset
=
isd
.
at
(
"optical_distortion"
);
json
::
iterator
it
=
distor
i
ton_subset
.
begin
();
json
::
iterator
it
=
distort
i
on_subset
.
begin
();
std
::
string
distortion
=
(
std
::
string
)
it
.
key
();
...
...
@@ -362,6 +362,8 @@ DistortionType getDistortionModel(json isd) {
return
DistortionType
::
CAHVOR
;
}
else
if
(
distortion
.
compare
(
"lunarorbiter"
)
==
0
)
{
return
DistortionType
::
LUNARORBITER
;
}
else
if
(
distortion
.
compare
(
"radtan"
)
==
0
)
{
return
DistortionType
::
RADTAN
;
}
}
catch
(...)
{
throw
std
::
runtime_error
(
"Could not parse the distortion model."
);
...
...
@@ -528,6 +530,20 @@ std::vector<double> getDistortionCoeffs(json isd) {
coefficients
=
std
::
vector
<
double
>
(
4
,
0.0
);
}
}
break
;
case
DistortionType
::
RADTAN
:
{
try
{
coefficients
=
isd
.
at
(
"optical_distortion"
)
.
at
(
"radtan"
)
.
at
(
"coefficients"
)
.
get
<
std
::
vector
<
double
>>
();
return
coefficients
;
}
catch
(...)
{
throw
std
::
runtime_error
(
"Could not parse the radtan distortion model coefficients."
);
coefficients
=
std
::
vector
<
double
>
(
5
,
0.0
);
}
}
break
;
}
throw
std
::
runtime_error
(
"Could not parse the distortion model coefficients."
);
...
...
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