image - function like imread() in R -


Can someone tell me that function like a imread with matlab applied in some packages in RAP Yes or No ? I would like to read an image in R and then remove RGB color at specific places from the picture.

imreads explains that the function A = imread (filename, fmt) A will return an x-by-y-by-3 matrix Where x and y are the number of pixels in the height and width of the dimensions, and the third dimension includes red, green and blue values ​​for each given pixel. It seems to me what to do

It depends on whether you want to read png or jpeg file Are there.

You can call the appropriate library.

For example PNG,

  Library (png) img  
  library (JPEG) IMG & lt; - readJPEG / Code>  

System.file ("img", "Rlogo.jpg", package = "JPEG"))

Edit:

img & lt; - readPNG "Rplot05.png")

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -