Ask Your Question

Revision history [back]

you can define a ROI :

    Mat flow, cflow, frame1,frame;
    ......
    cap >> frame1;
    Mat frame(frame1(Rect(0, 0, 100, 100)));

frame is not a deep copy of frame1 (frame and frame1 share same data)

you can define a ROI :

    Mat flow, cflow, frame1,frame;
    ......
    cap >> frame1;
    Mat frame(frame1(Rect(0, 0, 100, 100)));

frame is not a deep copy of frame1 (frame and frame1 share same data)

You can define a rect as in grabcut.cpp or use function DefRectangle function