Description Usage Arguments Details Value Examples
Apply augmentations to single image.
1 2 3 4 5 | aug_img(img, out_width = 224L, out_height = 224L, params = list(flip
= list(prob = 0.5), flop = list(prob = 0.5), crop = list(width = 180,
height = 180, x_off = c(0, 30), y_off = c(0, 30)), rotate = list(angle =
c(-25, 25)), modulate = list(brightness = c(90, 110), saturation = c(95,
105), hue = c(80, 120))))
|
img |
Image (object of class |
out_width |
Output image width (in pixels). |
out_height |
Output image height (in pixels). |
params |
Named list of tranformation parameters (order matters - see Details).
Each name should match one of |
Operations are applied to the image in order specified by params
argument.
Please note that cropped and rotated image is not the same thing as
rotated and cropped one.
Currently implemented transformations:
* flip (parameterized by prob
- probability of vertical reflection)
* flop (parameterized by prob
- probability of horizontal reflection)
* crop (parameterized by
width
- width of cropped region,
higth
- higth of cropped region, x_off
- x offset (min, max),
y_off
- y offset (min, max))
* rotate (parameterized by angle
- rotation angle (min, max))
* modulate (parameterized by
brightness
- brightness shift in percentage of current value (min, max);
saturation
- saturation shift in percentage of current value (min, max);
hue
- hue shift in percentage of current value (min, max))
Transformed image (cropped or 0-padded if necessary to
(out_width, out_height)
size).
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.