- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, i'm sorry for serial question, but i can't find place where can i ask some problem directly about RealSense SDK.
Question)
I referenced below sentence in visual studio.
static rs2::frameset current_frameset;
than, i want convert this "current_frameset" variable to iplimage for using openCV.
how can i change this one? (exactly, rs2::video_frame -> CvCapture * )
i tried this one,
cv::Mat img(480,640, CV_8UC3, (uchar3 *)frame->get_frame_data(rs2::stream::current_frameset));
but it came up only error that i can't understand.
so, i wish sentence like " frame = Cv ... " (frame is iplimage variable)
thank for help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The article below discusses doing the conversion with the older R200 and SR300 camera models in Librealsense 1, and may give you some hints that you can adapt for RS2.
For example, one suggestion for an approach is:
IplImage *I = cvCreateImageHeader(cvSize(dc_frame->size[0],dc_frame->size[1]),IPL_DEPTH_8U,1);
cvSetData(I,dc_frame->image,dc_frame->size[0]);
http://answers.opencv.org/question/128296/realsense-r200-difference-between-saved-images-and-live-stream/ realsense R200, difference between saved images and live stream? - OpenCV Q&A Forum
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The article below discusses doing the conversion with the older R200 and SR300 camera models in Librealsense 1, and may give you some hints that you can adapt for RS2.
For example, one suggestion for an approach is:
IplImage *I = cvCreateImageHeader(cvSize(dc_frame->size[0],dc_frame->size[1]),IPL_DEPTH_8U,1);
cvSetData(I,dc_frame->image,dc_frame->size[0]);
http://answers.opencv.org/question/128296/realsense-r200-difference-between-saved-images-and-live-stream/ realsense R200, difference between saved images and live stream? - OpenCV Q&A Forum
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
i've another question.
is that also work in SDK 2.0 as rs2::video_frame to CvCapture?
simply, i want convert "rs2::video_frame" variable to "CvCapture* "
example) frame = cvQueryFrame(color); // it didn't work. how can i fix it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bear in mind that I am adapting an instruction to convert cv::VideoCapture to CvCapture, so this may be wrong. You could try:
rs2::video_frame capture1(fileName);
if (!capture.isOpened())
{
// failed, print error message
}
****************
I believe that in the above script, capture1 is a custom variable name chosen by its author and you could use your own name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks alot!
i'll try to modify this one and above instruction.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page