Anaglyph Creator

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Anaglyph Creator

Post by Paul »

Cool little app to quickly and easily create anaglyphs. (Red/Blue 3D Images)
http://www.reelmedia.org/cgi-bin/PurePr ... ub=General

Believe it or not, I actually needed this for a much larger commercial project.


You can get the Red/Blue glass from cerial boxes, SpyKids DVD movie, comic books, magazines, etc.
Image Image
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

You can use this app to create your own Anaglyph images using a standard digital camera.

Line up a subject and take a picture of it, move the camera about 2 inches to the right and take another picture.
Image
Transfer these images to your computer.

Start Anaglyph Creator and load the first (left) image into the left window and the second (right) image into the right window. Press the Create button.
View cool 3D image with Red/Blue glasses.
Image Image
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

Very nice.. tight exe..

- np
Phoenix
Enthusiast
Enthusiast
Posts: 141
Joined: Sun Sep 04, 2005 2:25 am

Re: Anaglyph Creator

Post by Phoenix »

Very nice! A suggestion: allow the user to drag/drop an image onto the left and right panels. And a bug: if you have loaded both images, but then click a panel to load a new one but then cancel, the Create button does nothing even though the original image is still shown in the panel that was cancelled.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

Added and fixed :)
Image Image
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Post by dobro »

my prg date of the 13/01/2006
on the French forum:
http://purebasic.hmt-forum.com/viewtopi ... t=anaglyph

allows the rotation and displacment of the images for the misalignment!!
available here: http://michel.dobro.free.fr/bidouilles/ ... glyphe.zip

:lol: :lol: :lol:
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

Did you know your program crashes when you tell it to select an image then press cancel?

I think I'll stick with my version... it's only 49kb and it's FAST :)
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

hi Paul, your Anaglyph tool looks realy good so far. But red-cyan is not the
only one ;-)
you should provide more different anaglyph types like red-blue, red-green,
lcd-shutter and interlace stereo glasses users.
I've created some examples for you with one of your 3d images :)

Image

click hereto visit the website
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

Hi dige,

I know there are many different types of 3D images that can be created. Around here you can only get the Red/Blue glasses so that is the only format I support. :)
Image Image
UserOfPure
Enthusiast
Enthusiast
Posts: 469
Joined: Sun Mar 16, 2008 9:18 am

Re:

Post by UserOfPure »

Paul, would you ever care to share the source? Or at least tell us the theory behind making an image all red and all blue? I have no idea how to strip all colors except for red/blue in an image.
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Re: Re:

Post by dobro »

UserOfPure wrote:Paul, would you ever care to share the source? Or at least tell us the theory behind making an image all red and all blue? I have no idea how to strip all colors except for red/blue in an image.

hum :)

Code: Select all

r= rgb(red(point(x,y)),0,0)
vb= rgb(0,green(point(x,y),blue(point(x,y)))
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
UserOfPure
Enthusiast
Enthusiast
Posts: 469
Joined: Sun Mar 16, 2008 9:18 am

Re: Re:

Post by UserOfPure »

Okay, I think I understand. Will experiment. Thanks!

[Edit] Okay, that's helped, but does anyone know how I can mix the resulting red pixel from the left image with the blue pixel from the right image? Or a general math formula to mix two given color values? I'm hopeless at maths. :(
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Re: Anaglyph Creator

Post by dobro »

Code: Select all

          r=red(left_picture(ix,iy) )
        v=Green(right_picture(ix,iy))
        b=Blue(right_picture(ix,iy))
        
        Plot(x,y, RGB(r,v,b))  
:wink:
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
UserOfPure
Enthusiast
Enthusiast
Posts: 469
Joined: Sun Mar 16, 2008 9:18 am

Re: Anaglyph Creator

Post by UserOfPure »

Thanks again dobro, but I decided against that method and just mixed the two pics together as a new third. Was much easier, and faster.
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Re: Anaglyph Creator

Post by dobro »

how to mix 2 pictures without using point() plot()?
You can save the mix? :shock:
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
Post Reply