Items with no label
3335 Discussions

Can I get the landmarks from an external image?

idata
Employee
1,629 Views

Hi,

I'm wondering if I can get the landmarks of an external image from a dataset using the SDK Intel algorithms. Or if I can convert this one to an 'Intel Image'.

Thanks in advance

0 Kudos
11 Replies
idata
Employee
238 Views

Hi MQMQ,

 

 

I'm not sure if this is possible, there's an internal RealSense SDK format, which is .rssdk, and this is the file type the SDK expects. I haven't heard of anyone trying to convert a different file format into RealSense SDK format and I haven't try it myself, however, I'm not aware of any tool able to do this.

 

 

Regards,

 

Pablo M.

 

0 Kudos
MartyG
Honored Contributor III
238 Views

Hi MQMQ, there was a discussion last month about the .RSSDK format, which Pablo also commented on.

There was also this one about the data encoded in the .RSSDK file format.

If .RSSDK is an H.264 format video, then you could try converting a non-RealSense video to the H.264 format and see if it can be read by the SDK as an .RSSDK file. I have no idea if it would work, but it seems like the course of action most likely to succeed.

0 Kudos
idata
Employee
238 Views

Thanks both for the answers, but they didn't solved my problem...

0 Kudos
MartyG
Honored Contributor III
238 Views

Could you explain more please about what you are aiming to do? Thanks!

0 Kudos
idata
Employee
238 Views

I want to upload an image (RGB) from a dataset and get the landmarks with the Intel's SDK in the same way that I get the landmarks from an Intel picture

0 Kudos
MartyG
Honored Contributor III
238 Views

When you say 'image', do you mean a static picture or a moving video?

RealSense has a mode where you can load in a pre-recorded stream as an .RSSDK file instead of using live input. The purpose of this mode was to allow testing of applications without having to use a camera.

https://software.intel.com/en-us/blogs/2015/10/15/how-to-record-and-playback-streaming-sequences-in-intel-realsense-sdk RealSense - How to Record and Playback Streaming Sequences in Intel® RealSense™ SDK | Intel® Software

0 Kudos
idata
Employee
238 Views

I mean a static picture, a photo in RGB format, not a video.

PD: Thanks for the post it's really helpful and interesting for making myself a database in the future!

0 Kudos
MartyG
Honored Contributor III
238 Views

I tried rephrasing the keywords of what you were trying to do to 'realsense get landmarks from a 2d picture'. This led me to this link, where Intel staffer David Lu suggests using an API called PXCVideoModule in response to another person who wanted to get the landmarks from a picture.

https://software.intel.com/en-us/node/623478 Capture 2D Landmarks of picture

0 Kudos
idata
Employee
238 Views

I was not be able to follow the steps. I think they are use some deprecated functions (like PXCVideoModule)

I tried to compile this code but I can't. In line 12, can't made the convertion Mat to uchar... and ALIGN64 is not defined.

//First define an ImageInfo object

PXCImage::ImageInfo info={};

info.format=PXCImage::PIXEL_FORMAT_RGB32; //Change this to match your data

//You can get these easily from an OpenCV Mat

info.width=image_width;

info.height=image_height;

//And now define the actual Image data

PXCImage::ImageData data={};

data.format=PXCImage::PIXEL_FORMAT_RGB32;//This should match the info object I reckon

data.planes[0]=image_buffer; //This is the critical bit. This is the actual data, the uchar array from cv::Mat

data.pitches[0]=ALIGN64(info.width*4); //This is because RGB32 is used (8bits * 4), change accordingly

// Finally Create the image instance

PXCImage *image=session->CreateImage(&info,0,&data);

//Now you have image ready to roll.

Anyone knows how to solve this?

0 Kudos
MartyG
Honored Contributor III
238 Views

Sadly, advanced stream programming is outside of my field of knowledge. Updates to this discussion do not appear on the front page of the forum because the discussion is old. If you want help with this particular question, I think the best way for people who can help to see it will be to post it and the above script code as a new question to the forum so it goes to the top of the list.

0 Kudos
idata
Employee
238 Views

Thanks MartyG, I will do your recommendation.

0 Kudos
Reply