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

1 次查看(过去 30 天)
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 个评论
Geoff Hayes
Geoff Hayes 2019-4-26
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.)?

请先登录,再进行评论。

采纳的回答

Catalytic
Catalytic 2019-4-26
编辑:Catalytic 2019-4-26
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 个评论
Wenyi Xiao
Wenyi Xiao 2019-4-26
编辑:madhan ravi 2019-4-26
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Import, Export, and Conversion 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by