Connecting an Epiphan DVI2USB 3.0 frame grabber to MITK via OpenCV does not work as expected. Sometimes the images stays black after connecting to the. After disconnecting and reconnecting it usually works, but sometimes it takes several reconnects until it works.
|Open||None||T24059 MITK-IGT Release 2018.03|
|Open||None||T23624 Connection to Epiphan frame grabber via OpenCV is buggy|
Tested the setup with two Epiphan framegrabbers of the same type and DVI/VGA video sources. The problem is always there. A OpenCV minimal example works fine, but if we paste exactly the same code to a MITK plugin the problem is there. Seems as if OpenCV doesn't like MITK running in the background for this specific frame grabber. With a framegrabber from another manufacturer (TERRATEC G1) or with a webcam video source there was no problem during the tests.OpenCV minimal example which works. The location of an OpenCV build has to be defined in CMake to get it running.
A possible workaround is to use PLUS for the connection to the Epiphan grabber and then connect to it via OpenIGTLink:
(1) Start a PLUS server (2.6.0 / 64bit was tested) with the default device set for a Epiphan frame grabber (PlusDeviceSet_Server_EpiphanVideoCapture.xml)
(2) Open MITK, create a new video device in the US view and choose "OIGTL Client".
(3) Activate the device and it should work
We still have to check if there are any update rate or latency problems with this solution.
PLUS seems to use a API provided by Epiphan and not OpenCV for the connection. This might also a solution if we ever have to fix this in MITK directly.
We digged into the Epiphan SDK and found the V2U_GrabFrame2 structure which is returned by the GrabFrame method. We will try to convert this structure to an mitk Image using also the ITKConvertIplImageBuffer logic. Afterwards, we will try to replace the OpenCV VideoCapture method by using the Epiphan SDK in MITK directly. @aguilera
Thanks for looking into this. Keep in mind that we should still keep the current implementation to grab images as it allows to grab far more than only from the Epiphan frame grabber. Once the feasibility of using the SDK is shown, we should think of integrating it as a separate video source that is dependent on the specific Epiphan SDK.
Cool! Thanks for taking care for this. I'm looking forward to use the Epiphan grabber directly again (current workaround: PLUS Server and OpenIGTLink). If you need any help please let me know. There also is a nice chat support on the Epiphan page.
It can be integrated and used in a plugin when the frmgrab.dll and frmgrab.lib files were in the same folder (\Epiphan\epiphan_sdk-3.30.3.0007\epiphan\frmgrab\lib\win\x64)
It has to be checked how to configure Cmake to be able to get different files from different paths