Borrar filtros
Borrar filtros

copying images from array to another folder

1 visualización (últimos 30 días)
sweta arya
sweta arya el 12 de Feb. de 2016
Comentada: sweta arya el 12 de Feb. de 2016
for i=1:50
jpgimagename=strcat('C:\Users\sweta\Desktop\nature_sunset\', ...
num2str(output_images(i)), '.jpg');
status=copyfile(jpgimagename,'C:\Users\sweta\Desktop\nature1\','f');
end
i have an array of size 50 and each entry of it having image number, no entry is having 0 in it.but when i am copying images,final destination folder only having 49 images not 50.Tell me what to do?Thanks in advance.

Respuesta aceptada

Jan
Jan el 12 de Feb. de 2016
Check if the input is unique:
length(unique(output_images(1:50)))
If you get the status from copyfile, display this information:
for k = 1:50
jpgimagename = fullfile('C:\Users\sweta\Desktop\nature_sunset\', ...
num2str(output_images(i)), '.jpg');
[status, message] = copyfile(jpgimagename,'C:\Users\sweta\Desktop\nature1\','f');
if status ~= 1
warning(message);
end
end

Más respuestas (0)

Categorías

Más información sobre Read, Write, and Modify Image 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!

Translated by