How to take values of all pixels of a binary image?

조회 수: 3 (최근 30일)
Shahriar Nasim
Shahriar Nasim 2018년 2월 22일
댓글: Rik 2018년 2월 22일
Hi, I new in Matlab. I have a binarized image. I mean, i want to save the value like (X,Y) = 0 or 1. where, X,Y pixel cordinate. using imtool i can copy only one value at a time.But i need to copy all the values at a time. plz help me with that.
  댓글 수: 6
Shahriar Nasim
Shahriar Nasim 2018년 2월 22일
Wisselink sir, How can I copy all the pixel value with their coordinates?
Rik
Rik 2018년 2월 22일
I could write the code to write your matrix to a file, but you have explained why you would want to. I don't feel like spending time on code that is useless to you, so I want to be sure you want a text file with a content like this:
(1,1)=1
(1,2)=0
(1,3)=1
(2,1)=0
(2,2)=0
(2,3)=1
When provided with an image like:
IM=[1 0 1;0 0 1]

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by