cvapp.h
上传用户:zhaobiao
上传日期:2013-10-27
资源大小:92k
文件大小:1k
- #if !defined IMAGEPROCESSOR
- #define IMAGEPROCESSOR
- #include <stdio.h>
- #include <math.h>
- #include <string.h>
- #include "cv.h" // include core library interface
- #include "highgui.h" // include GUI library interface
- class ImageProcessor {
- IplImage* img; // Declare IPL/OpenCV image pointer
- public:
- ImageProcessor(CString filename, bool display=true)
- {
- img = cvvLoadImage( filename ); // load image
- if (display) {
- cvvNamedWindow( "Original Image", 1 );
- cvvShowImage( "Original Image", img );
- }
- }
- void display()
- {
- cvvNamedWindow( "Resulting Image", 1 );
- cvvShowImage( "Resulting Image", img );
- }
- void execute();
- ~ImageProcessor()
- {
- cvReleaseImage( &img );
- }
- };
- extern ImageProcessor *proc;
- #endif