Tag Archives: cmake

The solution to the error of “no override found for * *” in the use of VTK

This error is caused by not compiling with CMAKE, so some macro definitions and configurations are not initialized, resulting in the factory function of the class being used being unusable. So based on my experience in these days:

    first of all, the example programs such as cone, attribute macro definition in c + + preprocessor “copy” to their own projects; If this error occurs again, use such as VTK_MODULE_INIT(vtkrenderingVolumeOpenGL); Initialize the required modules.

More are still being explored…

VTK (1) — compile and install

Project environment: QT+VTK+ CMAKE


The file packages used in this article are:

    visual studio 2013
    DXSDK_Jun10
    Cmake – 3.3.2 rainfall distribution on 10-12 – win32 – x86
    Qt5.7
    Qt – v – system.addin – 1 – opensource
    TBB (Thread Building Blocks)
    VTK 7.1

1. Install Visual Studio 2013 Community

    Download https://www.visualstudio.com/downloads/download-visual-studio-vs
    Select Visual Studio 2013 ->; Community 2013
    Download and install community default locations and default optional features (takes about half an hour to complete)

Some errors in VTK compilation

1, error MSB6006: “cmd.exe” exited with code 1
The error description is shown below:

Reasons for error reported in VS2013 Output:
28> CMake Error at F:/vtk7.0/VTKsrc/CMake/ExternalData CMake: 1005 (the message) :
28 & gt; Object MD5=b7d4fa1943ca47ef537e6847886e3935 not found at:
28> http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download& checksum=b7d4fa1943ca47ef537e6847886e3935& Algorithm =MD5 (” Timeout was reached “)
; http://www.vtk.org/files/ExternalData/MD5/b7d4fa1943ca47ef537e6847886e3935 (” Failure when identifiers data from the peer “)
28 & gt; Call Stack (most recent call first):
28> F:/vtk7.0/VTKsrc/CMake/ExternalData CMake: 1027 (_ExternalData_download_object)
28 & gt; C: \ Program Files \ MSBuild \ Microsoft (x86) Cpp \ v4.0 \ V120 \ Microsoft CppCommon. The targets (170, 5) : error MSB6006: “CMD. Exe” exited with code 1.
Error reason:
This error is caused by the incorrect setting of VTK_DATA_ROOT in CMAKE, which is the BUILD_TESTING option, and the need to download the VTKDATA data at compile time. The time to download the data exceeds the maximum waiting time set due to the network speed or lack of scientific Internet surfing.
Solution:
Download the vtkdata.zip data and overwrite the MD5 file in the unzipper file \ExternalData\Objects\MD5 file in the binary directory.

Common mistakes and solutions of cmake + QT + VTK

1. Installation environment
Cmake3.0 + QT4.8.6 + VTK5.10
PS.VTK6.10 or above can only be used with QT5.0 or above versions
2. Compile and install
Reference: http://blog.csdn.net/www_doling_net/article/details/8532742
3. Common mistakes
1, Could not find a package configuration file provided by “Qt5Widgets” with
any of the following names:

Qt5WidgetsConfig. Cmake
Qt5Widgets – config. Cmake

Add the installation prefix of “Qt5Widgets” to CMAKE_PREFIX_PATH or set
“Qt5Widgets_DIR” to a directory containing one of the above files. If
“Qt5widgets” provides a separate development package or SDK, be sure it has
been installed.
This error is generally caused by the incorrect selection of the version number of Qt. Carefully check whether the version number of Qt is 4 or 5. We can solve it.
2

Failing to find Glu32 is usually due to the wrong path. Be careful to check the installation path.
3. There are a lot of things you can’t select from the CMake process, such as the build file. You have to install something in order to be able to cmake, so try to follow the tutorial as much as possible.
What problems can leave a message below, a lot of problems, have not been able to recall in time.

Qt5 when compiling VTK_ The solution of dir-notfound

The module Module_vtkGUISupportQt and Module_vtkViewsQt are opened, and Qt5 is used. Qt5_DIR-NOTFOUND error CMake Configure Qt5_DIR-NOTFOUND error The solution is as follows.
1. QT5 installation path
Take my computer’s QT5 installation path as an example. On my computer, Qt is installed in: E: Toolkits\Qt\Qt5.5.1.
2. VTK source file path
I am using the official release of VTK 7.0.0.rc2. Unzip the VTK source code to: E:\Toolkits\ vtk-7.0.0.rc2 \source on my computer
QT5_DIR – NotFound = QT5_DIR – NotFound = QT5_DIR – NotFound
Open the file E:\Toolkits\ vtk-7.0.0.rc2 \source\ cmMakelists.txt in line 1 of the file as follows:

cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)

Add a line of script that reads:

cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
set (CMAKE_PREFIX_PATH "E:/Toolkits/Qt/Qt5.5.1/qtbase")

Configure Generate. Configure Generate.

Recording some pits of VTK + QT

QAlgorithms. H: QAlgorithms. H: QAlgorithms. H: QAlgorithms. H: QAlgorithms
2. When cmake compiles VTK, select x64, enter the release mode that you want to select when you build VTK (otherwise there will be lib missing)
3. VS remember to start in administrator mode
 

cv2.error: OpenCV(3.4.2) error: (-215:Assertion failed) !empty() in function ‘detectMultiScale‘

cv2。错误:(-215:断言失败)!empty()函数’ detectMultiScale ‘

报错信息

cv2.error: OpenCV(3.4.2) /Users/travis/build/skvark/opencv-python/opencv/modules/objdetect/src/cascadedetect.cpp:1698: error: (-215:Assertion failed) !empty() in function 'detectMultiScale'

solution

cv2.CascadeClassifier('**/**/**.xml')

check the above path, in any case similar to check the path is correct