Desktop multi-projecteur simple

Voici une nouvelle façon simple de créer un desktop (bureau) haute résolution sous Linux avec plusieurs projecteurs.  Vous n’avez besoin que de deux outils façiles à utiliser:

lt-align: L’outil d’alignement de projecteurs LightTwist est une interface simple qui permet à l’usager de spécifier une surface de projection unique à partir de plusieurs projecteurs qui se recouvrent entre eux.

lt-compiz-plugin: Un plugin pour compiz 0.9 qui déforme la sortie de chaque projecteur en utilisant les cartes de déformation générées par lt-align. pour produire un espace de projection haute résolution.

Préalables


L’outil d’alignement de projecteur LightTwist et le plugin Compiz ont quelques dépendances qui doivent êtres satisfaites .  Ils ont étés développées sur Ubuntu 11.04 qui inclut la version 0.9 de Compiz.

Le plugin ne peut être utilisé avec une version de Compiz antérieure à 0.9

Les utilisateurs d’Ubuntu 11.04 peuvent exécuter la commande suivante pour aller chercher les librairies nécessaires:

sudo apt-get install subversion cmake cmake-curses-gui libpng12-dev\
 libnetpbm10-dev libavcodec-dev libavformat-dev libavutil-dev\
 libswscale-dev libcv-dev libcvaux-dev libhighgui-dev libfftw3-dev\
 libopenscenegraph-dev libboost-dev libboost-serialization-dev\
 compiz-dev compizconfig-settings-manager xsltproc

Pour les versions précédentes d’Ubuntu et autres distributions Linux, veuillez aller sur www.compiz.org pour obtenir la derniere version de Compiz.

 

 

Téléchargement et installation


IMGU

IMGU est notre librairie de manipulation d’image, utilisée par lt-align et lt-compiz-plugin.

Faites un checkout des sources avec subversion:

svn co https://svn3d.iro.umontreal.ca/svn/imgu/devel imgu

allez dans le nouveau sous-répertoire et compilez:

cd imgu
cmake .
make
sudo make install

 

lt-align

Téléchargez et compilez les sources:

mkdir ~/svn3d
cd ~/svn3d
svn co https://svn3d.iro.umontreal.ca/svn/vision3d/lt-align
cd lt-align
cmake .
make
sudo make install

 

lt-compiz-plugin

Téléchargez et compilez les sources (les plugins Compiz ne peuvent être compilés à même le répertoire de base des sources.  Vous devez créer un sous-répertoire ‘build’ et compiler à partir de là):

mkdir ~/svn3d
cd ~/svn3d
svn co https://svn3d.iro.umontreal.ca/svn/vision3d/lt-compiz-plugin
cd lt-compiz-plugin
mkdir build
cd build
cmake ..
make
make install     ## no sudo!  it will be installed
                 ## in .compiz-1/ in your home directory

 

Utilisation de lt-align


http://www.youtube.com/watch?v=yjxWPenp54w

 

Options à la ligne de commande

$lt-align -h

LightTwist projector alignment tool
Version 0.1

Usage:
-h                                     Displays this help message
-screen<n> <x0> <y0> <width> <height>  Defines a screen and its
                                       dimensions
-o <filename>                          Saves setup to file
-i <filename>                          Loads setup from file
                                       (overrides -screen args)
no arguments                           Uses Xinerama to initialize
                                       all screens

Contrôles

 

<PageUp> et <PageDn> : Sélection de pair de projecteurs.  Les deux écrans de la paire sélectionnée deviendront bleu.  Si aucune pair n’est sélectionnée, vous pouvez ajuster les quatre cibles qui définissent l’aire de projection désirée.

<space> Déselectionner la paire de projecteurs courante pour revenir au mode d’édition de la surface de projection globale (cibles blanches).

Touches <1> and <2>:  Choisir parmi les deux écrans du recouvrement courrant.  Vous pouvez modifier ou définir les points dans l’écran choisi.

Flèches: Ajustements sous-pixel.

<s>: Sauvegarder les réglages et générer les cartes de distortion.

<ESC>: Quitter.

Instructions

 

1 – Définir l’aire de projection:

Assurez vous qu’aucune paire de projecteurs n’est sélectionnée (appyez sur <space>).  Cliquez sur les quatres coins de la surface de projection que vous voulez créer (Dans l’order horaire: haut-gauche, haut-droit, bas-droit, bas-gauche)

2 – Spécifiez des points de mise en correspondance pour chaque paire de projecteurs que se recouvrent.

Pressez <PageDn> pour sélectionner la première paire de projecteurs.  Si les projecteurs ne se recouvrent pas, continuez avec <PageDn>.

Quand vous aurez sélectionné une paire de projecteurs qui se recouvrent, cliquez sur quatres points à l’intérieur de la zone de recouvrement.

Mainenant, appuyez sur <2> pour choisir le second projecteur de la paire sélectionnée.  Cliquez sur les mêmes quatres points que précédemment mais dans ce second écran.  Soyez aussi précis que possible: la qualité du résultat final en dépend.  Les cibles qui ont deux cercles doivent être superposés.  Les cibles du premier écran sont rouges, et celles du second sont vertes: si vos points sont biens alignés, ils devrait apparaitre en jaune.

Vous pouvez faire des ajustements fins avec les flèches de votre clavier.  La cible ajustée sera celle qui est la plus proche du curseur de votre souris.

Répéter pour chaque paire de projecteurs qui  se recouvrent, jusqu’a ce qu’apparaissent des ligne qui connectent les quatres cibles blanches qui définissent votre aire de projection désirée.

Quand vous êtes satisfait de votre alignement, appuyez sur <s> pour sauvegarder vos réglages et générer vos cartes de déformation.  Elle seront ensuite utilisées pour le plugin Compiz.

 

Utilisation de lt-compiz-plugin


Avant tout, vous devez redémarrer compiz comme suit:

compiz --replace ccp

L’installation d’Ubuntu d’inclut pas l’option ‘ccp’ lors du lancement de Compiz au démarrage d’Ubuntu.  Sans cette option, Compiz ne pourra charger le plugin LightTwist.  On espère qu’une prochaine mise à jour d’Ubuntu règle ce probleme.  En attendant, vous devez redémarrer Compiz comme mentionné à chaque session où vous voulez utiliser le plugin.

Activation du plugin

Démarrez CompizConfig Settings Manager à partir du menu Système>Préférences, ou tapez  ‘ccsm’ dans un terminal.

Dans la section ‘Utility’, dans le plugin ‘Mouse Position Polling’, mettez le paramètre ‘Mouse Poll Interval’ à 1.

Ensuite, dans la section ‘Effects’, activez le plugin LightTwist.

Fragment shader : le fichier devrait se trouver là:

<votre dossier personnel>/.compiz-1/lighttwist/data/deform.frag

Vertex shader: laisser vide.

Maintenant entrez les cartes de déformation de chaque projecteur sous ‘distortion maps and parameters for each screen’:

Cliquez sur « New ».

Dans la fenêtre ‘Edit’:
Lut: Spécifiez le fichier lut_<n>.png généré pour chaque projecteur par lt-align
Blend :  (laisser vide)
Blend embeded : cochez
Proj num : devrait correspondre au numéro de projecteur  <n> comme pour le fichier lut.
Gamma : mettez le à 1 pour commencer.  Vous pourrez l’ajuster par la suite.

Vos réglages devraient ressembler à ceci:

Vous êtes maintenant en mesure d’activer le plugin LightTwist!  Faites simplement les raccourcis-clavier suivant:

<shift>F9   : activer / désactiver le plugin
<shift>F7   : activer / désactiver la déformation

voilà!

Cette entrée a été publiée dans Lighttwist, Linux. Vous pouvez la mettre en favoris avec ce permalien.

24 réponses à Desktop multi-projecteur simple

  1. Ping : LGM 2011 report | Animtim home

  2. Ping : Desktop multi-projecteur simple « institut Arts Cultures et Technologies

  3. Gustavo Adolfo Cerezo Vásquez dit :

    Dear sir,
    I’m trying to compile the imgu library. I’m having the following error :

    [ 92%] Building C object examples/CMakeFiles/imguMinGray.dir/imguMinGray.o
    /root/multi-projector/imgu/examples/imguMinGray.c: In function ‘main’:
    /root/multi-projector/imgu/examples/imguMinGray.c:86:3: warning: implicit declaration of function ‘guptaPattern’
    /root/multi-projector/imgu/examples/imguMinGray.c:86:3: warning: nested extern declaration of ‘guptaPattern’
    Linking C executable imguMinGray
    CMakeFiles/imguMinGray.dir/imguMinGray.o: In function `main’:
    /root/multi-projector/imgu/examples/imguMinGray.c:86: undefined reference to `guptaPattern’
    collect2: ld returned 1 exit status
    make[2]: *** [examples/imguMinGray] Error 1
    make[1]: *** [examples/CMakeFiles/imguMinGray.dir/all] Error 2
    make: *** [all] Error 2

    I don’t know if this error is relative to some « no found » libraries at configure stage:

    – Found NETPBM: /usr/lib/libnetpbm.so
    Could not find cminpack
    Could not find rqueue. Building without thread support.
    Could not find prosilica
    – Found V4L:
    – Found OSG library: /usr/lib/libosg.so;/usr/lib/libosgFX.so;/usr/lib/libosgViewer.so;/usr/lib/libosgText.so;/usr/lib/libosgGA.so;/usr/lib/libosgDB.so;/usr/lib/libOpenThreads.so;/usr/lib/libosgUtil.so
    – Found OSG library dirs: /usr/lib
    – Found OSG inc dirs: /usr/include
    osg include dir is /usr/include
    – Checking GNUCXX version 3/4 to determine OpenCV /opt/net/ path
    – Found BMC: /usr/local/lib/libbmc.so
    Could not find pt (pantilt control)
    CMake Warning at CMakeLists.txt:208 (find_package):
    Could not find module FindPROFILER.cmake or a configuration file for
    package PROFILER.

    Adjust CMAKE_MODULE_PATH to find FindPROFILER.cmake or set PROFILER_DIR to
    the directory containing a CMake configuration file for PROFILER. The file
    will have one of the following names:

    PROFILERConfig.cmake
    profiler-config.cmake

    Could not find profiler
    Could not find profilometre
    Could not find ANN library
    – Found FFMPEG library: /usr/lib/libavcodec.so;/usr/lib/libavutil.so;/usr/lib/libavformat.so;/usr/lib/libswscale.so
    – Found FFMPEG library dirs: /usr/lib
    – Found FFMPEG inc dirs: /usr/include
    – Found FFT3W: /usr/lib/libfftw3_threads.so;/usr/lib/libfftw3.so
    – Found Doxygen: /usr/bin/doxygen
    – Configuring done
    CMake Warning (dev) at src/CMakeLists.txt:129 (add_library):
    Policy CMP0003 should be set before this line. Add code such as

    if(COMMAND cmake_policy)
    cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

    as early as possible but after the most recent call to
    cmake_minimum_required or cmake_policy(VERSION). This warning appears
    because target « imgu » links to some libraries for which the linker must
    search:

    stdc++, bmc, m, m

    and other libraries with known full path:

    /root/multi-projector/imgu/src/libmatrixmath.so

    CMake is adding directories in the second list to the linker search path in
    case they are needed to find libraries from the first list (for backwards
    compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable
    or disable this behavior explicitly. Run « cmake –help-policy CMP0003″ for
    more information.
    This warning is for project developers. Use -Wno-dev to suppress it.

    – Generating done
    – Build files have been written to: /root/multi-projector/imgu

    Could you help me please?

    Thanks in advance,

    Gustavo Adolfo

  4. Brian dit :

    From a clean install of 11.04 following the above, all compiled and installed great! BTW, I did start by trying to hack an opensuse 11.4 but ran into too many missing components (in case other try… I’m sure you can get it working there as well but I lost patients).

    I’m wanting to play with this code in a dome we have set up at LA Center Studios (Los Angeles), where is the code for using a camera to create the deformation maps/and or how do we do that?

    • Sébastien Roy dit :

      Almost done… We are putting the finishing touch on a camera-based version of lt-align. The full lighttwist software is much more complicated and experimental than the new lt-align/lt-compiz software. It requires a camera and support cylindrical projections, both standard and in 3D.

      Its probably better to wait for the new lt-align-camera which will feature new inter-reflexion resistant scanning, full 3d models of the screen, and remove the requirement to have a single camera that can see the whole screen (of course you then have to move the camera around).

      For maximum simplicity, we intend to support webcams as well as industrial cameras (we use prosilica ge650 typically). Also, to get a 3D screen model, two cameras will be initially be required. We’ll see. Our initial tests are promising.

  5. Jason Ab. dit :

    Is possible to use for 6 or 9 projectors, for example, for a planetariums domes?

    • Sébastien Roy dit :

      The user interface assumes that the projection surface is planar, so it will not work for a dome.
      However, the compiz plugin itself, the one that makes the live deformation of the desktop, uses a « deformation map » (or « LUT », « Lookup Table ») which can easily account for a curved projection surface.

      We are currently working on a version of lt-align that will rely on cameras instead of manually clicking points. In that case, it will be easy to support a dome surface. The compiz plugin will stay the same.

      If you already know the equation that maps each screen pixel to a projector pixel, it is relatively easy to create a LUT image yourself. We can document the image format for you.

      • Jason Ab. dit :

        Thanks. We have a big dome; and actually we trying to make it digital. Still we are looking the projector that we need, and your software sound very great for this project. Do you have a e-mail? To explain it better.

      • Dear Sébastien,

        Can you, please, share some info about lt-align-camera. Will it use multiple calibrated cameras and projectors? Will it use 3D surface reconstruction? Or will it still require a camera in the center of the eye-point with a full projection area view?
        Do you already have some code to share?

        Thanks in advance.
        Nikola

  6. Pikoro dit :

    Receiving the following error when trying to compile imgu:

    Building CXX object src/CMakeFiles/imgu.dir/plugins/BlackmagicInputCallback.o
    In file included from /home/ubuntu/svn3d/imgu/src/plugins/BlackmagicInputCallback.cpp:1:0:
    /home/ubuntu/svn3d/imgu/src/plugins/BlackmagicInputCallback.h:8:25: fatal error: DeckLinkAPI.h: No such file or directory
    compilation terminated.
    make[2]: *** [src/CMakeFiles/imgu.dir/plugins/BlackmagicInputCallback.o] Error 1
    make[1]: *** [src/CMakeFiles/imgu.dir/all] Error 2
    make: *** [all] Error 2
    Any ideas? I would really like to give this a go.

    Thanks In Advance!

    • Sébastien Roy dit :

      Sorry for that.
      We added a proper check for BlackMagic frame grabber in the CMakeList.txt.
      It should work fine now. SImply update your version with « svn up » and tell me if there are any more problems.

  7. Pikoro dit :

    Ok, everything compiles now, but when trying to activate the plugin, I get a « cannot use FBO » error.

    Shader Compile Error : 0:1(10): error: GLSL 1.30 is not supported. Supported versions are: 1.10, and 1.20

    • Pikoro dit :

      This is on a stock Ubuntu 11.04 install. No extras, no security patches. I have tried before and after upgrading (apt-get upgrade) and I get the same results. Using ATI proprietary drivers, or the built in ATI drivers.

      Also, using the normal ubuntu drivers, when running lt-align, if I press the S key to save, Xorg freezes. I can still ALT+F1 to get to the terminal, but Xorg will not recover. I have to reboot to get the desktop back. The .png files are not created.

  8. Screwfunk dit :

    Hey there guys I am working together with Pikoro. We really want to give LightTwist a try. We are currently using ATI cards…Is it a possibility that we need to use a Nvidia card…We have tried everything..Even different computers with different configurations. If you can let us know what graphics cards you are using or perhaps if you have some insite into his questions above that would be a huge help. We really love what we have seen in your videos so far and are very exited to try this. Please feel free to email either of us and can hash this out. Once again you guys have made a very cool project….

  9. Rui Pereira dit :

    Would this work inside a virtual machine?

    If so, it would be great if you could create VM (vmware convertor?) so it could be used for people to try it easily.

    Cheers

  10. Dalai Felinto dit :

    In Ubuntu 11.10 I’m having a problem with the cmake:
    [WARNING] One or more dependencies for compiz plugin lighttwist not found. Skipping plugin.
    Missing dependencies : compiz-mousepoll

    The mousepoll seems to be part of compiz now, maybe the check is no longer needed?
    Although this is a warning, `make` (and `make install`) are of no use after that.

    Thanks

  11. Dalai Felinto dit :

    For ubuntu 11.10 I had to use:
    sudo apt-get install compiz-plugins-main-dev

    It’s building fine, will test it tomorrow :)

  12. Sean dit :

    Product looks great. Will this work on any form of linux? We are running opensuse 12.1 with 2 nvidia gtx580 cards.

    With my configuration i want to have one pc run 4 video outputs. Will this still be possible using your software?

  13. James Walsh dit :

    I’m trying to get this working on a clean install of 12.0 but in calling « cmake .. » for the plugin, it complains « – package ‘compiz-mousepoll’ not found » even thought it’s installed and set to a value of 1. Any idea if this is something to do with 12.04, my setup or lighttwist?

  14. James Walsh dit :

    I managed to get this working, however the blended screen appears very pixelated (I’m guessing maybe 256 horizontal pixels). Is this a limitation given the LUT is only 8-bits in the PNG, or is something else happening that’s capping the resolution?

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

*

Vous pouvez utiliser ces balises et attributs HTML : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>