Thanks MartyG, but that question it isn't answered... At the end of the post they redirect him to the Stack Overflow post...
I saw that maybe with the library librealsense maybe I can do the conversion, but I don't know how to install it, if anyone can offer any help I'll be grateful!
PD: This are my data image format that the camera provides:
//PXCImage::PIXEL_FORMAT_YUY2; <-- RGB format
//PXCImage::PIXEL_FORMAT_Y16; <--- IR format
Yes, the majority of OpenCV use with RealSense that I have seen has been related to using it with Librealsense. I was going to mention Librealsense in my original message but then saw that you were using OpenCV with the official Intel SDK, so thought it might be irrelevant to your question.
Projects on GitHub do tend to have unfriendly documentation. I recently pointed someone to this setup guide, which was more friendlier presented than most:
And here's the official Librealsense one.
Thanks, but I'm still don't understand exactly how to install it... I tried to do the installation pre-requisites as 'Enable Kernel Sources'. I haven't got the file and I don't know how to execute this one... Sorry if it's a silly question but I've never done this before...
It's not a silly question at all. I've never installed Linux on a hard drive myself. I did recently install it successfully on a USB storage stick though when I was setting up a boot drive for the RealSense Robotics Kit, and that went fine because it involved using an easy tool to set the drive up using the Ubunti Linux 'iso' file I'd downloaded. If you have a spare USB stick, I'll link you to the instructions.
So I need a Virtual Machine or something like that? The instructions of librealsense said concretely don't do that:
"**Note:** Due to the USB 3.0 translation layer between native hardware and virtual machine, the librealsense team does not recommend or support installation in a VM."
So I figured that there is another option to install it just in Windows, but maybe I'm wrong. As I told you, I didn't do that before.
If you want to keep Windows, I would recommend creating a USB boot drive of Linux, so that you can boot your PC normally to Windows when the USB stick is removed from your machine.
Your other option is the one that you were pursuing originally, to try to do the .mat format conversion using windows and the official RealSense SDK.
Using Librealsense on Windows seems like it may be more trouble than it's worth.
Thanks for the help MartyG.
I'm trying to do the conversion with the official SDK, but it doesn't work well.
colorIm->AcquireAccess(PXCImage::ACCESS_READ, PXCImage::PIXEL_FORMAT_YUY2, &frmData);
image_openCV = Mat(Size(640, 480), CV_8UC3, frmData.planes);
I tried anorher formats but it's still not working
I checked on that code to write the lines I put... But it's not working and I don't know why.
I think you've researched this well enough that you will have seen any link that I find. Usually, someone on this forum just pops up with a solution that works.
This message was posted on behalf of Intel Corporation
Are you getting data at all with the two main implementations that you have tried? The one from Stack Overflow and the one from Samontab (make sure to check the video too, there’s some information in it that’s not specified in the thread). I’m still not sure what data you’re receiving (if any).
Also, check this link from Samontab as well http://www.samontab.com/web/2016/04/interfacing-intel-realsense-f200-with-opencv/. I would suggest to try with a previous RealSense SDK distribution, here’s the link to download the previous one https://communities.intel.com/external-link.jspa?url=http%3A%2F%2Fregistrationcenter-download.intel.com%2Fakdlm%2Firc_nas%2Fvcp%2F9078%2Fintel_rs_sdk_offline_package_10.0.26.0396.exe.
I don't know what I changed but suddendly works! Thanks for the help!