Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions src/doc/imagebufalgo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,43 @@ Shuffling channels
|


.. doxygengroup:: st_warp
..

..
Examples:

FIX ME! This is not complete, examples need to be added to docs-examples-imagebufalgo.{cpp,py}
.. tabs::

.. tab:: C++
.. literalinclude:: ../../testsuite/docs-examples-cpp/src/docs-examples-imagebufalgo.cpp
:language: c++
:start-after: BEGIN-imagebufalgo-st_warp
:end-before: END-imagebufalgo-st_warp
:dedent: 4

.. tab:: Python
.. literalinclude:: ../../testsuite/docs-examples-python/src/docs-examples-imagebufalgo.py
:language: py
:start-after: BEGIN-imagebufalgo-st_warp
:end-before: END-imagebufalgo-st_warp
:dedent: 4

.. tab:: oiiotool
.. code-block:: bash

oiiotool mandrill.tif distortion_st.tif --st_warp -o mandrill_distorted.tif

# Using an `st` map authored in terms of a lower-left origin (e.g. by
# Nuke), so flip the vertical (`t`) coordinate.
oiiotool mandrill.tif st_from_nuke.tif --st_warp:filter=triangle:flip_t=1 -o mandrill_distorted.tif

oiiotool grid.exr --st_warp 0.7071068,0.7071068,0,-0.7071068,0.7071068,0,20,-8.284271,1 -o out.exr

|


.. doxygenfunction:: demosaic(const ImageBuf &src, KWArgs options = {}, ROI roi = {}, int nthreads = 0)
..

Expand Down
20 changes: 20 additions & 0 deletions src/doc/pythonbindings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2696,6 +2696,26 @@ Image transformations and data movement



.. py:method:: ImageBuf ImageBufAlgo.st_warp (src, M, filtername="", filtersize=0.0, wrap="default", recompute_roi=False, roi=ROI.All, nthreads=0)
bool ImageBufAlgo.st_warp (dst, src, M, filtername="", filtersize=0.0, wrap="default", recompute_roi=False, roi=ROI.All, nthreads=0)

Compute a warped (transformed) copy of `src`, with the warp specified by
`M` consisting of 9 floating-point numbers representing a 3x3
transformation matrix. If the filter and size are not specified, an
appropriate default will be chosen.

Example:

.. code-block:: python

# distortion_st.tif is a map where every pixel value contains the 2D
# coordinate of where to copy from.
Distort = ImageBuf("distortion_st.tif")
Src = ImageBuf("tahoe.exr")
Dst = ImageBufAlgo.st_warp(Src, Distort)



.. py:method:: ImageBuf ImageBufAlgo.resize (src, filtername="", filtersize=0.0, roi=ROI.All, nthreads=0)
bool ImageBufAlgo.resize (dst, src, filtername="", filtersize=0.0, roi=ROI.All, nthreads=0)

Expand Down