https://github.com/paithiov909/aznyan
Image effects for R, ported from https://github.com/5PB-3-4/AviUtl_OpenCV_Scripts
https://github.com/paithiov909/aznyan
Last synced: 6 months ago
JSON representation
Image effects for R, ported from https://github.com/5PB-3-4/AviUtl_OpenCV_Scripts
- Host: GitHub
- URL: https://github.com/paithiov909/aznyan
- Owner: paithiov909
- License: other
- Created: 2020-08-03T00:00:19.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-03T09:32:26.000Z (7 months ago)
- Last Synced: 2025-04-03T09:32:40.003Z (7 months ago)
- Language: C++
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aznyan
[](https://paithiov909.r-universe.dev/aznyan)aznyan is a collection of image effects for R that wraps
[OpenCV](https://opencv.org/), ported from
[5PB-3-4/AviUtl_OpenCV_Scripts](https://github.com/5PB-3-4/AviUtl_OpenCV_Scripts).Still in development. It will probably work, but documentation is scant.
## Usage
aznyan provides functions that take a `raw` vector of image data as
their first argument and return a `raw` vector of PNG format image after
applying the effect.You can simply read a PNG image into a raw vector using `readBin()` and
save those return values as a PNG image using `writeBin()`.``` r
pkgload::load_all(export_all = FALSE)
#> ℹ Loading aznyanpng <- readBin(
system.file("images/sample-256x256-4ch.png", package = "aznyan"),
what = "raw",
n = file.info(system.file("images/sample-256x256-4ch.png", package = "aznyan"))$size
)
```The original image `png` above looks like this:

### Blur
``` r
median_blur(png, ksize = 8) |>
png::readPNG(native = TRUE) |>
grid::grid.raster(interpolate = FALSE)
```
### Diffusion Filter (拡散フィルタ)
``` r
diffusion_filter(png, factor = 8) |>
png::readPNG(native = TRUE) |>
grid::grid.raster(interpolate = FALSE)
```
![]()