Ask Your Question

Revision history [back]

Possible to load a RGBA avi file with cvCaptureFromAVI ?


I have been trying to load an avi file with RGBA using the cvCaptureFromAVI function, but each time it loses the alpha channel. It is a valid 8bit depth RGBA avi file (with a real value in alpha), but whenever I use cvQueryFrame the channels are reported as 3, and also the widthstep shows it to be only 3 bytes data (i.e. RGB). I have tried it with various codecs (huffyuv, lagraith, etc), and it decodes and plays perfectly, except that the alpha is lost.

Now I know that the LoadImage functionality in opencv does not support loading RGBA - but is it the same in cvCaptureFromAVI?

I only need to know 'in principle' if it can load RGBA, and I will continue to work it out - otherwise I need to know if I am chasing a dead duck.