2

I would like to specify the size and the postion of my trackbar. With the following code the trackbars are as wide as my window, and they are under each other.

cv2.namedWindow('Settings')

cv2.createTrackbar('A', 'Settings', 0, maxA, startlinechanged)
cv2.createTrackbar('B', 'Settings', 0, maxB, endlinechanged)
cv2.createTrackbar('C', 'Settings', 0, maxC, distancechanged)
cv2.imshow('Settings', img)

How can I specify the width and the position of the trackbars? I would like to put their to the bottom of the window (under the image) and next to each other. Thank you in advance for your help!

THE_GREAT_MARKER
  • 476
  • 4
  • 13

1 Answers1

2

Unfortunately, no. Trackbars are always fixed at the top of your window. I have been looking for the same for a while.

PiBer2
  • 159
  • 10
  • Not quite true. On my systems running opencv-python 4.6, Trackbars are at the top in Windows10 and macOS 13, but in Ubuntu Linux 20.04, they are at the bottom. – Doc Mar 03 '23 at 18:36