how to find the gradient of pixels in angular direction?

9 vues (au cours des 30 derniers jours)
prasad
prasad le 2 Jan 2013
Modifié(e) : Mehri Mehrnia le 11 Juil 2022
i wish to find gradient of pixels which are at an angle of 30 degrees with the central pixel of the block. How can I do this? because the usual gradient operators like sobel,prewitt will allow finding gradient only in the horizontal or vertical direction and not in angular.

Réponses (2)

Matt J
Matt J le 2 Jan 2013
Modifié(e) : Matt J le 2 Jan 2013
Let H be the horizontal gradient and V be the vertical gradient. Then
H*cosd(30)+V*sind(30)
will give a directional derivative at 30 degrees.

Mehri Mehrnia
Mehri Mehrnia le 11 Juil 2022
Modifié(e) : Mehri Mehrnia le 11 Juil 2022
If I want to find the norm of edge, should I replace 30 with 90 in the above formula?
Is "H*cosd(30)+V*sind(30)" a vector or point?

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by