opencv(2.3.1)、VTK5.8.0、ITK和VS2010的配置
1.配置(opencv版本2.3.1 opencv安装在D:\opencv) (1) project-***properties-VC Directaries-Include Directaries 包含:D:\OpenCV\opencv\build\include D:\OpenCV\opencv\build\include\opencv D:\OpenCV\opencv\build\include\opencv2 (2) project-***
1.配置(opencv版本2.3.1 opencv安装在D:\opencv)
(1) project->***properties->VC++ Directaries->Include Directaries
包含:D:\OpenCV\opencv\build\include
D:\OpenCV\opencv\build\include\opencv
D:\OpenCV\opencv\build\include\opencv2
(2) project->***properties->VC++ Directaries->library Directaries
包含:D:\OpenCV\opencv\build\x86\vc10\lib
(3)Linker->input->Additional Dependencies
包含:
opencv_core231.lib
opencv_highgui231.lib
opencv_objdetect231.lib
opencv配置完成,但是这个版本中没有CvvImage类,opencv中单个函数可以使用,怎样在MFC中使用这个类还在摸索
2.配置VTK5.8.0
(1) project->***properties->C/C++->General->Additonal Include Library包含下列文件:
D:\VTK-5.8.0\vtk-5.8.0\Common
D:\VTK-5.8.0\vtk-5.8.0\GenericFiltering
D:\VTK-5.8.0\vtk-5.8.0\Filtering
D:\VTK-5.8.0\vtk-5.8.0\VolumeRendering
D:\VTK-5.8.0\vtk-5.8.0\IO
D:\VTK-5.8.0\vtk-5.8.0\Rendering
D:\VTK-5.8.0\vtk-5.8.0\Graphics
D:\VTK-5.8.0\vtk-5.8.0\Hybrid
D:\VTK-5.8.0\bin
D:\VTK-5.8.0-Bin
D:\VTK-5.8.0\vtk-5.8.0\Imaging
(2) project->***properties->Linker->General->Additonal Include Library包含下列文件:
D:\VTK-5.8.0-Bin\bin\Debug
(3)project->***properties->Linker->Input->Additional Dependencies包含下列文件:
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
uuid.lib
ole32.lib
oleaut32.lib
comdlg32.lib
advapi32.lib
vtkMFC.lib
vtkRendering.lib
vtkGraphics.lib
vtkverdict.lib
vtkImaging.lib
vtkIO.lib
vtkFiltering.lib
vtkCommon.lib
vtkDICOMParser.lib
vtkNetCDF.lib
vtkmetaio.lib
comctl32.lib
wsock32.lib
vtksqlite.lib
vtkpng.lib
vtktiff.lib
vtkzlib.lib
vtkjpeg.lib
vtkexpat.lib
vtksys.lib
ws2_32.lib
vfw32.lib
vtkftgl.lib
vtkfreetype.lib
opengl32.lib
vtkWidgets.lib
vtkVolumeRendering.lib
vtkViews.lib
vtkproj4.lib
vtklibxml2.lib
vtkInfovis.lib
vtkHybrid.lib
vtkGeovis.lib
vtkGenericFiltering.lib
vtkexoIIc.lib
vtkCharts.lib
vtkalglib.lib
运行控制台测试程序:
#include "vtkConeSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include "vtkCamera.h"
#include "vtkActor.h"
#include "vtkRenderer.h"
#include "vtkProperty.h"
#include "windows.h"
int main()
{
vtkConeSource *cone = vtkConeSource::New();
cone->SetHeight( 3.0 );
cone->SetRadius( 1.0 );
cone->SetResolution( 10 );
vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
coneMapper->SetInputConnection( cone->GetOutputPort() );
vtkActor *coneActor = vtkActor::New();
coneActor->SetMapper( coneMapper );
vtkRenderer *ren1= vtkRenderer::New();
ren1->AddActor( coneActor );
ren1->SetBackground( 0.1, 0.2, 0.4 );
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer( ren1 );
renWin->SetSize( 300, 300 );
int i;
for (i = 0; i
{
renWin->Render();
ren1->GetActiveCamera()->Azimuth( i );
Sleep(200);
}
cone->Delete();
coneMapper->Delete();
coneActor->Delete();
ren1->Delete();
renWin->Delete();
return 0;
}
还要将vtkMFC.dll放置在C:\Windows\System32下
VTK配置成功!
3.ITK的配置
ITK不需要设置环境变量
直接利用CMake运行测设程序
遇到一个错误:
这是因为没有将运行的项目设置为活动工程
设置为活动工程即可

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

1. Theoretical basis of image pyramid Image pyramid is a kind of multi-scale expression of images. It is an effective but conceptually simple structure to explain images at multiple resolutions. An image pyramid is a collection of images with progressively lower resolutions arranged in a pyramid shape and derived from the same original image. It is obtained through ladder down sampling, and the sampling is not stopped until a certain termination condition is reached. We compare images layer by layer to a pyramid. The higher the level, the smaller the image and the lower the resolution. So why do we make an image pyramid? This is because changing the size of a pixel sometimes does not change its characteristics. For example, if you show you a picture of 10 million pixels, you can know that there is a person in it. If you show you a picture of 100,000 pixels, you can also know that there is a person in it. But against the plan

Use the pip command to easily install OpenCV tutorial, which requires specific code examples. OpenCV (OpenSource Computer Vision Library) is an open source computer vision library. It contains a large number of computer vision algorithms and functions, which can help developers quickly build image and video processing related applications. Before using OpenCV, we need to install it first. Fortunately, Python provides a powerful tool pip to manage third-party libraries

1. Project effect 2. Core process 1. openCV reads the video stream and draws a rectangle on each frame of the picture. 2. Use mediapipe to obtain the coordinates of finger key points. 3. Based on the coordinate position of the finger and the coordinate position of the rectangle, determine whether the finger point is on the rectangle. If it is, the rectangle will follow the finger movement. 3. Code process environment preparation: python:3.8.8opencv:4.2.0.32mediapipe:0.8.10.1 Note: 1. If the opencv version is too high or too low, there may be some problems such as the camera not being able to open, crashing, etc. The python version affects opencv Optional versions. 2. pipinstallmediapipe may cause op

OpenCV is an open source library for computer vision and image processing, which is widely used in machine learning, image recognition, video processing and other fields. When developing using OpenCV, in order to better debug and run programs, many developers choose to use PyCharm, a powerful Python integrated development environment. This article will provide PyCharm users with an installation tutorial for OpenCV, with specific code examples. Step One: Install Python First, make sure you have Python installed

The org.opencv.imgproc package of the JavaOpenCV library contains a class called Imgproc that provides various methods to process input images. It provides a set of methods for drawing geometric shapes on images. To draw an arrowed line, you need to call the arrowedLine() method of this class. The method accepts the following parameters: a Mat object representing the image on which the line is to be drawn. A Point object representing two points between lines. drawn. A Scalar object representing the line color. (BGR) An integer representing the thickness of the line (default: 1). Example importorg.opencv.core.Core;importo

Image segmentation and extraction: Foreground objects are segmented or extracted as target images in images. The background itself is not interested. The watershed algorithm and the GrabCut algorithm segment and extract the image. Use watershed algorithm to achieve image segmentation and extraction. The watershed algorithm vividly compares images to geographical terrain surfaces to achieve image segmentation. This algorithm is very effective. Algorithm Principle Any grayscale image can be regarded as a geographical terrain surface. Areas with high grayscale values can be seen as mountain peaks, and areas with low grayscale values can be seen as valleys. The image on the left is the original image, and the image on the right is its corresponding "topographic surface". This process separates the image into two distinct sets: catchment basins and watershed lines. The dam we constructed is the watershed line, that is, the original image

How to implement video processing using PHP and OpenCV library? Abstract: Video processing has become an important technology in modern scientific and technological applications. This article will introduce how to use the PHP programming language combined with the OpenCV library to implement some basic video processing functions, and attach corresponding code examples. Keywords: PHP, OpenCV, video processing, code examples Introduction: With the development of the Internet and the popularity of smartphones, video content has become an indispensable part of people's lives. However, to achieve video editing and

Computer Vision (Computer Vision) is one of the important branches in the field of artificial intelligence. It enables computers to automatically perceive and understand visual signals such as images and videos, and realize application scenarios such as human-computer interaction and automated control. OpenCV (OpenSourceComputerVisionLibrary) is a popular open source computer vision library that is widely used in computer vision, machine learning, deep learning and other fields. This article will introduce how to use
