Main Page | Report this Page
 
   
Science Forum Index  »  Compression Forum  »  Determining optimum sequence
Page 1 of 1    
Author Message
moogie
Posted: Tue Apr 15, 2008 6:36 pm
Guest
I have hit the wall of the limit of my math knowledge... limited as it
is :P

I have been implementing an idea of using least squares to generate an
equation which approximates temporal pixel values. I have a working
version which seems to be working and i would now like to expand the
video codec to use previous frame spatial information.

To allow spatial infromation i will modify the current algorithm to
approximate differences between pixels between frames instead of the
pixel value per frame.

The problem is a sort of "chicken and egg" problem. To give the best
results I need to be able to identify which pixel from a previous
generated frame best matches the current pixel... however the pixels
need to be generated with equation which is needs to know the
differences between pixels between frames!

Any idea on how to solve this problem?
Thomas Richter
Posted: Wed Apr 16, 2008 2:00 am
Guest
moogie schrieb:
Quote:
I have hit the wall of the limit of my math knowledge... limited as it
is Razz

I afraid in this case the best strategy I can suggest is to first
improve your math skills. Compression *is* applied mathematics.

Quote:
I have been implementing an idea of using least squares to generate an
equation which approximates temporal pixel values. I have a working
version which seems to be working and i would now like to expand the
video codec to use previous frame spatial information.

To allow spatial infromation i will modify the current algorithm to
approximate differences between pixels between frames instead of the
pixel value per frame.

The problem is a sort of "chicken and egg" problem. To give the best
results I need to be able to identify which pixel from a previous
generated frame best matches the current pixel... however the pixels
need to be generated with equation which is needs to know the
differences between pixels between frames!

I'm not sure I can make much sense of what you describe here. The
traditional way of finding "best matches" is to separate the new frame
into blocks, and then find for each block in the new frame the best
match in the old frame. Due to complexity constraints, this search often
only tries to minimize the sum of absolute differences (not the sum of
square differences).

Other things you might want to look into are "optical flow" (google!),
maybe that helps.

Probably you'd like to describe your problem in more detail?

So long,
Thomas
moogie
Posted: Wed Apr 16, 2008 12:24 pm
Guest
Quote:
Probably you'd like to describe your problem in more detail?

can do.

This currently what happens:

for each pixel
do
do
increment current sequence size
loop (n) from 0 to current sequence size
calculate difference between pixel in frame(n -current
frame) and the pixel in the current frame
end loop
generate equation using least squares to approximate these
differences
loop while PSNR of the approximated differences is above a
threshold.
record the previous equation
loop until no more frames
loop

what i want to do is instead of using the pixel in the same location
in the previous frame to generate the difference, to use the pixel
which most closely matches the current pixel in the current frame from
the previous frame. The problem arises is that i need to be able to
generate the frames in order to know which pixel from a previous frame
best matches the current actual frame so i will need to have an
equation already... however i need to know the differences to make
create the equation in the first place!

does this help clarify my problem?
Thomas Richter
Posted: Thu Apr 17, 2008 2:40 am
Guest
moogie schrieb:
Quote:
Probably you'd like to describe your problem in more detail?

can do.

This currently what happens:

for each pixel
do
do
increment current sequence size
loop (n) from 0 to current sequence size
calculate difference between pixel in frame(n -current
frame) and the pixel in the current frame
end loop
generate equation using least squares to approximate these
differences
loop while PSNR of the approximated differences is above a
threshold.
record the previous equation
loop until no more frames
loop

what i want to do is instead of using the pixel in the same location
in the previous frame to generate the difference, to use the pixel
which most closely matches the current pixel in the current frame from
the previous frame. The problem arises is that i need to be able to
generate the frames in order to know which pixel from a previous frame
best matches the current actual frame so i will need to have an
equation already... however i need to know the differences to make
create the equation in the first place!

Your problem is ill-defined, as it seems. For example, *if* you pick a
pixel from a different frame location, you have to make the decoder
aware of this (namely, correction relative to *which* pixel). Really, I
suggest to have a look into H261 (the first usable video codec, which is
simple, but yet shows many features in modern codes). An alternative
approach, which is closer to your lines, is to estimate motion from a
flow vector field. The first hits in google on "optical flow" can help
you, as well.

The problem with your approach is that you haven't defined the concepts,
which likely causes your confusion.

Just an idea: You shouldn't really try to minimize the prediction error.
I can tell you what the minimal error is, namely *zero*. You most likely
find a pixel of the same luminance somewhere in the previous frame,
which gives you nothing, though, since all the information is then in
the single-pixel motion vector you need to transmit. What you have to do
is not to solve the distortion problem (minimize D), but solve the
rate-distortion problem (minimize D for given R = rate). By that I mean
you need to take the size of the data into account that needs to be
transmitted.

Greetings,
Thomas
moogie
Posted: Thu Apr 17, 2008 12:01 pm
Guest
On Apr 17, 4:40 pm, Thomas Richter <t...@math.tu-berlin.de> wrote:
Quote:
moogie schrieb:
Your problem is ill-defined, as it seems. For example, *if* you pick a
pixel from a different frame location, you have to make the decoder
aware of this (namely, correction relative to *which* pixel). Really, I
suggest to have a look into H261 (the first usable video codec, which is
simple, but yet shows many features in modern codes). An alternative
approach, which is closer to your lines, is to estimate motion from a
flow vector field. The first hits in google on "optical flow" can help
you, as well.

I will definitely look into both h261 and flow vector field as you
suggest.

Quote:

The problem with your approach is that you haven't defined the concepts,
which likely causes your confusion.

i am not sure what you mean by this statement... i dont have confusion
as to what i want... i just dont know how to achieve it :)

Quote:

Just an idea: You shouldn't really try to minimize the prediction error.
I can tell you what the minimal error is, namely *zero*. You most likely
find a pixel of the same luminance somewhere in the previous frame,
which gives you nothing, though, since all the information is then in
the single-pixel motion vector you need to transmit. What you have to do
is not to solve the distortion problem (minimize D), but solve the
rate-distortion problem (minimize D for given R = rate). By that I mean
you need to take the size of the data into account that needs to be
transmitted.

I agree... i didnt define "optimal" in my previous posts. optimal for
me is achieving a desired level of image quality which minimises total
information needed to recreate the image sequence.

I was thinking of using least squares again to approximate the motion
vectors of each pixel.

Thanks

Nick
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Fri Jul 25, 2008 3:28 am