图像处理中,纹理特征的提取
部分代码如下
// 计算纹理特征
void CTextureDlg::OnBtnComputeTexture()
{
double dEnergy = 0.0;
double dEntropy = 0.0;
double dInertiaQuadrature = 0.0;
double dLocalCalm = 0.0;
double dCorrelation = 0.0;
double dEnergy1 = 0.0;
double dEntropy1 = 0.0;
double dInertiaQuadrature1= 0.0;
double dLocalCalm1 = 0.0;
double dCorrelation1 = 0.0;
unsigned char** arLocalImage;
arLocalImage = cmatrix(0, m_grayShow.FilterWindowWidth-1, 0, m_grayShow.FilterWindowWidth-1);
int rolltimeH = m_grayShow.ImageHeight/m_grayShow.FilterWindowWidth;
int rolltimeW = m_grayShow.ImageWidth /m_grayShow.FilterWindowWidth;
int i,j;
int p,q;
//将图像分成若干个窗口,计算其纹理均值
for(i=0; i< rolltimeH; i++)
{
for(j=0; j
2019-12-21 20:20:47
3.93MB
纹理
1