reading raw image data into frames

I have exported the image frames as .dat (raw data) or .asc format. I do know all the image data are located in the raw data. I imported the .dat file and I could not see the information in MATLAB. I did it with avi format but I want the program to be written for .dat format. I would like to read the file and display the image frames in my GUI and navigate frame by frame.

Any idea... please share your ideas. 
0
Krishna
9/8/2010 9:41:19 PM
comp.soft-sys.matlab 207012 articles. 0 followers. lunamoonmoon (258) is leader. Post Follow

11 Replies
618 Views

Similar Articles

[PageSpeed] 55
"Krishna " <sathishkrishna12@gmail.com> wrote in message <i68vtv$4de$1@fred.mathworks.com>...
> 
> I have exported the image frames as .dat (raw data) or .asc format. I do know all the image data are located in the raw data. I imported the .dat file and I could not see the information in MATLAB. I did it with avi format but I want the program to be written for .dat format. I would like to read the file and display the image frames in my GUI and navigate frame by frame.
> 
> Any idea... please share your ideas. 

Use fread() and your knowledge of the frame size to read in the raw data.
0
9/8/2010 9:57:04 PM
On 08/09/10 4:41 PM, Krishna wrote:
>
> I have exported the image frames as .dat (raw data) or .asc format. I do
> know all the image data are located in the raw data. I imported the .dat
> file and I could not see the information in MATLAB. I did it with avi
> format but I want the program to be written for .dat format. I would
> like to read the file and display the image frames in my GUI and
> navigate frame by frame.

There are an indefinite number of incompatible .dat formats. Saying that 
you imported the .dat file doesn't give me much confidence that you read 
it in a way that Matlab would be able to understand the data.

We are going to need more information about how you wrote the .dat file 
and how you are trying to read the file, and what results you are seeing.
0
Walter
9/8/2010 10:06:45 PM
Then just write them as a standard image format, like PNG, TIFF, or
something.  Why are you using .dat????  What possible reason do you
have for doing that?
0
ImageAnalyst
9/8/2010 10:23:33 PM
Well, I have the detailed information of the image frames (for ex,  frame rate, exposure time, etc.) from the custom code. If I export the recorded movie as avi, say 500 frames,  I personally think I am gonna lose all the data integrated with the the movie. Exporting .dat (raw data) file or .asc willl have all necessary information about recorded image frames or movie. 

I have tried to read the .dat or .asc file using fopen and fread commands, but this pop out a memory incompatible message. I would like to read the file in the matlab. It could be nice if I am able to read the data from .asc or .dat and pull out the images. This way I can write the code to pull out the acquisition details from the file. 


Walter Roberson <roberson@hushmail.com> wrote in message <VNTho.66316$co1.56745@newsfe11.iad>...
> On 08/09/10 4:41 PM, Krishna wrote:
> >
> > I have exported the image frames as .dat (raw data) or .asc format. I do
> > know all the image data are located in the raw data. I imported the .dat
> > file and I could not see the information in MATLAB. I did it with avi
> > format but I want the program to be written for .dat format. I would
> > like to read the file and display the image frames in my GUI and
> > navigate frame by frame.
> 
> There are an indefinite number of incompatible .dat formats. Saying that 
> you imported the .dat file doesn't give me much confidence that you read 
> it in a way that Matlab would be able to understand the data.
> 
> We are going to need more information about how you wrote the .dat file 
> and how you are trying to read the file, and what results you are seeing.
0
Krishna
9/9/2010 7:29:23 AM
So why not just save a mat file, either one for the whole movie, or
one mat file for each frame if needed.  Let me get this straight.  Are
you extracting out and writing individual frames from your movie into
separate files?  And you have some measurements or parameters that are
unique for each frame and you're writing them back out?  And then
trying to read them back in again (from disk) in a different m-file?
0
ImageAnalyst
9/9/2010 10:19:23 AM
Are you suggesting to export as avi and bring it to matlab, and then save as .mat file for each frames or a whole movie. I think it's a painstaking effort. I already have custom code to read and extract this information but still I wish to read in the .dat format. I could send a sample file in both .dat and .avi format.  Perhaps you can help me out.









ImageAnalyst <imageanalyst@mailinator.com> wrote in message <dedba3e5-35da-42da-9469-2755b158078e@a11g2000vbn.googlegroups.com>...
> So why not just save a mat file, either one for the whole movie, or
> one mat file for each frame if needed.  Let me get this straight.  Are
> you extracting out and writing individual frames from your movie into
> separate files?  And you have some measurements or parameters that are
> unique for each frame and you're writing them back out?  And then
> trying to read them back in again (from disk) in a different m-file?
0
Sathish
9/9/2010 10:55:05 AM
It's not really clear (to me at least) what you have.  What I gathered
is that you already have an avi movie file, and that is what you're
starting with.  This is because you said "I have the detailed
information of the image frames (for ex,  frame rate, exposure time,
etc.) from the custom code" and you said that you already have a
"recorded movie."

Then I assume you read in frame by frame and (perhaps - it's not
clear) make some kind of measurements.  Then you say you "exported the
image frames as .dat (raw data) or .asc format."  So I take this to
mean that you took the existing movie, and perhaps any other
measurements you've created and then export them to one or more
(again, not clear) files with either .dat format or .asc format.

I was just suggesting that this set of output data (movie, individual
frames, or other measurements, again not clear) could be exported to a
standard data file format, like avi for a movie or .mat for other
data, instead of these non-specific and unsatisfactory .dat and/
or .asc files that you're having trouble with.  dat is not a standard
format anyway.  You could write out your own dat file with any kind of
crazy format you want but you can't be guaranteed the MATLAB will
understand it when it tries to read it back in.
0
imageanalyst (7623)
9/9/2010 1:31:15 PM
Recorded movie is not in avi format.  It is .sif file . only possibility is to export in some format where MATLAB recognize the file. I think exporting avi will lose all the header information, but it will be preserved in raw data file. 

Thanks
0
Sathish
9/9/2010 1:47:07 PM
On Sep 9, 9:47=A0am, "Sathish " <sathishkrishn...@gmail.com> wrote:
> Recorded movie is not in avi format. =A0It is .sif file . only possibilit=
y is to export in some format where MATLAB recognize the file. I think expo=
rting avi will lose all the header information, but it will be preserved in=
 raw data file.
>
> Thanks

--------------------------------------------------------------------
I don't know.  I'm not familiar with the details of either format.
What program would you be using to read in the sif file and write it
out to an avi file for MATLAB's consumption?
Image Analyst
0
imageanalyst (7623)
9/9/2010 9:14:38 PM
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <92c9cd2f-0fc4-4578-b350-9c282b787aa4@j2g2000vbo.googlegroups.com>...
> On Sep 9, 9:47 am, "Sathish " <sathishkrishn...@gmail.com> wrote:
> > Recorded movie is not in avi format.  It is .sif file . only possibility is to export in some format where MATLAB recognize the file. I think exporting avi will lose all the header information, but it will be preserved in raw data file.
> >
> > Thanks
> 
> --------------------------------------------------------------------
> I don't know.  I'm not familiar with the details of either format.
> What program would you be using to read in the sif file and write it
> out to an avi file for MATLAB's consumption?
> Image Analyst
-------------------------------------------------------------------------------------------------------

Exporting option comes with manufacturer software. 
0
9/11/2010 8:50:07 PM
On Sep 11, 4:50=A0pm, "Sathish " <sathishkrishn...@gmail.com> wrote:
> Exporting option comes with manufacturer software.
----------------------------------------------
Then ask that manufacturer for details on how the other information
like exposure, etc. can also be exported, in addition to the avi file.


0
ImageAnalyst
9/11/2010 10:13:56 PM
Reply:
Similar Artilces:

Re: Can I read data using Macro? #3
Summary: Techniques for reading multiple files #iw-value=1 Ekta, Although macro can be used, there are probably better tools for what you have so far described. Take a look at trying something like filename q ("c:\junk\test\*msg.txt" "c:\junk\prod\my*.txt") ; If you need to know the where the data is coming from use the FILENAME option of the INFILE statement. If you need more control than an * provides then look at the FILEVAR option of the INFILE statement. If you still need macro thean give example problem not solved by the above. Ian Whitlock ================...

Algorith for DICOMDIR file reading
Dear friends What is the good algorithm for reading DICOMDIR files. I want the output as a tree structure. Thanks in advance. Alvin Dear friends, I got the solution. And I am closing this topic. Thanks and Regards Alvin ...

Reading text files.
I am looking for the easiest way possible to read a text file into SystemVerilog. First, a little background: I have six years of experience with VHDL, which I used to use to make command-driven testbenches. I could write testbenches that looked like this: RESET 10 IDLE 12 WRITE ABCD1234 DEADBEEF IDLE 6 READ 1234ABCD FEEDFEED etc. etc. etc. I would now like to do the same thing in Verilog and/or SystemVerilog, but cannot find an easy way to read and parse a simple text file. So far, the ONLY thing that I have found is: http://www.chris.spear.net/pli/fileio.htm which ...

what if I only want to read the first line of an email?
I want Access to read the fresh part of an email but not the old replied content. What i mean is I want Access to only read the 'fresh' part of the email, for example 33333333333333 in this case. ----------------------------------------------------------------------------------------------------------------------- 3333333333333333 On Fri, Nov 13, 2009 at 4:11 PM, BBC <BBC@gmail.com> wrote: 2222222222222222 On Fri, Nov 13, 2009 at 4:11 PM, ADD <ADD@gmail.com> wrote: 1111111111111111 ---------------------------------------------------...

===Welcome to comp.lang.c++! Read this first. #23
Welcome to comp.lang.c++! Read this first. This post is intended to give the new reader an introduction to reading and posting in this newsgroup. We respectfully request that you read all the way through this post, as it helps make for a more pleasant and useful group for everyone. First of all, please keep in mind that comp.lang.c++ is a group for discussion of general issues of the C++ programming language, as defined by the ANSI/ISO language standard. If you have a problem that is specific to a particular system or compiler, you are much more likely to get complete and accurate answers in...

Re: Reading from excel #4
If you only need name and address, couldn't you try separating the field by the use of any number, or the word's "suite", "p.o", "appt", "apt", and "appartment" to identify the name? Might not be perfect, and wouldn't separate first and last names, but might provide a good start. Art -------- On Tue, 24 Jul 2007 17:49:27 -0400, Ed Heaton <EdHeaton@WESTAT.COM> wrote: >This brings to mind my adage - "It's easier to put values together than >to separate them!" > >Whoever created your file obviously di...

US-TX-Austin: .NET Programmer , ASP, VB, MSSQL, Strong Data; 4-6 mos. (45386332402)
US-TX-Austin: .NET Programmer , ASP, VB, MSSQL, Strong Data; 4-6 mos. (45386332402) ==================================================================================== Position: Programmer II/Programmer Reference: MLS00054 Location: Austin TX Duration: 4-6 mos. Skills: ASP.Net or VB.Net, SQL, Strong Data base background Scope: Convert applications from MS-Access front end to a .NET front end, Work with DBA to optimize MSSQL backends including DB design and Stored Procs, Comfortable working with sensitive and compartment...

Read string names in a loop
Hello I have a basic program question. I have some files that are named this way: test.7.2.20120718.101456.s5mubr.dcm test.7.2.20120718.101456.16501lh.dcm test.7.3.20120718.101456.8ll4jr.dcm and so on The last 6 characters before the extension is a string. And that part is always 6 characters. I have read file names with ascending integers before in a loop by using "%04d" or something similar. How can I read all of these file names in a loop? Thanks. - Anita On Wednesday, October 17, 2012 10:00:39 AM UTC+13, Anita S wrote: > Hello > > I have ...

How to copy non-Palm Data from SD card to PC?
At home I have card reader. At work I have Palm cradle. I want to copy one file from home to work PC. I copied that file thru card reader to my SC card. Is it possible to transfer that file from SD card to my work PC using only Palm and USB cradle? Am Thu, 27 Nov 2003 08:11:30 +0100 schrieb mah: > Is it possible to transfer that file from SD > card to my work PC using only Palm and USB cradle? Look at CardExport from www.softick.com -- Stefan Braunstein - no e-mails - mah <mah00385@hotmail.com> wrote in message news:<MPG.1a2fc20f7063aebf989788@news...

How to read numbers in a text file efficiently
How to read the numbers in a text file in the following form ISSUE K1 K2 K3 "130108074" "4" "3" "2" "130108073" "6" "1" "1" "130108072" "2" "5" "1" "130108071" "2" "6" "5" "130108070" "1" "2" "2" "130108069" "5" "6" "1" "130108068" "3" "2" "1" "130108067" "5" "6" "5" ...

Making a background image a working link
I'm using a stylesheet to place a small 'background image' in the upper left corner of several pages. Is there a simple way of making that image a clickable link? Thanks. Jeff Gillingham wrote on 30 nov 2003 in comp.infosystems.www.authoring.stylesheets: > I'm using a stylesheet to place a small 'background image' in the > upper left corner of several pages. Is there a simple way of making > that image a clickable link? Thanks. > A background image is not clickable, onmy html-elements are clickable and if the background image is a style...

Reading data file containing character
Here's a data file ========================================================== NODE{1 0 6 0 1.000000e+002 -7.450605e-011 -7.450599e-011 -4.749746e-011} NODE{2 0 6 0 1.000000e+002 -7.450605e-011 -7.450599e-011 1.000000e-003} NODE{3 0 6 0 1.000000e+002 -7.450605e-011 -7.450599e-011 2.000000e-003} NODE{4 0 6 0 1.000000e+002 -7.450605e-011 5.857869e-004 1.000000e-003} NODE{5 0 6 0 1.000000e+002 -7.450605e-011 1.000000e-003 -4.749746e-011} NODE{6 0 6 0 1.000000e+002 -7.450605e-011 1.000000e-003 2.000000e-003} NODE{7 0 6 0 1.000000e+002 -7.450605e-011 1.514727e-003 1.000000e-003} NODE{8 0 6 0 1.0...

Subset image
Dear all, I need to subset a bigger image by a smaller image using the coordinates of= the smaller image. I have succeded in doing this by help of the ENVI_CONVE= RT_FILE_COORDINATES command and simple subsetting of a grid( data_new =3D d= ata[XF[0]:XF[1], YF[0]:YF[1],*] ).=20 However the result is a new grid, without any information about the coordin= ates. Now, I want to write this image using the envi_write_envi_file comman= d with correct information about the coordinate system. Any idea how to do = this? Regards, Corinne ...

Imageready gif frame transparency
What's causing the problem on this gif image: http://craig3000.com/spinninwheels955/images/dj.gif Each frame of the gif is overlapping the previous frame. This didn't start happening until I made the gif background transparent using imageready. If I hit play in imageready to preview the gif, it plays fine, and doesn't do this. But when I export or preview in a browser, it starts doing this. What am I doing wrong? I've posted the PSD as well at: http://craig3000.com/spinninwheels955/images/dj.psd TIA Select first 1, in the Layers palette add a new layer under all others,...

[telecom] Judge Questions Tools That Grab Cellphone Data on Innocent People
Judge Questions Tools That Grab Cellphone Data on Innocent People By Jennifer Valentino-DeVries October 22, 2012 A judge in Texas is raising questions about whether investigators are giving courts enough details on technological tools that let them get data on all the cellphones in an area, including those of innocent people. In two cases, Magistrate Judge Brian Owsley rejected federal requests to allow the warrantless use of "stingrays" and "cell tower dumps," two different tools that are used for cellphone tracking. The judge said the government sh...

Sybase goes read only
I have an Access97 frontend using linked tables to a sybase database via ODBC DSN. Sometimes but not always the linked table becomes read only. After refreshing the links it may or may not return to being editable. This happens on several tables in different DB's. Yes, there is a primary key on the tables No, exclusive locking is not employed. I cannot find either on Microsoft or sybase any refernece to this issue. My work around is to code data updates thru passthru queries, but clearly takes more coding. I checked to make sure we have the latest ODBC.dll Has anyone experienced the ...

Advantages of Data Conversion and Data Formats Services by Data Entry India
Now a day's paper has become outdated and organizations are using online services to avoid paper work. For any organization, its biggest and most important asset is its data and more important is perfect accessibility of that data when it is needed. Sometimes it becomes really very difficult to manage such a large amount of data, especially for firms with large amounts of information, multiple formats, and complex system requirements. In order to avoid such situations of mismanagement conversion services are like bliss. Conversion services allow these organizations to systematize their dat...

Licensing issues
I have been asked to copy the compiler from a legacy 2.6 system to a solaris 10 zone. This compiler is used in production by us and is a Sun Workshop compiler. Using another compiler is anot an option. Sun as discontinued support for this product and offers a demo license to users. This demo license is perhaps forever. My issue is this: I followed Sun's instructions on installing the demo license keys. The customer says that they can compile without problems, However the license manager logs give errors. The errors stem from the fact that files were copied from the 2.6 system and are lic...

Did you read about that?
you can take a look for this web sites http://www.theholyquran.org/ http://www.islamway.com/SF/quran/ http://www.geocities.com/islamone_l/index.htm http://www.imanway.com/vb/forumdisplay.php?f=3D90 or read this =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D What is Islam? ABOUT THE WORDS "ISLAM" AND "MUSLIM" The name of this religion is Islam, the root of which is S-L-M, which means peace. The word "Salam," derived from the same root, may also ...

Re: Read binary data #7
sounds a bit cruel! packed numbers on zOS (eg from COBOL or PL1) are 1 byte longer than "necessary". They have a additional byte for the sign, in hex "0C"x or "0D"x as far as I remember. So a 8-digit number which should fit in 4 bytes will require 5 bytes. If there are some example bytes visible in hex, it might be possible to see what TBC (that's a sickness in Germany... a, ok TBCD!) stores. Maybe they omit the sign, cause a telefonnumber does't need it. The reason why they use BCD numbers might be, that there is space for leading zeros (?) and it's s...

Displaying HSV image by imshow
After I convert the rgb image to hsv by function rgb2hsv, and then I display the hsv image by imshow. Why the image shown is different from the rgb one?? Thank a lot! "matthew ma" <mklazy@yahoo.com.hk> wrote in message <fc1b90$qt6$1@fred.mathworks.com>... > After I convert the rgb image to hsv by function rgb2hsv, > and then I display the hsv image by imshow. Why the image > shown is different from the rgb one?? Are you using colormap(hsv) ? hsv images do not have any kind of internal marker to distinguish them from RGB images, so unless you set your col...

open/fopen read/fread in multithreaded environment.
I am having data file, which is only used for reading by multiplethreads in same process. Reading may be done by in following possible way. 1.each Thread fopen,fread,fclose <fread may be called in loop> 2.each Thread open, read,close <fread may be called in loop> 3.Main Thread will fopen, childthread will fread in loop , mainthread will fclose at end. 4.Main Thread will open, childthread will read in loop , mainthread will close at end. <in 3 and 4 above return value of open/fopen will be global value <or may be pass to function but i think it is shared between multiple...

Read XML from web into Notes as Text?
In Notes, I need to read in some XML that can be reached from a URL, and convert it to text. I've been using GetDocumentByURL to access the XML, but the document it returns has the XML attached as a file. So the only way I can find of accessing the file is to ExtractFile it, and store it on the file system. Then I'd have to open the file and read through it. Is there a better way of doing this? Can you read an attachment without having to detach and store it first? Any better approaches or suggestions anyone? Thanks. DAVE!! ...

Re: Data Step Recode: Is there a better way?? #2
Hello data _null_, Yes, you are correct on both counts. Sorry for the trouble you had determining what the output should look like. I am trying to code most significant source of HIV exposure. The hierarchy from top to bottom is: MSM/IDU MSM IDU Blood Endemic Heterosexual Other/Unknown So, for example, if a patient has exposure via: 1) men having sex with men and intravenous drug (MSM/IDU) and 2) Immigration from an HIV endemic region (Endemic), they will be assigned the code MSM/IDU. Thanks for your help. Paul Paul J. Miller, Ph.D. Research Scientist and Statistician Ontario HIV Treat...

Read MS Excel (binary, no CSV) file on OpenVMS?
I had a customer inquiry about being able to read an Excel binary file (not CSV) on OpenVMS. I Googled to see what was out there but didn't see if anything actually existed - anybody do this and want to share? Thanks! John Egolf wrote: > I had a customer inquiry about being able to read an Excel binary file > (not CSV) on OpenVMS. The CDA converters were, at their release, able to process the then current spreadsheet formats, but it has been somethging like 20 years since they were updated ... Directory $DISK1:[VMS$COMMON.SYSLIB] DTIF$READ_ASCII_FIELD.EXE;2 ...