trackbar 3 sins

asked 2014-06-03 13:24:14 -0600

sukye gravatar image

updated 2014-06-03 13:27:12 -0600

trackbar is really a nice feature, but I am not happy with 3 things

  1. no zoom in. yes the window can be as large as the screen, but it's still not in full resolution.

  2. bar parameters always start from 0. it's an invalid value for many function parameters.

  3. bar parameters are set to be continuous integers. so I have to modify the function parameters like p/100.0 or 2*p+1.

I will really appreciate it if anyone can share some thoughts of a better solution.

edit retag flag offensive close merge delete

Comments

  1. To zoom in the images, use the QT GUI (compile OpenCV with WITH_QT flag). It will give you better UI controls, including zoom in/out.

2-3. Trackbars and other OpenCV UI elements are just some quick and simple solution to control your algorithm and set some parameters interactively. You can simply implement any transformation of the values (like you said), just remember the values you should use.

If you want a more serious interface (for a software to be released), you should ceate a more serious interface (I suggest to use QT).

kbarni gravatar imagekbarni ( 2014-06-04 02:47:28 -0600 )edit

Thank you kbarni.

I installed QTVS2013Addin and now there is a QT5 tab in my Visual Studio 2013. What's the next steps?

I am working in a Windows 7 environment and dont know how to compile OpenCV with WITH_QT flag.

sukye gravatar imagesukye ( 2014-06-04 10:47:33 -0600 )edit

I don't use Windows and Visual Studio, so I can't give you further instructions. Please check the relevant documentation (Compiling OpenCV on Windows), there should be lots of tutorials.

For Qt programming I use Qt creator. There are also a lot of tutorials about transforming cv::Mat images to QImage variables.

Note that if you prefer to use a GUI created in Qt with OpenCV images, you don't have to recompile OpenCV.

kbarni gravatar imagekbarni ( 2014-06-05 03:58:38 -0600 )edit