Olá Nuno o meu flarConfig.xml é o seguinte:
<!-- this file specifies configurations for FLARManager. -->
<!-- to use this file to initialize FLARManager, pass its path into
FLARManager.initFromFile(). -->
<!-- note that all relative paths listed here must be relative to the .swf
location; absolute paths may also be used. -->

<flar_config>
<!-- source settings -->
<flarSourceSettings
sourceWidth="320"
sourceHeight="240"
displayWidth="640"
displayHeight="480"
framerate="30"
downsampleRatio="1" />

<!-- miscellaneous FLARManager settings -->
<flarManagerSettings
mirrorDisplay="true"
smoothing="3">
<smoother className="FLARMatrixSmoother_Average" />
<thresholdAdapter className="DrunkWalkThresholdAdapter" speed="0.3"
bias="-0.1" />
</flarManagerSettings>

<!-- location of camera parameters file, e.g. FLARCameraParams.dat or
camera_para.dat. -->
<cameraParamsFile path="FLARCameraParams.dat" />

<!-- list of file paths of patterns for FLARToolkit to detect. -->
<!-- @resolution specifies the resolution at which the patterns were
generated. -->
<patterns resolution="8" patternToBorderRatio="0.5" minConfidence="0.5">
<pattern path="a.pat" />
<pattern path="b.pat" />
</patterns>

</flar_config>


obrigado por qq ajuda
Um abraço
Sérgio
No dia 6 de Abril de 2010 17:04, Nuno Morgadinho
<[email protected]>escreveu:

> Oi Sérgio,
>
> O que tens no teu flarConfig.xml ?
>
> Nuno
>
> On Tue, Apr 6, 2010 at 5:17 PM, sergio silva <[email protected]>
> wrote:
> > Olá,
> > Gostava de alterar este projecto e receber imagens de uma camara ip
> > que está situada no seguinte ip 192.168.1.240 em vez da webcam usb.
> > Será que alguém me pode ajudar?
> >
> > public class HelloFLAR extends Sprite
> >        {
> >                private var fm:FLARManager;
> >                private var scene:Scene3D;
> >                private var view:Viewport3D;
> >                private var camera:FLARCamera3D;
> >                private var lre:LazyRenderEngine;
> >                private var p:Plane;
> >                private var p1:Plane;
> >                private var con:DisplayObject3D;
> >                private var con1:DisplayObject3D;
> >                private var marker:FLARMarker;
> >                private var marker1:FLARMarker;
> >                private var v:Vid;
> >                private var v2:Vid;
> >
> >                public function HelloFLAR()
> >                {
> >                        initFLAR();
> >                        v = new Vid();
> >                        v.vid.source = "jornada.flv";
> >                        v.vid.stop();
> >                        v2 = new Vid();
> >                        v2.vid.source = "kramer.m4v";
> >                        v2.vid.stop();
> >                }
> >
> >                private function initFLAR():void
> >                {
> >                        fm = new FLARManager("flarConfig.xml");
> >                        fm.addEventListener(FLARMarkerEvent.MARKER_ADDED,
> onAdded);
> >
>  fm.addEventListener(FLARMarkerEvent.MARKER_REMOVED, onRemoved);
> >                        fm.addEventListener(Event.INIT, init3D);
> >                        addChild(Sprite(fm.flarSource));
> >                }
> >
> >                private function onAdded(e:FLARMarkerEvent):void
> >                {
> >
> >                if( e.marker.patternId==0){
> >                        marker = e.marker;
> >                        p.visible = true;
> >                        v.vid.play();
> >                        }
> >                if( e.marker.patternId==1){
> >                        marker1 = e.marker;
> >                        p1.visible = true;
> >                        v2.vid.play();
> >                        }
> >                }
> >
> >                private function onRemoved(e:FLARMarkerEvent):void
> >                {
> >                        if( e.marker.patternId==0){
> >                        marker = null;
> >                        p.visible = false;
> >                        v.vid.stop();
> >                        }
> >                        if( e.marker.patternId==1){
> >                        marker1 = null;
> >                        p1.visible = false;
> >                        v2.vid.stop();
> >                        }
> >
> >                }
> >
> >                private function init3D(e:Event):void
> >                {
> >                        scene = new Scene3D();
> >                        camera = new FLARCamera3D(fm.cameraParams);
> >                        camera.z = -30;
> >                        view = new Viewport3D(640, 480, true);
> >                        lre = new LazyRenderEngine(scene, camera, view);
> >
> >                        var mat:MovieMaterial = new MovieMaterial(v,
> false, true);
> >                        p = new Plane(mat, 240, 180, 2, 2);
> >                        p.scaleY = -1;
> >                        p.rotationZ = 90;
> >                        p.visible = false;
> >
> >                        con = new DisplayObject3D();
> >                        con.addChild(p);
> >                        scene.addChild(con);
> >                        addChild(view);
> >                        addChild(new FramerateDisplay());
> >
> >
> >                        var mat1:MovieMaterial = new MovieMaterial(v2,
> false, true);
> >                        p1 = new Plane(mat1, 240, 180, 2, 2);
> >                        p1.scaleY = -1;
> >                        p1.rotationZ = 90;
> >                        p1.visible = false;
> >
> >
> >                        con1 = new DisplayObject3D();
> >                        con1.addChild(p1);
> >
> >
> >                        scene.addChild(con1);
> >                        addChild(view);
> >                        addChild(new FramerateDisplay());
> >
> >                        addEventListener(Event.ENTER_FRAME, loop);
> >                }
> >
> >                private function loop(e:Event):void
> >                {
> >                        if(marker != null)
> >                        {
> >                                con.transform =
> > FLARPVGeomUtils.convertFLARMatrixToPVMatrix(marker.transformMatrix);
> >                        }
> >                        if(marker1 != null)
> >                        {
> >                                con1.transform =
> > FLARPVGeomUtils.convertFLARMatrixToPVMatrix(marker1.transformMatrix);
> >                        }
> >                        lre.render();
> >                }
> >        }
> > }
> >
> > --
> > Recebeu esta mensagem porque está inscrito no grupo "Mailing List da
> Comunidade Portuguesa de Rich Internet Applications - www.riapt.org" dos
> Grupos do Google.
> >
> > Para publicar uma mensagem neste grupo, envie um e-mail para
> [email protected].
> > Para anular a inscrição neste grupo, envie um e-mail para
> [email protected] <riapt%[email protected]>.
> > Para ver mais opções, visite este grupo em
> http://groups.google.com/group/riapt?hl=pt-PT.
> >
> >
>
>
>
> --
> Nuno Morgadinho
> http://www.morgadinho.org
> http://twitter.com/morgadin
>
> --
> Recebeu esta mensagem porque está inscrito no grupo "Mailing List da
> Comunidade Portuguesa de Rich Internet Applications - www.riapt.org" dos
> Grupos do Google.
>
> Para publicar uma mensagem neste grupo, envie um e-mail para
> [email protected].
> Para anular a inscrição neste grupo, envie um e-mail para
> [email protected] <riapt%[email protected]>.
> Para ver mais opções, visite este grupo em
> http://groups.google.com/group/riapt?hl=pt-PT.
>
>

-- 
Recebeu esta mensagem porque está inscrito no grupo "Mailing List da Comunidade 
Portuguesa de Rich Internet Applications - www.riapt.org" dos Grupos do Google.

Para publicar uma mensagem neste grupo, envie um e-mail para 
[email protected].
Para anular a inscrição neste grupo, envie um e-mail para 
[email protected].
Para ver mais opções, visite este grupo em 
http://groups.google.com/group/riapt?hl=pt-PT.

Responder a