霍夫变换平面探测器3DTK

时间:2016-07-26 07:56:50

标签: c++ 3d vtk hough-transform

我目前正在尝试使用3DTK的霍夫变换平面探测器(http://slam6d.sourceforge.net/)。当我尝试使用EXPORT_SHARED_LIBS选项编译它时,我在cxspare_s项目中遇到链接器错误。

1>cs_convert.obj : error LNK2019: unresolved external symbol 'cs_dl_spalloc' referenced in function 'cs_l_real'
1>cs_convert.obj : error LNK2019: unresolved external symbol 'cs_ci_spalloc' referenced in function 'cs_i_complex'
1>cs_convert.obj : error LNK2019: unresolved external symbol 'cs_cl_spalloc' referenced in function 'cs_l_complex'

spalloc函数在Path 3DTK \ 3rdparty \ cxsparse-4.4.4 \ suitesparse中的cs.h头文件中定义,但它们似乎并未实现。至少我无法在任何地方找到它们。

编译静态库虽然效果很好。

我在Windows 7上运行

  • Visual Studio 2015专业版
  • 3DTK Revision 1179
  • boost 1.60
  • OpenCV 3.10
  • zlib 1.2.8
  • VTK 7.0

任何人都知道什么是错的?

因为我不需要整个3DTK,所以我还克隆了Hough变换平面探测器(https://github.com/midas-journal/midas-journal-820)。我删除了HoughPlanes.cpp,将vtkHoughPlanes定义为Export类并将其编译为获取* .lib和* .dll文件,该文件运行良好。链接lib也有效,但是一旦我包含了vtkHoughPlanes Header,我就会得到数百次相同的错误:

Error C2666: "vtkOStreamWrapper::operator <<": 6 overloads have similar conversions C:\PROGRA~1\VTK\include\vtk-7.0\vtkTextProperty.h   44  

因此编译器不知道哪个流插入operatoren&lt;&lt;使用是因为含糊不清。所有错误都会导致相同的VTK宏&#34; vtkGetVector3Macro&#34;在几个VTK标题中。但错误和宏定义都在VTK本身,所以我该怎么办呢?我可以在代码中的任何位置进行类型转换,以使运算符明确,因为我不知道代码中错误的原因。项目本身没有vtkOStreamWrapper的实例。

由于霍夫变换平面探测器本身是一个相当古老的项目,是否有可能VTK 7不再兼容?

我会很感激任何想法。

电贺 戴夫

1 个答案:

答案 0 :(得分:0)

你提到的Github项目的一个分支应该在更高版本的VTK中得到支持。

https://github.com/daviddoria/VTKHoughPlanes