Mercurial Hosting > traffic-intelligence
comparison c/InputVideoFileModule.cpp @ 409:3c271a46b4d4
updated code for OpenCV 2.4.6
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 13 Aug 2013 23:36:58 -0400 |
parents | b829ebdc18e6 |
children | 2be846d36dec |
comparison
equal
deleted
inserted
replaced
408:365d8dee44f3 | 409:3c271a46b4d4 |
---|---|
4 : mInit(false) | 4 : mInit(false) |
5 , mNumberOfFrame(0) | 5 , mNumberOfFrame(0) |
6 { | 6 { |
7 mInit = mVideoCapture.open(videoPath.c_str()); | 7 mInit = mVideoCapture.open(videoPath.c_str()); |
8 double frameCount; | 8 double frameCount; |
9 frameCount = mVideoCapture.get(CV_CAP_PROP_FRAME_COUNT); | 9 frameCount = mVideoCapture.get(cv::CAP_PROP_FRAME_COUNT); |
10 mSize = cv::Size(mVideoCapture.get(CV_CAP_PROP_FRAME_WIDTH), mVideoCapture.get(CV_CAP_PROP_FRAME_HEIGHT)); | 10 mSize = cv::Size(mVideoCapture.get(cv::CAP_PROP_FRAME_WIDTH), mVideoCapture.get(cv::CAP_PROP_FRAME_HEIGHT)); |
11 mNumberOfFrame = (unsigned int)frameCount; | 11 mNumberOfFrame = (unsigned int)frameCount; |
12 } | 12 } |
13 | 13 |
14 InputVideoFileModule::~InputVideoFileModule(void) { } | 14 InputVideoFileModule::~InputVideoFileModule(void) { } |
15 | 15 |
16 | 16 |
17 void InputVideoFileModule::setFrameNumber(const unsigned int& frameNumber) { | 17 void InputVideoFileModule::setFrameNumber(const unsigned int& frameNumber) { |
18 mVideoCapture.set(CV_CAP_PROP_POS_FRAMES, frameNumber); | 18 mVideoCapture.set(cv::CAP_PROP_POS_FRAMES, frameNumber); |
19 } | 19 } |
20 | 20 |
21 bool InputVideoFileModule::getNextFrame(cv::Mat& outputPicture) | 21 bool InputVideoFileModule::getNextFrame(cv::Mat& outputPicture) |
22 { | 22 { |
23 bool success = false; | 23 bool success = false; |