How can I change the resolution of kinect V2 in matlab?
3 次查看(过去 30 天)
显示 更早的评论
Kinect V2 color stream supported format is : 1920x1080. But kinect V2 depth stream format is : 512x424. Now when I start live steam for both sensors then they have different sizes because of different resolution. I cant resize them, because I need coordinates . so when I resize using Imresize(),the coordinates are not matched. I already read matlab documentation.They said hardware only supports this two format respectively.Now How can i do this in code so that both stream have the same resolution. I tried two days long but failed.
0 个评论
回答(1 个)
Walter Roberson
2017-6-29
According to http://smeenk.com/kinect-field-of-view-comparison/ the fields of view of the color sensor and depth sensor are different, 84.1 x 53.8 degrees compared to 70.6 x 60 degrees, so having the depth sensor return the same resolution as the color sensor (or an integer reduction thereof) would be misleading.
The solutions appear to be discussed https://www.mathworks.com/matlabcentral/answers/268152-mapping-rgb-and-depth-kinect-v2
17 个评论
Jonathan
2019-7-2
Thank you Mr Roberson. It worked. However, I want to ask if it is possible that for every RGB frame taken, can I be able to take a depth image at the same time? I want that for every 5 seconds that the rgb camera is taking an image, the depth camera must also take the image of the same frame at the same time. Can that be possible? If so can you please show me how I can achieve that.
Thank you.
Walter Roberson
2019-7-2
maxFrame = 300;
vid = videoinput('kinect', 1); %1 for color, 2 for depth
vid.FramesPerTrigger = 1;
vid.TriggerRepeat = maxFrame;
depth = videoinput('kinect', 2); %1 for color, 2 for depth
depth.FramesPerTrigger = 1;
depth.TriggerRepeat = maxFrame;
start(vid);
start(depth)
for nFrame = 1 : maxFrame
s = getdata(vid);
d = getdata(depth);
red = s(:,:,1);
[...]
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Acquisition Using Kinect for Windows Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!