images ='C:\Users\TIET\Desktop\tomato'; jpgfiles=dir(fullfile(images,'\*.jpg*')) n=numel(jpgfiles); idx=randi(n); im=jpgfiles(idx).name im1=imread(fullfile(images,im))
MATLAB: What changes are to be made in the following code to convert all the images in grayscale
rgb2gray
Related Question
- Please how do i load images from a folder to a cnn model? each time i try it, i get the error message: Struct contents reference from a non-struct array object.
- Writing a image to folder
- How to conver folder (images) from GRB to Gary and save them in Output folder with the same original names
- How do i read all the files in a folder
Best Answer