Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viz3d window is white until moved #9759

Closed
dustsigns opened this issue Oct 2, 2017 · 3 comments
Closed

Viz3d window is white until moved #9759

dustsigns opened this issue Oct 2, 2017 · 3 comments
Labels
bug category: viz OpenCV 4.0+: moved to opencv_contrib

Comments

@dustsigns
Copy link

dustsigns commented Oct 2, 2017

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.

@LaurentBerger
Copy link
Contributor

LaurentBerger commented Oct 2, 2017

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

@dustsigns
Copy link
Author

dustsigns commented Oct 2, 2017

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.

@dustsigns
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug category: viz OpenCV 4.0+: moved to opencv_contrib
Projects
None yet
Development

No branches or pull requests

3 participants