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

조회 수: 1 (최근 30일)
Wenyi Xiao
Wenyi Xiao 2019년 4월 26일
편집: madhan ravi 2019년 4월 26일
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.)?
Wenyi Xiao
Wenyi Xiao 2019년 4월 26일
편집: Wenyi Xiao 2019년 4월 26일
Here are pictures.
I have 1500 pictures like these.

댓글을 달려면 로그인하십시오.

채택된 답변

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.
Wenyi Xiao
Wenyi Xiao 2019년 4월 26일
I found the positive integers, Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by