Mouse coordinates on image

get a build of OpenCV that has the Qt toolkit enabled, or set a mouse callback. it’s all described in the documentation for the highgui module of OpenCV.