# Orientation/directional image

This topic is 5090 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I was wondering how to make a directional image. I know the concepts like finding the gradiant using sobel to find gradient in x and y direction. I also found a formula to puts these values into and get a result. but it doesnt work. i dont really understand why. The steps i have followed is find the gradient in the x and y using sobel and placing these values into 2 seperate 2 dimential arrays. each array position corresponding to the position in the image where the value comes from. Then for each 17x17 block i use the formula = 90 + 1/2 arctan(2Gxy/Gxx-Gyy) where Gxy is the value of the gradient of x and y multiplied together for all 17x17 pixels. Gxx is the gradient of x squared for all 17x17 pixels Gyy is the gradient of y squared for all 17x17 pixels. But this is not working for me and dont know why. for some reason the angle that comes out is most always infinite. Any help would be greatly appriciated. Some code examples would be greatful aswell. Thanks a millions Thanks Ructions

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 9
• 9
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
633679
• Total Posts
3013300
×