GithubHelp home page GithubHelp logo

wschang / drawqtree Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 264 KB

A demo which uses quadtree to represent an image. The demo can either display the final result or show an animation of how the quadtree was generated.

License: MIT License

Python 100.00%

drawqtree's Introduction

DrawQuadTree

A demo which uses quadtree to represent an image. The demo can either display the final result or show an animation of how the quadtree was generated.

Introduction

This was inspired by another GitHub project: https://github.com/fogleman/Quads I thought it was an interesting demo, and decided to build one for myself

Prerequisite

  • Requires the module Pillow 2.5. It should work with PIL as well, given that Pillow is a fork of PIL.
  • Tested using Python 2.7x. It should work fine with 2.6x, but it does not support Python 3.x.
  • Tested in Windows 8.1, but should work under earlier versions of Windows as well as Linux and OSX.

How to run

The demo can display the quadtree in two modes:

  • draw the final quadtree representation
  • animate the creation of the quadtree.

Using the Lenna test image, we can display the final output

>> python demo.py -f./path/to/Lenna.png -v300

demo_static

To show an animatation of the quadtree creation while showing the quadtree boundaries,

>> python demo.py -f./path/to/Lenna.png -v300 -g -a

Press the "Stop" button to cancel the animation before exiting the demo.

demo_static

License

DrawQtree is released under the MIT license. See LICENSE.txt

drawqtree's People

Contributors

wschang avatar

Watchers

 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.