Выполнил : Миронов И.М

  • Published on
    22-Feb-2016

  • View
    56

  • Download
    0

Embed Size (px)

DESCRIPTION

. .. . - PowerPoint PPT Presentation

Transcript

PowerPoint

OpenCV

. ..

: ..

OpenCV (Open Source Computer Vision) C/C++, Python, Ruby, Matlab, Lua Microsoft Windows: Microsoft Visual C++ (6.0-9.0, .NET)Intel Compiler, Borland C++, Mingw (GCC 3.x). qtLinux ( MeeGo): GCC (2.9x, 3.x), Intel Compiler: ./configure-make-make install qtMac OS X: GCC (3.x, 4.x)Android: Android-NDK+cmake

opencv_core . , ( , ) , DFT, DCT, / XML YAWL ..opencv_imgproc (, , ..).opencv_highgui UI, / .opencv_ml (SVM, , ..).opencv_features2d (SURF, FAST , ).opencv_video ( , , ).opencv_objdetect ( -(.), HOG ..).opencv_calib3d , - .

opencv_flann (FLANN 1.5) OpenCV.opencv_contrib , .opencv_legacy , .opencv_gpu OpenCV CUDA, NVidia

int cvNamedWindow( const char* name, int flags ); , . , 0 , CV_WINDOW_AUTOSIZE, , , .void cvShowImage( const char* name, const CvArr* image ); ; , .int cvWaitKey( int delay=0 ); , .

void cvReleaseImage( IplImage** image ); , NULL.

void cvDestroyWindow( const char* name ); . IplImage :int nSize;int nChannels;int depth;int width; int height;char *imageData;int dataOrder; IplImage* cvLoadImage( const char* filename, int iscolor=CV_LOAD_IMAGE_COLOR ); .filename iscolor iscolor > 0 3- iscolor == 0 GRAYSCALE ( )iscolor < 0 OpenCV#include

int main(int argc, char** argv){ IplImage *image = cvLoadImage(testimage.jpg, 1); // cvNamedWindow(Test,CV_WINDOW_AUTOSIZE);

// cvShowImage(Test, image);

// cvWaitKey(0);

// cvReleaseImage(& image); // cvDestroyWindow(Test); return 0;}

OpenCV . ., 2001 : , . . AdaBoost. .

. . ( ), , .

AdaBoost

CvHaarClassifierCascade * cascade , xml . XML- cvLoad()cascade=(CvHaarClassifierCascade*)cvLoad(cascade_name, 0, 0, 0); CvMemStorage *storage; - . .storage = cvCreateMemStorage(0); - .cvReleaseMemStorage(&storage); - .

- . , , . OpenCV CvSeq.

CvSeqtypedef struct CvSeq { int flags; // int header_size; // CvSeq* h_prev; // - CvSeq* h_next; // - CvSeq* v_prev; // - CvSeq* v_next // - int total; // int elem_size; // char* block_max; // char* ptr; // int delta_elems; // CvMemStorage* storage; // CvSeqBlock* free_blocks; // CvSeqBlock* first; // }

char* cvGetSeqElem( seq, index ) . . for( int i=0; itotal; ++i ) { CvPoint* p = (CvPoint*)cvGetSeqElem ( seq, i );}

OpenCV cvThreshold cvLaplace cvSobel cvCanny

int cvFindContours(CvArr* image, CvMemStorage* storage, CvSeq** first_contour, int header_size=sizeof(CvContour), int mode=CV_RETR_LIST, int method=CV_CHAIN_APPROX_SIMPLE, CvPoint offset=cvPoint(0,0) ); -

void cvDrawContours( CvArr *img, CvSeq* contour, CvScalar external_color, CvScalar hole_color, int max_level, int thickness=1, int line_type=8, CvPoint offset=cvPoint(0,0) ); -

Recommended

View more >