Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

1.

double get_distance(cv::Mat& p32, cv::Mat& p64);

imho, both args should be const ( neither of it is manipulated ) :

double get_distance(const cv::Mat& p32, const cv::Mat& p64);

2.

cvZero(&(CvMat)weights); // <-- error: taking address of temporary [-fpermissive]

just avoid the whole ugly issue of mixing c and c++ api, you probably wanted:

cv::Mat weights = cv::Mat::zeros(1,N_EXPRESSIONS, CV_64FC1);

in the first place, no ?