Items with no label
3338 Discussions

How to convert T265 fisheye frame data to opencv cv::Mat?

SJhav
Beginner
1,956 Views

Hi I want to do some image processing on the image captured from the T265 in openCV but for some reason it's not converting properly and when I do the imshow, it is just a blank a screen.

 

The active profile shows that fisheye is a Y8 based camera so I have used CV_8UC1 as the type in conversion but I suspect that I am missing something silly here.

rs2::frameset data = pipe.wait_for_frames(); rs2::frame fisheye = data.get_fisheye_frame(); cv::Mat fisheye_mat = Mat(Size(500, 500), CV_8UC1, (void *)fisheye.get_data(), Mat::AUTO_STEP); imshow("T265", fisheye_mat);

Thank you.

0 Kudos
2 Replies
Eliza_D_Intel
Employee
1,610 Views

Hello SJhav,

 

Thank you for your interest in the Intel RealSense T265 camera.

 

Could you please let us know if you have checked the Imshow example? https://github.com/IntelRealSense/librealsense/blob/master/wrappers/opencv/imshow/rs-imshow.cpp

 

Thank you,

Eliza

0 Kudos
SJhav
Beginner
1,610 Views

Hey Eliza,

 

Thanks for replying me.

 

Yes I have tried it and it is not working. One of the reason being is the type used in there is CV_8UC3 but the fisheye_frame is gray single byte size image so it is not working.

 

Best,

Samvid

0 Kudos
Reply