Opencv 自带cvtexture.cpp中灰度共生矩阵函数和参数看不懂

风来我也来 2011-04-08 03:08:18
cvtexture下面的灰度共生矩阵你熟不熟?
#define CV_MAX_NUM_GREY_LEVELS_8U 256

struct CvGLCM
{
int matrixSideLength;
int numMatrices;
double*** matrices;

int numLookupTableElements;
int forwardLookupTable[CV_MAX_NUM_GREY_LEVELS_8U];
int reverseLookupTable[CV_MAX_NUM_GREY_LEVELS_8U];

double** descriptors;
int numDescriptors;
int descriptorOptimizationType;
int optimizationType;
};
static void icvCreateGLCM_LookupTable_8u_C1R( const uchar* srcImageData, int srcImageStep,
CvSize srcImageSize, CvGLCM* destGLCM,
int* steps, int numSteps, int* memorySteps );

static void
icvCreateGLCMDescriptors_AllowDoubleNest( CvGLCM* destGLCM, int matrixIndex );



CV_IMPL CvGLCM*
cvCreateGLCM( const IplImage* srcImage,
int stepMagnitude,
const int* srcStepDirections,/* should be static array..
or if not the user should handle de-allocation */
int numStepDirections,
int optimizationType )

static void
icvCreateGLCM_LookupTable_8u_C1R( const uchar* srcImageData,
int srcImageStep,
CvSize srcImageSize,
CvGLCM* destGLCM,
int* steps,
int numSteps,
int* memorySteps )
CV_IMPL void
cvCreateGLCMDescriptors( CvGLCM* destGLCM, int descriptorOptimizationType )






static void
icvCreateGLCMDescriptors_AllowDoubleNest( CvGLCM* destGLCM, int matrixIndex )



CV_IMPL double cvGetGLCMDescriptor( CvGLCM* GLCM, int step, int descriptor )





CV_IMPL void
cvGetGLCMDescriptorStatistics( CvGLCM* GLCM, int descriptor,
double* _average, double* _standardDeviation )

这些函数和参数是什么意思?


另外这个类的函数容易真的存在内存泄露,怎么解决?


答案好加分
...全文
1015 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
hutuhutua 2012-03-29
  • 打赏
  • 举报
回复
顶起,具体参数我也不懂啊……哪位大侠给讲讲……郁闷好久啦~~
hutuhutua 2012-03-29
  • 打赏
  • 举报
回复
http://blog.csdn.net/frankyhit/article/details/6154187
改完了就好了~~
sunvhao 2011-05-29
  • 打赏
  • 举报
回复
现在能认真进行技术解答的不多了,不过图像方向的人,也不是那么普遍
风来我也来 2011-05-27
  • 打赏
  • 举报
回复
关键时刻还是自己靠谱。只需要调用下面俩个函数完成计算后调用get函数就能获得相应的值了。
CV_IMPL CvGLCM*
cvCreateGLCM( const IplImage* srcImage,
int stepMagnitude,
const int* srcStepDirections,/* should be static array..
or if not the user should handle de-allocation */
int numStepDirections,
int optimizationType )
从图像到灰度共生矩阵。

static void
icvCreateGLCMDescriptors_AllowDoubleNest( CvGLCM* destGLCM, int matrixIndex )

灰度共生矩阵大部分值的计算。(不包括能量能量方差,这是cvGetGLCMDescriptorStatistics这个函数给定的,另外能量均值CV_IMPL double cvGetGLCMDescriptor和上面那个函数都有提供。#define 定义的灰度特征都由CV_IMPL double cvGetGLCMDescriptor获得。要注意和创建时候设定的步长一致)。
另外,后面自己改造原函数,支持标记区域的函数。
这贴再等一个月。大家来交流。分数也别浪费。

风来我也来 2011-04-12
  • 打赏
  • 举报
回复
来个高手。

24,854

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧