Home > Software engineering >  About directshow capture camera to collect picture
About directshow capture camera to collect picture

Time:10-21

I use the USB 3.0 Ueye camera company production of industrial high-definition cameras, when using directshow can open the camera captured picture but only caught the first picture, that is when I am in consecutive screenshots, don't show the dynamic effect, in the class is to provide the directshow, opencv computers bring camera to use, please the great god advice,
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/8537614

CodePudding 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,
  • Related