hay2needle | R Documentation |
Cut off a part of image from a whole image.
hay2needle(haystack_image, pos_x, pos_y, w = 50, h = 20)
haystack_image |
An image of cimg. |
pos_x , pos_y |
A numeric to indicate the top left corner of cutting image. When NULL, position will be randomly sampled. |
w , h |
A numeric for width or height of the cutting image. |
An image of cimg object.
haystack_image <- imager::load.example("parrots")
needle_image <- hay2needle(haystack_image, 200, 250, 100, 50)
layout(c(1:2))
plot(haystack_image)
plot(needle_image)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.