I am trying to write a code color tracking for mouse control.I am using OS X / X Code / OpenCV. Color tracking process is working good.After that i want to use a function as controlling to mouse cursor,move ,click, right click etc.I am planing to make a multi touch project.I need to control to mouse events.This code finds x and y coordinate and drawing a line.How can i use mouse control functions.i couldn't put code here i am sorry..
here is code link http://aishack.in/tutorials/tracking-colored-objects-opencv/
Is your question how to control mouse position by programming? If yes, please edit and clarify your question. I would use xdotool, on OSX you can install it using MacPorts. It's a command tool, so you can try some command first in the terminal like
xdotool mousemove 100 200
move the mouse cursor tox=100
andy=200
. All you need to do then is send form these commands and send to terminal from whatever programming language you use.