<div>I assume you mean opencv image format? The basic idea is something like this:</div><div><br></div><div>avf2ipl(AVFrame * avf, IplImage * ipl)</div><div> {</div><div> 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);</div>
<div> if (swscontext == 0) return;</div><div> int linesize[4] = { ipl->widthStep, 0, 0, 0 };</div><div> sws_scale(swscontext, avf->data, avf->linesize, 0, context->height, (uint8_t **) & (ipl->imageData), linesize);</div>
<div> } </div><br><div class="gmail_quote">On Wed, Aug 24, 2011 at 18:01, Rui Luís <span dir="ltr"><<a href="mailto:rui.luis@gmail.com">rui.luis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Good day..<br>i have been for 4 days trying to convert an avframe to an iplimage in my c project...<br><br>can some one help me???<br clear="all">------<br>Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime.<br>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Saludos,<br> Bruno González<br><br>_______________________________________________<br>Jabber: stenyak AT <a href="http://gmail.com" target="_blank">gmail.com</a><br>
<a href="http://www.stenyak.com" target="_blank">http://www.stenyak.com</a><br>