Virtual Camera - Capture Image frame from Opencv and pass to Directshow Filter for virtual Camera application
I am working on a virtual camera application . This virtual camera should be able to shown under the list of available camera device from application like Zoom . Now in my application there are two part . One part is Directshow capture source filter and other part is an c# application .
Now my idea is to capture video from the c# application, process those video frame with opencv and pass those video frame to directshow filter through some inter process communication .this video will be relayed in zoom in realtime .
I have tried and successfully installed popular vivek vcam thanks to this link https://github.com/roman380/tmhare.mvps.org-vcam . After registering this dll i can see this virtual camera under the avialble list under zoom . it currently only shows random data .
But i am new to diretshow and thus have some confusion. Here the question goes
- Inter process communication is the way to pass frame from application to directshow filter according to some stackoverflow answer . I am capturing video frame from webcam by opencv in c# application . vcam project has a fillbuffer() method from which data is populated . is it enough if i pass those frame to vcam filters fillbuffer() method directly ? or do i need to add samplegrabber and null render also . what would be flow here ?
- if i pass the frame how can convert from Opencv Mat type to directsow equivalent type ? what type should i consider ?
thanks for reading this question .