I am trying to detect a pattern on an object on a green field, made up of three colors (two pink markers to the sides and a blue one in the middle) arranged like a traffic l
I'd suggest you check out Shervin's tutorial on blob detection, using colors http://www.shervinemami.info/blobs.html
EDIT
You night try retinex to help improve results
http://www.ipol.im/pub/algo/lmps_retinex_poisson_equation/