Page 2 of 3

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 10:35 am
by mickeyjaw
Cool, I look forward to seeing your updated code. While you have been working on that, I have written a Gnome panel applet to control E-D dongles too. You need to untar the tarball then run

Code: Select all

sudo ./install
Then log out and log back in, and you should be able to right click the gnome panel, select "Add to panel..." and select "Dongle Activator"

Please could either magestik or Fredz test this for me and let me know you find any bugs?

Edit: Replaced broken tarball with working one

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 11:45 am
by magestik
Sorry, it doesn't work on my Debian. There is two buttons : 3D and 2D. But clicking didn't do anything. I don't know why, sorry.

For Tux Stereo Viewer, I've made a configurations file.
For now two configurations :
- Mode (INTERLACED, ANAGLYPH, SHUTTERS, HSYNC, VSYNC)
- Type (Normal, eDimensional, Nvidia3DVision, red/cyan, ...)

So there is many possibilities :
- INTERLACED: normal, eDimensional;
- ANAGLYPH: red/cyan, ...
- SHUTTERS: Nvidia3DVision, eDimensional;
-VSYNC: eDimensional, Dual Projector;
- HSYNC: Dual Projector, Planar;

It's fun :P

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 11:50 am
by mickeyjaw
Please could you:

Code: Select all

cd /usr/local/share/ed_activator
./ed_activator.py run-in-window
and post any errors you get in the terminal?

Thanks

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 11:52 am
by mickeyjaw
Also could you try to right-click and check that the About and Preferences dialogs work

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 12:10 pm
by magestik

Code: Select all

bastien@bastien-debian:~$ cd /usr/local/share/ed_activator
bastien@bastien-debian:/usr/local/share/ed_activator$ ./ed_activator.py run-in-window
running in window
/usr/local/share/ed_activator/ed_activator.glade
./ed_activator.py:34: GtkWarning: gtk_radio_button_set_group: assertion `!g_slist_find (group, radio_button)' failed
  self.interface.add_from_file(sys.path[0] + '/ed_activator.glade')
./ed_activator.py:34: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.interface.add_from_file(sys.path[0] + '/ed_activator.glade')
Traceback (most recent call last):
  File "./ed_activator.py", line 119, in <module>
    sample_factory(app, None)
  File "./ed_activator.py", line 109, in sample_factory
    PyApplet(applet)
  File "./ed_activator.py", line 38, in __init__
    print gtk.gdk.Screen(0).get_n_monitors() , " monitors found"	
TypeError: GObject.__init__() takes exactly 0 arguments (1 given)

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 12:21 pm
by mickeyjaw
OK I think I know what the problem is.

How is your X Server setup? I.E how many monitors, and do you run them as Xinerama or separate screens?

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 12:34 pm
by magestik
Yes I have two monitors in Separate X screen, no Xinerama.
For Tux Stereo Viewer, I just finished to clean the StereoIMG.py.

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 12:38 pm
by Fredz
I have the same error with my config, Debian/unstable with 2 monitors in TwinView in clone mode.

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 1:06 pm
by mickeyjaw
Ok I have made a new version, please could someone test?

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 1:16 pm
by Fredz
When I launch ./ed_activator.py run-in-window I have these messages :

Code: Select all

running in window
/home/frederic/untarred/dongleactivator/ed_activator.glade
./ed_activator.py:34: GtkWarning: gtk_radio_button_set_group: assertion `!g_slist_find (group, radio_button)' failed
  self.interface.add_from_file(sys.path[0] + '/ed_activator.glade')
./ed_activator.py:34: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.interface.add_from_file(sys.path[0] + '/ed_activator.glade')
./ed_activator.py:43: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.PreferencesDialog.ScreenNo.set_all(self.DefaultScreen.get_number(), 0, self.DefaultDisplay.get_n_screens(), 1, 1, 1)
1 Displays Found
:0.0 Is the Default Display
Default Display has  1  Screens
Default Screen is  0
Default Screen has  2  Monitors
Defaulting to Monitor number 0
./ed_activator.py:50: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.PreferencesDialog.MonitorNo.set_all(0, 0, self.DefaultScreen.get_n_monitors(), 1, 1, 1)
Then a window with a "3D" and "2D" button is displayed. When I click on the 3D button, I've got this message and nothing else :

Code: Select all

showMenu called
/home/frederic/untarred/dongleactivatorinterleavednormalon.gif
Traceback (most recent call last):
  File "./ed_activator.py", line 100, in flash_on
    self.dongle_flash(sys.path[0] + '/' + applet.CurrentModeImage)
  File "./ed_activator.py", line 113, in dongle_flash
    dongle_flash_window.set_screen(gtk.gdk.Screen(self.PreferencesDialog.ScreenNo.get_value()))
TypeError: GObject.__init__() takes exactly 0 arguments (1 given)
And when I click on the 2D button, I have this one :

Code: Select all

showMenu called
/home/frederic/untarred/dongleactivatorinterleavednormalon.gif
Traceback (most recent call last):
  File "./ed_activator.py", line 104, in flash_off
    self.dongle_flash(sys.path[0] + '/off.gif')
  File "./ed_activator.py", line 113, in dongle_flash
    dongle_flash_window.set_screen(gtk.gdk.Screen(self.PreferencesDialog.ScreenNo.get_value()))
TypeError: GObject.__init__() takes exactly 0 arguments (1 given)

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 1:27 pm
by mickeyjaw
OK, third time lucky I hope. Sorry for this, but this is my first from scratch program on Linux, and I have been teaching myself both python and GTK libs as I go along... (I used to develop on windows in VB/Delphi plus I have written small programs in C, but only using std C library). I am beginning to see why Fredz said he didn't like python due to compatibility / version problems!

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 2:08 pm
by Fredz
It's getting better ;)

Now when I click on the buttons, the color line codes are actually displayed but just under the gnome-panel, which doesn't activate the glasses.

By the way, I think it could be a good idea to create new forum threads when we talk about different applications, ie. one for TuxStereoViewer, one for the Linux ED activator, etc. Else we're going to have a 10+ thread in no time...

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 2:16 pm
by magestik
Create a new forum ?

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 2:27 pm
by Fredz
Maybe a Linux subforum would be a good idea as it was already suggested. I don't know what's the status about that.

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 2:30 pm
by mickeyjaw
magestik wrote:Create a new forum ?
Yeah didn't Neil offer to do that already? If he does then we can move/disentangle all the threads there.
Fredz wrote:Now when I click on the buttons, the color line codes are actually displayed but just under the gnome-panel, which doesn't activate the glasses.
That's wierd, what Window Manager and Gnome version? I've tried with both Compiz (0.8.2) and Metacity (2.25.144 with Gnome 2.26.0) and the windows with the colour bars go fullscreen fine. Do they draw in a window with borders or fullscreen/borderless? Do you mean they are obscured by the panel or they are drawn where the title bar of a maximised window would be? Any error messages?

Re: Stereoscopy on Linux

Posted: Sat Mar 27, 2010 3:33 pm
by Fredz
That's wierd, what Window Manager and Gnome version?
Gnome 2.26.1 and Metacity 2.22.0 without a compositing manager.
Do they draw in a window with borders or fullscreen/borderless?
Borderless.
Do you mean they are obscured by the panel or they are drawn where the title bar of a maximised window would be?
They are just under the panel, where the title bar of a maximized window would be.
Any error messages?
Here is what is displayed on the console when I click on the 3D button :

Code: Select all

showMenu called
/home/frederic/untarred/dongleactivatorinterleavednormalon.gif
./ed_activator.py:113: DeprecationWarning: integer argument expected, got float
  CurrentScreen = self.DefaultDisplay.get_screen(self.PreferencesDialog.ScreenNo.get_value())
./ed_activator.py:115: DeprecationWarning: integer argument expected, got float
  location = CurrentScreen.get_monitor_geometry(self.PreferencesDialog.MonitorNo.get_value())
./ed_activator.py:119: GtkDeprecationWarning: gtk.timeout_add is deprecated, use gobject.timeout_add instead
  gtk.timeout_add(1000, dongle_flash_window.hide)
Here is a screenshot :
Image

Re: Stereoscopy on Linux

Posted: Sun Mar 28, 2010 10:16 am
by mickeyjaw
OK so i installed Debian squeeze (testing) and i can now replicate the problem. No fix yet, but i notice Tux Stereo Viewer will not fullscreen properly either. Iceweasel will go fullscreen, however, so i must be possible right? I guess i need to find a python app in the repo that fullscreens properly to see how it is done. Maybe i need to bypass GTK for the fullscreen bit

Re: Stereoscopy on Linux

Posted: Sun Mar 28, 2010 12:57 pm
by mickeyjaw
Done! It works on Ubuntu 9.04 and Debian Squeeze (Testing). Hopefully it will work on Debian Sid too. I just had to set a size request for the window, rather than leaving it as the default (-1, -1).

Re: Stereoscopy on Linux

Posted: Sun Mar 28, 2010 1:23 pm
by Fredz
You've got it this time, congrats ! When the color bar is displayed, a giant gray fullscreen window is displayed under it too, just to let you know.

Re: Stereoscopy on Linux

Posted: Sun Mar 28, 2010 1:59 pm
by mickeyjaw
Brilliant, thanks for testing! I get the grey window too btw

Re: Stereoscopy on Linux

Posted: Sun Mar 28, 2010 2:23 pm
by magestik
mickeyjaw wrote:i notice Tux Stereo Viewer will not fullscreen properly either.
Here (Debian Lenny) fullscreen works fine ;)
And what about my domain name ? Do you have any idea ? It's an emrgency ^^ Two days left !

Re: Stereoscopy on Linux

Posted: Mon Mar 29, 2010 12:49 pm
by magestik
Yep,

http://magestik.fr/projets/stereo3D/Tux ... er_0.1.deb" onclick="window.open(this.href);return false;
No big news ... Just some update. This new version must have a configuration file into your home in .stereo3D directory.
For me : /home/bastien/.stereo3D/ ! The config file has to be nammed "general.conf" and have to contain something like that :

Zalman:

Code: Select all

mode = INTERLACED
type = normal
eye = LEFT
eDimensional Dongle:

Code: Select all

mode = INTERLACED
type = eDimensional
eye = LEFT
Anaglyph (red/cyan only):

Code: Select all

mode = ANAGLYPH
type = red/cyan
eye = LEFT

Re: Stereoscopy on Linux

Posted: Tue Mar 30, 2010 7:27 am
by mickeyjaw
Cool. May I suggest, however, that left/right eye switching be implemented in stereoIMG somewhere, rather than using the dongle to swap eyes? Otherwise, it will not be possible to swap eyes for those using Anaglyph/Zalman etc.

With respect to my fullscreen problem with Tux-Stereo-Viewer, it happened because I was using a screen resolution of 800x600, but there is 1000x820 size request and 1000x820 default size set in the glade interface. Once I increased the resolution above 1152x864, Tux-Stereo-Viewer went fullscreen OK. I think we should reduce this default size/size request so that Tux-Stereo-Viewer will at least work at 1024x768 for those people who use cheap crappy CRT's with e-dimensional dongles.

I can make both of these changes if you want, just let me know I and I will do it.

Finally, I had an idea for a name: Freedimensional ?

Re: Stereoscopy on Linux

Posted: Tue Mar 30, 2010 10:43 am
by magestik
Swapping Left/right will be in stereoIMG ;)
For resolution, ok, youcan do it :P
"Freedimensional" sounds great ... But can't be used : already registered. One day Left :'(

And, what about talking in Live ? By example, with messenger network, some IRC channels or others way ?

Re: Stereoscopy on Linux

Posted: Sun Apr 04, 2010 7:19 am
by mickeyjaw
Ok, so I got impatient and decided to implement left/right eye swapping anyway. I also made the changes to the default size/size request so it is now 780x550, which fits even an 800x600 screen. I also added a button to the toolbar to quickly swap eyes. Tarball is attached.

Fredz: How are your projects coming along? Which one are you mostly working on, and is there anything I can do to help?

Re: Stereoscopy on Linux

Posted: Sun Apr 04, 2010 9:15 am
by Fredz
Fredz: How are your projects coming along? Which one are you mostly working on, and is there anything I can do to help?
Not much to present at this time, but I'm still working on various projects, especially lib3dglasses which should provide both a library with low level access for DDC glasses and a 3D test application in OpenGL.

I've stopped working on glStereo for now (3D driver for Linux) until I get my off-axis projection code working right in the test application for lib3dglasses. My movie player and un-anaglypher are also on hold.

I've started working on a new - simpler - application which should be able to show a 3D model of a stereoscopic image (side-by-side or anaglyph) to evaluate the quality of the 3D.

Any help would be appreciated, do you have some knowledge in C and OpenGL programming ?

Re: Stereoscopy on Linux

Posted: Sun Apr 04, 2010 10:24 am
by mickeyjaw
Fredz:

I was hoping you would say that. I think that lib3dglasses will be very useful as a foundation for many other projects, and hopefully easy to achive in a reasonably short time. Once the api is stable let me know and i will try to write python bindings so we can use it in tux-stereo-viewer etc.

I have a little experience in C - i studied an introductory course during my first year at uni. I only learnt the basics - stdio.h, string.h, math.h etc. I am looking to get back into C though as i start a new degree in contol systems engineering in october. I have to say i find C much easier to write than to read right now, so i don't know how much help i can be with writing code.

Re: Stereoscopy on Linux

Posted: Sun Apr 04, 2010 3:08 pm
by magestik
Mickeyjaw> Thank you ;) The new deb package is here : http://magestik.fr/TuxStereoViewer_0.1.deb" onclick="window.open(this.href);return false; I have made some minor modifications ...
Now, Interlaced and Anaglyph are fully supported. We have to make left/right and top/bottom. Someone, on Ubuntu-fr forum, has asked me to make some applications for dual-projector. So we can try it ? So, top/bottom and right/left could be our new priority ? Then, we could work on Shutters... with lib3dglasses ...

Fredz> ... which is a great idea, thank you for working on it !
I don't know anything in C... Sorry.

Re: Stereoscopy on Linux

Posted: Sun Apr 04, 2010 5:24 pm
by mickeyjaw
magestik: I found out about your path/filename encoding problem - there is a function in urllib you can use. You can do:

Code: Select all

import urllib
then use

Code: Select all

urllib.unquote(string)
eg

Code: Select all

decoded_filename = urllib.unquote(encoded_filename)
or something like that

see http://docs.python.org/library/urllib.html for more info

Re: Stereoscopy on Linux

Posted: Mon Apr 05, 2010 3:42 am
by magestik
I know urllib and the unquote function ... It's work. I was hoping that I can found another way, but I can't. So I use this and it's work. Thank you.
New package is here : http://magestik.fr/TuxStereoViewer_0.1.deb" onclick="window.open(this.href);return false;

EDIT: News !
Now, we can open two separate files via "File>Open Left/Right Images". If your left image finished by "l" the software search for the same image which ends with "r".
Example: you try to open test_l.jpg and test_r.jpg. The first popup ask you the left file which is named test_l.jpg, so the soft will search for test_r.jpg. If they are on the same directory, the stereo image is directly displayed ! It's also work with "testl"/"testr" or "test-l"/"test-l"; you just have to named both of them in the same way ;) It's hard to explain in English, I hope you will understand.

Re: Stereoscopy on Linux

Posted: Wed Apr 07, 2010 11:32 am
by mickeyjaw
Cool, but you broke left/right switching - you need to change all of the calls from self.swap_eyes() to self.StereoIMG.swap_eyes() - there are about 4 calls to this function and you only changed one.

Also, just for a laugh I decided to run this on M$ Wind0ze today (Bored at work again). I only had to make a couple of tweaks for it to work, mainly just the hardcoded path to the window icon (/usr/share/pixmaps/....) See the picture below!
T3D-Win32.JPG

Re: Stereoscopy on Linux

Posted: Wed Apr 07, 2010 12:44 pm
by magestik
Right, I forgotten two calls :P I just replaced one ^^
It's work on Windows :O It could be fun...

Hum, I'm here, so, I want to tell you that I'm going to be absent for a week.
It's holidays ... so I go in my Family.

Good bye every body ;)

Re: Stereoscopy on Linux

Posted: Sun Apr 11, 2010 8:29 am
by mickeyjaw
Ok so I did some more work on this over the weekend. Eye switching is fixed again, and left/right and top/bottom are now implemented. In addition, I have also added a checkerboard mode for DLP checkerboard systems. There are two extra buttons on the toolbar to adjust the vertical separation when in top/bottom mode too.

Re: Stereoscopy on Linux

Posted: Sun Apr 11, 2010 1:09 pm
by magestik
Great, good job ;)
I go back home tomorrow, in the afternoon. I will make the new deb package.
And, please, explain me how to install it on windows.

Re: Stereoscopy on Linux

Posted: Sun Apr 11, 2010 2:49 pm
by mickeyjaw
Ok for windows i installed:

gtk+ from http://ftp.acc.umu.se/pub/GNOME/binarie ... _win32.zip" onclick="window.open(this.href);return false;

python 2.5.6 from http://www.python.org" onclick="window.open(this.href);return false;

pygobject from http://ftp.acc.umu.se/pub/GNOME/binarie ... -py2.6.exe" onclick="window.open(this.href);return false;

pycairo from http://ftp.acc.umu.se/pub/GNOME/binarie ... -py2.6.exe" onclick="window.open(this.href);return false;

pygtk from http://ftp.acc.umu.se/pub/GNOME/binarie ... -py2.6.exe" onclick="window.open(this.href);return false;

PIL 1.1.6 from http://www.pythonware.com/products/pil/index.htm" onclick="window.open(this.href);return false;
(Do not use PIL 1.1.7)

Then i used 7zip to unpack the contents of the deb package, or you could use winzip.

I needed to comment out about 3-4 lines for it to work, i cannot remember which. I will make a list when i have had a look.

Re: Stereoscopy on Linux

Posted: Mon Apr 12, 2010 8:41 am
by mickeyjaw
Ok windows needs the following lines commented:

Code: Select all

#import pygtk
#pygtk.require('2.0')
Then either comment out this next line, or change the path:

Code: Select all

self.window.set_icon( gtk.gdk.pixbuf_new_from_file('/usr/share/pixmaps/TuxStereoViewer-icon.png') ) # Thx H4X0R666 for the icon
Finally, in delete_event(), change

return True

to:

return False

Otherwise, the program crashes on exit.

Re: Stereoscopy on Linux

Posted: Tue Apr 13, 2010 2:30 am
by magestik
Ok Thank you ;)

Re: Stereoscopy on Linux

Posted: Sat Apr 24, 2010 8:41 am
by mickeyjaw
Bump!

Where's my deb package? :P

Re: Stereoscopy on Linux

Posted: Sat Apr 24, 2010 1:00 pm
by magestik
Sorry I'm late. So, it's done : http://magestik.fr/TuxStereoViewer_0.1.deb" onclick="window.open(this.href);return false;

Re: Stereoscopy on Linux

Posted: Wed Jun 02, 2010 12:37 pm
by magestik
Project is not dead ! I just have some kind of problem ... Unfortunately, I couldn't work on this before 6th June !
Just wait for me :mrgreen: