opencv moveWindow works in vscode terminal but not Ubuntu's

29 views Asked by At
cv2.namedWindow(WINDOW_NAME, cv2.WINDOW_FREERATIO)
cv2.setWindowProperty(WINDOW_NAME, cv2.WND_PROP_FULLSCREEN, cv2. WINDOW_FULLSCREEN)

cv2.namedWindow(SECOND_WINDOW_NAME, cv2.WINDOW_FREERATIO)
cv2.moveWindow( SECOND_WINDOW_NAME, 2560, 0 )
cv2.setWindowProperty(SECOND_WINDOW_NAME, cv2.WND_PROP_FULLSCREEN, cv2. WINDOW_FULLSCREEN)

Hello,

i have two widescreeen monitors ( 2560x1080 ) and i have to display two fullscreen opencv windows on them, the above code initializes the windows and then in a while loop i imshow the images.

The problem is that this code works perfectly when i launch the ros2 run command on vscode terminal, but when i launch it from ubuntu's terminal, it shows both windows in the primary monitor

I tried to comment the full screen command and i can see the window actually moved, maybe it's the fullscreen command?

I also tried many combinations of coordinates and signs.

0

There are 0 answers