필터 지우기
필터 지우기

how to compare the value of a pixel with all other pixel?

조회 수: 2 (최근 30일)
sheno39
sheno39 2013년 10월 28일
답변: sheno39 2013년 10월 28일
i have to compare each pixel with all other pixels and find equal values.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2013년 10월 28일
M = randi(10,40,30);
uM = unique(M);
out = [uM, histc(M(:),uM)];
  댓글 수: 3
Image Analyst
Image Analyst 2013년 10월 28일
You forgot to attach your texture1.jpg image. Don't make it hard for us to help you. Make it easy for us to help you by attaching your image.

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

추가 답변 (2개)

Jos (10584)
Jos (10584) 2013년 10월 28일
You question is a little unclear. But, see
help unique
M = ceil(10*rand(40,30)) % pixel image
uM = unique(M) ;
% and use it like this
tf = M==uM(k)
[r,c] = find(tf)
  댓글 수: 1
sheno39
sheno39 2013년 10월 28일
sir i have to compare each pixel with all other pixels and if any pixels having equal values i have to increament the count.

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


sheno39
sheno39 2013년 10월 28일
i have attached my image here

태그

Community Treasure Hunt

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

Start Hunting!

Translated by