Hi, I have a 20 minute video recording of an insect and i need to process it. Since it is the raw data,its file format is .seq.
Can anyone help me in reading the seq file in matlab?
Thanks

댓글 수: 2

Walter Roberson
Walter Roberson 2012년 9월 12일
Was your .seq file created by Cyberpaint or by NorPix ?
kittu
kittu 2012년 9월 12일
Hi, Thanks for the reply.I am not sure about it,as I have not collected the data personally.But i think that it was created by NorPix.

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

 채택된 답변

Walter Roberson
Walter Roberson 2012년 9월 12일

0 개 추천

댓글 수: 5

kittu
kittu 2012년 9월 13일
편집: kittu 2012년 9월 13일
Hi, Thanks for the quick link and answer. I am trying to replicate the same code on my machine. But i am getting this error message:
??? Maximum variable size allowed by the program is exceeded.
I am trying to create a zero matrix for preallocation and for that I need to create a zero matrix.However the size of matrix is about:
404166936*522198298*9765
Here 404166936 is Image width and 522198298 is Image height while 9765 is the number of Allocated frames. I know it is a huge matrix, but some how the people in MATLAB has written the code and i am only replicating it for my use.
Any suggestions?Is there a way to increase the variable size? I am trying to read the .seq file which is about 50MB big. If the program fails in 50MB file, then how will i process even bigger files which are close to 3GB!
Thanks
Walter Roberson
Walter Roberson 2012년 9월 13일
There is no hope of reading in 404166936*522198298*9765: it would require 2E12 gigabytes!
Please recheck the sizes. 400 million pixels wide seems quite unlikely. Even a single frame would be 2E8 gigabytes.
kittu
kittu 2012년 9월 14일
편집: kittu 2012년 9월 14일
Thanks for replying.Ya, i know..But some how when i am reading the header information then it is showing me these figures. I have this following code for header information:
clc
clear
fid = fopen('1.seq','r','b')
endianType = 'ieee-le';
%Reading Header Version
OFB = {28,1,'long'};
fseek(fid,OFB{1}, 'bof')
headerInfo.Version = fread(fid, OFB{2}, OFB{3}, endianType) %headerInfo is a structure
%Reading Header size
OFB = {32,1,'long'};
fseek(fid,OFB{1}, 'bof');
headerInfo.HeaderSize = fread(fid,OFB{2},OFB{3}, endianType)
%Reading Description Format
OFB = {592,1,'long'};
fseek(fid,OFB{1}, 'bof');
DescriptionFormat = fread(fid,OFB{2},OFB{3}, endianType)'
%Reading Byte Description
OFB = {36,512,'ushort'};
fseek(fid,OFB{1}, 'bof');
headerInfo.Description = fread(fid,OFB{2},OFB{3}, endianType)'
%Reading Image Information
OFB = {548,24,'uint32'};
fseek(fid,OFB{1}, 'bof');
tmp = fread(fid,OFB{2},OFB{3}, 0, endianType)
headerInfo.ImageWidth = tmp(1);
headerInfo.ImageHeight = tmp(2);
headerInfo.ImageBitDepth = tmp(3);
headerInfo.ImageBitDepthReal = tmp(4);
headerInfo.ImageSizeBytes = tmp(5);
vals = [0,100,101,200:100:900];
fmts = {'Unknown','Monochrome','Raw Bayer','BGR','Planar','RGB',...
'BGRx', 'YUV422', 'UVY422', 'UVY411', 'UVY444'};
headerInfo.ImageFormat =[fmts{vals == tmp(6)}];
%Reading information about number of allocated frames
OFB = {572,1,'ushort'};
fseek(fid,OFB{1}, 'bof');
headerInfo.AllocatedFrames = fread(fid,OFB{2},OFB{3}, endianType);
%Reading information about origin
OFB = {576,1,'ushort'};
fseek(fid,OFB{1}, 'bof');
headerInfo.Origin = fread(fid,OFB{2},OFB{3}, endianType);
%Reading information about true image size i.e number of bytes between the
%first pixel of each successive images.
OFB = {580,1,'ushort'};
fseek(fid,OFB{1}, 'bof');
headerInfo.Origin = fread(fid,OFB{2},OFB{3}, endianType);
%Reading True Image Size
OFB = {580,1,'ulong'};
fseek(fid,OFB{1}, 'bof');
headerInfo.TrueImageSize = fread(fid,OFB{2},OFB{3}, endianType);
%Reading information about fps
OFB = {584,8,'double'};
fseek(fid,OFB{1}, 'bof');
headerInfo.FrameRate = fread(fid,OFB{2},OFB{3}, endianType)
When i run this, i get the following header information: headerInfo =
Version: 0
HeaderSize: 36629
Description: [1x512 double]
ImageWidth: 404166936
ImageHeight: 522198298
ImageBitDepth: 572531232
ImageBitDepthReal: 639771172
ImageSizeBytes: 606348324
ImageFormat: []
AllocatedFrames: 9765
Origin: 10280
TrueImageSize: 673654824
FrameRate: [8x1 double]
Any suggestions?
Walter Roberson
Walter Roberson 2012년 9월 14일
There must be a problem in reading the header. The ImageWidth shown there happens to correspond to hex 0x18171918 which is entirely too regular to be an accident.

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

추가 답변 (2개)

Davide Ferraro
Davide Ferraro 2012년 9월 11일

0 개 추천

There are some routines for working with .seq files in MATLAB. I've not been able to test them.

댓글 수: 2

kittu
kittu 2012년 9월 12일
Hi, Thanks for reply.Unfortunately none of those codes are working. I guess those codes are meant for reading the sequential files which are often generated during the sequence analysis of DNA/RNA etc which are text files. But in my case, these .seq files are raw video files.
I am unable to read this file in MATLAB using any of the reader. Please provide some solution. Thanks
hey kittu,
i have the same issue currently. did you solve your problem already?
Thanks!
Here is our file output:
width: 1920
height: 1080
imageBitDepth: 12
imageBitDepthReal: 12
imageSizeBytes: 3110400
imageFormat: 630
numFrames: 239
trueImageSize: 3112960
fps: 25.1130
seqVersion: 5
codec: 'imageFormat630'
descr: 'StreamPix 6.5.0.0 (x64) Ę䀀 䀀  乐䀴  ㋈䀴  g 䀴 ⊸3…'
nHiddenFinalFrames: 0

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

Vijay Yadav
Vijay Yadav 2019년 5월 7일

0 개 추천

Hey,
Can anyone please share matlab script for reading .seq file

댓글 수: 4

Walter Roberson
Walter Roberson 2019년 5월 7일
Vijay Yadav:
We have identified at least 3 different kinds of .seq files. We would need to know what software wrote your files to try to figure out what your file is.
Vijay Yadav
Vijay Yadav 2019년 5월 7일
Hi Walter,
Thnxs for ur reply.
My .seq raw videos files are from StreamPix.
Paul Siefert
Paul Siefert 2019년 6월 5일
You can now read compressed and uncompresed sequences completly, or within a reading window with the above script.

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

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

질문:

2012년 9월 11일

댓글:

2019년 6월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by