How can I compute the direction of gradient at each pixel of an image I ??
2 views (last 30 days)
Show older comments
I need MatLab code to compute gradient direction atan(y/x) for image at each pixel
0 Comments
Answers (4)
Image Analyst
on 8 Jul 2016
Not sure what your difficulty was, but I spent a few minutes and threw together this code to take the tangent of the gradient images. See attached code.
0 Comments
Walter Roberson
on 29 Jun 2016
atan2() accepts matrix parameters.
I have no idea what your x and y values are going to be, though, unless you are looking at a sequence of images and tracking the fluctuation in each pixel over time.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!