Patch for IEEE1394 Cameras to produce colored pictures (Patch #766)
Description
Hi,
just recently I noticed that my firewire camera only produces grey scale pictures. So, I took a look at the file cap_dc1394_v2.cpp and especially the function startCapture().
First of all, the auto-detection doesn't work if the cam got YUV color space, first it recognizes the YUV spectrum but switches the to MONO8 immediately (got that one with std::cout). So I guess the author forgot a break in the second if-statement. I think this structure shall implement some kind of switch-case-statement.
The other bug I found was in the manual setting of "userMode" (custom setting of the color-space). In the same function as the above bug, directly after the auto-detection, userMode is checked if it's greater than zero. This is obviously wrong, as the following array counts from zero and the first (here: colored) mode can't be selected. The comparison must be to non-negative.
I don't know if the last bug is of any importance as the user choice of the color-space seems to have disappeared in the current svn. Nevertheless it's still present in the current 2.2.0 release.
A patch is attached.
Thanks and regards,
Alex
Associated revisions
Fixed error with color space switching for IEEE1394 cameras (patch #766)
Merge pull request #766 from taka-no-me:try_compile_fix
History
Updated by Art Mahoney over 13 years ago
Alex's correction for initialization of YUV firewire camera's works. Without it, people using OpenCV with YUV firewire camera's (such as the Basler A602fc) won't be able to obtain color images. This issue is still present in 2.3.
Updated by Alexander Diewald over 13 years ago
Is this part of OpenCV maintained by anyone at all?
Updated by Kirill Kornyakov about 13 years ago
- Tracker changed from Feature to Patch
Updated by Alexander Shishkov almost 13 years ago
- Priority changed from High to Normal
- Target version deleted ()
Updated by Alexander Reshetnikov almost 13 years ago
Alex, you changes for cap_dc1394_v2.cpp were applied in r7739.
Problem with userMode comparison had been fixed in one of the previous revisions.
Thank you!
- Status changed from Open to Done
- Priority changed from Normal to Low
- Assignee set to Alexander Reshetnikov
Updated by Alexander Shishkov almost 13 years ago
- Target version set to 2.4.0
Updated by Andrey Kamaev over 12 years ago
- Category changed from highgui-images to highgui-camera