Int Camera: : queryFrame (IplImage * * grapImage)
{
Long evCode, size=0;
M_pMediaControl - & gt; The Run ();
M_pMediaEvent - & gt; WaitForCompletion (INFINITE, & amp; EvCode);
M_pSampleGrabber - & gt; GetCurrentBuffer (& amp; The size, NULL);
//if the buffer size changed
If (the size!=m_nBufferSize)
{
If (m_pFrame)
{
CvReleaseImage (& amp; M_pFrame);
}
M_nBufferSize=size;
M_pFrame=cvCreateImage (cvSize (m_nWidth, m_nHeight), IPL_DEPTH_8U, 3);
}
M_pSampleGrabber - & gt; GetCurrentBuffer (& amp; M_nBufferSize, (long *) m_pFrame - & gt; ImageData);
CvFlip (m_pFrame);
* grapImage=m_pFrame;
return 1;
}
CodePudding user response:
http://blog.csdn.net/yaorongzhen123/article/details/8537614CodePudding user response:
Well, this I really can't help you, I'm sorry,CodePudding user response:
I feel to write a filter to intercept the data, so that subsequent processing is relatively easy to some,With RGB or YUV data, the follow-up to save into pictures, want to give opencv, ffmpeg what processing is easy,