Ask Your Question

cln1073's profile - activity

2014-08-05 15:06:59 -0600 received badge  Editor (source)
2014-08-05 15:01:18 -0600 asked a question How do you use the legacy GLCM?

I am having trouble using and finding documentation about the OpenCV deprecated GLCM algorithm. Links from previous questions in the forum are no longer working.

void CalculateGLCM(cv::Mat grayIm) {
    // Convert Mat to IplImage 
    IplImage pGray = grayIm;
    // Create GLCM
    CvGLCM* glcm = cvCreateGLCM(&pGray, 1, NULL, 4, CV_GLCM_OPTIMIZATION_LUT);
    // Obtain Entropy and IDM values
    double d_entropy = cvGetGLCMDescriptor(glcm, 0, CV_GLCMDESC_ENTROPY);
    double d_idm = cvGetGLCMDescriptor(glcm, 0, CV_GLCMDESC_HOMOGENITY);

Am I doing something obviously wrong? Or is there an alternative algorithm in OpenCV? My goal is to obtain Entropy and IDM (Homogenity) using this specific algorithm. Any help is much appreciated.


2014-08-05 14:36:41 -0600 commented answer cvGLCM is there a new function providing same functionality

I would actually like to know the same thing. All links in previous questions are no longer functional.

2014-08-05 14:10:44 -0600 received badge  Supporter (source)