Jump to content
  • Advertisement
Sign in to follow this  
Ructions

Orientation/directional image

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

If you intended to correct an error in the post then please contact us.

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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!