文件名称:OTSU
- 所属分类:
- 图形图像处理(光照,映射..)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- sha***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
在VC++6.0 已经openCV环境下的一维OTSU代码,实现图像二值化-// OTSU.h: interface for the COTSU class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_OTSU_H__33C2086A_C181_490B_946D_837B4C7FB914__INCLUDED_)
#define AFX_OTSU_H__33C2086A_C181_490B_946D_837B4C7FB914__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//---OpenCV Lib file-----------
#pragma comment (lib,"cv")
#pragma comment (lib,"highgui")
#pragma comment (lib, "cxcore")
//---gsl Lib file-----------
//#pragma comment (lib, "libgsl.a")
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
class COTSU
{
public:
IplImage* Binarize( IplImage* pImg, int nThreshold )
int Threshold()
void CalculateThresh( double* pHist, double dMean )
void GetThreshold( IplImage* pImg, CRect Rect )
COTSU()
virtual ~COTSU()
protected:
bool m_bDone
int m_nThreshold
}
#endif // !defined(AFX_OTSU_H__33C2086A_C181_490B_946D_837B4C7FB914__INCLUDED_)
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_OTSU_H__33C2086A_C181_490B_946D_837B4C7FB914__INCLUDED_)
#define AFX_OTSU_H__33C2086A_C181_490B_946D_837B4C7FB914__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//---OpenCV Lib file-----------
#pragma comment (lib,"cv")
#pragma comment (lib,"highgui")
#pragma comment (lib, "cxcore")
//---gsl Lib file-----------
//#pragma comment (lib, "libgsl.a")
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
class COTSU
{
public:
IplImage* Binarize( IplImage* pImg, int nThreshold )
int Threshold()
void CalculateThresh( double* pHist, double dMean )
void GetThreshold( IplImage* pImg, CRect Rect )
COTSU()
virtual ~COTSU()
protected:
bool m_bDone
int m_nThreshold
}
#endif // !defined(AFX_OTSU_H__33C2086A_C181_490B_946D_837B4C7FB914__INCLUDED_)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
OTSU
....\OTSU.cpp
....\OTSU.h
....\OTSU.cpp
....\OTSU.h