I want to use video capture object outside the main function for making my program : I want to use video capture object outside the main function for making my program
Something like this:

```
class MotionDetection{
        void frameDetails(int width = 640,int height =480){
        cap.set(CV_CAP_PROP_FRAME_WIDTH,width);
        cap.set(CV_CAP_PROP_FRAME_HEIGHT,height);
    }
};

int main(int argc, char **argv){
    cv::VideoCapture cap(0);
    MotionDetection obj;
    return 0;
}
```