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.
Walter Roberson
Walter Roberson 2019 年 5 月 7 日

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

その他の回答 (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
Julian Marstaller
Julian Marstaller 2017 年 11 月 24 日
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.
Walter Roberson
Walter Roberson 2019 年 5 月 7 日
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 ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by