MoveWindow () error in C ++ OpenCV 2.3

I am using OpenCV 2.3 version in C ++ and struggling to accomplish the main task. What I would like to do is create a window and move it to a specific location on the screen using, for example:

cv::namedWindow("My Window", 1); cv::MoveWindow("My Window", 10, 10); 

However, it seems that the MoveWindow () function is not available. From the OpenCV 2.3 documentation ( link ), there seem to be implementations of C and Python, but not C ++. Does this mean that there is a better way to do this?

In the relevant section of the documentation:

 MoveWindow ========== Moves window to the specified position -------------------------------------- C: void cvMoveWindow(const char* name, int x, int y) Python: cv.MoveWindow(name, x, y) β†’ None Parameters: - name – Window name - x – The new x-coordinate of the window - y – The new y-coordinate of the window 

RESOLVED:. Starting with the latest version of OpenCV, now there is a function cv::MoveWindow("const string& winname, int x, int y) . Link here .

+7
source share
1 answer

You must use the C function to do this:

 cvMoveWindow(const char* name, int x, int y); 

You can verify this information by downloading OpenCV 2.3 for * nix , and in the C ++ samples directory OpenCV-2.3.0/samples/cpp/tutorial_code/Basic/ find a file called Drawing_1.cpp . It uses the C ++ interface for everyone. except by moving the window.

There seems to be no method for this task in the C ++ interface.

+9
source

All Articles