[libdc] Addressing problems with Videre and other non fully IIDC-compliant cameras.
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Jeremy L. <le...@wi...> - 2008-09-15 11:18:04
|
The company I work for, Willow Garage, is developing an open-source robotics software platform and as such we want to provide good support for firewire cameras. We've started making use of libdc1394 and have largely been very satisfied. However, there have been a couple problems that have popped up that I have been unable to resolve and I was wondering if someone could point me in the right direction. The first is an apparent bug in the deinterlacing library. I submitted a patch to the libdc1394 patch tracker on sourceforge some months ago fixing the bug, but, it does not appear that the patch tracker is being actively monitored or used. What is the correct way to get a patch incorporated into the libdc1394 library? The second problem is more involved and relates to our choice of the Videre Design STOC cameras for doing stereo vision. The bottom line is that the cameras do not actually adhere to the IIDC specs. The camera does not respond to reading from a register while streaming video, which indirectly means any of the dc1394_feature_set_value calls hang since they always read from the register first. At the moment, I'm keeping a local patch against the libdc1394 respository which adds a set of functions: dc1394_feature_set_*_blind, that basically mirror the normal calls, but without performing a read from the register first. This bothers me greatly, but is still preferable to having to stop the video every time I want to adjust whitebalance or exposure. Furthermore, the camera does not seem to set all of the bits correctly at the 0x40x offset causing many of the check feature calls to fail. And, the camera supports a number of non-standard features which involve setting special values at the control register offset 0xFF000. At the moment I'm dealing with this through my own library built on top of libdc1394 which deals with these things just through making low-level calls. This works for me, but certainly wouldn't work for someone without access of the workings of the Videre or the want to deal with the low-level calls. It also clearly doesn't scale with an arbitrarily large number of different cameras. It raises some issues with regard to the right way to handle these kinds of situations, and how frequently these kinds of situations actually arise. Is Videre alone in their disregard for following the specs to the letter, or are there a number of pathological cameras out there that are just not compatible with the library? My initial thought is that without too much work the relevant parts of the library could be refactored for the purposes of allowing someone to specify known IIDC spec exceptions on a per-camera basis. Libdc1394, after determining the make/model/version of the camera, should be able to apply these exceptions "safely," and provide the end-user with a more positive experience for these borderline cameras. When someone finds a camera that doesn't work, it changes the fix from a software development problem to a characterization problem. Formulating this as a characterization problem means support for these cameras can be added without risk of introducing bugs for other cameras that are already working, and moreover can likely be done by someone with little to no software experience. Is this something that people would be interested in, or does it clash with the overall philosophy of the dc1394 project? Jeremy Leibs Systems Engineer Willow Garage, Inc. |