Git Product home page Git Product logo

rpc_cropper's Introduction

RPC Cropper

A small standalone tool to crop satellite images and their RPC.

Usage

Suppose you have two images im1.tif and im2.tif, and the associated RPC coefficients in the files rpc1.xml and rpc2.xml. The call

$ ./rpc_crop.py out im1.tif rpc1.xml im2.tif rpc2.xml 12300 4200 800 600

will write in the folder out the cropped files. The cropped region is defined in the first image by the last four arguments. In the example above, 12300 4200 are the column and the row of the top-left corner of the region, and 800 600 are the width and the height of the region. The second image is cropped in such a way that the region visible in the first crop is still visible in the second crop. This is done using SRTM data.

To interactively select the region to crop, use the rpc_crop_gui.py script. A preview of the reference image is needed:

$ ./rpc_crop_gui.py outdir preview.jpg im1.tif rpc1.xml im2.tif rpc2.xml

Installation

Nothing to do, the only needed binary will be compiled on the fly during the first call to one of the python scripts.

Known dependencies

  • python 2.7 or 2.6
  • numpy
  • pyopengl
  • gdal
  • g++
  • libtiff

On Ubuntu 13.10, all the needed dependencies can be installed through the package manager:

$ sudo apt-get install python-opengl python-numpy gdal-bin libtiff4-dev g++

Note that the use of SRTM data requires an internet connection, at least the first time you run this tool on a dataset.

Authors

Gabriele Facciolo, Enric Meinhardt-Llopis, Carlo de Franchis

rpc_cropper's People

Contributors

carlodef avatar gfacciol 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.