Basically, the namedWindows generated by openCV only work well within the ranges of your screen resolution. Many topics mention that coördinates go wrong when going over that range.
Look at : http://answers.opencv.org/question/9284/drawing-limited-by-size-of-int-in-opencv/
Simple solution is like I already suggested in the suggested topic, using region of interest and looping over your large images in specific windows. It is the only OpenCV way to get 100% correct coördinates inside larger images. I am using it for 25000 x 25000 pixels and it works perfectly.
Mat window = inputImage( Rect( x, y, width, heigth) );
Basically the problem is the way the functionality is written. I do not feel like updating the source code, but just using this simple roi approach, since displaying images larger than your screen is basically useless.