Sobel Operator no threshold

3 visualizaciones (últimos 30 días)
GARRETT
GARRETT el 3 de Mzo. de 2014
Comentada: Anand el 4 de Mzo. de 2014
I'm using the "edge(img,'sobel')" function but it returns a matrix that is logical. Is there a way to make it a uint8? I want to see it just the filtering.

Respuesta aceptada

Image Analyst
Image Analyst el 3 de Mzo. de 2014
Don't use edge(). Use imgradient() instead. You will get the actual Sobel filtered image.
  2 comentarios
GARRETT
GARRETT el 3 de Mzo. de 2014
Thanks that worked, how would I show the histogram for it?
I was able to see it by [Gmag, Gdir] = imgradient(img,'sobel'); imshow(Gxy,[]);
Anand
Anand el 4 de Mzo. de 2014
For 256 bins, you could use
h = hist(Gmag(:),256);

Iniciar sesión para comentar.

Más respuestas (1)

Anand
Anand el 3 de Mzo. de 2014
[Gx,Gy] = imgradientxy(im,'sobel');

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by