how to do convolution without commands

4 visualizaciones (últimos 30 días)
Sivakumar Rajagopal
Sivakumar Rajagopal el 3 de Abr. de 2020
Comentada: Sivakumar Rajagopal el 6 de Abr. de 2020
I=img;
b=rgb2gray(I); [Gx,Gy]=imgradientxy(b); figure();
[Gmag, Gdir] = imgradient(Gx,Gy);
gx=[-1 0 1; -2 0 2; -1 0 1];
gy=transpose(gx);
gi=gray2ind(b);
Fx=conv2(double(b),gx,'same')
In the above coding how to do convolution without conv2

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 3 de Abr. de 2020
  3 comentarios
Ameer Hamza
Ameer Hamza el 3 de Abr. de 2020
See the calculation of res2. That code compares built-in convolution with for loop.
Sivakumar Rajagopal
Sivakumar Rajagopal el 6 de Abr. de 2020
Ok. Thanks.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by