フィルターのクリア

Adjacent pixel subtraction of matrix

2 ビュー (過去 30 日間)
Sidra Aleem
Sidra Aleem 2017 年 3 月 25 日
編集済み: Sidra Aleem 2017 年 3 月 25 日
I have a 3 X 3 Matrix. I want to subtract adjacent pixels on boundaries to subtract from each other in clockwise manner skipping the central pixel. Example:
A= [ 0,0,1;
1,1,0;
0,0,1];
Subtraction of adjacent pixel at boundaries.
(0-0)=0 , (0-1)= -1; (1-0)=1; (0-1)= -1, (1-0)=1, (0,0)=0; (0-1)=-1, (1-0)=1.
I tried
X = [0 0 1;
1, 1,0;
0,0,1];
Y = diff(X,1,2);
But its the difference between columns.
I also tried index wise subtraction. But its not giving correct result.
Thanks in advance

回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by