Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Computation of Non directional Edge

Asked by M@lik Ali on 29 Jan 2013

i want to compute non directional edge of an image block, how i can compute, the simple edge method, will return non directional edge? if no please suggest me the solution

0 Comments

M@lik Ali

Products

No products are associated with this question.

1 Answer

Answer by Image Analyst on 29 Jan 2013
Accepted answer

You can convolve with the Laplacian, which is like the average edge over all 4 directions (vertical, horizontal, and the two diagonals).

kernel = [-1, -1, -1; -1, 8, -1; -1, -1, -1];
highPassFilteredImage = conv2(double(originalGrayImage), kernel, 'same');

1 Comment

M@lik Ali on 31 Jan 2013

its good its result in matrix, so if i need a value then what i should do, and if i want to count the edges then what is the procedure. Actually i need to count the edges in a sub image then categories the edges in 5 types, i-e. non directional, vertical , horizontal , and both diagonals, please help me out.

Image Analyst

Contact us