Splitting binary files into different frames to create picture

3 ビュー (過去 30 日間)
Mohammad
Mohammad 2014 年 9 月 11 日
コメント済み: Walter Roberson 2019 年 1 月 22 日
Hi everyone;
So I used a program that allows me to record depth data from the Kinect and store it as a .binary file.
So I opened the binary file in MATLAB using the following code: fid = fopen('C:\KinectData\Depth\Depth_Raw_0.binary');
B = fread(fid,'int64');
fclose(fid);
n = 4; % No. of columns of T
BB = reshape(B, n,[]);
T = permute(BB,[2,1]);
imshow(T)
And the result I get is just a line. Its understandable since the variable T is holding all the frames at once.
So I need to find a way on how to split that binary file for let say 30FPS. The properties of each frame is 512X412.
Can anyone help me with that?
Thanks; Ali
  2 件のコメント
Abdulrahman Abdulrahman
Abdulrahman Abdulrahman 2019 年 1 月 22 日
Did you find the answer? please share it with us
Walter Roberson
Walter Roberson 2019 年 1 月 22 日
frames = reshape(n, 512, 412, []);

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2014 年 9 月 11 日
  1 件のコメント
Mohammad
Mohammad 2014 年 9 月 11 日
I do not think its a Kinect related issue since the Kinect I am using is the new one which is not supported by MATLAB. Also, I just need to be able to process a binary file to convert it into an image. Any idea on how this can be done?

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by