-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend API to support stereo streams #18
Comments
The discussion with @cbergeles and his team on 23 Oct 2018 has revealed that a video frame should be as tightly coupled to its stereo frame as possible. |
|
I watched the video, or parts of it, and I can't recommend pursuing this. It seems a bit esoteric... I've never heard of the library before, and personally I would not use it over OpenCV (with which most people have experience!). Just my 2 cents :) |
@cbergeles Thanks! The particular interesting bit of GIL in this case is the pixel iterator. This with the aim of providing NumPy-like "views" on e.g. a video frame's stereo frame. Tom and I were looking into this, considering whether it could help extend the API in a minimally invasive way. |
Re: OpenCV I agree it's a great toolkit. And GIFT-Grab currently uses it for a number of tasks. However in the particular case of GIFT-Grab it's an overkill to ask the user to install OpenCV to be able to use GIFT-Grab. Using OpenCV merely for capturing and encoding video streams is a bit like driving a Ferrari in the countryside :) So we are in the process of removing the dependency on OpenCV (see #9). |
Re Boost GIL, I agree it is a bit esoteric and probably a bit of an overkill as well but as @dzhoshkun mentioned, some of its underpinning concepts could help us support stereo in an elegant and easy manner. We could offer a slightly different interface in python and c++ to make use of the most adequate tool for this in each language. For example, if a stereo image is provided in memory as a left+right concatenated together, depending on the exact memory layout, we could create a numpy view on the underlying array to show only the left or the right image by using adequate (very long) stride/padding: OpenCV also support the notion of steps but I haven't looked at this in detail: |
Idea:
|
|
…n via an explicit wrapper constructor
|
|
With #5 GIFT-Grab will support stereo video stream capture from BlackMagic devices. When extending the API, among others, the implications on encoding should be considered.
Encoding is currently done by
IVideoTarget
implementors that expose only anappend
method (in addition to theupdate
method inherited fromIObserver
). However both methods take only aVideoFrame
as a parameter. Would it be good for instance to add an optionalVideoFrame
parameter to these methods? This has the advantage thatVideoFrame
stays as it is (=dumb, simple).Another option is to extend
VideoFrame
itself. Possible design patterns are pointed out here: #5 (comment) Some initial thoughts as well: #5 (comment), #5 (comment) This however does not sound like a good option any more, as it changesVideoFrame
's and its clients' interfaces.The text was updated successfully, but these errors were encountered: