📄 image.h
字号:
/*!
*
*
* sharat@mit.edu
*/
#ifndef __image_h__
#define __image_h__
#include <iostream>
#include <cxcore.h>
#include <cv.h>
#include <cvaux.h>
#include <highgui.h>
using namespace std;
/*!
@class image
@abstract a wrapper for the openCV image structure
*/
class image
{
/*private iplImgehandle*/
public:
image();
IplImage* img;
image(int ht,int wt);
image(IplImage* img);
~image();
image(const image& rhs);
image& operator = (const image& rhs);
image& operator = (const float val);
operator CvArr*() {return (CvArr*)img;}
operator const CvArr*() const {return (CvArr*)img;}
operator const IplImage*() const {return img;}
float* operator[](int n);
const float* operator[](int n) const;
float min() const;
CvSize dim() const;
};
/*!
*/
image operator +(const image& lhs,const image& rhs);
/*!
*/
image operator - (const image& lhs,const image& rhs);
/*!
*/
image operator *(const image& lhs,const image& rhs);
/*!
*/
image operator /(const image& lhs,const image& rhs);
/*!
*/
image max(const image& lhs,const image& rhs);
/*!
*/
image abs(const image& img);
/*!
*/
image sqrt(const image& img);
/*!
*/
image operator + (const image& lhs, float val);
/*!
*/
image operator *(const image& lhs,float val);
/*!
*/
image operator -(const image& lhs,float val);
/*!
*/
image imread(const char* file_name);
/*!
*/
void imwrite(image& img,const char* file_name);
/*!
*/
image imscale(image& img);
/*!
*/
void imdisplay(image& img,const char* title);
/*!
*/
ostream & operator <<(ostream& out,const image& img);
/*!
*/
istream& operator >> (istream & in,image & img);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -