Re: Help needed to create image frames from dataset (mpeg movie) [message #64526] |
Wed, 07 January 2009 01:41 |
loebasboy
Messages: 26 Registered: August 2008
|
Junior Member |
|
|
On 6 jan, 18:17, Kim <adisn...@hotmail.com> wrote:
> On Jan 6, 8:06 am, "Jean H." <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
> wrote:
>
>
>
>
>
>>> Hi,
>
>>> I think you misunderstood my question.
>>> I already read David's link. Like you said, that was the first thing
>>> that popped up.
>>> My question was not how to make mpeg movies, but how to make the
>>> matrix for each individual image frame, or the 3d data matrix.
>>> The above (x, y, t) is not in a matrix format, I wanted something like
>
>>> At T=1sec,
>
>>> in 4x4 matrix of x and y,
>
>>> 0 0 1 0
>>> 1 0 0 1
>>> 0 0 1 0
>>> 0 1 0 0
>
>>> Which corresponds to (2, 0), (0, 1), (3, 1), (2, 2), (1, 3) in x and y
>>> coordinates.
>>> Unfortunately, y coordinates I have are not in integer, but rather
>>> double precision, and I have hundreds of data set.
>>> So, I was hoping whether there is a quick way to create matrix out of
>>> the given data sets.
>
>> So, what should be the pixel size?
>> If it is unitary, there is no problem:
>
>> image = bytarr(Xsize,Ysize)
>> image[x,y] = 1
>
>> If you don't want to have the value 1, but rather the number of times a
>> point fell in this pixel, use histogram instead (hist_2d). Moreover, you
>> can specify the bin size!
>
>> Jean
>
> Thanks for all the help.
> This might work after all. ^^- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
Sorry for my misunderstanding, I was to quick in reading your
problem...
|
|
|
Re: Help needed to create image frames from dataset (mpeg movie) [message #64548 is a reply to message #64526] |
Tue, 06 January 2009 09:17  |
Kim
Messages: 19 Registered: January 2009
|
Junior Member |
|
|
On Jan 6, 8:06 am, "Jean H." <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
wrote:
>> Hi,
>
>> I think you misunderstood my question.
>> I already read David's link. Like you said, that was the first thing
>> that popped up.
>> My question was not how to make mpeg movies, but how to make the
>> matrix for each individual image frame, or the 3d data matrix.
>> The above (x, y, t) is not in a matrix format, I wanted something like
>
>> At T=1sec,
>
>> in 4x4 matrix of x and y,
>
>> 0 0 1 0
>> 1 0 0 1
>> 0 0 1 0
>> 0 1 0 0
>
>> Which corresponds to (2, 0), (0, 1), (3, 1), (2, 2), (1, 3) in x and y
>> coordinates.
>> Unfortunately, y coordinates I have are not in integer, but rather
>> double precision, and I have hundreds of data set.
>> So, I was hoping whether there is a quick way to create matrix out of
>> the given data sets.
>
> So, what should be the pixel size?
> If it is unitary, there is no problem:
>
> image = bytarr(Xsize,Ysize)
> image[x,y] = 1
>
> If you don't want to have the value 1, but rather the number of times a
> point fell in this pixel, use histogram instead (hist_2d). Moreover, you
> can specify the bin size!
>
> Jean
Thanks for all the help.
This might work after all. ^^
|
|
|
Re: Help needed to create image frames from dataset (mpeg movie) [message #64556 is a reply to message #64548] |
Tue, 06 January 2009 06:06  |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
> Hi,
>
> I think you misunderstood my question.
> I already read David's link. Like you said, that was the first thing
> that popped up.
> My question was not how to make mpeg movies, but how to make the
> matrix for each individual image frame, or the 3d data matrix.
> The above (x, y, t) is not in a matrix format, I wanted something like
>
> At T=1sec,
>
> in 4x4 matrix of x and y,
>
> 0 0 1 0
> 1 0 0 1
> 0 0 1 0
> 0 1 0 0
>
> Which corresponds to (2, 0), (0, 1), (3, 1), (2, 2), (1, 3) in x and y
> coordinates.
> Unfortunately, y coordinates I have are not in integer, but rather
> double precision, and I have hundreds of data set.
> So, I was hoping whether there is a quick way to create matrix out of
> the given data sets.
So, what should be the pixel size?
If it is unitary, there is no problem:
image = bytarr(Xsize,Ysize)
image[x,y] = 1
If you don't want to have the value 1, but rather the number of times a
point fell in this pixel, use histogram instead (hist_2d). Moreover, you
can specify the bin size!
Jean
|
|
|
|
Re: Help needed to create image frames from dataset (mpeg movie) [message #64560 is a reply to message #64556] |
Tue, 06 January 2009 05:33  |
Kim
Messages: 19 Registered: January 2009
|
Junior Member |
|
|
On Jan 6, 2:24 am, loebasboy <stijn....@gmail.com> wrote:
> On 6 jan, 06:37, Kim <adisn...@hotmail.com> wrote:
>
>
>
>> Hi,
>
>> I'd really appreciate if someone can help me out here.
>
>> I have 2-d data sets of x and y coordinates in time t.
>> For example,
>
>> At Time = 1sec,
>> x y
>> 10 20
>> 20 14
>> 4 8
>> . .
>> . .
>> . .
>
>> At Time = 2sec,
>
>> x y
>> 23 8
>> 3 9
>> 44 34
>> . .
>> . .
>> . .
>
>> And so on..
>> At this format, I have approximately several hundreds of datasets of x
>> and y.
>> How can I make these data files into individual image frame such that
>> those frames can be used in mpeg movie, which is the next step.
>
>> Thank you very much!!!
>
> You should create a 3D data matrix (X,Y,T) with the data and then read
> the next link and thank David for it.
>
> http://www.dfanning.com/tips/how_mpeg.html
>
> next time, do a simple google search before you ask something like
> this, with 'mpeg IDL' the above link was the first thing that popped
> up...
Hi,
I think you misunderstood my question.
I already read David's link. Like you said, that was the first thing
that popped up.
My question was not how to make mpeg movies, but how to make the
matrix for each individual image frame, or the 3d data matrix.
The above (x, y, t) is not in a matrix format, I wanted something like
At T=1sec,
in 4x4 matrix of x and y,
0 0 1 0
1 0 0 1
0 0 1 0
0 1 0 0
Which corresponds to (2, 0), (0, 1), (3, 1), (2, 2), (1, 3) in x and y
coordinates.
Unfortunately, y coordinates I have are not in integer, but rather
double precision, and I have hundreds of data set.
So, I was hoping whether there is a quick way to create matrix out of
the given data sets.
|
|
|
Re: Help needed to create image frames from dataset (mpeg movie) [message #64563 is a reply to message #64560] |
Tue, 06 January 2009 00:24  |
loebasboy
Messages: 26 Registered: August 2008
|
Junior Member |
|
|
On 6 jan, 06:37, Kim <adisn...@hotmail.com> wrote:
> Hi,
>
> I'd really appreciate if someone can help me out here.
>
> I have 2-d data sets of x and y coordinates in time t.
> For example,
>
> At Time = 1sec,
> x y
> 10 20
> 20 14
> 4 8
> . .
> . .
> . .
>
> At Time = 2sec,
>
> x y
> 23 8
> 3 9
> 44 34
> . .
> . .
> . .
>
> And so on..
> At this format, I have approximately several hundreds of datasets of x
> and y.
> How can I make these data files into individual image frame such that
> those frames can be used in mpeg movie, which is the next step.
>
> Thank you very much!!!
You should create a 3D data matrix (X,Y,T) with the data and then read
the next link and thank David for it.
http://www.dfanning.com/tips/how_mpeg.html
next time, do a simple google search before you ask something like
this, with 'mpeg IDL' the above link was the first thing that popped
up...
|
|
|