Missing trackbars in OpenCV

asked 2015-09-05 05:38:23 -0500

renzbagaporo gravatar image

updated 2015-09-05 06:21:21 -0500

I have 8 trackbars for my application. However, when the window is displayed, the last trackbar is missing. I tried setting the window to CV::WINDOW_NORMAL, making the window resizable. Resizing the window shows the missing trackbar. Is there a way to dispay the all the trackbars without resizing?

Edit: Added the code relevant to the question at hand. settings_window and views_window are const strings.

void image_demo::exec(){
    //Initialize the UI

    //Create the trackbars
    cv::createTrackbar("COST", settings_window, &ad_gamma, 100, on_trackbar, this);
    cv::createTrackbar("ARM_L", settings_window, &arm_length, 100, on_trackbar, this);
    cv::createTrackbar("M_ARM_L", settings_window, &max_arm_length, 100, on_trackbar, this);
    cv::createTrackbar("ARM_T", settings_window, &arm_threshold, 100, on_trackbar, this);
    cv::createTrackbar("S_ARM_T", settings_window, &strict_arm_threshold, 100, on_trackbar, this);

    cv::createTrackbar("VOTE_I", settings_window, &bfv_iterations, 10, on_trackbar, this);
    cv::createTrackbar("MED_SZ", settings_window, &medfilt_size, 15, on_trackbar, this);
    cv::createTrackbar("DISP_T", settings_window, &disparity_tolerance, 10, on_trackbar, this);

    cv::Mat left_frame, right_frame, disp_frame, demo_frame;
    frame.get_frames(left_frame, right_frame);

    cv::Mat grid_view_im;

    while (true){
        if (!matcher.compute(frame, disp_frame) && run) break;
        demo_frame = disp_frame.clone();
        grid_view_im = disp_frame.clone();
        cv::imshow(views_window, grid_view_im);
edit retag flag offensive close merge delete



best idea is to put all the trackbars into a seperate window, so they don't depend on the imgsize

berak gravatar imageberak ( 2015-09-05 06:04:25 -0500 )edit

Actually, that's what I did. I edited my post to include the code relevant to the creation of trackbars.

renzbagaporo gravatar imagerenzbagaporo ( 2015-09-05 06:22:18 -0500 )edit