<p>I want to do keyframe interpolation in matlab.</p>

<p>If I understand correctly, it uses splines to approximate the the motion of specific pixel points within the frames(through transforms). Correct me if I'm wrong.</p>

<p>I tried looking but there are no toolboxes or any code for it. Where can I start?</p>

<p>I will be working with video frames. At specific points (say after N frames, N~~100) the first frame encountered is labeled the keyframe.</p>

<p>These frames are the equivalent to what animator artists draw and then animate by getting the computer to approximate frames in between.</p>

<p>I'm interpolating image frames. Literal image frame pixel values.</p>

<p>Imagine this, there are some pixel values I select, then I call those pixel values features and decide to track those pixel values against the frames. Those pixel values must have some sort of trajectory. I want to interpolate pixel values at various points of a trajectory such that the trajectory approximates a smooth motion between the pixel values.</p>

<p>I know the per pixel affine transform matrices between frames, the warps they perform on any single pixel in the image give rise to displacement in the pixel in a frame-time plot and end up being a trajectory. I smooth this thing somehow and have another set of matrices now describing the same thing but smoother.</p>

<p><a href="https://i.sstatic.net/Shqub.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Shqub.png" alt="Image 1"></a></p>

<p><a href="https://i.sstatic.net/noKVs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/noKVs.png" alt="Image 2"></a></p>

<p><a href="https://i.sstatic.net/g4E46.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/g4E46.png" alt="Image 3"></a></p>

CC BY-SA 3.0
2016-06-26T09:13:08.343Z
You can not be helped until you describe what you interpolate. A keyframe is just the frame where you have no interpolation. But what is in thw keyframe. The underlying mathematical model is important to the interpolation. No model no interpolation. So how do you plan to track the pixels. Vague waving of hands does not help.
joojaa
CC BY-SA 3.0
2016-06-26T22:19:37.397Z
Possible duplicate of [How to do keyframe interpolation on matlab? Any toolboxes present?](http://computergraphics.stackexchange.com/questions/3644/how-to-do-keyframe-interpolation-on-matlab-any-toolboxes-present)
flawr
CC BY-SA 3.0
2016-07-07T13:41:23.377Z
@flawr yes it was me. My previous question got closed as mentioned.
MyBushisaNeonJungle
CC BY-SA 3.0
2016-07-07T13:42:24.893Z
@joojaa 
I'm interpolating image frames. Literal image frame pixel values. Imagine this, there are some pixel values I select, then I call those pixel values features and decide to track those pixel values against the frames. Those pixel values must have some sort of trajectory. I want to interpolate pixel values at various points of a trajectory such that the trajectory approximates a smooth motion between the pixel values.
MyBushisaNeonJungle
CC BY-SA 3.0
2016-07-07T13:46:03.407Z
@user6334139 yes but finding the trajectory is another thing and has nothing to do with interpolation. Interpolation only comes into play once you know where the trajectory is going (quite literally you have billions of options on where the pixel went). Look into optical flow tracking. https://www.youtube.com/watch?v=KoMTYnlNNnc
joojaa
CC BY-SA 3.0
2016-07-07T13:51:40.533Z
@joojaa Okay fine I know the per pixel affine transform matrices between frames, the warps they perform on any single pixel in the image give rise to displacement in the pixel in a frame-time plot and end up being a trajectory. I smooth this thing somehow and have another set of matrices now describing the same thing but smoother. So I know where the trajectory is going, now what?
MyBushisaNeonJungle
CC BY-SA 3.0
2016-07-07T13:53:22.243Z
Yes time to rewrite your question. Your not looking to interpolate pixels but interpolation of matrices. Is it 4 by 4 matrix? Please [EDIT](http://computergraphics.stackexchange.com/posts/3677/edit) your question
joojaa
CC BY-SA 3.0
2016-07-07T13:56:59.437Z
Matrices are only a representation of things needed to get a trajectory. The end result is still interpolation of the pixel values in the trajectory.
MyBushisaNeonJungle
CC BY-SA 3.0
2016-07-07T14:11:03.093Z
Not being wiser friend, I've articulated it as it is, thats the problem statement, thats what I couldnt solve, thats why I posted here
MyBushisaNeonJungle
CC BY-SA 3.0
2016-07-07T19:25:02.637Z
Rather than trying to keep everything abstract, if you have some example data this may make it easier to understand your intention. A series of images or the location data of the points you are working with, perhaps.
trichoplax is on Codidact now
CC BY-SA 3.0
2016-07-09T08:08:44.407Z
Not keeping anything abstract, I've uploaded my source. It has the problem in it
MyBushisaNeonJungle
<transformations><interpolation><animation><matlab>
How to do keyframe interpolation on matlab?
MyBushisaNeonJungle
# How to do keyframe interpolation on matlab?

(Asked by: username_0 on 2016-06-26)

I want to do keyframe interpolation in matlab.

If I understand correctly, it uses splines to approximate the the motion of specific pixel points within the frames(through transforms). Correct me if I'm wrong.

I tried looking but there are no toolboxes or any code for it. Where can I start?

I will be working with video frames. At specific points (say after N frames, N~~100) the first frame encountered is labeled the keyframe.

These frames are the equivalent to what animator artists draw and then animate by getting the computer to approximate frames in between.

I'm interpolating image frames. Literal image frame pixel values.

Imagine this, there are some pixel values I select, then I call those pixel values features and decide to track those pixel values against the frames. Those pixel values must have some sort of trajectory. I want to interpolate pixel values at various points of a trajectory such that the trajectory approximates a smooth motion between the pixel values.

I know the per pixel affine transform matrices between frames, the warps they perform on any single pixel in the image give rise to displacement in the pixel in a frame-time plot and end up being a trajectory. I smooth this thing somehow and have another set of matrices now describing the same thing but smoother.

[![Image 1](https://i.sstatic.net/Shqub.png)](https://i.sstatic.net/Shqub.png)

[![Image 2](https://i.sstatic.net/noKVs.png)](https://i.sstatic.net/noKVs.png)

[![Image 3](https://i.sstatic.net/g4E46.png)](https://i.sstatic.net/g4E46.png)

**Tags:** transformations, interpolation, animation, matlab

> **Comments:**
> **username_1**: You can not be helped until you describe what you interpolate. A keyframe is just the frame where you have no interpolation. But what is in thw keyframe. The underlying mathematical model is important to the interpolation. No model no interpolation. So how do you plan to track the pixels. Vague waving of hands does not help.  
> **username_2**: Possible duplicate of [How to do keyframe interpolation on matlab? Any toolboxes present?](http://computergraphics.stackexchange.com/questions/3644/how-to-do-keyframe-interpolation-on-matlab-any-toolboxes-present)  
> **username_0**: @username_2 yes it was me. My previous question got closed as mentioned.  
> **username_0**: @username_1  I'm interpolating image frames. Literal image frame pixel values. Imagine this, there are some pixel values I select, then I call those pixel values features and decide to track those pixel values against the frames. Those pixel values must have some sort of trajectory. I want to interpolate pixel values at various points of a trajectory such that the trajectory approximates a smooth motion between the pixel values.  
> **username_1**: @user6334139 yes but finding the trajectory is another thing and has nothing to do with interpolation. Interpolation only comes into play once you know where the trajectory is going (quite literally you have billions of options on where the pixel went). Look into optical flow tracking. https://www.youtube.com/watch?v=KoMTYnlNNnc  
> **username_0**: @username_1 Okay fine I know the per pixel affine transform matrices between frames, the warps they perform on any single pixel in the image give rise to displacement in the pixel in a frame-time plot and end up being a trajectory. I smooth this thing somehow and have another set of matrices now describing the same thing but smoother. So I know where the trajectory is going, now what?  
> **username_1**: Yes time to rewrite your question. Your not looking to interpolate pixels but interpolation of matrices. Is it 4 by 4 matrix? Please [EDIT](http://computergraphics.stackexchange.com/posts/3677/edit) your question  
> **username_0**: Matrices are only a representation of things needed to get a trajectory. The end result is still interpolation of the pixel values in the trajectory.  
> **username_0**: Not being wiser friend, I've articulated it as it is, thats the problem statement, thats what I couldnt solve, thats why I posted here  
> **username_3**: Rather than trying to keep everything abstract, if you have some example data this may make it easier to understand your intention. A series of images or the location data of the points you are working with, perhaps.  
> **username_0**: Not keeping anything abstract, I've uploaded my source. It has the problem in it  

---

## 0 answers

