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
9a0e038a
Commit
9a0e038a
authored
Jan 18, 2015
by
Marvin Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compile warning from redefined macro.
parent
91fbe00c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
7 deletions
+21
-7
CMakeLists.txt
modules/imgcodecs/CMakeLists.txt
+0
-1
grfmt_gdal.cpp
modules/imgcodecs/src/grfmt_gdal.cpp
+11
-2
grfmt_gdal.hpp
modules/imgcodecs/src/grfmt_gdal.hpp
+10
-4
No files found.
modules/imgcodecs/CMakeLists.txt
View file @
9a0e038a
...
...
@@ -51,7 +51,6 @@ if(HAVE_OPENEXR)
endif
()
if
(
HAVE_GDAL
)
add_definitions
(
-DHAVE_GDAL
)
include_directories
(
SYSTEM
${
GDAL_INCLUDE_DIR
}
)
list
(
APPEND GRFMT_LIBS
${
GDAL_LIBRARY
}
)
endif
()
...
...
modules/imgcodecs/src/grfmt_gdal.cpp
View file @
9a0e038a
...
...
@@ -39,10 +39,16 @@
//
//M*/
#include "precomp.hpp"
#include "grfmt_gdal.hpp"
// GDAL Macros
#include "cvconfig.h"
#ifdef HAVE_GDAL
// Our Header
#include "grfmt_gdal.hpp"
/// C++ Standard Libraries
#include <iostream>
#include <stdexcept>
...
...
@@ -196,7 +202,10 @@ GdalDecoder::~GdalDecoder(){
/**
* Convert data range
*/
double
range_cast
(
const
GDALDataType
&
gdalType
,
const
int
&
cvDepth
,
const
double
&
value
){
double
range_cast
(
const
GDALDataType
&
gdalType
,
const
int
&
cvDepth
,
const
double
&
value
)
{
// uint8 -> uint8
if
(
gdalType
==
GDT_Byte
&&
cvDepth
==
CV_8U
){
...
...
modules/imgcodecs/src/grfmt_gdal.hpp
View file @
9a0e038a
...
...
@@ -42,16 +42,15 @@
#ifndef __GRFMT_GDAL_HPP__
#define __GRFMT_GDAL_HPP__
/// OpenCV FMT Base Type
#include "grfmt_base.hpp"
/// Macro to make sure we specified GDAL in CMake
#ifdef HAVE_GDAL
/// C++ Libraries
#include <iostream>
/// OpenCV Libraries
#include "grfmt_base.hpp"
#include "precomp.hpp"
/// Geospatial Data Abstraction Library
#include <gdal/cpl_conv.h>
#include <gdal/gdal_priv.h>
...
...
@@ -61,6 +60,13 @@
/// Start of CV Namespace
namespace
cv
{
/**
* Convert GDAL Pixel Range to OpenCV Pixel Range
*/
double
range_cast
(
const
GDALDataType
&
gdalType
,
const
int
&
cvDepth
,
const
double
&
value
);
/**
* Convert GDAL Palette Interpretation to OpenCV Pixel Type
*/
...
...
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