MATLAB Answers

How do i isolate the vertical lines in an image?

25 views (last 30 days)
Good day, I am trying to isolate the vertical lines in an image to make the image show only the vertical lines present in the image.

Answers (1)

Arun Mathamkode
Arun Mathamkode on 20 Mar 2018
You can use the imgradientxy function to find gradients along x and y axis. Since the vertical lines will have gradients along x direction, you can threshold the gradients along x direction to separate the vertical lines. For example, if I is the image
[gx gy]=imgradientxy(I);
VertLines=gx>950 % Choose a proper threshod
figure, imshow(VertLines,[]);

  0 Comments

Sign in to comment.