MCPcopy Create free account
hub / github.com/andybarry/makerscanner / CaptureFrame

Method CaptureFrame

CaptureThread.cpp:72–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void 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
92IplImage* CaptureThread::Pop()
93{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected