Coder Social home page Coder Social logo

dltech21 / tiff2png-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cappelletto/tiff2png

0.0 0.0 0.0 110 KB

Independent TIFF to PNG converter module

License: GNU General Public License v3.0

Shell 13.92% C++ 74.14% CMake 10.51% Dockerfile 1.43%

tiff2png-1's Introduction

build License: GPL v3

tiff2png

Stand-alone module that converts geoTIFF images into 8/16 bit PNG format. Used as part of the preprocessing step for terrain feature extraction. The terrain information (topo-bathymetry) is centered by substracting its mean value and then scaled according to the user-defined parameter max_z. Depending on the output resolution, the maximum value will be mapped to 255 (8 bits PNG) or 65535 (16 bits PNG). Additional parameters allow defining a ROI from the input file that will be extracted and converted.

Features

  • Can read any geoTIFF topography or bathymetry map supported by GDAL
  • Can export 8/18 bit PNG. Additionally, single channel (grayscale) or 3-channel (RGB) output formats are available
  • User defined ROI (Region of Interest) to be exported
  • Support CRS projections for Earth(WGS84) and Mars(IAU2000:49901)
  • Companion parallel bash script for processing large batches

Installation

Start with installing the following dependencies:

  • OpenCV 4.X:
sudo apt install libopencv-contrib-dev libopencv-core-dev libopencv-imgcodecs-dev libopencv-dev
  • GDAL 2.X, 3.X
sudo apt install libgdal-dev -y
  • yaml-cpp
sudo apt install libyaml-cpp-dev -y

Note: if you have installed OpenCV of GDAL from a different source (e.g. locally compiled), you can still use it defining their corresponding installation paths when running cmake

Then proceed to clone this repository:

git clone --recurse-submodules https://github.com/cappelletto/tiff2png.git

Create a build directory and run CMake

mkdir build
cd build
cmake ..

Finally, complete the compilation and installation (optional)

make -j `nproc --ignore=2`
make install

How to use it

How to contribute

Credits

tiff2png-1's People

Contributors

cappelletto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.