[libavg-devel] video4Linux2 on libavg: some design choices

OXullo Intersecans x at 02l.net
Sun Jun 24 01:50:13 CEST 2007


Hi folkz,
we just committed a working revision of the branch libavg-v4l2 (the  
latest 2134 has been merged with the trunk head).


V4LCamera via CameraNode can be loaded using avg 'camera' node:

<camera id="cam" x="0" y="0" width="640" height="480" device="/dev/ 
video0" mode="640x480_YUV422" channel="1" source="v4l" />

attributes are quite self-explanatory however:

mode: WxH_PF where PF can be: RGB, MONO8, YUV422 (the same as  
firewire camera)
channel: video mux selector, for example, a bt878 pci board has:  
0=tuner, 1=composite, 2=svideo
source: 'v4l' instead of 'firewire' is the magic switch

download method from v4l card has been hardcoded as mmap(), which  
seems to sign the best performance


Now, about the tracker.
This is instantiated by Player, using addTracker() method, usually as  
python binding Player.addTracker()

We split this method in two: addFWTracker(device, mode) and  
addV4LTracker(device, mode, channel). This seems not to be the best  
way, but was the fastest, waiting for some Uli's advices basing on  
his best flavours.

We have some doubts about avgtrackerrc.
The one supplied with mtc subproject (TrackerConfig.xml) does not  
validate against the trackerconfig dtd, as the latter requires a more  
detailed structure.
Recreating it from the dtd was quite simple, using default data found  
on specific class constructors:

-------------------------- /etc/avgtrackerrc --------------------------
<?xml version="1.0" encoding="utf-8"?>
<trackerconfig>
         <camera>
                  <brightness value="128"/>
                  <exposure value="128"/>
                  <gamma value="1"/>
                  <gain value="128"/>
                  <shutter value="128"/>
         </camera>

         <tracker>
                 <historyupdateinterval value="5"/>
                 <touch>
                         <threshold value="128" />
                         <similarity value="31" />
                         <areabounds min="80" max="450" />
                         <eccentricitybounds min="1" max="3" />
                 </touch>
                 <track>
                         <threshold value="128" />
                         <similarity value="31" />
                         <areabounds min="80" max="450" />
                         <eccentricitybounds min="1" max="3" />
                 </track>

         </tracker>

         <transform>
                 <cameradisplacement x="0" y="0" />
                 <camerascale x="1" y="1" />
                 <distortionparams p2="0" p3="0" />
                 <trapezoid value="0" />
                 <angle value="0" />
                 <displaydisplacement x="0" y="0" />
                 <displayscale x="1" y="1" />
         </transform>
</trackerconfig>
-------------------------- /etc/avgtrackerrc --------------------------

Uli: can you put a working avgtrackerrc under svn control?

At this time, V4LCamera does not honour tune-in attributes, therefore  
the <camera> node of the rc is simply ignored.


Is there someone that can try to fire up a v4l device with libavg?
byez

--
OXullo Intersecans

0 2 L > Outside Standing Level
http://www.02L.net



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.datenhain.de/pipermail/libavg-devel/attachments/20070624/72f0d6e7/attachment.html


More information about the libavg-devel mailing list