I have a Folder with subfolders of images. The subfolders consist of .JPG, .jpg and .jfif, I need them all to be converted to a single format and returned to their folders?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
imds = imageDatastore('batch_9','IncludeSubfolders',true,'LabelSource','foldernames');
segIm = pixelLabelDatastore('PixelLabelData');
Error using imageDatastore (line 139)
Input folders or files contain non-standard file extensions.
Use FileExtensions Name-Value pair to include the non-standard file extensions.
Error in Segmenattion (line 9)
imds = imageDatastore('batch_9','IncludeSubfolders',true,'LabelSource','foldernames');
I have a labelled pixel data for sematic segmenattion but the images that I have manually segmented are different formats so I cannot create an imageDataStore from the image files so that I can train a sematic segmentation network. Does anyone know how to change the file format of each image in the subfolders of batch_9 and replace them with the new common image files to their original folders?
1 comentario
Walter Roberson
el 22 de Mzo. de 2022
https://www.mathworks.com/matlabcentral/fileexchange/90840-jpeg-baseline-matlab-code might help with the jfif perhaps
Respuestas (2)
Image Analyst
el 22 de Mzo. de 2022
Editada: Image Analyst
el 22 de Mzo. de 2022
imformats
0 comentarios
DGM
el 22 de Mzo. de 2022
At least with the JFIF files I have, imread() has no problem reading them. imageDatastore() ignores them, but throws no error (maybe version differences). If I use the 'fileextensions' option as the message suggests, it picks them up and reads them just fine. Using readimage() works fine on them.
fext = {'.jpg','.jfif'}; % case-insensitive
imds = imageDatastore('./','IncludeSubfolders',false,'fileextensions',fext);
I haven't run across any files that have any issues with this, but maybe it's possible.
0 comentarios
Ver también
Categorías
Más información sobre Image Data Workflows en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!