-
-
Notifications
You must be signed in to change notification settings - Fork 56.4k
Closed
Description
System information (version)
- OpenCV => 3.3
- Operating System / Platform => Ubuntu 16.04 (x86-64) with QT 5.5
- Compiler => g++ 5.4.0
Detailed description
Trackbar names are truncated after the tenth character, regardless of their actual length on-screen. The following example illustrates the effect:
Steps to reproduce
#include <opencv2/highgui.hpp>
using namespace std;
using namespace cv;
static constexpr auto trackbar_name = "X angle [deg.]"; //Use "X angle [°]" to see the same effect
int main()
{
namedWindow("Test window");
imshow("Test window", Mat(600, 600, CV_8UC1, Scalar(128)));
int dummy;
createTrackbar(trackbar_name, "Test window", &dummy, 360, [](const int, void * const){});
waitKey(0);
return 0;
}
This limitation does not seem to be documented. But even so, it would be more desirable to use names as long as one pleases, i.e., without arbitrary character limitations. Being limited to ten characters is not really meaningful when using narrow characters/symbols or wide windows.