Dear friends,
you might noticed increased level of talk regarding various 3D technologies recently. There are multiple solutions available, like nvidia 3D glasses, special "3D" monitors and projectors.
And then there is the good old anaglyph we've been playing in TBGL for some time. It provided nice illusion of depth, but the colors were just completely wrong. Also lot of talk over net cited impossibility to maintain colors with red cyan glasses.
I was experimenting with this, wanted to break this color fidelity problem. I got some nice results, but then I realised ... somebody did this before me ... and better.
Anyway this was nice challenge, and I present you here little program implementing algorithms from the mentioned source. It is application allowing to combine two images to one anaglyph.
This is very nice task for ThinBASIC, as the script could take advantage of:
- Calling function by name
- Built-in matrix handling
- Canvas and TImage module
The first one is used for simple thing - all image processing functions start with "PA_", so I can automatically detect them from source and add them as option in the dialog automagically.
Built-in matrix handling allows to perform quite fast per pixel operations.
Canvas serves as display of the images, while TImage allows to load images of various formats.
The script itself is far from perfect - it could use some speed tuning (I don't recommend images over 640x480 unless you have fast PC) and it seems the TImage module sometimes makes image "upside down".
But I hope you will like this experiment, and maybe it will be you who will discover even better technique to maintain good level of color fidelity with anaglyph.
The images you get with the script are photos taken by me using normal camera - you just shoot one frame, focusing on some point on the object, then shift the camera while still keeping the same part of object in focus and grab other frame. This should simulate view of left and right eye. I will appreciate any left-right images from you, as I think the mine do not demonstrate the 3D effect to the edge yet.
Last word - the latest beta is a must to have for fast and proper execution of the script.
Have fun,
Petr
Bookmarks