How to find the difference of adjacent pixels in an image? Thanks
9 ビュー (過去 30 日間)
古いコメントを表示
How to find the difference of adjacent pixels in an image? Thanks
0 件のコメント
採用された回答
Image Analyst
2016 年 8 月 4 日
In which direction? Assuming left and right, you can use conv2() or imfilter():
img = imread('moon.tif');
diffImage = imfilter(img, [1, -1]);
imshow(diffImage, [])
8 件のコメント
Sidra Aleem
2017 年 3 月 27 日
編集済み: Sidra Aleem
2017 年 3 月 27 日
Below figure illustrates what I want to do
Image Analyst
2017 年 3 月 27 日
That would have been helpful to know in advance. I have no time to program this up for you but it's very similar to my local binary pattern demo where I get the values in a circle around the pixel like that. You just have to add or subtract them rather than take them as a binary number. See attached demo.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!