This is a small commandlineprogram written in C using the GDK library.

If you have a 3D Television or Monitor like the LG Cinema 3D models, this might be nice for you.

You can use your webcam with a program like "ucview" (search forum) to create a foto.
Then slide the webcam some cm aside, and take another foto.

So you usually now have something like
/root/Image_00000.jpg
/root/Image_00001.jpg

To convert them to a 3D Foto, type in a consolewindow:

Code:

cd /root
3dpic Image_00000.jpg Image_00001.jpg out.jpg

The resulting "out.jpg" has merged both in one file, side by side, scaled down to the half width.

As the program is jus a quick hack, it has no further options.
The resulting picture has HDTV resolution (1920x1080).The Jpeg Quality is 100, to avoid loosing quality.

To view the picture in 3D, use your favorite Pictureviewer like gqview, press "f" to see it fullscreen.
Then on LG Monitors, press the "3D" button on the remote control, and use the 3D-Mode "2 pictures side by side".

Yes Mark, it's good to see that you haven't quit the forum altogether.

Depending on the effect you're after in the 3-D picture, you might want everything in the picture to be in focus. I don't know what the depth of field of a webcam is, and I don't think you have any control over it. If you take the pictures with a camera that allows you to fiddle with the lens aperture, shutter speed and ASA or iso speed, you can set the lens aperture to its smallest opening (highest number on the dial) to get the greatest depth of field and bring more of the picture into sharp focus. Pinhole cameras have almost infinite depth of field. A 3-D camera made with pinhole "lenses" would be an interesting thing to try. Everything in the picture would be in sharp focus. Well, more or less; pinhole images aren't quite as sharp as those made with a regular lens.

FLASH,
yes a real camera certainly would achieve even better results. I dream of a camcorder from panasonic, that has a special optional 3D lens. But the camcorder costs around 400 Euro, and the lens 460 Euro or so.
So I actually prefer to pay 80 Euro for a second HDTV cam right now. And the C910 has really great results, the fotos in the first message were made with it.

So the camcorder will wait, until I have earned some more bucks in my new job

My setup: two Logitech C910 HDTV webcams, pasted with some glue on a base (a piece of plastic).

I tried several types of glue, and ended up with 2 component epoxy glue, still experimenting.

The scripts:

Code:

/root/3dmplayer

This will run 2 windows of mplayer (see forum for download) side by side, displaying /dev/video0 and /dev/video1 (the 2 cams).
When I used a USB-Hub, it did not work, had to attach one cam on the front of the computer, the other one on the back. I think there was a conflict because both use the same address/identifier.

So like this you can see the livestream of the cameras in 3D.
To close them, press "q" in each of them.

It is written for HDTV resolution, if you have a different resolution, you need to edit /root/3dmplayer1 and /root/3dmplayer2

Options:

Code:

/root/3dmplayer low

This will use the lower "1280x720" mode of the cameras, like this they have better framerates, but worse quality.

The second script is

Code:

/root/3dsnapshot

It will send both already running mplayers the command to save screenshots, and then converts them with 3dpic2, a slightly modified 3dpic from the first message.

The resulting files are stored in /root/3dsnapshots.

The modification does not use scaling to avoid as much conversion as possible for quality reasons, so requires that the pictures are in HDTV format already.
If you use a different format, edit /root/3dsnapshot to use the original 3dpic instead of 3dpic2.

The script then simply will take the two mplayer screenshots, and combine them to a side-by-side 3D-Foto for 3D-Monitors, and then display them in gqview.
If you have a different viewer, you must edit the script to use that instead. After a keypress in the console gqview is terminated (I prefer that to some mouseclicks in gqview itself).

I run 3dsnapshot on a consolewindow on second monitor (my TV), while monitor 1 displays the cameras.
If you use just one monitor, remember that you can quickly switch the windows with "alt - tab", at least using Icewm.

this sets the camera to a high resolution of 2592x1944, and then "cuts out" the HDTV resolution 1920x1080.
Like this you get a "zoom". The framerate is set to 1 fps, with higher values I got blackouts.

Code:

/root/3dmplayer zoom1

Like zoom, but the cut out area now is just 1280x720, scaled up to HDTV size. So you have a "slight digital zoom" with a little quality loss.

Code:

/root/3dmplayer zoom2

Like zoom2, but the cut out area now is just 960x540, scaled up to the double HDTV size. So you have a "double digital zoom" with high quality loss.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum