Skip to content

Commit

Permalink
Add nominal documentation for “ops” functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Rideout committed Aug 16, 2015
1 parent 0042209 commit 1eb8d90
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Documentation
distance
color
generate
ops
importexport
24 changes: 24 additions & 0 deletions docs/ops.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Image Operations
################

All functions with the ``heman_ops_`` prefix are meant for doing very simple image operations that are outside of heman's core functionality.

.. code-block:: c
// Given a set of same-sized images, copy them into a horizontal filmstrip.
heman_image* heman_ops_stitch_horizontal(heman_image** images, int count);
// Given a set of same-sized images, copy them into a vertical filmstrip.
heman_image* heman_ops_stitch_vertical(heman_image** images, int count);
// Transform texel values so that [minval, maxval] map to [0, 1] and return the
// result. Values outside the range are clamped. The source image is
// untouched.
heman_image* heman_ops_normalize_f32(
heman_image* source, HEMAN_FLOAT minval, HEMAN_FLOAT maxval);
// Generate a monochrome image by applying a step function.
heman_image* heman_ops_step(heman_image* image, HEMAN_FLOAT threshold);
// Generate a height x 1 x 1 image by averaging the values across each row.
heman_image* heman_ops_sweep(heman_image* image);

0 comments on commit 1eb8d90

Please sign in to comment.