How to read images with positive integer? No imead()

1 visualización (últimos 30 días)
Wenyi Xiao
Wenyi Xiao el 26 de Abr. de 2019
Editada: madhan ravi el 26 de Abr. de 2019
I want to import images into matlab workspace, they should contain positive integers and zeros. If I use imread(), they will be all zeros.
  3 comentarios
Geoff Hayes
Geoff Hayes el 26 de Abr. de 2019
Wenyi - can you attach one of these images so that we can take a look at it? Or describe the images - what type are they? What is the integer type (8-bit, 16-bit, etc.)?
Wenyi Xiao
Wenyi Xiao el 26 de Abr. de 2019
Editada: Wenyi Xiao el 26 de Abr. de 2019
Here are pictures.
I have 1500 pictures like these.

Iniciar sesión para comentar.

Respuesta aceptada

Catalytic
Catalytic el 26 de Abr. de 2019
Editada: Catalytic el 26 de Abr. de 2019
I definitely don't get all zeros with imread. Problem solved?
>> nnz(imread('C0039_100122_INDS.png'))
ans =
4624
>> nnz(imread('C0039_101785_INDS.png'))
ans =
12177
  3 comentarios
Wenyi Xiao
Wenyi Xiao el 26 de Abr. de 2019
Editada: madhan ravi el 26 de Abr. de 2019
images_data = cell(1500,1);
for S = 1:size(want_files,1)
images_data{S,1} = imread(pngFile_names{want_files(S,1),1}); %load image data from 1500 matched files
end
this is the code I used.
Wenyi Xiao
Wenyi Xiao el 26 de Abr. de 2019
I found the positive integers, Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Import, Export, and Conversion 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