delete_rect | R Documentation |
creates a rectangular hole in the image with the specified dimensions
delete_rect(image,i,j,width,height)
image |
image to be modified, it has to be a 3D array proceed with readImage function from EBImage package |
i |
row index of the upper left corner of the rectangle |
j |
column index of the upper left corner of the rectangle |
width |
width of the rectangle |
height |
height of the rectangle |
delete_rect
a 3D array with pixels in the hole set to -100 and the rest of the image pixels unchanged
image<-EBImage::readImage(system.file("extdata", "bird.jpg", package = "ProxReg"))
image_noise<-delete_rect(image,160,160,20,20)
image_noise<-EBImage::Image(image_noise,colormode = "Color")
EBImage::display(image_noise)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.