| 70 | } |
| 71 | |
| 72 | void CaptureThread::CaptureFrame() |
| 73 | { |
| 74 | if (!cvCapture){ |
| 75 | //fail |
| 76 | return; |
| 77 | } |
| 78 | |
| 79 | if (imageQueue.size() > 100) |
| 80 | { |
| 81 | // stack too big, throw out some data |
| 82 | imageQueue.pop(); |
| 83 | } |
| 84 | |
| 85 | for (int i=0; i < 1; i++) cvGrabFrame(cvCapture); // it takes a few images to get to the newest one |
| 86 | IplImage* lastFrame = cvRetrieveFrame(cvCapture); |
| 87 | // cvShowImage("My Camera", LastFrame); |
| 88 | imageQueue.push(lastFrame); |
| 89 | |
| 90 | } |
| 91 | |
| 92 | IplImage* CaptureThread::Pop() |
| 93 | { |
nothing calls this directly
no outgoing calls
no test coverage detected