Skip to content

Instantly share code, notes, and snippets.

@vieirin
Created May 17, 2016 18:44
Show Gist options
  • Save vieirin/0a87d89645235171a57db535c4472b16 to your computer and use it in GitHub Desktop.
Save vieirin/0a87d89645235171a57db535c4472b16 to your computer and use it in GitHub Desktop.
void initializeGLCM(int* glcmMat);
int main(int argc, char const *argv[])
{
cv::Mat inputImg = cv::imread(argv[1]);
int glcmMat[256][256];
cv::cvtColor(inputImg, inputImg, CV_BGR2GRAY);
initializeGLCM((int*)glcmMat);
for (int i = 0; i < inputImg.rows; ++i)
for (int j = 0; j < inputImg.cols; ++j)
return 0;
}
void initializeGLCM(int* glcmMat){
for (int i = 0; i < 256 * 256; ++i, glcmMat++)
*glcmMat = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment