资源简介

1 图像三维矩阵转换成二维矩阵 2 差分矩阵的平移处理 3 提取块间DCT系数

资源截图

代码片段和文件信息


#include “FeatureExtraction.h“

void
Write3Darray(coefficient3D threedimarray)  //将三维数组写入txt
{
FILE *fp;
if((fp=fopen(“D:\\3Darray.txt““w+“))!=NULL) 

for(unsigned int i=0; i
for (unsigned int j=0; j {
for (unsigned int m=0; m<64; m++)
{
fprintf(fp“%d   “threedimarray.coef[i][j][m]);
}
 fprintf(fp“     “);
}
fprintf(fp “\n\r“);

fclose(fp); 

else 

printf(“写文件 3Darray.txt 失败!\n“);  
}
}


void
Write2Darray(coefficient2D twodimarray) //将二维数组写入txt
{
FILE *fp;
if((fp=fopen(“D:\\2Darray.txt““w+“))!=NULL) 

for(unsigned int i=0; i
for (unsigned int j=0; j {
fprintf(fp“%d   “twodimarray.coef[i][j]); 
}
fprintf(fp “\r\n“);

fclose(fp); 

else 
{
printf(“写文件 2Darray.txt 失败!\n“); 
}
}

void
Write2Darray(probability array2D) //将转移概率矩阵写入txt
{
FILE *fp;
if((fp=fopen(“D:\\Pro_2Darray.txt““w+“))!=NULL) 

for(unsigned int i=0; i
for (unsigned int j=0; j {
fprintf(fp“%f   “array2D.pro[i][j]); 
}
fprintf(fp “\r\n“);

fclose(fp); 

else 
{
printf(“写文件 Pro_2Darray.txt 失败!\n“); 
}
}

int
Free_array3D(coefficient3D array3D)  //释放三维数组空间
{
if (array3D.coef == NULL)
{
return -1;
}
else
{
for (unsigned int i=0; i {
for (unsigned int j=0; j {
delete[] array3D.coef[i][j];
array3D.coef[i][j] = NULL;
}
}
delete [] array3D.coef;
array3D.coef = NULL;
}
return 0;
}


int 
Free_array2D(void ** array2D)//释放二维数组空间
{
if (array2D==NULL)
{
return -1;//null ptr;
}
else
{
/*
for (unsigned int i=0; i {
  delete[array2D.width] &array2D.coef[i];
array2D.coef[i] = NULL;
}*/
//为什么用两个delete会报错呢????

delete[] array2D;
array2D = NULL;
}
return 0;
}

short ***
Alloc_array3D(unsigned int array_row unsigned int array_col unsigned int array_member) //分配三维数组空间 
{
short *** array3D;
array3D = NULL;
if (array_row<=0 || array_col<=0 || array_member<=0)
{
return (short ***)-1; //数组大小错误;
}
array3D = new short **[array_row];
if (array3D == NULL)
{
return (short ***)-2; //空间分配失败
}
for (unsigned int i=0; i {
array3D[i] = new short *[array_col];
if (array3D[i] == NULL)
{
return (short ***)-3; //空间分配失败;
}
for (unsigned int j=0; j {
array3D[i][j] = new short [DCTSIZE*DCTSIZE]; //DCTSIZE*DCTSIZE = 64;
memset((void *)array3D[i][j] NULL DCTSIZE*DCTSIZE*sizeof(short));  //初始化三维数组为0;
}
}
return array3D;
}

short **
Alloc_array2D(unsigned int array_row unsigned int array_col)//分配二维short型数组空间。
{
short ** array2D;
array2D = NULL;
if (array_row<= 0 ||

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      27220  2009-11-24 20:57  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\FeatureExtraction.cpp

     文件       4298  2009-11-18 22:44  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\FeatureExtraction.dsp

     文件        542  2009-11-24 21:57  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\FeatureExtraction.dsw

     文件       2820  2009-11-24 20:56  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\FeatureExtraction.h

     文件      50176  2009-11-24 21:57  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\FeatureExtraction.ncb

     文件      48640  2009-11-24 21:57  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\FeatureExtraction.opt

     文件       1121  2009-11-24 20:57  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\FeatureExtraction.plg

     文件        771  2009-11-18 07:56  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\StdAfx.h

    ..A..H.       162  2009-11-24 20:35  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\~$说明.doc

    ..A..H.    606720  2009-11-24 20:54  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\~WRL0425.tmp

    ..A..H.    606720  2009-11-24 20:54  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\~WRL0984.tmp

    ..A..H.    605696  2009-11-24 20:44  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\~WRL1418.tmp

    ..A..H.    605696  2009-11-24 20:42  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\~WRL2584.tmp

    ..A..H.    606720  2009-11-24 20:55  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\~WRL2592.tmp

    ..A..H.    594944  2009-11-24 10:49  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\~WRL3124.tmp

     文件     606720  2009-11-24 20:55  MarkovFeatureExtraction\特征提取程序\FeatureExtraction\说明.doc

     文件     258144  2009-11-24 21:54  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\Debug\FeatureExtractionDLL.dll

     文件       2435  2009-11-24 21:53  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\Debug\FeatureExtractionDLL.exp

     文件     318544  2009-11-24 21:54  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\Debug\FeatureExtractionDLL.ilk

     文件       5356  2009-11-24 21:53  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\Debug\FeatureExtractionDLL.lib

     文件      32466  2009-11-24 21:54  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\Debug\FeatureExtractionDLL.obj

     文件     187060  2009-11-24 21:25  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\Debug\FeatureExtractionDLL.pch

     文件     730112  2009-11-24 21:54  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\Debug\FeatureExtractionDLL.pdb

     文件      41984  2009-11-24 21:54  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\Debug\vc60.idb

     文件      53248  2009-11-24 21:54  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\Debug\vc60.pdb

     文件      23163  2009-11-24 21:50  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\FeatureExtractionDLL.cpp

     文件       4338  2009-11-24 21:57  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\FeatureExtractionDLL.dsp

     文件        548  2009-11-24 20:59  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\FeatureExtractionDLL.dsw

     文件       3470  2009-11-24 21:56  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\FeatureExtractionDLL.h

     文件      33792  2009-11-24 21:57  MarkovFeatureExtraction\特征提取程序\FeatureExtractionDLL\FeatureExtractionDLL.ncb

............此处省略11个文件信息

评论

共有 条评论