Coder Social home page Coder Social logo

warp7p's Introduction

GitHub release (latest by date) GitHub Release Date GitHub repo size GitHub all releases GitHub

warp7p

Description

Simple utility to apply 7+1 parameter distortion (k1, k2, p1, p2, k3, cx, cy, mc) to an image as per the equations here. Made for the sake of learning and to demonstrate the effects of the individual parameters for a university project on camera calibration. Uses nearest neighbour interpolation.

Requires

  • lodepng.h and lodepng.cpp from LodePNG (for PNG input/output)
  • nanoflann.hpp from nanoflann (for fast approximate nearest neighbour interpolation with a KD-tree)

Are present in the source directory, alongside main.cpp.

Usage

warp7p <input.png> <output.png> [k1=0.0] [k2=0.0] [p1=0.0] [p2=0.0] [k3=0.0] [cx=0.5] [cy=0.5] [mc=1.0]

Example

warp7p test.png testout.png -0.4 0 -0.05 0.1 0 0.5 0.5 2.0

Where test.png is:
test.png
Produces the resulting out.png:
out.png

The effects of individual parameters:

k1 (positive)
k1.png
k1 (negative)
k1n.png
k2
k2.png
k3
k3.png
p1
p1.png
p2
p2.png

License

GPLv2

warp7p's People

Contributors

zvezdochiot avatar rosslovas avatar

Watchers

James Cloos avatar  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.