1 | initial version |
CvScalar pixel = cvGet2D(&image_, r, c);
// if image_ is a IplImage*, that would be a IplImage** ?
i think, you want :
CvScalar pixel = cvGet2D(image_, r, c);
(without the &) in both occurences
2 | No.2 Revision |
CvScalar pixel = cvGet2D(&image_, r, c);
// if image_ is a IplImage*, that would be a IplImage** ?
i think, you want :
CvScalar pixel = cvGet2D(image_, r, c);
(without the &) in both occurences
looking twice, found another issue: /* Test */
unsigned char* rowTemp = new unsigned char[width];
rowTemp = row;
now rowTemp is pointing to row, the "new unsigned char[width]" before does not have any effect, also you're leaking memory here!