Tutorial/Extensive Documentation on Motion Vector Stuff

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Tutorial/Extensive Documentation on Motion Vector Stuff

Placencia
So far I have successfully been able to use libav to take in input videos and
write to another video file based on the input file. The next step in the
project requires me to come up with a digital stabilizer. After some people
pointed me to the right direction, I found some stuff that may be of use to me.
(http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/group__mv.html) However, the
information is VERY light and looking at the direct code was of no direct help.
Furthermore, I have been unable to find examples of using this code. I am sure
that this area to find help in is a bit vague and difficult, but so far I cannot
grasp a good understanding. Is there any information someone would like to part?
(If more information is needed I can post it.)

_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Tutorial/Extensive Documentation on Motion Vector Stuff

Luca Abeni
Hi,

Placencia wrote:
> So far I have successfully been able to use libav to take in input videos and
> write to another video file based on the input file. The next step in the
> project requires me to come up with a digital stabilizer. After some people
> pointed me to the right direction, I found some stuff that may be of use to me.
> (http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/group__mv.html) However, the
> information is VERY light and looking at the direct code was of no direct help.
> Furthermore, I have been unable to find examples of using this code.

It seems to me that these are internal functions used by the RV (realvideo?)
decoder... I doubt you should call them directly in your programs.

Maybe if you describe the problem you are trying to address (and the
functionalities you need) someone can give you some useful hints.
(I cannot guarantee to have an answer, but I am currently not even understanding
the question ;-).


                                Luca
_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Tutorial/Extensive Documentation on Motion Vector Stuff

Placencia
> It seems to me that these are internal functions used by the RV (realvideo?)
> decoder... I doubt you should call them directly in your programs.

> Maybe if you describe the problem you are trying to address (and the
> functionalities you need) someone can give you some useful hints.


That is what I thought for the rv* stuff.  The reason I asked of that was
because a student assistant to the projects suggested that I use some of
these things directly.

Currently what I need to do in this phase of the project is that I need to
come up with an image stabilizer to reduce the jitter and shaking of the
video. (Say, as a result of a handheld camera) I think the assistant was
suggesting to modify and incorporate it into the codec, although looking
at that idea and at the code earns me some boggling. I am going to look at
another idea, find any examples, and consult with my supervisor although
it is hard to contact him which is why I've come here.

However, for any advice to offer the details are that I am currently
working on a video stitcher, reading a YUV frame from each input coded video,
stitch to a single YUV frame, then write the frame to a new coded output
video. (and repeat, of course) (Currently the program can accept different
videos, but if I need to stick to one type it will be MPEG4 Part II.)

_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Tutorial/Extensive Documentation on Motion Vector Stuff

Luca Abeni
Hi,

Placencia wrote:
[...]

> Currently what I need to do in this phase of the project is that I need to
> come up with an image stabilizer to reduce the jitter and shaking of the
> video. (Say, as a result of a handheld camera) I think the assistant was
> suggesting to modify and incorporate it into the codec, although looking
> at that idea and at the code earns me some boggling. I am going to look at
> another idea, find any examples, and consult with my supervisor although
> it is hard to contact him which is why I've come here.
>
> However, for any advice to offer the details are that I am currently
> working on a video stitcher, reading a YUV frame from each input coded video,
> stitch to a single YUV frame, then write the frame to a new coded output
> video. (and repeat, of course) (Currently the program can accept different
> videos, but if I need to stick to one type it will be MPEG4 Part II.)

It is still not clear to me which functionalities you need from libav*,
but I suspect that the motion vectors could be useful to you.

Try to have a look at the debug_mv field of AVCodecContext, and at the
motion_val field of the AVFrame structure. I have no experience with them,
but maybe you can find some useful information in avcodec.h (look at the
comment before motion_val)


                                Luca
_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Tutorial/Extensive Documentation on Motion Vector Stuff

Mark Heath-2
In reply to this post by Placencia

On 25/07/2008, at 3:46 AM, Placencia wrote:

>
> Currently what I need to do in this phase of the project is that I  
> need to
> come up with an image stabilizer to reduce the jitter and shaking of  
> the
> video. (Say, as a result of a handheld camera) I think the assistant  
> was
> suggesting to modify and incorporate it into the codec, although  
> looking
> at that idea and at the code earns me some boggling. I am going to  
> look at
> another idea, find any examples, and consult with my supervisor  
> although
> it is hard to contact him which is why I've come here.

Have you looked into phase correlation for motion detection?

I was looking into it for de-interlace filters.

>
> However, for any advice to offer the details are that I am currently
> working on a video stitcher, reading a YUV frame from each input  
> coded video,
> stitch to a single YUV frame, then write the frame to a new coded  
> output
> video. (and repeat, of course) (Currently the program can accept  
> different
> videos, but if I need to stick to one type it will be MPEG4 Part II.)

Are you talking about simple image concatenation?
Image A and Image B becomes Image AB

Or something more like Panorama stitching?

The mjpegutils have a good foundation for working with uncompressed  
YUV video.

Mark
_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user