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

조회 수: 13 (최근 30일)
Sudheer Dunna
Sudheer Dunna 2020년 10월 20일
댓글: Sudheer Dunna 2020년 10월 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)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for IP Cameras에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by