Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
561703ca
Commit
561703ca
authored
Jul 02, 2014
by
Marvin Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the compiler warnings for the demo program.
parent
14548227
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
gdal-image.cpp
samples/cpp/tutorial_code/HighGUI/GDAL_IO/gdal-image.cpp
+15
-2
No files found.
samples/cpp/tutorial_code/HighGUI/GDAL_IO/gdal-image.cpp
View file @
561703ca
...
...
@@ -15,7 +15,6 @@
using
namespace
std
;
/// define the corner points
/// Note that GDAL can natively determine this
cv
::
Point2d
tl
(
-
122.441017
,
37.815664
);
...
...
@@ -30,6 +29,20 @@ cv::Point2d dem_tr( -123.0, 37);
/// range of the heat map colors
std
::
vector
<
std
::
pair
<
cv
::
Vec3b
,
double
>
>
color_range
;
/// List of all function prototypes
cv
::
Point2d
lerp
(
const
cv
::
Point2d
&
,
const
cv
::
Point2d
&
,
const
double
&
);
cv
::
Vec3b
get_dem_color
(
const
double
&
);
cv
::
Point2d
world2dem
(
const
cv
::
Point2d
&
,
const
cv
::
Size
&
);
cv
::
Point2d
pixel2world
(
const
int
&
,
const
int
&
,
const
cv
::
Size
&
);
void
add_color
(
cv
::
Vec3b
&
pix
,
const
uchar
&
b
,
const
uchar
&
g
,
const
uchar
&
r
);
/**
* Linear Interpolation
* p1 - Point 1
...
...
@@ -73,7 +86,7 @@ cv::Vec3b get_dem_color( const double& elevation ){
// otherwise, find the proper starting index
int
idx
=
0
;
double
t
=
0
;
for
(
int
x
=
0
;
x
<
color_range
.
size
()
-
1
;
x
++
){
for
(
int
x
=
0
;
x
<
(
int
)(
color_range
.
size
()
-
1
)
;
x
++
){
// if the current elevation is below the next item, then use the current
// two colors as our range
...
...
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