Skip to content

Commit 4c5f204

Browse files
authored
add warp example (#150)
1 parent a6e6da2 commit 4c5f204

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
39 KB
Loading

docs/src/pkgs/transformations/index.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ These functions all have docstrings that give more details about their usage.
2828

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

31-
## Example
31+
## Examples
32+
33+
- Resize
3234

3335
```julia
3436
using ImageTransformations, TestImages
@@ -40,3 +42,18 @@ img_medium = imresize(img_small, size(img_small).*2)
4042
Resulting images (small and medium):
4143
![img_small](assets/img_small.png)
4244
![img_medium](assets/img_medium.png)
45+
46+
- Warping
47+
48+
```julia
49+
using ImageTransformations, TestImages, CoordinateTransformations, Rotations
50+
51+
img = testimage("camera");
52+
53+
# define transformation
54+
trfm = recenter(RotMatrix(pi/8), center(img));
55+
imgw = warp(img, trfm);
56+
```
57+
58+
Resulting image:
59+
![img_warp](assets/img_warp.png)

0 commit comments

Comments
 (0)