?? segment.h
字號:
#ifndef _INSIDE_VISUAL_CPP_IMGSEGMENT
#define _INSIDE_VISUAL_CPP_IMGSEGMENT
#include "ImageCenterDib.h"
//圖像分割類
class ImgSegment:public ImgCenterDib
{
public:
//輸出圖像每像素位數
int m_nBitCountOut;
//輸出圖像位圖數據指針
unsigned char * m_pImgDataOut;
//輸出圖像顏色表
LPRGBQUAD m_lpColorTableOut;
private:
//輸出圖像的寬
int m_imgWidthOut;
//輸出圖像的高
int m_imgHeightOut;
//輸出圖像顏色表長度
int m_nColorTableLengthOut;
public:
//不帶參數的構造函數
ImgSegment();
//帶參數的構造函數
ImgSegment(CSize size, int nBitCount, LPRGBQUAD lpColorTable,
unsigned char *pImgData);
//析構函數
~ImgSegment();
//以像素為單位返回輸出圖像的尺寸
CSize GetDimensions();
//大津閾值分割
int threshOtus(int histArray[256]);
//Roberts算子
void Roberts();
//Sobel算子
void Sobel();
//Prewitt算子
void Prewitt();
//Laplacian算子
void Laplacian();
//Krisch算子
void Krisch();
//Gauss-Laplacian算子
void GaussLaplacian();
//自定義模板檢測邊緣
void EdgeByAnyMask(int *mask ,int maskW, int maskH);
//Hough變換
void Hough(float radiusResolution, float angleResolution,
float *radius, float *angle);
//通過Hough變換檢測圖像中最長線
void longestLineDetectByHough(float radiusResolution, float angleResolution);
//區域生長
void RegionGrow(CPoint seed, int thresh);
//輪廓提取
void ContourExtract();
//曲線跟蹤
void ContourTrace();
private:
//模板卷積函數
void TemplateEdge(unsigned char *imgIn, int width, int height, int nBitCount,
int *mask, int maskW, int maskH, unsigned char *imgOut);
//極坐標形式下的線檢測hough變換
void HoughTransform(unsigned char *imgBinaryIn, int width, int height, int *houghBuf,
int houghWidth, int houghHeight,float radiusResolution, float angleResolution,
float *radius, float *angle);
};
#endif // _INSIDE_VISUAL_CPP_IMGSEGMENT
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -