Hi Arne,
On Thu, 2004-10-07 at 10:05, Arne Caspari wrote:
> Reply to the mail from Johann Schoonees (j.schoonees@...):
>
> >
> > Then a user can (1) talk directly to camera registers, or (2) use
> > video1394 DMA to access a non-IIDC device, or (3) talk to DCAM
> > registers and control DMA directly [(1)+(2)], or (4) have simple
> > control of any 1394 DCAM [libdc1394], or (5)
> > I-want-to-use-a-camera-in-my-program [camwire], or (6)
> > just-give-me-an-image [Coriander]. Just select the appropriate
> > library or app.
>
> I do not see any advantage to the current state: We have libraw1394
> for register access, video1394 for DMA and libdc1394 for IIDC camera
> access.
>
> To improve this, IMHO the right way would be to dump the video1394 (
> which has a lot of problems ) in favor of a more generic raw_iso
> interface in libraw1394 ( ie.: DMA buffer fill mode with user pointers
> ), so we have one generic API for 1394 access.
<common open source lament>
This is of course the best, but who will do it? IIRC the ISO API has
been there for a while now.
</common open source lament>
> libdc1394 should provide ( still IMHO ) a flat abstraction to IIDC
> cameras, so you have get/set functions for the video format,
> properties and the like. This is for people who know their camera and
> are willing to write an application solely for an IIDC camera.
This is my opinion too.
> But the main issue that remains is that we now have: libdc1394 for
> IIDC cameras, v4l and v4l2 for USB cameras and PCI grabbers, dv1394
> for DV cameras, something else for DVB devices and maybe some
> proprietary libs for some specialized proprietary cameras.
> It is just impossible to write an application which interfaces with
> all of these devices. Every application has to know the devices it
> uses. Also with APIs which offer functions like "get_brightness" for
> the brightness property, "get_gain" for the gain property it is hard
> to impossible to write an application that interfaces with devices
> which supported set of properties vary a lot.
If we have a good abstraction level above libdc1394 one could built a
lib that could handle a lot of different hardware. Obvious example:
GetBrightness(camera_t* camera, float* brightness)
{
switch (camera->type) {
case IIDC:
case V4L:
case ...
}
}
Each 'case' statement would be filled with simple functions and the lib
would essentially be a big pile of switches. (there's probably a better
idea that this... ;-) )
> We need something like Microsofts DirectShow: Something that
> completely abstracts from the hardware. If some of you have access to
> a Windows2000/XP system, you should try the "IC Capture" program which
> interfaces with DirectShow ( http://www.imagingcontrol.com ) - you can
> download a trial version to see how it works.
> ( CAUTION/NOTE : I work for The Imaging Source so this is prejudiced.
> I do not want to advertise here but to give you an idea on the
> advantage of such an generic interface for the user ). If you have a
> Sony IIDC camera, you can also get a trial version of the driver to
> see how it works with windows ( again, prejudiced: I wrote the driver
> ;-) ).
> With this application ( and of course the SDK that was used to develop
> the app ), it simply does not matter what device you are using: IIDC
> cameras, PCI framegrabbers, webcams, DV devices... all look exactly
> likewise to the app. The app does not even have to have knowledge what
> properties are supported by the device.
>
> I think, this is something Linux needs to achieve. I try to get this
> functionality with my "unicap" library ( unicap.sourceforge.net ) -
> which still has some way to go.
The Gran Plan would therefor be:
APP
|
VIDEO_LIB
|
----------------------------------------------------
iidc-api v4l libdv sane (?) ...
It's a great thing but it's a huge task. I think the first thing to do
is to clean the libdc subtree (iow our own backyard first :-) ) so that
we can offer a nice interface and talk with other projects about a
common video lib that would provide basic support for every camera.
> libdc1394/coriander is great, I use it a lot during development ( I
> could not imagine developing the firmware for our next generation
> camera without it ;-) ) but I currently only see it either in the use
> by other developers or by individuals, mainly at universities. It is
> still too hard to use for the average user, requires to much knowledge
> about the IIDC protocol and also the whole thing is too hard to
> install to the average user.
Of course. Just the fact that you have to push min. 3 buttons to get an
image in coriander is plain wrong (my fault here...)
> I guess we can do little about the last point ( installation ) but if
> you compare the whole thing to Windows: On windows, you download the
> application and a driver package, double click the driver installation
> utility, double click the application setup -- and within a glance you
> are ready to go.
apt-get will give you more or less the same thing, but some stuff is
missing (like creating/setting devices I think)
> With Linux, you need to figure where to get the package for your
> distro or need to know how to do a "configure && make && make install"
> and not only that, you need to install "libraw1394" first, then
> "video1394", then "libdc1394", then "coriander". Then you often have
> to check the permissions for "/dev/video1394" and "/dev/raw1394" to
> get it working. Then you need to setup "coriander" correctly for DMA
> capture sometimes even point it to the right "/dev" file, then
> eventually you manage to start the live video display ( and with some
> luck you get it then if you do not come along with some YUY2/UYVY
> issues like i did ;-) ).
BTW, some people now have problems with the CVS: their screen is purple!
So it seems you solved your problem but now we have some more. ;-) Any
SDL expert in the room?
Cheers,
Damien
--
_ Damien Douxchamps
('- PhD Student / Research Assistant
//\ Image Processing Group, Communications Lab, UCL, Belgium
V_/_ http://www.tele.ucl.ac.be/view-people.php?id=46
|