Category Archives: How to Fix

CodeBlocks configuring OpenGL environment

(1) Copy gult32.dll, Glut. DLL to Windows system system32(if Windows 7 is a 64-bit operating system, it is in C:\ Windows SysWOW64 file)
(2) Copy gult32.lib, Glut. lib to CodeBlocks\ MinGW\lib
(3) Copy ULT. H to VC under CodeBlocks\ MinGW\include\GL
You can set up a GLUT project, you can set up an OpenGL project, and you need to configure the build option. It’s best to include the Windows.h header file at the top of your code.
The required GLUT file downloads GLUT
Build option configuration

Comparison of ITK and VTK

Conceptually compares problems encountered by the installation steps

Concept comparison

tr BBB2 <>BBB3 Basi>ncepts TK (Insi>Segmentation and Registration Toolkit) isualizat>) Toolkit)

tr> <>> build <>d>

action

a medical image processing, registration and segmentation packages

used in 3 d computer graphics, image processing and visualization software system

language

ITK are implemented in c + +, can cross platform, can use a variety of different programming languages to develop

VTK is on the basis of the principle of object-oriented design and implementation, The kernel is built in C++ and can be used in different languages using
to>ge the build>cess with CMake to ensure the build process is platform-independent. es CMake to manage the build process to ensure that the build process is platform independent.

thought

extreme programming (core characteristics is communication and test)

visualization of pipeline is to achieve the organization form of data to display the results
Installation steps
Cmake-3.9.3-win64-x64
-itk: InsightToolkit-4.12.2/VTK: vtk-8.0.1
The following installations are based on Windows 10, Visual Studio 2015 development platform

1. Create the installation directory
. CMake
3.
. Configuration ITK/VTK
Problems encountered
Error configuration process, project files may be invalid
CMAKE is not used to select the version of VS on your machine. This is not used to select the version of VS 14 2015 Win64 on your machine. This is not used to select the version of VS 14 2015 Win64 on your machine
The Value cannot be null is still being learned

Problems in compiling VTK with cmake: solutions to error configuration process, project files may be invalid

After setting up the basic VTK environment, the learning process follows. But I had a bunch of problems in the first example. Here’s how to solve them. Fill in a bunch of holes first.

1. Problem introduction
I follow: Dongling VTK tutorial series navigation learning.
>
>
>
>
>
>
>
>
>
The first is the cmake code:

cmake_minimum_required(VERSION2.8)

project(TestVTKInstall)

find_package(VTKREQUIRED)

include(${VTK_USE_FILE})

add_executable(${PROJECT_NAME}TestVTKInstall.cpp)

target_link_libraries(${PROJECT_NAME}vtkRendering vtkCommon)


Then the CPP code:

#include <vtkRenderWindow.h>
#include <vtkSmartPointer.h>

int main()
{
	vtkSmartPointer<vtkRenderWindow> renWin = vtkSmartPointer<vtkRenderWindow>::New();
	renWin->Render();
	std::cin.get();
	return 0;
}

ror configuration process, project files may be invalid.>r> error configuration process, project files may be invalid
2. Problem solving:
Error Configuration Process: The Project Files may be invalid method did not work. Here’s a little bit about this approach.
2.1 No use of CMAKE to select the version of VS on the corresponding machine.

When generating the corresponding VS solution with the CMAKE configuration, you need to correspond to the correct VS version. This is the same version that you used when installing VTK.
2.2 Previous error cache is not cleaned
|
click on the top left corner of the file - & gt; Delete cathe
to clear the cache.
2. 3 cmake list programming problems
Following the above description did not solve our problem, so we had to continue to Google. We saw us have similar questions on several StackOverflow posts.

    VTK + Cmake -> USE_VTK_RENDERING erroCMake error: ‘Target is not built by this project’ Cmake link liabray target link errorCMake OpenCV Cannot Specify link Libraries

According to the above, compared with our CMMakelists code, we tried one code after another, and finally found a very hidden error, that is, we must pay attention to the space in CMMakelists!!

To be specific,

    is the first line: rsion a> code>2.8e> have a space> The third line: VTKd r>red has a s> on line 9, testvtkinstal>cpp has a space on line> In line 11, we change the previous vtkRendering vtkCommon $>tk_libraries} with a>e before. There is nothing wrong with cmake, though, if you simply add a space. However, when VS is compiled later, the following error will occur, so it will be fine to fix it.

Finally, the cmMakelists.txt code:

cmake_minimum_required(VERSION 2.8)

project(TestVTKInstall)

find_package(VTK REQUIRED)

include(${VTK_USE_FILE})

add_executable(${PROJECT_NAME} TestVTKInstall.cpp)

target_link_libraries(${PROJECT_NAME} ${VTK_LIBRARIES})

3. Run in VS
After cmake has no errors, we configure, then generate. Open VS2017 as an administrator. Open the file we compiled.
> compile l_build >>ck on F7 or build it. If there are no errors, right-click TestVTKInstall and set it as a startup item, then click F5, or run to get the correct results.

Over

Just solve problems one by one.

Project files may be invalid appears when cmake compiles opencv3.1, and the debug additional dependency of the compiled opencv3.1 is at the end


If the above error occurs, follow the error path to delete the invalid file (its invalid file is TXT file) at the file location specified in the red box below

Additional dependencies under Debug
opencv_bioinspired310d.lib
opencv_calib3d310d.lib
opencv_ccalib310d.lib
opencv_core310d.lib
opencv_datasets310d.lib
opencv_dpm310d.lib
ippicvmt.lib
opencv_features2d310d.lib
opencv_flann310d.lib
opencv_fuzzy310d.lib
opencv_hdf310d.lib
opencv_highgui310d.lib
opencv_img_hash310d.lib
opencv_imgcodecs310d.lib
opencv_imgproc310d.lib
opencv_line_descriptor310d.lib
opencv_ml310d.lib
opencv_objdetect310d.lib
opencv_phase_unwrapping310d.lib
opencv_photo310d.lib
opencv_plot310d.lib
opencv_reg310d.lib
opencv_rgbd310d.lib
opencv_saliency310d.lib
opencv_shape310d.lib
opencv_stereo310d.lib
opencv_stitching310d.lib
opencv_structured_light310d.lib
opencv_superres310d.lib
opencv_surface_matching310d.lib
opencv_tracking310d.lib
opencv_ts310d.lib
opencv_video310d.lib
opencv_videoio310d.lib
opencv_videostab310d.lib
opencv_xobjdetect310d.lib
opencv_xphoto310d.lib
ippicvmt.lib

Error in configuration process, project files may be invalid in cmake compilation

From http://blog.csdn.net/sduvec/article/details/50084963

Problems encountered while compiling Openv3.0.
Resolve this by re-downloading and replacing IPPICV_WINDOWS_20141027.zip.
After downloading the file, copy it to.. \ Opencv3.0 \ OpenCV \ sources \ 3 rdparty \ ippicv \ downloads \ Windows – b59f865d1ba16e8c84124e19d78eec57 \
Click and replace to the original file.
Configuration: Win7 + Openv3.0 + CMAKE3.4.0

Problems encountered in VTK installation

Tutorial for http://blog.sina.com.cn/s/blog_5e3b04ee0102w296.html; The inside of the”
The working directory \bin\Debug “refers to the folder in the project after Cmake.
Unable to debug normal program after installation:
Project Properties ->; The linker – & gt; Input where it inherits from the parent.

Error configuration process and project file may be invalid appear in cmake compilation

Problems encountered while compiling Openv3.0.
Resolve this by re-downloading and replacing IPPICV_WINDOWS_20141027.zip.
After downloading the file, copy it to.. \ Opencv3.0 \ opencv \ sources \ 3 rdparty \ ippicv \ downloads \ Windows – b59f865d1ba16e8c84124e19d78eec57 \
Click and replace to the original file.
Configuration: Win7 + Openv3.0 + CMAKE3.4.0

“Error in configuration process project files may be invalid” appears during cmake compilation

Opencv_contribCmake problem: CMakeError at cmake/OpenCVUtils cmake: 1043 (file)

opencv3.2+opencv_contrib+cmake/ u> opencv3.2+opencv_contrib+cmake opencv3.2+opencv_contrib+cmake opencv3.2+opencv_contrib+cmake
I checked it online and said that OpenCVContrib and OpenCV must have the same version number, but I did download the 3.2.0 version. Further view is opencv_contrib320 \ modules \ \. Within DNN download \ bd5e3eed635a8d32e2b99658633815ef file out of the question, is automatically downloaded in the download protobuf – CPP – 3.1.0. Tar and need is protobuf – CPP – 3.2.0. Tar, then separate download protobuf – CPP – 3.2.0. Replaced the tar, and success
Refer to the article: https://blog.csdn.net/lulumi2016/article/details/77984546

Two methods of cmake in VTK program

 
First, GUI mode
Install cmake, run cmak-gui. exe, set the source and build directory, as well as the directory where vtkData is located, figurate, generate. The related process is introduced in the network resources such as baidu library.
 
Two, command line mode (DOS command)
CmMakelist.txt. The DOS command cmake. Note that the parameter after cmake is the directory where cMakelists.txt is located, and the CPP and header files required are also in that directory.
Cmake is a tool to configure the project as per cmakelists.txt and then compile it in VS.

Error configuration process, project files may be invalid

Error configuration process, project files may be invalid

1. Problem description

OpenCV3.2.0 + OpenCV_contrib +VS2015: Error in CMAKE compilation

2. Cause of the problem
Most of the reasons for this problem are because the version of opencv_contrib does not match the version of opencv_contrib, so this kind of problem occurs, download the corresponding version of opencv_contrib to solve the problem.
3. Solutions
Here is a GitHub site where you can download the various versions of OpenCV_Contrib for personal testing.
https://github.com/opencv/opencv_contrib/tree/master

Finally, the screenshot of the compiled version with the new version is as follows:

4. The appendix
In addition, provide a good tutorial, the website:
https://blog.csdn.net/huachao1001/article/details/76595549