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.
sheno39
sheno39 2013 年 10 月 28 日

サインインしてコメントする。

その他の回答 (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

カテゴリ

Help Center および File ExchangeModify Image Colors についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by