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

19 Ansichten (letzte 30 Tage)
Sudheer Dunna
Sudheer Dunna am 20 Okt. 2020
Kommentiert: Sudheer Dunna am 30 Okt. 2020
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

Antworten (1)

Monisha Nalluru
Monisha Nalluru am 29 Okt. 2020
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 Kommentar
Sudheer Dunna
Sudheer Dunna am 30 Okt. 2020
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)

Melden Sie sich an, um zu kommentieren.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by