Ask Your Question

Revision history [back]

You should apply a [ROI](http://docs.opencv.org/modules/core/doc/basic_structures.html?highlight=roi#Mat Mat::operator()(const Rect& roi) const) on each frame captured.

cv::Rect rectangle( x, y, w, h ); // set your ROI
...
capture >> frame;
cv::Mat roi = frame.clone(); // to avoid issue with the internal pointer
roi( rectangle ); // rectangle of interest.
compute_my_stuff( roi );