Ask Your Question

JiayiLiu's profile - activity

2014-12-31 12:05:55 -0600 received badge  Enthusiast
2014-10-20 12:53:08 -0600 received badge  Supporter (source)
2014-10-15 22:20:19 -0600 asked a question Motivation behind VizImpl

Just noticed that, in the viz module, the implementation of the functions of the Viz3d class is not realized inside the class. Instead, it is implemented in a VizImpl struct which itself is a private member of the Viz3d class.

So whenever an Viz3d function is called, that dummy Viz3d function calls the real VizImpl function instead.

I'm just purely curious about the initial consideration of implementing it this way. Thank you!

2014-10-15 12:37:17 -0600 commented question [Viz] picking 3D points in a cloud

I'm not aware if there is a 3D point picking function in the current viz module. But PCL has had one implemented at http://docs.pointclouds.org/1.7.1/classpcl_1_1visualization_1_1_point_picking_event.html, if you don't mind integrating with one more library..

2014-10-15 12:18:22 -0600 commented question Segfault on quitting viz3d using the 'q' key

Yeah sounds good. I'll first try with the latest build and see if it's still there. If so, I will raise a ticket and keep digging..

2014-10-15 11:43:32 -0600 received badge  Editor (source)
2014-10-14 20:02:49 -0600 commented question Segfault on quitting viz3d using the 'q' key

@StevenPuttemans, these keys are defined in "4 vtkInteractorStyle::OnChar vtkInteractorStyle.cxx" which is inside "VTK-6.1.0/Rendering/core/". It seems like something went wrong between VTK and viz3d.

2014-10-13 16:20:04 -0600 commented question Structure from Motion

Considering the licensing, I think it is impossible to take the existing SfM source code as is and integrate into OpenCV. OpenCV is under BSD and the SfM programs above are GPL, and they are not compatible. But the integration is possible the other way around though, I mean, license-wise.. cmiiw

2014-10-13 01:52:27 -0600 received badge  Student (source)
2014-10-12 21:58:55 -0600 asked a question Segfault on quitting viz3d using the 'q' key

The same problem occurred on both of my Ubuntu and Windows machines, i.e., when I run the viz3d tutorial example and hit the 'q' key to quit, exceptions are thrown. But if I press 'e' instead, no error happens.

So for Windows, I have Windows-8_x64 + qt-5.3 + vtk-6.1.0 + opencv-2.4.10. When I run the example, the error is like:

Unhandled exception at 0x00007FFBBCD8A776 (opencv_viz2410d.dll) in testViz.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

And the Visual Studio debugger takes me to the function in vizimpl.cpp:

void cv::viz::Viz3d::VizImpl::ExitCallback::Execute(vtkObject*, 
                                                    unsigned long event_id, 
                                                    void*)
{
    if (event_id == vtkCommand::ExitEvent)
    {
        viz->interactor_->TerminateApp();
        viz->interactor_ = 0;
    }
}

For Ubuntu, I have Ubuntu-12.04_x64 + qt-5.0.2 + vtk-6.1.0 + opencv-2.4.9, and the error is "Segmentation fault (core dumped)".

The stack of the QtCreator debugger GDB offered more insight:

0 cv::viz::Viz3d::VizImpl::ExitCallback::Execute(vtkObject, unsigned long, void) /usr/local/lib/libopencv_viz.so.2.4 0x7ffff7bb6048
1 vtkSubjectHelper::InvokeEvent vtkObject.cxx 620 0x7ffff5f20286
2 vtkObject::InvokeEvent vtkObject.cxx 789 0x7ffff5f20795
3 vtkRenderWindowInteractor::ExitCallback vtkRenderWindowInteractor.cxx 296 0x7ffff1fb5870
4 vtkInteractorStyle::OnChar vtkInteractorStyle.cxx 702 0x7ffff2006b4a
5 cv::viz::vtkVizInteractorStyle::OnChar() /usr/local/lib/libopencv_viz.so.2.4 0x7ffff7bc2193
6 vtkInteractorStyle::ProcessEvents vtkInteractorStyle.cxx 1145 0x7ffff20087dc
7 vtkCallbackCommand::Execute vtkCallbackCommand.cxx 42 0x7ffff5dbe02d
8 vtkSubjectHelper::InvokeEvent vtkObject.cxx 620 0x7ffff5f20286
9 vtkObject::InvokeEvent vtkObject.cxx 789 0x7ffff5f20795
10 vtkXRenderWindowInteractorCallback vtkXRenderWindowInteractor.cxx 857 0x7ffff15a4097
11 XtDispatchEventToWidget /usr/lib/x86_64-linux-gnu/libXt.so.6 0x7fffe805d256
12 ?? /usr/lib/x86_64-linux-gnu/libXt.so.6 0x7fffe805d9e6
13 XtDispatchEvent /usr/lib/x86_64-linux-gnu/libXt.so.6 0x7fffe805daa4
14 vtkXRenderWindowInteractor::Start vtkXRenderWindowInteractor.cxx 300 0x7ffff15a2259
15 cv::viz::Viz3d::VizImpl::spinOnce(int, bool) /usr/local/lib/libopencv_viz.so.2.4 0x7ffff7bb66af
16 main testViz.cpp 109 0x403eb3

So does someone have any idea, or get the same error? Could this be some bug in the viz module?