aoles / EBImage

:art: Image processing toolbox for R
71 stars 28 forks source link

Unable to determine type Filename extension missing. #38

Closed jasperDD closed 5 years ago

jasperDD commented 5 years ago

I have folder with images C:/Users/kravchik/Downloads/mypicture here several image, i need read it.

x <- readImage("C:/Users/kravchik/Downloads/mypicture")

then get the error

Error in readImage("C:/Users/kravchik/Downloads/mypicture") : 
  Unable to determine type of C:/Users/kravchik/Downloads/mypicture: Filename extension missing.

how to read all pictures at once , and then extract pixel array for each picture

# width and height of the original image
dim(x)[1:2]

# scale to a specific width and height
y <- resize(x, w = 200, h = 100)

# scale by 50%; the height is determined automatically so that
# the aspect ratio is preserved
y <- resize(x, dim(x)[1]/2)

# show the scaled image
display(y)

# extract the pixel array
z <- imageData(y)

How to do it?

aoles commented 5 years ago

Thank you for reaching out! I believe this question has already been addressed at SO.