First time here? Check out the FAQ!
answered 2014-02-24 02:39:54 -0600
cv::Rect(x1, y1, x2-x1, y2-y1) should be cv::Rect(x1, y1, x2-x1+1, y2-y1+1). Might not be the problem you are facing though ...