Ask Your Question
0

depth image

asked 2016-03-22 12:26:58 -0600

roxy89 gravatar image

updated 2016-03-23 04:29:48 -0600

theodore gravatar image

Hi, someone can tell me how to display a depth image with opencv?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-23 04:09:15 -0600

theodore gravatar image

I think the simpler is the following: In order to make a mat of type CV_64F CV_32F or CV_16Uvisualize properly you must normalize it before and then convert it to CV_8U which is the best case for imshow() to show it, thought from my experience imshow() can handle the other types quite nicely as well. In any case the following should do the trick:

cv::Mat depth_src; // your original depth image of type CV_64F, CV_32F or CV_16U
cv::Mat depth_vis; // destination image for visualization
cv::normalize(depth_src, depth_vis, 0, 255, CV_MINMAX);
depth_vis.convertTo(depth_vis, CV_8UC3);

This will transform depth image so that all values are between 0 and 255. Then you just transform it into 8-bit and visualize it.

edit flag offensive delete link more

Comments

Thanks for the reply. then what should I do I misunderstood you: having a dept image have the spin image and then obtains the relationship between an oriented basis point O and its neighbor points G. What can I do?

roxy89 gravatar imageroxy89 ( 2016-03-23 12:17:10 -0600 )edit

I did not understand anything from what you said, what is the spin image? why you want to obtain a relationship between two points? What is actually the thing that you want to do? If you can try to explain better and give some more information, I think it will be helpful.

theodore gravatar imagetheodore ( 2016-03-23 15:12:48 -0600 )edit

right ... the spin image is a descriptor ... I have to do this is in red.C:\fakepath\Screenshot_2016-03-23-21-37-18.png

roxy89 gravatar imageroxy89 ( 2016-03-23 15:40:04 -0600 )edit

@roxy89 please resize your image or put it in an external source because it destroys all the website template. Regarding what you want to do, unfortunately I cannot help you on that. I need to go through the paper in order to understand what you want to do and at the moment I do not have the time. But if you can try to explain what exactly you want to do here on in another thread then there might be someone willing to help.

theodore gravatar imagetheodore ( 2016-03-25 06:46:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-22 12:26:58 -0600

Seen: 4,085 times

Last updated: Mar 23 '16