Stereoscopy on Linux

Talk about everything off topic (EXCEPT POLITICS). Keep it fun!
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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
You do not have the required permissions to view the files attached to this post.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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
Last edited by magestik on Sat Mar 27, 2010 12:09 pm, edited 1 time in total.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Also could you try to right-click and check that the About and Preferences dialogs work
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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)
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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?
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post by Fredz »

I have the same error with my config, Debian/unstable with 2 monitors in TwinView in clone mode.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Ok I have made a new version, please could someone test?
You do not have the required permissions to view the files attached to this post.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post 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)
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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!
You do not have the required permissions to view the files attached to this post.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post 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...
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Create a new forum ?
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post 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.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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?
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post 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
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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).
You do not have the required permissions to view the files attached to this post.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post 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.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Brilliant, thanks for testing! I get the grey window too btw
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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 !
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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 ?
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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 ?
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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?
You do not have the required permissions to view the files attached to this post.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post 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 ?
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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
You do not have the required permissions to view the files attached to this post.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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 ;)
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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.
You do not have the required permissions to view the files attached to this post.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post 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.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Ok Thank you ;)
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Bump!

Where's my deb package? :P
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Sorry I'm late. So, it's done : http://magestik.fr/TuxStereoViewer_0.1.deb" onclick="window.open(this.href);return false;
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post 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:
Post Reply

Return to “General Discussion”