Object Tracing with Particular Color I started working on a autonomous robot project in my spare time. Everything is finished except the image proccessing part. I want my robot to follow an object with particular properties. For the start, I decided to use color as the particular property. For example if object's color is yellow, then I want my robot to chase it. I am using OpenCV and tried some of the sample codes but the problem is that in real world lightning is not uniform and the sample codes which I tried did not do a good job because of the changing threshold.

So what can I do? What do you prefer to me? (Are there any better sample codes, algorithm suggestions etc?) I will appreciate if you explain your suggestions as if you were explaining it to someone with nearly none experience with image processing.

Regards,

Amadeus
As you're probably starting to realise this is a very big field with a number of different methods which you can try.

If you want to try to use colour, you can try transforming from RGB to HSV space, which attempts to decouple the colour from the "lightness", this may improve your lighting inconsistencies.

The next problem is how to track your object. If you know the object's colour distribution (histogram) then you can use backprojection to assign a likelihood to each pixel being that colour, then perhaps you could simply track the centre of mass of the back projection.

Alternatively, you could look into template matching, where a template is scanned across the image and areas which match this template closely are scored more highly than non-matches, giving you likely areas for where the object is.

If you have any more specific information about what you are trying to acomplish, it will be easier to help you: do you have an example input image, with targeted highlighted?