I am trying to gather a position and a direction of an object inside an image.
The image can look like this for example: https://i.stack.imgur.com/4ehUy.jpg
The object is shown as a blue circle.
What I've tried so far is using a basic pixel search, but it seems like the circles blue isnt always the same (maybe because of the shapes and the enviroment) and when I give it a color range (e.g. red 130 - 150, green 110 - 120 and blue 90 - 100), it isnt reliable, because sometimes the pixel is recogniced on top of the hole, sometimes on the right site and so on. Further more the next step would be getting the direction of the object, which is even more difficult, because of the enviroment, which can be very similar to the light infront of the object.
Again, what I'd like to know is the current center of the circle and the angle it is aiming atm...
Is there a library or a way to do this? I am using C# / WPF to program my application.