| op_image_elastic_transform | R Documentation |
Apply random elastic deformation to 3D or 4D image tensors.
op_image_elastic_transform(
images,
alpha = 20,
sigma = 5,
interpolation = "bilinear",
fill_mode = "reflect",
fill_value = 0,
seed = NULL,
data_format = NULL
)
images |
Input image or batch of images. Must be 3D or 4D. |
alpha |
Scaling factor that controls the intensity of the deformation. |
sigma |
Standard deviation of the Gaussian filter used for smoothing the displacement fields. |
interpolation |
Interpolation method. Available methods are |
fill_mode |
Points outside the boundaries of the input are filled
according to the given mode. Available methods are
|
fill_value |
Value used for points outside the boundaries of the input if
|
seed |
Optional integer seed for the random number generator. |
data_format |
A string specifying the data format of the input tensor.
It can be either |
Transformed image or batch of images with elastic deformation.
x <- random_uniform(c(2, 64, 80, 3)) # batch of 2 RGB images y <- op_image_elastic_transform(x) op_shape(y)
## shape(2, 64, 80, 3)
x <- random_uniform(c(64, 80, 3)) # single RGB image y <- op_image_elastic_transform(x) op_shape(y)
## shape(64, 80, 3)
x <- random_uniform(c(2, 3, 64, 80)) # batch of 2 RGB images y <- op_image_elastic_transform( x, data_format = "channels_first", seed = 123 ) op_shape(y)
## shape(2, 3, 64, 80)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.