SciKit-Surgery / scikit-surgery

SciKit-Surgery - Compact Libraries for Surgical Navigation
http://scikit-surgery.github.io/scikit-surgery/
Other
41 stars 12 forks source link

Test SDI multiplexer, and getting OpenCV to capture left/right stereo pair simultaneously #10

Closed thompson318 closed 4 years ago

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 10, 2018, 12:07

@ThomasDowrick - can you remember why this didnt work on Viking?

Somehow it should right? Thats the whole purpose of a multiplexer?

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 10, 2018, 13:40

----- Original Message ----- Thomas Dowrick 11 July 2018 12:48 PM


Product: Mini Converter SDI Multiplex 4K First Name: Thomas Last Name: Dowrick Company: UCL Email: t.dowrick@ucl.ac.uk Phone Number: 0000000000 City: London State: Not specified Country: United Kingdom Subject: Multiplexing 2 x SD-SDI signals Enquiry: Good afternoon,

We are looking for a product that will be able to multiplex two SD-SDI signals onto a single output channel.

We happened to have a Mini Converter SDI Multiplex 4K in the office, but we have done a bit of playing with it and it doesn't seem to be able to do what we want. Can you advise as to whether this is a suitable product to use, or recommend something else?

Best,

Tom Dowrick UCL

Alistair Davidson 13 July 2018 04:50 PM


Hi Thomas,

Thank you for contacting Blackmagic support.

The Multiplex 4K is designed for converting quad, dual or single link SDI into either quad, dual or single link. As such if you input a dual link SDI signal you can multiplex this into a single link signal. However this device is not designed to multiplex two separate independent SDI sources into a single cable.

It may be possible if the sources were completely in sync however we have not tested this and cannot guarantee this would be the case. As such we would not recommend this product for this purpose.

We do not produce any device that will multiplex multiple, independent streams of SDI video into a single cable. You may wish to look through our user forums to see if any other end users have any specific recommendations for such a device.

Please find a link to our user forum below.

https://forum.blackmagicdesign.com/

I hope this helps. If you have any queries or require any further information please do not hesitate to get in contact.

Regards, Alistair Davidson Technical Support Consultant EMEA

Thomas Dowrick 14 July 2018 11:09 AM


Hi Alistair,

Thanks for coming back to me, I have posted in the forum so hopefully someone will be able to help me out.

Just to clarify, if we did try with the Multiplex 4K, do you think that it just wouldn't work, or that it may work but with uncertain performance?

Cheers,

Tom

----- End of message ----- Hi Thomas,

Thank you for getting back to me.

We have not tested this so we honestly cannot comment on whether this would work or not. The only thing we would recommend if you do wish to attempt this would be to ensure that each of the sources are as closely synced as possible. This may mean genlocking the sources and possibly passing them through devices with frame syncs.

Regards, Alistair Davidson Technical Support Consultant EMEA

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 10, 2018, 13:40

That is my correspondence with Black Magic Support. They don't seem to think that what we want to use it for is possible. It would be useful to try the multilpexer on a video source that we 100% know is Dual Link, to see what comes out.

Also, no-one replied to me on the Black Magic forum :(

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 10, 2018, 13:42

So, Johannes docs suggest that the Viking is 2 independent SDI channels. Whether or not the viking sends the data out synchronised is unknown (to me at least).

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 10, 2018, 13:46

What about https://www.filmtools.com/aja-hi-5-3d-mini-converter.html

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 10, 2018, 14:27

I'll e-mail them and see if they think it is suitable.

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 11, 2018, 09:30

They seem to think it will work (see e-mail below). I will get a quote from them.

Hi Tom,

I’m Jim Gibilterra, and I handle international shipping for Filmtools. I will be working with you on this and any other needs going forward.

If you are combining the two streams for a 3D video, this product should work for you. The output can be switched to different 3D modes, depending on the video format.

Here’s more information on this product: https://www.aja.com/products/mini-converters/hi5-3d

There are also other options that can provide various features above the AJA but they can be costly so unless you expect a huge amount of growth, including multiple users, etc, we can stick with the AJA. Please do let me know any other special needs you may have.

In the meantime, if you can let me know your exact shipping address, I can prepare a formal quotation including international freight shipping.

Thanks very much !

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 11, 2018, 09:37

Can you check scan and jigsaw website, Im sure Ron could just order one!

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 11, 2018, 11:12

Nevermind, I just noticed that there is on on @MirekJanatka's desk. Mirek - Did you try it out at all (The https://www.filmtools.com/aja-hi-5-3d-mini-converter.html)?

thompson318 commented 4 years ago

In GitLab by @MirekJanatka on Oct 11, 2018, 11:24

@ThomasDowrick I tried it out with the Magewell, but with no luck, perhaps with the 3D monitor would be another approach

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 11, 2018, 22:00

or it didnt work because combining 2 images together results in an image that is not recognised by the next device. Maybe just stream it into OpenCV?

thompson318 commented 4 years ago

In GitLab by @MirekJanatka on Oct 12, 2018, 08:11

Admittedly I didn't spend too long on it, however I remember being a little baffled. I emailed Magewell and they claim it should be possible with their card. Email response below.

Hello Mirek,

Nice to know you.

According to your description, USB Capture SDI could support SDI signal from the multiplexer. The dongle is based on different structures in different os. If you want to develop application by yourself, following are the structure you need. (1) windows: DirectShow APIs, or Media Foundation. (2) linux: V4l2 & Alsa APIs (3) macOS: AVFoundation

If you just need a compatible software, here are my recommendations: (1) windows: Amcap (2) linux: VLC (3) macOS: QuickTime


thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 12, 2018, 16:23

I had a play with it, but couldn't get it to work either. I tried using the SDI output through the Magewell, and also the HDMI output going into a monitor.

It can output either one of the two inputs, but not both at the same time. I will see if their tech support can offer any help.

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 12, 2018, 18:03

So it turns out it will only work with HD-SDI, not SD-SDI. Do we have any HD-SDI cameras?

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 12, 2018, 18:54

what are you calling HD? 1920x1080?

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 12, 2018, 20:56

I'm a bit vague on the difference between the two if I'm honest.

HD and SD SDI seem to be two different standards (see first paragraph on https://en.m.wikipedia.org/wiki/Serial_digital_interface), rather than a specific resolution.

thompson318 commented 4 years ago

In GitLab by @MirekJanatka on Oct 12, 2018, 21:25

Try using the HDMI converters to SDI and feed it into the AGA and capture it on the Magewell. You should be able to configure the AGA to have side by side output.

If this works and the aga doesn't capture the SD out (I believe ours is type ending 259) then I think we are stuck, as this SD standard is too old now. However, at least we'll know if this would work in theatre.

Talk with @EddieEdwards about trying it out on the SI in WMS or the Xi at the RF, should be able to take the connection from the logger to the multiplexer.

I'm surprised about the lack of literature wrt using multiplexers with capture cards

thompson318 commented 4 years ago

In GitLab by @MirekJanatka on Oct 12, 2018, 21:26

And we can probably get away with the two Magewells for in the lab

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 12, 2018, 22:15

Looking here: http://www.magewell.com/products/usb-capture-sdi-gen-2

it looks like max resolution is 2048 x 1080, so we can't put 2 x 1920 x 1080 either side-by-side or top-bottom. So, even if the multiplexer works, it won't go through the Magewell.

thompson318 commented 4 years ago

In GitLab by @MirekJanatka on Oct 13, 2018, 04:34

Ah.

So this is only useful on the Weiss white box with a black magic card I guess. SRV should have a spare BM 4K card in the office lab on the second floor, but it may have been installed in an older desktop there.

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 15, 2018, 11:49

The AGA can also do 'frame packing', where it doubles the frame rate, rather than putting two images side-by-side. In that scenario, the Magewell should work.

Eddie and I will try it on the SI, which has HD-SDI, when we get a chance.

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 15, 2018, 11:53

Ive got a feed into SmartLiver, so SDI from Viking, left/right at 1920x1080, into AJA multiplexer, pack top/bottom, so you get first 540 rows left image, next 540 rows right image, then into Magewell to give both frames in one image, and OPenCV reads from USB device out of the box, at 59.9 FPS.

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 15, 2018, 12:27

So, the viking is 1080i29.29 left and right, which is not compatible with the AJA, which only does frame packing at 1080p.

So, the best we can do is top/bottom.

thompson318 commented 4 years ago

In GitLab by @MirekJanatka on Oct 15, 2018, 13:10

Must be a similar USB capture card coming out soon for those 4k twitch streaming gamers...

thompson318 commented 4 years ago

In GitLab by @MirekJanatka on Oct 15, 2018, 13:15

https://www.epiphan.com/products/avio-4k/

would need an HDMI/SDI converter too

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 15, 2018, 21:38

Images for future reference.

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 15, 2018, 21:40

So, the AJA is set to be configured via software. You must install Magewell drivers for your platform (I tried Windows and Mac), it should just recognise the device as a USB camera. Then OpenCV can just magically read it.

@BongjinKoo - cc'd for reference.

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 15, 2018, 21:50

closed