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!