reading raw image data into frames

  • Permalink
  • submit to reddit
  • Email
  • Follow


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
Reply Krishna 9/8/2010 9:41:19 PM

See related articles to this posting


"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
Reply sean.dewolski1 (106) 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
Reply 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
Reply 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
Reply 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
Reply 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
Reply 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
Reply imageanalyst (7622) 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
Reply 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
Reply imageanalyst (7622) 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
Reply sathishkrishna12 (3) 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
Reply ImageAnalyst 9/11/2010 10:13:56 PM
comp.soft-sys.matlab 203372 articles. 529 followers. Post

11 Replies
495 Views

Similar Articles

[PageSpeed] 15


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

Read Image from RAW (image data before demosaicking)
Hello, Does anyone know how I can open a RAW image (preferably .RWL taken from a Leica camera) such that I can see the data straight from the sensor before color interpolation? For example, for pixel 1,1 I expect to see a value representing the Green, but a zero for Red and Blue... Any help would be greatly appreciated. Thanks! "Jack Branning" <jbr.nospam@nospam.com> wrote in message <i0ak93$480$1@fred.mathworks.com>... > Hello, > > Does anyone know how I can open a RAW image (preferably .RWL taken from a Leica camera) such that I can see the data...

RAW Image data reading ERROR
I read RAW image data from a binary file stream. I have to read just bytes one by one and put them into a matrix of structs of unsigned chars. I have to use unsigned chars because their rangs go from 0 to 255. If I use chars then a value of 129 will be -128 :( The problem: infile.get(ImageDATA[i][j].R); Reads only chars... Ok, it works fine with chars, but when I access to the matrix the value is read like char... but i want rang from 0 - 255... Help meeeeee The source is something like that: #include <iostream> #include <fstream> #include <ctime> #include <s...

RAW Image data reading ERROR
I read RAW image data from a binary file stream. I have to read just bytes one by one and put them into a matrix of structs of unsigned chars. I have to use unsigned chars because their rangs go from 0 to 255. If I use chars then a value of 129 will be -128 :( The problem: infile.get(ImageDATA[i][j].R); Reads only chars... Ok, it works fine with chars, but when I access to the matrix the value is read like char... but i want rang from 0 - 255... Help meeeeee The source is something like that: #include <iostream> #include <fstream> #include <ctime> #include <s...

raw image data to binary image data
Hi MATLAB newsgroup I have a bunch of 128 x 128 x 128 16bit-integer raw data images taken by a NMR scanner. I will hopefully be using a program to register the images. But the program I am using requires the images to be in a 32bit float binary image file. So I would need to convert the images from 16bit integer raw data to 32bit float binary data Is this conversion possible in MATLAB? If it is possible, could anyone lead me in the right direction to as how I could make this conversion (i.e helpful functions and/or pseudo-code)? Any help would be appreciated, Trevor On Sat, 23 May 2009 00...

How to read desired data from raw data set (with example)?
Hi, I am struggling with one question of how to read desired data from the raw data set? And here is the example data first: **Example: Obs ID TX 1 1 OUT 2 1 OUT 3 1 OUT 4 1 IN 5 1 OUT 6 1 OUT 7 1 IN 8 1 OUT 9 2 OUT 10 2 OUT 11 2 OUT 12 2 OUT 13 2 IN 14 2 IN 15 2 OUT 16 2 OUT 17 2 OUT **My question: I want to read desired observations from the above raw data set: Within the SAME ID (1) whenever an observation with TX="IN", read...

Read non-image data from image acquisition toolbox
Hello, I am currently writing a IMAQ adaptor for a near-infrared camera. Our adaptor measures the camera temperature using the camera SDK. Can anyone imagine a solution for bringing back the measurement value from the camera into our MATLAB application? Thanks, Christian "Christian Keck" <christian.keck-pfarrherr@freenet.de> wrote in message news:46a86e66$1@news.fhg.de... > Hello, > > I am currently writing a IMAQ adaptor for a near-infrared camera. Our > adaptor measures the camera temperature using the camera SDK. Can anyone > imagine a solution f...

Re: How to read desired data from raw data set (with example)?
The following get what you need: data xx; input Obs ID TX $; cards; 1 1 OUT 2 1 OUT 3 1 OUT 4 1 IN 5 1 OUT 6 1 OUT 7 1 IN 8 1 OUT 9 2 OUT 10 2 OUT 11 2 OUT 12 2 OUT 13 2 IN 14 2 IN 15 2 OUT 16 2 OUT 17 2 OUT ; data xx; set xx; retain del; by id tx notsorted; if first.id and tx='OUT' then del=1; else if first.id and tx='IN' then del=0; if tx='IN' then del=0; if tx='IN' and not last.tx then delete; if del then delete; drop del; run; proc print; run; Obs Obs ID TX 1 ...

how to simply parse raw image data and output to an image file ?
Hi I have the text file of an email with an image attachment - I am ONLY looking to take the raw image (jpg) data that came in from an email attachment (I have ALREADY parsed it) and SIMPLY decode and dump the contents to an image file so it becomes an image again. I am not looking for fancy programs and all kinds of complex MIME:: programs. So I did the following assuming the jpg data that came in on an email was Base64, and that was wrong since the below didnt work - any ideas how to do this ? I am on windows and just want to create the image to a directory. I dont work with Perl on unix....

Re: How to read desired data from raw data set (with example)? #2
/**************************/ /** Create Data **/ /**************************/ data xx; input Obs ID TX $; cards; 1 1 OUT 2 1 OUT 3 1 OUT 4 1 IN 5 1 OUT 6 1 OUT 7 1 IN 8 1 OUT 9 2 OUT 10 2 OUT 11 2 OUT 12 2 OUT 13 2 IN 14 2 IN 15 2 OUT 16 2 OUT 17 2 OUT ; run ; /*****************************/ /** Subset the data **/ /*****************************/ data one (drop = del _tx i) ; set xx ; by Id ; retain del ; if first.Id then del = 0 ; /****************************/ /** If TX ...

Raw Data Reading
Hi, I'm working on a program that will read data in from a text file. The data is colon delimited. The problem is that in one part of the file, if a field (5064) is populated it looks like this: 5075:Mr. Bob 5064:Dr. Sue 5003:626 and when it's not populated, it looks like this: 5075:Mr. Bob 5064:: 5003:626 As this is raw data coming out of a machine, I have no control over the format. And theoretically, any field can wind up unpopulated in any file. I've tried with and without DSD in the infile statement and either the 5064 or the 5003 entry winds up incorrect. Any ideas of...

How to read raw data
Hi folks. Currently, I'm doing a project; reading a raw data file and convert it into some meaningfull information (could be in binary, hexa or anything). FYI, this raw data file (size of few Megabyte) is 12-bit, organized as frame-subframe structure, and each subframe contain ten(?) words. I'am able to do one or two functions in Matlab but, I know nothing about this really raw things. Thank you for your help ^_^7 Harapan Rachman wrote: > Currently, I'm doing a project; reading a raw data file and convert it > into some meaningfull information (could be in bin...

Reading Raw Image
Hello, I have a .raw image file from a lumenera camera that I am trying to open. It is a 10-bit image (1280x1024). The total bytes is 7864320 (1280x1024x6) (not sure why that is). I tried using read_binary with data_dims =[1280,1024] but the image is just snowy...not what I expect to see. Can anyone help me with this? thanks, rp! On Sep 20, 2:47 pm, "rpert...@gmail.com" <rpert...@gmail.com> wrote: > Hello, > I have a .raw image file from a lumenera camera that I am trying to > open. It is a 10-bit image (1280x1024). The total bytes is 7864320 > (1280x1024x6) (not ...

Read RAW data
Hello! I'm a new user of Matlab, and I would like to know how can I read RAW images in Matlab. How can I convert complex-real4 to a format that can be read in matlab. Thanks, best regards Carolina ...

Raw image data
Hello All, I am trying to get all information available from a very large (almost 1 Gb) raw file. This raw data is given by a spectrometer instrument. I was able to open the file using 'fread', but this does not give all the information or does not show the header information for the Raw file. Does anyone have any suggestions on how to try and achieve this? Is the settings for the RAW file a characteristic of that particular equipment? Thank you in advance. Mathew "Mathew Thomas" wrote in message <j2eucf$coa$1@newscl01ah.mathworks.com>... > Hello All, ...

read meta data from image
hello is there any perl module (CPAN) that can read meta infomration from images? thanks stig stig wrote: > is there any perl module (CPAN) that can read meta infomration from > images? What did you find when you searched CPAN? I searched for 'image' and 'meta' and found: Image::Info -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl ...

reading RGB raw images
Hi, i have a problem reading RGB raw images, i have the code for reading grayscale raw images and it perfectly works, so here is my code for grayscale images, can you tell what to do in order top read RGB raw images. function G=readraw(filename) %readraw - read RAW format grey scale image file from Disk % Usuage : G=readraw(filename) disp([' Retrieving Image ' filename ' ...']); fid=fopen(filename,'rb'); if (fid==-1) error('can not open imput image filem press CTRL-C to exit \n'); pause end pixel=fread(fid,inf, 'uchar'); fclose(fid); [Y X...

Help: read raw data....
Hi, I have raw data as follow : 1,1007,2002,2,2210,8.5,32.46,5.967,.863,76.7,-2.534,989.34,2.465,106.4,118.1 3,1007,2002,2,2210,2046.2,-2.445,989.43 3,1007,2002,2,2215,2068.2,-2.35,989.25 1,1007,2002,2,2220,8.55,27.28,8.89,.671,72.7,-2.183,988.96,2.845,104.6,116.7 3,1007,2002,2,2220,2086.7,-2.092,989.08 3,1007,2002,2,2225,2103.8,-1.879,989.04 1,1007,2002,2,2230,7.53,30.29,7,1.433,68.71,-1.867,989.02,2.667,93.8,104.5 3,1007,2002,2,2230,2118.2,-1.855,989.23 3,1007,2002,2,2235,2138.3,-1.86,988.87 1,1007,2002,2,2240,6.368,31.88,50.31,3.205,62.74,-1.62,988.97,3.247,85.1,95 So, can ...

RAW image data format
I just got a digital SLR, and one of the recording formats is RAW. The resolution isn't noticeably better than its extra fine jpeg, but it ought to be easier to process. I'm pretty happy using GIMP (Gnu Image Manipulation Program, obviously free) on my digital images, but it doesn't know Minolta's RAW format. I have a program that can convert it to tiff, but GIMP, while it displays the image, finds tags it doesn't understand. Instead of asking naive questions, I simply request advice. One bit of processing I want to do is averaging. The "film speed" can be ...

raw data reading problem
Hi, I am trying to read in some data from a text file and I'm having a a few problems. My data starts with a record id where 75220 indicates the start of a record and following rows go with that record until the next 75220. So, in the below data, I have 6 rows of data but it is really only 3 records. Here is what my data looks like: 7522036170122222222Y07021995 75223N23333000fb0000012AUT 7522036170033333333N01122001 75223E34321000ae8545532AUT 7522011570144444444Y05021988 75223O12311000aa9988521AUT My below code only gives me 1 record in the data set 75223 and 0 records in 75220. Any ad...

read frame data from 3DS
Help, were i can get source of loadiongs and animation 3ds > Help, were i can get source of loadiongs and animation 3ds library lib3ds has a sample for loading 3ds files http://www.gnu.org/directory/Graphics/3d/lib3ds.html ...

read image data from Buffer?
Hello ! i call the following function which retrieves a region of interest from the specified image at the specified position and resolution in 24-bit BGR format as buffer. [a b c d e f] = calllib('lib','GetImageData',pathptr,xCenter,yCenter,zCenter,zoomf,o_physwptr,o_physhptr,imgBuffptr,buffSizeptr); pathptr Filename of the image to use imgBuffptr User supplied buffer to receive the image data ------------------------------------------------------------------------------------- io_nBufferSize Size of the user supplied buffer (if the supplied buffer is ...

How to get data from image or frame
Dear all, i need to get data from each and every frame when i start video object by webcam within lodding frames completed.I tried getdata function.it only give framespertrigger data for example i set framespertrigger value is 10 and triggerrepeat is 10.so i got framesacquired is 110.but finally i got 10 frames only so tell me the suggestion to avaold it. is there any other way to get data from each frame when video is start. ...

About how SAS read in raw data.
Hey, Guys, Please look at the two short SAS program and correspondence outputs. Could anyone explain why in the first output, sas automatically add two decimal place in the first observation and automatically cut the second observation to two decimal places. in the second output, why sas automatically cut to 4 decimal places? BTW, I am using sas -8.2. Thanks a lot. Mindy Mindy - you need to put your program and log inline in your message. Attachments aren't accepted by listserve. Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: SAS(r) Discussion [mailt...

About How SAS Read in Raw Data
Sorry, I forget the outputs. Here is my question again: Hey, Guys, Please look at the two short SAS program and correspondence outputs. Could anyone explain why in the first output, sas automatically add two decimal place in the first observation and automatically cut the second observation to two decimal places. in the second output, why sas automatically cut to 4 decimal places? (1) program 1 data try; input a; cards; 14123018338 2.176058 ; run; proc print; run; The SAS System 10:21 Wednesday, November 8, 2006 1 Obs a ...