Skip to content

Commit

Permalink
Merge pull request nicolaspanel#32 from nicolaspanel/features/rot90
Browse files Browse the repository at this point in the history
add flip and rot90 utils
  • Loading branch information
nicolaspanel authored Nov 26, 2017
2 parents b6f0b43 + d6a30fa commit c27fa32
Show file tree
Hide file tree
Showing 10 changed files with 555 additions and 327 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,28 @@ array([[ 40, 40, 40],
__Note__: `convolve` uses Fast Fourier Transform (FFT) to speed up computation on large arrays.


### Other utils
`rot90`
```js
> m = nj.array([[1,2],[3,4]], 'int')
> m
array([[1, 2],
[3, 4]])
> nj.rot90(m)
array([[2, 4],
[1, 3]])
> nj.rot90(m, 2)
array([[4, 3],
[2, 1]])
> m = nj.arange(8).reshape([2,2,2])
> nj.rot90(m, 1, [1,2])
array([[[1, 3],
[0, 2]],
[[5, 7],
[4, 6]]])
```


## Images manipulation
__NumJs__’s comes with powerful functions for image processing. Theses function are located in `nj.images` module.

Expand Down
Loading

0 comments on commit c27fa32

Please sign in to comment.