cvapp.cpp
上传用户:zhaobiao
上传日期:2013-10-27
资源大小:92k
文件大小:1k
源码类别:

OpenCV

开发平台:

Visual C++

  1. #include "stdafx.h"
  2. #include "cvapp.h"
  3. // A global variable
  4. ImageProcessor *proc = 0;
  5. // the function that processes the image
  6. void process(void* img) 
  7. {              
  8.   IplImage* image =reinterpret_cast<IplImage*>(img);
  9. //reinterpret_cast指针转化 struct<---->void    IplImage* img; // Declare IPL/OpenCV image pointer
  10.   cvErode( image, image, NULL, 1 );
  11. /*
  12. CVAPI(void)  cvErode( const CvArr* src, CvArr* dst,
  13.                                             IplConvKernel* element CV_DEFAULT(NULL),
  14.                                             int iterations CV_DEFAULT(1) );*/
  15.                       
  16. }
  17. void ImageProcessor::execute()
  18.  {
  19.   process(img);
  20. }