Skip to content

Commit

Permalink
add warp example (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautam98 authored Jul 1, 2020
1 parent a6e6da2 commit 4c5f204
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 18 additions & 1 deletion docs/src/pkgs/transformations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ These functions all have docstrings that give more details about their usage.

There are in-place version of many of the functions, e.g., `imresize!` etc.

## Example
## Examples

- Resize

```julia
using ImageTransformations, TestImages
Expand All @@ -40,3 +42,18 @@ img_medium = imresize(img_small, size(img_small).*2)
Resulting images (small and medium):
![img_small](assets/img_small.png)
![img_medium](assets/img_medium.png)

- Warping

```julia
using ImageTransformations, TestImages, CoordinateTransformations, Rotations

img = testimage("camera");

# define transformation
trfm = recenter(RotMatrix(pi/8), center(img));
imgw = warp(img, trfm);
```

Resulting image:
![img_warp](assets/img_warp.png)

0 comments on commit 4c5f204

Please sign in to comment.