📄 imgprocessing.h
字号:
#if !defined (IMGPRO_H)
#define IMGPRO_H
#include "Image.h"
//#include <afxcoll.h>
#include <afxtempl.h>
// #include "afxtempl.h"
typedef CArray<double,double&> DoubleArray;
//typedef DoubleArray< double, double& > class CArray : public CObject;
//Sobel 边缘检测
//imga: input gray image ;
//imgb: output gray image ;
void dinv(DoubleArray& mat,int width,int& flag);
void Img_Sobel(CByteArray& imga,int height,int widht,CByteArray& imgb,int mode=0);
//直方图正规化;
void Img_Histogram(CByteArray& imga);
//小波变换;
#define DD 23
//#define DD2 23
//#define DD 13
//#define DD 11
int a(int x,int xsize);
float s(float x);
void coef();
void Img_WaveletTransform(CByteArray& oldimg,int xs,int ys,DWORD xsize,DWORD ysize);
void Img_InverseWaveletTransform(CByteArray& oldimg,int xs,int ys,DWORD xsize,DWORD ysize);
//尺度变换;
void Img_ScaleTransform(CByteArray& oldimg,CByteArray& newimg,
int oldheight,int oldwidth,
int newheight,int newwidth);
//旋转变换;
void Img_RotateTransform(CByteArray& imga,CByteArray& imgb,
int height,int width,
CPoint point,double theta,int nCount);
//求均值;
double Img_GetMean(CByteArray& img,int imgheight,int imgwidth);
//求方差;
double Img_GetVar(CByteArray& img,int imgheight,int imgwidth,double mean);
double Img_GetVar(CByteArray& img,int imgheight,int imgwidth);
//求均值和方差;
void Img_MeanAndVar(CByteArray& imgbody,int height,int width,double& mean,double& var);
//求得图像区域和模板的距离;
double Img_GetDist(CByteArray& img,CByteArray& templ,
int imgheight,int imgwidth ,
CRect &rect);
double Img_GetDist(DoubleArray& imga, DoubleArray& imgb);
double Img_GetDist(CByteArray& imga, DoubleArray& imgb);
//求得图像区域与模板的相关系数;
double Img_Relate
(CByteArray& img,CByteArray& templ,int th,int tw,double tmean,double tvar,CRect& rect) ;
//求得图像区域与模板的匹配度;
double Img_GetDegree
(CByteArray& img,CByteArray& templ,int th,int tw,CRect &rect,double tmean,double tvar,double weight);
//求得图像区域的正规化图像;
void Img_Nomalize(CByteArray& img,int imgheight,int imgwidth,double svar,double smean);
//求得图像区域的对称性;
double Img_GetSymmetry(CByteArray& img,int height,int width,CRect &rect);
bool Img_Seperate(CByteArray& oldimg,CByteArray& newimg,int imgheight,int imgwidth,CRect& rect);
int Img_Threshold(CByteArray& oldimg,int height,int width,int threshold);
void Img_Convert(CByteArray& oldimg,int height,int width);
void Img_Copy(CByteArray& oldimg,CByteArray& newimg);
double Img_Hausdorff(CImage& imga,CImage& imgb,int Nsize,int penalty);
void Img_Laplace(CByteArray& oldimg,CByteArray& newimg,int height,int width);
int Grass(CByteArray& imga,CByteArray& imgb,int row,int col,
int number,double& area,CRect& rect,int width);
int Grass_label(CByteArray& imga,CByteArray& imgb,
int& N,DoubleArray& h,int& NS,CRect& rect,int Width);
double Img_MHausdorff(CImage& imga,CImage& imgb,int Nsize,int penalty,int delta);
double Img_MDist(CByteArray& imga,CByteArray& imgb,int height,int width,
int NSize);
double Img_GetDist(CByteArray& imga,CByteArray& imgb);
void Img_Uniform(CByteArray& img,int height,int width,CRect& rect);
void Img_Quantification(DoubleArray& imga,CByteArray& imgb,double& min,double& max);
double Img_GetCos(CByteArray& imga,CByteArray& imgb);
void Img_Quantification(CByteArray& imga,CByteArray& imgb);
double Img_GetCos(CByteArray& imga,CByteArray& imgb);
double Img_GetCos(CByteArray& imga,CByteArray& imgb,int height,int width,CRect& rect);
void Img_UpDown(CByteArray& imga,CByteArray& imgb,int height,int width,int newheight,int y0,double theta);
void Img_Quantification(DoubleArray& imga,CByteArray& imgb);
void Img_Projection(DoubleArray& data,DoubleArray& pm,int dim,int Num,DoubleArray& cf);
double Img_GetCos(DoubleArray& imga,DoubleArray& imgb);
double Img_GetCos(DoubleArray& imga,DoubleArray& imgb,int Num);
void Img_Denoise(CByteArray& imga,CByteArray& imgb,int height,int width);
bool WriteArcFile(CString& str,DoubleArray& cf);
bool ReadArcFile(CString& str,DoubleArray& cf);
bool ReadArcFile(CString& str,CByteArray& cf);
void Img_Mirror(CByteArray& img,int height,int width);
void Img_ToDbFormat(DoubleArray& klc,CString& str);
void Img_FromDbFormat(DoubleArray& klc,unsigned short* str);
void Img_FromDbFormat(CByteArray& img,unsigned short* str);
void SetDBList(COleSafeArray& vFieldList,COleSafeArray& vValueList,
long No,CString& TypeStr,CString& MemoStr,int flag);
void fft(DoubleArray& Real ,DoubleArray& Imag,DoubleArray& NewReal,DoubleArray& NewImag);
void fft2(CByteArray& input,DoubleArray& output,int Height,int Width);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -