How to visualize or process video data with .raw extension in matlab ?

19 次查看(过去 30 天)
I have downloaded video file from PREVENTION DATASET, which was captured by Grasshopper3 camera. It has .raw as extnestion, kindly help me in visualizing or processing the video data that has .raw extension using MATLAB or Python

回答(1 个)

Monisha Nalluru
Monisha Nalluru 2020-10-29
The video with .raw format is not supported by MATLAB
Refer the documentation link below to understand the Supported Video Formats:
But, there are File Exchanges while helps in converting the other formats to .mp4 format:
After converting the video into supported format, Use VideoReader to point object to video file and perform required process
  1 个评论
Sudheer Dunna
Sudheer Dunna 2020-10-30
Hello Monisha,
Thankyou for your responce. I tried using above mentioned file exchanges but was not able to convert the (.raw) to any regualr video mormat(.mp4).
Actually using VideoReader() or imread() for file with (.raw) extension matlab is throwing an error. Above mentioned links using videoReader() and imread() only.
I have a video ('videoCamera1.raw'), author has mentioned that it was captured using grasshopper3 camera, each frame resolution is 1920*600. Using fread() and the reshaping the read data with provided resolution information [1920*600], i was able to see the first frame (imshow()).
My concern is to get the information of total number of frames and to access the data frame by frame. Kindly help me in this regard.
Using below mentioned code i was able to visualize the first frame.
fop=fopen('video_camera1.raw','r');
row=1920;
col=1200;
fr=fread(fop,row*col,"uint8=>uint8")
z=reshape(fr,row,col)
z=z'
imshow(z)

请先登录,再进行评论。

产品

Community Treasure Hunt

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

Start Hunting!

Translated by