I assume you mean opencv image format? The basic idea is something like
this:

avf2ipl(AVFrame * avf, IplImage * ipl)
    {
        if (swscontext == 0) swscontext = sws_getContext(context->width,
context->height, PIX_FMT_YUV420P, ipl->width, ipl->height, PIX_FMT_BGR24,
SWS_BILINEAR, 0, 0, 0);
        if (swscontext == 0) return;
        int linesize[4] = { ipl->widthStep, 0, 0, 0 };
        sws_scale(swscontext, avf->data, avf->linesize, 0, context->height,
(uint8_t **) & (ipl->imageData), linesize);
    }

On Wed, Aug 24, 2011 at 18:01, Rui Luís <[email protected]> wrote:

> Good day..
> i have been for 4 days trying to convert an avframe to an iplimage in my c
> project...
>
> can some one help me???
> ------
> Give a man a fish and you feed him for a day. Teach him how to fish and you
> feed him for a lifetime.
>
> _______________________________________________
> Libav-user mailing list
> [email protected]
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>


-- 
Saludos,
     Bruno González

_______________________________________________
Jabber: stenyak AT gmail.com
http://www.stenyak.com
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to