ImageObject.h
资源名称:LPR.rar [点击查看]
上传用户:jjiangjuan
上传日期:2013-03-27
资源大小:59k
文件大小:3k
源码类别:
波变换
开发平台:
Visual C++
- #if !defined(AFX_IMAGEOBJECT_H__0C9199C6_E499_4745_813E_AC0475E2452C__INCLUDED_)
- #define AFX_IMAGEOBJECT_H__0C9199C6_E499_4745_813E_AC0475E2452C__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // ImageObject.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CImageObject window
- #define ROW 320//640
- #define COL 240//480
- #define UP 1
- #define UPRIGHT 2
- #define RIGHT 3
- #define DOWNRIGHT 4
- #define DOWN 5
- #define DOWNLEFT 6
- #define LEFT 7
- #define UPLEFT 8
- #define NOTSEARCH 9
- #define NODIRECT 10
- #define SEARCHED 11
- struct LPCandidate{
- int x0,y0,x1,y1;
- struct LPCandidate *next;
- };
- struct plumb{
- int i0;
- int j0;
- int i1;
- int j1;
- int direct;
- struct plumb *next;
- } ;
- #include <wingdi.h>
- class CImageObject : public CStatic
- {
- // Construction
- public:
- CImageObject();
- // Attributes
- public:
- BITMAPINFO ForLPR;
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CImageObject)
- //}}AFX_VIRTUAL
- // Implementation
- public:
- void Binary(BITMAPINFO DIBINFO,BYTE buf[]);
- BITMAPINFO WriteDibFile(int Height, int Width,BYTE buf[]);
- void RASearch(int direct, int i, int j,int x0, int y0, int x1, int y1,int &count);
- void Graft2BmpData(BYTE BMP[COL*ROW*3]);
- int RAStat(int x0, int y0, int x1, int y1);
- plumb * SelectEdge(int SX, int SY, int EX,int EY,int tag);
- void Cruiser(int direct, int &i, int &j);
- bool StrongStrech;
- LPCandidate * GetLPPos();
- int GetDirection(unsigned int x0, unsigned int y0, unsigned int x1, unsigned int y1);
- void ResetNoise(int direct, int i, int j, int &tol);
- int GetVetor(int i, int j);
- void FilterDirectionPix(int direct, int i, int j,int &tol);
- void ZigzagFilter(int &zigzag,int direct0,int direct1,int i,int j);
- int GetSimiUnSearchPix(int &xPos, int &yPos);
- int sort(int i,int j,int direct,int &zigzag);
- void EdgeTest();
- void DelNoise();
- void GetEdge();
- void InteEqualize(BYTE lpData[COL][ROW],int lCount[]);
- void gray(BYTE lpData[COL][ROW]);
- bool LPLocated;
- void LoadBmp();
- void Graft2BmpData();
- virtual ~CImageObject();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CImageObject)
- afx_msg void OnPaint();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- private:
- BITMAPFILEHEADER bitmapfileheader;
- BITMAPINFOHEADER bitmapinfoheader;
- BITMAPINFO bitmapinfo,*pbi;
- BYTE *lpBuf;
- RGBQUAD * quad;
- int nDir;
- int numQuad;
- plumb LPYBorder,LPXBorder,CDL;
- LPCandidate LPC;
- LPCandidate * P;
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_IMAGEOBJECT_H__0C9199C6_E499_4745_813E_AC0475E2452C__INCLUDED_)