Code Monkey home page Code Monkey logo

quart's Introduction

Quart

Image Segmentation Animation using QuadTree concepts.

  1. Split the Image into four quadrants.
  2. Split the quadrant with the highest error into four quadrants.
  3. Repeat N times.

Images

Segmented Image of an Acacia Tree

Segmented Image of some Rocks

Segmented Image of some Palm Trees

Segmented Image of a Prairie

Segmented Image of a tree on a cliff

Segmented Image of a river

Segmented Image of a Tropical Beach

Segmented Image of a Coastline

Segmented Image of Moonlight

Segmented Image of some Waterfalls

Segmented Image of some Houses

Segmented Image of some Pipes

Segmented Image of some sandstone stairs

Segmented Image of a Palace

Segmented Image of a Landscape

Segmented Image of Lightning

Segmented Image of a road at night

Segmented Image of a twisty road

Borders

Image of a Mountain Road

Segmented Image of a Mountain Road

Segmented Image of a Mountain Road - No Borders

Compression

With or without borders, the quadtree images achieve great compression, especially when using png encoding. Looking at the Mountain Images above, the original is a 1.51 MB jpg file (7.89 MB when converted to png), while the Quadtree Image with borders is a 333 KB png and the one without borders is a 160 KB png.

Video

Fish Video

Usage

usage: quad.py [-h] [-q QUALITY] [-b] [-au] [-mw MINWIDTH] [-mh MINHEIGHT] input output iterations

Quadtree Image Segmentation.

positional arguments:
  input                 Image to segment.
  output                Output filename.
  iterations            Number of segmentation iterations.

optional arguments:
  -h, --help            show this help message and exit
  -q QUALITY, --quality QUALITY
                        Quality of the output video. (0-10), 0 worst, 10 best.
  -b, --border          Add borders to subimages.
  -a, --audio           Add audio from the input file to the output file.
  -mw MINWIDTH, --minwidth MINWIDTH
                        Minimum width of the smallest image quadrant.
  -mh MINHEIGHT, --minheight MINHEIGHT
                        Minimum height of the smallest image quadrant.

Dependencies

numpy
tqdm
imageio
imageio-ffmpeg

pip install numpy tqdm imageio imageio-ffmpeg

quart's People

Contributors

alexeidt 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.