- Posts: 5
- Joined: Thu Jun 16, 2016 5:04 pm
Hello Blackmagic Community!
Question: How do I get video frames from the MiniRecorder into cv::Mat format for OpenCV?
Set-up:
I am working on a tinkering/proof-of-concept demo, and I need to get up and running in a hurry. I am using OpenCV for some sig processing stuff, I have a Mac, I have a GoPro, and I have BlackMagic UltraStudio Mini Recorder. I downloaded Blackmagic DeckLink SDK 10.6.6.
The configuration it: GoPro --(HMDI)--> Mini Recorder --(Thunderbolt)--> Mac
What I found so far:
I am trying to get the live video frames into my processing chain in OpenCV so I need them in cv::Mat format. It seems like a pretty obvious use case, since there is no encryption and OpenCV is pretty well know. There was even a thread about it here: viewtopic.php?f=12&t=40622
Unfortunately, the code linked to by the OP doesn't compile on mac because:
cameradecklink.cpp:111:13: No viable conversion from 'IplImage *' (aka '_IplImage *') to 'cv::Mat'
Also, the responder referred to an example that I can't find in Blackmagic DeckLink SDK 10.6.6.
So I would like to know:
Is there any sample code that shows how to get frames into OpenCV?
Quick Update: As far as assigning an IplImage* to a cv::Mat, I did find this snippet.
cv::Mat mat = cv::cvarrToMat(img);
No word on if it works yet. Still hoping for an officially sanctioned Sample Code.
Question: How do I get video frames from the MiniRecorder into cv::Mat format for OpenCV?
Set-up:
I am working on a tinkering/proof-of-concept demo, and I need to get up and running in a hurry. I am using OpenCV for some sig processing stuff, I have a Mac, I have a GoPro, and I have BlackMagic UltraStudio Mini Recorder. I downloaded Blackmagic DeckLink SDK 10.6.6.
The configuration it: GoPro --(HMDI)--> Mini Recorder --(Thunderbolt)--> Mac
What I found so far:
I am trying to get the live video frames into my processing chain in OpenCV so I need them in cv::Mat format. It seems like a pretty obvious use case, since there is no encryption and OpenCV is pretty well know. There was even a thread about it here: viewtopic.php?f=12&t=40622
Unfortunately, the code linked to by the OP doesn't compile on mac because:
cameradecklink.cpp:111:13: No viable conversion from 'IplImage *' (aka '_IplImage *') to 'cv::Mat'
Also, the responder referred to an example that I can't find in Blackmagic DeckLink SDK 10.6.6.
So I would like to know:
Is there any sample code that shows how to get frames into OpenCV?
Quick Update: As far as assigning an IplImage* to a cv::Mat, I did find this snippet.
cv::Mat mat = cv::cvarrToMat(img);
No word on if it works yet. Still hoping for an officially sanctioned Sample Code.