How to find the difference of adjacent pixels in an image? Thanks
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How to find the difference of adjacent pixels in an image? Thanks
0 Commenti
Risposta accettata
Image Analyst
il 4 Ago 2016
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 Commenti
Sidra Aleem
il 27 Mar 2017
Modificato: Sidra Aleem
il 27 Mar 2017
Below figure illustrates what I want to do

Image Analyst
il 27 Mar 2017
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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!