Functions to manipulate images in Quadtrees. More...
Classes | |
class | ChannelMeasure |
A Measure class that works on a single channel. More... | |
class | ImageMeasure |
A Measure class that works on a RGB image. More... | |
Functions | |
def | linearise |
Change a 2D grid into a 1D list. | |
def | gridify |
Converts a 1D list into a 2D grid. | |
def | max_tuple |
Takes the pointwise maximum of two tuples. | |
def | max_grid |
Takes the point-wise maximum of a list of grids. | |
def | render_node |
Renders a node into a grid. | |
def | render_outline |
Renders a tree into a grid. |
Functions to manipulate images in Quadtrees.
def quadtree_image.gridify | ( | lst, | ||
dims | ||||
) |
Converts a 1D list into a 2D grid.
Definition at line 21 of file quadtree_image.py.
def quadtree_image.linearise | ( | grid | ) |
Change a 2D grid into a 1D list.
Definition at line 13 of file quadtree_image.py.
def quadtree_image.max_grid | ( | grids | ) |
Takes the point-wise maximum of a list of grids.
Definition at line 39 of file quadtree_image.py.
def quadtree_image.max_tuple | ( | tuple1, | ||
tuple2 | ||||
) |
Takes the pointwise maximum of two tuples.
For example, given the two tuples (100, 3, 50) and (20, 20, 20), the result is the tuple (100, 20, 50).
Definition at line 30 of file quadtree_image.py.
def quadtree_image.render_node | ( | grid, | ||
node, | ||||
outline = False , |
||||
interpolate = False | ||||
) |
Renders a node into a grid.
Definition at line 171 of file quadtree_image.py.
def quadtree_image.render_outline | ( | tree, | ||
factor, | ||||
outline = False , |
||||
interpolate = False | ||||
) |
Renders a tree into a grid.
Definition at line 187 of file quadtree_image.py.