It is currently Tue May 21, 2013 7:22 am



Reply to topic  [ 94 posts ]  Go to page Previous  1, 2, 3  Next
 Stereoscopy on Linux 
Author Message
Cross Eyed!

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


Sat Mar 27, 2010 10:35 am
Profile
Two Eyed Hopeful

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



Sat Mar 27, 2010 11:45 am
Profile
Cross Eyed!

Joined: Sun Feb 15, 2009 12:50 pm
Posts: 131
Please could you:
Code:
cd /usr/local/share/ed_activator
./ed_activator.py run-in-window


and post any errors you get in the terminal?

Thanks


Sat Mar 27, 2010 11:50 am
Profile
Cross Eyed!

Joined: Sun Feb 15, 2009 12:50 pm
Posts: 131
Also could you try to right-click and check that the About and Preferences dialogs work


Sat Mar 27, 2010 11:52 am
Profile
Two Eyed Hopeful

Joined: Tue Dec 22, 2009 11:48 am
Posts: 79
Code:
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)


Sat Mar 27, 2010 12:10 pm
Profile
Cross Eyed!

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


Sat Mar 27, 2010 12:21 pm
Profile
Two Eyed Hopeful

Joined: Tue Dec 22, 2009 11:48 am
Posts: 79
Yes I have two monitors in Separate X screen, no Xinerama.
For Tux Stereo Viewer, I just finished to clean the StereoIMG.py.


Sat Mar 27, 2010 12:34 pm
Profile
Golden Eyed Wiseman! (or woman!)
User avatar

Joined: Sat Jan 09, 2010 2:06 pm
Posts: 1897
Location: Perpignan, France
I have the same error with my config, Debian/unstable with 2 monitors in TwinView in clone mode.


Sat Mar 27, 2010 12:38 pm
Profile WWW
Cross Eyed!

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


Sat Mar 27, 2010 1:06 pm
Profile
Golden Eyed Wiseman! (or woman!)
User avatar

Joined: Sat Jan 09, 2010 2:06 pm
Posts: 1897
Location: Perpignan, France
When I launch ./ed_activator.py run-in-window I have these messages :
Code:
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:
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:
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)


Sat Mar 27, 2010 1:16 pm
Profile WWW
Cross Eyed!

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


Sat Mar 27, 2010 1:27 pm
Profile
Golden Eyed Wiseman! (or woman!)
User avatar

Joined: Sat Jan 09, 2010 2:06 pm
Posts: 1897
Location: Perpignan, France
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...


Sat Mar 27, 2010 2:08 pm
Profile WWW
Two Eyed Hopeful

Joined: Tue Dec 22, 2009 11:48 am
Posts: 79
Create a new forum ?


Sat Mar 27, 2010 2:16 pm
Profile
Golden Eyed Wiseman! (or woman!)
User avatar

Joined: Sat Jan 09, 2010 2:06 pm
Posts: 1897
Location: Perpignan, France
Maybe a Linux subforum would be a good idea as it was already suggested. I don't know what's the status about that.


Sat Mar 27, 2010 2:27 pm
Profile WWW
Cross Eyed!

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


Sat Mar 27, 2010 2:30 pm
Profile
Golden Eyed Wiseman! (or woman!)
User avatar

Joined: Sat Jan 09, 2010 2:06 pm
Posts: 1897
Location: Perpignan, France
Quote:
That's wierd, what Window Manager and Gnome version?
Gnome 2.26.1 and Metacity 2.22.0 without a compositing manager.
Quote:
Do they draw in a window with borders or fullscreen/borderless?
Borderless.
Quote:
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.
Quote:
Any error messages?
Here is what is displayed on the console when I click on the 3D button :
Code:
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


Sat Mar 27, 2010 3:33 pm
Profile WWW
Cross Eyed!

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


Sun Mar 28, 2010 10:16 am
Profile
Cross Eyed!

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


Sun Mar 28, 2010 12:57 pm
Profile
Golden Eyed Wiseman! (or woman!)
User avatar

Joined: Sat Jan 09, 2010 2:06 pm
Posts: 1897
Location: Perpignan, France
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.


Sun Mar 28, 2010 1:23 pm
Profile WWW
Cross Eyed!

Joined: Sun Feb 15, 2009 12:50 pm
Posts: 131
Brilliant, thanks for testing! I get the grey window too btw


Sun Mar 28, 2010 1:59 pm
Profile
Two Eyed Hopeful

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


Sun Mar 28, 2010 2:23 pm
Profile
Two Eyed Hopeful

Joined: Tue Dec 22, 2009 11:48 am
Posts: 79
Yep,

http://magestik.fr/projets/stereo3D/Tux ... er_0.1.deb
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:
mode = INTERLACED
type = normal
eye = LEFT


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


Anaglyph (red/cyan only):
Code:
mode = ANAGLYPH
type = red/cyan
eye = LEFT


Mon Mar 29, 2010 12:49 pm
Profile
Cross Eyed!

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


Tue Mar 30, 2010 7:27 am
Profile
Two Eyed Hopeful

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


Tue Mar 30, 2010 10:43 am
Profile
Cross Eyed!

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


Sun Apr 04, 2010 7:19 am
Profile
Golden Eyed Wiseman! (or woman!)
User avatar

Joined: Sat Jan 09, 2010 2:06 pm
Posts: 1897
Location: Perpignan, France
Quote:
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 ?


Sun Apr 04, 2010 9:15 am
Profile WWW
Cross Eyed!

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


Sun Apr 04, 2010 10:24 am
Profile
Two Eyed Hopeful

Joined: Tue Dec 22, 2009 11:48 am
Posts: 79
Mickeyjaw> Thank you ;) The new deb package is here : http://magestik.fr/TuxStereoViewer_0.1.deb 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.


Sun Apr 04, 2010 3:08 pm
Profile
Cross Eyed!

Joined: Sun Feb 15, 2009 12:50 pm
Posts: 131
magestik: I found out about your path/filename encoding problem - there is a function in urllib you can use. You can do:

Code:
import urllib


then use

Code:
urllib.unquote(string)


eg

Code:
decoded_filename = urllib.unquote(encoded_filename)


or something like that

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


Sun Apr 04, 2010 5:24 pm
Profile
Two Eyed Hopeful

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

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.


Mon Apr 05, 2010 3:42 am
Profile
Cross Eyed!

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

Attachment:
T3D-Win32.JPG


You do not have the required permissions to view the files attached to this post.


Wed Apr 07, 2010 11:32 am
Profile
Two Eyed Hopeful

Joined: Tue Dec 22, 2009 11:48 am
Posts: 79
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 ;)


Wed Apr 07, 2010 12:44 pm
Profile
Cross Eyed!

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


Sun Apr 11, 2010 8:29 am
Profile
Two Eyed Hopeful

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


Sun Apr 11, 2010 1:09 pm
Profile
Cross Eyed!

Joined: Sun Feb 15, 2009 12:50 pm
Posts: 131
Ok for windows i installed:

gtk+ from http://ftp.acc.umu.se/pub/GNOME/binarie ... _win32.zip

python 2.5.6 from www.python.org

pygobject from http://ftp.acc.umu.se/pub/GNOME/binarie ... -py2.6.exe

pycairo from http://ftp.acc.umu.se/pub/GNOME/binarie ... -py2.6.exe

pygtk from http://ftp.acc.umu.se/pub/GNOME/binarie ... -py2.6.exe

PIL 1.1.6 from http://www.pythonware.com/products/pil/index.htm
(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.


Sun Apr 11, 2010 2:49 pm
Profile
Cross Eyed!

Joined: Sun Feb 15, 2009 12:50 pm
Posts: 131
Ok windows needs the following lines commented:
Code:
#import pygtk
#pygtk.require('2.0')


Then either comment out this next line, or change the path:
Code:
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.


Mon Apr 12, 2010 8:41 am
Profile
Two Eyed Hopeful

Joined: Tue Dec 22, 2009 11:48 am
Posts: 79
Ok Thank you ;)


Tue Apr 13, 2010 2:30 am
Profile
Cross Eyed!

Joined: Sun Feb 15, 2009 12:50 pm
Posts: 131
Bump!

Where's my deb package? :P


Sat Apr 24, 2010 8:41 am
Profile
Two Eyed Hopeful

Joined: Tue Dec 22, 2009 11:48 am
Posts: 79
Sorry I'm late. So, it's done : http://magestik.fr/TuxStereoViewer_0.1.deb


Sat Apr 24, 2010 1:00 pm
Profile
Two Eyed Hopeful

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


Wed Jun 02, 2010 12:37 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 94 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.