Discussion:
Using uncompressed RGB (fourcc='DIB ') frames with OpenCV
lefebvre_pa
2010-06-09 15:14:03 UTC
Permalink
Hi,

I'm currently trying to read and write uncompressed RGB video files with OpenCV. These files should normally be supported according to
http://opencv.willowgarage.com/wiki/VideoCodecs, see "uncompressed video" section.

The reading part :
- OpenCV reads fourcc='0000' from my videos, I can grab frames and
read data successfully: everything is working.

The writing part :

- I've first tried to create output files using the same (0000)
fourcc but OpenCV always automatically switches to "I420" codec

- Then I've read on some forums that I should use "DIB " fourcc
but this one is apparently not recognized.

Is that a bug ? or writing uncompressed RGB videos is not supported
by OpenCV ?

I really need using this output format since I have to check some
video processing algorithms...

Thank you for help

PA.

PS: I use OpenCV 2.1



------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-***@yahoogroups.com
Shervin Emami
2010-06-10 04:38:42 UTC
Permalink
Maybe its just the wrong FourCC code? With OpenCV 2.0 on WinXP 32, I
use any of these:

int fourCC_code = CV_FOURCC('M','J','P','G'); // M-JPEG codec (may not
be reliable).
int fourCC_code = CV_FOURCC('P','I','M','1'); // MPEG 1 codec.
int fourCC_code = CV_FOURCC('D','I','V','3'); // MPEG 4.3 codec.
int fourCC_code = CV_FOURCC('I','2','6','3'); // H263I codec.
int fourCC_code = CV_FOURCC('F','L','V','1'); // FLV1 codec.

Cheers,
Shervin Emami.
Post by lefebvre_pa
Hi,
I'm currently trying to read and write uncompressed RGB video files with OpenCV. These files should normally be supported according to
http://opencv.willowgarage.com/wiki/VideoCodecs, see "uncompressed video" section.
- OpenCV reads fourcc='0000' from my videos, I can grab frames and
read data successfully: everything is working.
- I've first tried to create output files using the same (0000)
fourcc but OpenCV always automatically switches to "I420" codec
- Then I've read on some forums that I should use "DIB " fourcc
but this one is apparently not recognized.
Is that a bug ? or writing uncompressed RGB videos is not supported
by OpenCV ?
I really need using this output format since I have to check some
video processing algorithms...
Thank you for help
PA.
PS: I use OpenCV 2.1
------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-***@yahoogroups.com
lefebvre_pa
2010-06-10 10:07:33 UTC
Permalink
Hi !

I've tested all these codecs and they work but I really need to write video files with uncompressed RGB frames to check my algorithm.

Thanks for your help

PA.





------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-***@yahoogroups.com
joostrekveld
2010-08-24 14:05:45 UTC
Permalink
Hello,

I've been running into exactly the same problem during the last days.

It seems that OpenCv does not actually recognize the DIB fourcc-code, and "fourcc 0" switches automatically to I420, which is a YUV codec, not uncompressed RGB.

Did you manage to find a solution ?

Does anybody know whether it is a bug, perhaps the 'DIB' fourcc code is simply missing from this file:
<https://code.ros.org/trac/opencv/browser/trunk/opencv/modules/highgui/src/cap_ffmpeg.cpp?rev=3060>

or is it really not supported ?
Strange since on this page 'DIB ' is mentioned as one of the codecs that should work on all platforms.

I'm on Ubuntu Lucid 10.04, and I have FFMPEG installed. Other codecs work fine, not all though, but I haven't checked each and every possibillity.

Any insight very welcome, I'm surprised not many more people have the same issue.

kind regards,

Joost.
Post by lefebvre_pa
Hi !
I've tested all these codecs and they work but I really need to write video files with uncompressed RGB frames to check my algorithm.
Thanks for your help
PA.
------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-***@yahoogroups.com
Clovis Scotti
2010-08-24 16:39:19 UTC
Permalink
I have exactly the same problem/issue.

As shown in ( http://opencv.willowgarage.com/wiki/VideoCodecs ), "DIB "
should work. After I found that it didn't work I switched to I420 which is
also uncompressed (but still, chroma subsampled).

So... any better information on this topic?
Post by joostrekveld
Hello,
I've been running into exactly the same problem during the last days.
It seems that OpenCv does not actually recognize the DIB fourcc-code, and
"fourcc 0" switches automatically to I420, which is a YUV codec, not
uncompressed RGB.
Did you manage to find a solution ?
Does anybody know whether it is a bug, perhaps the 'DIB' fourcc code is
<
https://code.ros.org/trac/opencv/browser/trunk/opencv/modules/highgui/src/cap_ffmpeg.cpp?rev=3060
or is it really not supported ?
Strange since on this page 'DIB ' is mentioned as one of the codecs that
should work on all platforms.
I'm on Ubuntu Lucid 10.04, and I have FFMPEG installed. Other codecs work
fine, not all though, but I haven't checked each and every possibillity.
Any insight very welcome, I'm surprised not many more people have the same issue.
kind regards,
Joost.
Post by lefebvre_pa
Hi !
I've tested all these codecs and they work but I really need to write
video files with uncompressed RGB frames to check my algorithm.
Post by lefebvre_pa
Thanks for your help
PA.
--
Clovis Peruchi Scotti


[Non-text portions of this message have been removed]



------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-***@yahoogroups.com
Loading...