Opencv: Viz3d window is white until moved

Created on 2 Oct 2017  路  3Comments  路  Source: opencv/opencv

System information (version)
  • OpenCV => 3.3
  • Operating System / Platform => Ubuntu 16.04 with xfce, QT 5.5 and VTK 6.2
  • Compiler => g++ 5.4.0
Detailed description

Under certain conditions (see below), the Viz3d window is completely white until it is is moved with the mouse. Consider the following example code:

Steps to reproduce
#include <cmath>
#include <opencv2/viz.hpp>

using namespace std;
using namespace cv;
using namespace viz;

int main()
{
  Viz3d visualization("Test");
  /*const Mat image(10, 10, CV_32FC3, Scalar(0));
  WCloud cloud(image);
  visualization.showWidget("Point cloud", cloud);*/ //Uncomment me
  visualization.spinOnce(1, true);
  while (!visualization.wasStopped())
    visualization.spinOnce(1, true);
}

It works fine, i.e., shows a regular Viz3d window. However, when uncommenting the three lines as indicated, the Viz3d window is completely white:

white_window

When it is moved with the mouse (clicking and holding over the title bar), everything works as expected again, i.e., the window shows its contents.

While the issue is reproducible with the code above, slight variations of the code seem to work fine. I was not able to figure out yet what sets this code apart from those which work fine (cf. documentation and the code in the issues that I submitted previously), but it does not depend on the widget type or the window name passed the the Viz3d constructor.

bug viz

Most helpful comment

The issue seems to be caused by VirtualBox's 3-D acceleration. Disabling it makes the problem go away. Thus, I don't think that this issue is an OpenCV issue.

All 3 comments

Using vs2015 opencv 3.3-dev (windows 10-64 bits) vtk 8.1 using this source code :

    viz::Viz3d visualization("Test");
    const Mat image(10, 10, CV_32FC3, Scalar(0));
    viz::WCloud cloud(image);
    visualization.showWidget("Point cloud", cloud); //Uncomment me
    visualization.spinOnce(1, true);
    while (!visualization.wasStopped())
        visualization.spinOnce(1, true);

I have got this
screenshot-1506941956

It looks like a platform-specific issue then.

Update: I added the VTK version that I am using above. It is the default package provided by Ubuntu.

The issue seems to be caused by VirtualBox's 3-D acceleration. Disabling it makes the problem go away. Thus, I don't think that this issue is an OpenCV issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

opencv-pushbot picture opencv-pushbot  路  3Comments

kwstanths picture kwstanths  路  3Comments

dpo picture dpo  路  3Comments

opencv-pushbot picture opencv-pushbot  路  3Comments

charlesxwang picture charlesxwang  路  3Comments