Ask Your Question
0

Trackbar with floating values

asked 2016-04-01 06:22:15 -0500

Nbb gravatar image

Hello,

Does anyone know if it is possible to implement a trackbar with floating values with single decimal place ? The only way I managed to achieve it is to divide the value by 10. But how do I display this result on the trackbar itself ? for e.g. to show me 1.2 instead of 12

Thanks

edit retag flag offensive close merge delete

Comments

1

You cannot with the standard OpenCV GUI tools. But keep in mind that it is merely there for debugging. You would need to switch to QT for example, to make a GUI which is more versatile and which could do exactly that what you want.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-04-01 06:34:58 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-01-27 06:25:52 -0500

Bit late, but you can divide the values from the trackbar by 10 or 100. For example, if I want to get float values from 0 to 5, I will do a trackbar with values from 0 to 50 and will divide them by 10.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-04-01 06:22:15 -0500

Seen: 3,676 times

Last updated: Apr 01 '16